[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: [Main] User definition (come back).
From: |
Pascal Bart |
Subject: |
FYI: [Main] User definition (come back). |
Date: |
Tue, 28 Aug 2001 19:52:20 +0000 (GMT) |
Re-Hello,
Well, after yours notices, I send you a correction of my precede
patch, I think, it's really better. So thanks you.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.188
diff -u -u -r1.188 ChangeLog
--- ChangeLog 2001/08/27 17:28:28 1.188
+++ ChangeLog 2001/08/28 17:48:56
@@ -1,3 +1,9 @@
+2001-08-28 Pascal Bart <address@hidden>
+
+ * src/output.c (output_definitions): New function, which copies
+ attrs_obstack in the '%%definitions' directive.
+ * src/bison.simple: Add `%%definitions'.
+
2001-08-27 Paul Eggert <address@hidden>
* src/bison.simple (yyparse): Don't take the address of an
Index: src/bison.simple
===================================================================
RCS file: /cvsroot/bison/bison/src/bison.simple,v
retrieving revision 1.57
diff -u -u -r1.57 bison.simple
--- src/bison.simple 2001/08/27 17:24:34 1.57
+++ src/bison.simple 2001/08/28 17:48:57
@@ -33,6 +33,9 @@
#include <stdio.h>
+/* Copy the user declarations. */
+%%definitions
+
#ifndef __cplusplus
# ifndef __STDC__
# define const
Index: src/output.c
===================================================================
RCS file: /cvsroot/bison/bison/src/output.c,v
retrieving revision 1.44
diff -u -u -r1.44 output.c
--- src/output.c 2001/08/27 14:55:39 1.44
+++ src/output.c 2001/08/28 17:48:58
@@ -1105,16 +1105,6 @@
{
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 ();
@@ -1129,6 +1119,8 @@
/* if (!no_parser_flag) */
prepare ();
+ /* Copy definitions in directive. */
+ macro_insert ("definitions", obstack_finish (&attrs_obstack));
output_parser ();
output_program ();
Pascal Bart (address@hidden)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: [Main] User definition (come back).,
Pascal Bart <=