2

So I've been creating a parser to translate a piece of javascript code to java. The program takes a json input file, reads it and stores its information in a ParseTree. The main problem I face is after I've generated the ParseTree, I cannot find a successful method to derive the corresponding AST.

I know that ANTLR3 had the automatic generation as a feature, but I cannot find anything similar in ANTLR4.

What is the best way to go about generating an AST from a ParseTree?

Carlos Pereira
  • 291
  • 2
  • 4
  • 16

0 Answers0