mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 04:43:03 +00:00
* src/bison.simple: Remove YYERROR_VERBOSE using.
Use %%error_verbose. (yyparse): Likewise. * src/output.c (prepare): Give its final value. * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'. * src/getargs.h: Add its extern declaration. * src/getargs.c (error_verbose_flag): New int. (getargs): Update to catch new case. * src/options.c (option_table): 'error-verbose' is a new option. (shortopts): Update.
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
||||
2001-11-26 Marc Autret <autret_m@epita.fr>
|
||||
|
||||
* src/bison.simple: Remove YYERROR_VERBOSE using.
|
||||
Use %%error_verbose.
|
||||
(yyparse): Likewise.
|
||||
* src/output.c (prepare): Give its final value.
|
||||
* src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
|
||||
* src/getargs.h: Add its extern declaration.
|
||||
* src/getargs.c (error_verbose_flag): New int.
|
||||
(getargs): Update to catch new case.
|
||||
* src/options.c (option_table): 'error-verbose' is a new option.
|
||||
(shortopts): Update.
|
||||
|
||||
2001-11-27 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* src/system.h: Use intl/libgettext.h.
|
||||
|
||||
8
TODO
8
TODO
@@ -22,3 +22,11 @@ Find the best graph parameters. []
|
||||
Update informations about ERROR_VERBOSE. []
|
||||
Add explainations about skeleton muscles. []
|
||||
Add explainations about %skeleton. []
|
||||
|
||||
* testsuite.
|
||||
** tests/calc.at
|
||||
Remove --yyerror-verbose. []
|
||||
** tests/torture.at
|
||||
Remove --yyerror-verbose. []
|
||||
** tests/calc.at
|
||||
Test --error-verbose. []
|
||||
@@ -149,13 +149,6 @@ typedef struct yyltype
|
||||
# define YYLTYPE %%ltype
|
||||
#endif
|
||||
|
||||
#ifndef YYERROR_VERBOSE
|
||||
# define YYERROR_VERBOSE %%verbose
|
||||
#else
|
||||
# undef YYERROR_VERBOSE
|
||||
# define YYERROR_VERBOSE 1
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
%%tokendef
|
||||
|
||||
@@ -197,7 +190,7 @@ static const short yyrline[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE
|
||||
#if %%error_verbose
|
||||
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
|
||||
static const char *const yytname[] =
|
||||
{
|
||||
@@ -826,7 +819,7 @@ yyerrlab:
|
||||
{
|
||||
++yynerrs;
|
||||
|
||||
#if YYERROR_VERBOSE
|
||||
#if %%error_verbose
|
||||
yyn = yypact[yystate];
|
||||
|
||||
if (yyn > YYFLAG && yyn < YYLAST)
|
||||
@@ -869,7 +862,7 @@ yyerrlab:
|
||||
yyerror ("parse error; also virtual memory exhausted");
|
||||
}
|
||||
else
|
||||
#endif /* YYERROR_VERBOSE */
|
||||
#endif /* %%ERROR_VERBOSE */
|
||||
yyerror ("parse error");
|
||||
}
|
||||
goto yyerrlab1;
|
||||
|
||||
@@ -34,6 +34,7 @@ int no_lines_flag = 0;
|
||||
int no_parser_flag = 0;
|
||||
int token_table_flag = 0;
|
||||
int verbose_flag = 0;
|
||||
int error_verbose_flag = 0;
|
||||
int yacc_flag = 0; /* for -y */
|
||||
int graph_flag = 0;
|
||||
int trace_flag = 0;
|
||||
@@ -165,6 +166,10 @@ getargs (int argc, char *argv[])
|
||||
verbose_flag = 1;
|
||||
break;
|
||||
|
||||
case 'e':
|
||||
error_verbose_flag = 1;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
skeleton = optarg;
|
||||
break;
|
||||
|
||||
@@ -34,6 +34,7 @@ extern int no_lines_flag; /* for -l */
|
||||
extern int no_parser_flag; /* for -n */
|
||||
extern int token_table_flag; /* for -k */
|
||||
extern int verbose_flag; /* for -v */
|
||||
extern int error_verbose_flag; /* for -e */
|
||||
extern int graph_flag; /* for -g */
|
||||
extern int yacc_flag; /* for -y */
|
||||
extern int trace_flag;
|
||||
|
||||
@@ -87,6 +87,7 @@ muscle_init (void)
|
||||
muscle_insert ("maxtok", "0");
|
||||
muscle_insert ("ntbase", "0");
|
||||
muscle_insert ("verbose", "0");
|
||||
muscle_insert ("error_verbose", "0");
|
||||
muscle_insert ("prefix", "yy");
|
||||
/* Default #line formatting. */
|
||||
muscle_insert ("linef", "#line %d %s\n");
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "options.h"
|
||||
|
||||
/* Shorts options. */
|
||||
const char *shortopts = "yvgdhrltknVo:b:p:S:";
|
||||
const char *shortopts = "yvegdhrltknVo:b:p:S:";
|
||||
|
||||
/* Long options. */
|
||||
struct option *longopts = NULL;
|
||||
@@ -102,8 +102,9 @@ const struct option_table_struct option_table[] =
|
||||
the same, the char `-'. */
|
||||
|
||||
/* Output. */
|
||||
{opt_both, "defines", optional_argument, &defines_flag, tok_intopt, 'd'},
|
||||
{opt_both, "verbose", no_argument, &verbose_flag, tok_intopt, 'v'},
|
||||
{opt_both, "defines", optional_argument, &defines_flag, tok_intopt, 'd'},
|
||||
{opt_both, "verbose", no_argument, &verbose_flag, tok_intopt, 'v'},
|
||||
{opt_both, "error-verbose", no_argument,&error_verbose_flag, tok_intopt, 'e'},
|
||||
|
||||
/* Operation modes. */
|
||||
{opt_both, "fixed-output-files", no_argument, &yacc_flag, tok_intopt, 'y'},
|
||||
|
||||
@@ -1053,6 +1053,7 @@ prepare (void)
|
||||
MUSCLE_INSERT_INT ("maxtok", max_user_token_number);
|
||||
MUSCLE_INSERT_INT ("ntbase", ntokens);
|
||||
MUSCLE_INSERT_INT ("verbose", 0);
|
||||
MUSCLE_INSERT_INT ("error_verbose", error_verbose_flag);
|
||||
|
||||
MUSCLE_INSERT_INT ("nnts", nvars);
|
||||
MUSCLE_INSERT_INT ("nrules", nrules);
|
||||
|
||||
Reference in New Issue
Block a user