X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b29b2ed5600cd819f4237b7b050288f6e19d102d..eeeb962b:/src/reader.c diff --git a/src/reader.c b/src/reader.c index 30e7f581..ac160aed 100644 --- a/src/reader.c +++ b/src/reader.c @@ -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