public GrammarReductionConflict(ParserState state, TokenGrammarElement lookahead, ParserAction action1, ParserAction action2)
 {
     State = state;
     Lookahead = lookahead;
     Action1 = action1;
     Action2 = action2;
 }
Example #2
0
 public TokenGrammarElement ToElement(CSharpAstTokenCode code)
 {
     TokenGrammarElement definition;
     if (!TokenMapping.TryGetValue((int)code, out definition))
     {
         TokenMapping.Add((int)code, definition = new TokenGrammarElement(code.ToString()));
     }
     return definition;
 }
Example #3
0
 public UnexpectedTokenException(TextLocation location, TokenGrammarElement token, IList<TokenGrammarElement> expected)
 {
     Location = location;
     Token = token;
     Expected = expected;
 }