Commit 1b2e2c18 authored by Kai Ma's avatar Kai Ma

[lab1] fix doc

parent ce137236
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
我们将 Cminus-f 的所有规则分为五类。 我们将 Cminus-f 的所有规则分为五类。
1. 字面量、关键字、运算符与标识符 1. 字面量、关键字、运算符与标识符
- `id`
- `type-specifier` - `type-specifier`
- `relop` - `relop`
- `addop` - `addop`
...@@ -62,6 +61,7 @@ ...@@ -62,6 +61,7 @@
- `return-stmt` - `return-stmt`
4. 表达式 4. 表达式
- `expression` - `expression`
- `simple-expression`
- `var` - `var`
- `additive-expression` - `additive-expression`
- `term` - `term`
...@@ -237,7 +237,7 @@ int yylex(void) ...@@ -237,7 +237,7 @@ int yylex(void)
switch (c) { switch (c) {
case EOF: return YYEOF; case EOF: return YYEOF;
case 'R': return REIMU; case 'R': return REIMU;
default: return 0; // 返回无效 token 值,迫使 bison 报错 default: return YYUNDEF; // 报告 token 未定义,迫使 bison 报错
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment