c++: minor changes

* data/lalr1.cc: Fix oldish comment.
* data/stack.hh: Prefer typename for type names.
Use size() instead of duplicating it.
* examples/variant-11.yy, examples/variant.yy (yylex): Use int,
as this is the type of the semantic value.
This commit is contained in:
Akim Demaille
2018-10-22 08:18:54 +02:00
parent 73917e9e6f
commit 4b0efdeb28
6 changed files with 19 additions and 12 deletions

View File

@@ -11723,7 +11723,7 @@ The rules are simple. The driver is used to report errors.
if (! (INT_MIN <= n && n <= INT_MAX && errno != ERANGE))
throw yy::parser::syntax_error (loc, "integer is out of range: "
+ std::string(yytext));
return yy::parser::make_NUMBER (n, loc);
return yy::parser::make_NUMBER (int (n), loc);
@}
@end group
@{id@} return yy::parser::make_IDENTIFIER (yytext, loc);