sdsykes-ferret 0.11.6.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. data/CHANGELOG +24 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README +102 -0
  4. data/Rakefile +338 -0
  5. data/TODO +17 -0
  6. data/TUTORIAL +231 -0
  7. data/bin/ferret-browser +79 -0
  8. data/ext/analysis.c +1555 -0
  9. data/ext/analysis.h +219 -0
  10. data/ext/api.c +69 -0
  11. data/ext/api.h +27 -0
  12. data/ext/array.c +123 -0
  13. data/ext/array.h +53 -0
  14. data/ext/bitvector.c +540 -0
  15. data/ext/bitvector.h +272 -0
  16. data/ext/compound_io.c +383 -0
  17. data/ext/config.h +42 -0
  18. data/ext/document.c +156 -0
  19. data/ext/document.h +53 -0
  20. data/ext/except.c +120 -0
  21. data/ext/except.h +168 -0
  22. data/ext/extconf.rb +14 -0
  23. data/ext/ferret.c +402 -0
  24. data/ext/ferret.h +91 -0
  25. data/ext/filter.c +156 -0
  26. data/ext/fs_store.c +483 -0
  27. data/ext/global.c +418 -0
  28. data/ext/global.h +117 -0
  29. data/ext/hash.c +567 -0
  30. data/ext/hash.h +473 -0
  31. data/ext/hashset.c +170 -0
  32. data/ext/hashset.h +187 -0
  33. data/ext/header.h +58 -0
  34. data/ext/helper.c +62 -0
  35. data/ext/helper.h +13 -0
  36. data/ext/inc/lang.h +48 -0
  37. data/ext/inc/threading.h +31 -0
  38. data/ext/index.c +6425 -0
  39. data/ext/index.h +961 -0
  40. data/ext/lang.h +66 -0
  41. data/ext/libstemmer.c +92 -0
  42. data/ext/libstemmer.h +79 -0
  43. data/ext/mempool.c +87 -0
  44. data/ext/mempool.h +35 -0
  45. data/ext/modules.h +162 -0
  46. data/ext/multimapper.c +310 -0
  47. data/ext/multimapper.h +51 -0
  48. data/ext/posh.c +1006 -0
  49. data/ext/posh.h +1007 -0
  50. data/ext/priorityqueue.c +151 -0
  51. data/ext/priorityqueue.h +143 -0
  52. data/ext/q_boolean.c +1608 -0
  53. data/ext/q_const_score.c +161 -0
  54. data/ext/q_filtered_query.c +209 -0
  55. data/ext/q_fuzzy.c +268 -0
  56. data/ext/q_match_all.c +148 -0
  57. data/ext/q_multi_term.c +677 -0
  58. data/ext/q_parser.c +2825 -0
  59. data/ext/q_phrase.c +1126 -0
  60. data/ext/q_prefix.c +100 -0
  61. data/ext/q_range.c +350 -0
  62. data/ext/q_span.c +2402 -0
  63. data/ext/q_term.c +337 -0
  64. data/ext/q_wildcard.c +171 -0
  65. data/ext/r_analysis.c +2575 -0
  66. data/ext/r_index.c +3472 -0
  67. data/ext/r_qparser.c +585 -0
  68. data/ext/r_search.c +4105 -0
  69. data/ext/r_store.c +513 -0
  70. data/ext/r_utils.c +963 -0
  71. data/ext/ram_store.c +471 -0
  72. data/ext/search.c +1741 -0
  73. data/ext/search.h +885 -0
  74. data/ext/similarity.c +150 -0
  75. data/ext/similarity.h +82 -0
  76. data/ext/sort.c +983 -0
  77. data/ext/stem_ISO_8859_1_danish.c +338 -0
  78. data/ext/stem_ISO_8859_1_danish.h +16 -0
  79. data/ext/stem_ISO_8859_1_dutch.c +635 -0
  80. data/ext/stem_ISO_8859_1_dutch.h +16 -0
  81. data/ext/stem_ISO_8859_1_english.c +1156 -0
  82. data/ext/stem_ISO_8859_1_english.h +16 -0
  83. data/ext/stem_ISO_8859_1_finnish.c +792 -0
  84. data/ext/stem_ISO_8859_1_finnish.h +16 -0
  85. data/ext/stem_ISO_8859_1_french.c +1276 -0
  86. data/ext/stem_ISO_8859_1_french.h +16 -0
  87. data/ext/stem_ISO_8859_1_german.c +512 -0
  88. data/ext/stem_ISO_8859_1_german.h +16 -0
  89. data/ext/stem_ISO_8859_1_italian.c +1091 -0
  90. data/ext/stem_ISO_8859_1_italian.h +16 -0
  91. data/ext/stem_ISO_8859_1_norwegian.c +296 -0
  92. data/ext/stem_ISO_8859_1_norwegian.h +16 -0
  93. data/ext/stem_ISO_8859_1_porter.c +776 -0
  94. data/ext/stem_ISO_8859_1_porter.h +16 -0
  95. data/ext/stem_ISO_8859_1_portuguese.c +1035 -0
  96. data/ext/stem_ISO_8859_1_portuguese.h +16 -0
  97. data/ext/stem_ISO_8859_1_spanish.c +1119 -0
  98. data/ext/stem_ISO_8859_1_spanish.h +16 -0
  99. data/ext/stem_ISO_8859_1_swedish.c +307 -0
  100. data/ext/stem_ISO_8859_1_swedish.h +16 -0
  101. data/ext/stem_KOI8_R_russian.c +701 -0
  102. data/ext/stem_KOI8_R_russian.h +16 -0
  103. data/ext/stem_UTF_8_danish.c +344 -0
  104. data/ext/stem_UTF_8_danish.h +16 -0
  105. data/ext/stem_UTF_8_dutch.c +653 -0
  106. data/ext/stem_UTF_8_dutch.h +16 -0
  107. data/ext/stem_UTF_8_english.c +1176 -0
  108. data/ext/stem_UTF_8_english.h +16 -0
  109. data/ext/stem_UTF_8_finnish.c +808 -0
  110. data/ext/stem_UTF_8_finnish.h +16 -0
  111. data/ext/stem_UTF_8_french.c +1296 -0
  112. data/ext/stem_UTF_8_french.h +16 -0
  113. data/ext/stem_UTF_8_german.c +526 -0
  114. data/ext/stem_UTF_8_german.h +16 -0
  115. data/ext/stem_UTF_8_italian.c +1113 -0
  116. data/ext/stem_UTF_8_italian.h +16 -0
  117. data/ext/stem_UTF_8_norwegian.c +302 -0
  118. data/ext/stem_UTF_8_norwegian.h +16 -0
  119. data/ext/stem_UTF_8_porter.c +794 -0
  120. data/ext/stem_UTF_8_porter.h +16 -0
  121. data/ext/stem_UTF_8_portuguese.c +1055 -0
  122. data/ext/stem_UTF_8_portuguese.h +16 -0
  123. data/ext/stem_UTF_8_russian.c +709 -0
  124. data/ext/stem_UTF_8_russian.h +16 -0
  125. data/ext/stem_UTF_8_spanish.c +1137 -0
  126. data/ext/stem_UTF_8_spanish.h +16 -0
  127. data/ext/stem_UTF_8_swedish.c +313 -0
  128. data/ext/stem_UTF_8_swedish.h +16 -0
  129. data/ext/stopwords.c +401 -0
  130. data/ext/store.c +692 -0
  131. data/ext/store.h +777 -0
  132. data/ext/term_vectors.c +352 -0
  133. data/ext/threading.h +31 -0
  134. data/ext/utilities.c +446 -0
  135. data/ext/win32.h +54 -0
  136. data/lib/ferret.rb +29 -0
  137. data/lib/ferret/browser.rb +246 -0
  138. data/lib/ferret/browser/s/global.js +192 -0
  139. data/lib/ferret/browser/s/style.css +148 -0
  140. data/lib/ferret/browser/views/document/list.rhtml +49 -0
  141. data/lib/ferret/browser/views/document/show.rhtml +27 -0
  142. data/lib/ferret/browser/views/error/index.rhtml +7 -0
  143. data/lib/ferret/browser/views/help/index.rhtml +8 -0
  144. data/lib/ferret/browser/views/home/index.rhtml +29 -0
  145. data/lib/ferret/browser/views/layout.rhtml +22 -0
  146. data/lib/ferret/browser/views/term-vector/index.rhtml +4 -0
  147. data/lib/ferret/browser/views/term/index.rhtml +199 -0
  148. data/lib/ferret/browser/views/term/termdocs.rhtml +1 -0
  149. data/lib/ferret/browser/webrick.rb +14 -0
  150. data/lib/ferret/document.rb +130 -0
  151. data/lib/ferret/field_infos.rb +44 -0
  152. data/lib/ferret/index.rb +786 -0
  153. data/lib/ferret/number_tools.rb +157 -0
  154. data/lib/ferret_version.rb +3 -0
  155. data/setup.rb +1555 -0
  156. data/test/test_all.rb +5 -0
  157. data/test/test_helper.rb +24 -0
  158. data/test/threading/number_to_spoken.rb +132 -0
  159. data/test/threading/thread_safety_index_test.rb +79 -0
  160. data/test/threading/thread_safety_read_write_test.rb +76 -0
  161. data/test/threading/thread_safety_test.rb +133 -0
  162. data/test/unit/analysis/tc_analyzer.rb +548 -0
  163. data/test/unit/analysis/tc_token_stream.rb +646 -0
  164. data/test/unit/index/tc_index.rb +762 -0
  165. data/test/unit/index/tc_index_reader.rb +699 -0
  166. data/test/unit/index/tc_index_writer.rb +437 -0
  167. data/test/unit/index/th_doc.rb +315 -0
  168. data/test/unit/largefile/tc_largefile.rb +46 -0
  169. data/test/unit/query_parser/tc_query_parser.rb +238 -0
  170. data/test/unit/search/tc_filter.rb +135 -0
  171. data/test/unit/search/tc_fuzzy_query.rb +147 -0
  172. data/test/unit/search/tc_index_searcher.rb +61 -0
  173. data/test/unit/search/tc_multi_searcher.rb +128 -0
  174. data/test/unit/search/tc_multiple_search_requests.rb +58 -0
  175. data/test/unit/search/tc_search_and_sort.rb +179 -0
  176. data/test/unit/search/tc_sort.rb +49 -0
  177. data/test/unit/search/tc_sort_field.rb +27 -0
  178. data/test/unit/search/tc_spans.rb +190 -0
  179. data/test/unit/search/tm_searcher.rb +384 -0
  180. data/test/unit/store/tc_fs_store.rb +77 -0
  181. data/test/unit/store/tc_ram_store.rb +35 -0
  182. data/test/unit/store/tm_store.rb +34 -0
  183. data/test/unit/store/tm_store_lock.rb +68 -0
  184. data/test/unit/tc_document.rb +81 -0
  185. data/test/unit/ts_analysis.rb +2 -0
  186. data/test/unit/ts_index.rb +2 -0
  187. data/test/unit/ts_largefile.rb +4 -0
  188. data/test/unit/ts_query_parser.rb +2 -0
  189. data/test/unit/ts_search.rb +2 -0
  190. data/test/unit/ts_store.rb +2 -0
  191. data/test/unit/ts_utils.rb +2 -0
  192. data/test/unit/utils/tc_bit_vector.rb +295 -0
  193. data/test/unit/utils/tc_number_tools.rb +117 -0
  194. data/test/unit/utils/tc_priority_queue.rb +106 -0
  195. metadata +285 -0
