A simple ANTLR4 calculator grammar based on the khubla.com arithmetic grammar.
The calculator example is intended as an example of how to parse arithmetic, geometric and algebraic equations with ANTLR.
Currently supported are:
- Basic arithmetic respecting order of operations and parenthesis
- Variables
- Scientific numbers with "e" notation
- A small number of trigonometric and logarithmic functions including exponentiation, cos, ln, etc.
- The constants "e", "pi" and "i"