How to output the AST built using ANTLR?
问题 I\'m making a static analyzer for C. I have done the lexer and parser using ANTLR in which generates Java code. Does ANTLR build the AST for us automatically by options {output=AST;} ? Or do I have to make the tree myself? If it does, then how to spit out the nodes on that AST? I am currently thinking that the nodes on that AST will be used for making SSA, followed by data flow analysis in order to make the static analyzer. Am I on the right path? 回答1: Raphael wrote: Does antlr build the AST