jackfiled
99fdd6438b
5!8!4!个状态堂堂登场! Co-authored-by: Ichirinko <1621543655@qq.com> Reviewed-on: PostGuard/Canon#11
28 lines
616 B
C#
28 lines
616 B
C#
using Canon.Core.Abstractions;
|
|
using Canon.Core.Enums;
|
|
using Canon.Core.GrammarParser;
|
|
|
|
namespace Canon.Tests.GrammarParserTests;
|
|
|
|
public partial class PascalGrammarTests
|
|
{
|
|
private readonly GrammarBuilder _builder = new()
|
|
{
|
|
Generators = s_pascalGrammar, Begin = new NonTerminator(NonTerminatorType.StartNonTerminator)
|
|
};
|
|
|
|
private readonly GrammarParserBase _parser;
|
|
|
|
public PascalGrammarTests()
|
|
{
|
|
Grammar grammar = _builder.Build();
|
|
_parser = grammar.ToGrammarParser();
|
|
}
|
|
|
|
[Fact]
|
|
public void GrammarTest()
|
|
{
|
|
Assert.NotNull(_parser);
|
|
}
|
|
}
|