/* C code produced by gperf version 2.7.2 */
/* Command-line: gperf -C -c -S 1 -D -k '1,3,5,$' -t ./keyword.gperf  */
/* Autogenrated. */
#include "ksi.h"
struct ksi_keyword { const char *name; keyword_t id; };
#ifdef __GNUC__
__inline
#endif
static unsigned int hash(register const char *, 
			 register unsigned int);
#ifdef __GNUC__
__inline
#endif
static const struct ksi_keyword *in_word_set(register const char *, 
					     register unsigned int);

#define TOTAL_KEYWORDS 133
#define MIN_WORD_LENGTH 2
#define MAX_WORD_LENGTH 21
#define MIN_HASH_VALUE 12
#define MAX_HASH_VALUE 701
/* maximum key range = 690, duplicates = 2 */

#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
hash (str, len)
     register const char *str;
     register unsigned int len;
{
  static const unsigned short asso_values[] =
    {
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702,  95, 702,  60,  50,  25,
       30, 210,  80,  10,  15,  65, 702,  35, 185, 125,
      110, 170,  85,   5,   0,  45,   0,  15, 175,  10,
       20,  10,  15, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702, 702, 702, 702, 702,
      702, 702, 702, 702, 702, 702
    };
  register int hval = len;

  switch (hval)
    {
      default:
      case 5:
        hval += asso_values[(unsigned char)str[4]];
      case 4:
      case 3:
        hval += asso_values[(unsigned char)str[2]];
      case 2:
      case 1:
        hval += asso_values[(unsigned char)str[0]];
        break;
    }
  return hval + asso_values[(unsigned char)str[len - 1]];
}

