Original extension here
Debugging a grammar requires only a few things, since most of the prerequisites are included already. Only a valid Java installation is required to allow generating the interpreter data.
Here is a simple example of how to use antlr to generate a parser tree from grammer g4 in VSCode
.
-
Install extension in vscode ANTLR4 grammar syntax support
-
In folder
.vscode/launch.json
pressF5
(or run debug) -
It will open diagram.
-
Edit the example of the diagram in the
input.txt
file