variables: parse.error

Implement, document, and test the replacement of %error-verbose
by %define parse.error "verbose".

	* data/bison.m4 (b4_error_verbose_if): Reimplement to track the
	values of the parse.error variable.
	Make "simple" its default value.
	Check the valid values.
	* src/parse-gram.y: Use %define parse.error.
	(PERCENT_ERROR_VERBOSE): New token.
	Support it.
	* src/scan-gram.l: Support %error-verbose.

	* doc/bison.texinfo (Decl Summary): Replace the documentation of
	%define error-verbose by that of %define parse.error.
	* NEWS: Document it.

	* tests/actions.at, tests/calc.at: Use parse.error instead of
	%error-verbose.
This commit is contained in:
Akim Demaille
2009-06-18 10:00:36 +02:00
parent d70059ec73
commit 31b850d2d4
8 changed files with 119 additions and 62 deletions

View File

@@ -29,7 +29,7 @@ AT_SETUP([Mid-rule actions])
# action.
AT_DATA_GRAMMAR([[input.y]],
[[%define error-verbose
[[%define parse.error "verbose"
%debug
%{
# include <stdio.h>
@@ -93,7 +93,7 @@ AT_CLEANUP
AT_SETUP([Exotic Dollars])
AT_DATA_GRAMMAR([[input.y]],
[[%define error-verbose
[[%define parse.error "verbose"
%debug
%{
# include <stdio.h>
@@ -557,7 +557,7 @@ m4_define([AT_CHECK_PRINTER_AND_DESTRUCTOR],
$3
_AT_CHECK_PRINTER_AND_DESTRUCTOR($[1], $[2], $[3], $[4],
[%define error-verbose
[%define parse.error "verbose"
%debug
%verbose
%locations
@@ -588,7 +588,7 @@ AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser], [with union])
AT_SETUP([Default tagless %printer and %destructor])
AT_DATA_GRAMMAR([[input.y]],
[[%define error-verbose
[[%define parse.error "verbose"
%debug
%locations
%initial-action {
@@ -706,7 +706,7 @@ AT_CLEANUP
AT_SETUP([Default tagged and per-type %printer and %destructor])
AT_DATA_GRAMMAR([[input.y]],
[[%define error-verbose
[[%define parse.error "verbose"
%debug
%{
@@ -850,7 +850,7 @@ m4_define([_AT_CHECK_DEFAULT_PRINTER_AND_DESTRUCTOR_FOR_END_TOKEN],
[m4_pushdef([kind], [*]) m4_pushdef([not_kind], [])])
AT_DATA_GRAMMAR([[input]]$1[[.y]],
[[%define error-verbose
[[%define parse.error "verbose"
%debug
%locations
%initial-action {