diff options
author | Bruno Haible <bruno@clisp.org> | 2003-04-28 10:08:35 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2003-04-28 10:08:35 +0000 |
commit | 16e10a330c0bab99e776d6b86f2fc144cca7dc80 (patch) | |
tree | 4030e980cd322f07c166f83ad7bef1013a3c93e4 | |
parent | d267e31dea04e714637bdc3779436ad0e3ace980 (diff) | |
download | gperf-16e10a330c0bab99e776d6b86f2fc144cca7dc80.tar.gz |
Provoke a compilation error if the execution character set doesn't match the
expectations.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | src/input.cc | 14 | ||||
-rw-r--r-- | src/input.h | 5 | ||||
-rw-r--r-- | src/main.cc | 3 | ||||
-rw-r--r-- | src/output.cc | 37 | ||||
-rw-r--r-- | src/output.h | 4 | ||||
-rw-r--r-- | tests/c-parse.exp | 28 | ||||
-rw-r--r-- | tests/charsets.exp | 28 | ||||
-rw-r--r-- | tests/chill.exp | 28 | ||||
-rw-r--r-- | tests/cplusplus.exp | 28 | ||||
-rw-r--r-- | tests/gpc.exp | 28 | ||||
-rw-r--r-- | tests/java.exp | 28 | ||||
-rw-r--r-- | tests/languages.exp | 28 | ||||
-rw-r--r-- | tests/modula2.exp | 28 | ||||
-rw-r--r-- | tests/objc.exp | 28 | ||||
-rw-r--r-- | tests/permut2.exp | 28 | ||||
-rw-r--r-- | tests/permut3.exp | 28 | ||||
-rw-r--r-- | tests/permutc2.exp | 28 | ||||
-rw-r--r-- | tests/test-4.exp | 28 |
19 files changed, 438 insertions, 3 deletions
@@ -1,5 +1,19 @@ 2003-01-07 Bruno Haible <bruno@clisp.org> + * src/input.h (Input::_charset_dependent): New field. + * src/input.cc (Input::read_input): Also set _charset_dependent. + * src/main.cc (main): Pass _charset_dependent from Input to Output. + * src/output.h (Output::Output): Add charset_dependent argument. + (Output::_charset_dependent): New field. + * src/output.cc (Output::Output): Add charset_dependent argument. + (Output::output): Provoke a compilation error if the execution + character set doesn't match the expectations. + * tests/c-parse.exp, tests/charsets.exp, tests/chill.exp, + tests/cplusplus.exp, tests/gpc.exp, tests/java.exp, + tests/languages.exp, tests/modula2.exp, tests/objc.exp, + tests/permut2.exp, tests/permut3.exp, tests/permutc2.exp, + tests/test-4.exp: Update. + * src/options.cc (Options::long_usage): Change bug report address to <bug-gnu-gperf@gnu.org>. * tests/test-6.exp: Update. diff --git a/src/input.cc b/src/input.cc index 4a968ae..903545d 100644 --- a/src/input.cc +++ b/src/input.cc @@ -698,6 +698,7 @@ Input::read_input () Keyword_List **list_tail = &_head; const char *delimiters = option.get_delimiters (); unsigned int lineno = keywords_lineno; + bool charset_dependent = false; for (const char *line = keywords; line < keywords_end; ) { const char *line_end; @@ -797,34 +798,42 @@ Input::read_input () case '\\': case '\'': case '"': *kp = c; lp++; + charset_dependent = true; break; case 'n': *kp = '\n'; lp++; + charset_dependent = true; break; case 't': *kp = '\t'; lp++; + charset_dependent = true; break; case 'r': *kp = '\r'; lp++; + charset_dependent = true; break; case 'f': *kp = '\f'; lp++; + charset_dependent = true; break; case 'b': *kp = '\b'; lp++; + charset_dependent = true; break; case 'a': *kp = '\a'; lp++; + charset_dependent = true; break; case 'v': *kp = '\v'; lp++; + charset_dependent = true; break; default: fprintf (stderr, "%s:%u: invalid escape sequence" @@ -839,6 +848,7 @@ Input::read_input () { *kp = c; lp++; + charset_dependent = true; } kp++; } @@ -901,6 +911,8 @@ Input::read_input () } lp++; } + if (keyword_length > 0) + charset_dependent = true; } /* Allocate Keyword and add it to the list. */ @@ -922,6 +934,8 @@ Input::read_input () pretty_input_file_name ()); exit (1); } + + _charset_dependent = charset_dependent; } /* To be freed in the destructor. */ diff --git a/src/input.h b/src/input.h index 01678a2..5d51ab6 100644 --- a/src/input.h +++ b/src/input.h @@ -2,7 +2,7 @@ /* Input routines. - Copyright (C) 1989-1998, 2002 Free Software Foundation, Inc. + Copyright (C) 1989-1998, 2002-2003 Free Software Foundation, Inc. Written by Douglas C. Schmidt <schmidt@ics.uci.edu> and Bruno Haible <bruno@clisp.org>. @@ -61,6 +61,9 @@ public: const char * _struct_tag; /* List of all keywords. */ Keyword_List * _head; + /* Whether the keyword chars would have different values in a different + character set. */ + bool _charset_dependent; }; #endif diff --git a/src/main.cc b/src/main.cc index 4248766..7245b40 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* Driver program for the hash function generator - Copyright (C) 1989-1998, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1989-1998, 2000, 2002-2003 Free Software Foundation, Inc. Written by Douglas C. Schmidt <schmidt@ics.uci.edu> and Bruno Haible <bruno@clisp.org>. @@ -102,6 +102,7 @@ main (int argc, char *argv[]) inputter._verbatim_code, inputter._verbatim_code_end, inputter._verbatim_code_lineno, + inputter._charset_dependent, searcher._total_keys, searcher._max_key_len, searcher._min_key_len, diff --git a/src/output.cc b/src/output.cc index 3a23647..a7433d1 100644 --- a/src/output.cc +++ b/src/output.cc @@ -82,7 +82,7 @@ Output::Output (KeywordExt_List *head, const char *struct_decl, const char *verbatim_declarations_end, unsigned int verbatim_declarations_lineno, const char *verbatim_code, const char *verbatim_code_end, - unsigned int verbatim_code_lineno, + unsigned int verbatim_code_lineno, bool charset_dependent, int total_keys, int max_key_len, int min_key_len, const Positions& positions, const unsigned int *alpha_inc, int total_duplicates, unsigned int alpha_size, @@ -96,6 +96,7 @@ Output::Output (KeywordExt_List *head, const char *struct_decl, _verbatim_code (verbatim_code), _verbatim_code_end (verbatim_code_end), _verbatim_code_lineno (verbatim_code_lineno), + _charset_dependent (charset_dependent), _total_keys (total_keys), _max_key_len (max_key_len), _min_key_len (min_key_len), _key_positions (positions), _alpha_inc (alpha_inc), @@ -1949,6 +1950,40 @@ Output::output () _key_positions.print(); printf ("' */\n"); } + printf ("\n"); + + if (_charset_dependent + && (_key_positions.get_size() > 0 || option[UPPERLOWER])) + { + /* The generated tables assume that the execution character set is + based on ISO-646, not EBCDIC. */ + printf ("#if !((' ' == 32) && ('!' == 33) && ('\"' == 34) && ('#' == 35) \\\n" + " && ('%%' == 37) && ('&' == 38) && ('\\'' == 39) && ('(' == 40) \\\n" + " && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \\\n" + " && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \\\n" + " && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \\\n" + " && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \\\n" + " && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \\\n" + " && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \\\n" + " && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \\\n" + " && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \\\n" + " && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \\\n" + " && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \\\n" + " && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \\\n" + " && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \\\n" + " && ('Z' == 90) && ('[' == 91) && ('\\\\' == 92) && (']' == 93) \\\n" + " && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \\\n" + " && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \\\n" + " && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \\\n" + " && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \\\n" + " && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \\\n" + " && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \\\n" + " && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \\\n" + " && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))\n" + "/* The character set is not based on ISO-646. */\n"); + printf ("%s \"gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>.\"\n", option[KRC] || option[C] ? "error" : "#error"); + printf ("#endif\n\n"); + } if (_verbatim_declarations < _verbatim_declarations_end) { diff --git a/src/output.h b/src/output.h index 3650f9e..9dd5ba2 100644 --- a/src/output.h +++ b/src/output.h @@ -48,6 +48,7 @@ public: const char *verbatim_code, const char *verbatim_code_end, unsigned int verbatim_code_lineno, + bool charset_dependent, int total_keys, int max_key_len, int min_key_len, const Positions& positions, @@ -125,6 +126,9 @@ private: const char * const _verbatim_code; const char * const _verbatim_code_end; unsigned int const _verbatim_code_lineno; + /* Whether the keyword chars would have different values in a different + character set. */ + bool _charset_dependent; /* Total number of keys, counting duplicates. */ int const _total_keys; /* Maximum length of the longest keyword. */ diff --git a/tests/c-parse.exp b/tests/c-parse.exp index f934e70..24bced9 100644 --- a/tests/c-parse.exp +++ b/tests/c-parse.exp @@ -1,6 +1,34 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -i 1 -g -o -t -G -N is_reserved_word -k'1,3,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* Command-line: gperf -L KR-C -F ', 0, 0' -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; }; diff --git a/tests/charsets.exp b/tests/charsets.exp index 92f5a33..299674b 100644 --- a/tests/charsets.exp +++ b/tests/charsets.exp @@ -2,6 +2,34 @@ /* Command-line: ../src/gperf -C -E -G -I -t */ /* Computed positions: -k'1-11,22,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* Generated from IANA charset data from http://www.iana.org/assignments/character-sets by charsets.awk */ /* last updated 2002-06-14 */ /* process with: diff --git a/tests/chill.exp b/tests/chill.exp index 36e71a2..af836ee 100644 --- a/tests/chill.exp +++ b/tests/chill.exp @@ -1,5 +1,33 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -L C -F ', 0, 0, 0' -D -E -S1 -j1 -i 1 -g -o -t -k'*' */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + struct resword { const char *name; short token; diff --git a/tests/cplusplus.exp b/tests/cplusplus.exp index ac4eb33..3c5e10b 100644 --- a/tests/cplusplus.exp +++ b/tests/cplusplus.exp @@ -1,6 +1,34 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -L C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k'1,4,7,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* Command-line: gperf -L KR-C -F ', 0, 0' -j1 -g -o -t -N is_reserved_word -k1,4,$,7 gplus.gperf */ struct resword { const char *name; short token; enum rid rid;}; diff --git a/tests/gpc.exp b/tests/gpc.exp index f492e32..351886d 100644 --- a/tests/gpc.exp +++ b/tests/gpc.exp @@ -2,6 +2,34 @@ /* Command-line: ../src/gperf -g -o -j1 -t -N is_reserved_word */ /* Computed positions: -k'1,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* ISO Pascal 7185 reserved words. * * For GNU Pascal compiler (GPC) by jtv@hut.fi diff --git a/tests/java.exp b/tests/java.exp index d0a4ae4..76d3b3c 100644 --- a/tests/java.exp +++ b/tests/java.exp @@ -1,6 +1,34 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* 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) diff --git a/tests/languages.exp b/tests/languages.exp index f30a856..bc6b3c3 100644 --- a/tests/languages.exp +++ b/tests/languages.exp @@ -2,6 +2,34 @@ /* Command-line: ../src/gperf -C -E -G -I -t */ /* Computed positions: -k'1-3,5,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* gperf -CDEGTlot -H language_hash -K code -L ANSI-C -N language_entry */ /* Generated from ISO 639 language data from http://lcweb.loc.gov/standards/iso639-2/langhome.html and from IANA registry at http://www.iana.org/assignments/language-tags diff --git a/tests/modula2.exp b/tests/modula2.exp index a38ba5e..75ee4d9 100644 --- a/tests/modula2.exp +++ b/tests/modula2.exp @@ -1,6 +1,34 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -n -k1-8 -l */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + #define TOTAL_KEYWORDS 40 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 14 diff --git a/tests/objc.exp b/tests/objc.exp index 664fafd..4d7aab3 100644 --- a/tests/objc.exp +++ b/tests/objc.exp @@ -1,6 +1,34 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -j1 -i 1 -g -o -t -N is_reserved_word -k'1,3,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* Command-line: gperf -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ objc.gperf */ struct resword { char *name; short token; enum rid rid; }; diff --git a/tests/permut2.exp b/tests/permut2.exp index 1ab17d3..86ee38f 100644 --- a/tests/permut2.exp +++ b/tests/permut2.exp @@ -2,6 +2,34 @@ /* Command-line: ../src/gperf -m5 */ /* Computed positions: -k'1-2' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + #define TOTAL_KEYWORDS 4 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 2 diff --git a/tests/permut3.exp b/tests/permut3.exp index 3924fea..a202c19 100644 --- a/tests/permut3.exp +++ b/tests/permut3.exp @@ -2,6 +2,34 @@ /* Command-line: ../src/gperf -m5 */ /* Computed positions: -k'1-2' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + #define TOTAL_KEYWORDS 4 #define MIN_WORD_LENGTH 3 #define MAX_WORD_LENGTH 3 diff --git a/tests/permutc2.exp b/tests/permutc2.exp index 749d87e..39e307e 100644 --- a/tests/permutc2.exp +++ b/tests/permutc2.exp @@ -2,6 +2,34 @@ /* Command-line: ../src/gperf -m5 --ignore-case */ /* Computed positions: -k'1-2' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* Test of a hash function which has to deal with permutation and case-independence. Without case-independence, the alpha_inc is 1. With case-independence, the alpha_inc is 3. */ diff --git a/tests/test-4.exp b/tests/test-4.exp index 73b9848..80dbd7f 100644 --- a/tests/test-4.exp +++ b/tests/test-4.exp @@ -1,6 +1,34 @@ /* C code produced by gperf version 2.7.2 */ /* Command-line: ../src/gperf -D -t -k'1,$' */ +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." +#endif + + /* Command-line: gperf -L KR-C -F ', 0, 0' -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; }; |