mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
tests: migrate from %error-verbose to %define parse.error verbose
* tests/actions.at, tests/c++.at, tests/conflicts.at, * tests/cxx-type.at, tests/existing.at, tests/glr-regression.at, * tests/headers.at, tests/input.at, tests/java.at, tests/javapush.at, * tests/local.at, tests/regression.at, tests/skeletons.at, * tests/torture.at: Here.
This commit is contained in:
@@ -1792,7 +1792,7 @@ AT_BISON_OPTION_PUSHDEFS([%pure-parser %debug])
|
||||
|
||||
AT_DATA_GRAMMAR([input.y],
|
||||
[[
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%debug
|
||||
%pure-parser
|
||||
%code {
|
||||
|
||||
@@ -564,7 +564,7 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
%define parse.assert
|
||||
%define api.value.type variant
|
||||
%define api.token.constructor
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
|
||||
%code
|
||||
{
|
||||
@@ -1011,7 +1011,7 @@ AT_BISON_OPTION_PUSHDEFS([%skeleton "lalr1.cc" $1])
|
||||
AT_DATA_GRAMMAR([[input.yy]],
|
||||
[[%skeleton "lalr1.cc"
|
||||
%debug
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
$1
|
||||
%code requires
|
||||
{
|
||||
|
||||
@@ -694,7 +694,7 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
]AT_YYLEX_DECLARE[
|
||||
}
|
||||
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%nonassoc 'a'
|
||||
|
||||
%%
|
||||
|
||||
@@ -445,7 +445,7 @@ AT_PARSER_CHECK([[./types test-input]], 0,
|
||||
AT_CLEANUP
|
||||
|
||||
AT_SETUP([GLR: Verbose messages, resolve ambiguity, impure, no locations])
|
||||
_AT_TEST_GLR_CXXTYPES([%error-verbose],
|
||||
_AT_TEST_GLR_CXXTYPES([%define parse.error verbose],
|
||||
[%merge <stmtMerge>], [%merge <stmtMerge>])
|
||||
AT_PARSER_CHECK([[./types test-input]], 0,
|
||||
[_AT_AMBIG_GLR_OUTPUT], [_AT_VERBOSE_GLR_STDERR])
|
||||
|
||||
@@ -77,7 +77,7 @@ m4_popdef([AT_LALR1_DIFF_CHECK])
|
||||
# computation of nullable. It reported 485 SR conflicts!
|
||||
|
||||
AT_TEST_EXISTING_GRAMMAR([[GNU AWK 3.1.0 Grammar]],
|
||||
[[%error-verbose
|
||||
[[%define parse.error verbose
|
||||
|
||||
%token FUNC_CALL NAME REGEXP
|
||||
%token ERROR
|
||||
@@ -1459,7 +1459,7 @@ State 427 conflicts: 9 shift/reduce, 2 reduce/reduce
|
||||
# Bison once reported shift/reduce conflicts that it shouldn't have.
|
||||
|
||||
AT_TEST_EXISTING_GRAMMAR([[GNU pic (Groff 1.18.1) Grammar]],
|
||||
[[%error-verbose
|
||||
[[%define parse.error verbose
|
||||
|
||||
%token LABEL
|
||||
%token VARIABLE
|
||||
|
||||
@@ -1540,7 +1540,7 @@ AT_DATA_GRAMMAR([glr-regr17.y],
|
||||
%glr-parser
|
||||
%locations
|
||||
%define api.pure
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
|
||||
%union { int dummy; }
|
||||
|
||||
@@ -1760,7 +1760,7 @@ AT_SETUP([Predicates])
|
||||
|
||||
AT_DATA_GRAMMAR([input.y],
|
||||
[[%glr-parser
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%expect-rr 1
|
||||
%code requires
|
||||
{
|
||||
|
||||
@@ -122,7 +122,7 @@ m4_pushdef([AT_TEST],
|
||||
AT_BISON_OPTION_PUSHDEFS([$1])
|
||||
AT_DATA_GRAMMAR([input.y],
|
||||
[[$1
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
]AT_VARIANT_IF([], [%union {int integer;}])[
|
||||
%code {
|
||||
]AT_PUSH_IF([[
|
||||
@@ -204,7 +204,7 @@ m4_pushdef([AT_TEST],
|
||||
AT_DATA_GRAMMAR([$1.y],
|
||||
[[%define api.prefix {$1_}
|
||||
$2
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%union
|
||||
{
|
||||
int integer;
|
||||
|
||||
@@ -2258,7 +2258,7 @@ AT_KEYWORDS([[deprec]])
|
||||
AT_DATA_GRAMMAR([[input.y]],
|
||||
[[
|
||||
%default-prec
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%expect-rr 42
|
||||
%file-prefix "foo"
|
||||
%file-prefix
|
||||
|
||||
@@ -241,7 +241,7 @@ AT_YYERROR_SEES_LOC_IF([],
|
||||
[[sed 's/^[-0-9.]*: //' expout >at-expout
|
||||
mv at-expout expout]])
|
||||
# 3. If error-verbose is not used, strip the', unexpected....' part.
|
||||
m4_bmatch([$1], [%error-verbose], [],
|
||||
m4_bmatch([$1], [%define parse.error verbose], [],
|
||||
[[sed 's/syntax error, .*$/syntax error/' expout >at-expout
|
||||
mv at-expout expout]])
|
||||
# 4. Check
|
||||
@@ -344,12 +344,12 @@ AT_CLEANUP
|
||||
# --------------------------------------
|
||||
# Start a testing chunk which compiles 'calc' grammar with
|
||||
# BISON-DIRECTIVES, and performs several tests over the parser.
|
||||
# Run the test with and without %error-verbose.
|
||||
# Run the test with and without %define parse.error verbose.
|
||||
m4_define([AT_CHECK_JAVA_CALC],
|
||||
[_AT_CHECK_JAVA_CALC([$1], [$2])
|
||||
_AT_CHECK_JAVA_CALC([%error-verbose $1], [$2])
|
||||
_AT_CHECK_JAVA_CALC([%define parse.error verbose $1], [$2])
|
||||
_AT_CHECK_JAVA_CALC([%locations $1], [$2])
|
||||
_AT_CHECK_JAVA_CALC([%error-verbose %locations $1], [$2])
|
||||
_AT_CHECK_JAVA_CALC([%define parse.error verbose %locations $1], [$2])
|
||||
])# AT_CHECK_JAVA_CALC
|
||||
|
||||
|
||||
@@ -392,7 +392,7 @@ AT_DATA([[YYParser.y]], [
|
||||
%language "Java"
|
||||
%locations
|
||||
%debug
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%token-table
|
||||
%token END "end"
|
||||
$1
|
||||
|
||||
@@ -45,7 +45,7 @@ AT_BANNER([[Java Push Parsing Tests]])
|
||||
# are instantiated with different main() procedures.
|
||||
m4_define([AT_TRIVIAL_GRAMMAR],[
|
||||
%define parser_class_name {YYParser}
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
|
||||
%code imports {
|
||||
import java.io.*;
|
||||
|
||||
@@ -1054,11 +1054,11 @@ m4_define([AT_JAVA_PARSER_CHECK],
|
||||
# # ---------------------------------------------------------------------
|
||||
# m4_define([AT_TEST_SYNTAX_ERROR],
|
||||
# [
|
||||
# AT_TEST_TABLES_AND_PARSE([$1[ with %error-verbose]], [[verbose]],
|
||||
# AT_TEST_TABLES_AND_PARSE([$1[ with %define parse.error verbose]], [[verbose]],
|
||||
# [[last-state]],
|
||||
# [[%error-verbose ]$2], [$3], [$4],
|
||||
# [[%define parse.error verbose ]$2], [$3], [$4],
|
||||
# [[]], [$5], [], [$6], [$7], [$8])
|
||||
# AT_TEST_TABLES_AND_PARSE([$1[ with no %error-verbose]], [[no verbose]],
|
||||
# AT_TEST_TABLES_AND_PARSE([$1[ with no %define parse.error verbose]], [[no verbose]],
|
||||
# [[last-state]],
|
||||
# [$2], [$3], [$4],
|
||||
# [[]], [$5], [], [$6], [$7], [$8])
|
||||
|
||||
@@ -32,7 +32,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
#define YYSTYPE int *
|
||||
%}
|
||||
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
|
||||
%%
|
||||
|
||||
@@ -452,7 +452,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
]AT_YYERROR_DECLARE[
|
||||
]AT_YYLEX_DECLARE[
|
||||
%}
|
||||
[%error-verbose
|
||||
[%define parse.error verbose
|
||||
%token MYEOF 0 "end of file"
|
||||
%token 'a' "a"
|
||||
%token B_TOKEN "b"
|
||||
@@ -841,7 +841,7 @@ m4_define([_AT_DATA_DANCER_Y],
|
||||
$1
|
||||
%token ARROW INVALID NUMBER STRING DATA
|
||||
%verbose
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
/* Grammar follows */
|
||||
%%
|
||||
line: header body
|
||||
@@ -924,7 +924,7 @@ AT_LALR1_CC_IF([[#include <cstdlib>]],
|
||||
]AT_YYERROR_DECLARE])[
|
||||
%}
|
||||
$1
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%token A 1000
|
||||
%token B
|
||||
|
||||
@@ -1001,7 +1001,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
]AT_YYLEX_DECLARE[
|
||||
%}
|
||||
%debug
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%%
|
||||
|
||||
start:
|
||||
@@ -1124,7 +1124,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
]AT_YYLEX_DECLARE[
|
||||
}
|
||||
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%right END 0
|
||||
%left TK1 1 TK2 2 "tok alias" 3
|
||||
|
||||
@@ -1471,7 +1471,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
#define YYMAXDEPTH 8
|
||||
}
|
||||
%debug
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
|
||||
%%
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ m4_pushdef([AT_GRAM],
|
||||
int yylex (void);
|
||||
%}
|
||||
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%token 'a'
|
||||
|
||||
%%
|
||||
|
||||
@@ -51,7 +51,7 @@ my $max = $ARGV[0] || 10;
|
||||
|
||||
print <<EOF;
|
||||
]AT_DATA_GRAMMAR_PROLOGUE[
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%debug
|
||||
%{
|
||||
#include <stdio.h>
|
||||
@@ -158,7 +158,7 @@ my $max = $ARGV[0] || 10;
|
||||
|
||||
print <<EOF;
|
||||
]AT_DATA_GRAMMAR_PROLOGUE[
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%debug
|
||||
%{
|
||||
#include <stdio.h>
|
||||
@@ -255,7 +255,7 @@ use Text::Wrap;
|
||||
my $max = $ARGV[0] || 10;
|
||||
|
||||
print <<EOF;
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%debug
|
||||
%{
|
||||
]AT_DATA_SOURCE_PROLOGUE[
|
||||
@@ -379,7 +379,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
]AT_YYERROR_DECLARE[
|
||||
%}
|
||||
]$2[
|
||||
%error-verbose
|
||||
%define parse.error verbose
|
||||
%debug
|
||||
%token WAIT_FOR_EOF
|
||||
%%
|
||||
|
||||
Reference in New Issue
Block a user