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>
|
2001-11-27 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/system.h: Use intl/libgettext.h.
|
* 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. []
|
Update informations about ERROR_VERBOSE. []
|
||||||
Add explainations about skeleton muscles. []
|
Add explainations about skeleton muscles. []
|
||||||
Add explainations about %skeleton. []
|
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
|
# define YYLTYPE %%ltype
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef YYERROR_VERBOSE
|
|
||||||
# define YYERROR_VERBOSE %%verbose
|
|
||||||
#else
|
|
||||||
# undef YYERROR_VERBOSE
|
|
||||||
# define YYERROR_VERBOSE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Tokens. */
|
/* Tokens. */
|
||||||
%%tokendef
|
%%tokendef
|
||||||
|
|
||||||
@@ -197,7 +190,7 @@ static const short yyrline[] =
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if YYDEBUG || YYERROR_VERBOSE
|
#if %%error_verbose
|
||||||
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
|
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
|
||||||
static const char *const yytname[] =
|
static const char *const yytname[] =
|
||||||
{
|
{
|
||||||
@@ -826,7 +819,7 @@ yyerrlab:
|
|||||||
{
|
{
|
||||||
++yynerrs;
|
++yynerrs;
|
||||||
|
|
||||||
#if YYERROR_VERBOSE
|
#if %%error_verbose
|
||||||
yyn = yypact[yystate];
|
yyn = yypact[yystate];
|
||||||
|
|
||||||
if (yyn > YYFLAG && yyn < YYLAST)
|
if (yyn > YYFLAG && yyn < YYLAST)
|
||||||
@@ -869,7 +862,7 @@ yyerrlab:
|
|||||||
yyerror ("parse error; also virtual memory exhausted");
|
yyerror ("parse error; also virtual memory exhausted");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* YYERROR_VERBOSE */
|
#endif /* %%ERROR_VERBOSE */
|
||||||
yyerror ("parse error");
|
yyerror ("parse error");
|
||||||
}
|
}
|
||||||
goto yyerrlab1;
|
goto yyerrlab1;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ int no_lines_flag = 0;
|
|||||||
int no_parser_flag = 0;
|
int no_parser_flag = 0;
|
||||||
int token_table_flag = 0;
|
int token_table_flag = 0;
|
||||||
int verbose_flag = 0;
|
int verbose_flag = 0;
|
||||||
|
int error_verbose_flag = 0;
|
||||||
int yacc_flag = 0; /* for -y */
|
int yacc_flag = 0; /* for -y */
|
||||||
int graph_flag = 0;
|
int graph_flag = 0;
|
||||||
int trace_flag = 0;
|
int trace_flag = 0;
|
||||||
@@ -165,6 +166,10 @@ getargs (int argc, char *argv[])
|
|||||||
verbose_flag = 1;
|
verbose_flag = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'e':
|
||||||
|
error_verbose_flag = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'S':
|
case 'S':
|
||||||
skeleton = optarg;
|
skeleton = optarg;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ extern int no_lines_flag; /* for -l */
|
|||||||
extern int no_parser_flag; /* for -n */
|
extern int no_parser_flag; /* for -n */
|
||||||
extern int token_table_flag; /* for -k */
|
extern int token_table_flag; /* for -k */
|
||||||
extern int verbose_flag; /* for -v */
|
extern int verbose_flag; /* for -v */
|
||||||
|
extern int error_verbose_flag; /* for -e */
|
||||||
extern int graph_flag; /* for -g */
|
extern int graph_flag; /* for -g */
|
||||||
extern int yacc_flag; /* for -y */
|
extern int yacc_flag; /* for -y */
|
||||||
extern int trace_flag;
|
extern int trace_flag;
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ muscle_init (void)
|
|||||||
muscle_insert ("maxtok", "0");
|
muscle_insert ("maxtok", "0");
|
||||||
muscle_insert ("ntbase", "0");
|
muscle_insert ("ntbase", "0");
|
||||||
muscle_insert ("verbose", "0");
|
muscle_insert ("verbose", "0");
|
||||||
|
muscle_insert ("error_verbose", "0");
|
||||||
muscle_insert ("prefix", "yy");
|
muscle_insert ("prefix", "yy");
|
||||||
/* Default #line formatting. */
|
/* Default #line formatting. */
|
||||||
muscle_insert ("linef", "#line %d %s\n");
|
muscle_insert ("linef", "#line %d %s\n");
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
|
||||||
/* Shorts options. */
|
/* Shorts options. */
|
||||||
const char *shortopts = "yvgdhrltknVo:b:p:S:";
|
const char *shortopts = "yvegdhrltknVo:b:p:S:";
|
||||||
|
|
||||||
/* Long options. */
|
/* Long options. */
|
||||||
struct option *longopts = NULL;
|
struct option *longopts = NULL;
|
||||||
@@ -104,6 +104,7 @@ const struct option_table_struct option_table[] =
|
|||||||
/* Output. */
|
/* Output. */
|
||||||
{opt_both, "defines", optional_argument, &defines_flag, tok_intopt, 'd'},
|
{opt_both, "defines", optional_argument, &defines_flag, tok_intopt, 'd'},
|
||||||
{opt_both, "verbose", no_argument, &verbose_flag, tok_intopt, 'v'},
|
{opt_both, "verbose", no_argument, &verbose_flag, tok_intopt, 'v'},
|
||||||
|
{opt_both, "error-verbose", no_argument,&error_verbose_flag, tok_intopt, 'e'},
|
||||||
|
|
||||||
/* Operation modes. */
|
/* Operation modes. */
|
||||||
{opt_both, "fixed-output-files", no_argument, &yacc_flag, tok_intopt, 'y'},
|
{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 ("maxtok", max_user_token_number);
|
||||||
MUSCLE_INSERT_INT ("ntbase", ntokens);
|
MUSCLE_INSERT_INT ("ntbase", ntokens);
|
||||||
MUSCLE_INSERT_INT ("verbose", 0);
|
MUSCLE_INSERT_INT ("verbose", 0);
|
||||||
|
MUSCLE_INSERT_INT ("error_verbose", error_verbose_flag);
|
||||||
|
|
||||||
MUSCLE_INSERT_INT ("nnts", nvars);
|
MUSCLE_INSERT_INT ("nnts", nvars);
|
||||||
MUSCLE_INSERT_INT ("nrules", nrules);
|
MUSCLE_INSERT_INT ("nrules", nrules);
|
||||||
|
|||||||
Reference in New Issue
Block a user