[antlr-interest] Help with mutually left-recursion
    Nicolai Mainiero 
    nicolai at mainiero.de
       
    Tue Jan  9 01:14:06 PST 2007
    
    
  
Hello,
I try to write a grammar for Lua and have a problem with mutually  
left-recursion in the grammar definition. Here ist the section from  
the grammar so far.
prefixexp :'('exp')' | var  | functioncall
	;
functioncall : prefixexp args
	     | prefixexp ':' NAME args
	;
var	: NAME | prefixexp '['exp']' | prefixexp '.' NAME
	;
These three rules are my problem. Please has anyone suggestions or  
hints how to rewrite the grammar to remove the mutually left-recursion.
Thanks
	Nicolai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2421 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20070109/ef2b211e/attachment.bin 
    
    
More information about the antlr-interest
mailing list