Skip to content

Commit

Permalink
Add grammar to readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendorff committed Aug 21, 2013
1 parent c2605b6 commit 60eb90b
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
Toy calculator for my talk on compilers at Coderfaire 2013.
[Try it out.](http://jorendorff.github.io/calc/calculator.html)


The grammar is:

PrimaryExpr:
Number
Name
( Expr )

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

Expr :
MulExpr
MulExpr + MulExpr
MulExpr - MulExpr

0 comments on commit 60eb90b

Please sign in to comment.