mapy1874 / simpleAST

Simple precedence parser&evaluator for arithmetic expressions with +, *, - and parenthesization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple precedence parser&evaluator for arithmetic expressions with +, *, - and parenthesization.

The specific grammar supported is:

S ::= E eof
E ::= T ((+|-) T)* 
T ::= F (* F)*   
F ::= -F | G
G ::= num | lparen E rparen

Build on top of simpleAST@COMP520

About

Simple precedence parser&evaluator for arithmetic expressions with +, *, - and parenthesization


Languages

Language:Java 100.0%