Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
2
2022fall-Compiler_CMinus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晓奇
2022fall-Compiler_CMinus
Commits
1b2e2c18
Commit
1b2e2c18
authored
Sep 23, 2021
by
Kai Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[lab1] fix doc
parent
ce137236
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Documentations/1-parser/Basics.md
Documentations/1-parser/Basics.md
+2
-2
No files found.
Documentations/1-parser/Basics.md
View file @
1b2e2c18
...
@@ -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 报错
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment