summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2b763df)
attrs_obstack in the '%%definitions' directive.
* src/bison.simple: Add `%%definitions'.
+2001-08-28 Pascal Bart <pascal.bart@epita.fr>
+
+ * src/output.c (output_definitions): New function, which copies
+ attrs_obstack in the '%%definitions' directive.
+ * src/bison.simple: Add `%%definitions'.
+
2001-08-28 Marc Autret <autret_m@epita.fr>
* config/depcomp: New file.
2001-08-28 Marc Autret <autret_m@epita.fr>
* config/depcomp: New file.
+/* Copy the user declarations. */
+%%definitions
+
#ifndef __cplusplus
# ifndef __STDC__
# define const
#ifndef __cplusplus
# ifndef __STDC__
# define const
{
obstack_init (&output_obstack);
{
obstack_init (&output_obstack);
-#if 0
- /* If using a simple parser the definition of YYSTYPE are put into
- TABLE_OBSTACK. */
- if (!semantic_parser)
- {
- size_t size = obstack_object_size (&attrs_obstack);
- obstack_grow (&table_obstack, obstack_finish (&attrs_obstack), size);
- }
-#endif
-
/* reader_output_yylsp (&table_obstack); */
free_itemsets ();
/* reader_output_yylsp (&table_obstack); */
free_itemsets ();
/* if (!no_parser_flag) */
prepare ();
/* if (!no_parser_flag) */
prepare ();
+ /* Copy definitions in directive. */
+ macro_insert ("definitions", obstack_finish (&attrs_obstack));
output_parser ();
output_program ();
output_parser ();
output_program ();