[antlr-interest] add fields to the AST

Darien Hager darien.hager at etelos-inc.com
Mon Feb 25 10:22:00 PST 2008


On 2/23/08, Peter Bulychev <peter.bulychev at gmail.com> wrote:
>
>
> 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.
>

Not to put you off getting the book as I did, but AFAIK the "ASTLabelType"
option may come in handy for replacing the class used for nodes with your
own custom subclass. (Which is runtime dependent, in Java it would be a
subclass of CommonTreeNode)

-- 
Darien Hager
Developer
Etelos, Inc.
darien at etelos.com

http://www.etelos.com
"Revolutionizing the way applications are developed, distributed and
consumed."

This e-mail message, including attachments, may contain confidential
information for the sole use of the intended recipient(s). If you are not
the intended recipient, then this is notice that any use, disclosure,
dissemination, distribution or copying is strictly prohibited. If you have
received this message in error please contact the sender by reply mail and
destroy all copies of the original message.


This e-mail message, including attachments, may contain confidential information for the sole use of the intended recipient(s). If you are not the intended recipient, then this is notice that any use, disclosure, dissemination, distribution or copying is strictly prohibited.  If you have received this message in error please contact the sender by reply mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080225/27f2ab61/attachment.html 


More information about the antlr-interest mailing list