]> git.draconx.ca Git - cdecl99.git/commitdiff
libcdecl: Use gperf %7bit option for keyword matching.
authorNick Bowler <nbowler@draconx.ca>
Thu, 22 Feb 2024 02:38:26 +0000 (21:38 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 22 Feb 2024 02:38:26 +0000 (21:38 -0500)
The scanner ensures all input to the keyword matching function consists
exclusively of alphanumeric characters, hyphens and underscores.

Since gperf supports only ISO-646 variants it should be safe to enable
7bit mode, which reduces the size of its generated tables substantially.

src/keywords.gperf

index d0caf8b7dd0350f21426ba6013e126cf3125b39e..97f8a8f236a36b9ea5ccff9a89db2385dae5446b 100644 (file)
@@ -1,6 +1,6 @@
 %{
 /*
- * Copyright © 2023 Nick Bowler
+ * Copyright © 2023-2024 Nick Bowler
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,6 +28,7 @@ static const struct keyword *in_word_set();
 
 %readonly-tables
 %language=ANSI-C
+%7bit
 
 /* Note: the following options enable gperf-wordwrap.awk to do its thing */
 %define word-array-name wordlist_wrapped