示例#1
0
 public TokenKindTests()
 {
     lower = new Pattern("Lowercase", @"[a-z]+");
     upper = new Pattern("Uppercase", @"[A-Z]+");
     abcDEF = new Text("abcDEF");
 }
示例#2
0
 private static Action<Token> Token(TokenKind expectedKind, string expectedLiteral)
 {
     return t => t.ShouldBe(expectedKind, expectedLiteral);
 }
示例#3
0
 public LexerTests()
 {
     lower = new Pattern("Lowercase", @"[a-z]+");
     upper = new Pattern("Uppercase", @"[A-Z]+");
     space = new Pattern("Space", @"\s", skippable: true);
 }
示例#4
0
 public TokenStreamTests()
 {
     lower = new Pattern("Lowercase", @"[a-z]+");
     upper = new Pattern("Uppercase", @"[A-Z]+");
 }