#ifdef __GNUC__
__inline
#endif
const struct ksi_keyword *
in_word_set (str, len)
     register const char *str;
     register unsigned int len;
{
  static const struct ksi_keyword wordlist[] =
    {
      {"gt", kw_gt},
      {"ungt", kw_ungt},
      {"truth_or", kw_truth_or},
      {"truth_not", kw_truth_not},
      {"truth_xor", kw_truth_xor},
      {"int", kw_int},
      {"truth_and", kw_truth_and},
      {"struct", kw_struct},
      {"bit_xor", kw_bit_xor},
      {"trunc_mod", kw_trunc_mod},
      {"round_mod", kw_round_mod},
      {"ptr", kw_ptr},
      {"addr", kw_addr},
      {"rshift", kw_rshift},
      {"indirect", kw_indirect},
      {"weak", kw_weak},
      {"try_finally", kw_try_finally},
      {"return", kw_return},
      {"truth_orif", kw_truth_orif},
      {"truth_andif", kw_truth_andif},
      {"bit_ior", kw_bit_ior},
      {"uint", kw_uint},
      {"fix_trunc", kw_fix_trunc},
      {"fix_round", kw_fix_round},
      {"const", kw_const},
      {"bit_andtc", kw_bit_andtc},
      {"bit_and", kw_bit_and},
      {"plus", kw_plus},
      {"abs", kw_abs},
      {"suppress_debug", kw_suppress_debug},
      {"structdef", kw_structdef},
      {"ref", kw_ref},
      {"tyref", kw_tyref},
      {"bit_not", kw_bit_not},
      {"max", kw_max},
      {"cond", kw_cond},
      {"const_func", kw_const_func},
      {"ffs", kw_ffs},
      {"tyalias", kw_tyalias},
      {"var", kw_var},
      {"alias_set", kw_alias_set},
      {"static_var", kw_static_var},
      {"static_ctor", kw_static_ctor},
      {"static_dtor", kw_static_dtor},
      {"alias_subset", kw_alias_subset},
      {"goto", kw_goto},
      {"lt", kw_lt},
      {"fix_floor", kw_fix_floor},
      {"postdec", kw_postdec},
      {"bind", kw_bind},
      {"unlt", kw_unlt},
      {"pure_func", kw_pure_func},
      {"comdat", kw_comdat},
      {"eq", kw_eq},
      {"func", kw_func},
      {"ge", kw_ge},
      {"ceil_mod", kw_ceil_mod},
      {"trunc_div", kw_trunc_div},
      {"postinc", kw_postinc},
      {"round_div", kw_round_div},
      {"public", kw_public},
      {"builtin", kw_builtin},
      {"uneq", kw_uneq},
      {"entry", kw_entry},
      {"result", kw_result},
      {"ordered", kw_ordered},
      {"unge", kw_unge},
      {"size_of", kw_size_of},
      {"rdiv", kw_rdiv},
      {"modify", kw_modify},
      {"section", kw_section},
      {"unordered", kw_unordered},
      {"float", kw_float},
      {"float_expr", kw_float_expr},
      {"aligned", kw_aligned},
      {"void", kw_void},
      {"uniondef", kw_uniondef},
      {"exit", kw_exit},
      {"nop", kw_nop},
      {"poly", kw_poly},
      {"lshift", kw_lshift},
      {"floor_mod", kw_floor_mod},
      {"func_ptr", kw_func_ptr},
      {"block", kw_block},
      {"reference", kw_reference},
      {"ptr_call", kw_ptr_call},
      {"union", kw_union},
      {"enumref", kw_enumref},
      {"mult", kw_mult},
      {"fix_ceil", kw_fix_ceil},
      {"no_limit_stack", kw_no_limit_stack},
      {"ne", kw_ne},
      {"extern", kw_extern},
      {"abstract_type", kw_abstract_type},
      {"component", kw_component},
      {"minus", kw_minus},
      {"artificial", kw_artificial},
      {"negate", kw_negate},
      {"enumdef", kw_enumdef},
      {"min", kw_min},
      {"convert", kw_convert},
      {"packed", kw_packed},
      {"compound", kw_compound},
      {"ptr_fcall", kw_ptr_fcall},
      {"ceil_div", kw_ceil_div},
      {"input_file", kw_input_file},
      {"func_ref", kw_func_ref},
      {"wfl", kw_wfl},
      {"le", kw_le},
      {"fbuiltin", kw_fbuiltin},
      {"call", kw_call},
      {"bool", kw_bool},
      {"unle", kw_unle},
      {"global", kw_global},
      {"floor_div", kw_floor_div},
      {"preinc", kw_preinc},
      {"loop", kw_loop},
      {"rrotate", kw_rrotate},
      {"no_check_memory_usage", kw_no_check_memory_usage},
      {"exact_div", kw_exact_div},
      {"exit_loop", kw_exit_loop},
      {"nil", kw_nil},
      {"fcall", kw_fcall},
      {"export_name", kw_export_name},
      {"ellipsis", kw_ellipsis},
      {"no_return", kw_no_return},
      {"predec", kw_predec},
      {"one_only", kw_one_only},
      {"local", kw_local},
      {"label", kw_label},
      {"non_lvalue", kw_non_lvalue},
      {"lrotate", kw_lrotate},
      {"malloc_like", kw_malloc_like}
    };

  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
    {
      register int key = hash (str, len);

      if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
        {
          register const struct ksi_keyword *wordptr;
          register const struct ksi_keyword *wordendptr;
          register const struct ksi_keyword *resword;

          switch (key - 12)
            {
              case 0:
                resword = &wordlist[0];
                goto compare;
              case 17:
                resword = &wordlist[1];
                goto compare;
              case 26:
                resword = &wordlist[2];
                goto compare;
              case 27:
                wordptr = &wordlist[3];
                wordendptr = wordptr + 2;
                goto multicompare;
              case 56:
                resword = &wordlist[5];
                goto compare;
              case 57:
                resword = &wordlist[6];
                goto compare;
              case 64:
                resword = &wordlist[7];
                goto compare;
              case 65:
                resword = &wordlist[8];
                goto compare;
              case 67:
                resword = &wordlist[9];
                goto compare;
              case 72:
                resword = &wordlist[10];
                goto compare;
              case 76:
                resword = &wordlist[11];
                goto compare;
              case 82:
                resword = &wordlist[12];
                goto compare;
              case 89:
                resword = &wordlist[13];
                goto compare;
              case 91:
                resword = &wordlist[14];
                goto compare;
              case 97:
                resword = &wordlist[15];
                goto compare;
              case 99:
                resword = &wordlist[16];
                goto compare;
              case 104:
                resword = &wordlist[17];
                goto compare;
              case 108:
                resword = &wordlist[18];
                goto compare;
              case 109:
                resword = &wordlist[19];
                goto compare;
              case 110:
                resword = &wordlist[20];
                goto compare;
              case 117:
                resword = &wordlist[21];
                goto compare;
              case 122:
                resword = &wordlist[22];
                goto compare;
              case 127:
                resword = &wordlist[23];
                goto compare;
              case 128:
                resword = &wordlist[24];
                goto compare;
              case 132:
                resword = &wordlist[25];
                goto compare;
              case 135:
                resword = &wordlist[26];
                goto compare;
              case 137:
                resword = &wordlist[27];
                goto compare;
              case 141:
                resword = &wordlist[28];
                goto compare;
              case 142:
                resword = &wordlist[29];
                goto compare;
              case 147:
                resword = &wordlist[30];
                goto compare;
              case 151:
                resword = &wordlist[31];
                goto compare;
              case 153:
                resword = &wordlist[32];
                goto compare;
              case 155:
                resword = &wordlist[33];
                goto compare;
              case 156:
                resword = &wordlist[34];
                goto compare;
              case 157:
                resword = &wordlist[35];
                goto compare;
              case 158:
                resword = &wordlist[36];
                goto compare;
              case 161:
                resword = &wordlist[37];
                goto compare;
              case 165:
                resword = &wordlist[38];
                goto compare;
              case 166:
                resword = &wordlist[39];
                goto compare;
              case 167:
                resword = &wordlist[40];
                goto compare;
              case 168:
                resword = &wordlist[41];
                goto compare;
              case 169:
                wordptr = &wordlist[42];
                wordendptr = wordptr + 2;
                goto multicompare;
              case 170:
                resword = &wordlist[44];
                goto compare;
              case 172:
                resword = &wordlist[45];
                goto compare;
              case 175:
                resword = &wordlist[46];
                goto compare;
              case 177:
                resword = &wordlist[47];
                goto compare;
              case 180:
                resword = &wordlist[48];
                goto compare;
              case 182:
                resword = &wordlist[49];
                goto compare;
              case 192:
                resword = &wordlist[50];
                goto compare;
              case 202:
                resword = &wordlist[51];
                goto compare;
              case 204:
                resword = &wordlist[52];
                goto compare;
              case 205:
                resword = &wordlist[53];
                goto compare;
              case 207:
                resword = &wordlist[54];
                goto compare;
              case 210:
                resword = &wordlist[55];
                goto compare;
              case 211:
                resword = &wordlist[56];
                goto compare;
              case 212:
                resword = &wordlist[57];
                goto compare;
              case 215:
                resword = &wordlist[58];
                goto compare;
              case 217:
                resword = &wordlist[59];
                goto compare;
              case 219:
                resword = &wordlist[60];
                goto compare;
              case 220:
                resword = &wordlist[61];
                goto compare;
              case 222:
                resword = &wordlist[62];
                goto compare;
              case 223:
                resword = &wordlist[63];
                goto compare;
              case 224:
                resword = &wordlist[64];
                goto compare;
              case 225:
                resword = &wordlist[65];
                goto compare;
              case 227:
                resword = &wordlist[66];
                goto compare;
              case 230:
                resword = &wordlist[67];
                goto compare;
              case 232:
                resword = &wordlist[68];
                goto compare;
              case 239:
                resword = &wordlist[69];
                goto compare;
              case 240:
                resword = &wordlist[70];
                goto compare;
              case 242:
                resword = &wordlist[71];
                goto compare;
              case 243:
                resword = &wordlist[72];
                goto compare;
              case 248:
                resword = &wordlist[73];
                goto compare;
              case 260:
                resword = &wordlist[74];
                goto compare;
              case 262:
                resword = &wordlist[75];
                goto compare;
              case 266:
                resword = &wordlist[76];
                goto compare;
              case 267:
                resword = &wordlist[77];
                goto compare;
              case 271:
                resword = &wordlist[78];
                goto compare;
              case 272:
                resword = &wordlist[79];
                goto compare;
              case 274:
                resword = &wordlist[80];
                goto compare;
              case 277:
                resword = &wordlist[81];
                goto compare;
              case 281:
                resword = &wordlist[82];
                goto compare;
              case 283:
                resword = &wordlist[83];
                goto compare;
              case 287:
                resword = &wordlist[84];
                goto compare;
              case 291:
                resword = &wordlist[85];
                goto compare;
              case 293:
                resword = &wordlist[86];
                goto compare;
              case 300:
                resword = &wordlist[87];
                goto compare;
              case 302:
                resword = &wordlist[88];
                goto compare;
              case 306:
                resword = &wordlist[89];
                goto compare;
              case 307:
                resword = &wordlist[90];
                goto compare;
              case 310:
                resword = &wordlist[91];
                goto compare;
              case 314:
                resword = &wordlist[92];
                goto compare;
              case 316:
                resword = &wordlist[93];
                goto compare;
              case 317:
                resword = &wordlist[94];
                goto compare;
              case 318:
                resword = &wordlist[95];
                goto compare;
              case 323:
                resword = &wordlist[96];
                goto compare;
              case 324:
                resword = &wordlist[97];
                goto compare;
              case 330:
                resword = &wordlist[98];
                goto compare;
              case 336:
                resword = &wordlist[99];
                goto compare;
              case 340:
                resword = &wordlist[100];
                goto compare;
              case 344:
                resword = &wordlist[101];
                goto compare;
              case 346:
                resword = &wordlist[102];
                goto compare;
              case 347:
                resword = &wordlist[103];
                goto compare;
              case 356:
                resword = &wordlist[104];
                goto compare;
              case 358:
                resword = &wordlist[105];
                goto compare;
              case 361:
                resword = &wordlist[106];
                goto compare;
              case 371:
                resword = &wordlist[107];
                goto compare;
              case 385:
                resword = &wordlist[108];
                goto compare;
              case 386:
                resword = &wordlist[109];
                goto compare;
              case 387:
                resword = &wordlist[110];
                goto compare;
              case 397:
                resword = &wordlist[111];
                goto compare;
              case 402:
                resword = &wordlist[112];
                goto compare;
              case 419:
                resword = &wordlist[113];
                goto compare;
              case 422:
                resword = &wordlist[114];
                goto compare;
              case 424:
                resword = &wordlist[115];
                goto compare;
              case 432:
                resword = &wordlist[116];
                goto compare;
              case 435:
                resword = &wordlist[117];
                goto compare;
              case 439:
                resword = &wordlist[118];
                goto compare;
              case 442:
                resword = &wordlist[119];
                goto compare;
              case 452:
                resword = &wordlist[120];
                goto compare;
              case 471:
                resword = &wordlist[121];
                goto compare;
              case 503:
                resword = &wordlist[122];
                goto compare;
              case 504:
                resword = &wordlist[123];
                goto compare;
              case 521:
                resword = &wordlist[124];
                goto compare;
              case 522:
                resword = &wordlist[125];
                goto compare;
              case 524:
                resword = &wordlist[126];
                goto compare;
              case 556:
                resword = &wordlist[127];
                goto compare;
              case 573:
                resword = &wordlist[128];
                goto compare;
              case 598:
                resword = &wordlist[129];
                goto compare;
              case 613:
                resword = &wordlist[130];
                goto compare;
              case 620:
                resword = &wordlist[131];
                goto compare;
              case 689:
                resword = &wordlist[132];
                goto compare;
            }
          return 0;
        multicompare:
          while (wordptr < wordendptr)
            {
              register const char *s = wordptr->name;

              if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
                return wordptr;
              wordptr++;
            }
          return 0;
        compare:
          {
            register const char *s = resword->name;

            if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
              return resword;
          }
        }
    }
  return 0;
}

