Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 524 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 524 Bytes

Calc Interpreter

A Simple Interpreter

grammars

expr: term((PLUS|MINUS) term)*
term: factor((MUL|DIVISION) factor)*
factor: (PLUS|MINUS)factor | INTEGER | LPAREN expr RPAREN

Parser.js
Lexer.js

run

// calc interpreter
node calc-expression.js

// convert js expression to lisp
node transfer-expression-to-lisp.js