X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/573a6cd3568911ec7a698daea60fa24f36088cd2..a932883e412c052a3b3542be333c3057ed1c0868:/src/output.c diff --git a/src/output.c b/src/output.c index 502e30b6..da0d7852 100644 --- a/src/output.c +++ b/src/output.c @@ -1,4 +1,4 @@ -/* Output the generated parsing program for bison, +/* Output the generated parsing program for Bison. Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -235,7 +235,8 @@ prepare_rules (void) /* Merger-function index (GLR). */ merger[r] = rules[r].merger; } - assert (i == nritems); + if (i != nritems) + abort (); muscle_insert_item_number_table ("rhs", rhs, ritem[0], 1, nritems); muscle_insert_unsigned_int_table ("prhs", prhs, 0, 0, nrules); @@ -345,7 +346,8 @@ token_definitions_output (FILE *out) /* At this stage, if there are literal aliases, they are part of SYMBOLS, so we should not find symbols which are the aliases here. */ - assert (number != USER_NUMBER_ALIAS); + if (number == USER_NUMBER_ALIAS) + abort (); /* Skip error token. */ if (symbol == errtoken) @@ -526,10 +528,7 @@ output_skeleton (void) strcpy (full_path, pkgdatadir); full_path[pkgdatadirlen] = '/'; strcpy (full_path + pkgdatadirlen + 1, m4sugar); - in = fopen (full_path, "r"); - if (! in) - error (EXIT_FAILURE, errno, "%s", full_path); - xfclose (in); + xfclose (xfopen (full_path, "r")); strcpy (full_path + pkgdatadirlen + 1, skeleton); /* Create an m4 subprocess connected to us via two pipes. */