diagnostics: prefer ^~~~ to ^^^^ to underline code

That's what both GCC and Clang do, and it is indeed much nicer to
read.  From:

    foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
     %error-verbose
     ^^^^^^^^^^^^^^
    foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
     %name-prefix = "foo"
     ^^^^^^^^^^^^^^^^^^^^

to:

    foo.y:1.1-14: warning: deprecated directive, use '%define parse.error verbose' [-Wdeprecated]
     %error-verbose
     ^~~~~~~~~~~~~~
    foo.y:4.1-20: warning: deprecated directive, use '%define api.prefix {foo}' [-Wdeprecated]
     %name-prefix = "foo"
     ^~~~~~~~~~~~~~~~~~~~

* src/location.c (location_caret): Use ^~~~.
Adjust tests expectations.
This commit is contained in:
Akim Demaille
2019-01-13 08:41:28 +01:00
parent 8c3a7687e4
commit a7ff1c75be
8 changed files with 215 additions and 215 deletions

View File

@@ -146,16 +146,16 @@ exp: "number";
AT_BISON_CHECK([-fcaret -Wyacc input.y], [0], [],
[[input.y:1.1-6: warning: POSIX Yacc does not support %nterm [-Wyacc]
%nterm exp
^^^^^^
^~~~~~
input.y:2.12-15: warning: POSIX Yacc does not support hexadecimal literals [-Wyacc]
%token NUM 0x40 "number"
^^^^
^~~~
input.y:2.17-24: warning: POSIX Yacc does not support string literals [-Wyacc]
%token NUM 0x40 "number"
^^^^^^^^
^~~~~~~~
input.y:4.6-13: warning: POSIX Yacc does not support string literals [-Wyacc]
exp: "number";
^^^^^^^^
^~~~~~~~
]])
AT_CLEANUP
@@ -180,16 +180,16 @@ b: %empty { $$ = 42; };
AT_BISON_CHECK([-fcaret -Wyacc input.y], [0], [],
[[input.y:1.1-11: warning: POSIX Yacc does not support %destructor [-Wyacc]
%destructor {} <int>
^^^^^^^^^^^
^~~~~~~~~~~
input.y:2.1-8: warning: POSIX Yacc does not support %printer [-Wyacc]
%printer {} <int>
^^^^^^^^
^~~~~~~~
input.y:6.9-20: warning: POSIX Yacc does not support typed midrule actions [-Wyacc]
a: <int>{ $$ = 42; } { $$ = $1; };
^^^^^^^^^^^^
^~~~~~~~~~~~
input.y:7.4-9: warning: POSIX Yacc does not support %empty [-Wyacc]
b: %empty { $$ = 42; };
^^^^^^
^~~~~~
]])
AT_CLEANUP
@@ -219,25 +219,25 @@ fact: "number";
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:1.13-24: error: nonterminals cannot be given a string alias
%nterm expr "expression";
^^^^^^^^^^^^
^~~~~~~~~~~~
input.y:2.13-15: error: nonterminals cannot be given an explicit number
%nterm term 123;
^^^
^~~
input.y:3.13-15: error: nonterminals cannot be given an explicit number
%nterm fact 124 "factor";
^^^
^~~
input.y:3.17-24: error: nonterminals cannot be given a string alias
%nterm fact 124 "factor";
^^^^^^^^
^~~~~~~~
input.y:4.8-10: error: character literals cannot be nonterminals
%nterm '+' '*';
^^^
^~~
input.y:5.8-15: error: syntax error, unexpected string, expecting char or identifier or <tag>
%nterm "number";
^^^^^^^^
^~~~~~~~
input.y:6.8-13: error: syntax error, unexpected string, expecting char or identifier or <tag>
%token "tok1" 1;
^^^^^^
^~~~~~
input.y:7.14: error: syntax error, unexpected integer
%left "tok2" 2;
^
@@ -364,10 +364,10 @@ exp: %empty { @$ = @1 ; };
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:2.20-21: error: integer out of range: '$1'
exp: %empty { $$ = $1 ; };
^^
^~
input.y:3.20-21: error: integer out of range: '@1'
exp: %empty { @$ = @1 ; };
^^
^~
]])
AT_CLEANUP
@@ -393,19 +393,19 @@ exp: foo { $$; } foo { $2; } foo
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:5.12-13: error: $$ for the midrule at $2 of 'exp' has no declared type
exp: foo { $$; } foo { $2; } foo
^^
^~
input.y:5.24-25: error: $2 of 'exp' has no declared type
exp: foo { $$; } foo { $2; } foo
^^
^~
input.y:5.6-32: warning: type clash on default action: <bar> != <> [-Wother]
exp: foo { $$; } foo { $2; } foo
^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:6.6-8: warning: type clash on default action: <bar> != <> [-Wother]
| foo
^^^
^~~
input.y:7.6-11: warning: empty rule for typed nonterminal, and no action [-Wother]
| %empty
^^^^^^
^~~~~~
]])
AT_CLEANUP
@@ -464,133 +464,133 @@ AT_BISON_CHECK(m4_ifval([$2], [--warnings=midrule-values ])[-fcaret input.y],
[0], [],
[[input.y:12.10-32: warning: unset value: $][$ [-Wother]
a: INT | INT { } INT { } INT { };
^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~
input.y:12.10-12: warning: unused value: $][1 [-Wother]
a: INT | INT { } INT { } INT { };
^^^
^~~
input.y:12.18-20: warning: unused value: $][3 [-Wother]
a: INT | INT { } INT { } INT { };
^^^
^~~
input.y:12.26-28: warning: unused value: $][5 [-Wother]
a: INT | INT { } INT { } INT { };
^^^
^~~
input.y:13.10-15: warning: empty rule for typed nonterminal, and no action [-Wother]
b: INT | %empty;
^^^^^^
^~~~~~
]]m4_ifval([$2], [[[input.y:14.14-20: warning: unset value: $][$ [-Wmidrule-values]
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
^^^^^^^
^~~~~~~
input.y:14.26-41: warning: unset value: $][$ [-Wmidrule-values]
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~
]]])[[input.y:14.10-62: warning: unset value: $][$ [-Wother]
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:14.22-24: warning: unused value: $][3 [-Wother]
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
^^^
^~~
input.y:14.43-45: warning: unused value: $][5 [-Wother]
c: INT | INT { $][1; } INT { $<integer>2; } INT { $<integer>4; };
^^^
^~~
]]m4_ifval([$2], [[[input.y:15.14-16: warning: unset value: $][$ [-Wmidrule-values]
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
^^^
^~~
]]])[[input.y:15.10-49: warning: unset value: $][$ [-Wother]
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:15.18-20: warning: unused value: $][3 [-Wother]
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
^^^
^~~
input.y:15.30-32: warning: unused value: $][5 [-Wother]
d: INT | INT { } INT { $][1; } INT { $<integer>2; };
^^^
^~~
input.y:16.10-37: warning: unset value: $][$ [-Wother]
e: INT | INT { } INT { } INT { $][1; };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:16.18-20: warning: unused value: $][3 [-Wother]
e: INT | INT { } INT { } INT { $][1; };
^^^
^~~
input.y:16.27-29: warning: unused value: $][5 [-Wother]
e: INT | INT { } INT { } INT { $][1; };
^^^
^~~
input.y:18.10-58: warning: unset value: $][$ [-Wother]
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:18.10-12: warning: unused value: $][1 [-Wother]
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
^^^
^~~
]]m4_ifval([$2], [[[input.y:18.14-29: warning: unused value: $][2 [-Wmidrule-values]
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~
]]])[[input.y:18.31-33: warning: unused value: $][3 [-Wother]
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
^^^
^~~
]]m4_ifval([$2], [[[input.y:18.35-50: warning: unused value: $][4 [-Wmidrule-values]
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~
]]])[[input.y:18.52-54: warning: unused value: $][5 [-Wother]
g: INT | INT { $<integer>$; } INT { $<integer>$; } INT { };
^^^
^~~
input.y:19.10-72: warning: unset value: $][$ [-Wother]
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:19.10-12: warning: unused value: $][1 [-Wother]
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
^^^
^~~
input.y:19.31-33: warning: unused value: $][3 [-Wother]
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
^^^
^~~
]]m4_ifval([$2], [[[input.y:19.35-64: warning: unused value: $][4 [-Wmidrule-values]
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
]]])[[input.y:19.66-68: warning: unused value: $][5 [-Wother]
h: INT | INT { $<integer>$; } INT { $<integer>$ = $<integer>2; } INT { };
^^^
^~~
]]m4_ifval([$2], [[[input.y:21.18-37: warning: unused value: $][3 [-Wmidrule-values]
j: INT | INT INT { $<integer>$ = 1; } { $][$ = $][1 + $][2; };
^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~
]]])[[input.y:22.10-68: warning: unset value: $][$ [-Wother]
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:22.10-12: warning: unused value: $][1 [-Wother]
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
^^^
^~~
input.y:22.14-16: warning: unused value: $][2 [-Wother]
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
^^^
^~~
]]m4_ifval([$2], [[[input.y:22.35-64: warning: unused value: $][4 [-Wmidrule-values]
k: INT | INT INT { $<integer>$; } { $<integer>$ = $<integer>3; } { };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
]]])[[input.y:25.23-25: warning: unset value: $][$ [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:25.40-42: warning: unset value: $][$ [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:25.10-50: warning: unset value: $][$ [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:25.10-12: warning: unused value: $][1 [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:25.23-25: warning: unused value: $][2 [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:25.27-29: warning: unused value: $][3 [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:25.40-42: warning: unused value: $][4 [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:25.44-46: warning: unused value: $][5 [-Wother]
n: INT | INT <integer>{ } INT <integer>{ } INT { };
^^^
^~~
input.y:26.23-25: warning: unset value: $][$ [-Wother]
o: INT | INT <integer>{ } INT <integer>{ } INT { $][$ = $][1 + $][2 + $][3 + $][4 + $][5; };
^^^
^~~
input.y:26.40-42: warning: unset value: $][$ [-Wother]
o: INT | INT <integer>{ } INT <integer>{ } INT { $][$ = $][1 + $][2 + $][3 + $][4 + $][5; };
^^^
^~~
]])
])
@@ -633,19 +633,19 @@ BAR:
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:2.8-10: error: symbol FOO redeclared as a nonterminal
%nterm FOO BAR
^^^
^~~
input.y:1.8-10: previous definition
%token FOO
^^^
^~~
input.y:3.8-10: error: symbol BAR redeclared as a token
%token BAR
^^^
^~~
input.y:2.12-14: previous definition
%nterm FOO BAR
^^^
^~~
input.y:5.1-3: error: rule given for FOO, which is a token
FOO: BAR
^^^
^~~
]])
AT_CLEANUP
@@ -678,40 +678,40 @@ start: %empty;
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:1.13-29: error: %destructor redeclaration for <>
%destructor { destroy ($$); } <> <>
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
input.y:1.13-29: previous declaration
%destructor { destroy ($$); } <> <>
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
input.y:2.10-24: error: %printer redeclaration for <>
%printer { print ($$); } <> <>
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
input.y:2.10-24: previous declaration
%printer { print ($$); } <> <>
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
input.y:4.13-29: error: %destructor redeclaration for <>
%destructor { destroy ($$); } <>
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
input.y:1.13-29: previous declaration
%destructor { destroy ($$); } <> <>
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
input.y:5.10-24: error: %printer redeclaration for <>
%printer { print ($$); } <>
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
input.y:2.10-24: previous declaration
%printer { print ($$); } <> <>
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
input.y:11.13-29: error: %destructor redeclaration for <>
%destructor { destroy ($$); } <>;
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
input.y:1.13-29: previous declaration
%destructor { destroy ($$); } <> <>
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
input.y:12.10-24: error: %printer redeclaration for <>
%printer { print ($$); } <>;
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
input.y:2.10-24: previous declaration
%printer { print ($$); } <> <>
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
]])
])
@@ -781,16 +781,16 @@ exp: bar;
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:2.16-18: error: symbol bar is used, but is not defined as a token and has no rules
%destructor {} bar
^^^
^~~
input.y:1.17-19: warning: symbol baz is used, but is not defined as a token and has no rules [-Wother]
%printer {} foo baz
^^^
^~~
input.y:1.13-15: warning: symbol foo is used, but is not defined as a token and has no rules [-Wother]
%printer {} foo baz
^^^
^~~
input.y:3.13-15: warning: symbol qux is used, but is not defined as a token and has no rules [-Wother]
%type <foo> qux
^^^
^~~
]])
AT_CLEANUP
@@ -910,13 +910,13 @@ tagged: { } ;
AT_BISON_CHECK([-fcaret input.y], [0], [],
[[input.y:6.8-45: warning: unset value: $$ [-Wother]
start: end end tagged tagged { $<tag>1; $3; } ;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:6.12-14: warning: unused value: $2 [-Wother]
start: end end tagged tagged { $<tag>1; $3; } ;
^^^
^~~
input.y:7.6-8: warning: unset value: $$ [-Wother]
end: { } ;
^^^
^~~
]])
AT_DATA([[input.y]],
@@ -957,13 +957,13 @@ end: { } ;
AT_BISON_CHECK([-fcaret input.y], [0], [],
[[input.y:6.8-22: warning: unset value: $$ [-Wother]
start: end end { $1; } ;
^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~
input.y:6.12-14: warning: unused value: $2 [-Wother]
start: end end { $1; } ;
^^^
^~~
input.y:7.6-8: warning: unset value: $$ [-Wother]
end: { } ;
^^^
^~~
]])
AT_CLEANUP
@@ -1014,13 +1014,13 @@ exp: FOO BAR;
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:2.17-21: warning: symbol "foo" used more than once as a literal string [-Wother]
BAR 42 "foo"
^^^^^
^~~~~
input.y:2.10-12: error: user token number 42 redeclaration for BAR
BAR 42 "foo"
^^^
^~~
input.y:1.8-10: previous declaration for FOO
%token FOO 42 "foo"
^^^
^~~
]])
AT_CLEANUP
@@ -1048,10 +1048,10 @@ exp: foo;
]],
[[input.y:3.7-11: error: %type redeclaration for foo
%type <baz> foo
^^^^^
^~~~~
input.y:2.7-11: previous declaration
%type <bar> "foo"
^^^^^
^~~~~
]])
AT_TEST([[%token foo "foo"
@@ -1062,10 +1062,10 @@ exp: foo;
]],
[[input.y:3.10-14: error: %printer redeclaration for foo
%printer {baz} foo
^^^^^
^~~~~
input.y:2.10-14: previous declaration
%printer {bar} "foo"
^^^^^
^~~~~
]])
AT_TEST([[%token foo "foo"
@@ -1076,10 +1076,10 @@ exp: foo;
]],
[[input.y:3.13-17: error: %destructor redeclaration for foo
%destructor {baz} foo
^^^^^
^~~~~
input.y:2.13-17: previous declaration
%destructor {bar} "foo"
^^^^^
^~~~~
]])
AT_TEST([[%token foo "foo"
@@ -1090,10 +1090,10 @@ exp: foo;
]],
[[input.y:3.1-5: error: %left redeclaration for foo
%left foo
^^^^^
^~~~~
input.y:2.1-5: previous declaration
%left "foo"
^^^^^
^~~~~
]])
# This time, declare the alias after its use.
@@ -1107,10 +1107,10 @@ exp: foo;
]],
[[input.y:2.1-5: error: %left redeclaration for foo
%left foo
^^^^^
^~~~~
input.y:1.1-5: previous declaration
%left "foo"
^^^^^
^~~~~
]])
# Printer.
@@ -1122,10 +1122,10 @@ exp: foo;
]],
[[input.y:2.10-11: error: %printer redeclaration for foo
%printer {} foo
^^
^~
input.y:1.10-11: previous declaration
%printer {} "foo"
^^
^~
]])
# Destructor.
@@ -1137,10 +1137,10 @@ exp: foo;
]],
[[input.y:2.13-14: error: %destructor redeclaration for foo
%destructor {} foo
^^
^~
input.y:1.13-14: previous declaration
%destructor {} "foo"
^^
^~
]])
m4_popdef([AT_TEST])
@@ -1170,7 +1170,7 @@ AT_DATA([input.y],
AT_BISON_CHECK([-fcaret input.y], [1], [],
[[input.y:1.1-2: error: syntax error, unexpected {...}
{}
^^
^~
]])
@@ -1513,19 +1513,19 @@ start: %empty;
AT_BISON_CHECK([-fcaret -o input.c input.y], 1, [],
[[input.y:1.10-2.0: error: missing '"' at end of line
%token A "a
^^
^~
input.y:4.10-5.0: error: missing "'" at end of line
%token C '1
^^
^~
input.y:14.11-15.0: error: missing "'" at end of line
%type <f> 'a
^^
^~
input.y:16.11-17.0: error: missing '"' at end of line
%type <f> "a
^^
^~
input.y:19.13-20.0: error: missing '}' at end of file
%destructor { free ($$)
^^^^^^^^^^^
^~~~~~~~~~~
input.y:20.1: error: syntax error, unexpected end of file
]])
@@ -1809,7 +1809,7 @@ start: %empty;
AT_BISON_CHECK([[-fcaret -Dvar=cmd-d input-dg.y]], [[1]], [],
[[input-dg.y:1.9-11: error: %define variable 'var' redefined
%define var "gram"
^^^
^~~
<command line>:3: previous definition
]])
@@ -1931,7 +1931,7 @@ start: %empty;
AT_BISON_CHECK([[-fcaret input.y]], [[1]], [[]],
[[input.y:1.9-28: error: invalid value for %define variable 'lr.default-reduction': 'bogus'
%define lr.default-reduction bogus
^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~
input.y:1.9-28: accepted value: 'most'
input.y:1.9-28: accepted value: 'consistent'
input.y:1.9-28: accepted value: 'accepting'
@@ -1946,7 +1946,7 @@ start: %empty;
AT_BISON_CHECK([[-fcaret input.y]], [[1]], [[]],
[[input.y:1.9-21: error: invalid value for %define variable 'api.push-pull': 'neither'
%define api.push-pull neither
^^^^^^^^^^^^^
^~~~~~~~~~~~~
input.y:1.9-21: accepted value: 'pull'
input.y:1.9-21: accepted value: 'push'
input.y:1.9-21: accepted value: 'both'
@@ -1972,7 +1972,7 @@ start: %empty;
AT_BISON_CHECK([[-fcaret input.y]], [[1]], [[]],
[[input.y:3.9-25: error: %define variable 'api.location.file' requires 'none' or '"..."' values
%define api.location.file {bogus}
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
]])
AT_CLEANUP
@@ -1998,25 +1998,25 @@ start: %empty;
AT_BISON_CHECK([[-fcaret input.y]], [1], [],
[[input.y:1.9-21: warning: deprecated directive, use '%define api.push-pull both' [-Wdeprecated]
%define api.push_pull both
^^^^^^^^^^^^^
^~~~~~~~~~~~~
input.y:2.9-34: warning: deprecated directive, use '%define lr.keep-unreachable-state maybe' [-Wdeprecated]
%define lr.keep_unreachable_states maybe
^^^^^^^^^^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~~~~~~~~~~
input.y:3.9-17: warning: deprecated directive, use '%define api.namespace {foo}' [-Wdeprecated]
%define namespace "foo"
^^^^^^^^^
^~~~~~~~~
input.y:4.9-21: error: %define variable 'api.namespace' redefined
%define api.namespace {foo}
^^^^^^^^^^^^^
^~~~~~~~~~~~~
input.y:3.9-17: previous definition
%define namespace "foo"
^^^^^^^^^
^~~~~~~~~
input.y:5.9-15: warning: deprecated directive, use '%define api.value.type variant' [-Wdeprecated]
%define variant
^^^^^^^
^~~~~~~
input.y:6.9-25: warning: deprecated directive, use '%define api.parser.class {parser}' [-Wdeprecated]
%define parser_class_name {parser}
^^^^^^^^^^^^^^^^^
^~~~~~~~~~~~~~~~~
]])
AT_CLEANUP
@@ -2129,7 +2129,7 @@ AT_CHECK([[$PERL -e "print 'start: \'';" >> empty.y || exit 77]])
AT_BISON_CHECK([-fcaret empty.y], [1], [],
[[empty.y:2.8-9: warning: empty character literal [-Wother]
start: '';
^^
^~
empty.y:3.8-4.0: error: missing "'" at end of line
start: '
^
@@ -2615,7 +2615,7 @@ exp: <int> {}
AT_BISON_CHECK([[-fcaret input.y]], [[0]], [[]],
[[input.y:10.6-13: warning: only midrule actions can be typed: int [-Wother]
exp: <int> {}
^^^^^^^^
^~~~~~~~
]])
AT_CLEANUP