Example #1
0
 public Lexer(string filePath)
 {
     this.filePath = filePath;
     buffer        = new StringBuilder(128);
     wordBox       = new TokenBox();
     tokens        = new List <Token>();
     wordBox.AddDFA(new ConstantDFA(), TokenType.Constant);
 }
Example #2
0
 public void AddNotConstantWord(string token, TokenType wordType)
 {
     wordBox.AddDFA(new NotConstantDFA(token), wordType);
 }