[antlr-interest] discrepancy between antlrworks and antlr generated parser

David Cournapeau cournape at gmail.com
Thu Apr 9 01:56:07 PDT 2009


On Thu, Apr 9, 2009 at 5:20 PM, Gavin Lambert <antlr at mirality.co.nz> wrote:
> At 19:10 9/04/2009, Indhu Bharathi wrote:
>>WS: (' ' | '\n' | '\r' )+ {$channel=HIDDEN};
>>
>>This should give you compile error. There must be a ';'
>>immediately after 'HIDDEN'. ( {$channel=HIDDEN;} )
>
> Python doesn't require semicolon statement terminators, does it?

no, it does not (but adding the semicolon made it work). I did not
know the above was supposed to be python code.

> Another possibility is some kind of interpreter vs. debugger weirdness.
>  ANTLR's interpreter mode is fairly useless (in that it often does the wrong
> thing);

Ah, good to know. I noticed some unexpected behavior, but I assumed I
missed something.

cheers,

David


More information about the antlr-interest mailing list