mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
Style changes.
* etc/bench.pl.in (generate_grammar_list): Consitently use location_type, not yy::location.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2009-02-25 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
Style changes.
|
||||||
|
* etc/bench.pl.in (generate_grammar_list): Consitently use
|
||||||
|
location_type, not yy::location.
|
||||||
|
|
||||||
2009-02-25 Akim Demaille <demaille@gostai.com>
|
2009-02-25 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
Comment change.
|
Comment change.
|
||||||
|
|||||||
@@ -688,7 +688,7 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylval,
|
|||||||
if (stage == STAGE_MAX)
|
if (stage == STAGE_MAX)
|
||||||
{
|
{
|
||||||
#if USE_LEX_SYMBOL
|
#if USE_LEX_SYMBOL
|
||||||
return yy::parser::make_END_OF_FILE (yy::location());
|
return yy::parser::make_END_OF_FILE (location_type ());
|
||||||
#else
|
#else
|
||||||
*yylloc = location_type ();
|
*yylloc = location_type ();
|
||||||
return token::END_OF_FILE;
|
return token::END_OF_FILE;
|
||||||
@@ -697,7 +697,7 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylval,
|
|||||||
else if (stage % 2)
|
else if (stage % 2)
|
||||||
{
|
{
|
||||||
#if USE_LEX_SYMBOL
|
#if USE_LEX_SYMBOL
|
||||||
return yy::parser::make_NUMBER (stage, yy::location());
|
return yy::parser::make_NUMBER (stage, location_type ());
|
||||||
#else
|
#else
|
||||||
# if defined ONE_STAGE_BUILD
|
# if defined ONE_STAGE_BUILD
|
||||||
yylval->build(stage);
|
yylval->build(stage);
|
||||||
@@ -713,7 +713,7 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylval,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#if USE_LEX_SYMBOL
|
#if USE_LEX_SYMBOL
|
||||||
return yy::parser::make_TEXT ("A string.", yy::location());
|
return yy::parser::make_TEXT ("A string.", location_type ());
|
||||||
#else
|
#else
|
||||||
# if defined ONE_STAGE_BUILD
|
# if defined ONE_STAGE_BUILD
|
||||||
yylval->build(std::string("A string."));
|
yylval->build(std::string("A string."));
|
||||||
@@ -731,10 +731,9 @@ yy::parser::token_type yylex(yy::parser::semantic_type* yylval,
|
|||||||
|
|
||||||
// Mandatory error function
|
// Mandatory error function
|
||||||
void
|
void
|
||||||
yy::parser::error(const yy::parser::location_type& yylloc,
|
yy::parser::error(const yy::parser::location_type& loc, const std::string& msg)
|
||||||
const std::string& message)
|
|
||||||
{
|
{
|
||||||
std::cerr << yylloc << ": " << message << std::endl;
|
std::cerr << loc << ": " << msg << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
|
|||||||
Reference in New Issue
Block a user