[antlr-interest] non-determinism warnings again
Tarun Khanna
tarunkhanna at gmail.com
Mon Jul 11 10:58:01 PDT 2005
Hi John,
Thanks for your response. The parser seems to be working fine now. Although
I still don't understand why does it not generate any warnings now, when it
did generate them earlier. What is the difference in the rule that you
modified it to and the original one? So I guess I'll post a new topic for
that...Let's hope someone throws light.
Thanks
Tarun
On 7/8/05, John B. Brodie <jbb at acm.org> wrote:
>
> 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
>
--
Tarun Khanna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050711/b864415f/attachment.html
More information about the antlr-interest
mailing list