示例#1
0
文件: Lexer.cs 项目: MyPure/GameLexer
 public Lexer(string filePath)
 {
     this.filePath = filePath;
     buffer        = new StringBuilder(128);
     wordBox       = new TokenBox();
     tokens        = new List <Token>();
     wordBox.AddDFA(new ConstantDFA(), TokenType.Constant);
 }
示例#2
0
文件: Lexer.cs 项目: MyPure/GameLexer
 public void AddNotConstantWord(string token, TokenType wordType)
 {
     wordBox.AddDFA(new NotConstantDFA(token), wordType);
 }