[antlr-interest] return result of a rule reference directly
Hugo Leeney
hugo.leeney at gmail.com
Fri Jun 2 07:58:29 PDT 2006
Hi,
I was wondering is it possible to return the result of a rule
reference directly (without instantiating a variable).
>From the manual I have the following code:
yellow_rule
returns[string name]
{string name ="";}
name=identifier {}
;
I would like to be able to skip the instantiation of 'name' so that
when identifier matches, yellow_rule simply returns what was returned
by the identifier rule. Does anyone know a way that this is possible?
Many thanks,
Hugo Leeney
--
*******************************************
This document is strictly confidential and is intended for use by
the addressee unless otherwise indicated.
*******************************************
More information about the antlr-interest
mailing list