/antlr-demo

ANTLR4 demo

Primary LanguageJava

Antlr4 demo

  1. Install

To play around with ANTLR, you can use antlr4-tools, which only requires Python3.

pip install antlr4-tools
  1. Build Java code
antlr4 -o src/main/java/org/example/parser -visitor -no-listener Expression.g4
  1. Add custom override function in BigDecimalCalculatorVisitor.java