bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposed namespace cleanup for bison.simple


From: Akim Demaille
Subject: Re: proposed namespace cleanup for bison.simple
Date: 30 Nov 2001 12:23:10 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

| | /home/prog/bison/work/bison-1_29-branch/tests-bison/src/bison.simple:117: 
parse error before `YYSTYPE'
| | cc1: warnings being treated as errors
| 
| ??? I can't see that one.
| 
| Can you still reproduce it Marc?

Ok, it's on the trunk only.  I'm applying this.

2001-11-30  Akim Demaille  <address@hidden>

        * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
        before their first uses.
        (YYBISON, YYPURE): Move to the top of the output.

Index: src/bison.simple
===================================================================
RCS file: /cvsroot/bison/bison/src/bison.simple,v
retrieving revision 1.81
diff -u -u -r1.81 bison.simple
--- src/bison.simple 2001/11/30 11:11:34 1.81
+++ src/bison.simple 2001/11/30 11:21:54
@@ -31,15 +31,18 @@
    It was written by Richard Stallman by simplifying the hairy parser
    used when %semantic_parser is specified.  */
 
+#define YYBISON        1       /* Identify Bison output.  */
+#define YYPURE %%pure  /* Identify pure parsers.  */
+
 #include <stdio.h>
 
 /* If name_prefix is specify substitute the variables and functions
    names.  */
 #define yyparse %%prefix##parse
-#define yylex %%prefix##lex
+#define yylex   %%prefix##lex
 #define yyerror %%prefix##error
-#define yylval %%prefix##lval
-#define yychar %%prefix##char
+#define yylval  %%prefix##lval
+#define yychar  %%prefix##char
 #define yydebug %%prefix##debug
 #define yynerrs %%prefix##nerrs
 
@@ -111,6 +114,24 @@
 # define YYSTACK_FREE(Ptr) free (Ptr)
 #endif
 
+#line %%input-line "%%filename"
+#ifndef YYSTYPE
+typedef %%stype yystype;
+# define YYSTYPE yystype
+#endif
+
+#ifndef YYLTYPE
+typedef struct yyltype
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} yyltype;
+# define YYLTYPE %%ltype
+#endif
+
+#line %%line "%%skeleton"
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
@@ -153,28 +174,8 @@
   }                                                                    \
 while (0)
 
-#define YYBISON        1       /* Identify Bison output.  */
-#define YYPURE %%pure  /* Identify pure parsers.  */
-
 #ifndef YYDEBUG
 # define YYDEBUG %%debug
-#endif
-
-#line %%input-line "%%filename"
-#ifndef YYSTYPE
-typedef %%stype yystype;
-# define YYSTYPE yystype
-#endif
-
-#ifndef YYLTYPE
-typedef struct yyltype
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} yyltype;
-# define YYLTYPE %%ltype
 #endif
 
 #ifdef YYERROR_VERBOSE



reply via email to

[Prev in Thread] Current Thread [Next in Thread]