ferret 0.11.6 → 0.11.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/README +10 -22
  2. data/RELEASE_CHANGES +137 -0
  3. data/RELEASE_NOTES +60 -0
  4. data/Rakefile +379 -274
  5. data/TODO +100 -8
  6. data/bin/ferret-browser +0 -0
  7. data/ext/BZLIB_blocksort.c +1094 -0
  8. data/ext/BZLIB_bzlib.c +1578 -0
  9. data/ext/BZLIB_compress.c +672 -0
  10. data/ext/BZLIB_crctable.c +104 -0
  11. data/ext/BZLIB_decompress.c +626 -0
  12. data/ext/BZLIB_huffman.c +205 -0
  13. data/ext/BZLIB_randtable.c +84 -0
  14. data/ext/{api.c → STEMMER_api.c} +7 -10
  15. data/ext/{libstemmer.c → STEMMER_libstemmer.c} +3 -2
  16. data/ext/{stem_ISO_8859_1_danish.c → STEMMER_stem_ISO_8859_1_danish.c} +123 -124
  17. data/ext/{stem_ISO_8859_1_dutch.c → STEMMER_stem_ISO_8859_1_dutch.c} +177 -188
  18. data/ext/STEMMER_stem_ISO_8859_1_english.c +1117 -0
  19. data/ext/{stem_ISO_8859_1_finnish.c → STEMMER_stem_ISO_8859_1_finnish.c} +276 -306
  20. data/ext/STEMMER_stem_ISO_8859_1_french.c +1246 -0
  21. data/ext/{stem_ISO_8859_1_german.c → STEMMER_stem_ISO_8859_1_german.c} +161 -170
  22. data/ext/STEMMER_stem_ISO_8859_1_hungarian.c +1230 -0
  23. data/ext/STEMMER_stem_ISO_8859_1_italian.c +1065 -0
  24. data/ext/STEMMER_stem_ISO_8859_1_norwegian.c +297 -0
  25. data/ext/{stem_ISO_8859_1_porter.c → STEMMER_stem_ISO_8859_1_porter.c} +263 -290
  26. data/ext/{stem_ISO_8859_1_portuguese.c → STEMMER_stem_ISO_8859_1_portuguese.c} +362 -380
  27. data/ext/STEMMER_stem_ISO_8859_1_spanish.c +1093 -0
  28. data/ext/STEMMER_stem_ISO_8859_1_swedish.c +307 -0
  29. data/ext/STEMMER_stem_ISO_8859_2_romanian.c +998 -0
  30. data/ext/{stem_KOI8_R_russian.c → STEMMER_stem_KOI8_R_russian.c} +244 -245
  31. data/ext/STEMMER_stem_UTF_8_danish.c +339 -0
  32. data/ext/{stem_UTF_8_dutch.c → STEMMER_stem_UTF_8_dutch.c} +192 -211
  33. data/ext/STEMMER_stem_UTF_8_english.c +1125 -0
  34. data/ext/{stem_UTF_8_finnish.c → STEMMER_stem_UTF_8_finnish.c} +284 -324
  35. data/ext/STEMMER_stem_UTF_8_french.c +1256 -0
  36. data/ext/{stem_UTF_8_german.c → STEMMER_stem_UTF_8_german.c} +170 -187
  37. data/ext/STEMMER_stem_UTF_8_hungarian.c +1234 -0
  38. data/ext/STEMMER_stem_UTF_8_italian.c +1073 -0
  39. data/ext/STEMMER_stem_UTF_8_norwegian.c +299 -0
  40. data/ext/{stem_UTF_8_porter.c → STEMMER_stem_UTF_8_porter.c} +271 -310
  41. data/ext/STEMMER_stem_UTF_8_portuguese.c +1023 -0
  42. data/ext/STEMMER_stem_UTF_8_romanian.c +1004 -0
  43. data/ext/STEMMER_stem_UTF_8_russian.c +694 -0
  44. data/ext/STEMMER_stem_UTF_8_spanish.c +1097 -0
  45. data/ext/STEMMER_stem_UTF_8_swedish.c +309 -0
  46. data/ext/STEMMER_stem_UTF_8_turkish.c +2205 -0
  47. data/ext/{utilities.c → STEMMER_utilities.c} +100 -68
  48. data/ext/analysis.c +276 -121
  49. data/ext/analysis.h +190 -143
  50. data/ext/api.h +3 -4
  51. data/ext/array.c +5 -3
  52. data/ext/array.h +52 -43
  53. data/ext/bitvector.c +38 -482
  54. data/ext/bitvector.h +446 -124
  55. data/ext/bzlib.h +282 -0
  56. data/ext/bzlib_private.h +503 -0
  57. data/ext/compound_io.c +23 -22
  58. data/ext/config.h +21 -11
  59. data/ext/document.c +43 -40
  60. data/ext/document.h +31 -21
  61. data/ext/except.c +20 -38
  62. data/ext/except.h +89 -76
  63. data/ext/extconf.rb +3 -2
  64. data/ext/ferret.c +49 -35
  65. data/ext/ferret.h +14 -11
  66. data/ext/field_index.c +262 -0
  67. data/ext/field_index.h +52 -0
  68. data/ext/filter.c +11 -10
  69. data/ext/fs_store.c +65 -47
  70. data/ext/global.c +245 -165
  71. data/ext/global.h +252 -54
  72. data/ext/hash.c +200 -243
  73. data/ext/hash.h +205 -163
  74. data/ext/hashset.c +118 -96
  75. data/ext/hashset.h +110 -82
  76. data/ext/header.h +19 -19
  77. data/ext/helper.c +11 -10
  78. data/ext/helper.h +14 -6
  79. data/ext/index.c +745 -366
  80. data/ext/index.h +503 -529
  81. data/ext/internal.h +1020 -0
  82. data/ext/lang.c +10 -0
  83. data/ext/lang.h +35 -15
  84. data/ext/mempool.c +5 -4
  85. data/ext/mempool.h +30 -22
  86. data/ext/modules.h +35 -7
  87. data/ext/multimapper.c +43 -2
  88. data/ext/multimapper.h +32 -23
  89. data/ext/posh.c +0 -0
  90. data/ext/posh.h +4 -38
  91. data/ext/priorityqueue.c +10 -12
  92. data/ext/priorityqueue.h +33 -21
  93. data/ext/q_boolean.c +22 -9
  94. data/ext/q_const_score.c +3 -2
  95. data/ext/q_filtered_query.c +15 -12
  96. data/ext/q_fuzzy.c +147 -135
  97. data/ext/q_match_all.c +3 -2
  98. data/ext/q_multi_term.c +28 -32
  99. data/ext/q_parser.c +451 -173
  100. data/ext/q_phrase.c +158 -79
  101. data/ext/q_prefix.c +16 -18
  102. data/ext/q_range.c +363 -31
  103. data/ext/q_span.c +130 -141
  104. data/ext/q_term.c +21 -21
  105. data/ext/q_wildcard.c +19 -23
  106. data/ext/r_analysis.c +369 -242
  107. data/ext/r_index.c +421 -434
  108. data/ext/r_qparser.c +142 -92
  109. data/ext/r_search.c +790 -407
  110. data/ext/r_store.c +44 -44
  111. data/ext/r_utils.c +264 -96
  112. data/ext/ram_store.c +29 -23
  113. data/ext/scanner.c +895 -0
  114. data/ext/scanner.h +36 -0
  115. data/ext/scanner_mb.c +6701 -0
  116. data/ext/scanner_utf8.c +4415 -0
  117. data/ext/search.c +210 -87
  118. data/ext/search.h +556 -488
  119. data/ext/similarity.c +17 -16
  120. data/ext/similarity.h +51 -44
  121. data/ext/sort.c +157 -354
  122. data/ext/stem_ISO_8859_1_hungarian.h +16 -0
  123. data/ext/stem_ISO_8859_2_romanian.h +16 -0
  124. data/ext/stem_UTF_8_hungarian.h +16 -0
  125. data/ext/stem_UTF_8_romanian.h +16 -0
  126. data/ext/stem_UTF_8_turkish.h +16 -0
  127. data/ext/stopwords.c +287 -278
  128. data/ext/store.c +57 -51
  129. data/ext/store.h +308 -286
  130. data/ext/symbol.c +10 -0
  131. data/ext/symbol.h +23 -0
  132. data/ext/term_vectors.c +14 -293
  133. data/ext/threading.h +22 -22
  134. data/ext/win32.h +12 -4
  135. data/lib/ferret.rb +2 -1
  136. data/lib/ferret/browser.rb +1 -1
  137. data/lib/ferret/field_symbol.rb +94 -0
  138. data/lib/ferret/index.rb +221 -34
  139. data/lib/ferret/number_tools.rb +6 -6
  140. data/lib/ferret/version.rb +3 -0
  141. data/test/{unit → long_running}/largefile/tc_largefile.rb +1 -1
  142. data/test/test_helper.rb +7 -2
  143. data/test/test_installed.rb +1 -0
  144. data/test/threading/thread_safety_index_test.rb +10 -1
  145. data/test/threading/thread_safety_read_write_test.rb +4 -7
  146. data/test/threading/thread_safety_test.rb +0 -0
  147. data/test/unit/analysis/tc_analyzer.rb +29 -27
  148. data/test/unit/analysis/tc_token_stream.rb +23 -16
  149. data/test/unit/index/tc_index.rb +116 -11
  150. data/test/unit/index/tc_index_reader.rb +27 -27
  151. data/test/unit/index/tc_index_writer.rb +10 -0
  152. data/test/unit/index/th_doc.rb +38 -21
  153. data/test/unit/search/tc_filter.rb +31 -10
  154. data/test/unit/search/tc_index_searcher.rb +6 -0
  155. data/test/unit/search/tm_searcher.rb +53 -1
  156. data/test/unit/store/tc_fs_store.rb +40 -2
  157. data/test/unit/store/tc_ram_store.rb +0 -0
  158. data/test/unit/store/tm_store.rb +0 -0
  159. data/test/unit/store/tm_store_lock.rb +7 -6
  160. data/test/unit/tc_field_symbol.rb +26 -0
  161. data/test/unit/ts_analysis.rb +0 -0
  162. data/test/unit/ts_index.rb +0 -0
  163. data/test/unit/ts_store.rb +0 -0
  164. data/test/unit/ts_utils.rb +0 -0
  165. data/test/unit/utils/tc_number_tools.rb +0 -0
  166. data/test/utils/content_generator.rb +226 -0
  167. metadata +262 -221
  168. data/ext/inc/lang.h +0 -48
  169. data/ext/inc/threading.h +0 -31
  170. data/ext/stem_ISO_8859_1_english.c +0 -1156
  171. data/ext/stem_ISO_8859_1_french.c +0 -1276
  172. data/ext/stem_ISO_8859_1_italian.c +0 -1091
  173. data/ext/stem_ISO_8859_1_norwegian.c +0 -296
  174. data/ext/stem_ISO_8859_1_spanish.c +0 -1119
  175. data/ext/stem_ISO_8859_1_swedish.c +0 -307
  176. data/ext/stem_UTF_8_danish.c +0 -344
  177. data/ext/stem_UTF_8_english.c +0 -1176
  178. data/ext/stem_UTF_8_french.c +0 -1296
  179. data/ext/stem_UTF_8_italian.c +0 -1113
  180. data/ext/stem_UTF_8_norwegian.c +0 -302
  181. data/ext/stem_UTF_8_portuguese.c +0 -1055
  182. data/ext/stem_UTF_8_russian.c +0 -709
  183. data/ext/stem_UTF_8_spanish.c +0 -1137
  184. data/ext/stem_UTF_8_swedish.c +0 -313
  185. data/lib/ferret_version.rb +0 -3
