From: Paul Eggert Date: Thu, 21 Nov 2002 05:20:49 +0000 (+0000) Subject: (packgram, reader): Use abort rather than assert. X-Git-Tag: BISON-1_875~222 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/35dcf428c9b2dea2c76bb9d17e2806c9c6bb57c9?ds=sidebyside (packgram, reader): Use abort rather than assert. --- diff --git a/src/reader.c b/src/reader.c index 5c65d020..5ed02b2e 100644 --- a/src/reader.c +++ b/src/reader.c @@ -1,4 +1,4 @@ -/* Input parser for bison +/* Input parser for Bison Copyright (C) 1984, 1986, 1989, 1992, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -452,7 +452,8 @@ packgram (void) p = p->next; } - assert (itemno == nritems); + if (itemno != nritems) + abort (); if (trace_flag & trace_sets) ritem_print (stderr); @@ -539,8 +540,8 @@ reader (void) grammar = p; } - assert (nsyms <= SYMBOL_NUMBER_MAX); - assert (nsyms == ntokens + nvars); + if (! (nsyms <= SYMBOL_NUMBER_MAX && nsyms == ntokens + nvars)) + abort (); xfclose (finput);