Visualizing an AST created with ANTLR (in a .Net environment)
Correct, the interpreter only shows what rules are used in the parsing process, and ignores any AST rewrite rules. What you can do is use StringTemplate to create a Graphviz DOT-file. After creating such a DOT-file, you use some 3rd party viewer to display this tree (graph). Here’s a quick demo in Java (I know … Read more