Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
2
2024ustc-jianmu-compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
compiler_staff
2024ustc-jianmu-compiler
Commits
6261ed14
Commit
6261ed14
authored
Sep 19, 2024
by
lyz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add two comments to diff FLOAT and FLOATPOINT
parent
3c732f7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/parser/syntax_analyzer.y
src/parser/syntax_analyzer.y
+3
-3
No files found.
src/parser/syntax_analyzer.y
View file @
6261ed14
...
@@ -65,8 +65,8 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
...
@@ -65,8 +65,8 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
%token <node> WHILE
%token <node> WHILE
%token <node> IDENTIFIER
%token <node> IDENTIFIER
%token <node> INTEGER
%token <node> INTEGER
%token <node> FLOAT
%token <node> FLOAT
// 这个token 对应float 关键字
%token <node> FLOATPOINT
// 这个是 float 类型的 token
%token <node> FLOATPOINT
// 这个token 对应 浮点数值, 如果分不清的同学可以参考type-specifier的文法和对应产生式规则
//%token <node> EOL
//%token <node> EOL
//%token <node> BLANK
//%token <node> BLANK
//%token <node> COMMENT
//%token <node> COMMENT
...
@@ -122,7 +122,7 @@ local-declarations : local-declarations var-declaration {$$ = node( "local-dec
...
@@ -122,7 +122,7 @@ local-declarations : local-declarations var-declaration {$$ = node( "local-dec
statement-list : statement-list statement {$$ = node( "statement-list", 2, $1, $2);}
statement-list : statement-list statement {$$ = node( "statement-list", 2, $1, $2);}
| {$$ = node( "statement-list",0);}
| {$$ = node( "statement-list",0);}
;
// TODO: phase1. 补充其他的文法产生式逻辑
// TODO: phase1. 补充其他的文法产生式逻辑
%%
%%
...
...
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