d: add token constructors support
commit4bd4cdf37749bbd589e684f39da9aeb1d2aabc51
authorAdela Vais <adela.vais99@gmail.com>
Mon, 25 Jan 2021 20:53:30 +0000 (25 22:53 +0200)
committerAkim Demaille <akim.demaille@gmail.com>
Fri, 26 Mar 2021 06:01:55 +0000 (26 07:01 +0100)
tree8df1eab22ac7f53113d3ce1ab777f879c1b7cba2
parentae0889d805b0965568c9f95f5640d54058288246
d: add token constructors support

The user can return from yylex() by calling the Symbol method of the
same name as the TokenKind reported, and adding the parameters for
value and location if necessary.  These methods generate compile-time
errors if the parameters are not correlated.  Token constructors work
with both %union and api.value.type union.

* data/skeletons/d.m4: Here.
* tests/calc.at: Test it.
data/skeletons/d.m4
tests/calc.at