I have downloaded antlr4
JAR (antlr-4.8-complete.jar
) to /usr/local/lib
and have added it to the CLASSPATH
as CLASSPATH="$CLASSPATH:/usr/local/lib/antlr-4.8-complete.jar"
.
I saved the following grammar as Hello.g4
in vscode
grammar Hello;
welcome: 'hello' ID;
ID: [a-zA-Z]+;
SPACE: [ \t\r\n]+ -> skip;
and got an antlr4-runtime
folder with a bunch of java files. I can compile those in terminal with javac *.java
. However antlr
imports (import org.antlr.v4.runtime.ParserRuleContext;
and others) are not found in vscode and it does not compile.
I cannot find a way to add the JAR to this project in vscode.
Any help would be appreciated!