docs(doc): 调整 Lab1 生成与构建步骤顺序
This commit is contained in:
@@ -32,12 +32,7 @@ Lab1 聚焦前端第一步:词法/语法分析。
|
|||||||
|
|
||||||
## 5. 构建与生成流程
|
## 5. 构建与生成流程
|
||||||
|
|
||||||
典型构建命令:
|
Lab1 中需要先生成 Lexer/Parser 相关文件,再执行 CMake 构建。
|
||||||
|
|
||||||
```bash
|
|
||||||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
|
||||||
cmake --build build -j "$(nproc)"
|
|
||||||
```
|
|
||||||
|
|
||||||
Lexer/Parser 生成文件统一位于:
|
Lexer/Parser 生成文件统一位于:
|
||||||
|
|
||||||
@@ -55,6 +50,13 @@ java -jar third_party/antlr-4.13.2-complete.jar \
|
|||||||
src/antlr4/SysY.g4
|
src/antlr4/SysY.g4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
随后再执行构建:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build build -j "$(nproc)"
|
||||||
|
```
|
||||||
|
|
||||||
## 6. Lab1 测试建议
|
## 6. Lab1 测试建议
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user