antlr4-lab
antlr4-lab copied to clipboard
Rust Grammar file
Rust grammar file is missing
You cannot use the rust grammar from grammars-v4 in antlr-lab. It's impossible because the website uses the "interpreter" form of the parser engine. The rust grammar contains target language specific files. These have to be compiled for the target.
The grammars-v4 repo contains grammars.json. This file is used by antlr-lab when the HTML server starts up. It very carefully weeds out all grammars that contain any target-specific code by finding any action in any of the .g4's.
You must either:
- generate the parser for Java, compile with the .java files from Java/, and use "TestRig" (
alias grun='java -cp "c:/Users/Kenne/.m2/antlr4-4.12.0-complete.jar;." org.antlr.v4.gui.TestRig'). - generate a driver for the parser. Trash does this. For the CSharp target, the toolkit has a multitude of tree display options. TestRig is really limited.