mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
* data/lalr1.cc: Extensive Doxygenation.
(error_): Rename as... (error): this, since it is visible to the user. Adjust callers. (Parser::message): Now an automatic variable from... (Parser::yyreport_syntax_error_): here. * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to Parser::error. * tests/input.at: Escape $.
This commit is contained in:
@@ -311,9 +311,9 @@ yylex (]AT_LEX_FORMALS[)
|
||||
]AT_LALR1_CC_IF(
|
||||
[/* A C++ error reporting function. */
|
||||
void
|
||||
yy::Parser::error_ ()
|
||||
yy::Parser::error (const Location& l, const std::string& m)
|
||||
{
|
||||
printf ("%d-%d: %s\n", RANGE (location), message.c_str());
|
||||
printf ("%d-%d: %s\n", RANGE (l), m.c_str());
|
||||
}
|
||||
|
||||
static bool yydebug;
|
||||
|
||||
@@ -128,9 +128,10 @@ static FILE *yyin;
|
||||
]AT_LALR1_CC_IF(
|
||||
[/* A C++ error reporting function. */
|
||||
void
|
||||
yy::Parser::error_ ()
|
||||
yy::Parser::error (const Location& l, const std::string& m)
|
||||
{
|
||||
std::cerr << AT_LOCATION_IF([location << ": " << ])message << std::endl;
|
||||
(void) l;
|
||||
std::cerr << AT_LOCATION_IF([l << ": " << ])m << std::endl;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -25,7 +25,7 @@ AT_BANNER([[Input Processing.]])
|
||||
## Invalid $n. ##
|
||||
## ------------ ##
|
||||
|
||||
AT_SETUP([Invalid $n])
|
||||
AT_SETUP([Invalid \$n])
|
||||
|
||||
AT_DATA([input.y],
|
||||
[[%%
|
||||
|
||||
@@ -727,9 +727,9 @@ member: STRING
|
||||
AT_LALR1_CC_IF(
|
||||
[/* A C++ error reporting function. */
|
||||
void
|
||||
yy::Parser::error_ ()
|
||||
yy::Parser::error (const Location&, const std::string& m)
|
||||
{
|
||||
std::cerr << message << std::endl;
|
||||
std::cerr << m << std::endl;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user