[antlr-interest] how to find if parser ate all input?

Randall R Schulz rschulz at sonic.net
Tue Sep 11 12:46:19 PDT 2007


On Tuesday 11 September 2007 12:34, Putrycz, Erik wrote:
> In my grammar unit tests, I test if the parser ate the whole input
> string.
>
> With antlr 2.7 this was easy but I cannot figure out how to do this
> with antlr 3.

Put an explicit EOF token in the grammar in the production for your 
start symbol(s).


> ...
>
> Erik Putrycz


Randall Schulz


More information about the antlr-interest mailing list