[antlr-interest] NON DETERMINISM PROBLEM
John B. Brodie
jbb at acm.org
Tue Mar 29 06:58:31 PST 2005
Greetings!
You asked:
>due to non determism at "number" whatever lookahead i use .
>non-determinism remains at rule array_index_seq . what should be done
>for such problem
>
>array_index_seq:
> array_index (array_index )*
> ;
>
>array_index:
> LBRAC number RBRAC
> ;
>
>number:
> NUMBER
> | TIC_NUMBER
> | NUMBER TIC_NUMBER
> ;
>
>
try replacing your number rule with:
number :
NUMBER ( TIC_NUMBER )?
| TIC_NUMBER
;
Hope this helps...
-jbb
More information about the antlr-interest
mailing list