This seems very similar to what I had in mind with the decorator stuff. The decorating elements would represent that manually implemented semantic tree.
In the end it probably doesn't even matter whether the elements of that tree would have links to the parse tree elements they originated from or whether that tree is completely "stand-alone". As you say, we'd traverse/alter it with our own listeners. In my understanding that's as good as it gets with Antlr4. 2015-06-16 23:04 GMT+02:00 Steve Ebersole <st...@hibernate.org>: > I am not so sure that manually building a tree that would work with > listeners/visitors generated from a second grammar is going to be an > option. I have asked on SO and on the Antlr discussion group and basically > got no responses as to how that might be possible. See > https://groups.google.com/forum/#!topic/antlr-discussion/vBkwCovqHcI > > So the question is whether generating a semantic tree that is not Antlr > specific is a viable alternative. I think it is. And we can still provide > hand written listener and or visitor for processing this. > _______________________________________________ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev