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

Jim Idle jimi at temporal-wave.com
Tue Dec 6 04:07:19 PST 2011


The tree will stay until you free it, so if you need it outside that function, store the references higher up in the hierarchy. 

Jim

On Dec 6, 2011, at 18:33, Yves Weißig <weissig at rbg.informatik.tu-darmstadt.de> wrote:

> 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
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list