[antlr-interest] add fields to the AST

Thomas Karcher thkarcher at gmx.de
Sat Feb 23 07:38:02 PST 2008


Hi Peter,

> I want to add some properties to the nodes of output tree. Therefore I
> want to add fields to the nodes of the output AST.

Do you have "The definitive ANTLR reference" near you? :)
On page 157f (in "7.2 Implementing Abstract Syntax Trees") is described
what you want - basically define your own nodes and tell ANTLR to use
them instead of the default.


Thomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20080223/f5515837/attachment.bin 


More information about the antlr-interest mailing list