[antlr-interest] Ambiguity with similar token with different length ...

lloyd_from_far lloyd at galador.net
Tue Jul 1 20:27:19 PDT 2003


ANTLR has a tedious behavior which I wonder if there is anyway to go 
around:

let say in my option I have: {
k = 2;
}

and have 2 lexer tokens like:
LT: "<=";
LE: '<';

I am sure that my grammar would have ambiguity warning while 
generating with 'java antl.Tool', in fact if I ever have (ever in the 
parser or the lexer, even if 'k' is big enough) 2 rules which have 
similar begining and different length I would have such warning even 
if there is no real ambiguity.

How to solve this problem ?
I mean how should I write my rules, or which tag should I employ for 
writting warning free grammar ?


 

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




More information about the antlr-interest mailing list