[antlr-interest] non-deterministic types

ManimuthuLakshmi Pitchaikani antlr_lakshmi at yahoo.com
Mon Nov 8 16:33:26 PST 2004


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20041108/7ce86ca5/attachment.html


More information about the antlr-interest mailing list