-
Install via CLI
-
Now we are going to install the latest version of JRE
sudo pacman -S jre-openjdk
-
Now we are going to install the latest version of JDK
sudo pacman -S jdk-openjdk
- Others
sudo apt install openjdk-XX-jdk sudo apt install openjdk-XX-jre
Install the latest available version for your distro
-
- Installation
-
Create a virtual enviroment
python -m venv /path/to/new/virtual/environment
-
Install Antlr using the file
requirements.txt
pip install -r requirements.txt
-
Verify installation
antlr
-
-
Create the script
setup.sh
.#!/usr/bin/sh setup(){ local venvpath="$HOME/path/to/env" source "${venvpath}/bin/activate" export CLASSPATH=.:~/.m2/repository/org/antlr/antlr4/4.13.1/antlr4-4.13.1-complete.jar:$CLASSPATH alias grun='java org.antlr.v4.gui.TestRig' } setup
-
Execute the script
source setup.sh
-
Now we compile boths files.
~ antlr4 -no-listener -visitor DotExpr.g4
-
With
javac
we compile the java codes generated.javac *.java
-
If we want to see the gui, run Antlr with
grun
grun DotExpr graph -gui