How to Display ANTLR Tree GUI
问题 How do you display the AST GUI if you have code like this, both of console or swing? My ANTLR is version 3. CharStream stream = new ANTLRStringStream("program XLSample1 =\n" + "constant one : Integer := 1;\n" + "constant two : Integer := 2;\n" + "var a, b,c : Integer := 42;\n" + "begin\n" + " x:= (12 + 6) - (7 * 41) - x mod y;\n" + " y := 21;\n" + "\n" + "if x < 10 then\n" + " y :=2;\n" + " elseif x < 20 then\n" + " y := 20;\n" + " else\n" + " y := 30;\n" + "end if; \n" + "end XLSample1.");