[antlr-interest] non-determinism warnings again

John B. Brodie jbb at acm.org
Fri Jul 8 15:29:48 PDT 2005


The qualification rule I posted was wrong, you probably have already
fixed this:

qualification :
        DOT 
        ( ( ID ( qualification )? )
............^^.....should be IDENT
        | TAB )
    ;

Your problem with `invalid token null` is due, i believe, to exp
looking for more term`s at the end of the expression (well actually
term is looking for more factor`s, but that is same issue). I think
you need to add an outermost rule which handles the EOF token, thus:

top : exp EOF ;

and then call parse.top() from your Main driver.

Hope this helps...
   -jbb


More information about the antlr-interest mailing list