This is the final project for ZJU, Compiler Principle.
flex lexical.l
bison -d syntax.y
g++ main.cpp syntax.cpp Tree.cpp -o output
output.exe testfile
- 进入
src
文件夹,双击scriptGen.bat
生成exe
文件; - 运行
scriptRun.bat
,生成log文件,文件在minicompiler/test/NJUTest/log2
中 - 运行
scriptDel.bat
,删除冗余文件 - (注意,测试文件在
minicompiler/test/NJUTest/Test2
中,可以自行补充测试)