]> git.saurik.com Git - bison.git/commitdiff
Use 'short int' rather than 'short', and similarly for 'long', 'unsigned', etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Mar 2004 00:37:21 +0000 (00:37 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Mar 2004 00:37:21 +0000 (00:37 +0000)
25 files changed:
ChangeLog
data/c.m4
data/glr.c
data/lalr1.cc
data/yacc.c
doc/bison.texinfo
lib/bbitset.h
lib/bitset.c
lib/bitset_stats.c
lib/bitsetv-print.c
lib/bitsetv.c
lib/ebitset.c
lib/lbitset.c
src/LR0.c
src/gram.h
src/lalr.h
src/nullable.c
src/output.c
src/relation.c
src/relation.h
src/state.h
src/symtab.h
src/tables.c
tests/existing.at
tests/regression.at

index a7301cc127ab79e2d36f2237bd5e3d522bc7dcf5..e41f0b5bd1cd7fc9f9b24f23dce34f1873417830 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2004-03-30  Paul Eggert  <eggert@twinsun.com>
+
+       * src/getargs.c (version): Update copyright year to 2004.
+
+       * data/c.m4 (b4_int_type): Use 'short int' rather than
+       'short', and similarly for 'long', 'unsigned', etc.
+       * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
+       yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
+       yy_yypstack, yydumpstack): Likewise.
+       * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
+       translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
+       Likewise.
+       * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
+       yy_stack_print, yyparse): Likewise.
+       * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
+       * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
+       * lib/bitset.c (bitset_print): Likewise.
+       * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
+       * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
+       * lib/bitsetv.c (bitsetv_dump): Likewise.
+       * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
+       * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
+       Likewise.
+       * src/LR0.c (allocate_itemsets): Likewise.
+       * src/gram.h (rule_number, rule): Likewise.
+       * src/lalr.h (goto_number): Likewise.
+       * src/nullable.c (nullable_compute): Likewise.
+       * src/output.c (prepare_rules): Likewise.
+       * src/relation.c (relation_print, relation_digraph): Likewise.
+       * src/relation.h (relation_node): Likewise.
+       * src/state.h (state_number, transitions, errs, reductions,
+       struct state): Likewise.
+       * src/symtab.h (symbol_number, struct symbol): Likewise.
+       * src/tables.c (vector_number, tally, action_number,
+       default_goto, goto_actions): Likewise.
+       * tests/existing.at (GNU Cim Grammar): Likewise.
+       * tests/regression.at (Web2c Actions): Likewise.
+
+       * src/output.c (muscle_insert_short_int_table): Renamed from
+       muscle_insert_short_table.  All uses changed.
+
 2004-03-25  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
 
        * src/parse-gram.y: Define PERCENT_EXPECT_RR.
 2004-03-25  Paul Hilfinger  <hilfingr@tully.CS.Berkeley.EDU>
 
        * src/parse-gram.y: Define PERCENT_EXPECT_RR.