@@ -1,48 +0,0 @@
1
- #ifndef FRT_LANG_H
2
- #define FRT_LANG_H
3
-
4
- #define RUBY_BINDINGS 1
5
-
6
- #include <stdarg.h>
7
- #include <ruby.h>
8
-
9
- #undef close
10
- #undef rename
11
- #undef read
12
-
13
- #define frt_malloc xmalloc
14
- #define frt_calloc(n) xcalloc(n, 1)
15
- #define frt_realloc xrealloc
16
-
17
-
18
- #ifdef FRT_HAS_ISO_VARARGS
19
- /* C99-compliant compiler */
20
-
21
- # define FRT_EXIT(...) frt_rb_raise(__FILE__, __LINE__, __func__, __VA_ARGS__)
22
- extern void frt_rb_raise(const char *file, int line_num, const char *func,
23
- const char *err_type, const char *fmt, ...);
24
-
25
- # define V_FRT_EXIT(err_type, fmt, args) \
26
- vfrt_rb_raise(__FILE__, __LINE__, __func__, err_type, fmt, args)
27
- extern void vfrt_rb_raise(const char *file, int line_num, const char *func,
28
- const char *err_type, const char *fmt, va_list args);
29
-
30
- #elif defined(FRT_HAS_GNUC_VARARGS)
31
- /* gcc has an extension */
32
-
33
- # define FRT_EXIT(args...) frt_rb_raise(__FILE__, __LINE__, __func__, ##args)
34
- extern void frt_rb_raise(const char *file, int line_num, const char *func,
35
- const char *err_type, const char *fmt, ...);
36
-
37
- # define V_FRT_EXIT(err_type, fmt, args) \
38
- vfrt_rb_raise(__FILE__, __LINE__, __func__, err_type, fmt, args)
39
- extern void vfrt_rb_raise(const char *file, int line_num, const char *func,
40
- const char *err_type, const char *fmt, va_list args);
41
- #else
42
- /* Can't do VARARGS */
43
-
44
- extern void FRT_EXIT(const char *err_type, const char *fmt, ...);
45
- extern void V_FRT_EXIT(const char *err_type, const char *fmt, va_list args);
46
- #endif
47
-
48
- #endif
@@ -1,31 +0,0 @@
1
- #ifndef FRT_THREADING_H
2
- #define FRT_THREADING_H
3
-
4
- #include "hash.h"
5
- #define UNTHREADED 1
6
-
7
- typedef void * mutex_t;
8
- typedef struct HashTable *thread_key_t;
9
- typedef int thread_once_t;
10
- #define MUTEX_INITIALIZER NULL
11
- #define MUTEX_RECURSIVE_INITIALIZER NULL
12
- #define THREAD_ONCE_INIT 1;
13
- #define mutex_init(a, b)
14
- #define mutex_lock(a)
15
- #define mutex_trylock(a)
16
- #define mutex_unlock(a)
17
- #define mutex_destroy(a)
18
- #define thread_key_create(a, b) frt_thread_key_create(a, b)
19
- #define thread_key_delete(a) frt_thread_key_delete(a)
20
- #define thread_setspecific(a, b) frt_thread_setspecific(a, b)
21
- #define thread_getspecific(a) frt_thread_getspecific(a)
22
- #define thread_exit(a)
23
- #define thread_once(a, b) frt_thread_once(a, b)
24
-
25
- void frt_thread_once(int *once_control, void (*init_routine)(void));
26
- void frt_thread_key_create(thread_key_t *key, void (*destr_function)(void *));
27
- void frt_thread_key_delete(thread_key_t key);
28
- void frt_thread_setspecific(thread_key_t key, const void *pointer);
29
- void *frt_thread_getspecific(thread_key_t key);
30
-
31
- #endif
@@ -1,1156 +0,0 @@
1
-
2
- /* This file was generated automatically by the Snowball to ANSI C compiler */
3
-
4
- #include "header.h"
5
-
6
- extern int english_ISO_8859_1_stem(struct SN_env * z);
7
- static int r_exception2(struct SN_env * z);
8
- static int r_exception1(struct SN_env * z);
9
- static int r_Step_5(struct SN_env * z);
10
- static int r_Step_4(struct SN_env * z);
11
- static int r_Step_3(struct SN_env * z);
12
- static int r_Step_2(struct SN_env * z);
13
- static int r_Step_1c(struct SN_env * z);
14
- static int r_Step_1b(struct SN_env * z);
15
- static int r_Step_1a(struct SN_env * z);
16
- static int r_R2(struct SN_env * z);
17
- static int r_R1(struct SN_env * z);
18
- static int r_shortv(struct SN_env * z);
19
- static int r_mark_regions(struct SN_env * z);
20
- static int r_postlude(struct SN_env * z);
21
- static int r_prelude(struct SN_env * z);
22
-
23
- extern struct SN_env * english_ISO_8859_1_create_env(void);
24
- extern void english_ISO_8859_1_close_env(struct SN_env * z);
25
-
26
- static symbol s_0_0[6] = { 'c', 'o', 'm', 'm', 'u', 'n' };
27
- static symbol s_0_1[5] = { 'g', 'e', 'n', 'e', 'r' };
28
-
29
- static struct among a_0[2] =
30
- {
31
- /* 0 */ { 6, s_0_0, -1, -1, 0},
32
- /* 1 */ { 5, s_0_1, -1, -1, 0}
33
- };
34
-
35
- static symbol s_1_0[1] = { '\'' };
36
- static symbol s_1_1[3] = { '\'', 's', '\'' };
37
- static symbol s_1_2[2] = { '\'', 's' };
38
-
39
- static struct among a_1[3] =
40
- {
41
- /* 0 */ { 1, s_1_0, -1, 1, 0},
42
- /* 1 */ { 3, s_1_1, 0, 1, 0},
43
- /* 2 */ { 2, s_1_2, -1, 1, 0}
44
- };
45
-
46
- static symbol s_2_0[3] = { 'i', 'e', 'd' };
47
- static symbol s_2_1[1] = { 's' };
48
- static symbol s_2_2[3] = { 'i', 'e', 's' };
49
- static symbol s_2_3[4] = { 's', 's', 'e', 's' };
50
- static symbol s_2_4[2] = { 's', 's' };
51
- static symbol s_2_5[2] = { 'u', 's' };
52
-
53
- static struct among a_2[6] =
54
- {
55
- /* 0 */ { 3, s_2_0, -1, 2, 0},
56
- /* 1 */ { 1, s_2_1, -1, 3, 0},
57
- /* 2 */ { 3, s_2_2, 1, 2, 0},
58
- /* 3 */ { 4, s_2_3, 1, 1, 0},
59
- /* 4 */ { 2, s_2_4, 1, -1, 0},
60
- /* 5 */ { 2, s_2_5, 1, -1, 0}
61
- };
62
-
63
- static symbol s_3_1[2] = { 'b', 'b' };
64
- static symbol s_3_2[2] = { 'd', 'd' };
65
- static symbol s_3_3[2] = { 'f', 'f' };
66
- static symbol s_3_4[2] = { 'g', 'g' };
67
- static symbol s_3_5[2] = { 'b', 'l' };
68
- static symbol s_3_6[2] = { 'm', 'm' };
69
- static symbol s_3_7[2] = { 'n', 'n' };
70
- static symbol s_3_8[2] = { 'p', 'p' };
71
- static symbol s_3_9[2] = { 'r', 'r' };
72
- static symbol s_3_10[2] = { 'a', 't' };
73
- static symbol s_3_11[2] = { 't', 't' };
74
- static symbol s_3_12[2] = { 'i', 'z' };
75
-
76
- static struct among a_3[13] =
77
- {
78
- /* 0 */ { 0, 0, -1, 3, 0},
79
- /* 1 */ { 2, s_3_1, 0, 2, 0},
80
- /* 2 */ { 2, s_3_2, 0, 2, 0},
81
- /* 3 */ { 2, s_3_3, 0, 2, 0},
82
- /* 4 */ { 2, s_3_4, 0, 2, 0},
83
- /* 5 */ { 2, s_3_5, 0, 1, 0},
84
- /* 6 */ { 2, s_3_6, 0, 2, 0},
85
- /* 7 */ { 2, s_3_7, 0, 2, 0},
86
- /* 8 */ { 2, s_3_8, 0, 2, 0},
87
- /* 9 */ { 2, s_3_9, 0, 2, 0},
88
- /* 10 */ { 2, s_3_10, 0, 1, 0},
89
- /* 11 */ { 2, s_3_11, 0, 2, 0},
90
- /* 12 */ { 2, s_3_12, 0, 1, 0}
91
- };
92
-
93
- static symbol s_4_0[2] = { 'e', 'd' };
94
- static symbol s_4_1[3] = { 'e', 'e', 'd' };
95
- static symbol s_4_2[3] = { 'i', 'n', 'g' };
96
- static symbol s_4_3[4] = { 'e', 'd', 'l', 'y' };
97
- static symbol s_4_4[5] = { 'e', 'e', 'd', 'l', 'y' };
98
- static symbol s_4_5[5] = { 'i', 'n', 'g', 'l', 'y' };
99
-
100
- static struct among a_4[6] =
101
- {
102
- /* 0 */ { 2, s_4_0, -1, 2, 0},
103
- /* 1 */ { 3, s_4_1, 0, 1, 0},
104
- /* 2 */ { 3, s_4_2, -1, 2, 0},
105
- /* 3 */ { 4, s_4_3, -1, 2, 0},
106
- /* 4 */ { 5, s_4_4, 3, 1, 0},
107
- /* 5 */ { 5, s_4_5, -1, 2, 0}
108
- };
109
-
110
- static symbol s_5_0[4] = { 'a', 'n', 'c', 'i' };
111
- static symbol s_5_1[4] = { 'e', 'n', 'c', 'i' };
112
- static symbol s_5_2[3] = { 'o', 'g', 'i' };
113
- static symbol s_5_3[2] = { 'l', 'i' };
114
- static symbol s_5_4[3] = { 'b', 'l', 'i' };
115
- static symbol s_5_5[4] = { 'a', 'b', 'l', 'i' };
116
- static symbol s_5_6[4] = { 'a', 'l', 'l', 'i' };
117
- static symbol s_5_7[5] = { 'f', 'u', 'l', 'l', 'i' };
118
- static symbol s_5_8[6] = { 'l', 'e', 's', 's', 'l', 'i' };
119
- static symbol s_5_9[5] = { 'o', 'u', 's', 'l', 'i' };
120
- static symbol s_5_10[5] = { 'e', 'n', 't', 'l', 'i' };
121
- static symbol s_5_11[5] = { 'a', 'l', 'i', 't', 'i' };
122
- static symbol s_5_12[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
123
- static symbol s_5_13[5] = { 'i', 'v', 'i', 't', 'i' };
124
- static symbol s_5_14[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
125
- static symbol s_5_15[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
126
- static symbol s_5_16[5] = { 'a', 'l', 'i', 's', 'm' };
127
- static symbol s_5_17[5] = { 'a', 't', 'i', 'o', 'n' };
128
- static symbol s_5_18[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
129
- static symbol s_5_19[4] = { 'i', 'z', 'e', 'r' };
130
- static symbol s_5_20[4] = { 'a', 't', 'o', 'r' };
131
- static symbol s_5_21[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
132
- static symbol s_5_22[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
133
- static symbol s_5_23[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
134
-
135
- static struct among a_5[24] =
136
- {
137
- /* 0 */ { 4, s_5_0, -1, 3, 0},
138
- /* 1 */ { 4, s_5_1, -1, 2, 0},
139
- /* 2 */ { 3, s_5_2, -1, 13, 0},
140
- /* 3 */ { 2, s_5_3, -1, 16, 0},
141
- /* 4 */ { 3, s_5_4, 3, 12, 0},
142
- /* 5 */ { 4, s_5_5, 4, 4, 0},
143
- /* 6 */ { 4, s_5_6, 3, 8, 0},
144
- /* 7 */ { 5, s_5_7, 3, 14, 0},
145
- /* 8 */ { 6, s_5_8, 3, 15, 0},
146
- /* 9 */ { 5, s_5_9, 3, 10, 0},
147
- /* 10 */ { 5, s_5_10, 3, 5, 0},
148
- /* 11 */ { 5, s_5_11, -1, 8, 0},
149
- /* 12 */ { 6, s_5_12, -1, 12, 0},
150
- /* 13 */ { 5, s_5_13, -1, 11, 0},
151
- /* 14 */ { 6, s_5_14, -1, 1, 0},
152
- /* 15 */ { 7, s_5_15, 14, 7, 0},
153
- /* 16 */ { 5, s_5_16, -1, 8, 0},
154
- /* 17 */ { 5, s_5_17, -1, 7, 0},
155
- /* 18 */ { 7, s_5_18, 17, 6, 0},
156
- /* 19 */ { 4, s_5_19, -1, 6, 0},
157
- /* 20 */ { 4, s_5_20, -1, 7, 0},
158
- /* 21 */ { 7, s_5_21, -1, 11, 0},
159
- /* 22 */ { 7, s_5_22, -1, 9, 0},
160
- /* 23 */ { 7, s_5_23, -1, 10, 0}
161
- };
162
-
163
- static symbol s_6_0[5] = { 'i', 'c', 'a', 't', 'e' };
164
- static symbol s_6_1[5] = { 'a', 't', 'i', 'v', 'e' };
165
- static symbol s_6_2[5] = { 'a', 'l', 'i', 'z', 'e' };
166
- static symbol s_6_3[5] = { 'i', 'c', 'i', 't', 'i' };
167
- static symbol s_6_4[4] = { 'i', 'c', 'a', 'l' };
168
- static symbol s_6_5[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
169
- static symbol s_6_6[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
170
- static symbol s_6_7[3] = { 'f', 'u', 'l' };
171
- static symbol s_6_8[4] = { 'n', 'e', 's', 's' };
172
-
173
- static struct among a_6[9] =
174
- {
175
- /* 0 */ { 5, s_6_0, -1, 4, 0},
176
- /* 1 */ { 5, s_6_1, -1, 6, 0},
177
- /* 2 */ { 5, s_6_2, -1, 3, 0},
178
- /* 3 */ { 5, s_6_3, -1, 4, 0},
179
- /* 4 */ { 4, s_6_4, -1, 4, 0},
180
- /* 5 */ { 6, s_6_5, -1, 1, 0},
181
- /* 6 */ { 7, s_6_6, 5, 2, 0},
182
- /* 7 */ { 3, s_6_7, -1, 5, 0},
183
- /* 8 */ { 4, s_6_8, -1, 5, 0}
184
- };
185
-
186
- static symbol s_7_0[2] = { 'i', 'c' };
187
- static symbol s_7_1[4] = { 'a', 'n', 'c', 'e' };
188
- static symbol s_7_2[4] = { 'e', 'n', 'c', 'e' };
189
- static symbol s_7_3[4] = { 'a', 'b', 'l', 'e' };
190
- static symbol s_7_4[4] = { 'i', 'b', 'l', 'e' };
191
- static symbol s_7_5[3] = { 'a', 't', 'e' };
192
- static symbol s_7_6[3] = { 'i', 'v', 'e' };
193
- static symbol s_7_7[3] = { 'i', 'z', 'e' };
194
- static symbol s_7_8[3] = { 'i', 't', 'i' };
195
- static symbol s_7_9[2] = { 'a', 'l' };
196
- static symbol s_7_10[3] = { 'i', 's', 'm' };
197
- static symbol s_7_11[3] = { 'i', 'o', 'n' };
198
- static symbol s_7_12[2] = { 'e', 'r' };
199
- static symbol s_7_13[3] = { 'o', 'u', 's' };
200
- static symbol s_7_14[3] = { 'a', 'n', 't' };
201
- static symbol s_7_15[3] = { 'e', 'n', 't' };
202
- static symbol s_7_16[4] = { 'm', 'e', 'n', 't' };
203
- static symbol s_7_17[5] = { 'e', 'm', 'e', 'n', 't' };
204
-
205
- static struct among a_7[18] =
206
- {
207
- /* 0 */ { 2, s_7_0, -1, 1, 0},
208
- /* 1 */ { 4, s_7_1, -1, 1, 0},
209
- /* 2 */ { 4, s_7_2, -1, 1, 0},
210
- /* 3 */ { 4, s_7_3, -1, 1, 0},
211
- /* 4 */ { 4, s_7_4, -1, 1, 0},
212
- /* 5 */ { 3, s_7_5, -1, 1, 0},
213
- /* 6 */ { 3, s_7_6, -1, 1, 0},
214
- /* 7 */ { 3, s_7_7, -1, 1, 0},
215
- /* 8 */ { 3, s_7_8, -1, 1, 0},
216
- /* 9 */ { 2, s_7_9, -1, 1, 0},
217
- /* 10 */ { 3, s_7_10, -1, 1, 0},
218
- /* 11 */ { 3, s_7_11, -1, 2, 0},
219
- /* 12 */ { 2, s_7_12, -1, 1, 0},
220
- /* 13 */ { 3, s_7_13, -1, 1, 0},
221
- /* 14 */ { 3, s_7_14, -1, 1, 0},
222
- /* 15 */ { 3, s_7_15, -1, 1, 0},
223
- /* 16 */ { 4, s_7_16, 15, 1, 0},
224
- /* 17 */ { 5, s_7_17, 16, 1, 0}
225
- };
226
-
227
- static symbol s_8_0[1] = { 'e' };
228
- static symbol s_8_1[1] = { 'l' };
229
-
230
- static struct among a_8[2] =
231
- {
232
- /* 0 */ { 1, s_8_0, -1, 1, 0},
233
- /* 1 */ { 1, s_8_1, -1, 2, 0}
234
- };
235
-
236
- static symbol s_9_0[7] = { 's', 'u', 'c', 'c', 'e', 'e', 'd' };
237
- static symbol s_9_1[7] = { 'p', 'r', 'o', 'c', 'e', 'e', 'd' };
238
- static symbol s_9_2[6] = { 'e', 'x', 'c', 'e', 'e', 'd' };
239
- static symbol s_9_3[7] = { 'c', 'a', 'n', 'n', 'i', 'n', 'g' };
240
- static symbol s_9_4[6] = { 'i', 'n', 'n', 'i', 'n', 'g' };
241
- static symbol s_9_5[7] = { 'e', 'a', 'r', 'r', 'i', 'n', 'g' };
242
- static symbol s_9_6[7] = { 'h', 'e', 'r', 'r', 'i', 'n', 'g' };
243
- static symbol s_9_7[6] = { 'o', 'u', 't', 'i', 'n', 'g' };
244
-
245
- static struct among a_9[8] =
246
- {
247
- /* 0 */ { 7, s_9_0, -1, -1, 0},
248
- /* 1 */ { 7, s_9_1, -1, -1, 0},
249
- /* 2 */ { 6, s_9_2, -1, -1, 0},
250
- /* 3 */ { 7, s_9_3, -1, -1, 0},
251
- /* 4 */ { 6, s_9_4, -1, -1, 0},
252
- /* 5 */ { 7, s_9_5, -1, -1, 0},
253
- /* 6 */ { 7, s_9_6, -1, -1, 0},
254
- /* 7 */ { 6, s_9_7, -1, -1, 0}
255
- };
256
-
257
- static symbol s_10_0[5] = { 'a', 'n', 'd', 'e', 's' };
258
- static symbol s_10_1[5] = { 'a', 't', 'l', 'a', 's' };
259
- static symbol s_10_2[4] = { 'b', 'i', 'a', 's' };
260
- static symbol s_10_3[6] = { 'c', 'o', 's', 'm', 'o', 's' };
261
- static symbol s_10_4[5] = { 'd', 'y', 'i', 'n', 'g' };
262
- static symbol s_10_5[5] = { 'e', 'a', 'r', 'l', 'y' };
263
- static symbol s_10_6[6] = { 'g', 'e', 'n', 't', 'l', 'y' };
264
- static symbol s_10_7[4] = { 'h', 'o', 'w', 'e' };
265
- static symbol s_10_8[4] = { 'i', 'd', 'l', 'y' };
266
- static symbol s_10_9[5] = { 'l', 'y', 'i', 'n', 'g' };
267
- static symbol s_10_10[4] = { 'n', 'e', 'w', 's' };
268
- static symbol s_10_11[4] = { 'o', 'n', 'l', 'y' };
269
- static symbol s_10_12[6] = { 's', 'i', 'n', 'g', 'l', 'y' };
270
- static symbol s_10_13[5] = { 's', 'k', 'i', 'e', 's' };
271
- static symbol s_10_14[4] = { 's', 'k', 'i', 's' };
272
- static symbol s_10_15[3] = { 's', 'k', 'y' };
273
- static symbol s_10_16[5] = { 't', 'y', 'i', 'n', 'g' };
274
- static symbol s_10_17[4] = { 'u', 'g', 'l', 'y' };
275
-
276
- static struct among a_10[18] =
277
- {
278
- /* 0 */ { 5, s_10_0, -1, -1, 0},
279
- /* 1 */ { 5, s_10_1, -1, -1, 0},
280
- /* 2 */ { 4, s_10_2, -1, -1, 0},
281
- /* 3 */ { 6, s_10_3, -1, -1, 0},
282
- /* 4 */ { 5, s_10_4, -1, 3, 0},
283
- /* 5 */ { 5, s_10_5, -1, 9, 0},
284
- /* 6 */ { 6, s_10_6, -1, 7, 0},
285
- /* 7 */ { 4, s_10_7, -1, -1, 0},
286
- /* 8 */ { 4, s_10_8, -1, 6, 0},
287
- /* 9 */ { 5, s_10_9, -1, 4, 0},
288
- /* 10 */ { 4, s_10_10, -1, -1, 0},
289
- /* 11 */ { 4, s_10_11, -1, 10, 0},
290
- /* 12 */ { 6, s_10_12, -1, 11, 0},
291
- /* 13 */ { 5, s_10_13, -1, 2, 0},
292
- /* 14 */ { 4, s_10_14, -1, 1, 0},
293
- /* 15 */ { 3, s_10_15, -1, -1, 0},
294
- /* 16 */ { 5, s_10_16, -1, 5, 0},
295
- /* 17 */ { 4, s_10_17, -1, 8, 0}
296
- };
297
-
298
- static unsigned char g_v[] = { 17, 65, 16, 1 };
299
-
300
- static unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
301
-
302
- static unsigned char g_valid_LI[] = { 55, 141, 2 };
303
-
304
- static symbol s_0[] = { '\'' };
305
- static symbol s_1[] = { 'y' };
306
- static symbol s_2[] = { 'Y' };
307
- static symbol s_3[] = { 'y' };
308
- static symbol s_4[] = { 'Y' };
309
- static symbol s_5[] = { 's', 's' };
310
- static symbol s_6[] = { 'i' };
311
- static symbol s_7[] = { 'i', 'e' };
312
- static symbol s_8[] = { 'e', 'e' };
313
- static symbol s_9[] = { 'e' };
314
- static symbol s_10[] = { 'e' };
315
- static symbol s_11[] = { 'y' };
316
- static symbol s_12[] = { 'Y' };
317
- static symbol s_13[] = { 'i' };
318
- static symbol s_14[] = { 't', 'i', 'o', 'n' };
319
- static symbol s_15[] = { 'e', 'n', 'c', 'e' };
320
- static symbol s_16[] = { 'a', 'n', 'c', 'e' };
321
- static symbol s_17[] = { 'a', 'b', 'l', 'e' };
322
- static symbol s_18[] = { 'e', 'n', 't' };
323
- static symbol s_19[] = { 'i', 'z', 'e' };
324
- static symbol s_20[] = { 'a', 't', 'e' };
325
- static symbol s_21[] = { 'a', 'l' };
326
- static symbol s_22[] = { 'f', 'u', 'l' };
327
- static symbol s_23[] = { 'o', 'u', 's' };
328
- static symbol s_24[] = { 'i', 'v', 'e' };
329
- static symbol s_25[] = { 'b', 'l', 'e' };
330
- static symbol s_26[] = { 'l' };
331
- static symbol s_27[] = { 'o', 'g' };
332
- static symbol s_28[] = { 'f', 'u', 'l' };
333
- static symbol s_29[] = { 'l', 'e', 's', 's' };
334
- static symbol s_30[] = { 't', 'i', 'o', 'n' };
335
- static symbol s_31[] = { 'a', 't', 'e' };
336
- static symbol s_32[] = { 'a', 'l' };
337
- static symbol s_33[] = { 'i', 'c' };
338
- static symbol s_34[] = { 's' };
339
- static symbol s_35[] = { 't' };
340
- static symbol s_36[] = { 'l' };
341
- static symbol s_37[] = { 's', 'k', 'i' };
342
- static symbol s_38[] = { 's', 'k', 'y' };
343
- static symbol s_39[] = { 'd', 'i', 'e' };
344
- static symbol s_40[] = { 'l', 'i', 'e' };
345
- static symbol s_41[] = { 't', 'i', 'e' };
346
- static symbol s_42[] = { 'i', 'd', 'l' };
347
- static symbol s_43[] = { 'g', 'e', 'n', 't', 'l' };
348
- static symbol s_44[] = { 'u', 'g', 'l', 'i' };
349
- static symbol s_45[] = { 'e', 'a', 'r', 'l', 'i' };
350
- static symbol s_46[] = { 'o', 'n', 'l', 'i' };
351
- static symbol s_47[] = { 's', 'i', 'n', 'g', 'l' };
352
- static symbol s_48[] = { 'Y' };
353
- static symbol s_49[] = { 'y' };
354
-
355
- static int r_prelude(struct SN_env * z) {
356
- z->B[0] = 0; /* unset Y_found, line 26 */
357
- { int c = z->c; /* do, line 27 */
358
- z->bra = z->c; /* [, line 27 */
359
- if (!(eq_s(z, 1, s_0))) goto lab0;
360
- z->ket = z->c; /* ], line 27 */
361
- { int ret;
362
- ret = slice_del(z); /* delete, line 27 */
363
- if (ret < 0) return ret;
364
- }
365
- lab0:
366
- z->c = c;
367
- }
368
- { int c = z->c; /* do, line 28 */
369
- z->bra = z->c; /* [, line 28 */
370
- if (!(eq_s(z, 1, s_1))) goto lab1;
371
- z->ket = z->c; /* ], line 28 */
372
- { int ret;
373
- ret = slice_from_s(z, 1, s_2); /* <-, line 28 */
374
- if (ret < 0) return ret;
375
- }
376
- z->B[0] = 1; /* set Y_found, line 28 */
377
- lab1:
378
- z->c = c;
379
- }
380
- { int c = z->c; /* do, line 29 */
381
- while(1) { /* repeat, line 29 */
382
- int c = z->c;
383
- while(1) { /* goto, line 29 */
384
- int c = z->c;
385
- if (!(in_grouping(z, g_v, 97, 121))) goto lab4;
386
- z->bra = z->c; /* [, line 29 */
387
- if (!(eq_s(z, 1, s_3))) goto lab4;
388
- z->ket = z->c; /* ], line 29 */
389
- z->c = c;
390
- break;
391
- lab4:
392
- z->c = c;
393
- if (z->c >= z->l) goto lab3;
394
- z->c++; /* goto, line 29 */
395
- }
396
- { int ret;
397
- ret = slice_from_s(z, 1, s_4); /* <-, line 29 */
398
- if (ret < 0) return ret;
399
- }
400
- z->B[0] = 1; /* set Y_found, line 29 */
401
- continue;
402
- lab3:
403
- z->c = c;
404
- break;
405
- }
406
- z->c = c;
407
- }
408
- return 1;
409
- }
410
-
411
- static int r_mark_regions(struct SN_env * z) {
412
- z->I[0] = z->l;
413
- z->I[1] = z->l;
414
- { int c = z->c; /* do, line 35 */
415
- { int c = z->c; /* or, line 40 */
416
- if (!(find_among(z, a_0, 2))) goto lab2; /* among, line 36 */
417
- goto lab1;
418
- lab2:
419
- z->c = c;
420
- while(1) { /* gopast, line 40 */
421
- if (!(in_grouping(z, g_v, 97, 121))) goto lab3;
422
- break;
423
- lab3:
424
- if (z->c >= z->l) goto lab0;
425
- z->c++; /* gopast, line 40 */
426
- }
427
- while(1) { /* gopast, line 40 */
428
- if (!(out_grouping(z, g_v, 97, 121))) goto lab4;
429
- break;
430
- lab4:
431
- if (z->c >= z->l) goto lab0;
432
- z->c++; /* gopast, line 40 */
433
- }
434
- }
435
- lab1:
436
- z->I[0] = z->c; /* setmark p1, line 41 */
437
- while(1) { /* gopast, line 42 */
438
- if (!(in_grouping(z, g_v, 97, 121))) goto lab5;
439
- break;
440
- lab5:
441
- if (z->c >= z->l) goto lab0;
442
- z->c++; /* gopast, line 42 */
443
- }
444
- while(1) { /* gopast, line 42 */
445
- if (!(out_grouping(z, g_v, 97, 121))) goto lab6;
446
- break;
447
- lab6:
448
- if (z->c >= z->l) goto lab0;
449
- z->c++; /* gopast, line 42 */
450
- }
451
- z->I[1] = z->c; /* setmark p2, line 42 */
452
- lab0:
453
- z->c = c;
454
- }
455
- return 1;
456
- }
457
-
458
- static int r_shortv(struct SN_env * z) {
459
- { int m = z->l - z->c; (void) m; /* or, line 50 */
460
- if (!(out_grouping_b(z, g_v_WXY, 89, 121))) goto lab1;
461
- if (!(in_grouping_b(z, g_v, 97, 121))) goto lab1;
462
- if (!(out_grouping_b(z, g_v, 97, 121))) goto lab1;
463
- goto lab0;
464
- lab1:
465
- z->c = z->l - m;
466
- if (!(out_grouping_b(z, g_v, 97, 121))) return 0;
467
- if (!(in_grouping_b(z, g_v, 97, 121))) return 0;
468
- if (z->c > z->lb) return 0; /* atlimit, line 51 */
469
- }
470
- lab0:
471
- return 1;
472
- }
473
-
474
- static int r_R1(struct SN_env * z) {
475
- if (!(z->I[0] <= z->c)) return 0;
476
- return 1;
477
- }
478
-
479
- static int r_R2(struct SN_env * z) {
480
- if (!(z->I[1] <= z->c)) return 0;
481
- return 1;
482
- }
483
-
484
- static int r_Step_1a(struct SN_env * z) {
485
- int among_var;
486
- { int m = z->l - z->c; (void) m; /* try, line 58 */
487
- z->ket = z->c; /* [, line 59 */
488
- among_var = find_among_b(z, a_1, 3); /* substring, line 59 */
489
- if (!(among_var)) { z->c = z->l - m; goto lab0; }
490
- z->bra = z->c; /* ], line 59 */
491
- switch(among_var) {
492
- case 0: { z->c = z->l - m; goto lab0; }
493
- case 1:
494
- { int ret;
495
- ret = slice_del(z); /* delete, line 61 */
496
- if (ret < 0) return ret;
497
- }
498
- break;
499
- }
500
- lab0:
501
- ;
502
- }
503
- z->ket = z->c; /* [, line 64 */
504
- among_var = find_among_b(z, a_2, 6); /* substring, line 64 */
505
- if (!(among_var)) return 0;
506
- z->bra = z->c; /* ], line 64 */
507
- switch(among_var) {
508
- case 0: return 0;
509
- case 1:
510
- { int ret;
511
- ret = slice_from_s(z, 2, s_5); /* <-, line 65 */
512
- if (ret < 0) return ret;
513
- }
514
- break;
515
- case 2:
516
- { int m = z->l - z->c; (void) m; /* or, line 67 */
517
- { int c = z->c - 2;
518
- if (z->lb > c || c > z->l) goto lab2;
519
- z->c = c; /* hop, line 67 */
520
- }
521
- { int ret;
522
- ret = slice_from_s(z, 1, s_6); /* <-, line 67 */
523
- if (ret < 0) return ret;
524
- }
525
- goto lab1;
526
- lab2:
527
- z->c = z->l - m;
528
- { int ret;
529
- ret = slice_from_s(z, 2, s_7); /* <-, line 67 */
530
- if (ret < 0) return ret;
531
- }
532
- }
533
- lab1:
534
- break;
535
- case 3:
536
- if (z->c <= z->lb) return 0;
537
- z->c--; /* next, line 68 */
538
- while(1) { /* gopast, line 68 */
539
- if (!(in_grouping_b(z, g_v, 97, 121))) goto lab3;
540
- break;
541
- lab3:
542
- if (z->c <= z->lb) return 0;
543
- z->c--; /* gopast, line 68 */
544
- }
545
- { int ret;
546
- ret = slice_del(z); /* delete, line 68 */
547
- if (ret < 0) return ret;
548
- }
549
- break;
550
- }
551
- return 1;
552
- }
553
-
554
- static int r_Step_1b(struct SN_env * z) {
555
- int among_var;
556
- z->ket = z->c; /* [, line 74 */
557
- among_var = find_among_b(z, a_4, 6); /* substring, line 74 */
558
- if (!(among_var)) return 0;
559
- z->bra = z->c; /* ], line 74 */
560
- switch(among_var) {
561
- case 0: return 0;
562
- case 1:
563
- { int ret = r_R1(z);
564
- if (ret == 0) return 0; /* call R1, line 76 */
565
- if (ret < 0) return ret;
566
- }
567
- { int ret;
568
- ret = slice_from_s(z, 2, s_8); /* <-, line 76 */
569
- if (ret < 0) return ret;
570
- }
571
- break;
572
- case 2:
573
- { int m_test = z->l - z->c; /* test, line 79 */
574
- while(1) { /* gopast, line 79 */
575
- if (!(in_grouping_b(z, g_v, 97, 121))) goto lab0;
576
- break;
577
- lab0:
578
- if (z->c <= z->lb) return 0;
579
- z->c--; /* gopast, line 79 */
580
- }
581
- z->c = z->l - m_test;
582
- }
583
- { int ret;
584
- ret = slice_del(z); /* delete, line 79 */
585
- if (ret < 0) return ret;
586
- }
587
- { int m_test = z->l - z->c; /* test, line 80 */
588
- among_var = find_among_b(z, a_3, 13); /* substring, line 80 */
589
- if (!(among_var)) return 0;
590
- z->c = z->l - m_test;
591
- }
592
- switch(among_var) {
593
- case 0: return 0;
594
- case 1:
595
- { int ret;
596
- { int c = z->c;
597
- ret = insert_s(z, z->c, z->c, 1, s_9); /* <+, line 82 */
598
- z->c = c;
599
- }
600
- if (ret < 0) return ret;
601
- }
602
- break;
603
- case 2:
604
- z->ket = z->c; /* [, line 85 */
605
- if (z->c <= z->lb) return 0;
606
- z->c--; /* next, line 85 */
607
- z->bra = z->c; /* ], line 85 */
608
- { int ret;
609
- ret = slice_del(z); /* delete, line 85 */
610
- if (ret < 0) return ret;
611
- }
612
- break;
613
- case 3:
614
- if (z->c != z->I[0]) return 0; /* atmark, line 86 */
615
- { int m_test = z->l - z->c; /* test, line 86 */
616
- { int ret = r_shortv(z);
617
- if (ret == 0) return 0; /* call shortv, line 86 */
618
- if (ret < 0) return ret;
619
- }
620
- z->c = z->l - m_test;
621
- }
622
- { int ret;
623
- { int c = z->c;
624
- ret = insert_s(z, z->c, z->c, 1, s_10); /* <+, line 86 */
625
- z->c = c;
626
- }
627
- if (ret < 0) return ret;
628
- }
629
- break;
630
- }
631
- break;
632
- }
633
- return 1;
634
- }
635
-
636
- static int r_Step_1c(struct SN_env * z) {
637
- z->ket = z->c; /* [, line 93 */
638
- { int m = z->l - z->c; (void) m; /* or, line 93 */
639
- if (!(eq_s_b(z, 1, s_11))) goto lab1;
640
- goto lab0;
641
- lab1:
642
- z->c = z->l - m;
643
- if (!(eq_s_b(z, 1, s_12))) return 0;
644
- }
645
- lab0:
646
- z->bra = z->c; /* ], line 93 */
647
- if (!(out_grouping_b(z, g_v, 97, 121))) return 0;
648
- { int m = z->l - z->c; (void) m; /* not, line 94 */
649
- if (z->c > z->lb) goto lab2; /* atlimit, line 94 */
650
- return 0;
651
- lab2:
652
- z->c = z->l - m;
653
- }
654
- { int ret;
655
- ret = slice_from_s(z, 1, s_13); /* <-, line 95 */
656
- if (ret < 0) return ret;
657
- }
658
- return 1;
659
- }
660
-
661
- static int r_Step_2(struct SN_env * z) {
662
- int among_var;
663
- z->ket = z->c; /* [, line 99 */
664
- among_var = find_among_b(z, a_5, 24); /* substring, line 99 */
665
- if (!(among_var)) return 0;
666
- z->bra = z->c; /* ], line 99 */
667
- { int ret = r_R1(z);
668
- if (ret == 0) return 0; /* call R1, line 99 */
669
- if (ret < 0) return ret;
670
- }
671
- switch(among_var) {
672
- case 0: return 0;
673
- case 1:
674
- { int ret;
675
- ret = slice_from_s(z, 4, s_14); /* <-, line 100 */
676
- if (ret < 0) return ret;
677
- }
678
- break;
679
- case 2:
680
- { int ret;
681
- ret = slice_from_s(z, 4, s_15); /* <-, line 101 */
682
- if (ret < 0) return ret;
683
- }
684
- break;
685
- case 3:
686
- { int ret;
687
- ret = slice_from_s(z, 4, s_16); /* <-, line 102 */
688
- if (ret < 0) return ret;
689
- }
690
- break;
691
- case 4:
692
- { int ret;
693
- ret = slice_from_s(z, 4, s_17); /* <-, line 103 */
694
- if (ret < 0) return ret;
695
- }
696
- break;
697
- case 5:
698
- { int ret;
699
- ret = slice_from_s(z, 3, s_18); /* <-, line 104 */
700
- if (ret < 0) return ret;
701
- }
702
- break;
703
- case 6:
704
- { int ret;
705
- ret = slice_from_s(z, 3, s_19); /* <-, line 106 */
706
- if (ret < 0) return ret;
707
- }
708
- break;
709
- case 7:
710
- { int ret;
711
- ret = slice_from_s(z, 3, s_20); /* <-, line 108 */
712
- if (ret < 0) return ret;
713
- }
714
- break;
715
- case 8:
716
- { int ret;
717
- ret = slice_from_s(z, 2, s_21); /* <-, line 110 */
718
- if (ret < 0) return ret;
719
- }
720
- break;
721
- case 9:
722
- { int ret;
723
- ret = slice_from_s(z, 3, s_22); /* <-, line 111 */
724
- if (ret < 0) return ret;
725
- }
726
- break;
727
- case 10:
728
- { int ret;
729
- ret = slice_from_s(z, 3, s_23); /* <-, line 113 */
730
- if (ret < 0) return ret;
731
- }
732
- break;
733
- case 11:
734
- { int ret;
735
- ret = slice_from_s(z, 3, s_24); /* <-, line 115 */
736
- if (ret < 0) return ret;
737
- }
738
- break;
739
- case 12:
740
- { int ret;
741
- ret = slice_from_s(z, 3, s_25); /* <-, line 117 */
742
- if (ret < 0) return ret;
743
- }
744
- break;
745
- case 13:
746
- if (!(eq_s_b(z, 1, s_26))) return 0;
747
- { int ret;
748
- ret = slice_from_s(z, 2, s_27); /* <-, line 118 */
749
- if (ret < 0) return ret;
750
- }
751
- break;
752
- case 14:
753
- { int ret;
754
- ret = slice_from_s(z, 3, s_28); /* <-, line 119 */
755
- if (ret < 0) return ret;
756
- }
757
- break;
758
- case 15:
759
- { int ret;
760
- ret = slice_from_s(z, 4, s_29); /* <-, line 120 */
761
- if (ret < 0) return ret;
762
- }
763
- break;
764
- case 16:
765
- if (!(in_grouping_b(z, g_valid_LI, 99, 116))) return 0;
766
- { int ret;
767
- ret = slice_del(z); /* delete, line 121 */
768
- if (ret < 0) return ret;
769
- }
770
- break;
771
- }
772
- return 1;
773
- }
774
-
775
- static int r_Step_3(struct SN_env * z) {
776
- int among_var;
777
- z->ket = z->c; /* [, line 126 */
778
- among_var = find_among_b(z, a_6, 9); /* substring, line 126 */
779
- if (!(among_var)) return 0;
780
- z->bra = z->c; /* ], line 126 */
781
- { int ret = r_R1(z);
782
- if (ret == 0) return 0; /* call R1, line 126 */
783
- if (ret < 0) return ret;
784
- }
785
- switch(among_var) {
786
- case 0: return 0;
787
- case 1:
788
- { int ret;
789
- ret = slice_from_s(z, 4, s_30); /* <-, line 127 */
790
- if (ret < 0) return ret;
791
- }
792
- break;
793
- case 2:
794
- { int ret;
795
- ret = slice_from_s(z, 3, s_31); /* <-, line 128 */
796
- if (ret < 0) return ret;
797
- }
798
- break;
799
- case 3:
800
- { int ret;
801
- ret = slice_from_s(z, 2, s_32); /* <-, line 129 */
802
- if (ret < 0) return ret;
803
- }
804
- break;
805
- case 4:
806
- { int ret;
807
- ret = slice_from_s(z, 2, s_33); /* <-, line 131 */
808
- if (ret < 0) return ret;
809
- }
810
- break;
811
- case 5:
812
- { int ret;
813
- ret = slice_del(z); /* delete, line 133 */
814
- if (ret < 0) return ret;
815
- }
816
- break;
817
- case 6:
818
- { int ret = r_R2(z);
819
- if (ret == 0) return 0; /* call R2, line 135 */
820
- if (ret < 0) return ret;
821
- }
822
- { int ret;
823
- ret = slice_del(z); /* delete, line 135 */
824
- if (ret < 0) return ret;
825
- }
826
- break;
827
- }
828
- return 1;
829
- }
830
-
831
- static int r_Step_4(struct SN_env * z) {
832
- int among_var;
833
- z->ket = z->c; /* [, line 140 */
834
- among_var = find_among_b(z, a_7, 18); /* substring, line 140 */
835
- if (!(among_var)) return 0;
836
- z->bra = z->c; /* ], line 140 */
837
- { int ret = r_R2(z);
838
- if (ret == 0) return 0; /* call R2, line 140 */
839
- if (ret < 0) return ret;
840
- }
841
- switch(among_var) {
842
- case 0: return 0;
843
- case 1:
844
- { int ret;
845
- ret = slice_del(z); /* delete, line 143 */
846
- if (ret < 0) return ret;
847
- }
848
- break;
849
- case 2:
850
- { int m = z->l - z->c; (void) m; /* or, line 144 */
851
- if (!(eq_s_b(z, 1, s_34))) goto lab1;
852
- goto lab0;
853
- lab1:
854
- z->c = z->l - m;
855
- if (!(eq_s_b(z, 1, s_35))) return 0;
856
- }
857
- lab0:
858
- { int ret;
859
- ret = slice_del(z); /* delete, line 144 */
860
- if (ret < 0) return ret;
861
- }
862
- break;
863
- }
864
- return 1;
865
- }
866
-
867
- static int r_Step_5(struct SN_env * z) {
868
- int among_var;
869
- z->ket = z->c; /* [, line 149 */
870
- among_var = find_among_b(z, a_8, 2); /* substring, line 149 */
871
- if (!(among_var)) return 0;
872
- z->bra = z->c; /* ], line 149 */
873
- switch(among_var) {
874
- case 0: return 0;
875
- case 1:
876
- { int m = z->l - z->c; (void) m; /* or, line 150 */
877
- { int ret = r_R2(z);
878
- if (ret == 0) goto lab1; /* call R2, line 150 */
879
- if (ret < 0) return ret;
880
- }
881
- goto lab0;
882
- lab1:
883
- z->c = z->l - m;
884
- { int ret = r_R1(z);
885
- if (ret == 0) return 0; /* call R1, line 150 */
886
- if (ret < 0) return ret;
887
- }
888
- { int m = z->l - z->c; (void) m; /* not, line 150 */
889
- { int ret = r_shortv(z);
890
- if (ret == 0) goto lab2; /* call shortv, line 150 */
891
- if (ret < 0) return ret;
892
- }
893
- return 0;
894
- lab2:
895
- z->c = z->l - m;
896
- }
897
- }
898
- lab0:
899
- { int ret;
900
- ret = slice_del(z); /* delete, line 150 */
901
- if (ret < 0) return ret;
902
- }
903
- break;
904
- case 2:
905
- { int ret = r_R2(z);
906
- if (ret == 0) return 0; /* call R2, line 151 */
907
- if (ret < 0) return ret;
908
- }
909
- if (!(eq_s_b(z, 1, s_36))) return 0;
910
- { int ret;
911
- ret = slice_del(z); /* delete, line 151 */
912
- if (ret < 0) return ret;
913
- }
914
- break;
915
- }
916
- return 1;
917
- }
918
-
919
- static int r_exception2(struct SN_env * z) {
920
- z->ket = z->c; /* [, line 157 */
921
- if (!(find_among_b(z, a_9, 8))) return 0; /* substring, line 157 */
922
- z->bra = z->c; /* ], line 157 */
923
- if (z->c > z->lb) return 0; /* atlimit, line 157 */
924
- return 1;
925
- }
926
-
927
- static int r_exception1(struct SN_env * z) {
928
- int among_var;
929
- z->bra = z->c; /* [, line 169 */
930
- among_var = find_among(z, a_10, 18); /* substring, line 169 */
931
- if (!(among_var)) return 0;
932
- z->ket = z->c; /* ], line 169 */
933
- if (z->c < z->l) return 0; /* atlimit, line 169 */
934
- switch(among_var) {
935
- case 0: return 0;
936
- case 1:
937
- { int ret;
938
- ret = slice_from_s(z, 3, s_37); /* <-, line 173 */
939
- if (ret < 0) return ret;
940
- }
941
- break;
942
- case 2:
943
- { int ret;
944
- ret = slice_from_s(z, 3, s_38); /* <-, line 174 */
945
- if (ret < 0) return ret;
946
- }
947
- break;
948
- case 3:
949
- { int ret;
950
- ret = slice_from_s(z, 3, s_39); /* <-, line 175 */
951
- if (ret < 0) return ret;
952
- }
953
- break;
954
- case 4:
955
- { int ret;
956
- ret = slice_from_s(z, 3, s_40); /* <-, line 176 */
957
- if (ret < 0) return ret;
958
- }
959
- break;
960
- case 5:
961
- { int ret;
962
- ret = slice_from_s(z, 3, s_41); /* <-, line 177 */
963
- if (ret < 0) return ret;
964
- }
965
- break;
966
- case 6:
967
- { int ret;
968
- ret = slice_from_s(z, 3, s_42); /* <-, line 181 */
969
- if (ret < 0) return ret;
970
- }
971
- break;
972
- case 7:
973
- { int ret;
974
- ret = slice_from_s(z, 5, s_43); /* <-, line 182 */
975
- if (ret < 0) return ret;
976
- }
977
- break;
978
- case 8:
979
- { int ret;
980
- ret = slice_from_s(z, 4, s_44); /* <-, line 183 */
981
- if (ret < 0) return ret;
982
- }
983
- break;
984
- case 9:
985
- { int ret;
986
- ret = slice_from_s(z, 5, s_45); /* <-, line 184 */
987
- if (ret < 0) return ret;
988
- }
989
- break;
990
- case 10:
991
- { int ret;
992
- ret = slice_from_s(z, 4, s_46); /* <-, line 185 */
993
- if (ret < 0) return ret;
994
- }
995
- break;
996
- case 11:
997
- { int ret;
998
- ret = slice_from_s(z, 5, s_47); /* <-, line 186 */
999
- if (ret < 0) return ret;
1000
- }
1001
- break;
1002
- }
1003
- return 1;
1004
- }
1005
-
1006
- static int r_postlude(struct SN_env * z) {
1007
- if (!(z->B[0])) return 0; /* Boolean test Y_found, line 202 */
1008
- while(1) { /* repeat, line 202 */
1009
- int c = z->c;
1010
- while(1) { /* goto, line 202 */
1011
- int c = z->c;
1012
- z->bra = z->c; /* [, line 202 */
1013
- if (!(eq_s(z, 1, s_48))) goto lab1;
1014
- z->ket = z->c; /* ], line 202 */
1015
- z->c = c;
1016
- break;
1017
- lab1:
1018
- z->c = c;
1019
- if (z->c >= z->l) goto lab0;
1020
- z->c++; /* goto, line 202 */
1021
- }
1022
- { int ret;
1023
- ret = slice_from_s(z, 1, s_49); /* <-, line 202 */
1024
- if (ret < 0) return ret;
1025
- }
1026
- continue;
1027
- lab0:
1028
- z->c = c;
1029
- break;
1030
- }
1031
- return 1;
1032
- }
1033
-
1034
- extern int english_ISO_8859_1_stem(struct SN_env * z) {
1035
- { int c = z->c; /* or, line 206 */
1036
- { int ret = r_exception1(z);
1037
- if (ret == 0) goto lab1; /* call exception1, line 206 */
1038
- if (ret < 0) return ret;
1039
- }
1040
- goto lab0;
1041
- lab1:
1042
- z->c = c;
1043
- { int c = z->c; /* not, line 207 */
1044
- { int c = z->c + 3;
1045
- if (0 > c || c > z->l) goto lab3;
1046
- z->c = c; /* hop, line 207 */
1047
- }
1048
- goto lab2;
1049
- lab3:
1050
- z->c = c;
1051
- }
1052
- goto lab0;
1053
- lab2:
1054
- z->c = c;
1055
- { int c = z->c; /* do, line 208 */
1056
- { int ret = r_prelude(z);
1057
- if (ret == 0) goto lab4; /* call prelude, line 208 */
1058
- if (ret < 0) return ret;
1059
- }
1060
- lab4:
1061
- z->c = c;
1062
- }
1063
- { int c = z->c; /* do, line 209 */
1064
- { int ret = r_mark_regions(z);
1065
- if (ret == 0) goto lab5; /* call mark_regions, line 209 */
1066
- if (ret < 0) return ret;
1067
- }
1068
- lab5:
1069
- z->c = c;
1070
- }
1071
- z->lb = z->c; z->c = z->l; /* backwards, line 210 */
1072
-
1073
- { int m = z->l - z->c; (void) m; /* do, line 212 */
1074
- { int ret = r_Step_1a(z);
1075
- if (ret == 0) goto lab6; /* call Step_1a, line 212 */
1076
- if (ret < 0) return ret;
1077
- }
1078
- lab6:
1079
- z->c = z->l - m;
1080
- }
1081
- { int m = z->l - z->c; (void) m; /* or, line 214 */
1082
- { int ret = r_exception2(z);
1083
- if (ret == 0) goto lab8; /* call exception2, line 214 */
1084
- if (ret < 0) return ret;
1085
- }
1086
- goto lab7;
1087
- lab8:
1088
- z->c = z->l - m;
1089
- { int m = z->l - z->c; (void) m; /* do, line 216 */
1090
- { int ret = r_Step_1b(z);
1091
- if (ret == 0) goto lab9; /* call Step_1b, line 216 */
1092
- if (ret < 0) return ret;
1093
- }
1094
- lab9:
1095
- z->c = z->l - m;
1096
- }
1097
- { int m = z->l - z->c; (void) m; /* do, line 217 */
1098
- { int ret = r_Step_1c(z);
1099
- if (ret == 0) goto lab10; /* call Step_1c, line 217 */
1100
- if (ret < 0) return ret;
1101
- }
1102
- lab10:
1103
- z->c = z->l - m;
1104
- }
1105
- { int m = z->l - z->c; (void) m; /* do, line 219 */
1106
- { int ret = r_Step_2(z);
1107
- if (ret == 0) goto lab11; /* call Step_2, line 219 */
1108
- if (ret < 0) return ret;
1109
- }
1110
- lab11:
1111
- z->c = z->l - m;
1112
- }
1113
- { int m = z->l - z->c; (void) m; /* do, line 220 */
1114
- { int ret = r_Step_3(z);
1115
- if (ret == 0) goto lab12; /* call Step_3, line 220 */
1116
- if (ret < 0) return ret;
1117
- }
1118
- lab12:
1119
- z->c = z->l - m;
1120
- }
1121
- { int m = z->l - z->c; (void) m; /* do, line 221 */
1122
- { int ret = r_Step_4(z);
1123
- if (ret == 0) goto lab13; /* call Step_4, line 221 */
1124
- if (ret < 0) return ret;
1125
- }
1126
- lab13:
1127
- z->c = z->l - m;
1128
- }
1129
- { int m = z->l - z->c; (void) m; /* do, line 223 */
1130
- { int ret = r_Step_5(z);
1131
- if (ret == 0) goto lab14; /* call Step_5, line 223 */
1132
- if (ret < 0) return ret;
1133
- }
1134
- lab14:
1135
- z->c = z->l - m;
1136
- }
1137
- }
1138
- lab7:
1139
- z->c = z->lb;
1140
- { int c = z->c; /* do, line 226 */
1141
- { int ret = r_postlude(z);
1142
- if (ret == 0) goto lab15; /* call postlude, line 226 */
1143
- if (ret < 0) return ret;
1144
- }
1145
- lab15:
1146
- z->c = c;
1147
- }
1148
- }
1149
- lab0:
1150
- return 1;
1151
- }
1152
-
1153
- extern struct SN_env * english_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 1); }
1154
-
1155
- extern void english_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z); }
1156
-