實作項目:
- Syntax validation
- Numerical operations
- Logical operations
- if Expression
- Variable definition
bison -d -o y.tab.c lisp.y gcc -c -g -I.. y.tab.c
flex -o lex.yy.c lisp.l gcc -c -g -I.. lex.yy.c
gcc -o lisp y.tab.o lex.yy.o -ll
file="lisp" // .l, .y 檔名
bison -d -o y.tab.c
gcc -c -g -
fl y.tab.c
flex -o lex.yy.c ${file}.l
gcc -c -g -I.. lex.yy.c
gcc -o {file} y.tab.o lex.yy.o -ll -lm
./${file} < input.txt // 測資檔名
在終端機輸入 sh alan.sh即可編譯及執行。