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:
Adela Vais authored and Akim Demaille committed 2020-09-26 08:08:25 +02:00
1 parent de638df104
commit f296669c0f
6 files changed
+124 -38

No files matched your search

+1 -1
View File
@@ -114,7 +114,7 @@ class CalcLexer(R) : Lexer
return semanticVal_;
}
int yylex ()
TokenKind yylex ()
{
import std.uni : isWhite, isNumber;
+1 -1
View File
@@ -109,7 +109,7 @@ class CalcLexer(R) : Lexer
return semanticVal_;
}
int yylex ()
TokenKind yylex ()
{
import std.uni : isWhite, isNumber;