diff options
Diffstat (limited to 'apps/gperf/tests/test-2.exp')
-rw-r--r-- | apps/gperf/tests/test-2.exp | 213 |
1 files changed, 0 insertions, 213 deletions
diff --git a/apps/gperf/tests/test-2.exp b/apps/gperf/tests/test-2.exp deleted file mode 100644 index d4e765f1c6d..00000000000 --- a/apps/gperf/tests/test-2.exp +++ /dev/null @@ -1,213 +0,0 @@ -/* C code produced by gperf version 2.8 (ACE version) */ -/* Command-line: ../src/gperf -n -k1-8 -l */ -#include <string.h> - -#define TOTAL_KEYWORDS 40 -#define MIN_WORD_LENGTH 2 -#define MAX_WORD_LENGTH 14 -#define MIN_HASH_VALUE 1 -#define MAX_HASH_VALUE 256 -#define HASH_VALUE_RANGE 256 -#define DUPLICATES 0 - -static unsigned int -hash (str, len) - char *str; - unsigned int len; -{ - static unsigned short asso_values[] = - { -#if defined (ACE_MVS) - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 25, 30, 35, 21, 0, 30, 15, - 30, 45, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 0, 5, 45, 0, 10, 0, 1, 257, 257, - 257, 257, 257, 257, 257, 257, 20, 25, 15, 30, - 40, 15, 5, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, -#else - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 25, 30, 35, 21, 0, - 30, 15, 30, 45, 257, 257, 0, 5, 45, 0, - 10, 0, 1, 20, 25, 15, 30, 40, 15, 5, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, 257, 257, - 257, 257, 257, 257, 257, 257, 257, 257, -#endif /* ACE_MVS */ - }; - unsigned int hval = 0; - - switch (len) - { - default: - case 8: - hval += asso_values[str[7]]; - case 7: - hval += asso_values[str[6]]; - case 6: - hval += asso_values[str[5]]; - case 5: - hval += asso_values[str[4]]; - case 4: - hval += asso_values[str[3]]; - case 3: - hval += asso_values[str[2]]; - case 2: - hval += asso_values[str[1]]; - case 1: - hval += asso_values[str[0]]; - } - return hval; -} - -const char * -in_word_set (str, len) - char *str; - unsigned int len; -{ - - static unsigned char lengthtable[] = - { - 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 4, 2, 0, 0, 0, 2, 3, 0, - 0, 0, 2, 3, 0, 0, 0, 2, 4, 0, 0, 0, 4, 6, - 0, 0, 0, 3, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, - 3, 5, 6, 0, 0, 6, 0, 0, 0, 0, 3, 0, 0, 0, - 3, 0, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 9, - 0, 4, 6, 6, 0, 0, 2, 3, 0, 0, 0, 5, 3, 0, - 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, - 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, - 7, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 10, - }; - static const char *wordlist[] = - { - "", - "OR", - "","","","","","","","", - "LOOP", - "","","","","","","","","", - "ELSE", - "DO", - "","","", - "TO", - "MOD", - "","","", - "OF", - "FOR", - "","","", - "BY", - "FROM", - "","","", - "TYPE", - "MODULE", - "","","", - "SET", - "","","","","", - "EXPORT", - "","","","", - "VAR", - "ARRAY", - "RECORD", - "","", - "REPEAT", - "","","","", - "END", - "","","", - "NOT", - "","","","", - "IF", - "","","","", - "CASE", - "","", - "PROCEDURE", - "", - "EXIT", - "IMPORT", - "RETURN", - "","", - "IN", - "AND", - "","","", - "ELSIF", - "DIV", - "","","", - "THEN", - "","","","","","","","","", - "IMPLEMENTATION", - "","","","", - "WHILE", - "","","","","","","","","", - "CONST", - "POINTER", - "","","", - "UNTIL", - "","","","", - "BEGIN", - "","","","", - "WITH", - "","","","","","","","","", - "","","","","","","","","", - "","QUALIFIED", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","","","","","", - "","","","","", - "DEFINITION", - }; - - if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) - { - unsigned int key = hash (str, len); - - if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE) - { - const char *s = wordlist[key]; - - if (len == lengthtable[key] - && *str == *s && !strcmp (str + 1, s + 1)) - return s; - } - } - return 0; -} |