antlr4/java: pretty print parse tree to stdout

前端 未结 4 1534
抹茶落季
抹茶落季 2021-02-06 04:14

Beginners question: how do I print a readable version of the parse tree to stdout?

CharStream input = CharStreams.fromFileName(\"testdata/test.txt\");
MyLexer le         


        
4条回答
  •  心在旅途
    2021-02-06 04:42

    Besides a graphical parse tree my ANTLR4 extension for Visual Studio Code also produces a formatted text parse tree:

提交回复
热议问题