Skip to content

Commit

Permalink
fix bug of parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqmwne committed Nov 5, 2017
1 parent c91f468 commit 1d4ffe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lab3/tiger.y
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ program: exp {absyn_root = $1;};

exp: lvalue {$$ = A_VarExp(EM_tokPos, $1);}
|NIL {$$ = A_NilExp(EM_tokPos);}
|LPAREN sequencing_exps RPAREN {$$ = A_SeqExp(EM_tokPos, $2);}
|LPAREN sequencing RPAREN {$$ = A_SeqExp(EM_tokPos, $2);}
|LPAREN exp RPAREN {$$ = $2;}
|INT {$$ = A_IntExp(EM_tokPos, $1);}
|STRING {$$ = A_StringExp(EM_tokPos, $1);}
Expand Down
2 changes: 1 addition & 1 deletion lab4/tiger.y
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ program: exp {absyn_root = $1;};

exp: lvalue {$$ = A_VarExp(EM_tokPos, $1);}
|NIL {$$ = A_NilExp(EM_tokPos);}
|LPAREN sequencing_exps RPAREN {$$ = A_SeqExp(EM_tokPos, $2);}
|LPAREN sequencing RPAREN {$$ = A_SeqExp(EM_tokPos, $2);}
|LPAREN exp RPAREN {$$ = $2;}
|INT {$$ = A_IntExp(EM_tokPos, $1);}
|STRING {$$ = A_StringExp(EM_tokPos, $1);}
Expand Down

0 comments on commit 1d4ffe6

Please sign in to comment.