Skip to content

Commit

Permalink
move away from reduce/reduce conflict to shift/reduce conflict, where…
Browse files Browse the repository at this point in the history
… the concat workaround takes precedence
  • Loading branch information
itsmonktastic committed Sep 19, 2011
1 parent 83aad72 commit f4039a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Eden/yacc.y
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ extern void push_text(char *, int);
%left '+' '-' SLASH_SLASH
%left '*' '/' '%'
%nonassoc NEGATE NOT '!' PLUS_PLUS MINUS_MINUS '#' '&' ASTERISK EVAL
%expect 6
%expect 7
%%
program: /* nothing */
| stmt { code2(freeheap, rts);
Expand Down Expand Up @@ -296,7 +296,7 @@ asgn: lvalue '=' expr { code(assign); }
{ code(inc_asgn); }
| lvalue MINUS_EQ expr %prec '='
{ code(dec_asgn); }
/*| lvalue '=' lvalue { code(getvalue); } SLASH_SLASH expr %prec '='
| lvalue '=' primary SLASH_SLASH expr %prec '='
{ if ($1[1] == $3[1]) {
// l = l // expr: optimise
code(concatopt);
Expand All @@ -306,7 +306,7 @@ asgn: lvalue '=' expr { code(assign); }
code(concat);
code(assign);
}
}*/
}
| PLUS_PLUS lvalue { code(pre_inc); $$ = $2; }
| lvalue PLUS_PLUS { code(post_inc); }
| MINUS_MINUS lvalue { code(pre_dec); $$ = $2; }
Expand Down

0 comments on commit f4039a3

Please sign in to comment.