style(doc): 统一 Lexer Parser 相关表述
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Lab1:构建antlr规则生成语法树
|
||||
# Lab1:语法树构建
|
||||
|
||||
## 1. 本实验定位
|
||||
|
||||
@@ -11,7 +11,7 @@ Lab1 聚焦前端第一步:词法/语法分析。
|
||||
需要同学完成:
|
||||
|
||||
1. 依据 SysY 规范扩展文法 `src/antlr4/SysY.g4`。
|
||||
2. 通过构建流程让 ANTLR 重新生成 Lexer/Parser。
|
||||
2. 通过构建流程重新生成 Lexer/Parser。
|
||||
3. 让更多合法 SysY 程序可以被解析通过(不再仅限当前最小样例)。
|
||||
|
||||
## 3. Lab1 需要补充的内容
|
||||
@@ -40,11 +40,11 @@ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build build -j "$(nproc)"
|
||||
```
|
||||
|
||||
ANTLR 生成文件统一位于:
|
||||
Lexer/Parser 生成文件统一位于:
|
||||
|
||||
- `build/generated/antlr4/`
|
||||
|
||||
如需手动触发 ANTLR 生成:
|
||||
如需手动生成 Lexer/Parser:
|
||||
|
||||
```bash
|
||||
mkdir -p build/generated/antlr4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Lab2:生成中间表示(IR)
|
||||
# Lab2:中间表示生成
|
||||
|
||||
## 1. 本实验定位
|
||||
|
||||
|
||||
Reference in New Issue
Block a user