README
arithmetic-parser-demo
Arithmetic Parser Demo using parexgram.js
Platform | Build Status |
---|---|
Linux | |
Windows |
Grammar
arithmetic
: addition
;
addition
: multiplication ( ('+' | '-') addition )*
;
multiplication
: exponentiation ( ('*' | '/') multiplication)*
;
exponentiation
: negation ('^' exponentiation)*
;
negation
: '-'? atom
;
atom
: value
| '(' addition ')'
;
value
: [0-9]* '.' [0-9]*
;
Install
npm i arithmetic-parser-demo
Build
npm install
npm run build