[antlr-interest] help

John Allen Green greenj at ix.netcom.com
Sat Jun 8 01:13:31 PDT 2002


Balvinder,

At a guess, I'd say that Antlr is warning that you have optional tokens and
token groups in your grammar which it doesn't know for sure that it should
consume right away, or else leave them for a later rule. (Similar to the
"dangling ELSE" problem - see the FAQs). You can tell Antlr that it
*should* go ahead and consume the tokens by using greedy=true.

HTH
John



--On 07/06/2002 6:35 PM +0530 Balvinder Singh wrote:

> 
> 
> Hi...
> 
> I have a rule, which has 3 conflicts. plz help me to resolve it.
> 
> If I change it to context free grammar  and use some syntactic predicate, 
> will be a right way or not.
> 
> parser rule
> picture_string : (currency)? ((picChar)+ (repeat)?)+ (Punctuation 
> ((picChar)+ (repeat)?)+)*
> 
> currency and picChar is alphabet
> 
> repeat : "(" Integer ")"
>        ;
> 
> 
> 
> lexer rule
> Punctuation : ('/' | ',' | '.' | ':')
>             ;
> 
> 
> 
> so I have conflict in picture_string.
> 
> balvinder
> 
> 
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp.
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>  



 

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



More information about the antlr-interest mailing list