|
|
1.1 root 1: /* C code produced by gperf version 2.5 (GNU C++ version) */ 1.1.1.4 ! root 2: /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ 1.1.1.2 root 3: /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ 1.1 root 4: struct resword { char *name; short token; enum rid rid;}; 5: 1.1.1.3 root 6: #define TOTAL_KEYWORDS 82 1.1 root 7: #define MIN_WORD_LENGTH 2 8: #define MAX_WORD_LENGTH 13 9: #define MIN_HASH_VALUE 4 1.1.1.3 root 10: #define MAX_HASH_VALUE 140 11: /* maximum key range = 137, duplicates = 0 */ 1.1 root 12: 13: #ifdef __GNUC__ 14: inline 15: #endif 16: static unsigned int 17: hash (str, len) 18: register char *str; 19: register int unsigned len; 20: { 21: static unsigned char asso_values[] = 22: { 1.1.1.3 root 23: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 24: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 25: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 26: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 27: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 28: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 29: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 30: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 31: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 32: 141, 141, 141, 141, 141, 0, 141, 49, 3, 28, 33: 28, 0, 5, 11, 32, 37, 141, 2, 24, 35, 34: 51, 0, 19, 141, 23, 0, 8, 48, 0, 36, 35: 0, 11, 141, 141, 141, 141, 141, 141, 1.1 root 36: }; 37: register int hval = len; 38: 39: switch (hval) 40: { 41: default: 42: case 7: 43: hval += asso_values[str[6]]; 44: case 6: 45: case 5: 46: case 4: 47: hval += asso_values[str[3]]; 48: case 3: 49: case 2: 50: case 1: 51: hval += asso_values[str[0]]; 52: } 53: return hval + asso_values[str[len - 1]]; 54: } 55: 56: #ifdef __GNUC__ 57: inline 58: #endif 59: struct resword * 60: is_reserved_word (str, len) 61: register char *str; 62: register unsigned int len; 63: { 64: static struct resword wordlist[] = 65: { 66: {"",}, {"",}, {"",}, {"",}, 67: {"else", ELSE, NORID,}, 68: {"",}, {"",}, 1.1.1.4 ! root 69: {"__asm__", GCC_ASM_KEYWORD, NORID}, 1.1.1.2 root 70: {"",}, {"",}, 71: {"__headof__", HEADOF, NORID}, 72: {"sizeof", SIZEOF, NORID,}, 1.1 root 73: {"this", THIS, NORID,}, 1.1.1.2 root 74: {"__headof", HEADOF, NORID}, 1.1 root 75: {"except", EXCEPT, NORID /* Extension */,}, 1.1.1.2 root 76: {"goto", GOTO, NORID,}, 77: {"",}, 1.1 root 78: {"__const__", TYPE_QUAL, RID_CONST}, 79: {"__volatile", TYPE_QUAL, RID_VOLATILE}, 1.1.1.2 root 80: {"typeof", TYPEOF, NORID,}, 1.1 root 81: {"__volatile__", TYPE_QUAL, RID_VOLATILE}, 1.1.1.3 root 82: {"__typeof__", TYPEOF, NORID}, 83: {"try", TRY, NORID /* Extension */,}, 1.1.1.2 root 84: {"__const", TYPE_QUAL, RID_CONST}, 1.1.1.3 root 85: {"__typeof", TYPEOF, NORID}, 1.1 root 86: {"typedef", SCSPEC, RID_TYPEDEF,}, 1.1.1.3 root 87: {"private", VISSPEC, RID_PRIVATE,}, 1.1.1.2 root 88: {"",}, 1.1 root 89: {"raise", RAISE, NORID /* Extension */,}, 90: {"raises", RAISES, NORID /* Extension */,}, 1.1.1.2 root 91: {"do", DO, NORID,}, 1.1.1.3 root 92: {"for", FOR, NORID,}, 1.1 root 93: {"case", CASE, NORID,}, 94: {"class", AGGR, RID_CLASS,}, 1.1.1.2 root 95: {"delete", DELETE, NORID,}, 1.1.1.3 root 96: {"__classof__", CLASSOF, NORID}, 97: {"short", TYPESPEC, RID_SHORT,}, 1.1.1.2 root 98: {"double", TYPESPEC, RID_DOUBLE,}, 1.1.1.3 root 99: {"__classof", CLASSOF, NORID}, 1.1.1.2 root 100: {"friend", SCSPEC, RID_FRIEND,}, 1.1.1.4 ! root 101: {"__asm", GCC_ASM_KEYWORD, NORID}, 1.1 root 102: {"const", TYPE_QUAL, RID_CONST,}, 103: {"static", SCSPEC, RID_STATIC,}, 1.1.1.3 root 104: {"template", TEMPLATE, NORID,}, 105: {"if", IF, NORID,}, 1.1.1.2 root 106: {"classof", CLASSOF, NORID,}, 1.1.1.3 root 107: {"switch", SWITCH, NORID,}, 108: {"__signed__", TYPESPEC, RID_SIGNED}, 109: {"int", TYPESPEC, RID_INT,}, 110: {"throw", THROW, NORID /* Extension */,}, 111: {"long", TYPESPEC, RID_LONG,}, 112: {"",}, {"",}, 113: {"auto", SCSPEC, RID_AUTO,}, 114: {"operator", OPERATOR, NORID,}, 1.1 root 115: {"",}, 1.1.1.3 root 116: {"__attribute", ATTRIBUTE, NORID}, 117: {"extern", SCSPEC, RID_EXTERN,}, 118: {"__attribute__", ATTRIBUTE, NORID}, 119: {"break", BREAK, NORID,}, 120: {"void", TYPESPEC, RID_VOID,}, 121: {"",}, 122: {"struct", AGGR, RID_RECORD,}, 123: {"virtual", SCSPEC, RID_VIRTUAL,}, 124: {"__extension__", EXTENSION, NORID}, 125: {"while", WHILE, NORID,}, 126: {"",}, 127: {"float", TYPESPEC, RID_FLOAT,}, 128: {"__wchar_t", TYPESPEC, RID_WCHAR /* Unique to ANSI C++ */,}, 129: {"",}, {"",}, 130: {"headof", HEADOF, NORID,}, 131: {"protected", VISSPEC, RID_PROTECTED,}, 132: {"__signed", TYPESPEC, RID_SIGNED}, 1.1.1.2 root 133: {"enum", ENUM, NORID,}, 1.1 root 134: {"",}, 1.1.1.3 root 135: {"all", ALL, NORID /* Extension */,}, 136: {"public", VISSPEC, RID_PUBLIC,}, 137: {"char", TYPESPEC, RID_CHAR,}, 138: {"reraise", RERAISE, NORID /* Extension */,}, 139: {"inline", SCSPEC, RID_INLINE,}, 140: {"volatile", TYPE_QUAL, RID_VOLATILE,}, 1.1.1.2 root 141: {"__label__", LABEL, NORID}, 1.1.1.3 root 142: {"",}, {"",}, 1.1.1.2 root 143: {"signed", TYPESPEC, RID_SIGNED,}, 1.1.1.3 root 144: {"__alignof__", ALIGNOF, NORID}, 145: {"asm", ASM_KEYWORD, NORID,}, 1.1 root 146: {"",}, 1.1.1.3 root 147: {"__alignof", ALIGNOF, NORID}, 1.1.1.2 root 148: {"new", NEW, NORID,}, 149: {"register", SCSPEC, RID_REGISTER,}, 1.1.1.3 root 150: {"continue", CONTINUE, NORID,}, 151: {"catch", CATCH, NORID,}, 152: {"",}, {"",}, {"",}, 153: {"exception", AGGR, RID_EXCEPTION /* Extension */,}, 1.1.1.2 root 154: {"",}, {"",}, 155: {"default", DEFAULT, NORID,}, 156: {"",}, {"",}, {"",}, 1.1.1.3 root 157: {"union", AGGR, RID_UNION,}, 158: {"",}, {"",}, {"",}, 1.1 root 159: {"overload", OVERLOAD, NORID,}, 1.1.1.3 root 160: {"",}, 161: {"__inline", SCSPEC, RID_INLINE}, 162: {"",}, 163: {"__inline__", SCSPEC, RID_INLINE}, 164: {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 1.1 root 165: {"unsigned", TYPESPEC, RID_UNSIGNED,}, 1.1.1.3 root 166: {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 167: {"return", RETURN, NORID,}, 1.1 root 168: {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 1.1.1.3 root 169: {"",}, {"",}, 1.1.1.2 root 170: {"dynamic", DYNAMIC, NORID,}, 1.1 root 171: }; 172: 173: if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 174: { 175: register int key = hash (str, len); 176: 177: if (key <= MAX_HASH_VALUE && key >= 0) 178: { 179: register char *s = wordlist[key].name; 180: 181: if (*s == *str && !strcmp (str + 1, s + 1)) 182: return &wordlist[key]; 183: } 184: } 185: return 0; 186: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.