bison-patches
[Top][All Lists]
Advanced

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

gram_error can be static, not extern


From: Paul Eggert
Subject: gram_error can be static, not extern
Date: Sat, 30 Nov 2002 01:19:57 -0800 (PST)

I installed the following minor namespace cleanup in Bison.

2002-11-30  Paul Eggert  <address@hidden>

        gram_error can be static; it need not be extern.
        * src/reader.h (gram_error): Remove decl.
        * src/parse-gram.y (gram_error): Now static.  Add static decl.
        (print_token_value): Omit parameter names from forward decl,
        for consistency.

Index: src/parse-gram.y
===================================================================
RCS file: /cvsroot/bison/bison/src/parse-gram.y,v
retrieving revision 1.32
diff -p -u -r1.32 parse-gram.y
--- src/parse-gram.y    29 Nov 2002 08:44:04 -0000      1.32
+++ src/parse-gram.y    30 Nov 2002 09:14:29 -0000
@@ -62,10 +62,11 @@ do {                                                        
\
 #undef  yyerror
 #define yyerror(Msg) \
         gram_error (&yylloc, Msg)
+static void gram_error (location_t const *, char const *);
 
 #define YYPRINT(File, Type, Value) \
        print_token_value (File, Type, &Value)
-static void print_token_value (FILE *file, int type, YYSTYPE const *value);
+static void print_token_value (FILE *, int, YYSTYPE const *);
 
 static void add_param (char const *, char const *, location_t);
 
@@ -504,7 +505,7 @@ print_token_value (FILE *file, int type,
     }
 }
 
-void
+static void
 gram_error (location_t const *loc, char const *msg)
 {
   complain_at (*loc, "%s", msg);
Index: src/reader.h
===================================================================
RCS file: /cvsroot/bison/bison/src/reader.h,v
retrieving revision 1.32
diff -p -u -r1.32 reader.h
--- src/reader.h        27 Nov 2002 18:33:42 -0000      1.32
+++ src/reader.h        30 Nov 2002 09:14:29 -0000
@@ -45,7 +45,6 @@ YY_DECL;
 
 /* From the parser.  */
 extern int gram_debug;
-void gram_error (location_t const *loc, char const *msg);
 int gram_parse (void);
 
 /* The sort of braced code we are in.  */




reply via email to

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