ANTLR examples.
Compile:
mvn compile
Test:
mvn test
Install:
mvn install
Clean up:
mvn clean
Calculator REPL:
$ mvn install
[...]
$ mvn -q exec:java -pl calculator
Use ^C or ^D or "exit" or "quit" to exit
> 2 + 2
4.0
> 1 + 2 ^ 3 * 4 - 5 / ((-6 * -7 + 8) % 9)
32.0
> 1 / 0
Infinity
> 1 -
error: Invalid expression
> asdf
error: Invalid expression