Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 385 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 385 Bytes

Toy calculator for my talk on compilers at Coderfaire 2013. Try it out.

The grammar is:

PrimaryExpr:
    Number
    Name
    ( Expr )

MulExpr :
    NegExpr
    NegExpr * NegExpr ...
    NegExpr / NegExpr ...

Expr :
    MulExpr
    MulExpr + MulExpr
    MulExpr - MulExpr