Hi James:

I traced the code, it seems the PhoenixSQLParser that we generated is not throwing the MissingTokenException and UnwantedTokenException. The reason is that they are thrown in the BaseRecognizer.recoverFromMismatchedToken method. The PhoenixSQLParser overrides that method and throws only MismatchedTokenException. As a result, those two exception type are never used by our generated parser.

Thanks
Tony


On 2/21/13 7:14 PM, "James Taylor" <notifications@github.com> wrote:

In src/test/java/com/salesforce/phoenix/parse/QueryParserTest.java:
> @@ -339,4 +340,63 @@ public void testSubtractionInSelect() throws Exception {
>          parser.parseStatement();
>      }
>
> +    @Test
Can you figure out a way to generate UnwantedTokenException and MissingTokenException?


-
 Reply to this email directly or view it on GitHub <https://github.com/forcedotcom/phoenix/pull/62/files#r3111236> .