ANTLR:Translate the modified AST to java source code by stringtemplate

前端 未结 1 1915
[愿得一人]
[愿得一人] 2021-01-14 05:37

I use the grammar Java.g from the ANTLR wiki produces a lexer and parser for Java source files.Then use the following code to generate an abstract syntax tree (AST).

相关标签:
1条回答
  • 2021-01-14 05:47

    unfortunately I cannot recommend doing source to source translation by rewriting the abstract syntax trees; try using the parse trees. If I remember ANTLR 3 can also generate those easily. Ter

    0 讨论(0)
提交回复
热议问题