Coursework of compiling principles in BJUT.
Tested on Ubuntu 18.04.4 and macOS 10.15.4 with gcc (or clang), flex and bison installed.
Yacc_LR_demo is only avilible on Windows now.
Under /task1:
lex t1_demo_lzh.lex
gcc -o task1 lex.yy.c -lm
./task1
Or:
./generate_lex.sh
./task1
or
./task1 in.txt
or
./task1 in.txt chart.txt
Under /task2t:
make clean
make all
./task2
./task2 in.txt
Check out.txt to obtain result after execution if an argument has been passed.
Under /task3:
make clean
make all
./task3
./task3 in.txt
Check out.txt to obtain result after execution if an argument has been passed.
Under /yacc_LR_demo:
Only avilible on Windows:
Click "yacc_LR_demo.exe",then you can get everything you want.
If you want to use this yacc_demo to analyze another sentence, please check "User_Guide.txt".