[antlr-interest] Decision can match input such as ...using multiple alternatives: 1, 2
Gavin Lambert
antlr at mirality.co.nz
Thu Apr 24 19:56:02 PDT 2008
At 06:51 25/04/2008, elekis wrote:
>singlePragma: t1=T_Ident
> ( T_LParent ( literal | desigElement (T_Comma
desigElement)*)
> (T_Comma ( literal | desigElement (T_Comma
desigElement)*))
> T_RParent )? T_SemiColon;
>
>I have the followed warning
>
>warning(200): Pyaflplug.g:35:42: Decision can match input such
as
>"T_Comma T_Comma" using multiple alternatives: 1, 2
>As a result, alternative(s) 2 were disabled for that input
At a guess, 'desigElement' contains a T_Comma, so ANTLR is warning
you that it's ambiguous with its surroundings. It's hard to say
for sure without seeing more of the grammar.
(And you've got a common subexpression there; you probably ought
to factor it out.)
More information about the antlr-interest
mailing list