[antlr-interest] Token position 0, -1

Mike Lischke mike at lischke-online.de
Mon Jul 9 05:29:17 PDT 2012


Stefan,

> compoundStatement
> 	:  lc='{' statement*  '}'
> 		->  ^(SLIST[$lc]  statement*)
> 	;

Is there a similar construct if you have a rule instead of a token? For instance:

target_table:
	qualified_identifier -> ^(TABLE_REF_ID qualified_identifier)
;
	
Here I would like to give the synthetic TABLE_REF_ID token the location info from the qualified_identifier rule.

Mike
-- 
www.soft-gems.net




More information about the antlr-interest mailing list