/* Table of keywords. */
-const char *keywords[T_N_KEYWORDS + 1] =
+const char *const keywords[T_N_KEYWORDS + 1] =
{
"AND", "OR", "NOT",
"EQ", "GE", "GT", "LE", "LT", "NE",
/* Recognizing identifiers. */
/* Returns true if C may be the first character in an
- identifier. */
+ identifier in the current locale. */
bool
lex_is_id1 (char c_)
{
return isalpha (c) || c == '@' || c == '#' || c == '$';
}
+
/* Returns true if C may be a character in an identifier other
than the first. */
bool
int
lex_id_to_token (const char *id, size_t len)
{
- const char **kwp;
+ const char *const *kwp;
if (len < 2 || len > 4)
return T_ID;