Commit 13abbf47 by Kaveh R. Ghazi Committed by Kaveh Ghazi

Warning fixes:

        * Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
        (keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).

From-SVN: r22882
parent 07181a20
Wed Oct 7 12:10:48 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (keyword.h): Add -L KR-C -F ', 0' flags to gperf.
(keyword.h): Regenerate using gperf 2.7.1 (19981006 egcs).
Wed Sep 30 20:53:51 1998 Jeffrey A Law (law@cygnus.com)
* jcf-write.c (OP2, OP4): Use "_i", not "_I" to avoid problems on
......
......@@ -240,7 +240,7 @@ $(PARSE_SCAN_C): $(srcdir)/parse-scan.y $(srcdir)/lex.c $(PARSE_H) \
lex.c: keyword.h lex.h
keyword.h: keyword.gperf
gperf -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$$ \
gperf -L KR-C -F ', 0' -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$$ \
keyword.gperf > keyword.h
# These exist for maintenance purposes.
......
/* C code produced by gperf version 2.5 (GNU C++ version) */
/* Command-line: gperf -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$ keyword.gperf */
/* Keyword definitions for the GNU compiler for the Java(TM) language.
/* KR-C code produced by gperf version 2.7.1 (19981006 egcs) */
/* Command-line: gperf -L KR-C -F , 0 -p -t -j1 -i 1 -g -o -N java_keyword -k1,3,$ keyword.gperf */
/* Keyword definition for the GNU compiler for the Java(TM) language.
Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
......@@ -35,28 +35,41 @@ struct java_keyword { char *name; int token; };
/* maximum key range = 81, duplicates = 0 */
#ifdef __GNUC__
inline
__inline
#endif
static unsigned int
hash (str, len)
register char *str;
register int unsigned len;
register unsigned int len;
{
static unsigned char asso_values[] =
{
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 18, 37, 38,
27, 1, 30, 3, 12, 8, 87, 2, 11, 87,
8, 1, 5, 87, 24, 1, 1, 30, 2, 36,
87, 1, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 18, 37, 38,
27, 1, 30, 3, 12, 8, 87, 2, 11, 87,
8, 1, 5, 87, 24, 1, 1, 30, 2, 36,
87, 1, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87
};
register int hval = len;
......@@ -64,17 +77,17 @@ hash (str, len)
{
default:
case 3:
hval += asso_values[str[2]];
hval += asso_values[(unsigned char)str[2]];
case 2:
case 1:
hval += asso_values[str[0]];
hval += asso_values[(unsigned char)str[0]];
break;
}
return hval + asso_values[str[len - 1]];
return hval + asso_values[(unsigned char)str[len - 1]];
}
#ifdef __GNUC__
inline
__inline
#endif
struct java_keyword *
java_keyword (str, len)
......@@ -83,70 +96,70 @@ java_keyword (str, len)
{
static struct java_keyword wordlist[] =
{
{"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"try", TRY_TK},
{"else", ELSE_TK},
{"short", SHORT_TK},
{"goto", GOTO_TK},
{"extends", EXTENDS_TK},
{"",}, {"",},
{"int", INT_TK},
{"this", THIS_TK},
{"",},
{"native", NATIVE_TK},
{"",}, {"",},
{"interface", INTERFACE_TK},
{"import", IMPORT_TK},
{"private", PRIVATE_TK},
{"volatile", VOLATILE_TK},
{"",},
{"implements", IMPLEMENTS_TK},
{"",},
{"long", LONG_TK},
{"switch", SWITCH_TK},
{"abstract", ABSTRACT_TK},
{"transient", TRANSIENT_TK},
{"do", DO_TK},
{"",},
{"throws", THROWS_TK},
{"",},
{"null", NULL_TK},
{"super", SUPER_TK},
{"true", TRUE_TK},
{"float", FLOAT_TK},
{"",},
{"return", RETURN_TK},
{"if", IF_TK},
{"void", VOID_TK},
{"protected", PROTECTED_TK},
{"byte", BYTE_TK},
{"case", CASE_TK},
{"break", BREAK_TK},
{"finally", FINALLY_TK},
{"false", FALSE_TK},
{"synchronized", SYNCHRONIZED_TK},
{"instanceof", INSTANCEOF_TK},
{"while", WHILE_TK},
{"package", PACKAGE_TK},
{"const", CONST_TK},
{"boolean", BOOLEAN_TK},
{"final", FINAL_TK},
{"continue", CONTINUE_TK},
{"catch", CATCH_TK},
{"",}, {"",}, {"",}, {"",}, {"",},
{"class", CLASS_TK},
{"static", STATIC_TK},
{"double", DOUBLE_TK},
{"default", DEFAULT_TK},
{"throw", THROW_TK},
{"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",},
{"",}, {"",}, {"",}, {"",}, {"",},
{"for", FOR_TK},
{"",},
{"new", NEW_TK},
{"char", CHAR_TK},
{"",},
{"public", PUBLIC_TK},
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
{"try", TRY_TK},
{"else", ELSE_TK},
{"short", SHORT_TK},
{"goto", GOTO_TK},
{"extends", EXTENDS_TK},
{"", 0}, {"", 0},
{"int", INT_TK},
{"this", THIS_TK},
{"", 0},
{"native", NATIVE_TK},
{"", 0}, {"", 0},
{"interface", INTERFACE_TK},
{"import", IMPORT_TK},
{"private", PRIVATE_TK},
{"volatile", VOLATILE_TK},
{"", 0},
{"implements", IMPLEMENTS_TK},
{"", 0},
{"long", LONG_TK},
{"switch", SWITCH_TK},
{"abstract", ABSTRACT_TK},
{"transient", TRANSIENT_TK},
{"do", DO_TK},
{"", 0},
{"throws", THROWS_TK},
{"", 0},
{"null", NULL_TK},
{"super", SUPER_TK},
{"true", TRUE_TK},
{"float", FLOAT_TK},
{"", 0},
{"return", RETURN_TK},
{"if", IF_TK},
{"void", VOID_TK},
{"protected", PROTECTED_TK},
{"byte", BYTE_TK},
{"case", CASE_TK},
{"break", BREAK_TK},
{"finally", FINALLY_TK},
{"false", FALSE_TK},
{"synchronized", SYNCHRONIZED_TK},
{"instanceof", INSTANCEOF_TK},
{"while", WHILE_TK},
{"package", PACKAGE_TK},
{"const", CONST_TK},
{"boolean", BOOLEAN_TK},
{"final", FINAL_TK},
{"continue", CONTINUE_TK},
{"catch", CATCH_TK},
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
{"class", CLASS_TK},
{"static", STATIC_TK},
{"double", DOUBLE_TK},
{"default", DEFAULT_TK},
{"throw", THROW_TK},
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
{"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
{"for", FOR_TK},
{"", 0},
{"new", NEW_TK},
{"char", CHAR_TK},
{"", 0},
{"public", PUBLIC_TK}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
......@@ -157,7 +170,7 @@ java_keyword (str, len)
{
register char *s = wordlist[key].name;
if (*s == *str && !strcmp (str + 1, s + 1))
if (*str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment