# Torturing Bison. -*- Autotest -*-
-# Copyright (C) 2001-2002, 2004-2007, 2009-2012 Free Software
+# Copyright (C) 2001-2002, 2004-2007, 2009-2013 Free Software
# Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
{
use Text::Wrap;
print wrap ("| ", " ",
- (map { "\"$_\"" } (1 .. $size)),
- " END \n"),
- " { \$\$ = $size; }\n";
+ (map { "\"$_\"" } (1 .. $size)),
+ " END \n"),
+ " { \$\$ = $size; }\n";
};
print ";\n";
}
return inner++;
}
-int
-main (void)
-{
- yydebug = !!getenv ("YYDEBUG");
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
EOF
]])
AT_BISON_OPTION_POPDEFS
-AT_CHECK([perl -w ./gengram.pl $2 || exit 77], 0, [stdout])
+AT_CHECK([$PERL -w ./gengram.pl $2 || exit 77], 0, [stdout])
mv stdout $1
])
use Text::Wrap;
print
wrap ("exp: ", " ",
- (map { "\"$_\"" } (1 .. $max)), ";"),
+ (map { "\"$_\"" } (1 .. $max)), ";"),
"\n";
print <<\EOF;
assert (counter++ == MAX + 1);
return 0;
}
-
-int
-main (void)
-{
- yydebug = !!getenv ("YYDEBUG");
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
EOF
]])
-AT_CHECK([perl -w ./gengram.pl $2 || exit 77], 0, [stdout])
+AT_CHECK([$PERL -w ./gengram.pl $2 || exit 77], 0, [stdout])
mv stdout $1
AT_BISON_OPTION_POPDEFS
])
%error-verbose
%debug
%{
+]AT_DATA_SOURCE_PROLOGUE[
# include <stdio.h>
# include <stdlib.h>
# include <assert.h>
print
wrap ("%type <val> ",
- " ",
- map { "n$_" } (1 .. $max)),
+ " ",
+ map { "n$_" } (1 .. $max)),
"\n";
print "%token\n";
return counter++;
}
-int
-main (void)
-{
- yydebug = !!getenv ("YYDEBUG");
- return yyparse ();
-}
+]AT_MAIN_DEFINE[
EOF
]])
-AT_CHECK([perl -w ./gengram.pl $2 || exit 77], 0, [stdout])
+AT_CHECK([$PERL -w ./gengram.pl $2 || exit 77], 0, [stdout])
mv stdout $1
AT_BISON_OPTION_POPDEFS
])
[AT_BISON_OPTION_PUSHDEFS([$2])
# A grammar of parens growing the stack thanks to right recursion.
# exp:
-AT_DATA([input.y],
+AT_DATA_GRAMMAR([input.y],
[[%{
#include <errno.h>
#include <limits.h>
main (int argc, const char **argv)
{
YYSTYPE yylval_init = get_args (argc, argv);
- int status;
+ int status = 0;
int count;
]m4_bmatch([$2], [api.push-pull both],
[[ yypstate *ps = yypstate_new ();