Tsumida / MiniC

Lexer and syntax analysis for tiny c compiler.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

命令行工具用法

Tsumida opened this issue · comments

commented

用法:

cd MiniC
python ./src/compiler.py --path="./tests/test_regular.txt"

--path后面是源代码文件的路径。
目前只支持scanning + parsing, 解析完直接先序遍历打印语法树。如果中途遇到错误,直接报错并退出程序。