Visualizing an AST created with ANTLR (in a .Net environment)
- by Benjamin Podszun
Hi there.
For a pet project I started to fiddle with ANTLR. After following some tutorials I'm now trying to create the grammar for my very own language and to generate an AST.
For now I'm messing around in ANTLRWorks mostly, but now that I have validated that the parse tree seems to be fine I'd like to (iteratively, because I'm still learning and still need to make some decisions regarding the final structure of the tree) create the AST. It seems that antlrworks won't visualize it (or at least not using the "Interpreter" feature, Debug's not working on any of my machines).
Bottom line: Is the only way to visualize the AST the manual way, traversing/showing it or printing the tree in string representation to a console?
What I'm looking for is a simple way to go from input, grammar - visual AST representation a la the "Interpreter" feature of ANTLRWorks. Any ideas?