From ed5ae1cfebd1baa7e318f2874844aa81cd387ade Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 19 Aug 2000 12:56:07 +0000 Subject: [PATCH] Regenerated. --- tests/test-4.exp | 187 +++++++++++++++++++++++++++++------------------ 1 file changed, 116 insertions(+), 71 deletions(-) diff --git a/tests/test-4.exp b/tests/test-4.exp index b527968..865003c 100644 --- a/tests/test-4.exp +++ b/tests/test-4.exp @@ -1,14 +1,14 @@ /* C code produced by gperf version 2.7 */ /* Command-line: ../src/gperf -D -p -t */ -/* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */ -struct resword { char *name; short token; enum rid rid; }; +/* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */ +struct resword { const char *name; short token; enum rid rid; }; -#define TOTAL_KEYWORDS 51 +#define TOTAL_KEYWORDS 83 #define MIN_WORD_LENGTH 2 -#define MAX_WORD_LENGTH 13 -#define MIN_HASH_VALUE 4 -#define MAX_HASH_VALUE 82 -/* maximum key range = 79, duplicates = 2 */ +#define MAX_WORD_LENGTH 20 +#define MIN_HASH_VALUE 6 +#define MAX_HASH_VALUE 170 +/* maximum key range = 165, duplicates = 8 */ #ifdef __GNUC__ __inline @@ -20,32 +20,32 @@ hash (str, len) { static unsigned char asso_values[] = { - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 0, 83, 40, 20, 50, - 25, 10, 30, 0, 0, 50, 83, 0, 15, 0, - 35, 0, 83, 83, 20, 0, 10, 40, 5, 15, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 83, 83, 83 + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 30, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 0, 171, 10, 80, 60, + 15, 20, 85, 45, 0, 30, 171, 0, 40, 35, + 45, 20, 171, 171, 60, 0, 10, 15, 35, 0, + 5, 60, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171, 171, 171, 171, 171, + 171, 171, 171, 171, 171, 171 }; return len + asso_values[(unsigned char)str[len - 1]] + asso_values[(unsigned char)str[0]]; } @@ -60,70 +60,115 @@ in_word_set (str, len) { static struct resword wordlist[] = { - {"goto", GOTO, NORID}, - {"__asm", ASM, NORID}, {"switch", SWITCH, NORID}, - {"__asm__", ASM, NORID}, + {"__asm__", ASM_KEYWORD, NORID}, + {"__imag__", IMAGPART, NORID}, + {"__real__", REALPART, NORID}, {"__const__", TYPE_QUAL, RID_CONST}, + {"__label__", LABEL, NORID}, {"__inline__", SCSPEC, RID_INLINE}, {"__typeof__", TYPEOF, NORID}, {"__signed__", TYPESPEC, RID_SIGNED}, {"__alignof__", ALIGNOF, NORID}, + {"__complex__", TYPESPEC, RID_COMPLEX}, + {"__iterator__", SCSPEC, RID_ITERATOR}, {"__volatile__", TYPE_QUAL, RID_VOLATILE}, + {"__restrict__", TYPE_QUAL, RID_RESTRICT}, {"__attribute__", ATTRIBUTE, NORID}, - {"enum", ENUM, NORID}, + {"__extension__", EXTENSION, NORID}, + {"__complex", TYPESPEC, RID_COMPLEX}, {"short", TYPESPEC, RID_SHORT}, {"struct", STRUCT, NORID}, {"__const", TYPE_QUAL, RID_CONST}, - {"__inline", SCSPEC, RID_INLINE}, - {"long", TYPESPEC, RID_LONG}, - {"__volatile", TYPE_QUAL, RID_VOLATILE}, - {"__attribute", ATTRIBUTE, NORID}, - {"volatile", TYPE_QUAL, RID_VOLATILE}, - {"else", ELSE, NORID}, - {"break", BREAK, NORID}, - {"do", DO, NORID}, - {"while", WHILE, NORID}, + {"__restrict", TYPE_QUAL, RID_RESTRICT}, {"signed", TYPESPEC, RID_SIGNED}, {"__signed", TYPESPEC, RID_SIGNED}, + {"while", WHILE, NORID}, + {"__inline", SCSPEC, RID_INLINE}, + {"__volatile", TYPE_QUAL, RID_VOLATILE}, + {"__attribute", ATTRIBUTE, NORID}, + {"default", DEFAULT, NORID}, + {"out", TYPE_QUAL, RID_OUT}, + {"auto", SCSPEC, RID_AUTO}, + {"@defs", DEFS, NORID}, + {"@class", CLASS, NORID}, + {"do", DO, NORID}, + {"unsigned", TYPESPEC, RID_UNSIGNED}, + {"__asm", ASM_KEYWORD, NORID}, + {"double", TYPESPEC, RID_DOUBLE}, + {"int", TYPESPEC, RID_INT}, + {"else", ELSE, NORID}, + {"inout", TYPE_QUAL, RID_INOUT}, + {"__real", REALPART, NORID}, + {"id", OBJECTNAME, RID_ID}, + {"asm", ASM_KEYWORD, NORID}, + {"@end", END, NORID}, + {"@compatibility_alias", ALIAS, NORID}, + {"__imag", IMAGPART, NORID}, {"void", TYPESPEC, RID_VOID}, + {"@protected", PROTECTED, NORID}, + {"inline", SCSPEC, RID_INLINE}, + {"@encode", ENCODE, NORID}, + {"@private", PRIVATE, NORID}, + {"enum", ENUM, NORID}, + {"@interface", INTERFACE, NORID}, + {"volatile", TYPE_QUAL, RID_VOLATILE}, + {"union", UNION, NORID}, + {"static", SCSPEC, RID_STATIC}, + {"goto", GOTO, NORID}, + {"__iterator", SCSPEC, RID_ITERATOR}, + {"extern", SCSPEC, RID_EXTERN}, + {"const", TYPE_QUAL, RID_CONST}, + {"in", TYPE_QUAL, RID_IN}, + {"restrict", TYPE_QUAL, RID_RESTRICT}, + {"@protocol", PROTOCOL, NORID}, + {"case", CASE, NORID}, + {"break", BREAK, NORID}, + {"oneway", TYPE_QUAL, RID_ONEWAY}, + {"continue", CONTINUE, NORID}, + {"long", TYPESPEC, RID_LONG}, + {"@implementation", IMPLEMENTATION, NORID}, {"sizeof", SIZEOF, NORID}, {"__typeof", TYPEOF, NORID}, {"__alignof", ALIGNOF, NORID}, - {"double", TYPESPEC, RID_DOUBLE}, - {"default", DEFAULT, NORID}, - {"asm", ASM, NORID}, - {"auto", SCSPEC, RID_AUTO}, + {"@public", PUBLIC, NORID}, + {"@selector", SELECTOR, NORID}, {"float", TYPESPEC, RID_FLOAT}, {"typeof", TYPEOF, NORID}, {"typedef", SCSPEC, RID_TYPEDEF}, - {"register", SCSPEC, RID_REGISTER}, - {"extern", SCSPEC, RID_EXTERN}, - {"for", FOR, NORID}, - {"static", SCSPEC, RID_STATIC}, {"return", RETURN, NORID}, - {"int", TYPESPEC, RID_INT}, - {"case", CASE, NORID}, - {"const", TYPE_QUAL, RID_CONST}, - {"inline", SCSPEC, RID_INLINE}, - {"continue", CONTINUE, NORID}, - {"unsigned", TYPESPEC, RID_UNSIGNED}, + {"if", IF, NORID}, {"char", TYPESPEC, RID_CHAR}, - {"union", UNION, NORID}, - {"if", IF, NORID} + {"register", SCSPEC, RID_REGISTER}, + {"bycopy", TYPE_QUAL, RID_BYCOPY}, + {"for", FOR, NORID}, + {"byref", TYPE_QUAL, RID_BYREF} }; static short lookup[] = { - -1, -1, -1, -1, 0, 1, 2, 3, -1, 4, - -80, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, -1, 19, 20, 21, -1, 22, -46, -3, - 23, 24, -1, 25, 26, -1, 27, -1, 28, 29, - -1, 30, 31, 32, 33, 34, 35, 36, 37, -1, - -1, 38, -1, 39, -1, -1, 40, -1, -1, -1, - -1, 41, -1, 42, 43, 44, 45, -1, 46, -1, - -1, -1, -1, 47, 48, -1, -1, -1, -1, -1, - 49, -1, 50 + -1, -1, -1, -1, -1, -1, 0, 1, + -156, -151, -145, -136, -110, -102, 16, 17, + 18, 19, -69, -2, 20, 21, -1, 22, + -1, 23, -72, -3, 24, -1, 25, 26, + 27, 28, 29, 30, 31, 32, 33, -1, + 34, 35, -1, 36, 37, 38, 39, 40, + 41, 42, 43, 44, -74, -2, 45, 46, + 47, 48, 49, 50, 51, -77, -3, 52, + -1, 53, 54, -79, -2, 55, 56, 57, + -81, -2, -1, 58, -1, 59, 60, 61, + -1, -1, -1, -1, 62, 63, 64, -1, + 65, 66, 67, 68, -1, 69, 70, -1, + -1, 71, -1, 72, 73, 74, 75, -1, + -1, -1, -1, -1, -1, -1, -1, 76, + -1, -1, -1, -1, -1, 77, -1, -1, + -1, -1, -1, -1, 78, -1, -1, -1, + 79, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 80, -1, 81, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 82 }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)