Skip to content

Distribute and run LLMs with a single file.

Add ld script syntax highlighting

Justine Tunney58fc96e39bbe
diff --git a/llamafile/highlight.cpp b/llamafile/highlight.cpp
index 4f543508..a1525786 100644
--- a/llamafile/highlight.cpp
+++ b/llamafile/highlight.cpp
@@ -54,6 +54,11 @@ Highlight *Highlight::create(const std::string_view &lang) {
lang == "assembler")
return new HighlightAsm;
+ if (lang == "ld" || //
+ lang == "lds" || //
+ lang == "ld-script")
+ return new HighlightLd;
+
if (lang == "js" || //
lang == "json" || //
lang == "javascript")
@@ -112,7 +117,9 @@ Highlight *Highlight::create(const std::string_view &lang) {
lang == "c#")
return new HighlightCsharp;
- if (lang == "kotlin")
+ if (lang == "kt" || //
+ lang == "kts" || //
+ lang == "kotlin")
return new HighlightJava(is_keyword_kotlin);
if (lang == "lua")
diff --git a/llamafile/highlight.h b/llamafile/highlight.h
index e9930137..e8d4f7bc 100644
--- a/llamafile/highlight.h
+++ b/llamafile/highlight.h
@@ -50,6 +50,7 @@
#define HI_REGISTER "\033[1;35m" // bold magenta
#define HI_DATE "\033[33m" // yellow
#define HI_DIRECTIVE "\033[1;31m" // bold red
+#define HI_WARNING "\033[1;31m" // bold red
typedef const char *is_keyword_f(const char *, size_t);
@@ -59,6 +60,7 @@ is_keyword_f is_keyword_c_pod;
is_keyword_f is_keyword_c_type;
is_keyword_f is_keyword_c_builtin;
is_keyword_f is_keyword_c_constant;
+is_keyword_f is_keyword_cpp;
is_keyword_f is_keyword_cxx;
is_keyword_f is_keyword_js;
is_keyword_f is_keyword_js_builtin;
@@ -120,6 +122,9 @@ is_keyword_f is_keyword_basic;
is_keyword_f is_keyword_basic_type;
is_keyword_f is_keyword_basic_builtin;
is_keyword_f is_keyword_basic_constant;
+is_keyword_f is_keyword_ld;
+is_keyword_f is_keyword_ld_builtin;
+is_keyword_f is_keyword_ld_warning;
}
class Highlight {
@@ -574,3 +579,17 @@ class HighlightBasic : public Highlight {
bool bol_ = true;
std::string word_;
};
+
+class HighlightLd : public Highlight {
+ public:
+ HighlightLd();
+ ~HighlightLd() override;
+ void feed(std::string *result, std::string_view input) override;
+ void flush(std::string *result) override;
+
+ private:
+ int t_ = 0;
+ bool bol_ = true;
+ bool cpp_ = false;
+ std::string word_;
+};
diff --git a/llamafile/highlight_ld.cpp b/llamafile/highlight_ld.cpp
new file mode 100644
index 00000000..03761090
--- /dev/null
+++ b/llamafile/highlight_ld.cpp
@@ -0,0 +1,238 @@
+// -*- mode:c++;indent-tabs-mode:nil;c-basic-offset:4;coding:utf-8 -*-
+// vi: set et ft=cpp ts=4 sts=4 sw=4 fenc=utf-8 :vi
+//
+// Copyright 2024 Mozilla Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "highlight.h"
+
+#include <ctype.h>
+
+enum {
+ NORMAL,
+ WORD,
+ DQUOTE,
+ DQUOTE_BACKSLASH,
+ SLASH,
+ SLASH_SLASH,
+ SLASH_STAR,
+ SLASH_STAR_STAR,
+};
+
+HighlightLd::HighlightLd() {
+}
+
+HighlightLd::~HighlightLd() {
+}
+
+void HighlightLd::feed(std::string *r, std::string_view input) {
+ int c;
+ for (size_t i = 0; i < input.size(); ++i) {
+ c = input[i] & 255;
+ switch (t_) {
+
+ Normal:
+ case NORMAL:
+ if (!isascii(c) || isalpha(c) || c == '_' || c == '.' || c == ':') {
+ t_ = WORD;
+ word_ += c;
+ } else if (c == '/') {
+ t_ = SLASH;
+ } else if (c == '"') {
+ t_ = DQUOTE;
+ *r += HI_STRING;
+ *r += c;
+ } else if (c == '#' && bol_) {
+ cpp_ = true;
+ *r += HI_BUILTIN;
+ *r += c;
+ } else if (c == '\n') {
+ *r += c;
+ if (cpp_) {
+ *r += HI_RESET;
+ cpp_ = false;
+ }
+ } else {
+ *r += c;
+ }
+ break;
+
+ Word:
+ case WORD:
+ if (!isascii(c) || isalnum(c) || c == '_' || c == '.' || c == '/' || c == ':') {
+ word_ += c;
+ } else {
+ if (cpp_) {
+ if (is_keyword_cpp(word_.data(), word_.size())) {
+ *r += HI_BUILTIN;
+ *r += word_;
+ *r += HI_RESET;
+ } else if (is_keyword_c_constant(word_.data(), word_.size())) {
+ *r += HI_CONSTANT;
+ *r += word_;
+ *r += HI_RESET;
+ } else {
+ *r += word_;
+ }
+ } else {
+ if (is_keyword_ld(word_.data(), word_.size())) {
+ *r += HI_KEYWORD;
+ *r += word_;
+ *r += HI_RESET;
+ } else if (is_keyword_ld_builtin(word_.data(), word_.size())) {
+ *r += HI_BUILTIN;
+ *r += word_;
+ *r += HI_RESET;
+ } else if (is_keyword_ld_warning(word_.data(), word_.size())) {
+ *r += HI_WARNING;
+ *r += word_;
+ *r += HI_RESET;
+ } else {
+ *r += word_;
+ }
+ }
+ word_.clear();
+ t_ = NORMAL;
+ goto Normal;
+ }
+ break;
+
+ case SLASH:
+ if (c == '/') {
+ *r += HI_COMMENT;
+ *r += "//";
+ t_ = SLASH_SLASH;
+ } else if (c == 'D') {
+ // for /DISCARD/ warning keyword
+ word_ += "/D";
+ t_ = WORD;
+ } else if (c == '*') {
+ *r += HI_COMMENT;
+ *r += "/*";
+ t_ = SLASH_STAR;
+ } else {
+ *r += '/';
+ t_ = NORMAL;
+ goto Normal;
+ }
+ break;
+
+ case SLASH_SLASH:
+ *r += c;
+ if (c == '\n') {
+ *r += HI_RESET;
+ t_ = NORMAL;
+ cpp_ = false;
+ }
+ break;
+
+ case SLASH_STAR:
+ *r += c;
+ if (c == '*')
+ t_ = SLASH_STAR_STAR;
+ break;
+
+ case SLASH_STAR_STAR:
+ *r += c;
+ if (c == '/') {
+ *r += HI_RESET;
+ t_ = NORMAL;
+ } else if (c != '*') {
+ t_ = SLASH_STAR;
+ }
+ break;
+
+ case DQUOTE:
+ *r += c;
+ if (c == '"') {
+ *r += HI_RESET;
+ t_ = NORMAL;
+ } else if (c == '\\') {
+ t_ = DQUOTE_BACKSLASH;
+ }
+ break;
+
+ case DQUOTE_BACKSLASH:
+ *r += c;
+ t_ = DQUOTE;
+ break;
+
+ default:
+ __builtin_unreachable();
+ }
+ if (bol_) {
+ if (!isspace(c))
+ bol_ = false;
+ } else {
+ if (c == '\n')
+ bol_ = true;
+ }
+ }
+}
+
+void HighlightLd::flush(std::string *r) {
+ switch (t_) {
+ case WORD:
+ if (cpp_) {
+ if (is_keyword_cpp(word_.data(), word_.size())) {
+ *r += HI_BUILTIN;
+ *r += word_;
+ *r += HI_RESET;
+ } else if (is_keyword_c_constant(word_.data(), word_.size())) {
+ *r += HI_CONSTANT;
+ *r += word_;
+ *r += HI_RESET;
+ } else {
+ *r += word_;
+ *r += HI_RESET;
+ }
+ } else {
+ if (is_keyword_ld(word_.data(), word_.size())) {
+ *r += HI_KEYWORD;
+ *r += word_;
+ *r += HI_RESET;
+ } else if (is_keyword_ld_builtin(word_.data(), word_.size())) {
+ *r += HI_BUILTIN;
+ *r += word_;
+ *r += HI_RESET;
+ } else if (is_keyword_ld_warning(word_.data(), word_.size())) {
+ *r += HI_WARNING;
+ *r += word_;
+ *r += HI_RESET;
+ } else {
+ *r += word_;
+ }
+ }
+ word_.clear();
+ break;
+ case SLASH:
+ *r += '/';
+ if (cpp_)
+ *r += HI_RESET;
+ break;
+ case DQUOTE:
+ case DQUOTE_BACKSLASH:
+ case SLASH_SLASH:
+ case SLASH_STAR:
+ case SLASH_STAR_STAR:
+ *r += HI_RESET;
+ break;
+ default:
+ if (cpp_)
+ *r += HI_RESET;
+ break;
+ }
+ cpp_ = false;
+ t_ = NORMAL;
+}
diff --git a/llamafile/highlight_test.cpp b/llamafile/highlight_test.cpp
index 9b58676f..8bfe5a0a 100644
--- a/llamafile/highlight_test.cpp
+++ b/llamafile/highlight_test.cpp
@@ -46,6 +46,7 @@ const char *const kLanguages[] = {
"javascript", //
"json", //
"kotlin", //
+ "ld", //
"lisp", //
"lua", //
"m4", //
diff --git a/llamafile/is_keyword_cpp.c b/llamafile/is_keyword_cpp.c
new file mode 100644
index 00000000..1211d524
--- /dev/null
+++ b/llamafile/is_keyword_cpp.c
@@ -0,0 +1,154 @@
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf --output-file=llamafile/is_keyword_cpp.c llamafile/is_keyword_cpp.gperf */
+/* Computed positions: -k'2,4,7' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646. */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>."
+#endif
+
+#line 1 "llamafile/is_keyword_cpp.gperf"
+
+#include <string.h>
+
+#define TOTAL_KEYWORDS 23
+#define MIN_WORD_LENGTH 2
+#define MAX_WORD_LENGTH 19
+#define MIN_HASH_VALUE 5
+#define MAX_HASH_VALUE 40
+/* maximum key range = 36, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (register const char *str, register size_t len)
+{
+ static const unsigned char asso_values[] =
+ {
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 5, 41, 10, 0, 0,
+ 5, 0, 5, 15, 41, 15, 41, 41, 5, 10,
+ 0, 10, 41, 41, 10, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41,
+ 41, 41, 41, 41, 41, 41
+ };
+ register unsigned int hval = len;
+
+ switch (hval)
+ {
+ default:
+ hval += asso_values[(unsigned char)str[6]];
+ /*FALLTHROUGH*/
+ case 6:
+ case 5:
+ case 4:
+ hval += asso_values[(unsigned char)str[3]];
+ /*FALLTHROUGH*/
+ case 3:
+ case 2:
+ hval += asso_values[(unsigned char)str[1]];
+ break;
+ }
+ return hval;
+}
+
+const char *
+is_keyword_cpp (register const char *str, register size_t len)
+{
+ static const char * const wordlist[] =
+ {
+ "", "", "", "", "",
+ "undef",
+ "",
+ "if",
+ "",
+ "else",
+ "ifdef",
+ "",
+ "include",
+ "",
+ "elif",
+ "embed",
+ "ifndef",
+ "include_next",
+ "elifndef",
+ "line",
+ "endif",
+ "define",
+ "elifdef",
+ "", "",
+ "error",
+ "import",
+ "defined",
+ "__has_builtin",
+ "",
+ "__has_extension",
+ "pragma",
+ "warning",
+ "",
+ "__has_cpp_attribute",
+ "", "", "", "", "",
+ "__has_attribute"
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ register unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register const char *s = wordlist[key];
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return s;
+ }
+ }
+ return 0;
+}
diff --git a/llamafile/is_keyword_cpp.gperf b/llamafile/is_keyword_cpp.gperf
new file mode 100644
index 00000000..186e7dc2
--- /dev/null
+++ b/llamafile/is_keyword_cpp.gperf
@@ -0,0 +1,31 @@
+%{
+#include <string.h>
+%}
+%compare-strncmp
+%language=ANSI-C
+%readonly-tables
+%define lookup-function-name is_keyword_cpp
+%%
+__has_attribute
+__has_builtin
+__has_cpp_attribute
+__has_extension
+define
+defined
+elif
+elifdef
+elifndef
+else
+embed
+endif
+error
+if
+ifdef
+ifndef
+import
+include
+include_next
+line
+pragma
+undef
+warning
diff --git a/llamafile/is_keyword_ld.c b/llamafile/is_keyword_ld.c
new file mode 100644
index 00000000..e9129fa4
--- /dev/null
+++ b/llamafile/is_keyword_ld.c
@@ -0,0 +1,363 @@
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf --output-file=llamafile/is_keyword_ld.c llamafile/is_keyword_ld.gperf */
+/* Computed positions: -k'1,3,$' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646. */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>."
+#endif
+
+#line 1 "llamafile/is_keyword_ld.gperf"
+
+#include <string.h>
+
+#define TOTAL_KEYWORDS 69
+#define MIN_WORD_LENGTH 2
+#define MAX_WORD_LENGTH 25
+#define MIN_HASH_VALUE 6
+#define MAX_HASH_VALUE 142
+/* maximum key range = 137, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (register const char *str, register size_t len)
+{
+ static const unsigned char asso_values[] =
+ {
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 5, 0, 45, 25, 35,
+ 40, 65, 0, 55, 143, 60, 15, 25, 10, 10,
+ 0, 20, 0, 0, 10, 10, 65, 0, 143, 55,
+ 143, 143, 143, 143, 143, 0, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143, 143, 143, 143, 143,
+ 143, 143, 143, 143, 143, 143
+ };
+ register unsigned int hval = len;
+
+ switch (hval)
+ {
+ default:
+ hval += asso_values[(unsigned char)str[2]];
+ /*FALLTHROUGH*/
+ case 2:
+ case 1:
+ hval += asso_values[(unsigned char)str[0]];
+ break;
+ }
+ return hval + asso_values[(unsigned char)str[len - 1]];
+}
+
+const char *
+is_keyword_ld (register const char *str, register size_t len)
+{
+ struct stringpool_t
+ {
+ char stringpool_str6[sizeof("PT_TLS")];
+ char stringpool_str7[sizeof("PT_PHDR")];
+ char stringpool_str8[sizeof("PT_SHLIB")];
+ char stringpool_str9[sizeof("PT_INTERP")];
+ char stringpool_str12[sizeof("STARTUP")];
+ char stringpool_str14[sizeof("SORT")];
+ char stringpool_str15[sizeof("SEARCH_DIR")];
+ char stringpool_str17[sizeof("AT")];
+ char stringpool_str18[sizeof("SUBALIGN")];
+ char stringpool_str20[sizeof("AFTER")];
+ char stringpool_str21[sizeof("ASSERT")];
+ char stringpool_str22[sizeof("PT_NULL")];
+ char stringpool_str25[sizeof("SHORT")];
+ char stringpool_str26[sizeof("TARGET")];
+ char stringpool_str27[sizeof("SORT_BY_ALIGNMENT")];
+ char stringpool_str29[sizeof("PHDR")];
+ char stringpool_str30[sizeof("PHDRS")];
+ char stringpool_str31[sizeof("OUTPUT_ARCH")];
+ char stringpool_str32[sizeof("PT_LOAD")];
+ char stringpool_str34[sizeof("PROVIDE_HIDDEN")];
+ char stringpool_str35[sizeof("ONLY_IF_RW")];
+ char stringpool_str36[sizeof("OUTPUT")];
+ char stringpool_str37[sizeof("__DTOR_END__")];
+ char stringpool_str38[sizeof("__DTOR_LIST__")];
+ char stringpool_str39[sizeof("AS_NEEDED")];
+ char stringpool_str40[sizeof("SQUAD")];
+ char stringpool_str41[sizeof("HIDDEN")];
+ char stringpool_str42[sizeof("PT_NOTE")];
+ char stringpool_str43[sizeof("OUTPUT_FORMAT")];
+ char stringpool_str44[sizeof("SORT_NONE")];
+ char stringpool_str45[sizeof("ONLY_IF_RO")];
+ char stringpool_str47[sizeof("SORT_BY_NAME")];
+ char stringpool_str49[sizeof("BYTE")];
+ char stringpool_str50[sizeof("FLAGS")];
+ char stringpool_str52[sizeof("PROVIDE")];
+ char stringpool_str53[sizeof("SECTIONS")];
+ char stringpool_str54[sizeof("QUAD")];
+ char stringpool_str55[sizeof("PT_DYNAMIC")];
+ char stringpool_str56[sizeof("NOLOAD")];
+ char stringpool_str57[sizeof("__CTOR_END__")];
+ char stringpool_str58[sizeof("__CTOR_LIST__")];
+ char stringpool_str60[sizeof("LD_FEATURE")];
+ char stringpool_str61[sizeof("EXTERN")];
+ char stringpool_str62[sizeof("FILEHDR")];
+ char stringpool_str66[sizeof("NOCROSSREFS")];
+ char stringpool_str67[sizeof("CONSTRUCTORS")];
+ char stringpool_str70[sizeof("INPUT")];
+ char stringpool_str71[sizeof("INSERT")];
+ char stringpool_str72[sizeof("PT_GNU_STACK")];
+ char stringpool_str73[sizeof("FORCE_COMMON_ALLOCATION")];
+ char stringpool_str74[sizeof("FILL")];
+ char stringpool_str75[sizeof("DSECT")];
+ char stringpool_str76[sizeof("SORT_BY_INIT_PRIORITY")];
+ char stringpool_str77[sizeof("REGION_ALIAS")];
+ char stringpool_str79[sizeof("NOCROSSREFS_TO")];
+ char stringpool_str80[sizeof("GROUP")];
+ char stringpool_str81[sizeof("BEFORE")];
+ char stringpool_str82[sizeof("VERSION")];
+ char stringpool_str86[sizeof("COMMON")];
+ char stringpool_str90[sizeof("INHIBIT_COMMON_ALLOCATION")];
+ char stringpool_str94[sizeof("LONG")];
+ char stringpool_str99[sizeof("KEEP")];
+ char stringpool_str101[sizeof("CREATE_OBJECT_SYMBOLS")];
+ char stringpool_str104[sizeof("COPY")];
+ char stringpool_str105[sizeof("ENTRY")];
+ char stringpool_str107[sizeof("OVERLAY")];
+ char stringpool_str109[sizeof("INFO")];
+ char stringpool_str111[sizeof("MEMORY")];
+ char stringpool_str142[sizeof("INCLUDE")];
+ };
+ static const struct stringpool_t stringpool_contents =
+ {
+ "PT_TLS",
+ "PT_PHDR",
+ "PT_SHLIB",
+ "PT_INTERP",
+ "STARTUP",
+ "SORT",
+ "SEARCH_DIR",
+ "AT",
+ "SUBALIGN",
+ "AFTER",
+ "ASSERT",
+ "PT_NULL",
+ "SHORT",
+ "TARGET",
+ "SORT_BY_ALIGNMENT",
+ "PHDR",
+ "PHDRS",
+ "OUTPUT_ARCH",
+ "PT_LOAD",
+ "PROVIDE_HIDDEN",
+ "ONLY_IF_RW",
+ "OUTPUT",
+ "__DTOR_END__",
+ "__DTOR_LIST__",
+ "AS_NEEDED",
+ "SQUAD",
+ "HIDDEN",
+ "PT_NOTE",
+ "OUTPUT_FORMAT",
+ "SORT_NONE",
+ "ONLY_IF_RO",
+ "SORT_BY_NAME",
+ "BYTE",
+ "FLAGS",
+ "PROVIDE",
+ "SECTIONS",
+ "QUAD",
+ "PT_DYNAMIC",
+ "NOLOAD",
+ "__CTOR_END__",
+ "__CTOR_LIST__",
+ "LD_FEATURE",
+ "EXTERN",
+ "FILEHDR",
+ "NOCROSSREFS",
+ "CONSTRUCTORS",
+ "INPUT",
+ "INSERT",
+ "PT_GNU_STACK",
+ "FORCE_COMMON_ALLOCATION",
+ "FILL",
+ "DSECT",
+ "SORT_BY_INIT_PRIORITY",
+ "REGION_ALIAS",
+ "NOCROSSREFS_TO",
+ "GROUP",
+ "BEFORE",
+ "VERSION",
+ "COMMON",
+ "INHIBIT_COMMON_ALLOCATION",
+ "LONG",
+ "KEEP",
+ "CREATE_OBJECT_SYMBOLS",
+ "COPY",
+ "ENTRY",
+ "OVERLAY",
+ "INFO",
+ "MEMORY",
+ "INCLUDE"
+ };
+ #define stringpool ((const char *) &stringpool_contents)
+ static const int wordlist[] =
+ {
+ -1, -1, -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str6,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str7,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str8,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str9,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str12,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str14,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str15,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str17,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str18,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str20,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str21,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str22,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str25,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str26,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str27,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str29,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str30,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str31,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str32,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str34,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str35,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str36,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str37,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str38,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str39,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str40,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str41,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str42,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str43,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str44,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str45,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str47,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str49,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str50,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str52,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str53,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str54,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str55,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str56,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str57,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str58,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str60,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str61,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str62,
+ -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str66,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str67,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str70,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str71,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str72,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str73,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str74,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str75,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str76,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str77,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str79,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str80,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str81,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str82,
+ -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str86,
+ -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str90,
+ -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str94,
+ -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str99,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str101,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str104,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str105,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str107,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str109,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str111,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str142
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ register unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register int o = wordlist[key];
+ if (o >= 0)
+ {
+ register const char *s = o + stringpool;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return s;
+ }
+ }
+ }
+ return 0;
+}
diff --git a/llamafile/is_keyword_ld.gperf b/llamafile/is_keyword_ld.gperf
new file mode 100644
index 00000000..87b63caa
--- /dev/null
+++ b/llamafile/is_keyword_ld.gperf
@@ -0,0 +1,78 @@
+%{
+#include <string.h>
+%}
+%pic
+%compare-strncmp
+%language=ANSI-C
+%readonly-tables
+%define lookup-function-name is_keyword_ld
+%%
+AFTER
+ASSERT
+AS_NEEDED
+AT
+BEFORE
+BYTE
+COMMON
+CONSTRUCTORS
+COPY
+CREATE_OBJECT_SYMBOLS
+DSECT
+ENTRY
+EXTERN
+FILEHDR
+FILL
+FLAGS
+FORCE_COMMON_ALLOCATION
+GROUP
+HIDDEN
+INCLUDE
+INFO
+INHIBIT_COMMON_ALLOCATION
+INPUT
+INSERT
+KEEP
+LD_FEATURE
+LONG
+MEMORY
+NOCROSSREFS
+NOCROSSREFS_TO
+NOLOAD
+ONLY_IF_RO
+ONLY_IF_RW
+OUTPUT
+OUTPUT_ARCH
+OUTPUT_FORMAT
+OVERLAY
+PHDR
+PHDRS
+PROVIDE
+PROVIDE_HIDDEN
+PT_DYNAMIC
+PT_GNU_STACK
+PT_INTERP
+PT_LOAD
+PT_NOTE
+PT_NULL
+PT_PHDR
+PT_SHLIB
+PT_TLS
+QUAD
+REGION_ALIAS
+SEARCH_DIR
+SECTIONS
+SHORT
+SORT
+SORT_BY_ALIGNMENT
+SORT_BY_INIT_PRIORITY
+SORT_BY_NAME
+SORT_NONE
+SQUAD
+STARTUP
+SUBALIGN
+TARGET
+VERSION
+__CTOR_END__
+__CTOR_LIST__
+__DTOR_END__
+__DTOR_LIST__
diff --git a/llamafile/is_keyword_ld_builtin.c b/llamafile/is_keyword_ld_builtin.c
new file mode 100644
index 00000000..c7597715
--- /dev/null
+++ b/llamafile/is_keyword_ld_builtin.c
@@ -0,0 +1,208 @@
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf --output-file=llamafile/is_keyword_ld_builtin.c llamafile/is_keyword_ld_builtin.gperf */
+/* Computed positions: -k'$' */
+
+#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+/* The character set is not based on ISO-646. */
+#error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>."
+#endif
+
+#line 1 "llamafile/is_keyword_ld_builtin.gperf"
+
+#include <string.h>
+
+#define TOTAL_KEYWORDS 27
+#define MIN_WORD_LENGTH 1
+#define MAX_WORD_LENGTH 22
+#define MIN_HASH_VALUE 1
+#define MAX_HASH_VALUE 38
+/* maximum key range = 38, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static unsigned int
+hash (register const char *str, register size_t len)
+{
+ static const unsigned char asso_values[] =
+ {
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 0, 15,
+ 5, 39, 30, 39, 39, 5, 30, 39, 0, 39,
+ 39, 39, 20, 5, 0, 39, 39, 39, 6, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 28, 39, 39, 39, 39, 20, 39,
+ 30, 0, 39, 39, 39, 0, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39, 39, 39, 39, 39,
+ 39, 39, 39, 39, 39, 39
+ };
+ return len + asso_values[(unsigned char)str[len - 1]];
+}
+
+const char *
+is_keyword_ld_builtin (register const char *str, register size_t len)
+{
+ struct stringpool_t
+ {
+ char stringpool_str1[sizeof("o")];
+ char stringpool_str3[sizeof("MIN")];
+ char stringpool_str4[sizeof("NEXT")];
+ char stringpool_str5[sizeof("ALIGN")];
+ char stringpool_str6[sizeof("ORIGIN")];
+ char stringpool_str7[sizeof("DEFINED")];
+ char stringpool_str8[sizeof("CONSTANT")];
+ char stringpool_str9[sizeof("MAX")];
+ char stringpool_str10[sizeof("BLOCK")];
+ char stringpool_str11[sizeof("SIZEOF")];
+ char stringpool_str12[sizeof("ALIGNOF")];
+ char stringpool_str13[sizeof("SEGMENT_START")];
+ char stringpool_str14[sizeof("sizeof_headers")];
+ char stringpool_str16[sizeof("DATA_SEGMENT_END")];
+ char stringpool_str18[sizeof("DATA_SEGMENT_ALIGN")];
+ char stringpool_str19[sizeof("SIZEOF_HEADERS")];
+ char stringpool_str21[sizeof("l")];
+ char stringpool_str22[sizeof("DATA_SEGMENT_RELRO_END")];
+ char stringpool_str23[sizeof("ABSOLUTE")];
+ char stringpool_str24[sizeof("ADDR")];
+ char stringpool_str26[sizeof("MAXPAGESIZE")];
+ char stringpool_str28[sizeof("LOADADDR")];
+ char stringpool_str29[sizeof("COMMONPAGESIZE")];
+ char stringpool_str31[sizeof("org")];
+ char stringpool_str33[sizeof("len")];
+ char stringpool_str36[sizeof("LENGTH")];
+ char stringpool_str38[sizeof("LOG2CEIL")];
+ };
+ static const struct stringpool_t stringpool_contents =
+ {
+ "o",
+ "MIN",
+ "NEXT",
+ "ALIGN",
+ "ORIGIN",
+ "DEFINED",
+ "CONSTANT",
+ "MAX",
+ "BLOCK",
+ "SIZEOF",
+ "ALIGNOF",
+ "SEGMENT_START",
+ "sizeof_headers",
+ "DATA_SEGMENT_END",
+ "DATA_SEGMENT_ALIGN",
+ "SIZEOF_HEADERS",
+ "l",
+ "DATA_SEGMENT_RELRO_END",
+ "ABSOLUTE",
+ "ADDR",
+ "MAXPAGESIZE",
+ "LOADADDR",
+ "COMMONPAGESIZE",
+ "org",
+ "len",
+ "LENGTH",
+ "LOG2CEIL"
+ };
+ #define stringpool ((const char *) &stringpool_contents)
+ static const int wordlist[] =
+ {
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str1,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str3,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str4,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str5,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str6,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str7,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str8,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str9,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str10,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str11,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str12,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str13,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str14,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str16,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str18,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str19,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str21,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str22,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str23,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str24,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str26,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str28,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str29,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str31,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str33,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str36,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str38
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ register unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register int o = wordlist[key];
+ if (o >= 0)
+ {
+ register const char *s = o + stringpool;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return s;
+ }
+ }
+ }
+ return 0;
+}
diff --git a/llamafile/is_keyword_ld_builtin.gperf b/llamafile/is_keyword_ld_builtin.gperf
new file mode 100644
index 00000000..6f63b10d
--- /dev/null
+++ b/llamafile/is_keyword_ld_builtin.gperf
@@ -0,0 +1,36 @@
+%{
+#include <string.h>
+%}
+%pic
+%compare-strncmp
+%language=ANSI-C
+%readonly-tables
+%define lookup-function-name is_keyword_ld_builtin
+%%
+ABSOLUTE
+ADDR
+ALIGN
+ALIGNOF
+BLOCK
+COMMONPAGESIZE
+CONSTANT
+DATA_SEGMENT_ALIGN
+DATA_SEGMENT_END
+DATA_SEGMENT_RELRO_END
+DEFINED
+LENGTH
+LOADADDR
+LOG2CEIL
+MAX
+MAXPAGESIZE
+MIN
+NEXT
+ORIGIN
+SEGMENT_START
+SIZEOF
+SIZEOF_HEADERS
+l
+len
+o
+org
+sizeof_headers
diff --git a/llamafile/is_keyword_ld_warning.c b/llamafile/is_keyword_ld_warning.c
new file mode 100644
index 00000000..62351239
--- /dev/null
+++ b/llamafile/is_keyword_ld_warning.c
@@ -0,0 +1,73 @@
+/* ANSI-C code produced by gperf version 3.1 */
+/* Command-line: gperf --output-file=llamafile/is_keyword_ld_warning.c llamafile/is_keyword_ld_warning.gperf */
+/* Computed positions: -k'' */
+
+#line 1 "llamafile/is_keyword_ld_warning.gperf"
+
+#include <string.h>
+
+#define TOTAL_KEYWORDS 3
+#define MIN_WORD_LENGTH 5
+#define MAX_WORD_LENGTH 12
+#define MIN_HASH_VALUE 5
+#define MAX_HASH_VALUE 12
+/* maximum key range = 8, duplicates = 0 */
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+/*ARGSUSED*/
+static unsigned int
+hash (register const char *str, register size_t len)
+{
+ return len;
+}
+
+const char *
+is_keyword_ld_warning (register const char *str, register size_t len)
+{
+ struct stringpool_t
+ {
+ char stringpool_str5[sizeof(":NONE")];
+ char stringpool_str9[sizeof("/DISCARD/")];
+ char stringpool_str12[sizeof("EXCLUDE_FILE")];
+ };
+ static const struct stringpool_t stringpool_contents =
+ {
+ ":NONE",
+ "/DISCARD/",
+ "EXCLUDE_FILE"
+ };
+ #define stringpool ((const char *) &stringpool_contents)
+ static const int wordlist[] =
+ {
+ -1, -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str5,
+ -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str9,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str12
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ register unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ register int o = wordlist[key];
+ if (o >= 0)
+ {
+ register const char *s = o + stringpool;
+
+ if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
+ return s;
+ }
+ }
+ }
+ return 0;
+}
diff --git a/llamafile/is_keyword_ld_warning.gperf b/llamafile/is_keyword_ld_warning.gperf
new file mode 100644
index 00000000..c8099785
--- /dev/null
+++ b/llamafile/is_keyword_ld_warning.gperf
@@ -0,0 +1,12 @@
+%{
+#include <string.h>
+%}
+%pic
+%compare-strncmp
+%language=ANSI-C
+%readonly-tables
+%define lookup-function-name is_keyword_ld_warning
+%%
+/DISCARD/
+:NONE
+EXCLUDE_FILE
diff --git a/llamafile/is_keyword_lisp.c b/llamafile/is_keyword_lisp.c
index 2f42c1df..f22cab2a 100644
--- a/llamafile/is_keyword_lisp.c
+++ b/llamafile/is_keyword_lisp.c
@@ -35,12 +35,12 @@
#include <libc/str/tab.h>
#define GPERF_DOWNCASE
-#define TOTAL_KEYWORDS 107
+#define TOTAL_KEYWORDS 108
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 28
-#define MIN_HASH_VALUE 3
-#define MAX_HASH_VALUE 311
-/* maximum key range = 309, duplicates = 0 */
+#define MIN_HASH_VALUE 8
+#define MAX_HASH_VALUE 349
+/* maximum key range = 342, duplicates = 0 */
#ifndef GPERF_DOWNCASE
#define GPERF_DOWNCASE 1
@@ -99,32 +99,32 @@ hash (register const char *str, register size_t len)
{
static const unsigned short asso_values[] =
{
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 55, 312, 312, 25, 312, 312, 312, 10,
- 25, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 62, 0, 10, 5, 0,
- 75, 60, 70, 20, 312, 0, 50, 40, 65, 10,
- 30, 312, 90, 5, 0, 95, 20, 0, 10, 0,
- 312, 312, 312, 312, 312, 312, 312, 62, 0, 10,
- 5, 0, 75, 60, 70, 20, 312, 0, 50, 40,
- 65, 10, 30, 312, 90, 5, 0, 95, 20, 0,
- 10, 0, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312, 312, 312, 312, 312,
- 312, 312, 312, 312, 312, 312
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 55, 350, 350, 0, 350, 350, 350, 10,
+ 15, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 115, 0, 10, 5, 0,
+ 110, 75, 40, 15, 350, 5, 125, 30, 0, 25,
+ 0, 350, 60, 20, 5, 30, 5, 15, 0, 0,
+ 350, 350, 350, 350, 350, 350, 350, 115, 0, 10,
+ 5, 0, 110, 75, 40, 15, 350, 5, 125, 30,
+ 0, 25, 0, 350, 60, 20, 5, 30, 5, 15,
+ 0, 0, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
+ 350, 350, 350, 350, 350, 350
};
register unsigned int hval = len;
@@ -153,390 +153,397 @@ is_keyword_lisp (register const char *str, register size_t len)
{
struct stringpool_t
{
- char stringpool_str3[sizeof("the")];
- char stringpool_str7[sizeof("tagbody")];
- char stringpool_str8[sizeof("typecase")];
- char stringpool_str10[sizeof("ecase")];
- char stringpool_str12[sizeof("deftype")];
- char stringpool_str13[sizeof("deftheme")];
+ char stringpool_str8[sizeof("the")];
+ char stringpool_str9[sizeof("defn")];
+ char stringpool_str12[sizeof("tagbody")];
+ char stringpool_str13[sizeof("typecase")];
char stringpool_str14[sizeof("case")];
- char stringpool_str15[sizeof("block")];
- char stringpool_str17[sizeof("do")];
- char stringpool_str18[sizeof("defsubst")];
- char stringpool_str20[sizeof("ccase")];
- char stringpool_str23[sizeof("defconst")];
+ char stringpool_str17[sizeof("deftype")];
+ char stringpool_str18[sizeof("deftheme")];
+ char stringpool_str19[sizeof("when")];
+ char stringpool_str20[sizeof("block")];
+ char stringpool_str21[sizeof("ert-deftest")];
char stringpool_str24[sizeof("cond")];
- char stringpool_str26[sizeof("defconstant")];
- char stringpool_str28[sizeof("destructuring-bind")];
- char stringpool_str29[sizeof("defstruct")];
+ char stringpool_str25[sizeof("ecase")];
+ char stringpool_str26[sizeof("define")];
+ char stringpool_str29[sizeof("etypecase")];
char stringpool_str30[sizeof("check-type")];
char stringpool_str31[sizeof("dolist")];
- char stringpool_str36[sizeof("ert-deftest")];
- char stringpool_str37[sizeof("dotimes")];
- char stringpool_str38[sizeof("define-widget")];
- char stringpool_str39[sizeof("condition-case")];
- char stringpool_str44[sizeof("etypecase")];
- char stringpool_str48[sizeof("ignore-errors")];
- char stringpool_str49[sizeof("define-derived-mode")];
- char stringpool_str53[sizeof("let")];
- char stringpool_str54[sizeof("ctypecase")];
- char stringpool_str55[sizeof("while")];
- char stringpool_str58[sizeof("define-inline")];
- char stringpool_str59[sizeof("define-symbol-macro")];
- char stringpool_str60[sizeof("symbol-macrolet")];
- char stringpool_str61[sizeof("labels")];
- char stringpool_str62[sizeof("declare")];
+ char stringpool_str32[sizeof("do")];
+ char stringpool_str33[sizeof("defconst")];
+ char stringpool_str35[sizeof("ccase")];
+ char stringpool_str36[sizeof("defconstant")];
+ char stringpool_str38[sizeof("destructuring-bind")];
+ char stringpool_str39[sizeof("ctypecase")];
+ char stringpool_str40[sizeof("defun")];
+ char stringpool_str43[sizeof("defsubst")];
+ char stringpool_str44[sizeof("define-derived-mode")];
+ char stringpool_str46[sizeof("define-condition")];
+ char stringpool_str47[sizeof("dotimes")];
+ char stringpool_str48[sizeof("define-inline")];
+ char stringpool_str49[sizeof("defstruct")];
+ char stringpool_str53[sizeof("define-widget")];
+ char stringpool_str54[sizeof("condition-case")];
+ char stringpool_str55[sizeof("define-skeleton")];
+ char stringpool_str56[sizeof("unless")];
+ char stringpool_str57[sizeof("handler-case")];
+ char stringpool_str59[sizeof("multiple-value-bind")];
+ char stringpool_str61[sizeof("cl-defsubst")];
+ char stringpool_str62[sizeof("handler-bind")];
char stringpool_str63[sizeof("do*")];
- char stringpool_str64[sizeof("multiple-value-bind")];
- char stringpool_str66[sizeof("define-compiler-macro")];
- char stringpool_str67[sizeof("break")];
- char stringpool_str68[sizeof("assert")];
- char stringpool_str69[sizeof("defmethod")];
- char stringpool_str70[sizeof("multiple-value-prog1")];
- char stringpool_str72[sizeof("go")];
- char stringpool_str73[sizeof("defmacro")];
- char stringpool_str74[sizeof("defcustom")];
- char stringpool_str79[sizeof("flet")];
- char stringpool_str82[sizeof("define-minor-mode")];
- char stringpool_str84[sizeof("with-open-file")];
- char stringpool_str85[sizeof("defalias")];
- char stringpool_str86[sizeof("defadvice")];
- char stringpool_str87[sizeof("defface")];
- char stringpool_str91[sizeof("defvaralias")];
- char stringpool_str92[sizeof("defsetf")];
+ char stringpool_str64[sizeof("unwind-protect")];
+ char stringpool_str65[sizeof("multiple-value-prog1")];
+ char stringpool_str67[sizeof("define-minor-mode")];
+ char stringpool_str69[sizeof("with-open-file")];
+ char stringpool_str70[sizeof("symbol-macrolet")];
+ char stringpool_str73[sizeof("ignore-errors")];
+ char stringpool_str74[sizeof("defmethod")];
+ char stringpool_str75[sizeof("define-method-combination")];
+ char stringpool_str76[sizeof("define-compiler-macro")];
+ char stringpool_str77[sizeof("restart-case")];
+ char stringpool_str78[sizeof("proclaim")];
+ char stringpool_str79[sizeof("defcustom")];
+ char stringpool_str80[sizeof("progn")];
+ char stringpool_str82[sizeof("restart-bind")];
+ char stringpool_str84[sizeof("define-symbol-macro")];
+ char stringpool_str85[sizeof("progv")];
+ char stringpool_str87[sizeof("compiler-let")];
+ char stringpool_str88[sizeof("defgroup")];
+ char stringpool_str90[sizeof("prog1")];
+ char stringpool_str93[sizeof("defmacro")];
char stringpool_str94[sizeof("define-modify-macro")];
- char stringpool_str95[sizeof("with-slots")];
- char stringpool_str97[sizeof("if")];
+ char stringpool_str95[sizeof("prog2")];
+ char stringpool_str96[sizeof("return")];
+ char stringpool_str98[sizeof("with-condition-restarts")];
char stringpool_str99[sizeof("with-accessors")];
- char stringpool_str100[sizeof("define-advice")];
- char stringpool_str102[sizeof("declaim")];
- char stringpool_str104[sizeof("define-generic-mode")];
- char stringpool_str105[sizeof("prog1")];
- char stringpool_str106[sizeof("unless")];
- char stringpool_str107[sizeof("defpackage")];
- char stringpool_str109[sizeof("define-global-minor-mode")];
- char stringpool_str110[sizeof("define-skeleton")];
- char stringpool_str112[sizeof("handler-case")];
- char stringpool_str113[sizeof("define-globalized-minor-mode")];
- char stringpool_str114[sizeof("loop")];
- char stringpool_str115[sizeof("progv")];
- char stringpool_str116[sizeof("define-condition")];
- char stringpool_str117[sizeof("handler-bind")];
- char stringpool_str118[sizeof("lambda")];
- char stringpool_str119[sizeof("locally")];
- char stringpool_str120[sizeof("prog2")];
- char stringpool_str121[sizeof("cl-defsubst")];
- char stringpool_str122[sizeof("in-package")];
- char stringpool_str124[sizeof("eval-when")];
- char stringpool_str126[sizeof("with-open-stream")];
- char stringpool_str127[sizeof("restart-case")];
- char stringpool_str128[sizeof("proclaim")];
- char stringpool_str129[sizeof("with-simple-restart")];
- char stringpool_str131[sizeof("with-compilation-unit")];
- char stringpool_str132[sizeof("restart-bind")];
- char stringpool_str133[sizeof("defgroup")];
- char stringpool_str134[sizeof("when")];
- char stringpool_str135[sizeof("flet*")];
- char stringpool_str137[sizeof("defvar-local")];
- char stringpool_str138[sizeof("macrolet")];
- char stringpool_str139[sizeof("defn")];
- char stringpool_str140[sizeof("define-setf-expander")];
- char stringpool_str142[sizeof("compiler-let")];
- char stringpool_str150[sizeof("prog*")];
- char stringpool_str151[sizeof("with-output-to-string")];
+ char stringpool_str101[sizeof("with-open-stream")];
+ char stringpool_str102[sizeof("go")];
+ char stringpool_str107[sizeof("defparameter")];
+ char stringpool_str108[sizeof("macrolet")];
+ char stringpool_str109[sizeof("with-simple-restart")];
+ char stringpool_str110[sizeof("with-slots")];
+ char stringpool_str111[sizeof("with-compilation-unit")];
+ char stringpool_str114[sizeof("define-generic-mode")];
+ char stringpool_str119[sizeof("define-global-minor-mode")];
+ char stringpool_str120[sizeof("define-setf-expander")];
+ char stringpool_str122[sizeof("defface")];
+ char stringpool_str123[sizeof("define-globalized-minor-mode")];
+ char stringpool_str124[sizeof("flet")];
+ char stringpool_str125[sizeof("break")];
+ char stringpool_str126[sizeof("assert")];
+ char stringpool_str127[sizeof("if")];
+ char stringpool_str129[sizeof("loop")];
+ char stringpool_str130[sizeof("defpackage")];
+ char stringpool_str133[sizeof("let")];
+ char stringpool_str134[sizeof("eval-when")];
+ char stringpool_str135[sizeof("prog*")];
+ char stringpool_str137[sizeof("declare")];
+ char stringpool_str139[sizeof("defadvice")];
+ char stringpool_str140[sizeof("in-package")];
+ char stringpool_str142[sizeof("defsetf")];
+ char stringpool_str145[sizeof("while")];
+ char stringpool_str146[sizeof("with-package-iterator")];
+ char stringpool_str148[sizeof("define-advice")];
+ char stringpool_str151[sizeof("labels")];
+ char stringpool_str152[sizeof("with-input-from-string")];
char stringpool_str154[sizeof("prog")];
- char stringpool_str155[sizeof("define-method-combination")];
- char stringpool_str159[sizeof("unwind-protect")];
- char stringpool_str160[sizeof("progn")];
- char stringpool_str163[sizeof("with-condition-restarts")];
- char stringpool_str164[sizeof("let*")];
- char stringpool_str165[sizeof("with-standard-io-syntax")];
- char stringpool_str170[sizeof("defun")];
- char stringpool_str175[sizeof("defgeneric")];
- char stringpool_str177[sizeof("defparameter")];
- char stringpool_str182[sizeof("with-input-from-string")];
- char stringpool_str189[sizeof("with-hash-table-iterator")];
- char stringpool_str191[sizeof("with-package-iterator")];
- char stringpool_str204[sizeof("letf")];
- char stringpool_str256[sizeof("return")];
- char stringpool_str311[sizeof("return-from")];
+ char stringpool_str156[sizeof("with-output-to-string")];
+ char stringpool_str159[sizeof("with-hash-table-iterator")];
+ char stringpool_str160[sizeof("defgeneric")];
+ char stringpool_str166[sizeof("defvaralias")];
+ char stringpool_str167[sizeof("declaim")];
+ char stringpool_str168[sizeof("defalias")];
+ char stringpool_str175[sizeof("flet*")];
+ char stringpool_str193[sizeof("with-standard-io-syntax")];
+ char stringpool_str239[sizeof("let*")];
+ char stringpool_str241[sizeof("return-from")];
+ char stringpool_str246[sizeof("lambda")];
+ char stringpool_str247[sizeof("locally")];
+ char stringpool_str272[sizeof("defvar-local")];
+ char stringpool_str349[sizeof("letf")];
};
static const struct stringpool_t stringpool_contents =
{
"the",
+ "defn",
"tagbody",
"typecase",
- "ecase",
+ "case",
"deftype",
"deftheme",
- "case",
+ "when",
"block",
+ "ert-deftest",
+ "cond",
+ "ecase",
+ "define",
+ "etypecase",
+ "check-type",
+ "dolist",
"do",
- "defsubst",
- "ccase",
"defconst",
- "cond",
+ "ccase",
"defconstant",
"destructuring-bind",
- "defstruct",
- "check-type",
- "dolist",
- "ert-deftest",
+ "ctypecase",
+ "defun",
+ "defsubst",
+ "define-derived-mode",
+ "define-condition",
"dotimes",
+ "define-inline",
+ "defstruct",
"define-widget",
"condition-case",
- "etypecase",
- "ignore-errors",
- "define-derived-mode",
- "let",
- "ctypecase",
- "while",
- "define-inline",
- "define-symbol-macro",
- "symbol-macrolet",
- "labels",
- "declare",
- "do*",
+ "define-skeleton",
+ "unless",
+ "handler-case",
"multiple-value-bind",
- "define-compiler-macro",
- "break",
- "assert",
- "defmethod",
+ "cl-defsubst",
+ "handler-bind",
+ "do*",
+ "unwind-protect",
"multiple-value-prog1",
- "go",
- "defmacro",
- "defcustom",
- "flet",
"define-minor-mode",
"with-open-file",
- "defalias",
- "defadvice",
- "defface",
- "defvaralias",
- "defsetf",
+ "symbol-macrolet",
+ "ignore-errors",
+ "defmethod",
+ "define-method-combination",
+ "define-compiler-macro",
+ "restart-case",
+ "proclaim",
+ "defcustom",
+ "progn",
+ "restart-bind",
+ "define-symbol-macro",
+ "progv",
+ "compiler-let",
+ "defgroup",
+ "prog1",
+ "defmacro",
"define-modify-macro",
- "with-slots",
- "if",
+ "prog2",
+ "return",
+ "with-condition-restarts",
"with-accessors",
- "define-advice",
- "declaim",
+ "with-open-stream",
+ "go",
+ "defparameter",
+ "macrolet",
+ "with-simple-restart",
+ "with-slots",
+ "with-compilation-unit",
"define-generic-mode",
- "prog1",
- "unless",
- "defpackage",
"define-global-minor-mode",
- "define-skeleton",
- "handler-case",
+ "define-setf-expander",
+ "defface",
"define-globalized-minor-mode",
+ "flet",
+ "break",
+ "assert",
+ "if",
"loop",
- "progv",
- "define-condition",
- "handler-bind",
- "lambda",
- "locally",
- "prog2",
- "cl-defsubst",
- "in-package",
+ "defpackage",
+ "let",
"eval-when",
- "with-open-stream",
- "restart-case",
- "proclaim",
- "with-simple-restart",
- "with-compilation-unit",
- "restart-bind",
- "defgroup",
- "when",
- "flet*",
- "defvar-local",
- "macrolet",
- "defn",
- "define-setf-expander",
- "compiler-let",
"prog*",
- "with-output-to-string",
- "prog",
- "define-method-combination",
- "unwind-protect",
- "progn",
- "with-condition-restarts",
- "let*",
- "with-standard-io-syntax",
- "defun",
- "defgeneric",
- "defparameter",
+ "declare",
+ "defadvice",
+ "in-package",
+ "defsetf",
+ "while",
+ "with-package-iterator",
+ "define-advice",
+ "labels",
"with-input-from-string",
+ "prog",
+ "with-output-to-string",
"with-hash-table-iterator",
- "with-package-iterator",
- "letf",
- "return",
- "return-from"
+ "defgeneric",
+ "defvaralias",
+ "declaim",
+ "defalias",
+ "flet*",
+ "with-standard-io-syntax",
+ "let*",
+ "return-from",
+ "lambda",
+ "locally",
+ "defvar-local",
+ "letf"
};
#define stringpool ((const char *) &stringpool_contents)
static const int wordlist[] =
{
- -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str3,
- -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str7,
+ -1, -1, -1, -1, -1, -1, -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str8,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str10,
- -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str9,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str12,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str13,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str14,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str15,
- -1,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str17,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str18,
- -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str19,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str20,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str21,
-1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str23,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str24,
- -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str25,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str26,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str28,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str29,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str30,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str31,
- -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str32,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str33,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str35,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str36,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str37,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str38,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str39,
- -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str40,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str43,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str44,
- -1, -1, -1,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str46,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str47,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str48,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str49,
-1, -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str53,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str54,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str55,
- -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str58,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str56,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str57,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str59,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str60,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str61,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str62,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str63,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str64,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str65,
-1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str66,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str67,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str68,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str69,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str70,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str72,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str73,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str74,
- -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str75,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str76,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str77,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str78,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str79,
- -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str80,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str82,
-1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str84,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str85,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str86,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str87,
- -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str91,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str92,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str88,
-1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str90,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str93,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str94,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str95,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str96,
-1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str97,
- -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str98,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str99,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str100,
-1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str101,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str102,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str104,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str105,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str106,
+ -1, -1, -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str107,
- -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str108,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str109,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str110,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str112,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str113,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str111,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str114,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str115,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str116,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str117,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str118,
+ -1, -1, -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str119,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str120,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str121,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str122,
-1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str122,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str123,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str124,
- -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str125,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str126,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str127,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str128,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str129,
-1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str131,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str132,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str129,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str130,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str133,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str134,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str135,
-1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str137,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str138,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str139,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str140,
-1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str142,
- -1, -1, -1, -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str150,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str151,
-1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str145,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str146,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str148,
+ -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str151,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str152,
+ -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str154,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str155,
- -1, -1, -1,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str156,
+ -1, -1,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str159,
(int)(size_t)&((struct stringpool_t *)0)->stringpool_str160,
- -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str163,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str164,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str165,
- -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str170,
- -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str175,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str177,
- -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str182,
+ -1, -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str166,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str167,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str168,
-1, -1, -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str189,
- -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str191,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str175,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str204,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str193,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str239,
+ -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str241,
+ -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str246,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str247,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str256,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str272,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
- (int)(size_t)&((struct stringpool_t *)0)->stringpool_str311
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ (int)(size_t)&((struct stringpool_t *)0)->stringpool_str349
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)