static const struct keyword *in_word_set();
%}
-%struct-type
%readonly-tables
%language=ANSI-C
-%global-table
-%pic
+
+/* Note: the following options enable gperf-wordwrap.awk to do its thing */
+%define word-array-name wordlist_wrapped
+%null-strings
+%struct-type
struct keyword {
- int_least16_t name;
uint_least8_t token;
};
%%
return T_IDENT;
}
+
+static const char *wordlist_func(const struct keyword *k)
+{
+ unsigned x = k->token & 0x7f;
+
+ if (!x)
+ return NULL;
+
+ if (T_VOID >= 256)
+ x += 256;
+
+ return cdecl__token_name(x);
+}