[antlr-interest] Failing upon illigal input termination

Gavin Lambert antlr at mirality.co.nz
Wed Nov 5 23:41:22 PST 2008


At 04:55 6/11/2008, Vitaliy wrote:
>That is, If we’ve got the input:
>LegalStatement1,
>LegalStatement2,
>

>LegalStatementN,
>IllegalStatement,
>
>Antlr would stop on LegalStatementN,
>Instead of reporting an error for IllegalStatement.
>
>What can I do to achieve this behavior?

Add EOF to the end of your top-level parser rule.



More information about the antlr-interest mailing list