macro_insert (macro_key, macro_value);
}
+
+/*----------------------------------.
+| Parse what comes after %skeleton. |
+`----------------------------------*/
+
+void
+parse_skel_decl (void)
+{
+ /* Complete with parse_dquoted_param () on the CVS branch 1.29. */
+}
+
/*------------------------------------------.
| Parse what comes after %header_extension. |
`------------------------------------------*/
case tok_define:
parse_macro_decl ();
break;
+
+ case tok_skel:
+ parse_skel_decl ();
+ break;
case tok_noop:
break;
ntokens = nsyms - nvars;
}
+
+/* At the end of the grammar file, some C source code must
+ be stored. It is going to be associated to the user_code
+ directive. */
+static void
+read_additionnal_code (void)
+{
+ char c;
+ struct obstack uc_obstack;
+
+ obstack_init (&uc_obstack);
+
+ while ((c = getc (finput)) != EOF)
+ obstack_1grow (&uc_obstack, c);
+
+ obstack_1grow (&uc_obstack, 0);
+ macro_insert ("user_code", obstack_finish (&uc_obstack));
+}
+
\f
/*--------------------------------------------------------------.
| For named tokens, but not literal ones, define the name. The |
/* Read in the grammar, build grammar in list form. Write out
guards and actions. */
readgram ();
+ /* Some C code is given at the end of the grammar file. */
+ read_additionnal_code ();
/* Now we know whether we need the line-number stack. If we do,
write its type into the .tab.h file. */
#if 0