Blame tests/java.exp

Packit b27855
/* C code produced by gperf version 3.1 */
Packit b27855
/* Command-line: ../src/gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$'  */
Packit b27855
Packit b27855
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
Packit b27855
      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
Packit b27855
      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
Packit b27855
      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
Packit b27855
      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
Packit b27855
      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
Packit b27855
      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
Packit b27855
      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
Packit b27855
      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
Packit b27855
      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
Packit b27855
      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
Packit b27855
      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
Packit b27855
      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
Packit b27855
      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
Packit b27855
      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
Packit b27855
      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
Packit b27855
      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
Packit b27855
      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
Packit b27855
      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
Packit b27855
      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
Packit b27855
      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
Packit b27855
      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
Packit b27855
      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
Packit b27855
/* The character set is not based on ISO-646.  */
Packit b27855
error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
Packit b27855
#endif
Packit b27855
Packit b27855
Packit b27855
/* Keyword definition for the GNU compiler for the Java(TM) language.
Packit b27855
   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
Packit b27855
   Contributed by Alexandre Petit-Bianco (apbianco@cygnus.com)
Packit b27855
Packit b27855
This file is part of GNU CC.
Packit b27855
Packit b27855
GNU CC is free software; you can redistribute it and/or modify
Packit b27855
it under the terms of the GNU General Public License as published by
Packit b27855
the Free Software Foundation; either version 2, or (at your option)
Packit b27855
any later version.
Packit b27855
Packit b27855
GNU CC is distributed in the hope that it will be useful,
Packit b27855
but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit b27855
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit b27855
GNU General Public License for more details.
Packit b27855
Packit b27855
You should have received a copy of the GNU General Public License
Packit b27855
along with GNU CC; see the file COPYING.  If not, write to
Packit b27855
the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
Packit b27855
MA 02110-1301, USA.
Packit b27855
Packit b27855
Java and all Java-based marks are trademarks or registered trademarks
Packit b27855
of Sun Microsystems, Inc. in the United States and other countries.
Packit b27855
The Free Software Foundation is independent of Sun Microsystems, Inc.  */
Packit b27855
Packit b27855
struct java_keyword { const char *name; int token; };
Packit b27855
Packit b27855
#define TOTAL_KEYWORDS 50
Packit b27855
#define MIN_WORD_LENGTH 2
Packit b27855
#define MAX_WORD_LENGTH 12
Packit b27855
#define MIN_HASH_VALUE 7
Packit b27855
#define MAX_HASH_VALUE 76
Packit b27855
/* maximum key range = 70, duplicates = 0 */
Packit b27855
Packit b27855
#ifdef __GNUC__
Packit b27855
__inline
Packit b27855
#else
Packit b27855
#ifdef __cplusplus
Packit b27855
inline
Packit b27855
#endif
Packit b27855
#endif
Packit b27855
static unsigned int
Packit b27855
hash (str, len)
Packit b27855
     register const char *str;
Packit b27855
     register size_t len;
Packit b27855
{
Packit b27855
  static unsigned char asso_values[] =
Packit b27855
    {
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77,  7, 30,  7,
Packit b27855
      12,  1, 14, 28, 41,  3, 77, 16, 11, 77,
Packit b27855
      16, 23,  1, 77, 15,  1,  1, 34, 30, 18,
Packit b27855
      77, 11, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
Packit b27855
      77, 77, 77, 77, 77, 77
Packit b27855
    };
Packit b27855
  register unsigned int hval = len;
Packit b27855
Packit b27855
  switch (hval)
Packit b27855
    {
Packit b27855
      default:
Packit b27855
        hval += asso_values[(unsigned char)str[2]];
Packit b27855
      /*FALLTHROUGH*/
Packit b27855
      case 2:
Packit b27855
      case 1:
Packit b27855
        hval += asso_values[(unsigned char)str[0]];
Packit b27855
        break;
Packit b27855
    }
Packit b27855
  return hval + asso_values[(unsigned char)str[len - 1]];
Packit b27855
}
Packit b27855
Packit b27855
struct java_keyword *
Packit b27855
java_keyword (str, len)
Packit b27855
     register const char *str;
