Adela Vais and Akim Demaille
2e5592b3ab
d: support api.symbol.prefix and api.token.prefix
...
The D skeleton was not properly supporting them.
* data/skeletons/d.m4, data/skeletons/lalr1.d: Fix it.
* tests/calc.at: Check it.
2020-09-28 19:27:19 +02:00
Adela Vais and Akim Demaille
f296669c0f
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.
2020-09-26 08:08:25 +02:00
Adela Vais and Akim Demaille
de638df104
d: support api.parser.extends and api.parser.implements
...
The D skeleton was not properly supporting them.
* data/skeletons/d.m4: Fix it.
* tests/d.at: Check it.
* tests/local.mk, tests/testsuite.at: Adjust.
2020-09-24 09:29:45 +02:00
Adela Vais and Akim Demaille
2bc886dc02
d: make enum SymbolKind idiomatic D
...
Taking into account comments from H. S. Teoh.
https://lists.gnu.org/r/bison-patches/2020-09/msg00021.html
* data/skeletons/d.m4, data/skeletons/lalr1.d (SymbolKind): Wrap the
enum in a structure that contains its string representation.
2020-09-12 17:09:32 +02:00
Adela Vais and Akim Demaille
6e1d83c8a8
examples: d: demonstrate location tracking
...
* examples/d/calc/calc.y: Track locations.
* examples/d/calc/calc.test: Check locations.
2020-09-03 08:44:42 +02:00
Adela Vais and Akim Demaille
8032dde383
examples: d: duplicate the example as "simple" and "calc"
...
* examples/d/Makefile, examples/d/calc.d, examples/d/calc.test,
examples/d/calc/local.mk: Move into...
* examples/d/calc, examples/d/simple: these new directories.
2020-09-03 08:20:41 +02:00
Adela Vais and Akim Demaille
f3bcb3de0e
examples: d: fix the handling of unary +
...
It was interpreting "+exp" as "-exp".
* examples/d/calc.y: Fix.
* examples/d/calc.test: Check it.
2020-09-02 07:38:42 +02:00