mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
Fix test failure reported by Tom Lane in
<http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html> and try to make such failures easier to catch in the future. * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg; that's now the caller's responsibility. (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Set yychar = YYEOF if it's negative. * tests/actions.at (yylex): Abort if asked to read past EOF. * tests/conflicts.at (yylex): Likewise. * tests/cxx-type.at (yylex): Likewise. * tests/glr-regression.at (yylex): Likewise. * tests/input.at (yylex): Likewise. * tests/regression.at (yylex): Likewise. * tests/torture.at (yylex): Likewise.
This commit is contained in:
@@ -459,11 +459,14 @@ value_as_yystype (value val)
|
||||
static int
|
||||
yylex (void)
|
||||
{
|
||||
static const char *input = "@<:@\1\2$@{@oline@__@&t@oline__\
|
||||
static char const input[] = "@<:@\1\2$@{@oline@__@&t@oline__\
|
||||
#output "; /* "
|
||||
*/
|
||||
yylval = value_as_yystype (*input);
|
||||
return *input++;
|
||||
static size_t toknum;
|
||||
if (! (toknum < sizeof input))
|
||||
abort ();
|
||||
yylval = value_as_yystype (input[toknum]);
|
||||
return input[toknum++];
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user