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-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.
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. []
\ No newline at end of file
# define YYLTYPE %%ltype
#endif
-#ifndef YYERROR_VERBOSE
-# define YYERROR_VERBOSE %%verbose
-#else
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#endif
-
/* Tokens. */
%%tokendef
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
+#if %%error_verbose
/* YYTNME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
{
++yynerrs;
-#if YYERROR_VERBOSE
+#if %%error_verbose
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
yyerror ("parse error; also virtual memory exhausted");
}
else
-#endif /* YYERROR_VERBOSE */
+#endif /* %%ERROR_VERBOSE */
yyerror ("parse error");
}
goto yyerrlab1;
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;
verbose_flag = 1;
break;
+ case 'e':
+ error_verbose_flag = 1;
+ break;
+
case 'S':
skeleton = optarg;
break;
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;
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");
#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;
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'},
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);