Eliminate a shift/reduce conflict.

By simply allowing for the argument_list production to be empty rather
than the lower-level argument production to be empty.
This commit is contained in:
Carl Worth 2010-05-14 11:33:00 -07:00
parent 8f6a828e4a
commit ac070e8bf5

View file

@ -149,7 +149,10 @@ macro:
; ;
argument_list: argument_list:
argument { /* empty */ {
$$ = _argument_list_create (parser);
}
| argument {
$$ = _argument_list_create (parser); $$ = _argument_list_create (parser);
_argument_list_append ($$, $1); _argument_list_append ($$, $1);
} }
@ -164,8 +167,9 @@ argument_list:
; ;
argument: argument:
/* empty */ { word {
$$ = _string_list_create (parser); $$ = _string_list_create (parser);
_string_list_append_item ($$, $1);
} }
| argument word { | argument word {
_string_list_append_item ($1, $2); _string_list_append_item ($1, $2);