[antlr-interest] java.util.NoSuchElementException: can't look backwards more than one token in this stream

Bart Kiers bkiers at gmail.com
Thu Jun 14 02:17:08 PDT 2012


Hi Verny,

This (usually?) happens when the tree grammar and parser grammar don't
match.

Regards,

Bart.


On Thu, Jun 14, 2012 at 10:40 AM, Verny Quartara <webny23 at gmail.com> wrote:

> Hi everybody,
> I'm getting a strange error in my tree grammar.
> The AST is correctly generated by the parser.
> When I try to walk the tree, I get
>
> java.util.NoSuchElementException: can't look backwards more than one token
> in this stream
>
> Before moving into the details of the grammar, can anyone explain me under
> which conditions is this exception thrown? Perhaps I can solve it by my own
> with some suggestion.
>
> Thank you
>
> Regards
>
> --
> Verny Quartara
>
> 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