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

Edwards, Waverly Waverly.Edwards at genesys.com
Tue Sep 11 13:26:30 PDT 2007

I must not have done that correctly.  
I thought I explicitly put an EOF in the grammar and came up with an


-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Randall R Schulz
Sent: Tuesday, September 11, 2007 3:46 PM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] how to find if parser ate all input?

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