[antlr-interest] non-determinism

Joan Pujol joanpujol at gmail.com
Tue Nov 9 00:41:01 PST 2004


I think that you need a statmen separator.
In your case I think that this separator is the new line character.

Cheers,


On Mon, 8 Nov 2004 12:42:12 -0800 (PST), ManimuthuLakshmi Pitchaikani
<antlr_lakshmi at yahoo.com> wrote:
>  
> Hi, 
>   
> How to avoid non-deterministic types?  
>   
> In the following example, the keyword 'Assign' is having different notation.
>   
> 1)ERASE ALL ASSIGN 
> 2)ERASE ALL 
> 3)ASSIGN A B 
> 4)ERASE ALL UNASSIGN 
>   
>   
> The statement 1,2,4 has a rule.  And statement 3 has a rule.  When the
> statement 3 is followed by statement 2, the error occurs. 
>   
> It says that "Expected EOF, found A".  This is because the ANTLR recongnises
> ERASE ALL and then the next statement starting token ASSIGN and try to
> follow the statement 1 grammer.  
>   
> Here how i can recongnise the 'ASSIGN' keyword as the starting word of the
> statement to differentiate the 'ASSIGN'  in other statements? I think this
> recongisition will avoid the non-determinism. 
>   
> Thanks. 
>   
> Best Regards, 
> Lakshmi  
>   
>   
>  
> 
>  ________________________________
> Do you Yahoo!?
>  Check out the new Yahoo! Front Page. www.yahoo.com 
>  ________________________________
>  Yahoo! Groups Links
>  
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/antlr-interest/
>   
> To unsubscribe from this group, send an email to:
> antlr-interest-unsubscribe at yahoogroups.com
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> 
> 


-- 
Joan Jesús Pujol Espinar


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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





More information about the antlr-interest mailing list