jk-ferret 0.11.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. data/CHANGELOG +24 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README +90 -0
  4. data/RELEASE_CHANGES +137 -0
  5. data/RELEASE_NOTES +60 -0
  6. data/Rakefile +443 -0
  7. data/TODO +109 -0
  8. data/TUTORIAL +231 -0
  9. data/bin/ferret-browser +79 -0
  10. data/ext/BZLIB_blocksort.c +1094 -0
  11. data/ext/BZLIB_bzlib.c +1578 -0
  12. data/ext/BZLIB_compress.c +672 -0
  13. data/ext/BZLIB_crctable.c +104 -0
  14. data/ext/BZLIB_decompress.c +626 -0
  15. data/ext/BZLIB_huffman.c +205 -0
  16. data/ext/BZLIB_randtable.c +84 -0
  17. data/ext/STEMMER_api.c +66 -0
  18. data/ext/STEMMER_libstemmer.c +93 -0
  19. data/ext/STEMMER_stem_ISO_8859_1_danish.c +337 -0
  20. data/ext/STEMMER_stem_ISO_8859_1_dutch.c +624 -0
  21. data/ext/STEMMER_stem_ISO_8859_1_english.c +1117 -0
  22. data/ext/STEMMER_stem_ISO_8859_1_finnish.c +762 -0
  23. data/ext/STEMMER_stem_ISO_8859_1_french.c +1246 -0
  24. data/ext/STEMMER_stem_ISO_8859_1_german.c +503 -0
  25. data/ext/STEMMER_stem_ISO_8859_1_hungarian.c +1230 -0
  26. data/ext/STEMMER_stem_ISO_8859_1_italian.c +1065 -0
  27. data/ext/STEMMER_stem_ISO_8859_1_norwegian.c +297 -0
  28. data/ext/STEMMER_stem_ISO_8859_1_porter.c +749 -0
  29. data/ext/STEMMER_stem_ISO_8859_1_portuguese.c +1017 -0
  30. data/ext/STEMMER_stem_ISO_8859_1_spanish.c +1093 -0
  31. data/ext/STEMMER_stem_ISO_8859_1_swedish.c +307 -0
  32. data/ext/STEMMER_stem_ISO_8859_2_romanian.c +998 -0
  33. data/ext/STEMMER_stem_KOI8_R_russian.c +700 -0
  34. data/ext/STEMMER_stem_UTF_8_danish.c +339 -0
  35. data/ext/STEMMER_stem_UTF_8_dutch.c +634 -0
  36. data/ext/STEMMER_stem_UTF_8_english.c +1125 -0
  37. data/ext/STEMMER_stem_UTF_8_finnish.c +768 -0
  38. data/ext/STEMMER_stem_UTF_8_french.c +1256 -0
  39. data/ext/STEMMER_stem_UTF_8_german.c +509 -0
  40. data/ext/STEMMER_stem_UTF_8_hungarian.c +1234 -0
  41. data/ext/STEMMER_stem_UTF_8_italian.c +1073 -0
  42. data/ext/STEMMER_stem_UTF_8_norwegian.c +299 -0
  43. data/ext/STEMMER_stem_UTF_8_porter.c +755 -0
  44. data/ext/STEMMER_stem_UTF_8_portuguese.c +1023 -0
  45. data/ext/STEMMER_stem_UTF_8_romanian.c +1004 -0
  46. data/ext/STEMMER_stem_UTF_8_russian.c +694 -0
  47. data/ext/STEMMER_stem_UTF_8_spanish.c +1097 -0
  48. data/ext/STEMMER_stem_UTF_8_swedish.c +309 -0
  49. data/ext/STEMMER_stem_UTF_8_turkish.c +2205 -0
  50. data/ext/STEMMER_utilities.c +478 -0
  51. data/ext/analysis.c +1710 -0
  52. data/ext/analysis.h +266 -0
  53. data/ext/api.h +26 -0
  54. data/ext/array.c +125 -0
  55. data/ext/array.h +62 -0
  56. data/ext/bitvector.c +96 -0
  57. data/ext/bitvector.h +594 -0
  58. data/ext/bzlib.h +282 -0
  59. data/ext/bzlib_private.h +503 -0
  60. data/ext/compound_io.c +384 -0
  61. data/ext/config.h +52 -0
  62. data/ext/document.c +159 -0
  63. data/ext/document.h +63 -0
  64. data/ext/except.c +102 -0
  65. data/ext/except.h +176 -0
  66. data/ext/extconf.rb +15 -0
  67. data/ext/ferret.c +416 -0
  68. data/ext/ferret.h +94 -0
  69. data/ext/field_index.c +262 -0
  70. data/ext/field_index.h +52 -0
  71. data/ext/filter.c +157 -0
  72. data/ext/fs_store.c +493 -0
  73. data/ext/global.c +458 -0
  74. data/ext/global.h +302 -0
  75. data/ext/hash.c +524 -0
  76. data/ext/hash.h +515 -0
  77. data/ext/hashset.c +192 -0
  78. data/ext/hashset.h +215 -0
  79. data/ext/header.h +58 -0
  80. data/ext/helper.c +63 -0
  81. data/ext/helper.h +21 -0
  82. data/ext/index.c +6804 -0
  83. data/ext/index.h +935 -0
  84. data/ext/internal.h +1019 -0
  85. data/ext/lang.c +10 -0
  86. data/ext/lang.h +68 -0
  87. data/ext/libstemmer.h +79 -0
  88. data/ext/mempool.c +88 -0
  89. data/ext/mempool.h +43 -0
  90. data/ext/modules.h +190 -0
  91. data/ext/multimapper.c +351 -0
  92. data/ext/multimapper.h +60 -0
  93. data/ext/posh.c +1006 -0
  94. data/ext/posh.h +973 -0
  95. data/ext/priorityqueue.c +149 -0
  96. data/ext/priorityqueue.h +155 -0
  97. data/ext/q_boolean.c +1621 -0
  98. data/ext/q_const_score.c +162 -0
  99. data/ext/q_filtered_query.c +212 -0
  100. data/ext/q_fuzzy.c +280 -0
  101. data/ext/q_match_all.c +149 -0
  102. data/ext/q_multi_term.c +673 -0
  103. data/ext/q_parser.c +3103 -0
  104. data/ext/q_phrase.c +1206 -0
  105. data/ext/q_prefix.c +98 -0
  106. data/ext/q_range.c +682 -0
  107. data/ext/q_span.c +2390 -0
  108. data/ext/q_term.c +337 -0
  109. data/ext/q_wildcard.c +167 -0
  110. data/ext/r_analysis.c +2626 -0
  111. data/ext/r_index.c +3468 -0
  112. data/ext/r_qparser.c +635 -0
  113. data/ext/r_search.c +4490 -0
  114. data/ext/r_store.c +513 -0
  115. data/ext/r_utils.c +1131 -0
  116. data/ext/ram_store.c +476 -0
  117. data/ext/scanner.c +895 -0
  118. data/ext/scanner.h +36 -0
  119. data/ext/scanner_mb.c +6701 -0
  120. data/ext/scanner_utf8.c +4415 -0
  121. data/ext/search.c +1864 -0
  122. data/ext/search.h +953 -0
  123. data/ext/similarity.c +151 -0
  124. data/ext/similarity.h +89 -0
  125. data/ext/sort.c +786 -0
  126. data/ext/stem_ISO_8859_1_danish.h +16 -0
  127. data/ext/stem_ISO_8859_1_dutch.h +16 -0
  128. data/ext/stem_ISO_8859_1_english.h +16 -0
  129. data/ext/stem_ISO_8859_1_finnish.h +16 -0
  130. data/ext/stem_ISO_8859_1_french.h +16 -0
  131. data/ext/stem_ISO_8859_1_german.h +16 -0
  132. data/ext/stem_ISO_8859_1_hungarian.h +16 -0
  133. data/ext/stem_ISO_8859_1_italian.h +16 -0
  134. data/ext/stem_ISO_8859_1_norwegian.h +16 -0
  135. data/ext/stem_ISO_8859_1_porter.h +16 -0
  136. data/ext/stem_ISO_8859_1_portuguese.h +16 -0
  137. data/ext/stem_ISO_8859_1_spanish.h +16 -0
  138. data/ext/stem_ISO_8859_1_swedish.h +16 -0
  139. data/ext/stem_ISO_8859_2_romanian.h +16 -0
  140. data/ext/stem_KOI8_R_russian.h +16 -0
  141. data/ext/stem_UTF_8_danish.h +16 -0
  142. data/ext/stem_UTF_8_dutch.h +16 -0
  143. data/ext/stem_UTF_8_english.h +16 -0
  144. data/ext/stem_UTF_8_finnish.h +16 -0
  145. data/ext/stem_UTF_8_french.h +16 -0
  146. data/ext/stem_UTF_8_german.h +16 -0
  147. data/ext/stem_UTF_8_hungarian.h +16 -0
  148. data/ext/stem_UTF_8_italian.h +16 -0
  149. data/ext/stem_UTF_8_norwegian.h +16 -0
  150. data/ext/stem_UTF_8_porter.h +16 -0
  151. data/ext/stem_UTF_8_portuguese.h +16 -0
  152. data/ext/stem_UTF_8_romanian.h +16 -0
  153. data/ext/stem_UTF_8_russian.h +16 -0
  154. data/ext/stem_UTF_8_spanish.h +16 -0
  155. data/ext/stem_UTF_8_swedish.h +16 -0
  156. data/ext/stem_UTF_8_turkish.h +16 -0
  157. data/ext/stopwords.c +410 -0
  158. data/ext/store.c +698 -0
  159. data/ext/store.h +799 -0
  160. data/ext/symbol.c +10 -0
  161. data/ext/symbol.h +23 -0
  162. data/ext/term_vectors.c +73 -0
  163. data/ext/threading.h +31 -0
  164. data/ext/win32.h +62 -0
  165. data/lib/ferret.rb +30 -0
  166. data/lib/ferret/browser.rb +246 -0
  167. data/lib/ferret/browser/s/global.js +192 -0
  168. data/lib/ferret/browser/s/style.css +148 -0
  169. data/lib/ferret/browser/views/document/list.rhtml +49 -0
  170. data/lib/ferret/browser/views/document/show.rhtml +27 -0
  171. data/lib/ferret/browser/views/error/index.rhtml +7 -0
  172. data/lib/ferret/browser/views/help/index.rhtml +8 -0
  173. data/lib/ferret/browser/views/home/index.rhtml +29 -0
  174. data/lib/ferret/browser/views/layout.rhtml +22 -0
  175. data/lib/ferret/browser/views/term-vector/index.rhtml +4 -0
  176. data/lib/ferret/browser/views/term/index.rhtml +199 -0
  177. data/lib/ferret/browser/views/term/termdocs.rhtml +1 -0
  178. data/lib/ferret/browser/webrick.rb +14 -0
  179. data/lib/ferret/document.rb +130 -0
  180. data/lib/ferret/field_infos.rb +44 -0
  181. data/lib/ferret/field_symbol.rb +87 -0
  182. data/lib/ferret/index.rb +973 -0
  183. data/lib/ferret/number_tools.rb +157 -0
  184. data/lib/ferret/version.rb +3 -0
  185. data/setup.rb +1555 -0
  186. data/test/long_running/largefile/tc_largefile.rb +46 -0
  187. data/test/test_all.rb +5 -0
  188. data/test/test_helper.rb +29 -0
  189. data/test/test_installed.rb +1 -0
  190. data/test/threading/number_to_spoken.rb +132 -0
  191. data/test/threading/thread_safety_index_test.rb +88 -0
  192. data/test/threading/thread_safety_read_write_test.rb +73 -0
  193. data/test/threading/thread_safety_test.rb +133 -0
  194. data/test/unit/analysis/tc_analyzer.rb +550 -0
  195. data/test/unit/analysis/tc_token_stream.rb +653 -0
  196. data/test/unit/index/tc_index.rb +867 -0
  197. data/test/unit/index/tc_index_reader.rb +699 -0
  198. data/test/unit/index/tc_index_writer.rb +447 -0
  199. data/test/unit/index/th_doc.rb +332 -0
  200. data/test/unit/query_parser/tc_query_parser.rb +238 -0
  201. data/test/unit/search/tc_filter.rb +156 -0
  202. data/test/unit/search/tc_fuzzy_query.rb +147 -0
  203. data/test/unit/search/tc_index_searcher.rb +67 -0
  204. data/test/unit/search/tc_multi_searcher.rb +128 -0
  205. data/test/unit/search/tc_multiple_search_requests.rb +58 -0
  206. data/test/unit/search/tc_search_and_sort.rb +179 -0
  207. data/test/unit/search/tc_sort.rb +49 -0
  208. data/test/unit/search/tc_sort_field.rb +27 -0
  209. data/test/unit/search/tc_spans.rb +190 -0
  210. data/test/unit/search/tm_searcher.rb +436 -0
  211. data/test/unit/store/tc_fs_store.rb +115 -0
  212. data/test/unit/store/tc_ram_store.rb +35 -0
  213. data/test/unit/store/tm_store.rb +34 -0
  214. data/test/unit/store/tm_store_lock.rb +68 -0
  215. data/test/unit/tc_document.rb +81 -0
  216. data/test/unit/tc_field_symbol.rb +26 -0
  217. data/test/unit/ts_analysis.rb +2 -0
  218. data/test/unit/ts_index.rb +2 -0
  219. data/test/unit/ts_largefile.rb +4 -0
  220. data/test/unit/ts_query_parser.rb +2 -0
  221. data/test/unit/ts_search.rb +2 -0
  222. data/test/unit/ts_store.rb +2 -0
  223. data/test/unit/ts_utils.rb +2 -0
  224. data/test/unit/utils/tc_bit_vector.rb +295 -0
  225. data/test/unit/utils/tc_number_tools.rb +117 -0
  226. data/test/unit/utils/tc_priority_queue.rb +106 -0
  227. data/test/utils/content_generator.rb +226 -0
  228. metadata +319 -0
