[antlr-interest] Custom AST construction in the C target

A Z asicaddress at gmail.com
Mon Mar 19 11:02:30 PDT 2012


Hello all,

I currently use rewrite rules in my grammar to handle a building an AST
during parsing. Functionally this works well but the BASE_TREE +
COMMON_TREE structs consume quite a bit a bit of memory for each node, in
addition to the token payload. I've attempted to reduce the memory by
modifying the these struts but this is proving difficult. I'm wondering if
anyone has successfully done an AST implementation via actions in the
grammar and roughly how much effort it was.

Thanks


More information about the antlr-interest mailing list