]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Use gperf to identify keywords during scanning.
authorNick Bowler <nbowler@draconx.ca>
Sun, 9 Jul 2023 18:43:43 +0000 (14:43 -0400)
committerNick Bowler <nbowler@draconx.ca>
Mon, 10 Jul 2023 06:01:52 +0000 (02:01 -0400)
commitc4d0ba7251867ee9bdb8466357cba5a9fa352b76
treed9c4a026bf0e615396291ea1b7ce5c4bbcbbb2fa
parentc5810975e3ec971fc8caf65f58b77c96c97b2571
libcdecl: Use gperf to identify keywords during scanning.

Instead of having a flex rule for each keyword, we can use a catch-all
rule for identifiers and then use gperf to distinguish keywords from
ordinary identifiers.

This reduces the size of the scanner much more than the addition of
gperf-generated code increases it.
Makefile.am
src/.gitignore
src/cdecl-internal.h
src/keywords.gperf [new file with mode: 0644]
src/scan.l
tests/decl-bad.at