[antlr-interest] antlrworks "NoViableAlt" exception

Jim Idle jimi at temporal-wave.com
Thu Nov 8 05:03:27 PST 2012


If the python target is doing that, it is incorrect. I doubt that
though. You should see T31, T32 etc and it won't always be the same.

Consider:

r1 : 'WHILE' ;
WHILE : 'while' ;

Please use ANTLR.markmail.org to find his discussed ad nauseum ;)

Jim

On Nov 8, 2012, at 20:58, "Juancarlo Añez" <apalala at gmail.com> wrote:

> On Thu, Nov 8, 2012 at 7:44 AM, Mike Lischke <mike at lischke-online.de> wrote:
>
>> Because literals in the parser (i.e. string constants used in parser
>> rules) get a random lexer token id, which are hard to recognize when you
>> walk your tree.
>
>
> Why hard to recognize? ANTLR declares tokens for those literals in the
> generated source. A 'WHILE' becomes WHILE=nnn.
>
> --
> Juancarlo *Añez*
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list