mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
d: obey parse.error
* data/skeletons/lalr1.d (yysyntax_error): Let the dispatch be bison-time, not runtime.
This commit is contained in:
4
TODO
4
TODO
@@ -2,10 +2,6 @@
|
||||
** Deprecate YYPRINT
|
||||
The doc shows it too much.
|
||||
|
||||
** java, d: error.verbose
|
||||
The code checks dynamically for error.verbose. It should be controlled by
|
||||
M4.
|
||||
|
||||
** doc
|
||||
I feel its ugly to use the GNU style to declare functions in the doc. It
|
||||
generates tons of white space in the page, and may contribute to bad page
|
||||
|
||||
@@ -187,9 +187,6 @@ b4_user_union_members
|
||||
{
|
||||
]b4_identification[
|
||||
|
||||
/** True if verbose error messages are enabled. */
|
||||
public bool errorVerbose = ]b4_flag_value([error_verbose])[;
|
||||
|
||||
]b4_locations_if([[
|
||||
private final ]b4_location_type[ yylloc_from_stack (ref YYStack rhs, int n)
|
||||
{
|
||||
@@ -400,7 +397,8 @@ b4_user_union_members
|
||||
ref ]b4_yystype[ yyvaluep]dnl
|
||||
b4_locations_if([, ref ]b4_location_type[ yylocationp])[)
|
||||
{
|
||||
if (0 < yydebug) {
|
||||
if (0 < yydebug)
|
||||
{
|
||||
string message = s ~ (yytype < yyntokens_ ? " token " : " nterm ")
|
||||
~ yytname_[yytype] ~ " ("]b4_locations_if([
|
||||
~ yylocationp.toString() ~ ": "])[;
|
||||
@@ -667,9 +665,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
|
||||
// Generate an error message.
|
||||
private final string yysyntax_error (int yystate, int tok)
|
||||
{
|
||||
if (errorVerbose)
|
||||
{
|
||||
{]b4_error_verbose_if([[
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider.
|
||||
See
|
||||
@@ -736,9 +732,7 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
}]])[
|
||||
return "syntax error";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user