[antlr-interest] How to get GUI like tree structure
Ketan Maheshwari
ketancmaheshwari at gmail.com
Mon Mar 29 07:35:32 PDT 2010
Hello Friends
I am trying to use the CommonTree generated by the parser of my grammar
against a test code.
Using the getChild(index).toString method, I get the tokens well.
However, I do not know how can I also get a hierarchy of the rule to which
they belong to. Similar to what we get in the ANTLRworks GUI.
Any clue how can I get a tree such that it shows complete hierarchy of the
grammar and the tokens as leaf nodes only.
Am I using the correct Data Structure (CommonTree) ?
Thanks for any clues.
Regards
Ketan
More information about the antlr-interest
mailing list