Changes right recursion to left in the grammar of the case expression.
This commit is contained in:
parent
dca75fd7c2
commit
14f6aca480
1 changed files with 7 additions and 6 deletions
|
@ -273,16 +273,17 @@ fprefix_set:
|
||||||
;
|
;
|
||||||
|
|
||||||
switch_body: /* EMPTY */ { $$ = NULL; }
|
switch_body: /* EMPTY */ { $$ = NULL; }
|
||||||
| set_item ':' cmds switch_body {
|
| switch_body set_item ':' cmds {
|
||||||
$$ = $1;
|
$$ = $2;
|
||||||
$$->data = $3;
|
$$->data = $4;
|
||||||
$$->left = $4;
|
$$->left = $1;
|
||||||
}
|
}
|
||||||
| ELSE ':' cmds {
|
| switch_body ELSE ':' cmds {
|
||||||
$$ = f_new_tree();
|
$$ = f_new_tree();
|
||||||
$$->from.type = T_VOID;
|
$$->from.type = T_VOID;
|
||||||
$$->to.type = T_VOID;
|
$$->to.type = T_VOID;
|
||||||
$$->data = $3;
|
$$->data = $4;
|
||||||
|
$$->left = $1;
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue