ANN: ANTLR4 for Visual Studio Code version 1.3.0 released

1,247 views
Skip to first unread message

Mike Lischke

unread,
Mar 4, 2018, 1:18:28 PM3/4/18
to antlr-di...@googlegroups.com
Hi,

after a while without any news it is now time to publicly welcome the latest version of the ANTLR4 extension for Visual Studio Code. A lot has happen since my last announcement and you should read the description on the vscode marketplace (https://marketplace.visualstudio.com/items?itemName=mike-lischke.vscode-antlr4) or the Github repo (https://github.com/mike-lischke/vscode-antlr4).

With this latest release it is now possible to debug ANTLR4 grammars:



How to set up debugging and what's in there can all be read in the mentioned description.

Other interesting features of this extension include:

- Powerful and flexible grammar formatting
- Syntax highlighting + code completion
- Symbol lookup, ad hoc validation and full error checking
- Parser generation for all targets supported by ANTLR4 + the Typescript target
- Railroad diagrams:


- Call graphs.


all customisable by a large set of settings.

I hope you like this free extension. If so, spread the word and tell other people to switch to vscode (from whatever IDE they are using now) and start writing and testing their grammars with this extension.

Best regards,


thoma...@gmail.com

unread,
Mar 27, 2018, 11:52:22 AM3/27/18
to antlr-discussion
Awesome! Thanks so much.

Jan Krause

unread,
Apr 1, 2018, 5:26:58 AM4/1/18
to antlr-discussion
That is great... and a plugin for the Qt Creator would be awesome... :)

Roberto Mencia

unread,
Apr 23, 2018, 9:39:56 AM4/23/18
to antlr-discussion
Hi Mike,

The Syntax Highlighting looks great, thanks for the work done.
 
I've installed the plug-in but I can't see how t get the debugging working. I followed the steps/requirements from the GitHub project but I don't see how to start debugging.
Is there a chance that you could add additional information to the document to see how to start the debugging?
Do we need to put ANTLR somewhere or it is already in the package?
Do we need to change any setting to say where java is installed?
How to generate the parser and lexer, define the target language as well if possible.
How do we start the debugging session? Start debugging doesn't show the ANTLR option, only C#, Ruby. Do we need to install additional Debuggers?

Thanks,
Roberto.

Mike Lischke

unread,
Apr 23, 2018, 10:55:41 AM4/23/18
to antlr-di...@googlegroups.com
Roberto,

I've installed the plug-in but I can't see how t get the debugging working. I followed the steps/requirements from the GitHub project but I don't see how to start debugging.
Is there a chance that you could add additional information to the document to see how to start the debugging?
Do we need to put ANTLR somewhere or it is already in the package?
Do we need to change any setting to say where java is installed?
How to generate the parser and lexer, define the target language as well if possible.

For debugging the target language is irrelevant. As described in the readme the extension uses the parser + lexer interpreters from the (Typescript) runtime. All you need to set up is your Java installation (to generate the interpreter data) and a Visual Studio debugging task. The readme assumes you are familiar with creating such a configuration.

Once you opened your grammar go to the Debug section and from the top bar open the configuration (that wheel icon).



It will create a launch.json file for you if you haven one already, which is stored in the .vcode subfolder of the folder you opened in vscode.

Then use the „Add Configuration…“ button to create a new configuration. That will open a selection list for the debug type. Use „ANTLR: Parse“:


After that you will get a prefilled set of settings. Change the „input“ option to point to your input file (where the code is, you wanna parse). Now select that launch config in the drop down from the first screenshot. Switch to your grammar tab and click the green triangle. That should run your entire grammar and come up with a parse tree at the end (or an error if something was wrong).

Note: when you open a grammar in vscode (with my extension installed), it will automatically do an initial generation run in the background (unless you have that disabled, in which case debugging is not possible). So, after a few seconds you should be able to debug without any further step than the launch setup from above.


Roberto Mencia

unread,
Apr 24, 2018, 8:59:09 AM4/24/18
to antlr-discussion



I have managed to get it working. Looks great.
A couple of things that could be improved. I'll add extra info on GitHub.
Thanks Mike

Reply all
Reply to author
Forward
0 new messages