[antlr-interest] Confused by warnings

Jim Idle jimi at temporal-wave.com
Tue Apr 21 07:44:15 PDT 2009


Sam Barnett-Cormack wrote:
> So, I have this rule:
>
> setting
>    : (LCURL)=>settingLCURL
>    | (LCID|externalValueReference)=>referencedValue
>    | typeornull
>    | value
>    | object
>    ;
>
> And I'm getting warnings that multiple choices can match input such as 
> LCID or LCURL. It's true that a lot of the options can match either, but 
> this should be short-circuited by the syntactic predicates, shouldn't it?
>
> None of the rules referenced have any errors or warnings.
>
> Hoping someone has an idea,
>
> Sam (BC)
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>   
Use ANTLRWorks to check the grammar, it will show you where the 
conflicts are and you can probably then see why the predicates are not 
enough in this case. However, you are better restructuring the grammar 
to get rid of such conflicts if at all possible.

Jim


More information about the antlr-interest mailing list