Simple CLI calculator app for me to get used to ANTLR parser generator.
NB: For some of the scripts below you may need to run it with sudo, even though I discourage it.
To build locally you need maven
, to run you need java
. I use openjdk18
.
- To build:
./scripts/build.sh
- To run as CLI:
./scripts/run.sh "(1.0 + -2)*-2.5e+1" # wait for some time
- To run as interactive REPL:
./scripts/run.sh # wait for some time
- To run tests:
./scripts/test.sh
- To build:
./scripts/docker/build.sh
- To run as CLI:
./scripts/docker/run.sh "(1.0 + -2)*-2.5e+1" # wait for some time
- To run as interactive REPL:
./scripts/docker/run.sh # wait for some time
- To run tests:
./scripts/docker/test.sh
- Cache some
maven
dependencies duringdocker
build so that it doesn't take lifetime to run. - Mount src to docker so that you could edit it on the fly.