[antlr-interest] C: get underlying graph and struct

Yves Weißig weissig at rbg.informatik.tu-darmstadt.de
Tue Dec 6 02:33:49 PST 2011


Hi,
I'm using the C backend for my generated grammar within my C++
application. It works great so far, but I'm planning on restructuring my
C++ code. I want to have distinct parse and unparse components. In
between I want to plug in different transformation on the tree. Now my
question: Once I generated my tree and I exit the C++ subroutine my tree
is gone. My naive approach would be to recursively deep copy the
ANTLR3_BASE_TREE_struct to a global variable, but I thought there might
be a better solution? Have you done something similar? Any ideas how to
solve this problem?
Best regards
Yves


More information about the antlr-interest mailing list