@@ -0,0 +1,16 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ extern struct SN_env * russian_KOI8_R_create_env(void);
9
+ extern void russian_KOI8_R_close_env(struct SN_env * z);
10
+
11
+ extern int russian_KOI8_R_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,344 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int danish_UTF_8_stem(struct SN_env * z);
7
+ static int r_undouble(struct SN_env * z);
8
+ static int r_other_suffix(struct SN_env * z);
9
+ static int r_consonant_pair(struct SN_env * z);
10
+ static int r_main_suffix(struct SN_env * z);
11
+ static int r_mark_regions(struct SN_env * z);
12
+
13
+ extern struct SN_env * danish_UTF_8_create_env(void);
14
+ extern void danish_UTF_8_close_env(struct SN_env * z);
15
+
16
+ static symbol s_0_0[3] = { 'h', 'e', 'd' };
17
+ static symbol s_0_1[5] = { 'e', 't', 'h', 'e', 'd' };
18
+ static symbol s_0_2[4] = { 'e', 'r', 'e', 'd' };
19
+ static symbol s_0_3[1] = { 'e' };
20
+ static symbol s_0_4[5] = { 'e', 'r', 'e', 'd', 'e' };
21
+ static symbol s_0_5[4] = { 'e', 'n', 'd', 'e' };
22
+ static symbol s_0_6[6] = { 'e', 'r', 'e', 'n', 'd', 'e' };
23
+ static symbol s_0_7[3] = { 'e', 'n', 'e' };
24
+ static symbol s_0_8[4] = { 'e', 'r', 'n', 'e' };
25
+ static symbol s_0_9[3] = { 'e', 'r', 'e' };
26
+ static symbol s_0_10[2] = { 'e', 'n' };
27
+ static symbol s_0_11[5] = { 'h', 'e', 'd', 'e', 'n' };
28
+ static symbol s_0_12[4] = { 'e', 'r', 'e', 'n' };
29
+ static symbol s_0_13[2] = { 'e', 'r' };
30
+ static symbol s_0_14[5] = { 'h', 'e', 'd', 'e', 'r' };
31
+ static symbol s_0_15[4] = { 'e', 'r', 'e', 'r' };
32
+ static symbol s_0_16[1] = { 's' };
33
+ static symbol s_0_17[4] = { 'h', 'e', 'd', 's' };
34
+ static symbol s_0_18[2] = { 'e', 's' };
35
+ static symbol s_0_19[5] = { 'e', 'n', 'd', 'e', 's' };
36
+ static symbol s_0_20[7] = { 'e', 'r', 'e', 'n', 'd', 'e', 's' };
37
+ static symbol s_0_21[4] = { 'e', 'n', 'e', 's' };
38
+ static symbol s_0_22[5] = { 'e', 'r', 'n', 'e', 's' };
39
+ static symbol s_0_23[4] = { 'e', 'r', 'e', 's' };
40
+ static symbol s_0_24[3] = { 'e', 'n', 's' };
41
+ static symbol s_0_25[6] = { 'h', 'e', 'd', 'e', 'n', 's' };
42
+ static symbol s_0_26[5] = { 'e', 'r', 'e', 'n', 's' };
43
+ static symbol s_0_27[3] = { 'e', 'r', 's' };
44
+ static symbol s_0_28[3] = { 'e', 't', 's' };
45
+ static symbol s_0_29[5] = { 'e', 'r', 'e', 't', 's' };
46
+ static symbol s_0_30[2] = { 'e', 't' };
47
+ static symbol s_0_31[4] = { 'e', 'r', 'e', 't' };
48
+
49
+ static struct among a_0[32] =
50
+ {
51
+ /* 0 */ { 3, s_0_0, -1, 1, 0},
52
+ /* 1 */ { 5, s_0_1, 0, 1, 0},
53
+ /* 2 */ { 4, s_0_2, -1, 1, 0},
54
+ /* 3 */ { 1, s_0_3, -1, 1, 0},
55
+ /* 4 */ { 5, s_0_4, 3, 1, 0},
56
+ /* 5 */ { 4, s_0_5, 3, 1, 0},
57
+ /* 6 */ { 6, s_0_6, 5, 1, 0},
58
+ /* 7 */ { 3, s_0_7, 3, 1, 0},
59
+ /* 8 */ { 4, s_0_8, 3, 1, 0},
60
+ /* 9 */ { 3, s_0_9, 3, 1, 0},
61
+ /* 10 */ { 2, s_0_10, -1, 1, 0},
62
+ /* 11 */ { 5, s_0_11, 10, 1, 0},
63
+ /* 12 */ { 4, s_0_12, 10, 1, 0},
64
+ /* 13 */ { 2, s_0_13, -1, 1, 0},
65
+ /* 14 */ { 5, s_0_14, 13, 1, 0},
66
+ /* 15 */ { 4, s_0_15, 13, 1, 0},
67
+ /* 16 */ { 1, s_0_16, -1, 2, 0},
68
+ /* 17 */ { 4, s_0_17, 16, 1, 0},
69
+ /* 18 */ { 2, s_0_18, 16, 1, 0},
70
+ /* 19 */ { 5, s_0_19, 18, 1, 0},
71
+ /* 20 */ { 7, s_0_20, 19, 1, 0},
72
+ /* 21 */ { 4, s_0_21, 18, 1, 0},
73
+ /* 22 */ { 5, s_0_22, 18, 1, 0},
74
+ /* 23 */ { 4, s_0_23, 18, 1, 0},
75
+ /* 24 */ { 3, s_0_24, 16, 1, 0},
76
+ /* 25 */ { 6, s_0_25, 24, 1, 0},
77
+ /* 26 */ { 5, s_0_26, 24, 1, 0},
78
+ /* 27 */ { 3, s_0_27, 16, 1, 0},
79
+ /* 28 */ { 3, s_0_28, 16, 1, 0},
80
+ /* 29 */ { 5, s_0_29, 28, 1, 0},
81
+ /* 30 */ { 2, s_0_30, -1, 1, 0},
82
+ /* 31 */ { 4, s_0_31, 30, 1, 0}
83
+ };
84
+
85
+ static symbol s_1_0[2] = { 'g', 'd' };
86
+ static symbol s_1_1[2] = { 'd', 't' };
87
+ static symbol s_1_2[2] = { 'g', 't' };
88
+ static symbol s_1_3[2] = { 'k', 't' };
89
+
90
+ static struct among a_1[4] =
91
+ {
92
+ /* 0 */ { 2, s_1_0, -1, -1, 0},
93
+ /* 1 */ { 2, s_1_1, -1, -1, 0},
94
+ /* 2 */ { 2, s_1_2, -1, -1, 0},
95
+ /* 3 */ { 2, s_1_3, -1, -1, 0}
96
+ };
97
+
98
+ static symbol s_2_0[2] = { 'i', 'g' };
99
+ static symbol s_2_1[3] = { 'l', 'i', 'g' };
100
+ static symbol s_2_2[4] = { 'e', 'l', 'i', 'g' };
101
+ static symbol s_2_3[3] = { 'e', 'l', 's' };
102
+ static symbol s_2_4[5] = { 'l', 0xC3, 0xB8, 's', 't' };
103
+
104
+ static struct among a_2[5] =
105
+ {
106
+ /* 0 */ { 2, s_2_0, -1, 1, 0},
107
+ /* 1 */ { 3, s_2_1, 0, 1, 0},
108
+ /* 2 */ { 4, s_2_2, 1, 1, 0},
109
+ /* 3 */ { 3, s_2_3, -1, 1, 0},
110
+ /* 4 */ { 5, s_2_4, -1, 2, 0}
111
+ };
112
+
113
+ static unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
114
+
115
+ static unsigned char g_s_ending[] = { 239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
116
+
117
+ static symbol s_0[] = { 's', 't' };
118
+ static symbol s_1[] = { 'i', 'g' };
119
+ static symbol s_2[] = { 'l', 0xC3, 0xB8, 's' };
120
+
121
+ static int r_mark_regions(struct SN_env * z) {
122
+ z->I[0] = z->l;
123
+ { int c_test = z->c; /* test, line 33 */
124
+ { int c = skip_utf8(z->p, z->c, 0, z->l, + 3);
125
+ if (c < 0) return 0;
126
+ z->c = c; /* hop, line 33 */
127
+ }
128
+ z->I[1] = z->c; /* setmark x, line 33 */
129
+ z->c = c_test;
130
+ }
131
+ while(1) { /* goto, line 34 */
132
+ int c = z->c;
133
+ if (!(in_grouping_U(z, g_v, 97, 248))) goto lab0;
134
+ z->c = c;
135
+ break;
136
+ lab0:
137
+ z->c = c;
138
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
139
+ if (c < 0) return 0;
140
+ z->c = c; /* goto, line 34 */
141
+ }
142
+ }
143
+ while(1) { /* gopast, line 34 */
144
+ if (!(out_grouping_U(z, g_v, 97, 248))) goto lab1;
145
+ break;
146
+ lab1:
147
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
148
+ if (c < 0) return 0;
149
+ z->c = c; /* gopast, line 34 */
150
+ }
151
+ }
152
+ z->I[0] = z->c; /* setmark p1, line 34 */
153
+ /* try, line 35 */
154
+ if (!(z->I[0] < z->I[1])) goto lab2;
155
+ z->I[0] = z->I[1];
156
+ lab2:
157
+ return 1;
158
+ }
159
+
160
+ static int r_main_suffix(struct SN_env * z) {
161
+ int among_var;
162
+ { int m3; /* setlimit, line 41 */
163
+ int m = z->l - z->c; (void) m;
164
+ if (z->c < z->I[0]) return 0;
165
+ z->c = z->I[0]; /* tomark, line 41 */
166
+ m3 = z->lb; z->lb = z->c;
167
+ z->c = z->l - m;
168
+ z->ket = z->c; /* [, line 41 */
169
+ among_var = find_among_b(z, a_0, 32); /* substring, line 41 */
170
+ if (!(among_var)) { z->lb = m3; return 0; }
171
+ z->bra = z->c; /* ], line 41 */
172
+ z->lb = m3;
173
+ }
174
+ switch(among_var) {
175
+ case 0: return 0;
176
+ case 1:
177
+ { int ret;
178
+ ret = slice_del(z); /* delete, line 48 */
179
+ if (ret < 0) return ret;
180
+ }
181
+ break;
182
+ case 2:
183
+ if (!(in_grouping_b_U(z, g_s_ending, 97, 229))) return 0;
184
+ { int ret;
185
+ ret = slice_del(z); /* delete, line 50 */
186
+ if (ret < 0) return ret;
187
+ }
188
+ break;
189
+ }
190
+ return 1;
191
+ }
192
+
193
+ static int r_consonant_pair(struct SN_env * z) {
194
+ { int m_test = z->l - z->c; /* test, line 55 */
195
+ { int m3; /* setlimit, line 56 */
196
+ int m = z->l - z->c; (void) m;
197
+ if (z->c < z->I[0]) return 0;
198
+ z->c = z->I[0]; /* tomark, line 56 */
199
+ m3 = z->lb; z->lb = z->c;
200
+ z->c = z->l - m;
201
+ z->ket = z->c; /* [, line 56 */
202
+ if (!(find_among_b(z, a_1, 4))) { z->lb = m3; return 0; } /* substring, line 56 */
203
+ z->bra = z->c; /* ], line 56 */
204
+ z->lb = m3;
205
+ }
206
+ z->c = z->l - m_test;
207
+ }
208
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
209
+ if (c < 0) return 0;
210
+ z->c = c; /* next, line 62 */
211
+ }
212
+ z->bra = z->c; /* ], line 62 */
213
+ { int ret;
214
+ ret = slice_del(z); /* delete, line 62 */
215
+ if (ret < 0) return ret;
216
+ }
217
+ return 1;
218
+ }
219
+
220
+ static int r_other_suffix(struct SN_env * z) {
221
+ int among_var;
222
+ { int m = z->l - z->c; (void) m; /* do, line 66 */
223
+ z->ket = z->c; /* [, line 66 */
224
+ if (!(eq_s_b(z, 2, s_0))) goto lab0;
225
+ z->bra = z->c; /* ], line 66 */
226
+ if (!(eq_s_b(z, 2, s_1))) goto lab0;
227
+ { int ret;
228
+ ret = slice_del(z); /* delete, line 66 */
229
+ if (ret < 0) return ret;
230
+ }
231
+ lab0:
232
+ z->c = z->l - m;
233
+ }
234
+ { int m3; /* setlimit, line 67 */
235
+ int m = z->l - z->c; (void) m;
236
+ if (z->c < z->I[0]) return 0;
237
+ z->c = z->I[0]; /* tomark, line 67 */
238
+ m3 = z->lb; z->lb = z->c;
239
+ z->c = z->l - m;
240
+ z->ket = z->c; /* [, line 67 */
241
+ among_var = find_among_b(z, a_2, 5); /* substring, line 67 */
242
+ if (!(among_var)) { z->lb = m3; return 0; }
243
+ z->bra = z->c; /* ], line 67 */
244
+ z->lb = m3;
245
+ }
246
+ switch(among_var) {
247
+ case 0: return 0;
248
+ case 1:
249
+ { int ret;
250
+ ret = slice_del(z); /* delete, line 70 */
251
+ if (ret < 0) return ret;
252
+ }
253
+ { int m = z->l - z->c; (void) m; /* do, line 70 */
254
+ { int ret = r_consonant_pair(z);
255
+ if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
256
+ if (ret < 0) return ret;
257
+ }
258
+ lab1:
259
+ z->c = z->l - m;
260
+ }
261
+ break;
262
+ case 2:
263
+ { int ret;
264
+ ret = slice_from_s(z, 4, s_2); /* <-, line 72 */
265
+ if (ret < 0) return ret;
266
+ }
267
+ break;
268
+ }
269
+ return 1;
270
+ }
271
+
272
+ static int r_undouble(struct SN_env * z) {
273
+ { int m3; /* setlimit, line 76 */
274
+ int m = z->l - z->c; (void) m;
275
+ if (z->c < z->I[0]) return 0;
276
+ z->c = z->I[0]; /* tomark, line 76 */
277
+ m3 = z->lb; z->lb = z->c;
278
+ z->c = z->l - m;
279
+ z->ket = z->c; /* [, line 76 */
280
+ if (!(out_grouping_b_U(z, g_v, 97, 248))) { z->lb = m3; return 0; }
281
+ z->bra = z->c; /* ], line 76 */
282
+ z->S[0] = slice_to(z, z->S[0]); /* -> ch, line 76 */
283
+ if (z->S[0] == 0) return -1; /* -> ch, line 76 */
284
+ z->lb = m3;
285
+ }
286
+ if (!(eq_v_b(z, z->S[0]))) return 0; /* name ch, line 77 */
287
+ { int ret;
288
+ ret = slice_del(z); /* delete, line 78 */
289
+ if (ret < 0) return ret;
290
+ }
291
+ return 1;
292
+ }
293
+
294
+ extern int danish_UTF_8_stem(struct SN_env * z) {
295
+ { int c = z->c; /* do, line 84 */
296
+ { int ret = r_mark_regions(z);
297
+ if (ret == 0) goto lab0; /* call mark_regions, line 84 */
298
+ if (ret < 0) return ret;
299
+ }
300
+ lab0:
301
+ z->c = c;
302
+ }
303
+ z->lb = z->c; z->c = z->l; /* backwards, line 85 */
304
+
305
+ { int m = z->l - z->c; (void) m; /* do, line 86 */
306
+ { int ret = r_main_suffix(z);
307
+ if (ret == 0) goto lab1; /* call main_suffix, line 86 */
308
+ if (ret < 0) return ret;
309
+ }
310
+ lab1:
311
+ z->c = z->l - m;
312
+ }
313
+ { int m = z->l - z->c; (void) m; /* do, line 87 */
314
+ { int ret = r_consonant_pair(z);
315
+ if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
316
+ if (ret < 0) return ret;
317
+ }
318
+ lab2:
319
+ z->c = z->l - m;
320
+ }
321
+ { int m = z->l - z->c; (void) m; /* do, line 88 */
322
+ { int ret = r_other_suffix(z);
323
+ if (ret == 0) goto lab3; /* call other_suffix, line 88 */
324
+ if (ret < 0) return ret;
325
+ }
326
+ lab3:
327
+ z->c = z->l - m;
328
+ }
329
+ { int m = z->l - z->c; (void) m; /* do, line 89 */
330
+ { int ret = r_undouble(z);
331
+ if (ret == 0) goto lab4; /* call undouble, line 89 */
332
+ if (ret < 0) return ret;
333
+ }
334
+ lab4:
335
+ z->c = z->l - m;
336
+ }
337
+ z->c = z->lb;
338
+ return 1;
339
+ }
340
+
341
+ extern struct SN_env * danish_UTF_8_create_env(void) { return SN_create_env(1, 2, 0); }
342
+
343
+ extern void danish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z); }
344
+
@@ -0,0 +1,16 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ extern struct SN_env * danish_UTF_8_create_env(void);
9
+ extern void danish_UTF_8_close_env(struct SN_env * z);
10
+
11
+ extern int danish_UTF_8_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,653 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int dutch_UTF_8_stem(struct SN_env * z);
7
+ static int r_standard_suffix(struct SN_env * z);
8
+ static int r_undouble(struct SN_env * z);
9
+ static int r_R2(struct SN_env * z);
10
+ static int r_R1(struct SN_env * z);
11
+ static int r_mark_regions(struct SN_env * z);
12
+ static int r_en_ending(struct SN_env * z);
13
+ static int r_e_ending(struct SN_env * z);
14
+ static int r_postlude(struct SN_env * z);
15
+ static int r_prelude(struct SN_env * z);
16
+
17
+ extern struct SN_env * dutch_UTF_8_create_env(void);
18
+ extern void dutch_UTF_8_close_env(struct SN_env * z);
19
+
20
+ static symbol s_0_1[2] = { 0xC3, 0xA1 };
21
+ static symbol s_0_2[2] = { 0xC3, 0xA4 };
22
+ static symbol s_0_3[2] = { 0xC3, 0xA9 };
23
+ static symbol s_0_4[2] = { 0xC3, 0xAB };
24
+ static symbol s_0_5[2] = { 0xC3, 0xAD };
25
+ static symbol s_0_6[2] = { 0xC3, 0xAF };
26
+ static symbol s_0_7[2] = { 0xC3, 0xB3 };
27
+ static symbol s_0_8[2] = { 0xC3, 0xB6 };
28
+ static symbol s_0_9[2] = { 0xC3, 0xBA };
29
+ static symbol s_0_10[2] = { 0xC3, 0xBC };
30
+
31
+ static struct among a_0[11] =
32
+ {
33
+ /* 0 */ { 0, 0, -1, 6, 0},
34
+ /* 1 */ { 2, s_0_1, 0, 1, 0},
35
+ /* 2 */ { 2, s_0_2, 0, 1, 0},
36
+ /* 3 */ { 2, s_0_3, 0, 2, 0},
37
+ /* 4 */ { 2, s_0_4, 0, 2, 0},
38
+ /* 5 */ { 2, s_0_5, 0, 3, 0},
39
+ /* 6 */ { 2, s_0_6, 0, 3, 0},
40
+ /* 7 */ { 2, s_0_7, 0, 4, 0},
41
+ /* 8 */ { 2, s_0_8, 0, 4, 0},
42
+ /* 9 */ { 2, s_0_9, 0, 5, 0},
43
+ /* 10 */ { 2, s_0_10, 0, 5, 0}
44
+ };
45
+
46
+ static symbol s_1_1[1] = { 'I' };
47
+ static symbol s_1_2[1] = { 'Y' };
48
+
49
+ static struct among a_1[3] =
50
+ {
51
+ /* 0 */ { 0, 0, -1, 3, 0},
52
+ /* 1 */ { 1, s_1_1, 0, 2, 0},
53
+ /* 2 */ { 1, s_1_2, 0, 1, 0}
54
+ };
55
+
56
+ static symbol s_2_0[2] = { 'd', 'd' };
57
+ static symbol s_2_1[2] = { 'k', 'k' };
58
+ static symbol s_2_2[2] = { 't', 't' };
59
+
60
+ static struct among a_2[3] =
61
+ {
62
+ /* 0 */ { 2, s_2_0, -1, -1, 0},
63
+ /* 1 */ { 2, s_2_1, -1, -1, 0},
64
+ /* 2 */ { 2, s_2_2, -1, -1, 0}
65
+ };
66
+
67
+ static symbol s_3_0[3] = { 'e', 'n', 'e' };
68
+ static symbol s_3_1[2] = { 's', 'e' };
69
+ static symbol s_3_2[2] = { 'e', 'n' };
70
+ static symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
71
+ static symbol s_3_4[1] = { 's' };
72
+
73
+ static struct among a_3[5] =
74
+ {
75
+ /* 0 */ { 3, s_3_0, -1, 2, 0},
76
+ /* 1 */ { 2, s_3_1, -1, 3, 0},
77
+ /* 2 */ { 2, s_3_2, -1, 2, 0},
78
+ /* 3 */ { 5, s_3_3, 2, 1, 0},
79
+ /* 4 */ { 1, s_3_4, -1, 3, 0}
80
+ };
81
+
82
+ static symbol s_4_0[3] = { 'e', 'n', 'd' };
83
+ static symbol s_4_1[2] = { 'i', 'g' };
84
+ static symbol s_4_2[3] = { 'i', 'n', 'g' };
85
+ static symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
86
+ static symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
87
+ static symbol s_4_5[3] = { 'b', 'a', 'r' };
88
+
89
+ static struct among a_4[6] =
90
+ {
91
+ /* 0 */ { 3, s_4_0, -1, 1, 0},
92
+ /* 1 */ { 2, s_4_1, -1, 2, 0},
93
+ /* 2 */ { 3, s_4_2, -1, 1, 0},
94
+ /* 3 */ { 4, s_4_3, -1, 3, 0},
95
+ /* 4 */ { 4, s_4_4, -1, 4, 0},
96
+ /* 5 */ { 3, s_4_5, -1, 5, 0}
97
+ };
98
+
99
+ static symbol s_5_0[2] = { 'a', 'a' };
100
+ static symbol s_5_1[2] = { 'e', 'e' };
101
+ static symbol s_5_2[2] = { 'o', 'o' };
102
+ static symbol s_5_3[2] = { 'u', 'u' };
103
+
104
+ static struct among a_5[4] =
105
+ {
106
+ /* 0 */ { 2, s_5_0, -1, -1, 0},
107
+ /* 1 */ { 2, s_5_1, -1, -1, 0},
108
+ /* 2 */ { 2, s_5_2, -1, -1, 0},
109
+ /* 3 */ { 2, s_5_3, -1, -1, 0}
110
+ };
111
+
112
+ static unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
113
+
114
+ static unsigned char g_v_I[] = { 1, 0, 0, 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
115
+
116
+ static unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
117
+
118
+ static symbol s_0[] = { 'a' };
119
+ static symbol s_1[] = { 'e' };
120
+ static symbol s_2[] = { 'i' };
121
+ static symbol s_3[] = { 'o' };
122
+ static symbol s_4[] = { 'u' };
123
+ static symbol s_5[] = { 'y' };
124
+ static symbol s_6[] = { 'Y' };
125
+ static symbol s_7[] = { 'i' };
126
+ static symbol s_8[] = { 'I' };
127
+ static symbol s_9[] = { 'y' };
128
+ static symbol s_10[] = { 'Y' };
129
+ static symbol s_11[] = { 'y' };
130
+ static symbol s_12[] = { 'i' };
131
+ static symbol s_13[] = { 'e' };
132
+ static symbol s_14[] = { 'g', 'e', 'm' };
133
+ static symbol s_15[] = { 'h', 'e', 'i', 'd' };
134
+ static symbol s_16[] = { 'h', 'e', 'i', 'd' };
135
+ static symbol s_17[] = { 'c' };
136
+ static symbol s_18[] = { 'e', 'n' };
137
+ static symbol s_19[] = { 'i', 'g' };
138
+ static symbol s_20[] = { 'e' };
139
+ static symbol s_21[] = { 'e' };
140
+
141
+ static int r_prelude(struct SN_env * z) {
142
+ int among_var;
143
+ { int c_test = z->c; /* test, line 42 */
144
+ while(1) { /* repeat, line 42 */
145
+ int c = z->c;
146
+ z->bra = z->c; /* [, line 43 */
147
+ among_var = find_among(z, a_0, 11); /* substring, line 43 */
148
+ if (!(among_var)) goto lab0;
149
+ z->ket = z->c; /* ], line 43 */
150
+ switch(among_var) {
151
+ case 0: goto lab0;
152
+ case 1:
153
+ { int ret;
154
+ ret = slice_from_s(z, 1, s_0); /* <-, line 45 */
155
+ if (ret < 0) return ret;
156
+ }
157
+ break;
158
+ case 2:
159
+ { int ret;
160
+ ret = slice_from_s(z, 1, s_1); /* <-, line 47 */
161
+ if (ret < 0) return ret;
162
+ }
163
+ break;
164
+ case 3:
165
+ { int ret;
166
+ ret = slice_from_s(z, 1, s_2); /* <-, line 49 */
167
+ if (ret < 0) return ret;
168
+ }
169
+ break;
170
+ case 4:
171
+ { int ret;
172
+ ret = slice_from_s(z, 1, s_3); /* <-, line 51 */
173
+ if (ret < 0) return ret;
174
+ }
175
+ break;
176
+ case 5:
177
+ { int ret;
178
+ ret = slice_from_s(z, 1, s_4); /* <-, line 53 */
179
+ if (ret < 0) return ret;
180
+ }
181
+ break;
182
+ case 6:
183
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
184
+ if (c < 0) goto lab0;
185
+ z->c = c; /* next, line 54 */
186
+ }
187
+ break;
188
+ }
189
+ continue;
190
+ lab0:
191
+ z->c = c;
192
+ break;
193
+ }
194
+ z->c = c_test;
195
+ }
196
+ { int c = z->c; /* try, line 57 */
197
+ z->bra = z->c; /* [, line 57 */
198
+ if (!(eq_s(z, 1, s_5))) { z->c = c; goto lab1; }
199
+ z->ket = z->c; /* ], line 57 */
200
+ { int ret;
201
+ ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
202
+ if (ret < 0) return ret;
203
+ }
204
+ lab1:
205
+ ;
206
+ }
207
+ while(1) { /* repeat, line 58 */
208
+ int c = z->c;
209
+ while(1) { /* goto, line 58 */
210
+ int c = z->c;
211
+ if (!(in_grouping_U(z, g_v, 97, 232))) goto lab3;
212
+ z->bra = z->c; /* [, line 59 */
213
+ { int c = z->c; /* or, line 59 */
214
+ if (!(eq_s(z, 1, s_7))) goto lab5;
215
+ z->ket = z->c; /* ], line 59 */
216
+ if (!(in_grouping_U(z, g_v, 97, 232))) goto lab5;
217
+ { int ret;
218
+ ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
219
+ if (ret < 0) return ret;
220
+ }
221
+ goto lab4;
222
+ lab5:
223
+ z->c = c;
224
+ if (!(eq_s(z, 1, s_9))) goto lab3;
225
+ z->ket = z->c; /* ], line 60 */
226
+ { int ret;
227
+ ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
228
+ if (ret < 0) return ret;
229
+ }
230
+ }
231
+ lab4:
232
+ z->c = c;
233
+ break;
234
+ lab3:
235
+ z->c = c;
236
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
237
+ if (c < 0) goto lab2;
238
+ z->c = c; /* goto, line 58 */
239
+ }
240
+ }
241
+ continue;
242
+ lab2:
243
+ z->c = c;
244
+ break;
245
+ }
246
+ return 1;
247
+ }
248
+
249
+ static int r_mark_regions(struct SN_env * z) {
250
+ z->I[0] = z->l;
251
+ z->I[1] = z->l;
252
+ while(1) { /* gopast, line 69 */
253
+ if (!(in_grouping_U(z, g_v, 97, 232))) goto lab0;
254
+ break;
255
+ lab0:
256
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
257
+ if (c < 0) return 0;
258
+ z->c = c; /* gopast, line 69 */
259
+ }
260
+ }
261
+ while(1) { /* gopast, line 69 */
262
+ if (!(out_grouping_U(z, g_v, 97, 232))) goto lab1;
263
+ break;
264
+ lab1:
265
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
266
+ if (c < 0) return 0;
267
+ z->c = c; /* gopast, line 69 */
268
+ }
269
+ }
270
+ z->I[0] = z->c; /* setmark p1, line 69 */
271
+ /* try, line 70 */
272
+ if (!(z->I[0] < 3)) goto lab2;
273
+ z->I[0] = 3;
274
+ lab2:
275
+ while(1) { /* gopast, line 71 */
276
+ if (!(in_grouping_U(z, g_v, 97, 232))) goto lab3;
277
+ break;
278
+ lab3:
279
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
280
+ if (c < 0) return 0;
281
+ z->c = c; /* gopast, line 71 */
282
+ }
283
+ }
284
+ while(1) { /* gopast, line 71 */
285
+ if (!(out_grouping_U(z, g_v, 97, 232))) goto lab4;
286
+ break;
287
+ lab4:
288
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
289
+ if (c < 0) return 0;
290
+ z->c = c; /* gopast, line 71 */
291
+ }
292
+ }
293
+ z->I[1] = z->c; /* setmark p2, line 71 */
294
+ return 1;
295
+ }
296
+
297
+ static int r_postlude(struct SN_env * z) {
298
+ int among_var;
299
+ while(1) { /* repeat, line 75 */
300
+ int c = z->c;
301
+ z->bra = z->c; /* [, line 77 */
302
+ among_var = find_among(z, a_1, 3); /* substring, line 77 */
303
+ if (!(among_var)) goto lab0;
304
+ z->ket = z->c; /* ], line 77 */
305
+ switch(among_var) {
306
+ case 0: goto lab0;
307
+ case 1:
308
+ { int ret;
309
+ ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
310
+ if (ret < 0) return ret;
311
+ }
312
+ break;
313
+ case 2:
314
+ { int ret;
315
+ ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
316
+ if (ret < 0) return ret;
317
+ }
318
+ break;
319
+ case 3:
320
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
321
+ if (c < 0) goto lab0;
322
+ z->c = c; /* next, line 80 */
323
+ }
324
+ break;
325
+ }
326
+ continue;
327
+ lab0:
328
+ z->c = c;
329
+ break;
330
+ }
331
+ return 1;
332
+ }
333
+
334
+ static int r_R1(struct SN_env * z) {
335
+ if (!(z->I[0] <= z->c)) return 0;
336
+ return 1;
337
+ }
338
+
339
+ static int r_R2(struct SN_env * z) {
340
+ if (!(z->I[1] <= z->c)) return 0;
341
+ return 1;
342
+ }
343
+
344
+ static int r_undouble(struct SN_env * z) {
345
+ { int m_test = z->l - z->c; /* test, line 91 */
346
+ if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
347
+ z->c = z->l - m_test;
348
+ }
349
+ z->ket = z->c; /* [, line 91 */
350
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
351
+ if (c < 0) return 0;
352
+ z->c = c; /* next, line 91 */
353
+ }
354
+ z->bra = z->c; /* ], line 91 */
355
+ { int ret;
356
+ ret = slice_del(z); /* delete, line 91 */
357
+ if (ret < 0) return ret;
358
+ }
359
+ return 1;
360
+ }
361
+
362
+ static int r_e_ending(struct SN_env * z) {
363
+ z->B[0] = 0; /* unset e_found, line 95 */
364
+ z->ket = z->c; /* [, line 96 */
365
+ if (!(eq_s_b(z, 1, s_13))) return 0;
366
+ z->bra = z->c; /* ], line 96 */
367
+ { int ret = r_R1(z);
368
+ if (ret == 0) return 0; /* call R1, line 96 */
369
+ if (ret < 0) return ret;
370
+ }
371
+ { int m_test = z->l - z->c; /* test, line 96 */
372
+ if (!(out_grouping_b_U(z, g_v, 97, 232))) return 0;
373
+ z->c = z->l - m_test;
374
+ }
375
+ { int ret;
376
+ ret = slice_del(z); /* delete, line 96 */
377
+ if (ret < 0) return ret;
378
+ }
379
+ z->B[0] = 1; /* set e_found, line 97 */
380
+ { int ret = r_undouble(z);
381
+ if (ret == 0) return 0; /* call undouble, line 98 */
382
+ if (ret < 0) return ret;
383
+ }
384
+ return 1;
385
+ }
386
+
387
+ static int r_en_ending(struct SN_env * z) {
388
+ { int ret = r_R1(z);
389
+ if (ret == 0) return 0; /* call R1, line 102 */
390
+ if (ret < 0) return ret;
391
+ }
392
+ { int m = z->l - z->c; (void) m; /* and, line 102 */
393
+ if (!(out_grouping_b_U(z, g_v, 97, 232))) return 0;
394
+ z->c = z->l - m;
395
+ { int m = z->l - z->c; (void) m; /* not, line 102 */
396
+ if (!(eq_s_b(z, 3, s_14))) goto lab0;
397
+ return 0;
398
+ lab0:
399
+ z->c = z->l - m;
400
+ }
401
+ }
402
+ { int ret;
403
+ ret = slice_del(z); /* delete, line 102 */
404
+ if (ret < 0) return ret;
405
+ }
406
+ { int ret = r_undouble(z);
407
+ if (ret == 0) return 0; /* call undouble, line 103 */
408
+ if (ret < 0) return ret;
409
+ }
410
+ return 1;
411
+ }
412
+
413
+ static int r_standard_suffix(struct SN_env * z) {
414
+ int among_var;
415
+ { int m = z->l - z->c; (void) m; /* do, line 107 */
416
+ z->ket = z->c; /* [, line 108 */
417
+ among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
418
+ if (!(among_var)) goto lab0;
419
+ z->bra = z->c; /* ], line 108 */
420
+ switch(among_var) {
421
+ case 0: goto lab0;
422
+ case 1:
423
+ { int ret = r_R1(z);
424
+ if (ret == 0) goto lab0; /* call R1, line 110 */
425
+ if (ret < 0) return ret;
426
+ }
427
+ { int ret;
428
+ ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
429
+ if (ret < 0) return ret;
430
+ }
431
+ break;
432
+ case 2:
433
+ { int ret = r_en_ending(z);
434
+ if (ret == 0) goto lab0; /* call en_ending, line 113 */
435
+ if (ret < 0) return ret;
436
+ }
437
+ break;
438
+ case 3:
439
+ { int ret = r_R1(z);
440
+ if (ret == 0) goto lab0; /* call R1, line 116 */
441
+ if (ret < 0) return ret;
442
+ }
443
+ if (!(out_grouping_b_U(z, g_v_j, 97, 232))) goto lab0;
444
+ { int ret;
445
+ ret = slice_del(z); /* delete, line 116 */
446
+ if (ret < 0) return ret;
447
+ }
448
+ break;
449
+ }
450
+ lab0:
451
+ z->c = z->l - m;
452
+ }
453
+ { int m = z->l - z->c; (void) m; /* do, line 120 */
454
+ { int ret = r_e_ending(z);
455
+ if (ret == 0) goto lab1; /* call e_ending, line 120 */
456
+ if (ret < 0) return ret;
457
+ }
458
+ lab1:
459
+ z->c = z->l - m;
460
+ }
461
+ { int m = z->l - z->c; (void) m; /* do, line 122 */
462
+ z->ket = z->c; /* [, line 122 */
463
+ if (!(eq_s_b(z, 4, s_16))) goto lab2;
464
+ z->bra = z->c; /* ], line 122 */
465
+ { int ret = r_R2(z);
466
+ if (ret == 0) goto lab2; /* call R2, line 122 */
467
+ if (ret < 0) return ret;
468
+ }
469
+ { int m = z->l - z->c; (void) m; /* not, line 122 */
470
+ if (!(eq_s_b(z, 1, s_17))) goto lab3;
471
+ goto lab2;
472
+ lab3:
473
+ z->c = z->l - m;
474
+ }
475
+ { int ret;
476
+ ret = slice_del(z); /* delete, line 122 */
477
+ if (ret < 0) return ret;
478
+ }
479
+ z->ket = z->c; /* [, line 123 */
480
+ if (!(eq_s_b(z, 2, s_18))) goto lab2;
481
+ z->bra = z->c; /* ], line 123 */
482
+ { int ret = r_en_ending(z);
483
+ if (ret == 0) goto lab2; /* call en_ending, line 123 */
484
+ if (ret < 0) return ret;
485
+ }
486
+ lab2:
487
+ z->c = z->l - m;
488
+ }
489
+ { int m = z->l - z->c; (void) m; /* do, line 126 */
490
+ z->ket = z->c; /* [, line 127 */
491
+ among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
492
+ if (!(among_var)) goto lab4;
493
+ z->bra = z->c; /* ], line 127 */
494
+ switch(among_var) {
495
+ case 0: goto lab4;
496
+ case 1:
497
+ { int ret = r_R2(z);
498
+ if (ret == 0) goto lab4; /* call R2, line 129 */
499
+ if (ret < 0) return ret;
500
+ }
501
+ { int ret;
502
+ ret = slice_del(z); /* delete, line 129 */
503
+ if (ret < 0) return ret;
504
+ }
505
+ { int m = z->l - z->c; (void) m; /* or, line 130 */
506
+ z->ket = z->c; /* [, line 130 */
507
+ if (!(eq_s_b(z, 2, s_19))) goto lab6;
508
+ z->bra = z->c; /* ], line 130 */
509
+ { int ret = r_R2(z);
510
+ if (ret == 0) goto lab6; /* call R2, line 130 */
511
+ if (ret < 0) return ret;
512
+ }
513
+ { int m = z->l - z->c; (void) m; /* not, line 130 */
514
+ if (!(eq_s_b(z, 1, s_20))) goto lab7;
515
+ goto lab6;
516
+ lab7:
517
+ z->c = z->l - m;
518
+ }
519
+ { int ret;
520
+ ret = slice_del(z); /* delete, line 130 */
521
+ if (ret < 0) return ret;
522
+ }
523
+ goto lab5;
524
+ lab6:
525
+ z->c = z->l - m;
526
+ { int ret = r_undouble(z);
527
+ if (ret == 0) goto lab4; /* call undouble, line 130 */
528
+ if (ret < 0) return ret;
529
+ }
530
+ }
531
+ lab5:
532
+ break;
533
+ case 2:
534
+ { int ret = r_R2(z);
535
+ if (ret == 0) goto lab4; /* call R2, line 133 */
536
+ if (ret < 0) return ret;
537
+ }
538
+ { int m = z->l - z->c; (void) m; /* not, line 133 */
539
+ if (!(eq_s_b(z, 1, s_21))) goto lab8;
540
+ goto lab4;
541
+ lab8:
542
+ z->c = z->l - m;
543
+ }
544
+ { int ret;
545
+ ret = slice_del(z); /* delete, line 133 */
546
+ if (ret < 0) return ret;
547
+ }
548
+ break;
549
+ case 3:
550
+ { int ret = r_R2(z);
551
+ if (ret == 0) goto lab4; /* call R2, line 136 */
552
+ if (ret < 0) return ret;
553
+ }
554
+ { int ret;
555
+ ret = slice_del(z); /* delete, line 136 */
556
+ if (ret < 0) return ret;
557
+ }
558
+ { int ret = r_e_ending(z);
559
+ if (ret == 0) goto lab4; /* call e_ending, line 136 */
560
+ if (ret < 0) return ret;
561
+ }
562
+ break;
563
+ case 4:
564
+ { int ret = r_R2(z);
565
+ if (ret == 0) goto lab4; /* call R2, line 139 */
566
+ if (ret < 0) return ret;
567
+ }
568
+ { int ret;
569
+ ret = slice_del(z); /* delete, line 139 */
570
+ if (ret < 0) return ret;
571
+ }
572
+ break;
573
+ case 5:
574
+ { int ret = r_R2(z);
575
+ if (ret == 0) goto lab4; /* call R2, line 142 */
576
+ if (ret < 0) return ret;
577
+ }
578
+ if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
579
+ { int ret;
580
+ ret = slice_del(z); /* delete, line 142 */
581
+ if (ret < 0) return ret;
582
+ }
583
+ break;
584
+ }
585
+ lab4:
586
+ z->c = z->l - m;
587
+ }
588
+ { int m = z->l - z->c; (void) m; /* do, line 146 */
589
+ if (!(out_grouping_b_U(z, g_v_I, 73, 232))) goto lab9;
590
+ { int m_test = z->l - z->c; /* test, line 148 */
591
+ if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
592
+ if (!(out_grouping_b_U(z, g_v, 97, 232))) goto lab9;
593
+ z->c = z->l - m_test;
594
+ }
595
+ z->ket = z->c; /* [, line 152 */
596
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
597
+ if (c < 0) goto lab9;
598
+ z->c = c; /* next, line 152 */
599
+ }
600
+ z->bra = z->c; /* ], line 152 */
601
+ { int ret;
602
+ ret = slice_del(z); /* delete, line 152 */
603
+ if (ret < 0) return ret;
604
+ }
605
+ lab9:
606
+ z->c = z->l - m;
607
+ }
608
+ return 1;
609
+ }
610
+
611
+ extern int dutch_UTF_8_stem(struct SN_env * z) {
612
+ { int c = z->c; /* do, line 159 */
613
+ { int ret = r_prelude(z);
614
+ if (ret == 0) goto lab0; /* call prelude, line 159 */
615
+ if (ret < 0) return ret;
616
+ }
617
+ lab0:
618
+ z->c = c;
619
+ }
620
+ { int c = z->c; /* do, line 160 */
621
+ { int ret = r_mark_regions(z);
622
+ if (ret == 0) goto lab1; /* call mark_regions, line 160 */
623
+ if (ret < 0) return ret;
624
+ }
625
+ lab1:
626
+ z->c = c;
627
+ }
628
+ z->lb = z->c; z->c = z->l; /* backwards, line 161 */
629
+
630
+ { int m = z->l - z->c; (void) m; /* do, line 162 */
631
+ { int ret = r_standard_suffix(z);
632
+ if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
633
+ if (ret < 0) return ret;
634
+ }
635
+ lab2:
636
+ z->c = z->l - m;
637
+ }
638
+ z->c = z->lb;
639
+ { int c = z->c; /* do, line 163 */
640
+ { int ret = r_postlude(z);
641
+ if (ret == 0) goto lab3; /* call postlude, line 163 */
642
+ if (ret < 0) return ret;
643
+ }
644
+ lab3:
645
+ z->c = c;
646
+ }
647
+ return 1;
648
+ }
649
+
650
+ extern struct SN_env * dutch_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
651
+
652
+ extern void dutch_UTF_8_close_env(struct SN_env * z) { SN_close_env(z); }
653
+