Getting started
- Install ANTLR v4 (manual)
- Generate ANTLR files
antlr4 Calculator.g4 -no-listener -visitor -o app
- Copy visitor implementation
cp *.java app
- Compile
javac app/*.java
Run
Type in console cd app && java Run
a = 1+2
b = a^2
c = a + b * (a - 1)
a + b + c
Result should be equal 33.0