Example #1
0
 public Lexer(LexerModule m, bool _writeDotFiles)
 //throws IOException
 {
     writeDotFiles = _writeDotFiles;
     ruleDfas      = initAutomata(m.Rules);
     errorRuleName = m.ErrorRuleName;
     vocab         = initDefaultVocab(m.Rules, m.ErrorRuleName);
     skipRules     = initSkip(m.Rules);
     classOf       = initTokenClasses(m.Rules);
     dfasByScope   = initScopes(m.Rules, ruleDfas);
 }
Example #2
0
 public Lexer(LexerModule m, Dictionary <string, int> tokenVocab, bool _writeDotFiles)
 //throws IOException
 {
     writeDotFiles = _writeDotFiles;
     ruleDfas      = initAutomata(m.Rules);
     errorRuleName = m.ErrorRuleName;
     vocab         = tokenVocab;
     skipRules     = initSkip(m.Rules);
     classOf       = initTokenClasses(m.Rules);
     dfasByScope   = initScopes(m.Rules, ruleDfas);
 }