Skip to content

Commit 10cd389

Browse files
committed
fix small bugs
1 parent 4fdd219 commit 10cd389

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lexical_analyzer/scanner.l

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ int main(int argc, char const *argv[]) {
193193
int flag = 0;
194194
initMap(&map);
195195
printf("Modified by ■■■, ■■■, ■■■■■■■■■■■■\n");
196-
196+
197197
printf("Enter the name of the program file: "); //读取文件
198198
scanf("%s", filename);
199199
FILE *file = fopen(filename, "r");

semantic_syntactic_analyzer/parser.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ extern int iserror = 0;
2424
%left ADD SUB
2525
%left MUL DIV
2626

27-
%left OR
2827
%left AND
29-
%right NOT
28+
%left OR
29+
%left NOT
3030
%left '+' '-'
3131
%left '*' '/'
3232
%right '='

0 commit comments

Comments
 (0)