- Run compiler
racket compiler.rkt [action] [int] [int] < [input]
where action is one of scan, parse, analyze, assembly, binary and input is code file
- Run test suite
chmod u+x compile_suite.sh
./compile_suite.sh [input]
where input is test file
[optional procedure(s) with body format like main]
int main(int [id name], int [id name]) {
[optional int declaration or int* declaration set to NULL]
[optional statements (e.g. arithmetic, if, while)]
return [int expression];
}
Each line must have the following 5, in order:
1) Path to input file
2) Compilation action (e.g. scan, parse, analyze, assembly, binary) or . which defaults to assembly
3) First int of main function or . which defaults to 0
4) Second int of main function or . which defaults to 0
5) Path to output file or . which defaults to terminal stdout/stderr
Newline at the end