]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Use Bison's api.token.raw feature.
authorNick Bowler <nbowler@draconx.ca>
Sat, 8 Jul 2023 14:04:31 +0000 (10:04 -0400)
committerNick Bowler <nbowler@draconx.ca>
Sat, 8 Jul 2023 14:04:31 +0000 (10:04 -0400)
commitad172f6d46ad5b36fdc9cc34a2450c93f48b0f99
tree7926822de5d604f81b24753820b3a0d9724b39b1
parent566e87bb15a98ed499e79b45f6c834ad0ffdc3b7
libcdecl: Use Bison's api.token.raw feature.

By default, Bison numbers user-defined tokens starting from 257.
If the scanner never returns plain characters (which is the case
for libcdecl), this is inefficient.

Recent versions of Bison provide the api.token.raw option to improve
things.  Let's turn it on, if configure detects that it is supported.

This requires a very minor tweak to spec_string in order for the
encoding of tokens into single-byte values to work regardless of
which mode Bison is run in.
configure.ac
src/gen-specstr.awk