[antlr-interest] Re: Comments and questions on a recent proje ct

Tiller, Michael (M.M.) mtiller at ford.com
Wed Aug 28 10:44:02 PDT 2002


One other question.  I have a rule where there is an ambiguity between one alternative in a block and the exit of the block.  I'd like to try and use syntactic predicates to avoid this situation.  I understand how to use syntactic predicates to control choice of alternatives within a rule.  How can you use them when one of the choices is an exit from a rule?!?  I tried moving the syntactic predicate up one level in the grammar, but I still get non-deterministic warnings in the original rule.

I saw this in the ANTLR documentation:

a
    : (A (P)*) => A (P)*
    | A
    ;

This was pretty close to what I have, but it didn't seem to make a difference.

Any suggestions?

--
Mike

 

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



More information about the antlr-interest mailing list