On Wed, 26 Jan 2011 19:57:45 -0500, Bill Andersen <[email protected]> wrote:
> Folks,
>
> I have this production
>
> formula
> : outer_formula nle?
> -> ^(STMT[???,"STMT"] ....
> ;
>
> where STMT is a synthetic token. Question is how to pass info for line/col
> from whatever matches 'outer_formula' to where the STMT synthetic token is
> created in adaptor.create(...). I get a tree for outer_formula, not a token.
> I know how to do this with tokens.
>
> Any help appreciated.
>
> .bill
Hi Bill,
One idea is to pass a token from the outer_formula to the inner one,
something like (not tested, so not completely sure this will work):
formula[MyToken t]
: outer_formula nle?
-> ^(STMT[$[t,"STMT"] ....
;
outer_formula
: o='outer'! formula[$o]
;
Regards, Mark
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.