Skip to content

Commit

Permalink
Updated readme for asm3
Browse files Browse the repository at this point in the history
  • Loading branch information
luketaher authored Oct 26, 2016
1 parent 8324df1 commit e080447
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
### Assignment 2 Notes
- Support for bool, int and pointer var types
- Evaluation errors
### Assignment 3 Notes
- Recursion
- Higher order functions
- Lambda functions

*see asm2 test script for examples*
*see asm3 test script for examples*

## About
A compiler developed in OCaml with OCamllex and Menhir for the Compiler Construction module at the University of Birmingham. Intended to mimick a C-like syntax.
Expand Down Expand Up @@ -44,8 +45,8 @@ instruction; instruction
Instructions can be in the form of the following expressions:

```
int varName = 5 //variable declaration
const int varName = 5 //constant declaration
var varName = 5 //variable declaration
const varName = 5 //constant declaration
varName //variable
~x //dereferance variable
Expand All @@ -56,7 +57,7 @@ x {bool operation} y //boolean expression
someFunctionName(arguments) //function call
read_int() //read int
print_int(instruction) //print int
print(instruction) //print expression
return instruction //return
```
Expand All @@ -66,4 +67,5 @@ and the following constructs:
```
while(expression){instruction} //while loop
if(expression){instruction}else{instruction} //if statement
fun var1, var2, ..., varn -> (instruction) //lambda function
```

0 comments on commit e080447

Please sign in to comment.