]> git.saurik.com Git - bison.git/blobdiff - src/reader.c
* src/bison.simple: Remove YYERROR_VERBOSE using.
[bison.git] / src / reader.c
index 30e7f5814a62fc9d68922efea05c7d150d9846d7..ac160aed449b93d59814299a2e1eee7a009374f2 100644 (file)
@@ -66,7 +66,7 @@ static bucket *errtoken;
 static bucket *undeftoken;
 
 
-symbol_list *
+static symbol_list *
 symbol_list_new (bucket *sym)
 {
   symbol_list *res = XMALLOC (symbol_list, 1);
@@ -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