From ec800f65ec88465b0f9b3f9063b945dd4749f535 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 17 Feb 2003 10:36:47 +0000 Subject: [PATCH] Introduce new alpha_inc pass, to avoid artificial duplicates. --- ChangeLog | 39 ++ NEWS | 3 + doc/gperf.texi | 11 +- src/keyword.cc | 43 +- src/keyword.h | 9 +- src/main.cc | 1 + src/output.cc | 36 +- src/output.h | 3 + src/search.cc | 233 +++++++-- src/search.h | 26 +- tests/chill.exp | 1252 ++++++++++++++++++++++++----------------------- 11 files changed, 970 insertions(+), 686 deletions(-) diff --git a/ChangeLog b/ChangeLog index a37d973..eb8b38e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,44 @@ 2002-11-17 Bruno Haible + Avoid artificial duplicates. + * src/keyword.h (KeywordExt::init_selchars_tuple): New declaration. + (KeywordExt::init_selchars_multiset): Renamed from + KeywordExt::init_selchars. + (KeywordExt::init_selchars_low): New declaration. + * src/keyword.cc (KeywordExt::init_selchars_low): Renamed from + KeywordExt::init_selchars. Add alpha_inc argument. Remove sorting. + (KeywordExt::init_selchars_tuple): New method. + (KeywordExt::init_selchars_multiset): New method, replaces + KeywordExt::init_selchars. + * src/search.h (Search::init_selchars_tuple): Renamed from + Search::init_selchars. + (Search::count_duplicates_tuple): Renamed from Search::count_duplicates. + (Search::init_selchars_multiset, Search::count_duplicates_multiset, + Search::find_alpha_inc): New declarations. + (Search::_alpha_inc): New field. + (Search::_alpha_size, Search::_occurrences, Search::_asso_values, + Search::_determined): Make non-const. + * src/search.cc (Search::Search): Don't initialize _key_positions, + _alpha_size, _occurrences, _asso_values, _determined here. + (Search::init_selchars_tuple): Renamed from Search::init_selchars. + (Search::count_duplicates_tuple): Renamed from Search::count_duplicates. + (Search::find_positions): Update. + (Search::init_selchars_multiset, Search::count_duplicates_multiset, + Search::find_alpha_inc): New methods. + (Search::prepare): Move preprepare, find_positions calls away. + Initialize _alpha_size, _occurrences, _asso_values, _determined here. + (Search::optimize): Call preprepare, find_positions here. Initialize + _key_positions here. + (Search::~Search): Deallocate _alpha_inc. + * src/output.cc (Output::Output): Add alpha_inc argument. + (Output::output_hash_function): Use _alpha_inc. + * src/output.h (Output::Output): Add alpha_inc argument. + (Output::_alpha_inc): New field. + * src/main.cc (main): Pass _alpha_inc from Search to Output. + * tests/chill.exp: Update. + * doc/gperf.texi (Algorithmic Details): Remove description of + artificial duplicates. + * src/keyword.h (KeywordExt::_selchars): Change type to 'const unsigned int *'. * src/keyword.cc (sort_char_set): Change argument type to diff --git a/NEWS b/NEWS index b634ff6..c5b023f 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,9 @@ New in 2.8: computed depending on the set of keywords. * If the input file is given by name, the output file will now contain #line directives referring to the input file. +* Some keyword sets containing permutations, like { "xy", "yx", "xz", "zx" } + or { "abc", "acb", "bca", "cab" }, are now handled by gperf without + requiring the option -D. * Bug fixes. New in 2.7.2: diff --git a/doc/gperf.texi b/doc/gperf.texi index 7f0499e..f47c706 100644 --- a/doc/gperf.texi +++ b/doc/gperf.texi @@ -993,7 +993,7 @@ through a search that minimizes the number of byte positions. @itemx --duplicates @cindex Duplicates Handle keywords whose selected byte sets hash to duplicate values. -Duplicate hash values can occur for three reasons: +Duplicate hash values can occur for two reasons: @itemize @bullet @item @@ -1003,15 +1003,6 @@ However, frequently only a very small number of duplicates occur, and the majority of keywords still require one probe into the table. To overcome this problem, the option @samp{-m 50} should be used. -@item -Since the @code{gperf} generated hash function treats the bytes at -different byte positions with equal weight, keywords that are permutations -of each other can lead to the same hash function value if they are not -disambiguated by the set of selected byte positions. Sometimes even this -is not possible; for example, the keyword set @{"xy", "yx", "xz", "zx"@} -will always lead to duplicates, regardless how the selected byte positions -are chosen. You can use the option @samp{-D} to handle this rare case. - @item Sometimes a set of keywords may have the same names, but possess different attributes. With the -D option @code{gperf} treats all these keywords as diff --git a/src/keyword.cc b/src/keyword.cc index 85cc565..36cfa6d 100644 --- a/src/keyword.cc +++ b/src/keyword.cc @@ -57,8 +57,9 @@ static inline void sort_char_set (unsigned int *base, int len) Furthermore we sort the selchars array, to ease detection of duplicates later. */ -void -KeywordExt::init_selchars (bool use_all_chars, const Positions& positions) + +unsigned int * +KeywordExt::init_selchars_low (bool use_all_chars, const Positions& positions, const unsigned int *alpha_inc) { const char *k = _allchars; unsigned int *key_set = @@ -69,7 +70,10 @@ KeywordExt::init_selchars (bool use_all_chars, const Positions& positions) /* Use all the character positions in the KEY. */ for (int i = _allchars_length; i > 0; k++, i--) { - *ptr = static_cast(*k); + unsigned int c = static_cast(*k); + if (alpha_inc) + c += alpha_inc[k-_allchars]; + *ptr = c; ptr++; } else @@ -81,24 +85,45 @@ KeywordExt::init_selchars (bool use_all_chars, const Positions& positions) for (int i; (i = iter.next ()) != PositionIterator::EOS; ) { + unsigned int c; if (i == Positions::LASTCHAR) /* Special notation for last KEY position, i.e. '$'. */ - *ptr = static_cast(_allchars[_allchars_length - 1]); + c = static_cast(_allchars[_allchars_length - 1]); else if (i <= _allchars_length) - /* Within range of KEY length, so we'll keep it. */ - *ptr = static_cast(_allchars[i - 1]); + { + /* Within range of KEY length, so we'll keep it. */ + c = static_cast(_allchars[i - 1]); + if (alpha_inc) + c += alpha_inc[i - 1]; + } else /* Out of range of KEY length, so we'll just skip it. */ continue; + *ptr = c; ptr++; } } - /* Sort the KEY_SET items alphabetically. */ - sort_char_set (key_set, ptr - key_set); - _selchars = key_set; _selchars_length = ptr - key_set; + + return key_set; +} + +void +KeywordExt::init_selchars_tuple (bool use_all_chars, const Positions& positions) +{ + init_selchars_low (use_all_chars, positions, NULL); +} + +void +KeywordExt::init_selchars_multiset (bool use_all_chars, const Positions& positions, const unsigned int *alpha_inc) +{ + unsigned int *selchars = + init_selchars_low (use_all_chars, positions, alpha_inc); + + /* Sort the selchars elements alphabetically. */ + sort_char_set (selchars, _selchars_length); } /* Deletes selchars. */ diff --git a/src/keyword.h b/src/keyword.h index 6c87d74..de89730 100644 --- a/src/keyword.h +++ b/src/keyword.h @@ -67,8 +67,10 @@ struct KeywordExt : public Keyword KeywordExt * _duplicate_link; /* Methods depending on the keyposition list. */ - /* Initializes selchars and selchars_length. */ - void init_selchars (bool use_all_chars, const Positions& positions); + /* Initializes selchars and selchars_length, without reordering. */ + void init_selchars_tuple (bool use_all_chars, const Positions& positions); + /* Initializes selchars and selchars_length, with reordering. */ + void init_selchars_multiset (bool use_all_chars, const Positions& positions, const unsigned int *alpha_inc); /* Deletes selchars. */ void delete_selchars (); @@ -78,6 +80,9 @@ struct KeywordExt : public Keyword /* Data members used by the output routines. */ int _final_index; + +private: + unsigned int * init_selchars_low (bool use_all_chars, const Positions& positions, const unsigned int *alpha_inc); }; /* An abstract factory for creating Keyword instances. diff --git a/src/main.cc b/src/main.cc index 8509cc0..9878a3b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -106,6 +106,7 @@ main (int argc, char *argv[]) searcher._max_key_len, searcher._min_key_len, searcher._key_positions, + searcher._alpha_inc, searcher._total_duplicates, searcher._alpha_size, searcher._occurrences, diff --git a/src/output.cc b/src/output.cc index 8a34c21..9060e58 100644 --- a/src/output.cc +++ b/src/output.cc @@ -88,8 +88,8 @@ Output::Output (KeywordExt_List *head, const char *struct_decl, const char *verbatim_code, const char *verbatim_code_end, unsigned int verbatim_code_lineno, int total_keys, int max_key_len, int min_key_len, - const Positions& positions, int total_duplicates, - int alpha_size, const int *occurrences, + const Positions& positions, const unsigned int *alpha_inc, + int total_duplicates, int alpha_size, const int *occurrences, const int *asso_values) : _head (head), _struct_decl (struct_decl), _struct_decl_lineno (struct_decl_lineno), _return_type (return_type), @@ -102,7 +102,7 @@ Output::Output (KeywordExt_List *head, const char *struct_decl, _verbatim_code_lineno (verbatim_code_lineno), _total_keys (total_keys), _max_key_len (max_key_len), _min_key_len (min_key_len), - _key_positions (positions), + _key_positions (positions), _alpha_inc (alpha_inc), _total_duplicates (total_duplicates), _alpha_size (alpha_size), _occurrences (occurrences), _asso_values (asso_values) { @@ -521,9 +521,14 @@ Output::output_hash_function () const option[NOLENGTH] ? "len" : "hval"); for (int i = _max_key_len; i > 0; i--) - printf (" case %d:\n" - " hval += asso_values[%sstr[%d]];\n", - i, char_to_index, i - 1); + { + printf (" case %d:\n" + " hval += asso_values[%sstr[%d]", + i, char_to_index, i - 1); + if (_alpha_inc[i - 1]) + printf ("+%u", _alpha_inc[i - 1]); + printf ("];\n"); + } printf (" break;\n" " }\n" @@ -560,13 +565,21 @@ Output::output_hash_function () const && _key_positions[0] == 1 && _key_positions[1] == Positions::LASTCHAR) /* Optimize special case of "-k 1,$". */ - printf ("asso_values[%sstr[len - 1]] + asso_values[%sstr[0]]", - char_to_index, char_to_index); + { + printf ("asso_values[%sstr[len - 1]] + asso_values[%sstr[0]", + char_to_index, char_to_index); + if (_alpha_inc[0]) + printf ("+%u", _alpha_inc[0]); + printf ("]"); + } else { for (; key_pos != Positions::LASTCHAR; ) { - printf ("asso_values[%sstr[%d]]", char_to_index, key_pos - 1); + printf ("asso_values[%sstr[%d]", char_to_index, key_pos - 1); + if (_alpha_inc[key_pos - 1]) + printf ("+%u", _alpha_inc[key_pos - 1]); + printf ("]"); if ((key_pos = iter.next ()) != PositionIterator::EOS) printf (" + "); else @@ -601,8 +614,11 @@ Output::output_hash_function () const for ( ; i >= key_pos; i--) printf (" case %d:\n", i); - printf (" hval += asso_values[%sstr[%d]];\n", + printf (" hval += asso_values[%sstr[%d]", char_to_index, key_pos - 1); + if (_alpha_inc[key_pos - 1]) + printf ("+%u", _alpha_inc[key_pos - 1]); + printf ("];\n"); key_pos = iter.next (); } diff --git a/src/output.h b/src/output.h index 5b747fd..d5bed74 100644 --- a/src/output.h +++ b/src/output.h @@ -51,6 +51,7 @@ public: int total_keys, int max_key_len, int min_key_len, const Positions& positions, + const unsigned int *alpha_inc, int total_duplicates, int alpha_size, const int *occurrences, @@ -121,6 +122,8 @@ private: int const _min_key_len; /* Key positions. Only to be used if !options[ALLCHARS]. */ Positions const _key_positions; + /* Adjustments to add to bytes add specific key positions. */ + const unsigned int * const _alpha_inc; /* Total number of duplicate hash values. */ int const _total_duplicates; /* Minimum hash value for all keywords. */ diff --git a/src/search.cc b/src/search.cc index a1e5335..7fee88d 100644 --- a/src/search.cc +++ b/src/search.cc @@ -31,15 +31,44 @@ #include "options.h" #include "hash-table.h" +/* The most general form of the hash function is + + hash (keyword) = sum (asso_values[keyword[i] + alpha_inc[i]] : i in Pos) + + where Pos is a set of byte positions, + each alpha_inc[i] is a nonnegative integer, + each asso_values[c] is a nonnegative integer. + + Theorem 1: If all keywords are different, there is a set Pos such that + all tuples (keyword[i] : i in Pos) are different. + + Theorem 2: If all tuples (keyword[i] : i in Pos) are different, there + are nonnegative integers alpha_inc[i] such that all multisets + {keyword[i] + alpha_inc[i] : i in Pos} are different. + + Theorem 3: If all multisets selchars[keyword] are different, there are + nonnegative integers asso_values[c] such that all hash values + sum (asso_values[c] : c in selchars[keyword]) are different. + + Based on these three facts, we find the hash function in three steps: + + Step 1 (Finding good byte positions): + Find a set Pos, as small as possible, such that all tuples + (keyword[i] : i in Pos) are different. + + Step 2 (Finding good alpha increments): + Find nonnegative integers alpha_inc[i], as many of them as possible being + zero, and the others being as small as possible, such that all multisets + {keyword[i] + alpha_inc[i] : i in Pos} are different. + + Step 3 (Finding good asso_values): + Find asso_values[c] such that all hash (keyword) are different. + */ + /* -------------------- Initialization and Preparation --------------------- */ Search::Search (KeywordExt_List *list) - : _head (list), - _key_positions (option.get_key_positions()), - _alpha_size (option[SEVENBIT] ? 128 : 256), - _occurrences (new int[_alpha_size]), - _asso_values (new int[_alpha_size]), - _determined (new bool[_alpha_size]) + : _head (list) { } @@ -77,12 +106,14 @@ Search::preprepare () } } +/* ---------------------- Finding good byte positions ---------------------- */ + /* Initializes each keyword's _selchars array. */ void -Search::init_selchars (bool use_all_chars, const Positions& positions) const +Search::init_selchars_tuple (bool use_all_chars, const Positions& positions) const { for (KeywordExt_List *temp = _head; temp; temp = temp->rest()) - temp->first()->init_selchars(use_all_chars, positions); + temp->first()->init_selchars_tuple(use_all_chars, positions); } /* Deletes each keyword's _selchars array. */ @@ -95,29 +126,31 @@ Search::delete_selchars () const /* Count the duplicate keywords that occur with a given set of positions. */ unsigned int -Search::count_duplicates (const Positions& positions) const +Search::count_duplicates_tuple (const Positions& positions) const { - init_selchars (false, positions); + init_selchars_tuple (option[ALLCHARS], positions); unsigned int count = 0; - Hash_Table representatives (_total_keys, option[NOLENGTH]); - for (KeywordExt_List *temp = _head; temp; temp = temp->rest()) - { - KeywordExt *keyword = temp->first(); - if (representatives.insert (keyword)) - count++; - } + { + Hash_Table representatives (_total_keys, option[NOLENGTH]); + for (KeywordExt_List *temp = _head; temp; temp = temp->rest()) + { + KeywordExt *keyword = temp->first(); + if (representatives.insert (keyword)) + count++; + } + } delete_selchars (); return count; } +/* Find good key positions. */ + void Search::find_positions () { - /* Determine good key positions. */ - /* 1. Find positions that must occur in order to distinguish duplicates. */ Positions mandatory; @@ -159,7 +192,7 @@ Search::find_positions () int imax = (_max_key_len < Positions::MAX_KEY_POS ? _max_key_len : Positions::MAX_KEY_POS); Positions current = mandatory; - unsigned int current_duplicates_count = count_duplicates (current); + unsigned int current_duplicates_count = count_duplicates_tuple (current); for (;;) { Positions best; @@ -170,7 +203,7 @@ Search::find_positions () { Positions tryal = current; tryal.add (i); - unsigned int try_duplicates_count = count_duplicates (tryal); + unsigned int try_duplicates_count = count_duplicates_tuple (tryal); /* We prefer 'try' to 'best' if it produces less duplicates, or if it produces the same number of duplicates but with @@ -203,7 +236,7 @@ Search::find_positions () { Positions tryal = current; tryal.remove (i); - unsigned int try_duplicates_count = count_duplicates (tryal); + unsigned int try_duplicates_count = count_duplicates_tuple (tryal); /* We prefer 'try' to 'best' if it produces less duplicates, or if it produces the same number of duplicates but with @@ -243,7 +276,7 @@ Search::find_positions () tryal.remove (i2); tryal.add (i3); unsigned int try_duplicates_count = - count_duplicates (tryal); + count_duplicates_tuple (tryal); /* We prefer 'try' to 'best' if it produces less duplicates, or if it produces the same number of duplicates but with @@ -269,18 +302,141 @@ Search::find_positions () _key_positions = current; } +/* --------------------- Finding good alpha increments --------------------- */ + +/* Initializes each keyword's _selchars array. */ +void +Search::init_selchars_multiset (bool use_all_chars, const Positions& positions, const unsigned int *alpha_inc) const +{ + for (KeywordExt_List *temp = _head; temp; temp = temp->rest()) + temp->first()->init_selchars_multiset(use_all_chars, positions, alpha_inc); +} + +/* Count the duplicate keywords that occur with the given set of positions + and a given alpha_inc[] array. */ +unsigned int +Search::count_duplicates_multiset (const unsigned int *alpha_inc) const +{ + init_selchars_multiset (option[ALLCHARS], _key_positions, alpha_inc); + + unsigned int count = 0; + { + Hash_Table representatives (_total_keys, option[NOLENGTH]); + for (KeywordExt_List *temp = _head; temp; temp = temp->rest()) + { + KeywordExt *keyword = temp->first(); + if (representatives.insert (keyword)) + count++; + } + } + + delete_selchars (); + + return count; +} + +/* Find good _alpha_inc[]. */ + +void +Search::find_alpha_inc () +{ + /* The goal is to choose _alpha_inc[] such that it doesn't introduce + artificial duplicates. */ + unsigned int duplicates_goal = count_duplicates_tuple (_key_positions); + + /* Start with zero increments. This is sufficient in most cases. */ + unsigned int *current = new unsigned int [_max_key_len]; + for (int i = 0; i < _max_key_len; i++) + current[i] = 0; + unsigned int current_duplicates_count = count_duplicates_multiset (current); + + if (current_duplicates_count > duplicates_goal) + { + /* Look which _alpha_inc[i] we are free to increment. */ + unsigned int nindices; + if (option[ALLCHARS]) + nindices = _max_key_len; + else + { + /* Ignore Positions::LASTCHAR. Remember that since Positions are + sorted in decreasing order, Positions::LASTCHAR comes last. */ + nindices = (_key_positions.get_size() == 0 + || _key_positions[_key_positions.get_size() - 1] + != Positions::LASTCHAR + ? _key_positions.get_size() + : _key_positions.get_size() - 1); + } + + unsigned int indices[nindices]; + if (option[ALLCHARS]) + for (unsigned int j = 0; j < nindices; j++) + indices[j] = j; + else + { + PositionIterator iter (_key_positions); + for (unsigned int j = 0; j < nindices; j++) + { + int key_pos = iter.next (); + if (key_pos == PositionIterator::EOS + || key_pos == Positions::LASTCHAR) + abort (); + indices[j] = key_pos - 1; + } + } + + /* Perform several rounds of searching for a good alpha increment. + Each round reduces the number of artificial collisions by adding + an increment in a single key position. */ + unsigned int best[_max_key_len]; + unsigned int tryal[_max_key_len]; + do + { + /* An increment of 1 is not always enough. Try higher increments + also. */ + for (unsigned int inc = 1; ; inc++) + { + unsigned int best_duplicates_count = UINT_MAX; + + for (unsigned int j = 0; j < nindices; j++) + { + memcpy (tryal, current, _max_key_len * sizeof (unsigned int)); + tryal[indices[j]] += inc; + unsigned int try_duplicates_count = + count_duplicates_multiset (tryal); + + /* We prefer 'try' to 'best' if it produces less + duplicates. */ + if (try_duplicates_count < best_duplicates_count) + { + memcpy (best, tryal, _max_key_len * sizeof (unsigned int)); + best_duplicates_count = try_duplicates_count; + } + } + + /* Stop this round when we got an improvement. */ + if (best_duplicates_count < current_duplicates_count) + { + memcpy (current, best, _max_key_len * sizeof (unsigned int)); + current_duplicates_count = best_duplicates_count; + break; + } + } + } + while (current_duplicates_count > duplicates_goal); + } + + _alpha_inc = current; +} + +/* ------------------------------------------------------------------------- */ + void Search::prepare () { KeywordExt_List *temp; - preprepare (); - - if (!option[POSITIONS]) - find_positions (); - /* Initialize each keyword's _selchars array. */ - init_selchars (option[ALLCHARS], _key_positions); + init_selchars_multiset(option[ALLCHARS], _key_positions, _alpha_inc); /* Check for duplicates, i.e. keywords with the same _selchars array (and - if !option[NOLENGTH] - also the same length). @@ -357,7 +513,16 @@ Search::prepare () } } + /* Compute _alpha_size, the upper bound on the indices passed to + asso_values[]. */ + unsigned int max_alpha_inc = 0; + for (int i = 0; i < _max_key_len; i++) + if (max_alpha_inc < _alpha_inc[i]) + max_alpha_inc = _alpha_inc[i]; + _alpha_size = (option[SEVENBIT] ? 128 : 256) + max_alpha_inc; + /* Compute the occurrences of each character in the alphabet. */ + _occurrences = new int[_alpha_size]; memset (_occurrences, 0, _alpha_size * sizeof (_occurrences[0])); for (temp = _head; temp; temp = temp->rest()) { @@ -366,6 +531,10 @@ Search::prepare () for (int count = keyword->_selchars_length; count > 0; ptr++, count--) _occurrences[*ptr]++; } + + /* Memory allocation. */ + _asso_values = new int[_alpha_size]; + _determined = new bool[_alpha_size]; } /* ---------------- Reordering the Keyword list (optional) ----------------- */ @@ -878,6 +1047,11 @@ void Search::optimize () { /* Preparations. */ + preprepare (); + _key_positions = option.get_key_positions(); + if (!option[POSITIONS]) + find_positions (); + find_alpha_inc (); prepare (); if (option[ORDER]) reorder (); @@ -1025,4 +1199,5 @@ Search::~Search () } delete[] _asso_values; delete[] _occurrences; + delete[] _alpha_inc; } diff --git a/src/search.h b/src/search.h index a260686..d6d4ce3 100644 --- a/src/search.h +++ b/src/search.h @@ -40,15 +40,26 @@ private: void preprepare (); /* Initializes each keyword's _selchars array. */ - void init_selchars (bool use_all_chars, const Positions& positions) const; + void init_selchars_tuple (bool use_all_chars, const Positions& positions) const; /* Deletes each keyword's _selchars array. */ void delete_selchars () const; /* Count the duplicate keywords that occur with a given set of positions. */ - unsigned int count_duplicates (const Positions& positions) const; + unsigned int count_duplicates_tuple (const Positions& positions) const; + /* Find good key positions. */ void find_positions (); + /* Initializes each keyword's _selchars array. */ + void init_selchars_multiset (bool use_all_chars, const Positions& positions, const unsigned int *alpha_inc) const; + + /* Count the duplicate keywords that occur with the given set of positions + and a given alpha_inc[] array. */ + unsigned int count_duplicates_multiset (const unsigned int *alpha_inc) const; + + /* Find good _alpha_inc[]. */ + void find_alpha_inc (); + void prepare (); /* Computes the sum of occurrences of the _selchars of a keyword. */ @@ -112,19 +123,22 @@ public: /* User-specified or computed key positions. */ Positions _key_positions; + /* Adjustments to add to bytes add specific key positions. */ + unsigned int * _alpha_inc; + /* Total number of duplicates that have been moved to _duplicate_link lists (not counting their representatives which stay on the main list). */ int _total_duplicates; /* Size of alphabet. */ - int const _alpha_size; + int _alpha_size; /* Counts occurrences of each key set character. _occurrences[c] is the number of times that c occurs among the _selchars of a keyword. */ - int * const _occurrences; + int * _occurrences; /* Value associated with each character. */ - int * const _asso_values; + int * _asso_values; private: @@ -132,7 +146,7 @@ private: int _list_len; /* Vector used during Search::reorder(). */ - bool * const _determined; + bool * _determined; /* Exclusive upper bound for every _asso_values[c]. A power of 2. */ int _asso_value_max; diff --git a/tests/chill.exp b/tests/chill.exp index d0504fc..dfb4293 100644 --- a/tests/chill.exp +++ b/tests/chill.exp @@ -7,7 +7,7 @@ struct resword { enum toktype { RESERVED, DIRECTIVE, PREDEF } flags; }; extern tree ridpointers []; -/* maximum key range = 2652, duplicates = 6 */ +/* maximum key range = 2275, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -23,32 +23,32 @@ hash (str, len) { static unsigned short asso_values[] = { - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 141, 74, 44, 107, 1, - 208, 1, 1, 22, 2692, 4, 43, 195, 151, 67, - 60, 2692, 64, 11, 452, 42, 11, 2, 3, 48, - 8, 2692, 2692, 2692, 2692, 1, 2692, 6, 52, 37, - 93, 1, 78, 1, 15, 7, 2692, 2, 119, 52, - 345, 231, 33, 2692, 92, 1, 233, 60, 1, 2, - 1, 80, 25, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, 2692, - 2692, 2692, 2692, 2692, 2692, 2692 + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 300, 9, 14, 11, 1, + 16, 321, 2, 33, 199, 9, 7, 99, 64, 56, + 93, 7, 7, 123, 1, 122, 10, 8, 71, 45, + 26, 2291, 2291, 2291, 2291, 1, 2291, 126, 89, 22, + 204, 1, 230, 158, 1, 7, 71, 2, 125, 17, + 6, 25, 13, 7, 4, 71, 1, 157, 14, 122, + 4, 132, 66, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, 2291, + 2291, 2291, 2291, 2291, 2291, 2291, 2291 }; register int hval = len; @@ -112,7 +112,7 @@ hash (str, len) case 3: hval += asso_values[(unsigned char)str[2]]; case 2: - hval += asso_values[(unsigned char)str[1]]; + hval += asso_values[(unsigned char)str[1]+1]; case 1: hval += asso_values[(unsigned char)str[0]]; break; @@ -133,312 +133,312 @@ in_word_set (str, len) TOTAL_KEYWORDS = 300, MIN_WORD_LENGTH = 2, MAX_WORD_LENGTH = 30, - MIN_HASH_VALUE = 40, - MAX_HASH_VALUE = 2691 + MIN_HASH_VALUE = 16, + MAX_HASH_VALUE = 2290 }; static struct resword wordlist[] = { - {"seize", SEIZE, NORID, RESERVED}, - {"page", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"SEIZE", SEIZE, NORID, RESERVED}, - {"case", CASE, NORID, RESERVED}, - {"esac", ESAC, NORID, RESERVED}, - {"ELSE", ELSE, NORID, RESERVED}, - {"asm", ASM_KEYWORD, NORID, RESERVED}, - {"WHILE", WHILE, NORID, RESERVED}, - {"spec", SPEC, NORID, RESERVED}, + {"to", TO, NORID, RESERVED}, + {"then", THEN, NORID, RESERVED}, {"EVER", EVER, NORID, RESERVED}, - {"pack", PACK, NORID, RESERVED}, - {"fi", FI, NORID, RESERVED}, - {"if", IF, NORID, RESERVED}, - {"access", ACCESS, NORID, RESERVED}, - {"up", UP, NORID, RESERVED}, - {"ever", EVER, NORID, RESERVED}, - {"UP", UP, NORID, RESERVED}, - {"cause", CAUSE, NORID, RESERVED}, - {"SPEC", SPEC, NORID, RESERVED}, - {"BY", BY, NORID, RESERVED}, - {"else", ELSE, NORID, RESERVED}, - {"OR", OR, NORID, RESERVED}, - {"by", BY, NORID, RESERVED}, - {"ROW", ROW, NORID, RESERVED}, - {"XOR", XOR, NORID, RESERVED}, - {"POS", POS, NORID, RESERVED}, - {"receive", RECEIVE, NORID, RESERVED}, - {"rem", REM, NORID, RESERVED}, - {"while", WHILE, NORID, RESERVED}, - {"RECEIVE", RECEIVE, NORID, RESERVED}, - {"chars", CHARS, NORID, RESERVED}, - {"LOC", LOC, NORID, RESERVED}, - {"based", BASED, NORID, RESERVED}, - {"EVEN", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ref", REF, NORID, RESERVED}, - {"IN", IN, RID_IN, RESERVED}, - {"DO", DO, NORID, RESERVED}, - {"OD", OD, NORID, RESERVED}, - {"far", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"CYCLE", CYCLE, NORID, RESERVED}, - {"read", READ, RID_READ, RESERVED}, + {"not", NOT, NORID, RESERVED}, + {"xor", XOR, NORID, RESERVED}, + {"od", OD, NORID, RESERVED}, {"DCL", DCL, NORID, RESERVED}, - {"CASE", CASE, NORID, RESERVED}, - {"ESAC", ESAC, NORID, RESERVED}, - {"PAGE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"elsif", ELSIF, NORID, RESERVED}, - {"SYN", SYN, NORID, RESERVED}, - {"simple", SIMPLE, NORID, RESERVED}, - {"ON", ON, NORID, RESERVED}, - {"large", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ALL", ALL, NORID, RESERVED}, - {"FI", FI, NORID, RESERVED}, - {"IF", IF, NORID, RESERVED}, - {"set", SET, NORID, RESERVED}, - {"PROC", PROC, NORID, RESERVED}, - {"at", AT, NORID, RESERVED}, - {"CAUSE", CAUSE, NORID, RESERVED}, - {"exit", EXIT, NORID, RESERVED}, - {"all", ALL, NORID, RESERVED}, - {"BIN", BIN, NORID, RESERVED}, - {"dcl", DCL, NORID, RESERVED}, - {"PACK", PACK, NORID, RESERVED}, - {"BEGIN", BEGINTOKEN, NORID, RESERVED}, - {"LARGE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ACCESS", ACCESS, NORID, RESERVED}, - {"this", THIS, NORID, RESERVED}, - {"with", WITH, NORID, RESERVED}, - {"END", END, NORID, RESERVED}, - {"REM", REM, NORID, RESERVED}, - {"PROCESS", PROCESS, NORID, RESERVED}, - {"CHARS", CHARS, NORID, RESERVED}, - {"BOOLS", BOOLS, RID_BOOLS, RESERVED}, - {"pos", POS, NORID, RESERVED}, - {"RECURSIVE", RECURSIVE, NORID, RESERVED}, - {"medium", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"step", STEP, NORID, RESERVED}, - {"SEND", SEND, NORID, RESERVED}, + {"in", IN, RID_IN, RESERVED}, + {"FAR", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"BY", BY, NORID, RESERVED}, {"CALL", CALL, NORID, RESERVED}, {"REF", REF, NORID, RESERVED}, - {"OF", OF, NORID, RESERVED}, - {"cycle", CYCLE, NORID, RESERVED}, - {"array", ARRAY, NORID, RESERVED}, - {"call", CALL, NORID, RESERVED}, - {"ELSIF", ELSIF, NORID, RESERVED}, - {"bit", BOOLS, RID_BOOLS, PREDEF}, - {"BODY", BODY, NORID, RESERVED}, - {"recursive", RECURSIVE, NORID, RESERVED}, - {"small", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"delay", DELAY, NORID, RESERVED}, - {"of", OF, NORID, RESERVED}, - {"REGION", REGION, NORID, RESERVED}, - {"prefixed", PREFIXED, NORID, RESERVED}, - {"READ", READ, RID_READ, RESERVED}, - {"use_seize_file", USE_SEIZE_FILE, NORID, DIRECTIVE}, - {"or", OR, NORID, RESERVED}, - {"do", DO, NORID, RESERVED}, - {"od", OD, NORID, RESERVED}, - {"xor", XOR, NORID, RESERVED}, - {"row", ROW, NORID, RESERVED}, - {"DOWN", DOWN, NORID, RESERVED}, - {"SIMPLE", SIMPLE, NORID, RESERVED}, - {"BASED", BASED, NORID, RESERVED}, - {"assert", ASSERT, NORID, RESERVED}, - {"FOR", FOR, NORID, RESERVED}, - {"DELAY", DELAY, NORID, RESERVED}, - {"ASM", ASM_KEYWORD, NORID, RESERVED}, - {"even", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"in", IN, RID_IN, RESERVED}, - {"RANGE", RANGE, NORID, RESERVED}, - {"list", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ORIF", ORIF, NORID, RESERVED}, - {"buffer", BUFFER, NORID, RESERVED}, - {"MOD", MOD, NORID, RESERVED}, - {"SIGNAL", SIGNAL, NORID, RESERVED}, - {"mod", MOD, NORID, RESERVED}, - {"USE_SEIZE_FILE", USE_SEIZE_FILE, NORID, DIRECTIVE}, - {"loc", LOC, NORID, RESERVED}, - {"INLINE", INLINE, RID_INLINE, RESERVED}, - {"proc", PROC, NORID, RESERVED}, - {"AND", AND, NORID, RESERVED}, - {"process", PROCESS, NORID, RESERVED}, - {"for", FOR, NORID, RESERVED}, - {"bin", BIN, NORID, RESERVED}, - {"GENERAL", GENERAL, NORID, RESERVED}, - {"begin", BEGINTOKEN, NORID, RESERVED}, - {"orif", ORIF, NORID, RESERVED}, - {"after", AFTER, NORID, RESERVED}, - {"FAR", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"syn", SYN, NORID, RESERVED}, - {"SMALL", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"end", END, NORID, RESERVED}, - {"send", SEND, NORID, RESERVED}, - {"VARYING", VARYING, NORID, RESERVED}, - {"and", AND, NORID, RESERVED}, - {"range", RANGE, NORID, RESERVED}, - {"body", BODY, NORID, RESERVED}, - {"MODULE", MODULE, NORID, RESERVED}, - {"ARRAY", ARRAY, NORID, RESERVED}, - {"DEBUG_LINES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"to", TO, NORID, RESERVED}, - {"SET", SET, NORID, RESERVED}, - {"text", TEXT, NORID, RESERVED}, - {"NOPACK", NOPACK, NORID, RESERVED}, - {"PREFIXED", PREFIXED, NORID, RESERVED}, - {"WITH", WITH, NORID, RESERVED}, - {"EXIT", EXIT, NORID, RESERVED}, - {"signal", SIGNAL, NORID, RESERVED}, - {"THIS", THIS, NORID, RESERVED}, - {"stop", STOP, NORID, RESERVED}, - {"result", RESULT, NORID, RESERVED}, - {"TO", TO, NORID, RESERVED}, - {"static", STATIC, NORID, RESERVED}, {"out", PARAMATTR, RID_OUT, RESERVED}, - {"STEP", STEP, NORID, RESERVED}, - {"NEWMODE", NEWMODE, NORID, RESERVED}, - {"LIST", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"andif", ANDIF, NORID, RESERVED}, - {"varying", VARYING, NORID, RESERVED}, - {"FORBID", FORBID, NORID, RESERVED}, - {"BIT", BOOLS, RID_BOOLS, PREDEF}, - {"forbid", FORBID, NORID, RESERVED}, - {"module", MODULE, NORID, RESERVED}, - {"OUT", PARAMATTR, RID_OUT, RESERVED}, - {"debug_types", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"MEDIUM", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"start", START, NORID, RESERVED}, - {"general", GENERAL, NORID, RESERVED}, - {"on", ON, NORID, RESERVED}, - {"RANGE_ON", RANGE_ON, NORID, DIRECTIVE}, - {"event", EVENT, NORID, RESERVED}, - {"SYNMODE", SYNMODE, NORID, RESERVED}, - {"GOTO", GOTO, NORID, RESERVED}, - {"STOP", STOP, NORID, RESERVED}, - {"AT", AT, NORID, RESERVED}, {"init", INIT, NORID, RESERVED}, - {"optimize", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"then", THEN, NORID, RESERVED}, - {"SIGNAL_CODE", SIGNAL_CODE, NORID, DIRECTIVE}, - {"powerset", POWERSET, NORID, RESERVED}, + {"on", ON, NORID, RESERVED}, + {"context", CONTEXT, NORID, RESERVED}, + {"OD", OD, NORID, RESERVED}, {"BUFFER", BUFFER, NORID, RESERVED}, - {"THEN", THEN, NORID, RESERVED}, - {"remote", REMOTE, NORID, RESERVED}, - {"RESULT", RESULT, NORID, RESERVED}, + {"CYCLE", CYCLE, NORID, RESERVED}, + {"OUT", PARAMATTR, RID_OUT, RESERVED}, + {"END", END, NORID, RESERVED}, + {"EVEN", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, {"EVENT", EVENT, NORID, RESERVED}, - {"dynamic", DYNAMIC, RID_DYNAMIC, RESERVED}, - {"ANDIF", ANDIF, NORID, RESERVED}, - {"bools", BOOLS, RID_BOOLS, RESERVED}, - {"NONREF", NONREF, NORID, RESERVED}, + {"EXIT", EXIT, NORID, RESERVED}, + {"WHILE", WHILE, NORID, RESERVED}, + {"RECEIVE", RECEIVE, NORID, RESERVED}, + {"this", THIS, NORID, RESERVED}, + {"IN", IN, RID_IN, RESERVED}, + {"TEXT", TEXT, NORID, RESERVED}, + {"else", ELSE, NORID, RESERVED}, + {"TO", TO, NORID, RESERVED}, + {"or", OR, NORID, RESERVED}, + {"pos", POS, NORID, RESERVED}, + {"THEN", THEN, NORID, RESERVED}, + {"spec", SPEC, NORID, RESERVED}, + {"DO", DO, NORID, RESERVED}, + {"ROW", ROW, NORID, RESERVED}, + {"ON", ON, NORID, RESERVED}, + {"LOC", LOC, NORID, RESERVED}, + {"FOR", FOR, NORID, RESERVED}, + {"REM", REM, NORID, RESERVED}, {"INIT", INIT, NORID, RESERVED}, - {"nopack", NOPACK, NORID, RESERVED}, - {"struct", STRUCT, NORID, RESERVED}, - {"POWERSET", POWERSET, NORID, RESERVED}, + {"PACK", PACK, NORID, RESERVED}, + {"pack", PACK, NORID, RESERVED}, + {"UP", UP, NORID, RESERVED}, + {"ever", EVER, NORID, RESERVED}, + {"even", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"proc", PROC, NORID, RESERVED}, + {"event", EVENT, NORID, RESERVED}, + {"optimize", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"row", ROW, NORID, RESERVED}, + {"SET", SET, NORID, RESERVED}, + {"exit", EXIT, NORID, RESERVED}, + {"syn", SYN, NORID, RESERVED}, + {"asm", ASM_KEYWORD, NORID, RESERVED}, + {"SPEC", SPEC, NORID, RESERVED}, + {"CASE", CASE, NORID, RESERVED}, + {"BUFFER_CODE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"esac", ESAC, NORID, RESERVED}, + {"by", BY, NORID, RESERVED}, + {"BASED", BASED, NORID, RESERVED}, {"NOT", NOT, NORID, RESERVED}, + {"BODY", BODY, NORID, RESERVED}, + {"loc", LOC, NORID, RESERVED}, + {"bit", BOOLS, RID_BOOLS, PREDEF}, + {"up", UP, NORID, RESERVED}, + {"if", IF, NORID, RESERVED}, + {"EVENT_CODE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"bin", BIN, NORID, RESERVED}, + {"XOR", XOR, NORID, RESERVED}, + {"FORBID", FORBID, NORID, RESERVED}, + {"inline", INLINE, RID_INLINE, RESERVED}, + {"DOWN", DOWN, NORID, RESERVED}, + {"OR", OR, NORID, RESERVED}, + {"of", OF, NORID, RESERVED}, + {"REMOTE", REMOTE, NORID, RESERVED}, + {"case", CASE, NORID, RESERVED}, + {"nopack", NOPACK, NORID, RESERVED}, + {"empty_on", EMPTY_ON, NORID, DIRECTIVE}, + {"THIS", THIS, NORID, RESERVED}, + {"with", WITH, NORID, RESERVED}, + {"INLINE", INLINE, RID_INLINE, RESERVED}, + {"goto", GOTO, NORID, RESERVED}, + {"SEIZE", SEIZE, NORID, RESERVED}, + {"MOD", MOD, NORID, RESERVED}, + {"assert", ASSERT, NORID, RESERVED}, + {"BIT", BOOLS, RID_BOOLS, PREDEF}, + {"WITH", WITH, NORID, RESERVED}, + {"SYN", SYN, NORID, RESERVED}, + {"FI", FI, NORID, RESERVED}, + {"SEND", SEND, NORID, RESERVED}, + {"do", DO, NORID, RESERVED}, + {"inout", PARAMATTR, RID_INOUT, RESERVED}, + {"continue", CONTINUE, NORID, RESERVED}, + {"RETURN", RETURN, NORID, RESERVED}, + {"ELSE", ELSE, NORID, RESERVED}, + {"nolist", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"ORIF", ORIF, NORID, RESERVED}, + {"end", END, NORID, RESERVED}, + {"powerset", POWERSET, NORID, RESERVED}, + {"chars", CHARS, NORID, RESERVED}, + {"mod", MOD, NORID, RESERVED}, + {"text", TEXT, NORID, RESERVED}, + {"cycle", CYCLE, NORID, RESERVED}, + {"step", STEP, NORID, RESERVED}, + {"CCITT_OS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"for", FOR, NORID, RESERVED}, + {"NONREF", NONREF, NORID, RESERVED}, + {"CONTEXT", CONTEXT, NORID, RESERVED}, + {"rem", REM, NORID, RESERVED}, + {"NEWMODE", NEWMODE, NORID, RESERVED}, + {"range", RANGE, NORID, RESERVED}, + {"OPTIMIZE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"page", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"nonref", NONREF, NORID, RESERVED}, + {"while", WHILE, NORID, RESERVED}, + {"priority", PRIORITY, NORID, RESERVED}, + {"stop", STOP, NORID, RESERVED}, + {"all", ALL, NORID, RESERVED}, + {"list", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"INOUT", PARAMATTR, RID_INOUT, RESERVED}, + {"CAUSE", CAUSE, NORID, RESERVED}, + {"BIN", BIN, NORID, RESERVED}, + {"ELSIF", ELSIF, NORID, RESERVED}, + {"timeout", TIMEOUT, NORID, RESERVED}, + {"process", PROCESS, NORID, RESERVED}, + {"RESULT", RESULT, NORID, RESERVED}, + {"remote", REMOTE, NORID, RESERVED}, + {"at", AT, NORID, RESERVED}, + {"receive", RECEIVE, NORID, RESERVED}, + {"exceptions", EXCEPTIONS, NORID, RESERVED}, + {"PROC", PROC, NORID, RESERVED}, + {"BOOLS", BOOLS, RID_BOOLS, RESERVED}, + {"after", AFTER, NORID, RESERVED}, + {"range_on", RANGE_ON, NORID, DIRECTIVE}, + {"EMPTY_OFF", EMPTY_OFF, NORID, DIRECTIVE}, + {"fi", FI, NORID, RESERVED}, + {"simple", SIMPLE, NORID, RESERVED}, + {"set", SET, NORID, RESERVED}, + {"POS", POS, NORID, RESERVED}, + {"ESAC", ESAC, NORID, RESERVED}, + {"far", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"NOLIST", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"bools", BOOLS, RID_BOOLS, RESERVED}, + {"elsif", ELSIF, NORID, RESERVED}, + {"EMPTY_ON", EMPTY_ON, NORID, DIRECTIVE}, + {"LIST", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"POWERSET", POWERSET, NORID, RESERVED}, + {"orif", ORIF, NORID, RESERVED}, + {"READ", READ, RID_READ, RESERVED}, + {"MODULE", MODULE, NORID, RESERVED}, + {"ccitt_os", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"optimize_runtime", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"RECURSIVE", RECURSIVE, NORID, RESERVED}, + {"STEP", STEP, NORID, RESERVED}, + {"cause", CAUSE, NORID, RESERVED}, + {"RETURNS", RETURNS, NORID, RESERVED}, {"down", DOWN, NORID, RESERVED}, + {"LARGE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"IF", IF, NORID, RESERVED}, + {"PREFIXED", PREFIXED, NORID, RESERVED}, + {"and", AND, NORID, RESERVED}, + {"start", START, NORID, RESERVED}, + {"call", CALL, NORID, RESERVED}, {"grant", GRANT, NORID, RESERVED}, + {"AND", AND, NORID, RESERVED}, + {"OF", OF, NORID, RESERVED}, + {"seize", SEIZE, NORID, RESERVED}, + {"USE_SEIZE_FILE", USE_SEIZE_FILE, NORID, DIRECTIVE}, + {"large", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"DELAY", DELAY, NORID, RESERVED}, + {"MEDIUM", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"SYNMODE", SYNMODE, NORID, RESERVED}, + {"reentrant", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"print_o_code", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"static", STATIC, NORID, RESERVED}, + {"no_overlap_check", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"event_code", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"STRUCT", STRUCT, NORID, RESERVED}, + {"synmode", SYNMODE, NORID, RESERVED}, + {"STOP", STOP, NORID, RESERVED}, + {"PRIORITY", PRIORITY, NORID, RESERVED}, + {"CONTINUE", CONTINUE, NORID, RESERVED}, + {"ASM", ASM_KEYWORD, NORID, RESERVED}, + {"RANGE", RANGE, NORID, RESERVED}, + {"return", RETURN, NORID, RESERVED}, + {"ALL", ALL, NORID, RESERVED}, + {"varying", VARYING, NORID, RESERVED}, + {"struct", STRUCT, NORID, RESERVED}, + {"ANDIF", ANDIF, NORID, RESERVED}, + {"AT", AT, NORID, RESERVED}, + {"PAGE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"process_type", PROCESS_TYPE_TOKEN, NORID, DIRECTIVE}, {"region", REGION, NORID, RESERVED}, {"ASSERT", ASSERT, NORID, RESERVED}, - {"DEBUG_SYMBOLS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"debug_lines", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"goto", GOTO, NORID, RESERVED}, - {"DYNAMIC", DYNAMIC, RID_DYNAMIC, RESERVED}, - {"NO_OVERLAP_CHECK", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"newmode", NEWMODE, NORID, RESERVED}, - {"buffer_code", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"INOUT", PARAMATTR, RID_INOUT, RESERVED}, - {"NOLIST", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"process_type", PROCESS_TYPE_TOKEN, NORID, DIRECTIVE}, - {"debug_symbols", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"RETURN", RETURN, NORID, RESERVED}, - {"priority", PRIORITY, NORID, RESERVED}, - {"REMOTE", REMOTE, NORID, RESERVED}, - {"ccitt_os", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"RETURNS", RETURNS, NORID, RESERVED}, - {"empty_off", EMPTY_OFF, NORID, DIRECTIVE}, - {"PRIORITY", PRIORITY, NORID, RESERVED}, - {"DEBUG_TYPES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"synmode", SYNMODE, NORID, RESERVED}, - {"not", NOT, NORID, RESERVED}, - {"GRANT", GRANT, NORID, RESERVED}, {"EXCEPTIONS", EXCEPTIONS, NORID, RESERVED}, - {"timeout", TIMEOUT, NORID, RESERVED}, - {"BUFFER_CODE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"return", RETURN, NORID, RESERVED}, - {"inline", INLINE, RID_INLINE, RESERVED}, - {"returns", RETURNS, NORID, RESERVED}, - {"PROCESS_TYPE", PROCESS_TYPE_TOKEN, NORID, DIRECTIVE}, - {"OPTIMIZE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"range_off", RANGE_OFF, NORID, DIRECTIVE}, - {"EVENT_CODE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"RANGE_OFF", RANGE_OFF, NORID, DIRECTIVE}, - {"signal_code", SIGNAL_CODE, NORID, DIRECTIVE}, - {"AFTER", AFTER, NORID, RESERVED}, - {"inout", PARAMATTR, RID_INOUT, RESERVED}, - {"exceptions", EXCEPTIONS, NORID, RESERVED}, - {"TEXT", TEXT, NORID, RESERVED}, - {"grant_file_size", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"CONTINUE", CONTINUE, NORID, RESERVED}, - {"nolist", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"short_pred_succ", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"event_code", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"EMPTY_ON", EMPTY_ON, NORID, DIRECTIVE}, - {"empty_on", EMPTY_ON, NORID, DIRECTIVE}, - {"SHORT_PRED_SUCC", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"multiple_data_segs", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"range_on", RANGE_ON, NORID, DIRECTIVE}, + {"body", BODY, NORID, RESERVED}, + {"BEGIN", BEGINTOKEN, NORID, RESERVED}, + {"dynamic", DYNAMIC, RID_DYNAMIC, RESERVED}, + {"small", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"based", BASED, NORID, RESERVED}, + {"array", ARRAY, NORID, RESERVED}, {"PRINT_O_CODE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"STRUCT", STRUCT, NORID, RESERVED}, - {"context", CONTEXT, NORID, RESERVED}, - {"nonref", NONREF, NORID, RESERVED}, - {"CCITT_OS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"use_seize_file_restricted", USE_SEIZE_FILE_RESTRICTED, NORID, DIRECTIVE}, - {"START", START, NORID, RESERVED}, - {"STATIC", STATIC, NORID, RESERVED}, - {"GRANT_FILE_SIZE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"all_static_off", ALL_STATIC_OFF, NORID, DIRECTIVE}, - {"no_overlap_check", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"CONTEXT", CONTEXT, NORID, RESERVED}, - {"extra_const_seg", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"TIMEOUT", TIMEOUT, NORID, RESERVED}, - {"EMPTY_OFF", EMPTY_OFF, NORID, DIRECTIVE}, - {"continue", CONTINUE, NORID, RESERVED}, - {"signal_max_length", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"print_o_code", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"generate_set_names", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"all_static_on", ALL_STATIC_ON, NORID, DIRECTIVE}, - {"reentrant", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"SIGNAL_MAX_LENGTH", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"optimize_runtime", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"EXTRA_CONST_SEG", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"support_causing_address", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"state_routine", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"ref", REF, NORID, RESERVED}, {"REENTRANT", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"multiple_const_segs", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ALL_STATIC_ON", ALL_STATIC_ON, NORID, DIRECTIVE}, - {"generate_all_set_names", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"reentrant_all", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"GOTO", GOTO, NORID, RESERVED}, + {"returns", RETURNS, NORID, RESERVED}, + {"CHARS", CHARS, NORID, RESERVED}, + {"TIMEOUT", TIMEOUT, NORID, RESERVED}, + {"begin", BEGINTOKEN, NORID, RESERVED}, + {"VARYING", VARYING, NORID, RESERVED}, + {"RANGE_OFF", RANGE_OFF, NORID, DIRECTIVE}, + {"access", ACCESS, NORID, RESERVED}, + {"REGION", REGION, NORID, RESERVED}, + {"SMALL", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"send", SEND, NORID, RESERVED}, + {"recursive", RECURSIVE, NORID, RESERVED}, + {"module", MODULE, NORID, RESERVED}, + {"SIMPLE", SIMPLE, NORID, RESERVED}, + {"RANGE_ON", RANGE_ON, NORID, DIRECTIVE}, + {"dcl", DCL, NORID, RESERVED}, + {"prefixed", PREFIXED, NORID, RESERVED}, + {"PROCESS", PROCESS, NORID, RESERVED}, + {"all_static_on", ALL_STATIC_ON, NORID, DIRECTIVE}, + {"forbid", FORBID, NORID, RESERVED}, + {"DYNAMIC", DYNAMIC, RID_DYNAMIC, RESERVED}, + {"START", START, NORID, RESERVED}, + {"signal", SIGNAL, NORID, RESERVED}, + {"read", READ, RID_READ, RESERVED}, + {"state_routine", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"buffer", BUFFER, NORID, RESERVED}, + {"ACCESS", ACCESS, NORID, RESERVED}, + {"NOPACK", NOPACK, NORID, RESERVED}, {"USE_SEIZE_FILE_RESTRICTED", USE_SEIZE_FILE_RESTRICTED, NORID, DIRECTIVE}, - {"MULTIPLE_CONST_SEGS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"SUPPORT_CAUSING_ADDRESS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"print_symbol_table", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"make_publics_for_discrete_syns", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"REENTRANT_ALL", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"MULTIPLE_DATA_SEGS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"only_for_target", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"result", RESULT, NORID, RESERVED}, + {"andif", ANDIF, NORID, RESERVED}, + {"STATIC", STATIC, NORID, RESERVED}, {"OPTIMIZE_RUNTIME", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ONLY_FOR_TARGET", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"GENERATE_SET_NAMES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ONLY_FOR_SIMULATION", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"ALL_STATIC_OFF", ALL_STATIC_OFF, NORID, DIRECTIVE}, - {"STATE_ROUTINE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"PRINT_SYMBOL_TABLE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"MAKE_PUBLICS_FOR_DISCRETE_SYNS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"GENERATE_ALL_SET_NAMES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"OPTIMIZATION_WINDOW", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"newmode", NEWMODE, NORID, RESERVED}, + {"short_pred_succ", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"SHORT_PRED_SUCC", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"AFTER", AFTER, NORID, RESERVED}, + {"extra_const_seg", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"medium", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"empty_off", EMPTY_OFF, NORID, DIRECTIVE}, + {"general", GENERAL, NORID, RESERVED}, + {"use_seize_file", USE_SEIZE_FILE, NORID, DIRECTIVE}, + {"PROCESS_TYPE", PROCESS_TYPE_TOKEN, NORID, DIRECTIVE}, + {"NO_OVERLAP_CHECK", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"DEBUG_LINES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"GENERAL", GENERAL, NORID, RESERVED}, + {"multiple_const_segs", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"range_off", RANGE_OFF, NORID, DIRECTIVE}, + {"DEBUG_TYPES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"reentrant_all", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"ARRAY", ARRAY, NORID, RESERVED}, + {"REENTRANT_ALL", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, {"optimization_window", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"send_buffer_default_priority", SEND_BUFFER_DEFAULT_PRIORITY, NORID, DIRECTIVE}, + {"GRANT", GRANT, NORID, RESERVED}, + {"signal_code", SIGNAL_CODE, NORID, DIRECTIVE}, + {"delay", DELAY, NORID, RESERVED}, + {"buffer_code", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"generate_set_names", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"STATE_ROUTINE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"only_for_target", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"grant_file_size", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"ONLY_FOR_TARGET", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"OPTIMIZATION_WINDOW", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"print_symbol_table", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"DEBUG_SYMBOLS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"ALL_STATIC_OFF", ALL_STATIC_OFF, NORID, DIRECTIVE}, + {"PRINT_SYMBOL_TABLE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"all_static_off", ALL_STATIC_OFF, NORID, DIRECTIVE}, + {"use_seize_file_restricted", USE_SEIZE_FILE_RESTRICTED, NORID, DIRECTIVE}, + {"ALL_STATIC_ON", ALL_STATIC_ON, NORID, DIRECTIVE}, + {"signal_max_length", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"SIGNAL", SIGNAL, NORID, RESERVED}, + {"debug_lines", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"GRANT_FILE_SIZE", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"debug_types", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"EXTRA_CONST_SEG", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"multiple_data_segs", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"MULTIPLE_CONST_SEGS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"ONLY_FOR_SIMULATION", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"SIGNAL_CODE", SIGNAL_CODE, NORID, DIRECTIVE}, {"only_for_simulation", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, - {"send_signal_default_priority", SEND_SIGNAL_DEFAULT_PRIORITY, NORID, DIRECTIVE}, + {"SEND_BUFFER_DEFAULT_PRIORITY", SEND_BUFFER_DEFAULT_PRIORITY, NORID, DIRECTIVE}, + {"MAKE_PUBLICS_FOR_DISCRETE_SYNS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"generate_all_set_names", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"debug_symbols", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"support_causing_address", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"GENERATE_SET_NAMES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"MULTIPLE_DATA_SEGS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"make_publics_for_discrete_syns", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"GENERATE_ALL_SET_NAMES", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, {"SEND_SIGNAL_DEFAULT_PRIORITY", SEND_SIGNAL_DEFAULT_PRIORITY, NORID, DIRECTIVE}, - {"SEND_BUFFER_DEFAULT_PRIORITY", SEND_BUFFER_DEFAULT_PRIORITY, NORID, DIRECTIVE} + {"SIGNAL_MAX_LENGTH", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"SUPPORT_CAUSING_ADDRESS", IGNORED_DIRECTIVE, NORID, DIRECTIVE}, + {"send_signal_default_priority", SEND_SIGNAL_DEFAULT_PRIORITY, NORID, DIRECTIVE}, + {"send_buffer_default_priority", SEND_BUFFER_DEFAULT_PRIORITY, NORID, DIRECTIVE} }; if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) @@ -451,894 +451,906 @@ in_word_set (str, len) register struct resword *wordendptr; register struct resword *resword; - switch (key - 40) + switch (key - 16) { case 0: resword = &wordlist[0]; goto compare; - case 5: + case 3: resword = &wordlist[1]; goto compare; - case 8: + case 5: resword = &wordlist[2]; goto compare; - case 9: - wordptr = &wordlist[3]; - wordendptr = wordptr + 2; - goto multicompare; - case 20: + case 7: + resword = &wordlist[3]; + goto compare; + case 8: + resword = &wordlist[4]; + goto compare; + case 12: resword = &wordlist[5]; goto compare; - case 22: + case 16: resword = &wordlist[6]; goto compare; - case 34: + case 18: resword = &wordlist[7]; goto compare; - case 36: + case 19: resword = &wordlist[8]; goto compare; - case 41: + case 21: resword = &wordlist[9]; goto compare; - case 42: + case 25: resword = &wordlist[10]; goto compare; - case 47: - wordptr = &wordlist[11]; - wordendptr = wordptr + 2; - goto multicompare; - case 49: + case 26: + resword = &wordlist[11]; + goto compare; + case 27: + resword = &wordlist[12]; + goto compare; + case 28: resword = &wordlist[13]; goto compare; - case 55: + case 36: resword = &wordlist[14]; goto compare; - case 59: + case 39: resword = &wordlist[15]; goto compare; - case 64: + case 43: resword = &wordlist[16]; goto compare; - case 70: + case 49: resword = &wordlist[17]; goto compare; - case 80: + case 51: resword = &wordlist[18]; goto compare; - case 84: + case 54: resword = &wordlist[19]; goto compare; - case 86: + case 55: resword = &wordlist[20]; goto compare; - case 93: + case 62: resword = &wordlist[21]; goto compare; - case 94: + case 64: resword = &wordlist[22]; goto compare; - case 96: + case 68: resword = &wordlist[23]; goto compare; - case 97: + case 71: resword = &wordlist[24]; goto compare; - case 101: + case 73: resword = &wordlist[25]; goto compare; - case 107: + case 74: resword = &wordlist[26]; goto compare; - case 108: + case 75: resword = &wordlist[27]; goto compare; - case 109: + case 77: resword = &wordlist[28]; goto compare; - case 111: + case 78: resword = &wordlist[29]; goto compare; - case 116: + case 80: resword = &wordlist[30]; goto compare; - case 117: + case 82: resword = &wordlist[31]; goto compare; - case 118: + case 84: resword = &wordlist[32]; goto compare; - case 128: + case 87: resword = &wordlist[33]; goto compare; - case 134: + case 89: resword = &wordlist[34]; goto compare; - case 135: + case 90: resword = &wordlist[35]; goto compare; - case 136: - wordptr = &wordlist[36]; - wordendptr = wordptr + 2; - goto multicompare; - case 139: + case 95: + resword = &wordlist[36]; + goto compare; + case 98: + resword = &wordlist[37]; + goto compare; + case 101: resword = &wordlist[38]; goto compare; - case 145: + case 103: resword = &wordlist[39]; goto compare; - case 156: + case 109: resword = &wordlist[40]; goto compare; - case 157: + case 111: resword = &wordlist[41]; goto compare; - case 161: - wordptr = &wordlist[42]; - wordendptr = wordptr + 2; - goto multicompare; - case 167: + case 113: + resword = &wordlist[42]; + goto compare; + case 114: + resword = &wordlist[43]; + goto compare; + case 115: resword = &wordlist[44]; goto compare; - case 171: + case 116: resword = &wordlist[45]; goto compare; - case 173: + case 118: resword = &wordlist[46]; goto compare; - case 179: + case 119: resword = &wordlist[47]; goto compare; - case 180: + case 120: resword = &wordlist[48]; goto compare; - case 184: + case 123: resword = &wordlist[49]; goto compare; - case 190: + case 126: resword = &wordlist[50]; goto compare; - case 192: - wordptr = &wordlist[51]; - wordendptr = wordptr + 2; - goto multicompare; - case 198: + case 127: + resword = &wordlist[51]; + goto compare; + case 129: + resword = &wordlist[52]; + goto compare; + case 130: resword = &wordlist[53]; goto compare; - case 199: + case 131: resword = &wordlist[54]; goto compare; - case 201: + case 133: resword = &wordlist[55]; goto compare; - case 204: + case 135: resword = &wordlist[56]; goto compare; - case 206: + case 137: resword = &wordlist[57]; goto compare; - case 207: + case 138: resword = &wordlist[58]; goto compare; - case 210: + case 141: resword = &wordlist[59]; goto compare; - case 212: + case 142: resword = &wordlist[60]; goto compare; - case 213: + case 145: resword = &wordlist[61]; goto compare; - case 214: + case 146: resword = &wordlist[62]; goto compare; - case 215: + case 147: resword = &wordlist[63]; goto compare; - case 218: + case 148: resword = &wordlist[64]; goto compare; - case 220: + case 150: resword = &wordlist[65]; goto compare; - case 221: + case 151: resword = &wordlist[66]; goto compare; - case 222: + case 152: resword = &wordlist[67]; goto compare; - case 223: + case 153: resword = &wordlist[68]; goto compare; - case 225: + case 158: resword = &wordlist[69]; goto compare; - case 226: + case 159: resword = &wordlist[70]; goto compare; - case 227: + case 161: resword = &wordlist[71]; goto compare; - case 228: + case 164: resword = &wordlist[72]; goto compare; - case 229: + case 165: resword = &wordlist[73]; goto compare; - case 231: + case 169: resword = &wordlist[74]; goto compare; - case 232: + case 170: resword = &wordlist[75]; goto compare; - case 234: + case 171: resword = &wordlist[76]; goto compare; - case 235: + case 172: resword = &wordlist[77]; goto compare; - case 236: + case 177: resword = &wordlist[78]; goto compare; - case 237: + case 178: resword = &wordlist[79]; goto compare; - case 239: + case 183: resword = &wordlist[80]; goto compare; - case 241: + case 184: resword = &wordlist[81]; goto compare; - case 245: + case 185: resword = &wordlist[82]; goto compare; - case 250: + case 188: resword = &wordlist[83]; goto compare; - case 255: + case 190: resword = &wordlist[84]; goto compare; - case 260: + case 194: resword = &wordlist[85]; goto compare; - case 261: + case 196: resword = &wordlist[86]; goto compare; - case 262: + case 198: resword = &wordlist[87]; goto compare; - case 264: + case 200: resword = &wordlist[88]; goto compare; - case 271: + case 201: resword = &wordlist[89]; goto compare; - case 272: + case 202: resword = &wordlist[90]; goto compare; - case 274: + case 203: resword = &wordlist[91]; goto compare; - case 277: + case 204: resword = &wordlist[92]; goto compare; - case 278: + case 205: resword = &wordlist[93]; goto compare; - case 285: + case 207: resword = &wordlist[94]; goto compare; - case 286: - wordptr = &wordlist[95]; - wordendptr = wordptr + 2; - goto multicompare; - case 287: + case 212: + resword = &wordlist[95]; + goto compare; + case 213: + resword = &wordlist[96]; + goto compare; + case 216: resword = &wordlist[97]; goto compare; - case 288: + case 217: resword = &wordlist[98]; goto compare; - case 291: + case 218: resword = &wordlist[99]; goto compare; - case 298: + case 219: resword = &wordlist[100]; goto compare; - case 299: + case 221: resword = &wordlist[101]; goto compare; - case 300: + case 224: resword = &wordlist[102]; goto compare; - case 302: + case 225: resword = &wordlist[103]; goto compare; - case 305: + case 230: resword = &wordlist[104]; goto compare; - case 310: + case 232: resword = &wordlist[105]; goto compare; - case 312: + case 234: resword = &wordlist[106]; goto compare; - case 314: + case 235: resword = &wordlist[107]; goto compare; - case 323: + case 236: resword = &wordlist[108]; goto compare; - case 324: + case 238: resword = &wordlist[109]; goto compare; - case 325: + case 246: resword = &wordlist[110]; goto compare; - case 327: + case 247: resword = &wordlist[111]; goto compare; - case 332: + case 248: resword = &wordlist[112]; goto compare; - case 335: + case 249: resword = &wordlist[113]; goto compare; - case 339: + case 250: resword = &wordlist[114]; goto compare; - case 347: + case 251: resword = &wordlist[115]; goto compare; - case 350: + case 252: resword = &wordlist[116]; goto compare; - case 356: + case 254: resword = &wordlist[117]; goto compare; - case 357: + case 255: resword = &wordlist[118]; goto compare; - case 362: + case 256: resword = &wordlist[119]; goto compare; - case 363: + case 257: resword = &wordlist[120]; goto compare; - case 364: + case 258: resword = &wordlist[121]; goto compare; - case 367: + case 259: resword = &wordlist[122]; goto compare; - case 369: + case 261: resword = &wordlist[123]; goto compare; - case 371: + case 264: resword = &wordlist[124]; goto compare; - case 372: + case 265: resword = &wordlist[125]; goto compare; - case 375: + case 266: resword = &wordlist[126]; goto compare; - case 376: + case 268: resword = &wordlist[127]; goto compare; - case 389: + case 269: resword = &wordlist[128]; goto compare; - case 398: + case 270: resword = &wordlist[129]; goto compare; - case 402: + case 273: resword = &wordlist[130]; goto compare; - case 404: + case 274: resword = &wordlist[131]; goto compare; - case 405: + case 277: resword = &wordlist[132]; goto compare; - case 407: + case 279: resword = &wordlist[133]; goto compare; - case 410: + case 282: resword = &wordlist[134]; goto compare; - case 420: + case 286: resword = &wordlist[135]; goto compare; - case 421: + case 287: resword = &wordlist[136]; goto compare; - case 423: + case 288: resword = &wordlist[137]; goto compare; - case 425: + case 289: resword = &wordlist[138]; goto compare; - case 426: + case 296: resword = &wordlist[139]; goto compare; - case 427: + case 304: resword = &wordlist[140]; goto compare; - case 432: + case 310: resword = &wordlist[141]; goto compare; - case 433: + case 311: resword = &wordlist[142]; goto compare; - case 434: + case 312: resword = &wordlist[143]; goto compare; - case 441: + case 315: resword = &wordlist[144]; goto compare; - case 442: + case 317: resword = &wordlist[145]; goto compare; - case 445: + case 318: resword = &wordlist[146]; goto compare; - case 450: + case 319: resword = &wordlist[147]; goto compare; - case 462: + case 321: resword = &wordlist[148]; goto compare; - case 472: + case 322: resword = &wordlist[149]; goto compare; - case 481: + case 323: resword = &wordlist[150]; goto compare; - case 483: + case 324: resword = &wordlist[151]; goto compare; - case 487: + case 325: resword = &wordlist[152]; goto compare; - case 488: + case 326: resword = &wordlist[153]; goto compare; - case 491: + case 327: resword = &wordlist[154]; goto compare; - case 492: + case 329: resword = &wordlist[155]; goto compare; - case 494: + case 331: resword = &wordlist[156]; goto compare; - case 499: + case 333: resword = &wordlist[157]; goto compare; - case 508: + case 334: resword = &wordlist[158]; goto compare; - case 511: + case 340: resword = &wordlist[159]; goto compare; - case 519: + case 341: resword = &wordlist[160]; goto compare; - case 522: + case 342: resword = &wordlist[161]; goto compare; - case 524: + case 348: resword = &wordlist[162]; goto compare; - case 527: + case 349: resword = &wordlist[163]; goto compare; - case 528: + case 351: resword = &wordlist[164]; goto compare; - case 530: + case 354: resword = &wordlist[165]; goto compare; - case 532: + case 363: resword = &wordlist[166]; goto compare; - case 538: + case 364: resword = &wordlist[167]; goto compare; - case 545: + case 365: resword = &wordlist[168]; goto compare; - case 546: + case 366: resword = &wordlist[169]; goto compare; - case 547: + case 368: resword = &wordlist[170]; goto compare; - case 551: + case 370: resword = &wordlist[171]; goto compare; - case 554: + case 371: resword = &wordlist[172]; goto compare; - case 555: + case 372: resword = &wordlist[173]; goto compare; - case 556: + case 373: resword = &wordlist[174]; goto compare; - case 557: + case 374: resword = &wordlist[175]; goto compare; - case 558: + case 377: resword = &wordlist[176]; goto compare; - case 560: + case 378: resword = &wordlist[177]; goto compare; - case 562: + case 379: resword = &wordlist[178]; goto compare; - case 563: + case 381: resword = &wordlist[179]; goto compare; - case 569: + case 382: resword = &wordlist[180]; goto compare; - case 576: + case 383: resword = &wordlist[181]; goto compare; - case 579: + case 384: resword = &wordlist[182]; goto compare; - case 581: + case 387: resword = &wordlist[183]; goto compare; - case 587: + case 391: resword = &wordlist[184]; goto compare; - case 594: + case 392: resword = &wordlist[185]; goto compare; - case 599: + case 393: resword = &wordlist[186]; goto compare; - case 608: + case 401: resword = &wordlist[187]; goto compare; - case 611: + case 402: resword = &wordlist[188]; goto compare; - case 620: + case 405: resword = &wordlist[189]; goto compare; - case 622: + case 408: resword = &wordlist[190]; goto compare; - case 626: + case 412: resword = &wordlist[191]; goto compare; - case 633: + case 418: resword = &wordlist[192]; goto compare; - case 635: + case 420: resword = &wordlist[193]; goto compare; - case 642: + case 423: resword = &wordlist[194]; goto compare; - case 643: + case 425: resword = &wordlist[195]; goto compare; - case 646: + case 426: resword = &wordlist[196]; goto compare; - case 648: + case 432: resword = &wordlist[197]; goto compare; - case 652: + case 439: resword = &wordlist[198]; goto compare; - case 660: + case 442: resword = &wordlist[199]; goto compare; - case 675: + case 443: resword = &wordlist[200]; goto compare; - case 677: + case 448: resword = &wordlist[201]; goto compare; - case 692: + case 450: resword = &wordlist[202]; goto compare; - case 695: + case 451: resword = &wordlist[203]; goto compare; - case 699: + case 454: resword = &wordlist[204]; goto compare; - case 712: + case 459: resword = &wordlist[205]; goto compare; - case 716: + case 464: resword = &wordlist[206]; goto compare; - case 717: + case 466: resword = &wordlist[207]; goto compare; - case 740: + case 470: resword = &wordlist[208]; goto compare; - case 743: + case 479: resword = &wordlist[209]; goto compare; - case 746: + case 480: resword = &wordlist[210]; goto compare; - case 748: + case 484: resword = &wordlist[211]; goto compare; - case 752: + case 485: resword = &wordlist[212]; goto compare; - case 756: + case 487: resword = &wordlist[213]; goto compare; - case 767: + case 490: resword = &wordlist[214]; goto compare; - case 769: + case 499: resword = &wordlist[215]; goto compare; - case 770: + case 503: resword = &wordlist[216]; goto compare; - case 772: + case 507: resword = &wordlist[217]; goto compare; - case 774: + case 512: resword = &wordlist[218]; goto compare; - case 782: + case 515: resword = &wordlist[219]; goto compare; - case 784: + case 520: resword = &wordlist[220]; goto compare; - case 788: + case 523: resword = &wordlist[221]; goto compare; - case 789: + case 524: resword = &wordlist[222]; goto compare; - case 790: + case 526: resword = &wordlist[223]; goto compare; - case 791: + case 537: resword = &wordlist[224]; goto compare; - case 792: + case 538: resword = &wordlist[225]; goto compare; - case 795: + case 542: resword = &wordlist[226]; goto compare; - case 802: + case 547: resword = &wordlist[227]; goto compare; - case 806: + case 552: resword = &wordlist[228]; goto compare; - case 811: + case 555: resword = &wordlist[229]; goto compare; - case 813: + case 558: resword = &wordlist[230]; goto compare; - case 831: + case 562: resword = &wordlist[231]; goto compare; - case 841: + case 563: resword = &wordlist[232]; goto compare; - case 860: + case 576: resword = &wordlist[233]; goto compare; - case 872: + case 578: resword = &wordlist[234]; goto compare; - case 893: + case 581: resword = &wordlist[235]; goto compare; - case 898: + case 583: resword = &wordlist[236]; goto compare; - case 902: + case 584: resword = &wordlist[237]; goto compare; - case 903: + case 596: resword = &wordlist[238]; goto compare; - case 914: + case 603: resword = &wordlist[239]; goto compare; - case 943: + case 606: resword = &wordlist[240]; goto compare; - case 944: + case 619: resword = &wordlist[241]; goto compare; - case 945: + case 620: resword = &wordlist[242]; goto compare; - case 946: + case 622: resword = &wordlist[243]; goto compare; - case 990: + case 632: resword = &wordlist[244]; goto compare; - case 1009: + case 641: resword = &wordlist[245]; goto compare; - case 1031: + case 668: resword = &wordlist[246]; goto compare; - case 1048: + case 670: resword = &wordlist[247]; goto compare; - case 1058: + case 673: resword = &wordlist[248]; goto compare; - case 1061: + case 703: resword = &wordlist[249]; goto compare; - case 1080: + case 707: resword = &wordlist[250]; goto compare; - case 1085: + case 734: resword = &wordlist[251]; goto compare; - case 1088: + case 737: resword = &wordlist[252]; goto compare; - case 1102: + case 738: resword = &wordlist[253]; goto compare; - case 1124: + case 753: resword = &wordlist[254]; goto compare; - case 1129: + case 764: resword = &wordlist[255]; goto compare; - case 1137: + case 773: resword = &wordlist[256]; goto compare; - case 1160: + case 785: resword = &wordlist[257]; goto compare; - case 1198: + case 798: resword = &wordlist[258]; goto compare; - case 1209: + case 805: resword = &wordlist[259]; goto compare; - case 1227: + case 806: resword = &wordlist[260]; goto compare; - case 1231: + case 816: resword = &wordlist[261]; goto compare; - case 1277: + case 825: resword = &wordlist[262]; goto compare; - case 1300: + case 829: resword = &wordlist[263]; goto compare; - case 1312: + case 858: resword = &wordlist[264]; goto compare; - case 1317: + case 871: resword = &wordlist[265]; goto compare; - case 1336: + case 875: resword = &wordlist[266]; goto compare; - case 1356: + case 893: resword = &wordlist[267]; goto compare; - case 1376: + case 903: resword = &wordlist[268]; goto compare; - case 1412: + case 939: resword = &wordlist[269]; goto compare; - case 1417: + case 966: resword = &wordlist[270]; goto compare; - case 1446: + case 975: resword = &wordlist[271]; goto compare; - case 1456: + case 981: resword = &wordlist[272]; goto compare; - case 1542: + case 996: resword = &wordlist[273]; goto compare; - case 1549: + case 997: resword = &wordlist[274]; goto compare; - case 1566: + case 999: resword = &wordlist[275]; goto compare; - case 1577: + case 1004: resword = &wordlist[276]; goto compare; - case 1588: + case 1044: resword = &wordlist[277]; goto compare; - case 1595: + case 1050: resword = &wordlist[278]; goto compare; - case 1636: + case 1052: resword = &wordlist[279]; goto compare; - case 1657: + case 1058: resword = &wordlist[280]; goto compare; - case 1678: + case 1065: resword = &wordlist[281]; goto compare; - case 1703: + case 1082: resword = &wordlist[282]; goto compare; - case 1719: + case 1086: resword = &wordlist[283]; goto compare; - case 1731: + case 1092: resword = &wordlist[284]; goto compare; - case 1736: + case 1113: resword = &wordlist[285]; goto compare; - case 1755: + case 1133: resword = &wordlist[286]; goto compare; - case 1775: + case 1162: resword = &wordlist[287]; goto compare; - case 1808: + case 1206: resword = &wordlist[288]; goto compare; - case 1830: + case 1366: resword = &wordlist[289]; goto compare; - case 1878: + case 1378: resword = &wordlist[290]; goto compare; - case 1893: + case 1427: resword = &wordlist[291]; goto compare; - case 1987: + case 1435: resword = &wordlist[292]; goto compare; - case 1990: + case 1461: resword = &wordlist[293]; goto compare; - case 2070: + case 1746: resword = &wordlist[294]; goto compare; - case 2157: + case 1810: resword = &wordlist[295]; goto compare; - case 2218: + case 1883: resword = &wordlist[296]; goto compare; - case 2275: + case 1945: resword = &wordlist[297]; goto compare; - case 2423: + case 2056: resword = &wordlist[298]; goto compare; - case 2651: + case 2274: resword = &wordlist[299]; goto compare; }