Ejemplo n.º 1
0
 public FooBarBazLexer(LexerInput input)
     : base(input)
 {
     this.AddPattern(-1, @"\s+", "whitespace");
     this.AddKeyword(1, "foo");
     this.AddKeyword(2, "bar");
     this.AddKeyword(3, "baz");
     this.AddKeyword(4, "quux");
     this.AddPattern(5, @"\$[a-z]+", "id");
     this.AddLiteral(6, "-");
 }
Ejemplo n.º 2
0
 public FooBarBazLexer(LexerInput input)
     : base(input)
 {
     this.AddPattern(-1, @"\s+", "whitespace");
     this.AddKeyword(1, "foo");
     this.AddKeyword(2, "bar");
     this.AddKeyword(3, "baz");
     this.AddKeyword(4, "quux");
     this.AddPattern(5, @"\$[a-z]+", "id");
     this.AddLiteral(6, "-");
 }