You can try directly by compiled executable or compile from source
Under folder compiled_executable
./mini_pascal_compiler ../testcase/12_fib.p fib
java -jar jasmin.jar fib.j
java fib
More testcases, see testcase
You must install Lex and YACC first before compiling the source.
$ sudo apt-get update && sudo apt-get install bison flex byacc
- go to folder src
$ make
- change
IN
file, ex:IN = ../testcase/12_fib.p
$ make gen
to compile and then$ make run
$ make clean_all