Student: 100003610
<program> ::= <expr> "."
<expr> ::= <int>
| <bool>
| <string>
| <id> <expr>*
| “case” <expr> “of” <alts>
| “for” <id> "in" <expr> “do” <expr>
| <expr> <op> <expr>
| “{” <expr> “;” ... ";" <expr> “}”
| <typedef> | <id> "::" <type> "=" <expr>
<alts> ::= <alt> "|" ... "|" <alt>
<alt> ::= <type>+ "->" <expr>
<op> ::= “+” | “*” | “-” | “div”| “<”| “==” | ".." | "or" | "and"
<typedef> ::= "type" <id> <args> "=" <constr> <constrs>
<constrs> ::= ( "|" <constr> ) *
<constr> ::= <id> <type>*
<type> ::= "int" | "bool" | "string" | "(" <id> <type>* ")"
$ make
$ ./Case
[] Finish implementing ADT Pattern matching for Case statements
[] For-Loops
[] Range ".."
Tested Targets:
i686-apple-darwin10
Other:
Boost 1.54
Location assumed: ~/usr/include/boost/
gcc 4.2.1