* data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the

user can override the types.
(short): #undef, to work around a bug in Pike 7.0.
(yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
(union yyalloc.yyss): Use yytype_int16 rather than short.
All uses changed.
(yysigned_char): Remove.
* src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
(YYTYPE_INT16): New macros, to test the new facility in yacc.c.
* tests/regression.at (Web2c Actions): Adjust to above changes.
This commit is contained in:
Paul Eggert
2006-01-23 07:59:42 +00:00
parent 02d12d0de2
commit d42cf84421
3 changed files with 78 additions and 38 deletions

View File

@@ -1,5 +1,7 @@
# Bison Regressions. -*- Autotest -*-
# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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
@@ -581,7 +583,7 @@ AT_CLEANUP
#
# It used to be wrong on yydefact only:
#
# static const short int yydefact[] =
# static const yytype_uint8 yydefact[] =
# {
# - 2, 0, 1, 0, 0, 2, 3, 2, 5, 4,
# + 2, 0, 1, 0, 0, 0, 3, 2, 5, 4,
@@ -611,7 +613,7 @@ AT_CHECK([bison -v -o input.c input.y])
[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' input.c >tables.c]
AT_CHECK([[cat tables.c]], 0,
[[static const unsigned char yytranslate[] =
[[static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -641,16 +643,16 @@ AT_CHECK([[cat tables.c]], 0,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6
};
static const unsigned char yyprhs[] =
static const yytype_uint8 yyprhs[] =
{
0, 0, 3, 5, 6, 9, 14
};
static const yysigned_char yyrhs[] =
static const yytype_int8 yyrhs[] =
{
8, 0, -1, 9, -1, -1, 10, 11, -1, 3,
4, 5, 8, -1, 6, 8, -1
};
static const unsigned char yyrline[] =
static const yytype_uint8 yyrline[] =
{
0, 2, 2, 3, 3, 4, 5
};
@@ -659,45 +661,45 @@ static const char *const yytname[] =
"$end", "error", "$undefined", "\"if\"", "\"const\"", "\"then\"",
"\"else\"", "$accept", "statement", "struct_stat", "if", "else", 0
};
static const unsigned short int yytoknum[] =
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261
};
static const unsigned char yyr1[] =
static const yytype_uint8 yyr1[] =
{
0, 7, 8, 9, 9, 10, 11
};
static const unsigned char yyr2[] =
static const yytype_uint8 yyr2[] =
{
0, 2, 1, 0, 2, 4, 2
};
static const unsigned char yydefact[] =
static const yytype_uint8 yydefact[] =
{
3, 0, 0, 2, 0, 0, 1, 3, 4, 3,
6, 5
};
static const yysigned_char yydefgoto[] =
static const yytype_int8 yydefgoto[] =
{
-1, 2, 3, 4, 8
};
static const yysigned_char yypact[] =
static const yytype_int8 yypact[] =
{
-2, -1, 4, -8, 0, 2, -8, -2, -8, -2,
-8, -8
};
static const yysigned_char yypgoto[] =
static const yytype_int8 yypgoto[] =
{
-8, -7, -8, -8, -8
};
static const unsigned char yytable[] =
static const yytype_uint8 yytable[] =
{
10, 1, 11, 5, 6, 0, 7, 9
};
static const yysigned_char yycheck[] =
static const yytype_int8 yycheck[] =
{
7, 3, 9, 4, 0, -1, 6, 5
};
static const unsigned char yystos[] =
static const yytype_uint8 yystos[] =
{
0, 3, 8, 9, 10, 4, 0, 6, 11, 5,
8, 8