Netbeans antlr plugin great enhancement
I embed the Jgraphx library to netbeans antlr to provide interactive with the parser-tree. Now, the development methodology is:
- Create a g4 file
- Set the compile target, netbeans antlr plugin will real time generate a parser from your g4 file and try to parse the target file
- One the compile is success, that means your grammar is able to parse the target file, if show a green text, otherwise it shows a red “error” text
- If your grammar is fully ok, it generate a parse tree, see the image below
- Now you can click on anywhere in your target file, the node of the parse tree will be highlight so you know the text under cursor is compiled into which token.
Is this good enough?