[antlr-interest] is an id required to access the root text?

kozchris csnyder at alumni.ncsu.edu
Wed Sep 22 09:36:15 PDT 2004

Say I have some grammer like this (assume strings for vars):

#(pl:PLUS left=expr right=expr) {out= left + pl->getText() + right;}
|#(mi:MINUS left=expr right=expr) {out= left + mi->getText() + right;}

Is there a way to access the root text so that I can do something like
this without having to assign an id to each root:

(#(PLUS left=expr right=expr)
|#(MINUS left=expr right=expr)) {out= left + CURRENT_ROOT->getText() +

Thanks for the help,

Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

More information about the antlr-interest mailing list