[antlr-interest] Nondeterminism between alts 1 and 2 of block...

Terence Parr parrt at jguru.com
Mon May 19 16:56:07 PDT 2003


On Monday, May 19, 2003, at 02:54  PM, Thiago F.G. Albuquerque wrote:

> At 22:22 18/05/03 -0700, you wrote:
>> For now, I'd use syntactic predicates...
>
> I fixed it like this:
>
> I set k=1 in the parser and modified the grammar:
>
> exp : ID ("(") => func_call

Hmm...that doesn't quite make sense.  I'd do

(ID "(")=> func_call

instead

:)

>        | (variable "=") => assignment
>        | logical_exp
>        ;
>
> Nondeterminism errors appeared in lots of other places in the grammar, 
> but
> all of them could be corrected in the same way.
>
> Thank you, for your help, Terrence. I am sorry if I seemed a bit rude 
> in my
> previous message.

Not at all :)  Very polite as is everyone on this list :)

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Co-founder, http://www.peerscope.com link sharing, pure-n-simple
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list