Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i see the live parse tree using Antlr4 Ide in Eclipse?

I'm new using Antlr4 but I know that exist a plugin for Eclipse. I have a simple question...After I created the g4 file how can I visualize the live parse tree in order to see the tree of an input expression? Thanks

like image 484
userSimo Avatar asked Apr 30 '14 13:04

userSimo


1 Answers

After installing Antlr4Ide plugin in Eclipse:

  • Window>Show View>Other, Antlr4>Parse tree
  • Activate g4 file
  • Click parsing rule in g4 file, Parse tree now shows active rule above source editor box

In the parse tree view you see a live source editor on the left, with syntax highlighting for your language. When you enter code in your language there, the tree will update on the right. The antlr console shows parsing errors at the same time.

like image 88
dschulten Avatar answered Nov 16 '22 15:11

dschulten