Unwanted Closing Parenthesis not detected

Nov 25, 2014 at 4:47 PM

When i went through the Step 2 as part of porting SLANGFORDOTNET to Python, i found a bug in the RDParser. Getting unexpected result if unwanted closing parenthesis are present in the expression.

Adding the following snippet in the Term and Expr function may help:
if (Current_Token == TOKEN.TOK_CPAREN)
Console.WriteLine("Unwanted Closing Parenthesis Found");
throw new Exception();
Nov 27, 2014 at 4:49 AM
Edited Nov 27, 2014 at 4:50 AM

The above solution was not correct

We need to check whether the CurrentToken variable TOKEN.TOK_NULL or not in CallExpr function.

If it is TOKEN.TOK_NULL syntax is valid else invalid