X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6e649e659ebc2d8b54fa4636986370b76c2ff988..e743727fcd27ba00c0ae808058ea18d457171da5:/tests/cxx-type.at?ds=inline diff --git a/tests/cxx-type.at b/tests/cxx-type.at index 5ad9cf49..9583b8fd 100644 --- a/tests/cxx-type.at +++ b/tests/cxx-type.at @@ -1,5 +1,5 @@ # Checking GLR Parsing. -*- Autotest -*- -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003 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 @@ -72,7 +72,7 @@ stmt : expr ';' $2 | '@' { YYACCEPT; } ; -expr : ID { printf ("%s ", $$); } +expr : ID { printf ("%s ", ]$[1); } | TYPENAME '(' expr ')' { printf ("%s ", ]$[1); } | expr '+' expr { printf ("+ "); } @@ -91,7 +91,6 @@ declarator : ID { printf ("\"%s\" ", ]$[1); } %% -#include #include #include #include @@ -99,7 +98,8 @@ declarator : ID { printf ("\"%s\" ", ]$[1); } int main (int argc, char** argv) { - assert (argc == 2); + if (argc != 2) + abort (); if (!freopen (argv[1], "r", stdin)) abort (); exit (yyparse ());