summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2010-05-12 13:21:20 -0700
committerCarl Worth <cworth@cworth.org>2010-05-12 13:21:20 -0700
commit8bcb6f1777ff8f763c67552c111ce8e637d78410 (patch)
tree73e8bc2fb80f6d5897934c2235d0c4fce4647a94
parent012295f94c4b02d2683072d9aa6ab56f81409507 (diff)
Remove some redundancy in the top-level production.
Previously we had two copies of all top-level actions, (once in a list context and once in a non-list context). Much simpler to instead have a single list-context production with no action and then only have the actions in their own non-list contexts.
-rw-r--r--glcpp-parse.y10
1 files changed, 1 insertions, 9 deletions
diff --git a/glcpp-parse.y b/glcpp-parse.y
index 9883a6f953..91fc5b98fc 100644
--- a/glcpp-parse.y
+++ b/glcpp-parse.y
@@ -65,7 +65,7 @@ _list_append (list_t *list, const char *str);
input:
/* empty */
-| content
+| input content
;
content:
@@ -77,14 +77,6 @@ content:
| NEWLINE {
printf ("\n");
}
-| content token {
- _print_resolved_token (parser, $2);
- talloc_free ($2);
- }
-| content directive_with_newline
-| content NEWLINE {
- printf ("\n");
- }
;
directive_with_newline: