[antlr-interest] ObjC target and predefined rule attribute $text

Basil Shkara bshkara at gmail.com
Wed Dec 5 01:03:02 PST 2007


Hi,

When using the rule attribute: $text, the ObjC generated fails to  
declare the range required.

E.g.

rule	:	WORD {NSLog(@"\%@", $rule.text);};

results in the following ObjC:

NSLog(@"%@", [input substringWithRange:NSMakeRange(_start, [input  
index]-_start)]);

The problem is that '_start' is undeclared.

Any help appreciated.

I am using Kay's 3.1 early access source.

Thanks!


More information about the antlr-interest mailing list