@@ -0,0 +1,509 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+ extern int german_UTF_8_stem(struct SN_env * z);
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ static int r_standard_suffix(struct SN_env * z);
14
+ static int r_R2(struct SN_env * z);
15
+ static int r_R1(struct SN_env * z);
16
+ static int r_mark_regions(struct SN_env * z);
17
+ static int r_postlude(struct SN_env * z);
18
+ static int r_prelude(struct SN_env * z);
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+
24
+ extern struct SN_env * german_UTF_8_create_env(void);
25
+ extern void german_UTF_8_close_env(struct SN_env * z);
26
+
27
+
28
+ #ifdef __cplusplus
29
+ }
30
+ #endif
31
+ static const symbol s_0_1[1] = { 'U' };
32
+ static const symbol s_0_2[1] = { 'Y' };
33
+ static const symbol s_0_3[2] = { 0xC3, 0xA4 };
34
+ static const symbol s_0_4[2] = { 0xC3, 0xB6 };
35
+ static const symbol s_0_5[2] = { 0xC3, 0xBC };
36
+
37
+ static const struct among a_0[6] =
38
+ {
39
+ /* 0 */ { 0, 0, -1, 6, 0},
40
+ /* 1 */ { 1, s_0_1, 0, 2, 0},
41
+ /* 2 */ { 1, s_0_2, 0, 1, 0},
42
+ /* 3 */ { 2, s_0_3, 0, 3, 0},
43
+ /* 4 */ { 2, s_0_4, 0, 4, 0},
44
+ /* 5 */ { 2, s_0_5, 0, 5, 0}
45
+ };
46
+
47
+ static const symbol s_1_0[1] = { 'e' };
48
+ static const symbol s_1_1[2] = { 'e', 'm' };
49
+ static const symbol s_1_2[2] = { 'e', 'n' };
50
+ static const symbol s_1_3[3] = { 'e', 'r', 'n' };
51
+ static const symbol s_1_4[2] = { 'e', 'r' };
52
+ static const symbol s_1_5[1] = { 's' };
53
+ static const symbol s_1_6[2] = { 'e', 's' };
54
+
55
+ static const struct among a_1[7] =
56
+ {
57
+ /* 0 */ { 1, s_1_0, -1, 1, 0},
58
+ /* 1 */ { 2, s_1_1, -1, 1, 0},
59
+ /* 2 */ { 2, s_1_2, -1, 1, 0},
60
+ /* 3 */ { 3, s_1_3, -1, 1, 0},
61
+ /* 4 */ { 2, s_1_4, -1, 1, 0},
62
+ /* 5 */ { 1, s_1_5, -1, 2, 0},
63
+ /* 6 */ { 2, s_1_6, 5, 1, 0}
64
+ };
65
+
66
+ static const symbol s_2_0[2] = { 'e', 'n' };
67
+ static const symbol s_2_1[2] = { 'e', 'r' };
68
+ static const symbol s_2_2[2] = { 's', 't' };
69
+ static const symbol s_2_3[3] = { 'e', 's', 't' };
70
+
71
+ static const struct among a_2[4] =
72
+ {
73
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
74
+ /* 1 */ { 2, s_2_1, -1, 1, 0},
75
+ /* 2 */ { 2, s_2_2, -1, 2, 0},
76
+ /* 3 */ { 3, s_2_3, 2, 1, 0}
77
+ };
78
+
79
+ static const symbol s_3_0[2] = { 'i', 'g' };
80
+ static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
81
+
82
+ static const struct among a_3[2] =
83
+ {
84
+ /* 0 */ { 2, s_3_0, -1, 1, 0},
85
+ /* 1 */ { 4, s_3_1, -1, 1, 0}
86
+ };
87
+
88
+ static const symbol s_4_0[3] = { 'e', 'n', 'd' };
89
+ static const symbol s_4_1[2] = { 'i', 'g' };
90
+ static const symbol s_4_2[3] = { 'u', 'n', 'g' };
91
+ static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
92
+ static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
93
+ static const symbol s_4_5[2] = { 'i', 'k' };
94
+ static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
95
+ static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
96
+
97
+ static const struct among a_4[8] =
98
+ {
99
+ /* 0 */ { 3, s_4_0, -1, 1, 0},
100
+ /* 1 */ { 2, s_4_1, -1, 2, 0},
101
+ /* 2 */ { 3, s_4_2, -1, 1, 0},
102
+ /* 3 */ { 4, s_4_3, -1, 3, 0},
103
+ /* 4 */ { 4, s_4_4, -1, 2, 0},
104
+ /* 5 */ { 2, s_4_5, -1, 2, 0},
105
+ /* 6 */ { 4, s_4_6, -1, 3, 0},
106
+ /* 7 */ { 4, s_4_7, -1, 4, 0}
107
+ };
108
+
109
+ static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
110
+
111
+ static const unsigned char g_s_ending[] = { 117, 30, 5 };
112
+
113
+ static const unsigned char g_st_ending[] = { 117, 30, 4 };
114
+
115
+ static const symbol s_0[] = { 0xC3, 0x9F };
116
+ static const symbol s_1[] = { 's', 's' };
117
+ static const symbol s_2[] = { 'u' };
118
+ static const symbol s_3[] = { 'U' };
119
+ static const symbol s_4[] = { 'y' };
120
+ static const symbol s_5[] = { 'Y' };
121
+ static const symbol s_6[] = { 'y' };
122
+ static const symbol s_7[] = { 'u' };
123
+ static const symbol s_8[] = { 'a' };
124
+ static const symbol s_9[] = { 'o' };
125
+ static const symbol s_10[] = { 'u' };
126
+ static const symbol s_11[] = { 'i', 'g' };
127
+ static const symbol s_12[] = { 'e' };
128
+ static const symbol s_13[] = { 'e' };
129
+ static const symbol s_14[] = { 'e', 'r' };
130
+ static const symbol s_15[] = { 'e', 'n' };
131
+
132
+ static int r_prelude(struct SN_env * z) {
133
+ { int c_test = z->c; /* test, line 30 */
134
+ while(1) { /* repeat, line 30 */
135
+ int c1 = z->c;
136
+ { int c2 = z->c; /* or, line 33 */
137
+ z->bra = z->c; /* [, line 32 */
138
+ if (!(eq_s(z, 2, s_0))) goto lab2;
139
+ z->ket = z->c; /* ], line 32 */
140
+ { int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
141
+ if (ret < 0) return ret;
142
+ }
143
+ goto lab1;
144
+ lab2:
145
+ z->c = c2;
146
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
147
+ if (ret < 0) goto lab0;
148
+ z->c = ret; /* next, line 33 */
149
+ }
150
+ }
151
+ lab1:
152
+ continue;
153
+ lab0:
154
+ z->c = c1;
155
+ break;
156
+ }
157
+ z->c = c_test;
158
+ }
159
+ while(1) { /* repeat, line 36 */
160
+ int c3 = z->c;
161
+ while(1) { /* goto, line 36 */
162
+ int c4 = z->c;
163
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
164
+ z->bra = z->c; /* [, line 37 */
165
+ { int c5 = z->c; /* or, line 37 */
166
+ if (!(eq_s(z, 1, s_2))) goto lab6;
167
+ z->ket = z->c; /* ], line 37 */
168
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
169
+ { int ret = slice_from_s(z, 1, s_3); /* <-, line 37 */
170
+ if (ret < 0) return ret;
171
+ }
172
+ goto lab5;
173
+ lab6:
174
+ z->c = c5;
175
+ if (!(eq_s(z, 1, s_4))) goto lab4;
176
+ z->ket = z->c; /* ], line 38 */
177
+ if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
178
+ { int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
179
+ if (ret < 0) return ret;
180
+ }
181
+ }
182
+ lab5:
183
+ z->c = c4;
184
+ break;
185
+ lab4:
186
+ z->c = c4;
187
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
188
+ if (ret < 0) goto lab3;
189
+ z->c = ret; /* goto, line 36 */
190
+ }
191
+ }
192
+ continue;
193
+ lab3:
194
+ z->c = c3;
195
+ break;
196
+ }
197
+ return 1;
198
+ }
199
+
200
+ static int r_mark_regions(struct SN_env * z) {
201
+ z->I[0] = z->l;
202
+ z->I[1] = z->l;
203
+ { int c_test = z->c; /* test, line 47 */
204
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
205
+ if (ret < 0) return 0;
206
+ z->c = ret; /* hop, line 47 */
207
+ }
208
+ z->I[2] = z->c; /* setmark x, line 47 */
209
+ z->c = c_test;
210
+ }
211
+ { /* gopast */ /* grouping v, line 49 */
212
+ int ret = out_grouping_U(z, g_v, 97, 252, 1);
213
+ if (ret < 0) return 0;
214
+ z->c += ret;
215
+ }
216
+ { /* gopast */ /* non v, line 49 */
217
+ int ret = in_grouping_U(z, g_v, 97, 252, 1);
218
+ if (ret < 0) return 0;
219
+ z->c += ret;
220
+ }
221
+ z->I[0] = z->c; /* setmark p1, line 49 */
222
+ /* try, line 50 */
223
+ if (!(z->I[0] < z->I[2])) goto lab0;
224
+ z->I[0] = z->I[2];
225
+ lab0:
226
+ { /* gopast */ /* grouping v, line 51 */
227
+ int ret = out_grouping_U(z, g_v, 97, 252, 1);
228
+ if (ret < 0) return 0;
229
+ z->c += ret;
230
+ }
231
+ { /* gopast */ /* non v, line 51 */
232
+ int ret = in_grouping_U(z, g_v, 97, 252, 1);
233
+ if (ret < 0) return 0;
234
+ z->c += ret;
235
+ }
236
+ z->I[1] = z->c; /* setmark p2, line 51 */
237
+ return 1;
238
+ }
239
+
240
+ static int r_postlude(struct SN_env * z) {
241
+ int among_var;
242
+ while(1) { /* repeat, line 55 */
243
+ int c1 = z->c;
244
+ z->bra = z->c; /* [, line 57 */
245
+ among_var = find_among(z, a_0, 6); /* substring, line 57 */
246
+ if (!(among_var)) goto lab0;
247
+ z->ket = z->c; /* ], line 57 */
248
+ switch(among_var) {
249
+ case 0: goto lab0;
250
+ case 1:
251
+ { int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
252
+ if (ret < 0) return ret;
253
+ }
254
+ break;
255
+ case 2:
256
+ { int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
257
+ if (ret < 0) return ret;
258
+ }
259
+ break;
260
+ case 3:
261
+ { int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
262
+ if (ret < 0) return ret;
263
+ }
264
+ break;
265
+ case 4:
266
+ { int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
267
+ if (ret < 0) return ret;
268
+ }
269
+ break;
270
+ case 5:
271
+ { int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
272
+ if (ret < 0) return ret;
273
+ }
274
+ break;
275
+ case 6:
276
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
277
+ if (ret < 0) goto lab0;
278
+ z->c = ret; /* next, line 63 */
279
+ }
280
+ break;
281
+ }
282
+ continue;
283
+ lab0:
284
+ z->c = c1;
285
+ break;
286
+ }
287
+ return 1;
288
+ }
289
+
290
+ static int r_R1(struct SN_env * z) {
291
+ if (!(z->I[0] <= z->c)) return 0;
292
+ return 1;
293
+ }
294
+
295
+ static int r_R2(struct SN_env * z) {
296
+ if (!(z->I[1] <= z->c)) return 0;
297
+ return 1;
298
+ }
299
+
300
+ static int r_standard_suffix(struct SN_env * z) {
301
+ int among_var;
302
+ { int m1 = z->l - z->c; (void)m1; /* do, line 74 */
303
+ z->ket = z->c; /* [, line 75 */
304
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
305
+ among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
306
+ if (!(among_var)) goto lab0;
307
+ z->bra = z->c; /* ], line 75 */
308
+ { int ret = r_R1(z);
309
+ if (ret == 0) goto lab0; /* call R1, line 75 */
310
+ if (ret < 0) return ret;
311
+ }
312
+ switch(among_var) {
313
+ case 0: goto lab0;
314
+ case 1:
315
+ { int ret = slice_del(z); /* delete, line 77 */
316
+ if (ret < 0) return ret;
317
+ }
318
+ break;
319
+ case 2:
320
+ if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
321
+ { int ret = slice_del(z); /* delete, line 80 */
322
+ if (ret < 0) return ret;
323
+ }
324
+ break;
325
+ }
326
+ lab0:
327
+ z->c = z->l - m1;
328
+ }
329
+ { int m2 = z->l - z->c; (void)m2; /* do, line 84 */
330
+ z->ket = z->c; /* [, line 85 */
331
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
332
+ among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
333
+ if (!(among_var)) goto lab1;
334
+ z->bra = z->c; /* ], line 85 */
335
+ { int ret = r_R1(z);
336
+ if (ret == 0) goto lab1; /* call R1, line 85 */
337
+ if (ret < 0) return ret;
338
+ }
339
+ switch(among_var) {
340
+ case 0: goto lab1;
341
+ case 1:
342
+ { int ret = slice_del(z); /* delete, line 87 */
343
+ if (ret < 0) return ret;
344
+ }
345
+ break;
346
+ case 2:
347
+ if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab1;
348
+ { int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
349
+ if (ret < 0) goto lab1;
350
+ z->c = ret; /* hop, line 90 */
351
+ }
352
+ { int ret = slice_del(z); /* delete, line 90 */
353
+ if (ret < 0) return ret;
354
+ }
355
+ break;
356
+ }
357
+ lab1:
358
+ z->c = z->l - m2;
359
+ }
360
+ { int m3 = z->l - z->c; (void)m3; /* do, line 94 */
361
+ z->ket = z->c; /* [, line 95 */
362
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
363
+ among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
364
+ if (!(among_var)) goto lab2;
365
+ z->bra = z->c; /* ], line 95 */
366
+ { int ret = r_R2(z);
367
+ if (ret == 0) goto lab2; /* call R2, line 95 */
368
+ if (ret < 0) return ret;
369
+ }
370
+ switch(among_var) {
371
+ case 0: goto lab2;
372
+ case 1:
373
+ { int ret = slice_del(z); /* delete, line 97 */
374
+ if (ret < 0) return ret;
375
+ }
376
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
377
+ z->ket = z->c; /* [, line 98 */
378
+ if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
379
+ z->bra = z->c; /* ], line 98 */
380
+ { int m4 = z->l - z->c; (void)m4; /* not, line 98 */
381
+ if (!(eq_s_b(z, 1, s_12))) goto lab4;
382
+ { z->c = z->l - m_keep; goto lab3; }
383
+ lab4:
384
+ z->c = z->l - m4;
385
+ }
386
+ { int ret = r_R2(z);
387
+ if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */
388
+ if (ret < 0) return ret;
389
+ }
390
+ { int ret = slice_del(z); /* delete, line 98 */
391
+ if (ret < 0) return ret;
392
+ }
393
+ lab3:
394
+ ;
395
+ }
396
+ break;
397
+ case 2:
398
+ { int m5 = z->l - z->c; (void)m5; /* not, line 101 */
399
+ if (!(eq_s_b(z, 1, s_13))) goto lab5;
400
+ goto lab2;
401
+ lab5:
402
+ z->c = z->l - m5;
403
+ }
404
+ { int ret = slice_del(z); /* delete, line 101 */
405
+ if (ret < 0) return ret;
406
+ }
407
+ break;
408
+ case 3:
409
+ { int ret = slice_del(z); /* delete, line 104 */
410
+ if (ret < 0) return ret;
411
+ }
412
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
413
+ z->ket = z->c; /* [, line 106 */
414
+ { int m6 = z->l - z->c; (void)m6; /* or, line 106 */
415
+ if (!(eq_s_b(z, 2, s_14))) goto lab8;
416
+ goto lab7;
417
+ lab8:
418
+ z->c = z->l - m6;
419
+ if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
420
+ }
421
+ lab7:
422
+ z->bra = z->c; /* ], line 106 */
423
+ { int ret = r_R1(z);
424
+ if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
425
+ if (ret < 0) return ret;
426
+ }
427
+ { int ret = slice_del(z); /* delete, line 106 */
428
+ if (ret < 0) return ret;
429
+ }
430
+ lab6:
431
+ ;
432
+ }
433
+ break;
434
+ case 4:
435
+ { int ret = slice_del(z); /* delete, line 110 */
436
+ if (ret < 0) return ret;
437
+ }
438
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
439
+ z->ket = z->c; /* [, line 112 */
440
+ if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab9; }
441
+ among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
442
+ if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
443
+ z->bra = z->c; /* ], line 112 */
444
+ { int ret = r_R2(z);
445
+ if (ret == 0) { z->c = z->l - m_keep; goto lab9; } /* call R2, line 112 */
446
+ if (ret < 0) return ret;
447
+ }
448
+ switch(among_var) {
449
+ case 0: { z->c = z->l - m_keep; goto lab9; }
450
+ case 1:
451
+ { int ret = slice_del(z); /* delete, line 114 */
452
+ if (ret < 0) return ret;
453
+ }
454
+ break;
455
+ }
456
+ lab9:
457
+ ;
458
+ }
459
+ break;
460
+ }
461
+ lab2:
462
+ z->c = z->l - m3;
463
+ }
464
+ return 1;
465
+ }
466
+
467
+ extern int german_UTF_8_stem(struct SN_env * z) {
468
+ { int c1 = z->c; /* do, line 125 */
469
+ { int ret = r_prelude(z);
470
+ if (ret == 0) goto lab0; /* call prelude, line 125 */
471
+ if (ret < 0) return ret;
472
+ }
473
+ lab0:
474
+ z->c = c1;
475
+ }
476
+ { int c2 = z->c; /* do, line 126 */
477
+ { int ret = r_mark_regions(z);
478
+ if (ret == 0) goto lab1; /* call mark_regions, line 126 */
479
+ if (ret < 0) return ret;
480
+ }
481
+ lab1:
482
+ z->c = c2;
483
+ }
484
+ z->lb = z->c; z->c = z->l; /* backwards, line 127 */
485
+
486
+ { int m3 = z->l - z->c; (void)m3; /* do, line 128 */
487
+ { int ret = r_standard_suffix(z);
488
+ if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
489
+ if (ret < 0) return ret;
490
+ }
491
+ lab2:
492
+ z->c = z->l - m3;
493
+ }
494
+ z->c = z->lb;
495
+ { int c4 = z->c; /* do, line 129 */
496
+ { int ret = r_postlude(z);
497
+ if (ret == 0) goto lab3; /* call postlude, line 129 */
498
+ if (ret < 0) return ret;
499
+ }
500
+ lab3:
501
+ z->c = c4;
502
+ }
503
+ return 1;
504
+ }
505
+
506
+ extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
507
+
508
+ extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
509
+