- Install
To play around with ANTLR, you can use antlr4-tools, which only requires Python3.
pip install antlr4-tools
- Build Java code
antlr4 -o src/main/java/org/example/parser -visitor -no-listener Expression.g4
- Add custom override function in
BigDecimalCalculatorVisitor.java