index 209bb1a76a4a7a1be7cb51085efc4462539e32d1..a72f059a510137c59f53bca46de60e44c503755f 100644 (file)
--- a/data/c.m4
+++ b/data/c.m4
@@ -1,7 +1,7 @@
 m4_divert(-1)                                               -*- Autoconf -*-
 
 # C M4 Macros for Bison.
 m4_divert(-1)                                               -*- Autoconf -*-
 
 # C M4 Macros for Bison.
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -114,8 +114,8 @@ m4_define([b4_int_type],
 [m4_if(b4_ints_in($@,      [0],   [255]), [1], [unsigned char],
        b4_ints_in($@,   [-128],   [127]), [1], [signed char],
 
 [m4_if(b4_ints_in($@,      [0],   [255]), [1], [unsigned char],
        b4_ints_in($@,   [-128],   [127]), [1], [signed char],
 
-       b4_ints_in($@,      [0], [65535]), [1], [unsigned short],
-       b4_ints_in($@, [-32768], [32767]), [1], [short],
+       b4_ints_in($@,      [0], [65535]), [1], [unsigned short int],
+       b4_ints_in($@, [-32768], [32767]), [1], [short int],
 
        m4_eval([0 <= $1]),                [1], [unsigned int],
 
 
        m4_eval([0 <= $1]),                [1], [unsigned int],
 
index 586da61eda34ad5114d7ab756d2db8ed547fd7f0..a77a98570387b8c232897547a075bf34e8fc7172 100644 (file)
@@ -137,7 +137,7 @@ m4_define([b4_rhs_location],
 m4_changecom()
 m4_divert(0)dnl
 @output @output_parser_name@
 m4_changecom()
 m4_divert(0)dnl
 @output @output_parser_name@
-b4_copyright([Skeleton parser for GLR parsing with Bison], [2002, 2003])
+b4_copyright([Skeleton parser for GLR parsing with Bison], [2002, 2003, 2004])
 [
 /* This is the parser code for GLR (Generalized LR) parser. */
 
 [
 /* This is the parser code for GLR (Generalized LR) parser. */
 
@@ -282,7 +282,7 @@ b4_syncline([@oline@], [@ofile@])
 
 #define YYTRANSLATE(YYX)                                               \
   ((YYX <= 0) ? YYEOF :                                                        \
 
 #define YYTRANSLATE(YYX)                                               \
   ((YYX <= 0) ? YYEOF :                                                        \
-   (unsigned)(YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+   (unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
 static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
 
 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
 static const ]b4_int_type_for([b4_translate])[ yytranslate[] =
@@ -394,9 +394,9 @@ static const ]b4_int_type_for([b4_conflict_list_heads])[ yyconflp[] =
 /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
    0, pointed into by YYCONFLP.  */
 ]dnl Do not use b4_int_type_for here, since there are places where
 /* YYCONFL[I] -- lists of conflicting rule numbers, each terminated by
    0, pointed into by YYCONFLP.  */
 ]dnl Do not use b4_int_type_for here, since there are places where
-dnl pointers onto yyconfl are taken, which type is "short *".
+dnl pointers onto yyconfl are taken, which type is "short int *".
 dnl We probably ought to introduce a type for confl.
 dnl We probably ought to introduce a type for confl.
-[static const short yyconfl[] =
+[static const short int yyconfl[] =
 {
   ]b4_conflicting_rules[
 };
 {
   ]b4_conflicting_rules[
 };
@@ -552,10 +552,10 @@ typedef int yyStateNum;
 typedef int yyRuleNum;
 
 /** Grammar symbol */
 typedef int yyRuleNum;
 
 /** Grammar symbol */
-typedef short yySymbol;
+typedef short int yySymbol;
 
 /** Item references, as in LALR(1) machine */
 
 /** Item references, as in LALR(1) machine */
-typedef short yyItemNum;
+typedef short int yyItemNum;
 
 typedef struct yyGLRState yyGLRState;
 typedef struct yySemanticOption yySemanticOption;
 
 typedef struct yyGLRState yyGLRState;
 typedef struct yySemanticOption yySemanticOption;
@@ -809,7 +809,7 @@ yydefaultAction (yyStateNum yystate)
  */
 static inline void
 yygetLRActions (yyStateNum yystate, int yytoken,
  */
 static inline void
 yygetLRActions (yyStateNum yystate, int yytoken,
-               int* yyaction, const short** yyconflicts)
+               int* yyaction, const short int** yyconflicts)
 {
   int yyindex = yypact[yystate] + yytoken;
   if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
 {
   int yyindex = yypact[yystate] + yytoken;
   if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
@@ -1539,7 +1539,7 @@ yyprocessOneStack (yyGLRStack* yystack, int yyk,
                  ]b4_user_formals[)
 {
   int yyaction;
                  ]b4_user_formals[)
 {
   int yyaction;
-  const short* yyconflicts;
+  const short int* yyconflicts;
   yyRuleNum yyrule;
   yySymbol* const yytokenp = yystack->yytokenp;
 
   yyRuleNum yyrule;
   yySymbol* const yytokenp = yystack->yytokenp;
 
@@ -1840,7 +1840,7 @@ yyrecoverSyntaxError (yyGLRStack* yystack,
        {
          yyRuleNum yyrule;
          int yyaction;
        {
          yyRuleNum yyrule;
          int yyaction;
-         const short* yyconflicts;
+         const short int* yyconflicts;
 
          yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
           YYDPRINTF ((stderr, "Entering state %d\n", yystate));
 
          yyStateNum yystate = yystack.yytops.yystates[0]->yylrState;
           YYDPRINTF ((stderr, "Entering state %d\n", yystate));
@@ -1942,7 +1942,7 @@ yy_yypstack (yyGLRState* yys)
       yy_yypstack (yys->yypred);
       fprintf (stderr, " -> ");
     }
       yy_yypstack (yys->yypred);
       fprintf (stderr, " -> ");
     }
-  fprintf (stderr, "%d@@%lu", yys->yylrState, (unsigned long) yys->yyposn);
+  fprintf (stderr, "%d@@%lu", yys->yylrState, (unsigned long int) yys->yyposn);
 }
 
 static void
 }
 
 static void
@@ -1972,30 +1972,30 @@ yypdumpstack (yyGLRStack* yystack)
   size_t yyi;
   for (yyp = yystack->yyitems; yyp < yystack->yynextFree; yyp += 1)
     {
   size_t yyi;
   for (yyp = yystack->yyitems; yyp < yystack->yynextFree; yyp += 1)
     {
-      fprintf (stderr, "%3lu. ", (unsigned long) (yyp - yystack->yyitems));
+      fprintf (stderr, "%3lu. ", (unsigned long int) (yyp - yystack->yyitems));
       if (*(yybool *) yyp)
        {
          fprintf (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld",
                   yyp->yystate.yyresolved, yyp->yystate.yylrState,
       if (*(yybool *) yyp)
        {
          fprintf (stderr, "Res: %d, LR State: %d, posn: %lu, pred: %ld",
                   yyp->yystate.yyresolved, yyp->yystate.yylrState,
-                  (unsigned long) yyp->yystate.yyposn,
-                  (long) YYINDEX (yyp->yystate.yypred));
+                  (unsigned long int) yyp->yystate.yyposn,
+                  (long int) YYINDEX (yyp->yystate.yypred));
          if (! yyp->yystate.yyresolved)
            fprintf (stderr, ", firstVal: %ld",
          if (! yyp->yystate.yyresolved)
            fprintf (stderr, ", firstVal: %ld",
-                    (long) YYINDEX (yyp->yystate.yysemantics.yyfirstVal));
+                    (long int) YYINDEX (yyp->yystate.yysemantics.yyfirstVal));
        }
       else
        {
          fprintf (stderr, "Option. rule: %d, state: %ld, next: %ld",
                   yyp->yyoption.yyrule,
        }
       else
        {
          fprintf (stderr, "Option. rule: %d, state: %ld, next: %ld",
                   yyp->yyoption.yyrule,
-                  (long) YYINDEX (yyp->yyoption.yystate),
-                  (long) YYINDEX (yyp->yyoption.yynext));
+                  (long int) YYINDEX (yyp->yyoption.yystate),
+                  (long int) YYINDEX (yyp->yyoption.yynext));
        }
       fprintf (stderr, "\n");
     }
   fprintf (stderr, "Tops:");
   for (yyi = 0; yyi < yystack->yytops.yysize; yyi += 1)
        }
       fprintf (stderr, "\n");
     }
   fprintf (stderr, "Tops:");
   for (yyi = 0; yyi < yystack->yytops.yysize; yyi += 1)
-    fprintf (stderr, "%lu: %ld; ", (unsigned long) yyi,
-            (long) YYINDEX (yystack->yytops.yystates[yyi]));
+    fprintf (stderr, "%lu: %ld; ", (unsigned long int) yyi,
+            (long int) YYINDEX (yystack->yytops.yystates[yyi]));
   fprintf (stderr, "\n");
 }
 ]
   fprintf (stderr, "\n");
 }
 ]
@@ -2003,7 +2003,7 @@ yypdumpstack (yyGLRStack* yystack)
 b4_epilogue
 m4_if(b4_defines_flag, 0, [],
 [@output @output_header_name@
 b4_epilogue
 m4_if(b4_defines_flag, 0, [],
 [@output @output_header_name@
-b4_copyright([Skeleton parser for GLR parsing with Bison], [2002, 2003])
+b4_copyright([Skeleton parser for GLR parsing with Bison], [2002, 2003, 2004])
 
 b4_token_defines(b4_tokens)
 
 
 b4_token_defines(b4_tokens)
 
index 3585cd1951850166c221c1cc203d67f956bdb124..fba29b3b7b014f21f064f321ccf3ec0be83b73fc 100644 (file)
@@ -1,6 +1,6 @@
 m4_divert(-1)
 # C++ skeleton for Bison
 m4_divert(-1)
 # C++ skeleton for Bison
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -128,7 +128,7 @@ m4_divert(0)dnl
 m4_if(b4_defines_flag, 0, [],
 [@output @output_header_name@
 b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
 m4_if(b4_defines_flag, 0, [],
 [@output @output_header_name@
 b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
-             [2002, 2003])[
+             [2002, 2003, 2004])[
 /* FIXME: This is wrong, we want computed header guards.
    I don't know why the macros are missing now. :( */
 #ifndef PARSER_HEADER_H
 /* FIXME: This is wrong, we want computed header guards.
    I don't know why the macros are missing now. :( */
 #ifndef PARSER_HEADER_H
@@ -291,7 +291,7 @@ namespace yy
     static const int terror_;
     static const int errcode_;
     static const int ntokens_;
     static const int terror_;
     static const int errcode_;
     static const int ntokens_;
-    static const unsigned user_token_number_max_;
+    static const unsigned int user_token_number_max_;
     static const TokenNumberType undef_token_;
 
     /* State.  */
     static const TokenNumberType undef_token_;
 
     /* State.  */
@@ -334,7 +334,7 @@ namespace yy
 ])dnl
 @output @output_parser_name@
 b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
 ])dnl
 @output @output_parser_name@
 b4_copyright([C++ Skeleton parser for LALR(1) parsing with Bison],
-             [2002, 2003])
+             [2002, 2003, 2004])
 
 m4_if(b4_defines_flag, 0, [], [#include @output_header_name@])[
 
 
 m4_if(b4_defines_flag, 0, [], [#include @output_header_name@])[
 
@@ -885,7 +885,7 @@ yy::]b4_parser_class_name[::translate_ (int token)
   {
     ]b4_translate[
   };
   {
     ]b4_translate[
   };
-  if ((unsigned) token <= user_token_number_max_)
+  if ((unsigned int) token <= user_token_number_max_)
     return translate_table[token];
   else
     return undef_token_;
     return translate_table[token];
   else
     return undef_token_;
@@ -900,13 +900,13 @@ const int yy::]b4_parser_class_name[::terror_ = 1;
 const int yy::]b4_parser_class_name[::errcode_ = 256;
 const int yy::]b4_parser_class_name[::ntokens_ = ]b4_tokens_number[;
 
 const int yy::]b4_parser_class_name[::errcode_ = 256;
 const int yy::]b4_parser_class_name[::ntokens_ = ]b4_tokens_number[;
 
-const unsigned yy::]b4_parser_class_name[::user_token_number_max_ = ]b4_user_token_number_max[;
+const unsigned int yy::]b4_parser_class_name[::user_token_number_max_ = ]b4_user_token_number_max[;
 const yy::]b4_parser_class_name[::TokenNumberType yy::]b4_parser_class_name[::undef_token_ = ]b4_undef_token_number[;
 
 ]b4_epilogue
 dnl
 @output stack.hh
 const yy::]b4_parser_class_name[::TokenNumberType yy::]b4_parser_class_name[::undef_token_ = ]b4_undef_token_number[;
 
 ]b4_epilogue
 dnl
 @output stack.hh
-b4_copyright([Stack handling for Bison C++ parsers], [2002, 2003])[
+b4_copyright([Stack handling for Bison C++ parsers], [2002, 2003, 2004])[
 
 #ifndef BISON_STACK_HH
 # define BISON_STACK_HH
 
 #ifndef BISON_STACK_HH
 # define BISON_STACK_HH
@@ -927,20 +927,20 @@ namespace yy
     {
     }
 
     {
     }
 
-    Stack (unsigned n) : seq_ (n)
+    Stack (unsigned int n) : seq_ (n)
     {
     }
 
     inline
     T&
     {
     }
 
     inline
     T&
-    operator [] (unsigned i)
+    operator [] (unsigned int i)
     {
       return seq_[i];
     }
 
     inline
     const T&
     {
       return seq_[i];
     }
 
     inline
     const T&
-    operator [] (unsigned i) const
+    operator [] (unsigned int i) const
     {
       return seq_[i];
     }
     {
       return seq_[i];
     }
@@ -954,14 +954,14 @@ namespace yy
 
     inline
     void
 
     inline
     void
-    pop (unsigned n = 1)
+    pop (unsigned int n = 1)
     {
       for (; n; --n)
        seq_.pop_front ();
     }
 
     inline
     {
       for (; n; --n)
        seq_.pop_front ();
     }
 
     inline
-    unsigned
+    unsigned int
     height () const
     {
       return seq_.size ();
     height () const
     {
       return seq_.size ();
@@ -981,14 +981,14 @@ namespace yy
   public:
 
     Slice (const S& stack,
   public:
 
     Slice (const S& stack,
-          unsigned range) : stack_ (stack),
-                            range_ (range)
+          unsigned int range) : stack_ (stack),
+                                range_ (range)
     {
     }
 
     inline
     const T&
     {
     }
 
     inline
     const T&
-    operator [] (unsigned i) const
+    operator [] (unsigned int i) const
     {
       return stack_[range_ - i];
     }
     {
       return stack_[range_ - i];
     }
@@ -996,14 +996,14 @@ namespace yy
   private:
 
     const S& stack_;
   private:
 
     const S& stack_;
-    unsigned range_;
+    unsigned int range_;
   };
 }
 
 #endif // not BISON_STACK_HH]
 dnl
 @output position.hh
   };
 }
 
 #endif // not BISON_STACK_HH]
 dnl
 @output position.hh
-b4_copyright([Position class for Bison C++ parsers], [2002, 2003])[
+b4_copyright([Position class for Bison C++ parsers], [2002, 2003, 2004])[
 
 /**
  ** \file position.hh
 
 /**
  ** \file position.hh
@@ -1116,7 +1116,7 @@ namespace yy
 }
 #endif // not BISON_POSITION_HH]
 @output location.hh
 }
 #endif // not BISON_POSITION_HH]
 @output location.hh
-b4_copyright([Location class for Bison C++ parsers], [2002, 2003])[
+b4_copyright([Location class for Bison C++ parsers], [2002, 2003, 2004])[
 
 /**
  ** \file location.hh
 
 /**
  ** \file location.hh
@@ -1187,7 +1187,7 @@ namespace yy
   }
 
   /** \brief Add two Location objects */
   }
 
   /** \brief Add two Location objects */
-  inline const Location operator+ (const Location& begin, unsigned width)
+  inline const Location operator+ (const Location& begin, unsigned int width)
   {
     Location res = begin;
     res.columns (width);
   {
     Location res = begin;
     res.columns (width);
@@ -1195,7 +1195,7 @@ namespace yy
   }
 
   /** \brief Add and assign a Location */
   }
 
   /** \brief Add and assign a Location */
-  inline Location &operator+= (Location& res, unsigned width)
+  inline Location &operator+= (Location& res, unsigned int width)
   {
     res.columns (width);
     return res;
   {
     res.columns (width);
     return res;
index 6ef0775c43d6604ee08a0cc1368140c6733928ec..0957600efc3c1a9ca8ca114ddf7d7a17beb4b087 100644 (file)
@@ -1,7 +1,7 @@
 m4_divert(-1)                                                       -*- C -*-
 
 # Yacc compatible skeleton for Bison
 m4_divert(-1)                                                       -*- C -*-
 
 # Yacc compatible skeleton for Bison
-# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003
+# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -76,8 +76,8 @@ m4_define([b4_int_type],
 [m4_if(b4_ints_in($@,      [0],   [255]), [1], [unsigned char],
        b4_ints_in($@,   [-128],   [127]), [1], [yysigned_char],
 
 [m4_if(b4_ints_in($@,      [0],   [255]), [1], [unsigned char],
        b4_ints_in($@,   [-128],   [127]), [1], [yysigned_char],
 
-       b4_ints_in($@,      [0], [65535]), [1], [unsigned short],
-       b4_ints_in($@, [-32768], [32767]), [1], [short],
+       b4_ints_in($@,      [0], [65535]), [1], [unsigned short int],
+       b4_ints_in($@, [-32768], [32767]), [1], [short int],
 
        m4_eval([0 <= $1]),                [1], [unsigned int],
 
 
        m4_eval([0 <= $1]),                [1], [unsigned int],
 
@@ -134,7 +134,7 @@ m4_changecom()
 m4_divert(0)dnl
 @output @output_parser_name@
 b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
 m4_divert(0)dnl
 @output @output_parser_name@
 b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
-             [1984, 1989, 1990, 2000, 2001, 2002, 2003])[
+             [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004])[
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
@@ -261,7 +261,7 @@ b4_syncline([@oline@], [@ofile@])[
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
 /* A type that is properly aligned for any stack member.  */
 union yyalloc
 {
-  short yyss;
+  short int yyss;
   YYSTYPE yyvs;
   ]b4_location_if([  YYLTYPE yyls;
 ])dnl
   YYSTYPE yyvs;
   ]b4_location_if([  YYLTYPE yyls;
 ])dnl
@@ -274,10 +274,10 @@ union yyalloc
    N elements.  */
 ]b4_location_if(
 [# define YYSTACK_BYTES(N) \
    N elements.  */
 ]b4_location_if(
 [# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))     \
+     ((N) * (sizeof (short int) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
       + 2 * YYSTACK_GAP_MAXIMUM)],
 [# define YYSTACK_BYTES(N) \
       + 2 * YYSTACK_GAP_MAXIMUM)],
 [# define YYSTACK_BYTES(N) \
-     ((N) * (sizeof (short) + sizeof (YYSTYPE))                                \
+     ((N) * (sizeof (short int) + sizeof (YYSTYPE))                    \
       + YYSTACK_GAP_MAXIMUM)])[
 
 /* Copy COUNT objects from FROM to TO.  The source and destination do
       + YYSTACK_GAP_MAXIMUM)])[
 
 /* Copy COUNT objects from FROM to TO.  The source and destination do
@@ -319,7 +319,7 @@ union yyalloc
 #if defined (__STDC__) || defined (__cplusplus)
    typedef signed char yysigned_char;
 #else
 #if defined (__STDC__) || defined (__cplusplus)
    typedef signed char yysigned_char;
 #else
-   typedef short yysigned_char;
+   typedef short int yysigned_char;
 #endif
 
 /* YYFINAL -- State number of the termination state. */
 #endif
 
 /* YYFINAL -- State number of the termination state. */
@@ -560,8 +560,8 @@ do {                                                                \
 `------------------------------------------------------------------*/
 
 ]b4_c_function_def([yy_stack_print], [static void],
 `------------------------------------------------------------------*/
 
 ]b4_c_function_def([yy_stack_print], [static void],
-                   [[short *bottom], [bottom]],
-                   [[short *top],    [top]])[
+                   [[short int *bottom], [bottom]],
+                   [[short int *top],    [top]])[
 {
   YYFPRINTF (stderr, "Stack now");
   for (/* Nothing. */; bottom <= top; ++bottom)
 {
   YYFPRINTF (stderr, "Stack now");
   for (/* Nothing. */; bottom <= top; ++bottom)
@@ -763,9 +763,9 @@ b4_c_function_def([yyparse], [int], b4_parse_param)
      to reallocate them elsewhere.  */
 
   /* The state stack.  */
      to reallocate them elsewhere.  */
 
   /* The state stack.  */
-  short        yyssa[YYINITDEPTH];
-  short *yyss = yyssa;
-  register short *yyssp;
+  short int yyssa[YYINITDEPTH];
+  short int *yyss = yyssa;
+  register short int *yyssp;
 
   /* The semantic value stack.  */
   YYSTYPE yyvsa[YYINITDEPTH];
 
   /* The semantic value stack.  */
   YYSTYPE yyvsa[YYINITDEPTH];
@@ -842,7 +842,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
           these so that the &'s don't force the real ones into
           memory.  */
        YYSTYPE *yyvs1 = yyvs;
           these so that the &'s don't force the real ones into
           memory.  */
        YYSTYPE *yyvs1 = yyvs;
-       short *yyss1 = yyss;
+       short int *yyss1 = yyss;
 ]b4_location_if([      YYLTYPE *yyls1 = yyls;])[
 
        /* Each stack pointer address is followed by the size of the
 ]b4_location_if([      YYLTYPE *yyls1 = yyls;])[
 
        /* Each stack pointer address is followed by the size of the
@@ -870,7 +870,7 @@ b4_syncline([@oline@], [@ofile@])])dnl
        yystacksize = YYMAXDEPTH;
 
       {
        yystacksize = YYMAXDEPTH;
 
       {
-       short *yyss1 = yyss;
+       short int *yyss1 = yyss;
        union yyalloc *yyptr =
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
        if (! yyptr)
        union yyalloc *yyptr =
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
        if (! yyptr)
@@ -1241,7 +1241,7 @@ b4_epilogue
 m4_if(b4_defines_flag, 0, [],
 [@output @output_header_name@
 b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
 m4_if(b4_defines_flag, 0, [],
 [@output @output_header_name@
 b4_copyright([Skeleton parser for Yacc-like parsing with Bison],
-             [1984, 1989, 1990, 2000, 2001, 2002, 2003])
+             [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004])
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
index 22e5da910da69dc3175c599a52794b34bf8bfa7d..f01c638a8802f188db54e2e55c9e9840d608c0e7 100644 (file)
@@ -2338,7 +2338,7 @@ can be done with two @var{Prologue} blocks, one before and one after the
 %@}
 
 %union @{
 %@}
 
 %union @{
-  long n;
+  long int n;
   tree t;  /* @r{@code{tree} is defined in @file{ptypes.h}.} */
 @}
 
   tree t;  /* @r{@code{tree} is defined in @file{ptypes.h}.} */
 @}
 
@@ -2755,7 +2755,7 @@ This macro definition must go in the prologue of the grammar file
 
 In most programs, you will need different data types for different kinds
 of tokens and groupings.  For example, a numeric constant may need type
 
 In most programs, you will need different data types for different kinds
 of tokens and groupings.  For example, a numeric constant may need type
-@code{int} or @code{long}, while a string constant needs type @code{char *},
+@code{int} or @code{long int}, while a string constant needs type @code{char *},
 and an identifier might need a pointer to an entry in the symbol table.
 
 To use more than one data type for semantic values in one parser, Bison
 and an identifier might need a pointer to an entry in the symbol table.
 
 To use more than one data type for semantic values in one parser, Bison
index 7dd62f968681854a72d1148c7a0b921423230881..b8be7e5ba3ac2eb303d35f19027892f720be68a8 100644 (file)
@@ -1,5 +1,5 @@
 /* Base bitset stuff.
 /* Base bitset stuff.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
 This program is free software; you can redistribute it and/or modify
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
 This program is free software; you can redistribute it and/or modify
@@ -48,8 +48,8 @@ extern const char * const bitset_type_names[];
 enum bitset_alloc_type {BITSET_MALLOC, BITSET_OBALLOC};
 
 /* Data type used to store a word of bits.  */
 enum bitset_alloc_type {BITSET_MALLOC, BITSET_OBALLOC};
 
 /* Data type used to store a word of bits.  */
-typedef unsigned long bitset_word;
-#define BITSET_WORD_BITS ((unsigned) (CHAR_BIT * sizeof (bitset_word)))
+typedef unsigned long int bitset_word;
+#define BITSET_WORD_BITS ((unsigned int) (CHAR_BIT * sizeof (bitset_word)))
 
 /* Bit index.  In theory we might need a type wider than size_t, but
    in practice we lose at most a factor of CHAR_BIT by going with
 
 /* Bit index.  In theory we might need a type wider than size_t, but
    in practice we lose at most a factor of CHAR_BIT by going with
index 3c0d956eaa7951d4a065cb5b93b22c62e7a27028..93fe75d33bac97391188218a74cd64ce4db03467 100644 (file)
@@ -1,5 +1,5 @@
 /* General bitsets.
 /* General bitsets.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
@@ -296,7 +296,7 @@ bitset_print (FILE *file, bitset bset, bool verbose)
 
   if (verbose)
     fprintf (file, "n_bits = %lu, set = {",
 
   if (verbose)
     fprintf (file, "n_bits = %lu, set = {",
-            (unsigned long) bitset_size (bset));
+            (unsigned long int) bitset_size (bset));
 
   pos = 30;
   BITSET_FOR_EACH (iter, bset, i, 0)
 
   pos = 30;
   BITSET_FOR_EACH (iter, bset, i, 0)
index 40bc9f0ca03ee5ba7f1f6f8090c4667ef27421d5..70acd977de0b1342c7ec0d9819737bbecff18b31 100644 (file)
@@ -1,5 +1,5 @@
 /* Bitset statistics.
 /* Bitset statistics.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
@@ -160,8 +160,8 @@ bitset_log_histogram_print (FILE *file, const char *name, const char *msg,
   for (; i < n_bins; i++)
     fprintf (file, "%*lu-%lu\t%8u (%5.1f%%)\n",
             max_width - ((unsigned int) (0.30103 * (i) + 0.9999) + 1),
   for (; i < n_bins; i++)
     fprintf (file, "%*lu-%lu\t%8u (%5.1f%%)\n",
             max_width - ((unsigned int) (0.30103 * (i) + 0.9999) + 1),
-            (unsigned long) 1 << (i - 1),
-            ((unsigned long) 1 << i) - 1,
+            1UL << (i - 1),
+            (1UL << i) - 1,
             bins[i],
             (100.0 * bins[i]) / total);
 }
             bins[i],
             (100.0 * bins[i]) / total);
 }
index 6bddeab89d221cf227d7c314e0332567065b398c..5a624f596b7bbed0e1211d55b5fe06c7d9e0df9a 100644 (file)
@@ -1,5 +1,5 @@
 /* Bitset vectors.
 /* Bitset vectors.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
 
 This file is part of Bison.
 
 
 This file is part of Bison.
 
@@ -57,7 +57,7 @@ bitsetv_matrix_dump (FILE * out, const char *title, bitsetv bset)
   /* Contents. */
   for (i = 0; bset[i]; ++i)
     {
   /* Contents. */
   for (i = 0; bset[i]; ++i)
     {
-      fprintf (out, "%2lu|", (unsigned long) i);
+      fprintf (out, "%2lu|", (unsigned long int) i);
       for (j = 0; j < hsize; ++j)
        fputs (bitset_test (bset[i], j) ? "1" : " ", out);
       fputs ("|\n", out);
       for (j = 0; j < hsize; ++j)
        fputs (bitset_test (bset[i], j) ? "1" : " ", out);
       fputs ("|\n", out);
index c9aea246ea582e9aa9cb725ff6191fa3ca77bf57..42e0a3d79185e4b0833bdce2f7970f353f454102 100644 (file)
@@ -1,5 +1,5 @@
 /* Bitset vectors.
 /* Bitset vectors.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
 
 This file is part of GCC.
 
@@ -149,7 +149,7 @@ bitsetv_dump (FILE *file, char const *title, char const *subtitle,
   fprintf (file, "%s\n", title);
   for (i = 0; bsetv[i]; i++)
     {
   fprintf (file, "%s\n", title);
   for (i = 0; bsetv[i]; i++)
     {
-      fprintf (file, "%s %lu\n", subtitle, (unsigned long) i);
+      fprintf (file, "%s %lu\n", subtitle, (unsigned long int) i);
       bitset_dump (file, bsetv[i]);
     }
 
       bitset_dump (file, bsetv[i]);
     }
 
@@ -164,7 +164,7 @@ debug_bitsetv (bitsetv bsetv)
 
   for (i = 0; bsetv[i]; i++)
     {
 
   for (i = 0; bsetv[i]; i++)
     {
-      fprintf (stderr, "%lu: ", (unsigned long) i);
+      fprintf (stderr, "%lu: ", (unsigned long int) i);
       debug_bitset (bsetv[i]);
     }
 
       debug_bitset (bsetv[i]);
     }
 
index 3998073b816a317fc9944e95a4a7d6e49a5e9fc6..effa2c22e4a2868e0e63d761ef1697c7b472358b 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions to support expandable bitsets.
 /* Functions to support expandable bitsets.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
@@ -52,7 +52,7 @@
 
 /* Number of bits stored in each element.  */
 #define EBITSET_ELT_BITS \
 
 /* Number of bits stored in each element.  */
 #define EBITSET_ELT_BITS \
-  ((unsigned) (EBITSET_ELT_WORDS * BITSET_WORD_BITS))
+  ((unsigned int) (EBITSET_ELT_WORDS * BITSET_WORD_BITS))
 
 /* Ebitset element.  We use an array of bits.  */
 typedef struct ebitset_elt_struct
 
 /* Ebitset element.  We use an array of bits.  */
 typedef struct ebitset_elt_struct
@@ -216,7 +216,7 @@ ebitset_elt_alloc (void)
 
          obstack_specify_allocation (&ebitset_obstack, OBSTACK_CHUNK_SIZE,
                                      __alignof__ (ebitset_elt),
 
          obstack_specify_allocation (&ebitset_obstack, OBSTACK_CHUNK_SIZE,
                                      __alignof__ (ebitset_elt),
-                                     (void *(*)PARAMS ((long)))
+                                     (void *(*)PARAMS ((long int)))
                                      OBSTACK_CHUNK_ALLOC,
                                      (void (*)PARAMS ((void *)))
                                      OBSTACK_CHUNK_FREE);
                                      OBSTACK_CHUNK_ALLOC,
                                      (void (*)PARAMS ((void *)))
                                      OBSTACK_CHUNK_FREE);
index 82fc10ce7b3866199a7d7944185f82f4600787a1..26d798c5ec8a8e0c53a766f9bcf945654269bc47 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions to support link list bitsets.
 /* Functions to support link list bitsets.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
    Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
 
    This program is free software; you can redistribute it and/or modify
@@ -54,7 +54,7 @@ typedef bitset_word lbitset_word;
 
 /* Number of bits stored in each element.  */
 #define LBITSET_ELT_BITS \
 
 /* Number of bits stored in each element.  */
 #define LBITSET_ELT_BITS \
-  ((unsigned) (LBITSET_ELT_WORDS * LBITSET_WORD_BITS))
+  ((unsigned int) (LBITSET_ELT_WORDS * LBITSET_WORD_BITS))
 
 /* Lbitset element.   We use an array of bits for each element.
    These are linked together in a doubly-linked list.  */
 
 /* Lbitset element.   We use an array of bits for each element.
    These are linked together in a doubly-linked list.  */
@@ -127,7 +127,7 @@ lbitset_elt_alloc (void)
 
          obstack_specify_allocation (&lbitset_obstack, OBSTACK_CHUNK_SIZE,
                                      __alignof__ (lbitset_elt),
 
          obstack_specify_allocation (&lbitset_obstack, OBSTACK_CHUNK_SIZE,
                                      __alignof__ (lbitset_elt),
-                                     (void *(*)PARAMS ((long)))
+                                     (void *(*)PARAMS ((long int)))
                                      OBSTACK_CHUNK_ALLOC,
                                      (void (*)PARAMS ((void *)))
                                      OBSTACK_CHUNK_FREE);
                                      OBSTACK_CHUNK_ALLOC,
                                      (void (*)PARAMS ((void *)))
                                      OBSTACK_CHUNK_FREE);
@@ -1390,7 +1390,7 @@ debug_lbitset (bitset bset)
 
   for (elt = LBITSET_HEAD (bset); elt; elt = elt->next)
     {
 
   for (elt = LBITSET_HEAD (bset); elt; elt = elt->next)
     {
-      fprintf (stderr, "Elt %lu\n", (unsigned long) elt->index);
+      fprintf (stderr, "Elt %lu\n", (unsigned long int) elt->index);
       for (i = 0; i < LBITSET_ELT_WORDS; i++)
        {
          unsigned int j;
       for (i = 0; i < LBITSET_ELT_WORDS; i++)
        {
          unsigned int j;
index ae39b7ce5033433d5d5d9e8748540de4e1396a71..2a75193e8135cf9c2dab01ea5a5eb3e835ff591f 100644 (file)
--- a/src/LR0.c
+++ b/src/LR0.c
@@ -1,7 +1,7 @@
 /* Generate the nondeterministic finite state machine for Bison.
 
 /* Generate the nondeterministic finite state machine for Bison.
 
-   Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
+   Copyright (C) 1984, 1986, 1989, 2000, 2001, 2002, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -106,7 +106,8 @@ allocate_itemsets (void)
      browsed too, hence we need to allocate room for _all_ the
      symbols.  */
   int count = 0;
      browsed too, hence we need to allocate room for _all_ the
      symbols.  */
   int count = 0;
-  short *symbol_count = CALLOC (symbol_count, nsyms + nuseless_nonterminals);
+  short int *symbol_count = CALLOC (symbol_count,
+                                   nsyms + nuseless_nonterminals);
 
   for (r = 0; r < nrules; ++r)
     for (rhsp = rules[r].rhs; *rhsp >= 0; ++rhsp)
 
   for (r = 0; r < nrules; ++r)
     for (rhsp = rules[r].rhs; *rhsp >= 0; ++rhsp)
index cbdfa5e03fb3bdca6f41fc4ca5838f34fc1f869c..caae4847b98bc231e39b7e5c4a043149827919ab 100644 (file)
@@ -1,6 +1,6 @@
 /* Data definitions for internal representation of Bison's input.
 
 /* Data definitions for internal representation of Bison's input.
 
-   Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002, 2003
+   Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
@@ -139,7 +139,7 @@ item_number_as_symbol_number (item_number i)
 }
 
 /* Rule numbers.  */
 }
 
 /* Rule numbers.  */
-typedef short rule_number;
+typedef short int rule_number;
 extern rule_number nrules;
 
 static inline item_number
 extern rule_number nrules;
 
 static inline item_number
@@ -175,8 +175,8 @@ typedef struct
   /* This symbol provides both the associativity, and the precedence. */
   symbol *prec;
 
   /* This symbol provides both the associativity, and the precedence. */
   symbol *prec;
 
-  short dprec;
-  short merger;
+  short int dprec;
+  short int merger;
 
   /* This symbol was attached to the rule via %prec. */
   symbol *precsym;
 
   /* This symbol was attached to the rule via %prec. */
   symbol *precsym;
index 7912a089d46b19316daf98609b2262104c514d26..ce10edd019c6f3fc98a35313029edf0aa46b6817 100644 (file)
@@ -1,5 +1,7 @@
 /* Compute look-ahead criteria for bison,
 /* Compute look-ahead criteria for bison,
-   Copyright (C) 1984, 1986, 1989, 2000, 2002 Free Software Foundation, Inc.
+
+   Copyright (C) 1984, 1986, 1989, 2000, 2002, 2004 Free Software
+   Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -54,7 +56,7 @@ void lalr_free (void);
    together and GOTO_MAP[I - NTOKENS] is the index in FROM_STATE and
    TO_STATE of the first of them.  */
 
    together and GOTO_MAP[I - NTOKENS] is the index in FROM_STATE and
    TO_STATE of the first of them.  */
 
-typedef short goto_number;
+typedef short int goto_number;
 # define GOTO_NUMBER_MAXIMUM SHRT_MAX
 
 extern goto_number *goto_map;
 # define GOTO_NUMBER_MAXIMUM SHRT_MAX
 
 extern goto_number *goto_map;
index 9357535c9bdef723d94e15dd373d572c46cbc4d2..d65c4f2b43d06cdc33b1f35df151f3e066b03a1c 100644 (file)
@@ -1,7 +1,7 @@
 /* Calculate which nonterminals can expand into the null string for Bison.
 
 /* Calculate which nonterminals can expand into the null string for Bison.
 
-   Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003 Free Software
-   Foundation, Inc.
+   Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -62,7 +62,7 @@ nullable_compute (void)
   rule_list *p;
 
   symbol_number *squeue = CALLOC (squeue, nvars);
   rule_list *p;
 
   symbol_number *squeue = CALLOC (squeue, nvars);
-  short *rcount = CALLOC (rcount, nrules);
+  short int *rcount = CALLOC (rcount, nrules);
   /* RITEM contains all the rules, including useless productions.
      Hence we must allocate room for useless nonterminals too.  */
   rule_list **rsets = CALLOC (rsets, nvars);
   /* RITEM contains all the rules, including useless productions.
      Hence we must allocate room for useless nonterminals too.  */
   rule_list **rsets = CALLOC (rsets, nvars);
index d2fe981f7603258ae1d0ecc13956789403eebd4e..68dd2dffbd4575dae864d103135925d2086ce22d 100644 (file)
@@ -1,6 +1,6 @@
 /* Output the generated parsing program for Bison.
 
 /* Output the generated parsing program for Bison.
 
-   Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003
+   Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
@@ -106,7 +106,7 @@ Name (const char *name,                                                     \
 
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_unsigned_int_table, unsigned int)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_int_table, int)
 
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_unsigned_int_table, unsigned int)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_int_table, int)
-GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_short_table, short)
+GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_short_int_table, short int)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_base_table, base_number)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_rule_number_table, rule_number)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_symbol_number_table, symbol_number)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_base_table, base_number)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_rule_number_table, rule_number)
 GENERATE_MUSCLE_INSERT_TABLE(muscle_insert_symbol_number_table, symbol_number)
@@ -217,8 +217,8 @@ prepare_rules (void)
   unsigned int *rline = MALLOC (rline, nrules);
   symbol_number *r1 = MALLOC (r1, nrules);
   unsigned int *r2 = MALLOC (r2, nrules);
   unsigned int *rline = MALLOC (rline, nrules);
   symbol_number *r1 = MALLOC (r1, nrules);
   unsigned int *r2 = MALLOC (r2, nrules);
-  short *dprec = MALLOC (dprec, nrules);
-  short *merger = MALLOC (merger, nrules);
+  short int *dprec = MALLOC (dprec, nrules);
+  short int *merger = MALLOC (merger, nrules);
 
   for (r = 0; r < nrules; ++r)
     {
 
   for (r = 0; r < nrules; ++r)
     {
@@ -249,8 +249,8 @@ prepare_rules (void)
   muscle_insert_unsigned_int_table ("rline", rline, 0, 0, nrules);
   muscle_insert_symbol_number_table ("r1", r1, 0, 0, nrules);
   muscle_insert_unsigned_int_table ("r2", r2, 0, 0, nrules);
   muscle_insert_unsigned_int_table ("rline", rline, 0, 0, nrules);
   muscle_insert_symbol_number_table ("r1", r1, 0, 0, nrules);
   muscle_insert_unsigned_int_table ("r2", r2, 0, 0, nrules);
-  muscle_insert_short_table ("dprec", dprec, 0, 0, nrules);
-  muscle_insert_short_table ("merger", merger, 0, 0, nrules);
+  muscle_insert_short_int_table ("dprec", dprec, 0, 0, nrules);
+  muscle_insert_short_int_table ("merger", merger, 0, 0, nrules);
 
   MUSCLE_INSERT_INT ("rules_number", nrules);
   MUSCLE_INSERT_INT ("max_left_semantic_context", max_left_semantic_context);
 
   MUSCLE_INSERT_INT ("rules_number", nrules);
   MUSCLE_INSERT_INT ("max_left_semantic_context", max_left_semantic_context);
index 9eb647c47cf2144710683a8692ff24ad9389a84f..8f97fa9903bda1ce2c9b8b1e11ceb1bcbc9eca92 100644 (file)
@@ -1,5 +1,5 @@
 /* Binary relations.
 /* Binary relations.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -28,7 +28,8 @@
 void
 relation_print (relation r, size_t size, FILE *out)
 {
 void
 relation_print (relation r, size_t size, FILE *out)
 {
-  unsigned i, j;
+  unsigned int i;
+  unsigned int j;
 
   for (i = 0; i < size; ++i)
     {
 
   for (i = 0; i < size; ++i)
     {
@@ -94,7 +95,7 @@ traverse (int i)
 void
 relation_digraph (relation r, size_t size, bitsetv *function)
 {
 void
 relation_digraph (relation r, size_t size, bitsetv *function)
 {
-  unsigned i;
+  unsigned int i;
 
   infinity = size + 2;
   CALLOC (INDEX, size + 1);
 
   infinity = size + 2;
   CALLOC (INDEX, size + 1);
index f8ecc59dc18266af5336ce3fc83faeef14f97f27..f79174c2487f744863f746c21eabefc3130cd5e5 100644 (file)
@@ -1,5 +1,5 @@
 /* Binary relations.
 /* Binary relations.
-   Copyright (C) 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -27,7 +27,7 @@
    If GRAPH is a relation, then GRAPH[Node] is a list of adjacent
    nodes, ended with -1.  */
 
    If GRAPH is a relation, then GRAPH[Node] is a list of adjacent
    nodes, ended with -1.  */
 
-typedef short relation_node;
+typedef short int relation_node;
 typedef relation_node *relation_nodes;
 typedef relation_nodes *relation;
 
 typedef relation_node *relation_nodes;
 typedef relation_nodes *relation;
 
index b75912891375fb8e2d63d65011ac25797aa9eaa2..2c6c45a54c016401368cf14cf5187ecdfa2fb593 100644 (file)
@@ -1,7 +1,7 @@
 /* Type definitions for nondeterministic finite state machine for Bison.
 
 /* Type definitions for nondeterministic finite state machine for Bison.
 
-   Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003 Free Software
-   Foundation, Inc.
+   Copyright (C) 1984, 1989, 2000, 2001, 2002, 2003, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -94,7 +94,7 @@
 | Numbering states.  |
 `-------------------*/
 
 | Numbering states.  |
 `-------------------*/
 
-typedef short state_number;
+typedef short int state_number;
 # define STATE_NUMBER_MAXIMUM SHRT_MAX
 
 /* Be ready to map a state_number to an int.  */
 # define STATE_NUMBER_MAXIMUM SHRT_MAX
 
 /* Be ready to map a state_number to an int.  */
@@ -113,7 +113,7 @@ typedef struct state state;
 
 typedef struct
 {
 
 typedef struct
 {
-  short num;
+  short int num;
   state *states[1];
 } transitions;
 
   state *states[1];
 } transitions;
 
@@ -171,7 +171,7 @@ struct state *transitions_to (transitions *shifts, symbol_number sym);
 
 typedef struct
 {
 
 typedef struct
 {
-  short num;
+  short int num;
   symbol *symbols[1];
 } errs;
 
   symbol *symbols[1];
 } errs;
 
@@ -184,7 +184,7 @@ errs *errs_new (int num, symbol **tokens);
 
 typedef struct
 {
 
 typedef struct
 {
-  short num;
+  short int num;
   bitset *lookaheads;
   rule *rules[1];
 } reductions;
   bitset *lookaheads;
   rule *rules[1];
 } reductions;
@@ -212,7 +212,7 @@ struct state
 
   /* Its items.  Must be last, since ITEMS can be arbitrarily large.
      */
 
   /* Its items.  Must be last, since ITEMS can be arbitrarily large.
      */
-  unsigned short nitems;
+  unsigned short int nitems;
   item_number items[1];
 };
 
   item_number items[1];
 };
 
index 3cf2f588fdf21a3da63fa56cc56d245a9f604d6e..42c8ffb82a212619cfb08d52852ac16ac253dcdd 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions for symtab.c and callers, part of Bison.
 
 /* Definitions for symtab.c and callers, part of Bison.
 
-   Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002
+   Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002, 2004
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
@@ -41,7 +41,7 @@ typedef enum
 
 
 /* Internal token numbers. */
 
 
 /* Internal token numbers. */
-typedef short symbol_number;
+typedef short int symbol_number;
 #define SYMBOL_NUMBER_MAXIMUM SHRT_MAX
 
 
 #define SYMBOL_NUMBER_MAXIMUM SHRT_MAX
 
 
@@ -61,7 +61,7 @@ struct symbol
   location printer_location;
 
   symbol_number number;
   location printer_location;
 
   symbol_number number;
-  short prec;
+  short int prec;
   assoc assoc;
   int user_token_number;
 
   assoc assoc;
   int user_token_number;
 
index 2682472ba9af9bb64ff0a7cc71acb0e1d0dcf65b..af5a5cb57bdc9363408017b3f50e8750e61daf95 100644 (file)
@@ -1,6 +1,6 @@
 /* Output the generated parsing program for Bison.
 
 /* Output the generated parsing program for Bison.
 
-   Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003
+   Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
    Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
@@ -42,7 +42,7 @@
 
    Of course vector_number_t ought to be wide enough to contain
    state_number and symbol_number.  */
 
    Of course vector_number_t ought to be wide enough to contain
    state_number and symbol_number.  */
-typedef short vector_number;
+typedef short int vector_number;
 
 static inline vector_number
 state_number_to_vector_number (state_number s)
 
 static inline vector_number
 state_number_to_vector_number (state_number s)
@@ -84,7 +84,7 @@ int nvectors;
 static base_number **froms = NULL;
 static base_number **tos = NULL;
 static unsigned int **conflict_tos = NULL;
 static base_number **froms = NULL;
 static base_number **tos = NULL;
 static unsigned int **conflict_tos = NULL;
-static short *tally = NULL;
+static short int *tally = NULL;
 static base_number *width = NULL;
 
 
 static base_number *width = NULL;
 
 
@@ -94,7 +94,7 @@ static base_number *width = NULL;
    If N = MIN, stands for `raise a syntax error'.
    If N > 0, stands for `shift SYMBOL and go to n'.
    If N < 0, stands for `reduce -N'.  */
    If N = MIN, stands for `raise a syntax error'.
    If N > 0, stands for `shift SYMBOL and go to n'.
    If N < 0, stands for `reduce -N'.  */
-typedef short action_number;
+typedef short int action_number;
 #define ACTION_NUMBER_MINIMUM SHRT_MIN
 
 static action_number *actrow = NULL;
 #define ACTION_NUMBER_MINIMUM SHRT_MIN
 
 static action_number *actrow = NULL;
@@ -512,7 +512,7 @@ save_column (symbol_number sym, state_number default_state)
 `-------------------------------------------------------------*/
 
 static state_number
 `-------------------------------------------------------------*/
 
 static state_number
-default_goto (symbol_number sym, short state_count[])
+default_goto (symbol_number sym, short int state_count[])
 {
   state_number s;
   int i;
 {
   state_number s;
   int i;
@@ -554,7 +554,7 @@ static void
 goto_actions (void)
 {
   symbol_number i;
 goto_actions (void)
 {
   symbol_number i;
-  short *state_count = CALLOC (state_count, nstates);
+  short int *state_count = CALLOC (state_count, nstates);
   MALLOC (yydefgoto, nvars);
 
   /* For a given nterm I, STATE_COUNT[S] is the number of times there
   MALLOC (yydefgoto, nvars);
 
   /* For a given nterm I, STATE_COUNT[S] is the number of times there
index fcb1af048df3242b0b0653bdf64b68b7e7b03659..f1af48b9d4d0c98e9cdb09d88545703a7c321288 100644 (file)
@@ -1,6 +1,6 @@
 # Exercising Bison on actual grammars.                   -*- Autotest -*-
 
 # Exercising Bison on actual grammars.                   -*- Autotest -*-
 
-# Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003
+# Copyright (C) 1989, 1990, 1991, 1992, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -372,9 +372,9 @@ AT_SETUP([GNU Cim Grammar])
 
 AT_DATA([[input.y]],
 [[%union {
 
 AT_DATA([[input.y]],
 [[%union {
-       long token;
-       long ival;
-        long arrdim;
+       long int token;
+       long int ival;
+       long int arrdim;
        double rval;
        char *ident;
        char *tval;
        double rval;
        char *ident;
        char *tval;
index 51495b897318d1b0069875d5bdfabc13c68402f9..94422bd3e1b3f797e1b24426bce96e6cc59b73be 100644 (file)
@@ -1,5 +1,5 @@
 # Bison Regressions.                               -*- Autotest -*-
 # Bison Regressions.                               -*- Autotest -*-
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -535,7 +535,7 @@ AT_CLEANUP
 #
 # It used to be wrong on yydefact only:
 #
 #
 # It used to be wrong on yydefact only:
 #
-# static const short yydefact[] =
+# static const short int yydefact[] =
 #  {
 # -       2,     0,     1,     0,     0,     2,     3,     2,     5,     4,
 # +       2,     0,     1,     0,     0,     0,     3,     2,     5,     4,
 #  {
 # -       2,     0,     1,     0,     0,     2,     3,     2,     5,     4,
 # +       2,     0,     1,     0,     0,     0,     3,     2,     5,     4,
@@ -613,7 +613,7 @@ static const char *const yytname[] =
   "$end", "error", "$undefined", "\"if\"", "\"const\"", "\"then\"",
   "\"else\"", "$accept", "statement", "struct_stat", "if", "else", 0
 };
   "$end", "error", "$undefined", "\"if\"", "\"const\"", "\"then\"",
   "\"else\"", "$accept", "statement", "struct_stat", "if", "else", 0
 };
-static const unsigned short yytoknum[] =
+static const unsigned short int yytoknum[] =
 {
        0,   256,   257,   258,   259,   260,   261
 };
 {
        0,   256,   257,   258,   259,   260,   261
 };