Packit b27855
     register size_t len;
Packit b27855
{
Packit b27855
  static struct java_keyword wordlist[] =
Packit b27855
    {
Packit b27855
      {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
Packit b27855
      {"", 0},
Packit b27855
      {"else", ELSE_TK},
Packit b27855
      {"int", INT_TK},
Packit b27855
      {"this", THIS_TK},
Packit b27855
      {"extends", EXTENDS_TK},
Packit b27855
      {"import", IMPORT_TK},
Packit b27855
      {"private", PRIVATE_TK},
Packit b27855
      {"case", CASE_TK},
Packit b27855
      {"interface", INTERFACE_TK},
Packit b27855
      {"implements", IMPLEMENTS_TK},
Packit b27855
      {"package", PACKAGE_TK},
Packit b27855
      {"abstract", ABSTRACT_TK},
Packit b27855
      {"transient", TRANSIENT_TK},
Packit b27855
      {"if", IF_TK},
Packit b27855
      {"class", CLASS_TK},
Packit b27855
      {"static", STATIC_TK},
Packit b27855
      {"super", SUPER_TK},
Packit b27855
      {"throws", THROWS_TK},
Packit b27855
      {"native", NATIVE_TK},
Packit b27855
      {"", 0},
Packit b27855
      {"try", TRY_TK},
Packit b27855
      {"while", WHILE_TK},
Packit b27855
      {"instanceof", INSTANCEOF_TK},
Packit b27855
      {"const", CONST_TK},
Packit b27855
      {"short", SHORT_TK},
Packit b27855
      {"false", FALSE_TK},
Packit b27855
      {"continue", CONTINUE_TK},
Packit b27855
      {"char", CHAR_TK},
Packit b27855
      {"default", DEFAULT_TK},
Packit b27855
      {"", 0},
Packit b27855
      {"byte", BYTE_TK},
Packit b27855
      {"do", DO_TK},
Packit b27855
      {"return", RETURN_TK},
Packit b27855
      {"throw", THROW_TK},
Packit b27855
      {"true", TRUE_TK},
Packit b27855
      {"synchronized", SYNCHRONIZED_TK},
Packit b27855
      {"null", NULL_TK},
Packit b27855
      {"float", FLOAT_TK},
Packit b27855
      {"public", PUBLIC_TK},
Packit b27855
      {"protected", PROTECTED_TK},
Packit b27855
      {"final", FINAL_TK},
Packit b27855
      {"for", FOR_TK},
Packit b27855
      {"finally", FINALLY_TK},
Packit b27855
      {"void", VOID_TK},
Packit b27855
      {"volatile", VOLATILE_TK},
Packit b27855
      {"switch", SWITCH_TK},
Packit b27855
      {"break", BREAK_TK},
Packit b27855
      {"double", DOUBLE_TK},
Packit b27855
      {"catch", CATCH_TK},
Packit b27855
      {"new", NEW_TK},
Packit b27855
      {"goto", GOTO_TK},
Packit b27855
      {"", 0}, {"", 0},
Packit b27855
      {"long", LONG_TK},
Packit b27855
      {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
Packit b27855
      {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
Packit b27855
      {"", 0}, {"", 0}, {"", 0}, {"", 0},
Packit b27855
      {"boolean", BOOLEAN_TK}
Packit b27855
    };
Packit b27855
Packit b27855
  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
Packit b27855
    {
Packit b27855
      register unsigned int key = hash (str, len);
Packit b27855
Packit b27855
      if (key <= MAX_HASH_VALUE)
Packit b27855
        {
Packit b27855
          register const char *s = wordlist[key].name;
Packit b27855
Packit b27855
          if (*str == *s && !strcmp (str + 1, s + 1))
Packit b27855
            return &wordlist[key];
Packit b27855
        }
Packit b27855
    }
Packit b27855
  return 0;
Packit b27855
}