]> git.saurik.com Git - bison.git/blobdiff - src/reader.c
* tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
[bison.git] / src / reader.c
index d3c089510774a80359b2ac144e3cea9c3f564407..ac160aed449b93d59814299a2e1eee7a009374f2 100644 (file)
@@ -974,6 +974,16 @@ parse_skel_decl (void)
   /* Complete with parse_dquoted_param () on the CVS branch 1.29.  */
 }
 
+/*---------------------------------------.
+| Parse what comes after %skeleton_path. |
+`---------------------------------------*/
+
+void
+parse_include_decl (void)
+{
+  /* Complete with parse_dquoted_param () on the CVS branch 1.29.  */
+}
+
 /*----------------------------------------------------------------.
 | Read from finput until `%%' is seen.  Discard the `%%'.  Handle |
 | any `%' declarations, and copy the contents of any `%{ ... %}'  |
@@ -1048,16 +1058,20 @@ read_declarations (void)
              parse_skel_decl ();
              break;
 
+           case tok_include:
+             parse_include_decl ();
+             break;
+             
            case tok_noop:
              break;
 
            case tok_stropt:
            case tok_intopt:
            case tok_obsolete:
-           case tok_illegal:
              abort ();
              break;
 
+           case tok_illegal:
            default:
              complain (_("unrecognized: %s"), token_buffer);
              skip_to_char ('%');
@@ -1474,12 +1488,14 @@ readgram (void)
                  /* Make a dummy nonterminal, a gensym.  */
                  bucket *sdummy = gensym ();
 
-                 /* Make a new rule, whose body is empty,
-                    before the current one, so that the action
-                    just read can belong to it.  */
+                 /* Make a new rule, whose body is empty, before the
+                    current one, so that the action just read can
+                    belong to it.  */
                  nrules++;
                  nitems++;
                  p = symbol_list_new (sdummy);
+                 /* Attach its lineno to that of the host rule. */
+                 p->line = crule->line;
                  if (crule1)
                    crule1->next = p;
                  else