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
3c732f7c
Commit
3c732f7c
authored
Sep 19, 2024
by
刘睿博
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Typo ASSIN -> ASSIGN
parent
dc2e93be
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/parser/lexical_analyzer.l
src/parser/lexical_analyzer.l
+1
-1
src/parser/syntax_analyzer.y
src/parser/syntax_analyzer.y
+1
-1
No files found.
src/parser/lexical_analyzer.l
View file @
3c732f7c
...
@@ -34,7 +34,7 @@ void pass_node(char *text){
...
@@ -34,7 +34,7 @@ void pass_node(char *text){
\>= {pos_start = pos_end; pos_end += 2; pass_node(yytext); return GTE;}
\>= {pos_start = pos_end; pos_end += 2; pass_node(yytext); return GTE;}
== {pos_start = pos_end; pos_end += 2; pass_node(yytext); return EQ;}
== {pos_start = pos_end; pos_end += 2; pass_node(yytext); return EQ;}
!= {pos_start = pos_end; pos_end += 2; pass_node(yytext); return NEQ;}
!= {pos_start = pos_end; pos_end += 2; pass_node(yytext); return NEQ;}
= {pos_start = pos_end; pos_end += 1; pass_node(yytext); return ASSIN;}
= {pos_start = pos_end; pos_end += 1; pass_node(yytext); return ASSI
G
N;}
; {pos_start = pos_end; pos_end += 1; pass_node(yytext); return SEMICOLON;}
; {pos_start = pos_end; pos_end += 1; pass_node(yytext); return SEMICOLON;}
, {pos_start = pos_end; pos_end += 1; pass_node(yytext); return COMMA;}
, {pos_start = pos_end; pos_end += 1; pass_node(yytext); return COMMA;}
/* TODO: phase1. 请在这里补充其他的词法规则 */
/* TODO: phase1. 请在这里补充其他的词法规则 */
...
...
src/parser/syntax_analyzer.y
View file @
3c732f7c
...
@@ -48,7 +48,7 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
...
@@ -48,7 +48,7 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
%token <node> GTE
%token <node> GTE
%token <node> EQ
%token <node> EQ
%token <node> NEQ
%token <node> NEQ
%token <node> ASSIN
%token <node> ASSI
G
N
%token <node> SEMICOLON
%token <node> SEMICOLON
%token <node> COMMA
%token <node> COMMA
%token <node> LPARENTHESE
%token <node> LPARENTHESE
...
...
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