X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6d55954743c7243ba46680f368c76ee70b1112f8..5407fc7d76bc0c1d15b0e281ba12ea20c77751e7:/tests/cxx-type.at diff --git a/tests/cxx-type.at b/tests/cxx-type.at index e6fd8a85..2c37c176 100644 --- a/tests/cxx-type.at +++ b/tests/cxx-type.at @@ -1,6 +1,6 @@ # Checking GLR Parsing. -*- Autotest -*- -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 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 @@ -122,12 +122,12 @@ declarator : ID #include #include #include +#include int main (int argc, char **argv) { - if (argc != 2) - abort (); + assert (argc == 2); if (!freopen (argv[1], "r", stdin)) return 3; return yyparse (); @@ -135,8 +135,7 @@ main (int argc, char **argv) ]AT_YYERROR_DEFINE[ -int -yylex (]AT_LEX_FORMALS[) +]AT_YYLEX_PROTOTYPE[ { char buffer[256]; int c; @@ -153,8 +152,7 @@ yylex (]AT_LEX_FORMALS[) while (1) { - if (feof (stdin)) - abort (); + assert (!feof (stdin)); c = getchar (); switch (c) { @@ -183,8 +181,7 @@ yylex (]AT_LEX_FORMALS[) { buffer[i++] = c; colNum += 1; - if (i == sizeof buffer - 1) - abort (); + assert (i != sizeof buffer - 1); c = getchar (); } while (isalnum (c) || c == '_'); @@ -379,7 +376,7 @@ m4_define([_AT_GLR_STDERR], ]]) m4_define([_AT_GLR_STDERR_WITH_LOC], -[[17.5-4: syntax error +[[17.5: syntax error ]]) m4_define([_AT_VERBOSE_GLR_STDERR], @@ -387,7 +384,7 @@ m4_define([_AT_VERBOSE_GLR_STDERR], ]]) m4_define([_AT_VERBOSE_GLR_STDERR_WITH_LOC], -[[17.5-4: syntax error, unexpected ID, expecting '=' or '+' or ')' +[[17.5: syntax error, unexpected ID, expecting '=' or '+' or ')' ]]) ## ---------------------------------------------------- ##