+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.
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
[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_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. */
#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[] =
/* 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.
-[static const short yyconfl[] =
+[static const short int yyconfl[] =
{
]b4_conflicting_rules[
};
typedef int yyRuleNum;
/** Grammar symbol */
-typedef short yySymbol;
+typedef short int yySymbol;
/** Item references, as in LALR(1) machine */
-typedef short yyItemNum;
+typedef short int yyItemNum;
typedef struct yyGLRState yyGLRState;
typedef struct yySemanticOption yySemanticOption;
*/
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)
]b4_user_formals[)
{
int yyaction;
- const short* yyconflicts;
+ const short int* yyconflicts;
yyRuleNum yyrule;
yySymbol* const yytokenp = yystack->yytokenp;
{
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));
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
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,
- (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",
- (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,
- (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, "%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");
}
]
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)
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
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
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. */
])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@])[
{
]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_;
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
-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
{
}
- Stack (unsigned n) : seq_ (n)
+ Stack (unsigned int n) : seq_ (n)
{
}
inline
T&
- operator [] (unsigned i)
+ operator [] (unsigned int i)
{
return seq_[i];
}
inline
const T&
- operator [] (unsigned i) const
+ operator [] (unsigned int i) const
{
return seq_[i];
}
inline
void
- pop (unsigned n = 1)
+ pop (unsigned int n = 1)
{
for (; n; --n)
seq_.pop_front ();
}
inline
- unsigned
+ unsigned int
height () const
{
return seq_.size ();
public:
Slice (const S& stack,
- unsigned range) : stack_ (stack),
- range_ (range)
+ unsigned int range) : stack_ (stack),
+ range_ (range)
{
}
inline
const T&
- operator [] (unsigned i) const
+ operator [] (unsigned int i) const
{
return stack_[range_ - i];
}
private:
const S& stack_;
- unsigned range_;
+ unsigned int range_;
};
}
#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
}
#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
}
/** \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);
}
/** \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;
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
[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_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.
/* 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
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) \
- ((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
#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. */
`------------------------------------------------------------------*/
]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)
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];
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
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ short int *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
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.
%@}
%union @{
- long n;
+ long int n;
tree t; /* @r{@code{tree} is defined in @file{ptypes.h}.} */
@}
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
/* 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
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
/* 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
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)
/* 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
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);
}
/* 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.
/* 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);
/* 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.
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]);
}
for (i = 0; bsetv[i]; i++)
{
- fprintf (stderr, "%lu: ", (unsigned long) i);
+ fprintf (stderr, "%lu: ", (unsigned long int) i);
debug_bitset (bsetv[i]);
}
/* 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
/* 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
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);
/* 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
/* 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. */
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);
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;
/* 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.
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)
/* 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.
}
/* Rule numbers. */
-typedef short rule_number;
+typedef short int rule_number;
extern rule_number nrules;
static inline item_number
/* 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;
/* 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.
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;
/* 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.
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);
/* 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.
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)
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)
{
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);
/* 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.
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)
{
void
relation_digraph (relation r, size_t size, bitsetv *function)
{
- unsigned i;
+ unsigned int i;
infinity = size + 2;
CALLOC (INDEX, size + 1);
/* 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.
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;
/* 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.
| 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. */
typedef struct
{
- short num;
+ short int num;
state *states[1];
} transitions;
typedef struct
{
- short num;
+ short int num;
symbol *symbols[1];
} errs;
typedef struct
{
- short num;
+ short int num;
bitset *lookaheads;
rule *rules[1];
} reductions;
/* Its items. Must be last, since ITEMS can be arbitrarily large.
*/
- unsigned short nitems;
+ unsigned short int nitems;
item_number items[1];
};
/* 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.
/* Internal token numbers. */
-typedef short symbol_number;
+typedef short int symbol_number;
#define SYMBOL_NUMBER_MAXIMUM SHRT_MAX
location printer_location;
symbol_number number;
- short prec;
+ short int prec;
assoc assoc;
int user_token_number;
/* 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.
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 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;
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;
`-------------------------------------------------------------*/
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;
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
# 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
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;
# 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
#
# 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,
"$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
};