####################################
####################################
- terminal-calculator is a executable command-line calculator that evaluates expressions in a very simple integer expression language.
- Log level controlling via command line arguments possible.
- CI integration setup available.
######################
######################
-
Code will be available at repository : https://github.com/jaksnair/terminal-calculator
-
Branches are, - master : default branch - r<>-dev : dev branch - r<>-dev-travis-ci-test : dev branch with travis-ci integrated.
-
Git hub apps or CIs integrated - Travis-ci : https://travis-ci.org/jaksnair/terminal-calculator
#####################
#####################
- Please assemble to build the jar using command: mvn clean compile assembly:single
######################
######################
- It evaluates expressions in a very simple integer expression language.
- Takes an input on the command line, computes the result, and prints it to the console.
- Expression details :
- Numbers : integers between Integer.MIN_VALUE and Integer.MAX_VALUE.
- Variables: strings of characters, where each character is one of a-z, A-Z.
- Arithmetic functions: add, sub, mult, div, each taking two arbitrary expressions as arguments.
- add - eg: add(1, 2)
- sub - eg: sub(1, 2)
- mult - eg: mult(1,2)
- div - eg: div(2,1)
- A “let” operator for assigning values to variables: let(, , ) - eg: let(a, 5, add(a, a))
- Logging verbosity control :
- levels of verbosity: INFO, ERROR, DEBUG, FATAL, WARN, TRACE, ALL
- CI setup available.
############
############
-
The jar takes an input on the command line, computes the result, and prints it to the console. For example: java -jar terminalcalculator.jar "add(2, 2)"
-
Logger level could be controlled via the command line. For example: java -jar -Dlog4j.debug=true terminalcalculator.jar "add(2, 2)"