mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
d: change the return value of yylex from int to TokenKind
* data/skeletons/lalr1.d: Change the return value. * examples/d/calc/calc.y, examples/d/simple/calc.y: Adjust. * tests/scanner.at: Adjust. * tests/calc.at (_AT_DATA_CALC_Y(d)): New, extracted from... (_AT_DATA_CALC_Y(c)): here. The two grammars have been sufficiently different to be separated. Still trying to be them together results in a maintenance burden. For the same reason, instead of specifying the results for D and for the rest, compute the expected results with D from the regular case.
This commit is contained in:
committed by
Akim Demaille
parent
de638df104
commit
f296669c0f
@@ -68,7 +68,7 @@ public interface Lexer
|
||||
* to the next token and prepares to return the semantic value
|
||||
* ]b4_locations_if([and beginning/ending positions ])[of the token.
|
||||
* @@return the token identifier corresponding to the next token. */
|
||||
int yylex ();
|
||||
TokenKind yylex ();
|
||||
|
||||
/**
|
||||
* Entry point for error reporting. Emits an error
|
||||
@@ -272,7 +272,7 @@ b4_user_union_members
|
||||
yyDebugStream.writeln (s);
|
||||
}
|
||||
]])[
|
||||
private final int yylex () {
|
||||
private final TokenKind yylex () {
|
||||
return yylexer.yylex ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user