* data/c.m4 (b4_error_verbose_if): New.

* data/lalr1.cc: Use it.
(YYERROR_VERBOSE_IF): Remove.
(yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
parser members, replaced by...
(yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
local variables.
(yysyntax_error_): Takes the state number as argument.
(yyreduce_print_): Use the argument yyrule, not the former
attribute yyn_.
This commit is contained in:
Akim Demaille
2005-09-29 06:50:57 +00:00
parent 8a6f72f3d7
commit d4fb5e3cb9
5 changed files with 96 additions and 88 deletions

View File

@@ -138,6 +138,15 @@ m4_define([b4_int_type_for],
## ------------------ ##
# b4_error_verbose_if(IF-TRUE, IF-FALSE)
# --------------------------------------
# Expand IF-TRUE, if errors are verbose, IF-FALSE otherwise.
m4_define([b4_error_verbose_if],
[m4_if(b4_error_verbose, [1],
[$1],
[$2])])
# b4_location_if(IF-TRUE, IF-FALSE)
# ---------------------------------
# Expand IF-TRUE, if locations are used, IF-FALSE otherwise.