Example #1
0
 /// <summary>
 /// Parse the supplied expression.
 /// If the expression is not valid, then a ParserException will be thrown.
 /// Finally we test to see that all tokens have been parsed.
 /// If not, this is likely to be an error in the expression, for example something like
 /// 4535+54345+5345345POWER(2, 3)
 /// </summary>
 public void ParseExpression(TokenQueue tokens)
 {
     ParseExpressionR(tokens);
     if (tokens.PeekToken().TokenType != TokenType.EOF)
     {
         throw new ParserException(string.Format("Tokens remain after parsing: {0}.", tokens.ToString()));
     }
     return;
 }