parser: Solve last shift/reduce conflicts

This commit is contained in:
Michael Stapelberg 2009-11-06 17:26:17 +01:00
parent 8e1945a990
commit 5583dfa5e4
1 changed files with 9 additions and 5 deletions

View File

@ -368,7 +368,7 @@ new_container:
;
workspace:
TOKWORKSPACE WHITESPACE NUMBER WHITESPACE TOKSCREEN WHITESPACE screen workspace_name
TOKWORKSPACE WHITESPACE NUMBER WHITESPACE TOKSCREEN WHITESPACE screen optional_workspace_name
{
int ws_num = $<number>3;
if (ws_num < 1) {
@ -380,7 +380,7 @@ workspace:
workspace_set_name(ws, $<string>8);
}
}
| TOKWORKSPACE WHITESPACE NUMBER workspace_name
| TOKWORKSPACE WHITESPACE NUMBER WHITESPACE workspace_name
{
int ws_num = $<number>3;
if (ws_num < 1) {
@ -392,10 +392,14 @@ workspace:
}
;
optional_workspace_name:
/* empty */ { $<string>$ = NULL; }
| workspace_name { $<string>$ = $<string>1; }
;
workspace_name:
/* NULL */ { $<string>$ = NULL; }
| WHITESPACE QUOTEDSTRING { $<string>$ = $<string>2; }
| WHITESPACE STR { $<string>$ = $<string>2; }
QUOTEDSTRING { $<string>$ = $<string>1; }
| STR { $<string>$ = $<string>1; }
;
screen: