mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
Clean the error reporting functions.
* src/report.c: New file. * src/report.h: Likewise. * src/Makefile.am: Adjust. * m4/error.m4: New file. * m4/Makefile.am: Adjust. * configure.in (jm_PREREQ_ERROR): Call it. * src/main.c (int_to_string, banner, fatal_banner, warn_banner): Remove. (fatal, fatals): Remove. All callers use complain.c::fatal. (warn, warni, warns, warnss, warnss): Remove. All callers use complain.c::complain. (toomany): Remove, use fatal instead. * src/files.c (done): No argument, use complain_message_count. * src/main.c (main): Register `done' to `atexit'. * src/getargs.c (usage): More `fputs', less `fprintf'.
This commit is contained in:
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "gram.h"
|
||||
#include "machine.h"
|
||||
#include "alloc.h"
|
||||
#include "complain.h"
|
||||
|
||||
|
||||
extern char **tags; /* reader.c */
|
||||
@@ -74,7 +75,6 @@ static void print_results PARAMS((void));
|
||||
static void print_notices PARAMS((void));
|
||||
void dump_grammar PARAMS((void));
|
||||
|
||||
extern void fatals PARAMS((char *, char *));
|
||||
|
||||
|
||||
bool
|
||||
@@ -138,7 +138,7 @@ reduce_grammar (void)
|
||||
print_notices();
|
||||
|
||||
if (!BITISSET(N, start_symbol - ntokens))
|
||||
fatals(_("Start symbol %s does not derive any sentence"),
|
||||
fatal (_("Start symbol %s does not derive any sentence"),
|
||||
tags[start_symbol]);
|
||||
|
||||
reduce_grammar_tables();
|
||||
|
||||
Reference in New Issue
Block a user