diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-08-24 08:09:58 -0500 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-09-14 09:55:17 +0200 |
commit | 9861bcc540298810ebe4a66d39923de5f08b8789 (patch) | |
tree | f1ae30640d182f5dc88d6c785e89c2d6f436d04d /tests/local.mk | |
parent | d94d83e10b4738317beff65ef01d8258b22ed601 (diff) | |
download | bison-9861bcc540298810ebe4a66d39923de5f08b8789.tar.gz |
api.token.raw: implement
Bison used to feature %raw, documented as follows:
@item %raw
The output file @file{@var{name}.h} normally defines the tokens with
Yacc-compatible token numbers. If this option is specified, the
internal Bison numbers are used instead. (Yacc-compatible numbers start
at 257 except for single character tokens; Bison assigns token numbers
sequentially for all tokens starting at 3.)
Unfortunately, as far as I can tell, it never worked: token numbers
are indeed changed in the generated tables (from external token number
to internal), yet the code was still applying the mapping from
external token numbers to internal token numbers.
This commit reintroduces the feature as it was expected to be.
* data/skeletons/bison.m4 (b4_token_format): When api.token.raw is
enabled, use the internal token number.
* data/skeletons/yacc.c (yytranslate): Don't emit if api.token.raw is
enabled.
(YYTRANSLATE): Adjust.
Diffstat (limited to 'tests/local.mk')
0 files changed, 0 insertions, 0 deletions