Beispiel #1
0
 public void Eat(TokenType tokenType)
 {
     if (m_CurrentToken.tokenType == tokenType)
     {
         m_CurrentToken = m_Lexer.GetNextToken();
     }
     else
     {
         InvokeError();
     }
 }
Beispiel #2
0
 public Interpreter(Lexer lexer)
 {
     m_Lexer        = lexer;
     m_CurrentToken = m_Lexer.GetNextToken();
 }
 public Parser(Lexer lexer)
 {
     m_Lexer        = lexer;
     m_CurrentToken = m_Lexer.GetNextToken();
 }