# Bison Regressions. -*- Autotest -*-
-# Copyright 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002 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
+## ------------------- ##
+## Token definitions. ##
+## ------------------- ##
+
+
+AT_SETUP([Token definitions])
+
+# Bison managed, when fed with `%token 'f' "f"' to #define 'f'!
+AT_DATA([input.y],
+[%{
+void yyerror (const char *s);
+int yylex (void);
+%}
+[%token "end of file"
+%token 'a' "a"
+%token "b" 'b'
+%token "c" c
+%token d "d"
+%token e 'e'
+%token 'f' e
+%%
+exp: "a";
+]])
+
+AT_CHECK([bison input.y -o input.c])
+AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -c])
+AT_CLEANUP
+
+
+
## -------------- ##
## Web2c Report. ##
## -------------- ##
# Check only the tables. We don't use --no-parser, because it is
# still to be implemented in the experimental branch of Bison.
AT_CHECK([[sed -n 's/ *$//;/^static const.*\[\] =/,/^}/p' input.c]], 0,
-[[static const yy_token_number_type yytranslate[] =
+[[static const unsigned char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6
};
-static const short yyprhs[] =
+static const unsigned char yyprhs[] =
{
0, 0, 3, 5, 6, 9, 14
};
-static const yyrhs_t yyrhs[] =
+static const signed char yyrhs[] =
{
8, 0, -1, 9, -1, -1, 10, 11, -1, 3,
4, 5, 8, -1, 6, 8, -1
};
-static const short yyrline[] =
+static const unsigned char yyrline[] =
{
0, 2, 2, 3, 3, 4, 5
};
{
0, 256, 257, 258, 259, 260, 261, -1
};
-static const short yyr1[] =
+static const unsigned char yyr1[] =
{
0, 7, 8, 9, 9, 10, 11
};
-static const short yyr2[] =
+static const unsigned char yyr2[] =
{
0, 2, 1, 0, 2, 4, 2
};
{
7, 3, 9, 4, 0, -1, 6, 5
};
+static const unsigned char yystos[] =
+{
+ 0, 3, 8, 9, 10, 4, 0, 6, 11, 5,
+ 8, 8
+};
]])
AT_CLEANUP