mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 08:43:03 +00:00
d: prepare to be able to run LAC tests
Unfortunately it seems to be quite difficult to have "LAC: Exploratory stack" run for D. * data/skeletons/lalr1.d: We need File when traces are enabled. * tests/local.at (AT_YYLEX_DEFINE(d)): New. * tests/regression.at: Prepare for D, but don't run it, it does not work.
This commit is contained in:
@@ -953,6 +953,26 @@ public void reportSyntaxError(]AT_API_PREFIX[Parser.Context ctx)
|
||||
]])[]])
|
||||
|
||||
|
||||
# FIXME: this does not work. It is a stub copied blindly from Java.
|
||||
m4_define([AT_YYLEX_DEFINE(d)],
|
||||
[[
|
||||
/*--------.
|
||||
| yylex. |
|
||||
`--------*/
|
||||
|
||||
public string input = ]$1[;
|
||||
public int index = 0;
|
||||
public int yylex() {
|
||||
if (index < input.length())
|
||||
return input.charAt(index++);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
public Object getLVal() {
|
||||
]m4_ifval([$2], [$2], [return null])[;
|
||||
}
|
||||
]])
|
||||
|
||||
m4_define([AT_MAIN_DEFINE(d)],
|
||||
[[int main ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user