# compilation big lab **Repository Path**: casesic/compilation-big-lab ## Basic Information - **Project Name**: compilation big lab - **Description**: 写一个简易的c--编译器 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-04-28 - **Last Updated**: 2025-06-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 执行词法分析器 ``` g++ -Iinclude src/lectical.cpp src/FSM.cpp src/MySymbolTable.cpp src/util.cpp -o lexer.exe ``` 运行lexer.exe 默认是data/test0.sy文件 ``` .\lexer.exe ``` 指定文件如 data/test4.sy ``` .\lexer.exe data/test4.sy ``` 执行语法分析器 ``` g++ src/syntax.cpp -o syntax.exe .\syntax.exe ``` 一共有5个测试样例 在data文件夹中 grammer.txt文件也在data文件夹中