[go: up one dir, main page]

Skip to content

Latest commit

 

History

History

calculator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Calculator Grammar

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"