Replies: 2 comments 1 reply
-
There's nothing to configure if you just start with the extension. Instead just install it from the marketplace and open an ANTLR4 grammar. This will launch the extension (internally done by VS Code) and a new icon will appear in the activity bar. Click that to open the views related to ANTLR4 grammars. You will see all existing rules and actions, you can then use code hints for symbols in your grammar and you can use the context menu in the editor to use some of the functionality like showing the railroad diagram for each rule. Once you got familiar with that, I recommend reading the documentation, e.g. for setting up debugging. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the pointers. I have to admit I have spent some time reading the documentation. Creating a vs code debug configuration was the missing step that I missed. Ctrl-Shift-D, create new config and paste the example worked fine. I am still not able to trace, though, when running the debug config it just runs to the end, even with a breakpoint set. That might be because I don't have a complex parse grammer yet. In any case, it seems I will still be struggling with python-style indent-dedent tokens when debugging, as there is no way of creating these when running with the plugin? Is that correctly understood? |
Beta Was this translation helpful? Give feedback.
-
Hi, I am looking for documentation on how to get started with the plugin and antlr4ng. I know ANTLR4 from earlier, but not this target or IDE.
Right now I am simply looking for an easy way of running the parse on some test data while developing the grammar.
I am also looking for how to configure the vscode-antlr4 to use antlr4ng.
In the end I am hoping to be able to include custom base classes for the lexer in the VS CODE-integrated parse in order to support python-style block indentation.
Pointers most welcome.
Beta Was this translation helpful? Give feedback.
All reactions