[antlr-interest] Defining a custom AST in the C target of ANTLR 3

Rosen, Mark Mark.Rosen at citadelgroup.com
Mon May 11 16:23:02 PDT 2009


Is there any example code on how to define your own AST subclass in C/C++ using ANTLR 3.0? I was able to find some for ANTLR 2.x, but none for ANTLR 3.0. I know that you need to specify the AST type name in ASTLabelType, but 1) do you need to register it with some kind of factory, and 2) which class/struct exactly do you derive from?

Thanks,

- Mark

________________________________

CONFIDENTIALITY AND SECURITY NOTICE

The contents of this message and any attachments may be confidential and proprietary and also may be covered by the Electronic Communications Privacy Act. This message is not intended to be used by, and should not be relied upon in any way, by any third party. If you are not an intended recipient, please inform the sender of the transmission error and delete this message immediately without reading, disseminating, distributing or copying the contents. Citadel makes no assurances that this e-mail and any attachments are free of viruses and other harmful code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090511/f810315c/attachment.html 


More information about the antlr-interest mailing list