[antlr-interest] custom AST with re-write rules in C runtime

Robert Soule robert.soule at gmail.com
Thu Feb 5 11:19:44 PST 2009


Hi,

I'd like to use my own custom AST instead of the pANTLR_BASE_TREE
provided in the C runtime. What I was wondering is if I can use antlr's re-write
rules ( -> ^(...) ) to generate the tree with my own node implementation? If
so, can you provide any guidance on how to do that?

I've been looking at antlr3basetree.h. Is the idea that we use this
base tree, but
set the "u" pointer to our own data structures?

thank you,
Robert


More information about the antlr-interest mailing list