Instead of
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'
%define api.push_pull "neither"
^^^^^^^^^^^^^
input.y:1.9-21: accepted value: 'push'
%define api.push_pull "neither"
^^^^^^^^^^^^^
input.y:1.9-21: accepted value: 'both'
%define api.push_pull "neither"
^^^^^^^^^^^^^
report
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'
* src/complain.h (no_caret): New.
* src/complain.c (error_message): Use it.
* src/muscle-tab.c (muscle_percent_define_check_values): Use it.
* src/scan-skel.l (flag): Ditto.
* tests/input.at: Adjust and check.
{
putc ('\n', stderr);
fflush (stderr);
{
putc ('\n', stderr);
fflush (stderr);
- if (loc && feature_flag & feature_caret)
+ if (loc && feature_flag & feature_caret && !(flags & no_caret))
location_caret (stderr, *loc);
}
}
location_caret (stderr, *loc);
}
}
complaint = 1 << 11, /**< All complaints. */
fatal = 1 << 12, /**< All fatal errors. */
silent = 1 << 13, /**< Do not display the warning type. */
complaint = 1 << 11, /**< All complaints. */
fatal = 1 << 12, /**< All fatal errors. */
silent = 1 << 13, /**< Do not display the warning type. */
+ no_caret = 1 << 14, /**< Do not display caret location. */
/**< All above warnings. */
Wall = ~complaint & ~fatal & ~silent
/**< All above warnings. */
Wall = ~complaint & ~fatal & ~silent
quote (*variablep), quote_n (1, value));
i += SUB_INDENT;
for (values = variablep + 1; *values; ++values)
quote (*variablep), quote_n (1, value));
i += SUB_INDENT;
for (values = variablep + 1; *values; ++values)
- complain_indent (&loc, complaint, &i, _("accepted value: %s"),
- quote (*values));
+ complain_indent (&loc, complaint | no_caret, &i,
+ _("accepted value: %s"), quote (*values));
else if (STREQ (arg, "fatal"))
return fatal;
else if (STREQ (arg, "note"))
else if (STREQ (arg, "fatal"))
return fatal;
else if (STREQ (arg, "note"))
- return silent | complaint;
+ return silent | complaint | no_caret;
else if (STREQ (arg, "warn"))
return Wother;
else
else if (STREQ (arg, "warn"))
return Wother;
else
input.y:1.9-21: accepted value: 'both'
]])
input.y:1.9-21: accepted value: 'both'
]])
+AT_BISON_CHECK([[-fcaret input.y]], [1], [],
+[[input.y:1.9-21: warning: deprecated %define variable name: 'api.push_pull', use 'api.push-pull' [-Wdeprecated]
+ %define api.push_pull "neither"
+ ^^^^^^^^^^^^^
+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'
+]])
+
AT_DATA([[input.y]],
[[%define lr.keep_unreachable_states maybe
%%
AT_DATA([[input.y]],
[[%define lr.keep_unreachable_states maybe
%%