static const char *keyword_names[] = {
	"ERROR",
	"func_ptr",
	"float",
	"bool",
	"int",
	"uint",
	"poly",
	"ptr",
	"tyref",
	"ellipsis",
	"struct",
	"union",
	"void",
	"reference",
	"aligned",
	"artificial",
	"comdat",
	"extern",
	"global",
	"local",
	"malloc_like",
	"no_check_memory_usage",
	"no_limit_stack",
	"no_return",
	"one_only",
	"packed",
	"public",
	"pure_func",
	"section",
	"static_ctor",
	"static_dtor",
	"suppress_debug",
	"weak",
	"export_name",
	"alias_set",
	"func",
	"input_file",
	"structdef",
	"uniondef",
	"tyalias",
	"alias_subset",
	"abstract_type",
	"enumdef",
	"nil",
	"entry",
	"abs",
	"addr",
	"bind",
	"bit_and",
	"bit_andtc",
	"bit_ior",
	"bit_not",
	"bit_xor",
	"block",
	"builtin",
	"call",
	"ceil_div",
	"ceil_mod",
	"component",
	"compound",
	"cond",
	"const",
	"const_func",
	"convert",
	"eq",
	"exact_div",
	"exit",
	"exit_loop",
	"fbuiltin",
	"fcall",
	"ffs",
	"float_expr",
	"floor_div",
	"floor_mod",
	"func_ref",
	"ge",
	"goto",
	"gt",
	"indirect",
	"label",
	"le",
	"loop",
	"lrotate",
	"lshift",
	"lt",
	"max",
	"min",
	"minus",
	"modify",
	"mult",
	"ne",
	"negate",
	"non_lvalue",
	"nop",
	"ordered",
	"plus",
	"ptr_call",
	"ptr_fcall",
	"rdiv",
	"ref",
	"result",
	"return",
	"round_div",
	"round_mod",
	"rrotate",
	"rshift",
	"static_var",
	"trunc_div",
	"trunc_mod",
	"truth_and",
	"truth_andif",
	"truth_not",
	"truth_or",
	"truth_orif",
	"truth_xor",
	"uneq",
	"unge",
	"ungt",
	"unle",
	"unlt",
	"unordered",
	"var",
	"wfl",
	"fix_trunc",
	"fix_ceil",
	"fix_round",
	"fix_floor",
	"preinc",
	"postinc",
	"predec",
	"postdec",
	"size_of",
	"try_finally",
	"enumref",
	0
};

const char *keyword_name(keyword_t kw)
{
	int k = (int)kw;

	if (k <= kw__error || k >= kw__LAST)
		return keyword_names[0];
	else
		return keyword_names[kw];
}

keyword_t lookup_keyword(const char *ptr, int len)
{
	const struct ksi_keyword *w;

	w = in_word_set(ptr, len);

	if (w)
		return w->id;
	else
		return kw__error;
}
