summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-14 11:33:00 -0700
committerCarl Worth <cworth@cworth.org>2010-05-14 11:50:32 -0700
commitac070e8bf5005151dd702f2cd3fbfb2d1eaaf00d (patch)
tree8e0f9ec5bac18df33ccdd61ad80f79ea7d64b2b3
parent8f6a828e4a454e1bdce359c43e1108ff0315a89c (diff)
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.
-rw-r--r--glcpp-parse.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/glcpp-parse.y b/glcpp-parse.y
index 27b5514e92..e70b3298d8 100644
--- a/glcpp-parse.y
+++ b/glcpp-parse.y
@@ -149,7 +149,10 @@ macro:
;
argument_list:
- argument {
+ /* empty */ {
+ $$ = _argument_list_create (parser);
+ }
+| argument {
$$ = _argument_list_create (parser);
_argument_list_append ($$, $1);
}
@@ -164,8 +167,9 @@ argument_list:
;
argument:
- /* empty */ {
+ word {
$$ = _string_list_create (parser);
+ _string_list_append_item ($$, $1);
}
| argument word {
_string_list_append_item ($1, $2);