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,338 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int danish_ISO_8859_1_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_ISO_8859_1_create_env(void);
14
+ extern void danish_ISO_8859_1_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[4] = { 'l', 0xF8, '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 */ { 4, 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', 0xF8, '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 = z->c + 3;
125
+ if (0 > c || c > z->l) 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(z, g_v, 97, 248))) goto lab0;
134
+ z->c = c;
135
+ break;
136
+ lab0:
137
+ z->c = c;
138
+ if (z->c >= z->l) return 0;
139
+ z->c++; /* goto, line 34 */
140
+ }
141
+ while(1) { /* gopast, line 34 */
142
+ if (!(out_grouping(z, g_v, 97, 248))) goto lab1;
143
+ break;
144
+ lab1:
145
+ if (z->c >= z->l) return 0;
146
+ z->c++; /* gopast, line 34 */
147
+ }
148
+ z->I[0] = z->c; /* setmark p1, line 34 */
149
+ /* try, line 35 */
150
+ if (!(z->I[0] < z->I[1])) goto lab2;
151
+ z->I[0] = z->I[1];
152
+ lab2:
153
+ return 1;
154
+ }
155
+
156
+ static int r_main_suffix(struct SN_env * z) {
157
+ int among_var;
158
+ { int m3; /* setlimit, line 41 */
159
+ int m = z->l - z->c; (void) m;
160
+ if (z->c < z->I[0]) return 0;
161
+ z->c = z->I[0]; /* tomark, line 41 */
162
+ m3 = z->lb; z->lb = z->c;
163
+ z->c = z->l - m;
164
+ z->ket = z->c; /* [, line 41 */
165
+ among_var = find_among_b(z, a_0, 32); /* substring, line 41 */
166
+ if (!(among_var)) { z->lb = m3; return 0; }
167
+ z->bra = z->c; /* ], line 41 */
168
+ z->lb = m3;
169
+ }
170
+ switch(among_var) {
171
+ case 0: return 0;
172
+ case 1:
173
+ { int ret;
174
+ ret = slice_del(z); /* delete, line 48 */
175
+ if (ret < 0) return ret;
176
+ }
177
+ break;
178
+ case 2:
179
+ if (!(in_grouping_b(z, g_s_ending, 97, 229))) return 0;
180
+ { int ret;
181
+ ret = slice_del(z); /* delete, line 50 */
182
+ if (ret < 0) return ret;
183
+ }
184
+ break;
185
+ }
186
+ return 1;
187
+ }
188
+
189
+ static int r_consonant_pair(struct SN_env * z) {
190
+ { int m_test = z->l - z->c; /* test, line 55 */
191
+ { int m3; /* setlimit, line 56 */
192
+ int m = z->l - z->c; (void) m;
193
+ if (z->c < z->I[0]) return 0;
194
+ z->c = z->I[0]; /* tomark, line 56 */
195
+ m3 = z->lb; z->lb = z->c;
196
+ z->c = z->l - m;
197
+ z->ket = z->c; /* [, line 56 */
198
+ if (!(find_among_b(z, a_1, 4))) { z->lb = m3; return 0; } /* substring, line 56 */
199
+ z->bra = z->c; /* ], line 56 */
200
+ z->lb = m3;
201
+ }
202
+ z->c = z->l - m_test;
203
+ }
204
+ if (z->c <= z->lb) return 0;
205
+ z->c--; /* next, line 62 */
206
+ z->bra = z->c; /* ], line 62 */
207
+ { int ret;
208
+ ret = slice_del(z); /* delete, line 62 */
209
+ if (ret < 0) return ret;
210
+ }
211
+ return 1;
212
+ }
213
+
214
+ static int r_other_suffix(struct SN_env * z) {
215
+ int among_var;
216
+ { int m = z->l - z->c; (void) m; /* do, line 66 */
217
+ z->ket = z->c; /* [, line 66 */
218
+ if (!(eq_s_b(z, 2, s_0))) goto lab0;
219
+ z->bra = z->c; /* ], line 66 */
220
+ if (!(eq_s_b(z, 2, s_1))) goto lab0;
221
+ { int ret;
222
+ ret = slice_del(z); /* delete, line 66 */
223
+ if (ret < 0) return ret;
224
+ }
225
+ lab0:
226
+ z->c = z->l - m;
227
+ }
228
+ { int m3; /* setlimit, line 67 */
229
+ int m = z->l - z->c; (void) m;
230
+ if (z->c < z->I[0]) return 0;
231
+ z->c = z->I[0]; /* tomark, line 67 */
232
+ m3 = z->lb; z->lb = z->c;
233
+ z->c = z->l - m;
234
+ z->ket = z->c; /* [, line 67 */
235
+ among_var = find_among_b(z, a_2, 5); /* substring, line 67 */
236
+ if (!(among_var)) { z->lb = m3; return 0; }
237
+ z->bra = z->c; /* ], line 67 */
238
+ z->lb = m3;
239
+ }
240
+ switch(among_var) {
241
+ case 0: return 0;
242
+ case 1:
243
+ { int ret;
244
+ ret = slice_del(z); /* delete, line 70 */
245
+ if (ret < 0) return ret;
246
+ }
247
+ { int m = z->l - z->c; (void) m; /* do, line 70 */
248
+ { int ret = r_consonant_pair(z);
249
+ if (ret == 0) goto lab1; /* call consonant_pair, line 70 */
250
+ if (ret < 0) return ret;
251
+ }
252
+ lab1:
253
+ z->c = z->l - m;
254
+ }
255
+ break;
256
+ case 2:
257
+ { int ret;
258
+ ret = slice_from_s(z, 3, s_2); /* <-, line 72 */
259
+ if (ret < 0) return ret;
260
+ }
261
+ break;
262
+ }
263
+ return 1;
264
+ }
265
+
266
+ static int r_undouble(struct SN_env * z) {
267
+ { int m3; /* setlimit, line 76 */
268
+ int m = z->l - z->c; (void) m;
269
+ if (z->c < z->I[0]) return 0;
270
+ z->c = z->I[0]; /* tomark, line 76 */
271
+ m3 = z->lb; z->lb = z->c;
272
+ z->c = z->l - m;
273
+ z->ket = z->c; /* [, line 76 */
274
+ if (!(out_grouping_b(z, g_v, 97, 248))) { z->lb = m3; return 0; }
275
+ z->bra = z->c; /* ], line 76 */
276
+ z->S[0] = slice_to(z, z->S[0]); /* -> ch, line 76 */
277
+ if (z->S[0] == 0) return -1; /* -> ch, line 76 */
278
+ z->lb = m3;
279
+ }
280
+ if (!(eq_v_b(z, z->S[0]))) return 0; /* name ch, line 77 */
281
+ { int ret;
282
+ ret = slice_del(z); /* delete, line 78 */
283
+ if (ret < 0) return ret;
284
+ }
285
+ return 1;
286
+ }
287
+
288
+ extern int danish_ISO_8859_1_stem(struct SN_env * z) {
289
+ { int c = z->c; /* do, line 84 */
290
+ { int ret = r_mark_regions(z);
291
+ if (ret == 0) goto lab0; /* call mark_regions, line 84 */
292
+ if (ret < 0) return ret;
293
+ }
294
+ lab0:
295
+ z->c = c;
296
+ }
297
+ z->lb = z->c; z->c = z->l; /* backwards, line 85 */
298
+
299
+ { int m = z->l - z->c; (void) m; /* do, line 86 */
300
+ { int ret = r_main_suffix(z);
301
+ if (ret == 0) goto lab1; /* call main_suffix, line 86 */
302
+ if (ret < 0) return ret;
303
+ }
304
+ lab1:
305
+ z->c = z->l - m;
306
+ }
307
+ { int m = z->l - z->c; (void) m; /* do, line 87 */
308
+ { int ret = r_consonant_pair(z);
309
+ if (ret == 0) goto lab2; /* call consonant_pair, line 87 */
310
+ if (ret < 0) return ret;
311
+ }
312
+ lab2:
313
+ z->c = z->l - m;
314
+ }
315
+ { int m = z->l - z->c; (void) m; /* do, line 88 */
316
+ { int ret = r_other_suffix(z);
317
+ if (ret == 0) goto lab3; /* call other_suffix, line 88 */
318
+ if (ret < 0) return ret;
319
+ }
320
+ lab3:
321
+ z->c = z->l - m;
322
+ }
323
+ { int m = z->l - z->c; (void) m; /* do, line 89 */
324
+ { int ret = r_undouble(z);
325
+ if (ret == 0) goto lab4; /* call undouble, line 89 */
326
+ if (ret < 0) return ret;
327
+ }
328
+ lab4:
329
+ z->c = z->l - m;
330
+ }
331
+ z->c = z->lb;
332
+ return 1;
333
+ }
334
+
335
+ extern struct SN_env * danish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2, 0); }
336
+
337
+ extern void danish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z); }
338
+
@@ -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_ISO_8859_1_create_env(void);
9
+ extern void danish_ISO_8859_1_close_env(struct SN_env * z);
10
+
11
+ extern int danish_ISO_8859_1_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,635 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int dutch_ISO_8859_1_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_ISO_8859_1_create_env(void);
18
+ extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
19
+
20
+ static symbol s_0_1[1] = { 0xE1 };
21
+ static symbol s_0_2[1] = { 0xE4 };
22
+ static symbol s_0_3[1] = { 0xE9 };
23
+ static symbol s_0_4[1] = { 0xEB };
24
+ static symbol s_0_5[1] = { 0xED };
25
+ static symbol s_0_6[1] = { 0xEF };
26
+ static symbol s_0_7[1] = { 0xF3 };
27
+ static symbol s_0_8[1] = { 0xF6 };
28
+ static symbol s_0_9[1] = { 0xFA };
29
+ static symbol s_0_10[1] = { 0xFC };
30
+
31
+ static struct among a_0[11] =
32
+ {
33
+ /* 0 */ { 0, 0, -1, 6, 0},
34
+ /* 1 */ { 1, s_0_1, 0, 1, 0},
35
+ /* 2 */ { 1, s_0_2, 0, 1, 0},
36
+ /* 3 */ { 1, s_0_3, 0, 2, 0},
37
+ /* 4 */ { 1, s_0_4, 0, 2, 0},
38
+ /* 5 */ { 1, s_0_5, 0, 3, 0},
39
+ /* 6 */ { 1, s_0_6, 0, 3, 0},
40
+ /* 7 */ { 1, s_0_7, 0, 4, 0},
41
+ /* 8 */ { 1, s_0_8, 0, 4, 0},
42
+ /* 9 */ { 1, s_0_9, 0, 5, 0},
43
+ /* 10 */ { 1, 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
+ if (z->c >= z->l) goto lab0;
184
+ z->c++; /* next, line 54 */
185
+ break;
186
+ }
187
+ continue;
188
+ lab0:
189
+ z->c = c;
190
+ break;
191
+ }
192
+ z->c = c_test;
193
+ }
194
+ { int c = z->c; /* try, line 57 */
195
+ z->bra = z->c; /* [, line 57 */
196
+ if (!(eq_s(z, 1, s_5))) { z->c = c; goto lab1; }
197
+ z->ket = z->c; /* ], line 57 */
198
+ { int ret;
199
+ ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
200
+ if (ret < 0) return ret;
201
+ }
202
+ lab1:
203
+ ;
204
+ }
205
+ while(1) { /* repeat, line 58 */
206
+ int c = z->c;
207
+ while(1) { /* goto, line 58 */
208
+ int c = z->c;
209
+ if (!(in_grouping(z, g_v, 97, 232))) goto lab3;
210
+ z->bra = z->c; /* [, line 59 */
211
+ { int c = z->c; /* or, line 59 */
212
+ if (!(eq_s(z, 1, s_7))) goto lab5;
213
+ z->ket = z->c; /* ], line 59 */
214
+ if (!(in_grouping(z, g_v, 97, 232))) goto lab5;
215
+ { int ret;
216
+ ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
217
+ if (ret < 0) return ret;
218
+ }
219
+ goto lab4;
220
+ lab5:
221
+ z->c = c;
222
+ if (!(eq_s(z, 1, s_9))) goto lab3;
223
+ z->ket = z->c; /* ], line 60 */
224
+ { int ret;
225
+ ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
226
+ if (ret < 0) return ret;
227
+ }
228
+ }
229
+ lab4:
230
+ z->c = c;
231
+ break;
232
+ lab3:
233
+ z->c = c;
234
+ if (z->c >= z->l) goto lab2;
235
+ z->c++; /* goto, line 58 */
236
+ }
237
+ continue;
238
+ lab2:
239
+ z->c = c;
240
+ break;
241
+ }
242
+ return 1;
243
+ }
244
+
245
+ static int r_mark_regions(struct SN_env * z) {
246
+ z->I[0] = z->l;
247
+ z->I[1] = z->l;
248
+ while(1) { /* gopast, line 69 */
249
+ if (!(in_grouping(z, g_v, 97, 232))) goto lab0;
250
+ break;
251
+ lab0:
252
+ if (z->c >= z->l) return 0;
253
+ z->c++; /* gopast, line 69 */
254
+ }
255
+ while(1) { /* gopast, line 69 */
256
+ if (!(out_grouping(z, g_v, 97, 232))) goto lab1;
257
+ break;
258
+ lab1:
259
+ if (z->c >= z->l) return 0;
260
+ z->c++; /* gopast, line 69 */
261
+ }
262
+ z->I[0] = z->c; /* setmark p1, line 69 */
263
+ /* try, line 70 */
264
+ if (!(z->I[0] < 3)) goto lab2;
265
+ z->I[0] = 3;
266
+ lab2:
267
+ while(1) { /* gopast, line 71 */
268
+ if (!(in_grouping(z, g_v, 97, 232))) goto lab3;
269
+ break;
270
+ lab3:
271
+ if (z->c >= z->l) return 0;
272
+ z->c++; /* gopast, line 71 */
273
+ }
274
+ while(1) { /* gopast, line 71 */
275
+ if (!(out_grouping(z, g_v, 97, 232))) goto lab4;
276
+ break;
277
+ lab4:
278
+ if (z->c >= z->l) return 0;
279
+ z->c++; /* gopast, line 71 */
280
+ }
281
+ z->I[1] = z->c; /* setmark p2, line 71 */
282
+ return 1;
283
+ }
284
+
285
+ static int r_postlude(struct SN_env * z) {
286
+ int among_var;
287
+ while(1) { /* repeat, line 75 */
288
+ int c = z->c;
289
+ z->bra = z->c; /* [, line 77 */
290
+ among_var = find_among(z, a_1, 3); /* substring, line 77 */
291
+ if (!(among_var)) goto lab0;
292
+ z->ket = z->c; /* ], line 77 */
293
+ switch(among_var) {
294
+ case 0: goto lab0;
295
+ case 1:
296
+ { int ret;
297
+ ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
298
+ if (ret < 0) return ret;
299
+ }
300
+ break;
301
+ case 2:
302
+ { int ret;
303
+ ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
304
+ if (ret < 0) return ret;
305
+ }
306
+ break;
307
+ case 3:
308
+ if (z->c >= z->l) goto lab0;
309
+ z->c++; /* next, line 80 */
310
+ break;
311
+ }
312
+ continue;
313
+ lab0:
314
+ z->c = c;
315
+ break;
316
+ }
317
+ return 1;
318
+ }
319
+
320
+ static int r_R1(struct SN_env * z) {
321
+ if (!(z->I[0] <= z->c)) return 0;
322
+ return 1;
323
+ }
324
+
325
+ static int r_R2(struct SN_env * z) {
326
+ if (!(z->I[1] <= z->c)) return 0;
327
+ return 1;
328
+ }
329
+
330
+ static int r_undouble(struct SN_env * z) {
331
+ { int m_test = z->l - z->c; /* test, line 91 */
332
+ if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
333
+ z->c = z->l - m_test;
334
+ }
335
+ z->ket = z->c; /* [, line 91 */
336
+ if (z->c <= z->lb) return 0;
337
+ z->c--; /* next, line 91 */
338
+ z->bra = z->c; /* ], line 91 */
339
+ { int ret;
340
+ ret = slice_del(z); /* delete, line 91 */
341
+ if (ret < 0) return ret;
342
+ }
343
+ return 1;
344
+ }
345
+
346
+ static int r_e_ending(struct SN_env * z) {
347
+ z->B[0] = 0; /* unset e_found, line 95 */
348
+ z->ket = z->c; /* [, line 96 */
349
+ if (!(eq_s_b(z, 1, s_13))) return 0;
350
+ z->bra = z->c; /* ], line 96 */
351
+ { int ret = r_R1(z);
352
+ if (ret == 0) return 0; /* call R1, line 96 */
353
+ if (ret < 0) return ret;
354
+ }
355
+ { int m_test = z->l - z->c; /* test, line 96 */
356
+ if (!(out_grouping_b(z, g_v, 97, 232))) return 0;
357
+ z->c = z->l - m_test;
358
+ }
359
+ { int ret;
360
+ ret = slice_del(z); /* delete, line 96 */
361
+ if (ret < 0) return ret;
362
+ }
363
+ z->B[0] = 1; /* set e_found, line 97 */
364
+ { int ret = r_undouble(z);
365
+ if (ret == 0) return 0; /* call undouble, line 98 */
366
+ if (ret < 0) return ret;
367
+ }
368
+ return 1;
369
+ }
370
+
371
+ static int r_en_ending(struct SN_env * z) {
372
+ { int ret = r_R1(z);
373
+ if (ret == 0) return 0; /* call R1, line 102 */
374
+ if (ret < 0) return ret;
375
+ }
376
+ { int m = z->l - z->c; (void) m; /* and, line 102 */
377
+ if (!(out_grouping_b(z, g_v, 97, 232))) return 0;
378
+ z->c = z->l - m;
379
+ { int m = z->l - z->c; (void) m; /* not, line 102 */
380
+ if (!(eq_s_b(z, 3, s_14))) goto lab0;
381
+ return 0;
382
+ lab0:
383
+ z->c = z->l - m;
384
+ }
385
+ }
386
+ { int ret;
387
+ ret = slice_del(z); /* delete, line 102 */
388
+ if (ret < 0) return ret;
389
+ }
390
+ { int ret = r_undouble(z);
391
+ if (ret == 0) return 0; /* call undouble, line 103 */
392
+ if (ret < 0) return ret;
393
+ }
394
+ return 1;
395
+ }
396
+
397
+ static int r_standard_suffix(struct SN_env * z) {
398
+ int among_var;
399
+ { int m = z->l - z->c; (void) m; /* do, line 107 */
400
+ z->ket = z->c; /* [, line 108 */
401
+ among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
402
+ if (!(among_var)) goto lab0;
403
+ z->bra = z->c; /* ], line 108 */
404
+ switch(among_var) {
405
+ case 0: goto lab0;
406
+ case 1:
407
+ { int ret = r_R1(z);
408
+ if (ret == 0) goto lab0; /* call R1, line 110 */
409
+ if (ret < 0) return ret;
410
+ }
411
+ { int ret;
412
+ ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
413
+ if (ret < 0) return ret;
414
+ }
415
+ break;
416
+ case 2:
417
+ { int ret = r_en_ending(z);
418
+ if (ret == 0) goto lab0; /* call en_ending, line 113 */
419
+ if (ret < 0) return ret;
420
+ }
421
+ break;
422
+ case 3:
423
+ { int ret = r_R1(z);
424
+ if (ret == 0) goto lab0; /* call R1, line 116 */
425
+ if (ret < 0) return ret;
426
+ }
427
+ if (!(out_grouping_b(z, g_v_j, 97, 232))) goto lab0;
428
+ { int ret;
429
+ ret = slice_del(z); /* delete, line 116 */
430
+ if (ret < 0) return ret;
431
+ }
432
+ break;
433
+ }
434
+ lab0:
435
+ z->c = z->l - m;
436
+ }
437
+ { int m = z->l - z->c; (void) m; /* do, line 120 */
438
+ { int ret = r_e_ending(z);
439
+ if (ret == 0) goto lab1; /* call e_ending, line 120 */
440
+ if (ret < 0) return ret;
441
+ }
442
+ lab1:
443
+ z->c = z->l - m;
444
+ }
445
+ { int m = z->l - z->c; (void) m; /* do, line 122 */
446
+ z->ket = z->c; /* [, line 122 */
447
+ if (!(eq_s_b(z, 4, s_16))) goto lab2;
448
+ z->bra = z->c; /* ], line 122 */
449
+ { int ret = r_R2(z);
450
+ if (ret == 0) goto lab2; /* call R2, line 122 */
451
+ if (ret < 0) return ret;
452
+ }
453
+ { int m = z->l - z->c; (void) m; /* not, line 122 */
454
+ if (!(eq_s_b(z, 1, s_17))) goto lab3;
455
+ goto lab2;
456
+ lab3:
457
+ z->c = z->l - m;
458
+ }
459
+ { int ret;
460
+ ret = slice_del(z); /* delete, line 122 */
461
+ if (ret < 0) return ret;
462
+ }
463
+ z->ket = z->c; /* [, line 123 */
464
+ if (!(eq_s_b(z, 2, s_18))) goto lab2;
465
+ z->bra = z->c; /* ], line 123 */
466
+ { int ret = r_en_ending(z);
467
+ if (ret == 0) goto lab2; /* call en_ending, line 123 */
468
+ if (ret < 0) return ret;
469
+ }
470
+ lab2:
471
+ z->c = z->l - m;
472
+ }
473
+ { int m = z->l - z->c; (void) m; /* do, line 126 */
474
+ z->ket = z->c; /* [, line 127 */
475
+ among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
476
+ if (!(among_var)) goto lab4;
477
+ z->bra = z->c; /* ], line 127 */
478
+ switch(among_var) {
479
+ case 0: goto lab4;
480
+ case 1:
481
+ { int ret = r_R2(z);
482
+ if (ret == 0) goto lab4; /* call R2, line 129 */
483
+ if (ret < 0) return ret;
484
+ }
485
+ { int ret;
486
+ ret = slice_del(z); /* delete, line 129 */
487
+ if (ret < 0) return ret;
488
+ }
489
+ { int m = z->l - z->c; (void) m; /* or, line 130 */
490
+ z->ket = z->c; /* [, line 130 */
491
+ if (!(eq_s_b(z, 2, s_19))) goto lab6;
492
+ z->bra = z->c; /* ], line 130 */
493
+ { int ret = r_R2(z);
494
+ if (ret == 0) goto lab6; /* call R2, line 130 */
495
+ if (ret < 0) return ret;
496
+ }
497
+ { int m = z->l - z->c; (void) m; /* not, line 130 */
498
+ if (!(eq_s_b(z, 1, s_20))) goto lab7;
499
+ goto lab6;
500
+ lab7:
501
+ z->c = z->l - m;
502
+ }
503
+ { int ret;
504
+ ret = slice_del(z); /* delete, line 130 */
505
+ if (ret < 0) return ret;
506
+ }
507
+ goto lab5;
508
+ lab6:
509
+ z->c = z->l - m;
510
+ { int ret = r_undouble(z);
511
+ if (ret == 0) goto lab4; /* call undouble, line 130 */
512
+ if (ret < 0) return ret;
513
+ }
514
+ }
515
+ lab5:
516
+ break;
517
+ case 2:
518
+ { int ret = r_R2(z);
519
+ if (ret == 0) goto lab4; /* call R2, line 133 */
520
+ if (ret < 0) return ret;
521
+ }
522
+ { int m = z->l - z->c; (void) m; /* not, line 133 */
523
+ if (!(eq_s_b(z, 1, s_21))) goto lab8;
524
+ goto lab4;
525
+ lab8:
526
+ z->c = z->l - m;
527
+ }
528
+ { int ret;
529
+ ret = slice_del(z); /* delete, line 133 */
530
+ if (ret < 0) return ret;
531
+ }
532
+ break;
533
+ case 3:
534
+ { int ret = r_R2(z);
535
+ if (ret == 0) goto lab4; /* call R2, line 136 */
536
+ if (ret < 0) return ret;
537
+ }
538
+ { int ret;
539
+ ret = slice_del(z); /* delete, line 136 */
540
+ if (ret < 0) return ret;
541
+ }
542
+ { int ret = r_e_ending(z);
543
+ if (ret == 0) goto lab4; /* call e_ending, line 136 */
544
+ if (ret < 0) return ret;
545
+ }
546
+ break;
547
+ case 4:
548
+ { int ret = r_R2(z);
549
+ if (ret == 0) goto lab4; /* call R2, line 139 */
550
+ if (ret < 0) return ret;
551
+ }
552
+ { int ret;
553
+ ret = slice_del(z); /* delete, line 139 */
554
+ if (ret < 0) return ret;
555
+ }
556
+ break;
557
+ case 5:
558
+ { int ret = r_R2(z);
559
+ if (ret == 0) goto lab4; /* call R2, line 142 */
560
+ if (ret < 0) return ret;
561
+ }
562
+ if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
563
+ { int ret;
564
+ ret = slice_del(z); /* delete, line 142 */
565
+ if (ret < 0) return ret;
566
+ }
567
+ break;
568
+ }
569
+ lab4:
570
+ z->c = z->l - m;
571
+ }
572
+ { int m = z->l - z->c; (void) m; /* do, line 146 */
573
+ if (!(out_grouping_b(z, g_v_I, 73, 232))) goto lab9;
574
+ { int m_test = z->l - z->c; /* test, line 148 */
575
+ if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
576
+ if (!(out_grouping_b(z, g_v, 97, 232))) goto lab9;
577
+ z->c = z->l - m_test;
578
+ }
579
+ z->ket = z->c; /* [, line 152 */
580
+ if (z->c <= z->lb) goto lab9;
581
+ z->c--; /* next, line 152 */
582
+ z->bra = z->c; /* ], line 152 */
583
+ { int ret;
584
+ ret = slice_del(z); /* delete, line 152 */
585
+ if (ret < 0) return ret;
586
+ }
587
+ lab9:
588
+ z->c = z->l - m;
589
+ }
590
+ return 1;
591
+ }
592
+
593
+ extern int dutch_ISO_8859_1_stem(struct SN_env * z) {
594
+ { int c = z->c; /* do, line 159 */
595
+ { int ret = r_prelude(z);
596
+ if (ret == 0) goto lab0; /* call prelude, line 159 */
597
+ if (ret < 0) return ret;
598
+ }
599
+ lab0:
600
+ z->c = c;
601
+ }
602
+ { int c = z->c; /* do, line 160 */
603
+ { int ret = r_mark_regions(z);
604
+ if (ret == 0) goto lab1; /* call mark_regions, line 160 */
605
+ if (ret < 0) return ret;
606
+ }
607
+ lab1:
608
+ z->c = c;
609
+ }
610
+ z->lb = z->c; z->c = z->l; /* backwards, line 161 */
611
+
612
+ { int m = z->l - z->c; (void) m; /* do, line 162 */
613
+ { int ret = r_standard_suffix(z);
614
+ if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
615
+ if (ret < 0) return ret;
616
+ }
617
+ lab2:
618
+ z->c = z->l - m;
619
+ }
620
+ z->c = z->lb;
621
+ { int c = z->c; /* do, line 163 */
622
+ { int ret = r_postlude(z);
623
+ if (ret == 0) goto lab3; /* call postlude, line 163 */
624
+ if (ret < 0) return ret;
625
+ }
626
+ lab3:
627
+ z->c = c;
628
+ }
629
+ return 1;
630
+ }
631
+
632
+ extern struct SN_env * dutch_ISO_8859_1_create_env(void) { return SN_create_env(0, 2, 1); }
633
+
634
+ extern void dutch_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z); }
635
+