[antlr-interest] Disabling Lexer rules using predicates

Thomas Karcher thkarcher at gmx.de
Wed Apr 2 04:33:35 PDT 2008


Hi,

> ANTLR into considering this as a semantic predicate? I already tried  
> "{ inElement }?=>" but that didn't help.

Something like
STEP	:	{prefixed}? => 'step'
	;

works for me. STEP is not emitted if prefixed is false.


Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080402/47544897/attachment-0001.bin 


More information about the antlr-interest mailing list