[antlr-interest] Re: How to set text in a tree node?

bjsp123 bjsp123 at yahoo.com
Tue Nov 4 07:47:04 PST 2003


--- In antlr-interest at yahoogroups.com, Ric Klaren <klaren at c...> wrote:
> On Tue, Nov 04, 2003 at 02:09:10PM -0000, bjsp123 wrote:
> You still did not mention which version of antlr you are using.

Sorry... it's 2.7.2.

>> I can work around that 
> > by just manually writing out the node-creation code in an action, 
but
> > then my grammar would be C++ specific.
> 
> It already is ;) Everywhere where you use a x->getText() and the 
likes
> you're being C++ specific. So its a bit of a moot point.
> 

Hmm... you're right... there really should be a way to refer to the 
text (and type) of a node without having to inject bits of the output 
language -- just like the #() shorthands refer to the nodes 
themselves.


Benjamin



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list