Line data Source code
1 : /* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
2 :
3 : #include "header.h"
4 :
5 : #ifdef __cplusplus
6 : extern "C" {
7 : #endif
8 : extern int dutch_ISO_8859_1_stem(struct SN_env * z);
9 : #ifdef __cplusplus
10 : }
11 : #endif
12 : static int r_standard_suffix(struct SN_env * z);
13 : static int r_undouble(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_en_ending(struct SN_env * z);
18 : static int r_e_ending(struct SN_env * z);
19 : static int r_postlude(struct SN_env * z);
20 : static int r_prelude(struct SN_env * z);
21 : #ifdef __cplusplus
22 : extern "C" {
23 : #endif
24 :
25 :
26 : extern struct SN_env * dutch_ISO_8859_1_create_env(void);
27 : extern void dutch_ISO_8859_1_close_env(struct SN_env * z);
28 :
29 :
30 : #ifdef __cplusplus
31 : }
32 : #endif
33 : static const symbol s_0_1[1] = { 0xE1 };
34 : static const symbol s_0_2[1] = { 0xE4 };
35 : static const symbol s_0_3[1] = { 0xE9 };
36 : static const symbol s_0_4[1] = { 0xEB };
37 : static const symbol s_0_5[1] = { 0xED };
38 : static const symbol s_0_6[1] = { 0xEF };
39 : static const symbol s_0_7[1] = { 0xF3 };
40 : static const symbol s_0_8[1] = { 0xF6 };
41 : static const symbol s_0_9[1] = { 0xFA };
42 : static const symbol s_0_10[1] = { 0xFC };
43 :
44 : static const struct among a_0[11] =
45 : {
46 : { 0, 0, -1, 6, 0},
47 : { 1, s_0_1, 0, 1, 0},
48 : { 1, s_0_2, 0, 1, 0},
49 : { 1, s_0_3, 0, 2, 0},
50 : { 1, s_0_4, 0, 2, 0},
51 : { 1, s_0_5, 0, 3, 0},
52 : { 1, s_0_6, 0, 3, 0},
53 : { 1, s_0_7, 0, 4, 0},
54 : { 1, s_0_8, 0, 4, 0},
55 : { 1, s_0_9, 0, 5, 0},
56 : { 1, s_0_10, 0, 5, 0}
57 : };
58 :
59 : static const symbol s_1_1[1] = { 'I' };
60 : static const symbol s_1_2[1] = { 'Y' };
61 :
62 : static const struct among a_1[3] =
63 : {
64 : { 0, 0, -1, 3, 0},
65 : { 1, s_1_1, 0, 2, 0},
66 : { 1, s_1_2, 0, 1, 0}
67 : };
68 :
69 : static const symbol s_2_0[2] = { 'd', 'd' };
70 : static const symbol s_2_1[2] = { 'k', 'k' };
71 : static const symbol s_2_2[2] = { 't', 't' };
72 :
73 : static const struct among a_2[3] =
74 : {
75 : { 2, s_2_0, -1, -1, 0},
76 : { 2, s_2_1, -1, -1, 0},
77 : { 2, s_2_2, -1, -1, 0}
78 : };
79 :
80 : static const symbol s_3_0[3] = { 'e', 'n', 'e' };
81 : static const symbol s_3_1[2] = { 's', 'e' };
82 : static const symbol s_3_2[2] = { 'e', 'n' };
83 : static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
84 : static const symbol s_3_4[1] = { 's' };
85 :
86 : static const struct among a_3[5] =
87 : {
88 : { 3, s_3_0, -1, 2, 0},
89 : { 2, s_3_1, -1, 3, 0},
90 : { 2, s_3_2, -1, 2, 0},
91 : { 5, s_3_3, 2, 1, 0},
92 : { 1, s_3_4, -1, 3, 0}
93 : };
94 :
95 : static const symbol s_4_0[3] = { 'e', 'n', 'd' };
96 : static const symbol s_4_1[2] = { 'i', 'g' };
97 : static const symbol s_4_2[3] = { 'i', 'n', 'g' };
98 : static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
99 : static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
100 : static const symbol s_4_5[3] = { 'b', 'a', 'r' };
101 :
102 : static const struct among a_4[6] =
103 : {
104 : { 3, s_4_0, -1, 1, 0},
105 : { 2, s_4_1, -1, 2, 0},
106 : { 3, s_4_2, -1, 1, 0},
107 : { 4, s_4_3, -1, 3, 0},
108 : { 4, s_4_4, -1, 4, 0},
109 : { 3, s_4_5, -1, 5, 0}
110 : };
111 :
112 : static const symbol s_5_0[2] = { 'a', 'a' };
113 : static const symbol s_5_1[2] = { 'e', 'e' };
114 : static const symbol s_5_2[2] = { 'o', 'o' };
115 : static const symbol s_5_3[2] = { 'u', 'u' };
116 :
117 : static const struct among a_5[4] =
118 : {
119 : { 2, s_5_0, -1, -1, 0},
120 : { 2, s_5_1, -1, -1, 0},
121 : { 2, s_5_2, -1, -1, 0},
122 : { 2, s_5_3, -1, -1, 0}
123 : };
124 :
125 : static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
126 :
127 : static const 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 };
128 :
129 : static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
130 :
131 : static const symbol s_0[] = { 'a' };
132 : static const symbol s_1[] = { 'e' };
133 : static const symbol s_2[] = { 'i' };
134 : static const symbol s_3[] = { 'o' };
135 : static const symbol s_4[] = { 'u' };
136 : static const symbol s_5[] = { 'Y' };
137 : static const symbol s_6[] = { 'I' };
138 : static const symbol s_7[] = { 'Y' };
139 : static const symbol s_8[] = { 'y' };
140 : static const symbol s_9[] = { 'i' };
141 : static const symbol s_10[] = { 'g', 'e', 'm' };
142 : static const symbol s_11[] = { 'h', 'e', 'i', 'd' };
143 : static const symbol s_12[] = { 'h', 'e', 'i', 'd' };
144 : static const symbol s_13[] = { 'e', 'n' };
145 : static const symbol s_14[] = { 'i', 'g' };
146 :
147 0 : static int r_prelude(struct SN_env * z) {
148 : int among_var;
149 0 : { int c_test1 = z->c;
150 0 : while(1) {
151 0 : int c2 = z->c;
152 0 : z->bra = z->c;
153 0 : if (z->c >= z->l || z->p[z->c + 0] >> 5 != 7 || !((340306450 >> (z->p[z->c + 0] & 0x1f)) & 1)) among_var = 6; else
154 0 : among_var = find_among(z, a_0, 11);
155 0 : z->ket = z->c;
156 0 : switch (among_var) {
157 0 : case 1:
158 0 : { int ret = slice_from_s(z, 1, s_0);
159 0 : if (ret < 0) return ret;
160 : }
161 0 : break;
162 0 : case 2:
163 0 : { int ret = slice_from_s(z, 1, s_1);
164 0 : if (ret < 0) return ret;
165 : }
166 0 : break;
167 0 : case 3:
168 0 : { int ret = slice_from_s(z, 1, s_2);
169 0 : if (ret < 0) return ret;
170 : }
171 0 : break;
172 0 : case 4:
173 0 : { int ret = slice_from_s(z, 1, s_3);
174 0 : if (ret < 0) return ret;
175 : }
176 0 : break;
177 0 : case 5:
178 0 : { int ret = slice_from_s(z, 1, s_4);
179 0 : if (ret < 0) return ret;
180 : }
181 0 : break;
182 0 : case 6:
183 0 : if (z->c >= z->l) goto lab0;
184 0 : z->c++;
185 0 : break;
186 : }
187 0 : continue;
188 0 : lab0:
189 0 : z->c = c2;
190 0 : break;
191 : }
192 0 : z->c = c_test1;
193 : }
194 0 : { int c3 = z->c;
195 0 : z->bra = z->c;
196 0 : if (z->c == z->l || z->p[z->c] != 'y') { z->c = c3; goto lab1; }
197 0 : z->c++;
198 0 : z->ket = z->c;
199 0 : { int ret = slice_from_s(z, 1, s_5);
200 0 : if (ret < 0) return ret;
201 : }
202 0 : lab1:
203 : ;
204 : }
205 0 : while(1) {
206 0 : int c4 = z->c;
207 0 : while(1) {
208 0 : int c5 = z->c;
209 0 : if (in_grouping(z, g_v, 97, 232, 0)) goto lab3;
210 0 : z->bra = z->c;
211 0 : { int c6 = z->c;
212 0 : if (z->c == z->l || z->p[z->c] != 'i') goto lab5;
213 0 : z->c++;
214 0 : z->ket = z->c;
215 0 : if (in_grouping(z, g_v, 97, 232, 0)) goto lab5;
216 0 : { int ret = slice_from_s(z, 1, s_6);
217 0 : if (ret < 0) return ret;
218 : }
219 0 : goto lab4;
220 0 : lab5:
221 0 : z->c = c6;
222 0 : if (z->c == z->l || z->p[z->c] != 'y') goto lab3;
223 0 : z->c++;
224 0 : z->ket = z->c;
225 0 : { int ret = slice_from_s(z, 1, s_7);
226 0 : if (ret < 0) return ret;
227 : }
228 : }
229 0 : lab4:
230 0 : z->c = c5;
231 0 : break;
232 0 : lab3:
233 0 : z->c = c5;
234 0 : if (z->c >= z->l) goto lab2;
235 0 : z->c++;
236 : }
237 0 : continue;
238 0 : lab2:
239 0 : z->c = c4;
240 0 : break;
241 : }
242 0 : return 1;
243 : }
244 :
245 0 : static int r_mark_regions(struct SN_env * z) {
246 0 : z->I[2] = z->l;
247 0 : z->I[1] = z->l;
248 0 : { int c_test1 = z->c;
249 0 : z->c = z->c + 3;
250 0 : if (z->c > z->l) return 0;
251 0 : z->I[0] = z->c;
252 0 : z->c = c_test1;
253 : }
254 :
255 : {
256 0 : int ret = out_grouping(z, g_v, 97, 232, 1);
257 0 : if (ret < 0) return 0;
258 0 : z->c += ret;
259 : }
260 :
261 : {
262 0 : int ret = in_grouping(z, g_v, 97, 232, 1);
263 0 : if (ret < 0) return 0;
264 0 : z->c += ret;
265 : }
266 0 : z->I[2] = z->c;
267 :
268 0 : if (z->I[2] >= z->I[0]) goto lab0;
269 0 : z->I[2] = z->I[0];
270 0 : lab0:
271 :
272 : {
273 0 : int ret = out_grouping(z, g_v, 97, 232, 1);
274 0 : if (ret < 0) return 0;
275 0 : z->c += ret;
276 : }
277 :
278 : {
279 0 : int ret = in_grouping(z, g_v, 97, 232, 1);
280 0 : if (ret < 0) return 0;
281 0 : z->c += ret;
282 : }
283 0 : z->I[1] = z->c;
284 0 : return 1;
285 : }
286 :
287 0 : static int r_postlude(struct SN_env * z) {
288 : int among_var;
289 0 : while(1) {
290 0 : int c1 = z->c;
291 0 : z->bra = z->c;
292 0 : if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
293 0 : among_var = find_among(z, a_1, 3);
294 0 : z->ket = z->c;
295 0 : switch (among_var) {
296 0 : case 1:
297 0 : { int ret = slice_from_s(z, 1, s_8);
298 0 : if (ret < 0) return ret;
299 : }
300 0 : break;
301 0 : case 2:
302 0 : { int ret = slice_from_s(z, 1, s_9);
303 0 : if (ret < 0) return ret;
304 : }
305 0 : break;
306 0 : case 3:
307 0 : if (z->c >= z->l) goto lab0;
308 0 : z->c++;
309 0 : break;
310 : }
311 0 : continue;
312 0 : lab0:
313 0 : z->c = c1;
314 0 : break;
315 : }
316 0 : return 1;
317 : }
318 :
319 0 : static int r_R1(struct SN_env * z) {
320 0 : return z->I[2] <= z->c;
321 : }
322 :
323 0 : static int r_R2(struct SN_env * z) {
324 0 : return z->I[1] <= z->c;
325 : }
326 :
327 0 : static int r_undouble(struct SN_env * z) {
328 0 : { int m_test1 = z->l - z->c;
329 0 : if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
330 0 : if (!find_among_b(z, a_2, 3)) return 0;
331 0 : z->c = z->l - m_test1;
332 : }
333 0 : z->ket = z->c;
334 0 : if (z->c <= z->lb) return 0;
335 0 : z->c--;
336 0 : z->bra = z->c;
337 0 : { int ret = slice_del(z);
338 0 : if (ret < 0) return ret;
339 : }
340 0 : return 1;
341 : }
342 :
343 0 : static int r_e_ending(struct SN_env * z) {
344 0 : z->I[3] = 0;
345 0 : z->ket = z->c;
346 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
347 0 : z->c--;
348 0 : z->bra = z->c;
349 0 : { int ret = r_R1(z);
350 0 : if (ret <= 0) return ret;
351 : }
352 0 : { int m_test1 = z->l - z->c;
353 0 : if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
354 0 : z->c = z->l - m_test1;
355 : }
356 0 : { int ret = slice_del(z);
357 0 : if (ret < 0) return ret;
358 : }
359 0 : z->I[3] = 1;
360 0 : { int ret = r_undouble(z);
361 0 : if (ret <= 0) return ret;
362 : }
363 0 : return 1;
364 : }
365 :
366 0 : static int r_en_ending(struct SN_env * z) {
367 0 : { int ret = r_R1(z);
368 0 : if (ret <= 0) return ret;
369 : }
370 0 : { int m1 = z->l - z->c; (void)m1;
371 0 : if (out_grouping_b(z, g_v, 97, 232, 0)) return 0;
372 0 : z->c = z->l - m1;
373 0 : { int m2 = z->l - z->c; (void)m2;
374 0 : if (!(eq_s_b(z, 3, s_10))) goto lab0;
375 0 : return 0;
376 0 : lab0:
377 0 : z->c = z->l - m2;
378 : }
379 : }
380 0 : { int ret = slice_del(z);
381 0 : if (ret < 0) return ret;
382 : }
383 0 : { int ret = r_undouble(z);
384 0 : if (ret <= 0) return ret;
385 : }
386 0 : return 1;
387 : }
388 :
389 0 : static int r_standard_suffix(struct SN_env * z) {
390 : int among_var;
391 0 : { int m1 = z->l - z->c; (void)m1;
392 0 : z->ket = z->c;
393 0 : if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
394 0 : among_var = find_among_b(z, a_3, 5);
395 0 : if (!among_var) goto lab0;
396 0 : z->bra = z->c;
397 0 : switch (among_var) {
398 0 : case 1:
399 0 : { int ret = r_R1(z);
400 0 : if (ret == 0) goto lab0;
401 0 : if (ret < 0) return ret;
402 : }
403 0 : { int ret = slice_from_s(z, 4, s_11);
404 0 : if (ret < 0) return ret;
405 : }
406 0 : break;
407 0 : case 2:
408 0 : { int ret = r_en_ending(z);
409 0 : if (ret == 0) goto lab0;
410 0 : if (ret < 0) return ret;
411 : }
412 0 : break;
413 0 : case 3:
414 0 : { int ret = r_R1(z);
415 0 : if (ret == 0) goto lab0;
416 0 : if (ret < 0) return ret;
417 : }
418 0 : if (out_grouping_b(z, g_v_j, 97, 232, 0)) goto lab0;
419 0 : { int ret = slice_del(z);
420 0 : if (ret < 0) return ret;
421 : }
422 0 : break;
423 : }
424 0 : lab0:
425 0 : z->c = z->l - m1;
426 : }
427 0 : { int m2 = z->l - z->c; (void)m2;
428 0 : { int ret = r_e_ending(z);
429 0 : if (ret < 0) return ret;
430 : }
431 0 : z->c = z->l - m2;
432 : }
433 0 : { int m3 = z->l - z->c; (void)m3;
434 0 : z->ket = z->c;
435 0 : if (!(eq_s_b(z, 4, s_12))) goto lab1;
436 0 : z->bra = z->c;
437 0 : { int ret = r_R2(z);
438 0 : if (ret == 0) goto lab1;
439 0 : if (ret < 0) return ret;
440 : }
441 0 : { int m4 = z->l - z->c; (void)m4;
442 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab2;
443 0 : z->c--;
444 0 : goto lab1;
445 0 : lab2:
446 0 : z->c = z->l - m4;
447 : }
448 0 : { int ret = slice_del(z);
449 0 : if (ret < 0) return ret;
450 : }
451 0 : z->ket = z->c;
452 0 : if (!(eq_s_b(z, 2, s_13))) goto lab1;
453 0 : z->bra = z->c;
454 0 : { int ret = r_en_ending(z);
455 0 : if (ret == 0) goto lab1;
456 0 : if (ret < 0) return ret;
457 : }
458 0 : lab1:
459 0 : z->c = z->l - m3;
460 : }
461 0 : { int m5 = z->l - z->c; (void)m5;
462 0 : z->ket = z->c;
463 0 : if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
464 0 : among_var = find_among_b(z, a_4, 6);
465 0 : if (!among_var) goto lab3;
466 0 : z->bra = z->c;
467 0 : switch (among_var) {
468 0 : case 1:
469 0 : { int ret = r_R2(z);
470 0 : if (ret == 0) goto lab3;
471 0 : if (ret < 0) return ret;
472 : }
473 0 : { int ret = slice_del(z);
474 0 : if (ret < 0) return ret;
475 : }
476 0 : { int m6 = z->l - z->c; (void)m6;
477 0 : z->ket = z->c;
478 0 : if (!(eq_s_b(z, 2, s_14))) goto lab5;
479 0 : z->bra = z->c;
480 0 : { int ret = r_R2(z);
481 0 : if (ret == 0) goto lab5;
482 0 : if (ret < 0) return ret;
483 : }
484 0 : { int m7 = z->l - z->c; (void)m7;
485 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
486 0 : z->c--;
487 0 : goto lab5;
488 0 : lab6:
489 0 : z->c = z->l - m7;
490 : }
491 0 : { int ret = slice_del(z);
492 0 : if (ret < 0) return ret;
493 : }
494 0 : goto lab4;
495 0 : lab5:
496 0 : z->c = z->l - m6;
497 0 : { int ret = r_undouble(z);
498 0 : if (ret == 0) goto lab3;
499 0 : if (ret < 0) return ret;
500 : }
501 : }
502 0 : lab4:
503 0 : break;
504 0 : case 2:
505 0 : { int ret = r_R2(z);
506 0 : if (ret == 0) goto lab3;
507 0 : if (ret < 0) return ret;
508 : }
509 0 : { int m8 = z->l - z->c; (void)m8;
510 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab7;
511 0 : z->c--;
512 0 : goto lab3;
513 0 : lab7:
514 0 : z->c = z->l - m8;
515 : }
516 0 : { int ret = slice_del(z);
517 0 : if (ret < 0) return ret;
518 : }
519 0 : break;
520 0 : case 3:
521 0 : { int ret = r_R2(z);
522 0 : if (ret == 0) goto lab3;
523 0 : if (ret < 0) return ret;
524 : }
525 0 : { int ret = slice_del(z);
526 0 : if (ret < 0) return ret;
527 : }
528 0 : { int ret = r_e_ending(z);
529 0 : if (ret == 0) goto lab3;
530 0 : if (ret < 0) return ret;
531 : }
532 0 : break;
533 0 : case 4:
534 0 : { int ret = r_R2(z);
535 0 : if (ret == 0) goto lab3;
536 0 : if (ret < 0) return ret;
537 : }
538 0 : { int ret = slice_del(z);
539 0 : if (ret < 0) return ret;
540 : }
541 0 : break;
542 0 : case 5:
543 0 : { int ret = r_R2(z);
544 0 : if (ret == 0) goto lab3;
545 0 : if (ret < 0) return ret;
546 : }
547 0 : if (!(z->I[3])) goto lab3;
548 0 : { int ret = slice_del(z);
549 0 : if (ret < 0) return ret;
550 : }
551 0 : break;
552 : }
553 0 : lab3:
554 0 : z->c = z->l - m5;
555 : }
556 0 : { int m9 = z->l - z->c; (void)m9;
557 0 : if (out_grouping_b(z, g_v_I, 73, 232, 0)) goto lab8;
558 0 : { int m_test10 = z->l - z->c;
559 0 : if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab8;
560 0 : if (!find_among_b(z, a_5, 4)) goto lab8;
561 0 : if (out_grouping_b(z, g_v, 97, 232, 0)) goto lab8;
562 0 : z->c = z->l - m_test10;
563 : }
564 0 : z->ket = z->c;
565 0 : if (z->c <= z->lb) goto lab8;
566 0 : z->c--;
567 0 : z->bra = z->c;
568 0 : { int ret = slice_del(z);
569 0 : if (ret < 0) return ret;
570 : }
571 0 : lab8:
572 0 : z->c = z->l - m9;
573 : }
574 0 : return 1;
575 : }
576 :
577 0 : extern int dutch_ISO_8859_1_stem(struct SN_env * z) {
578 0 : { int c1 = z->c;
579 0 : { int ret = r_prelude(z);
580 0 : if (ret < 0) return ret;
581 : }
582 0 : z->c = c1;
583 : }
584 0 : { int c2 = z->c;
585 0 : { int ret = r_mark_regions(z);
586 0 : if (ret < 0) return ret;
587 : }
588 0 : z->c = c2;
589 : }
590 0 : z->lb = z->c; z->c = z->l;
591 :
592 :
593 0 : { int ret = r_standard_suffix(z);
594 0 : if (ret < 0) return ret;
595 : }
596 0 : z->c = z->lb;
597 0 : { int c3 = z->c;
598 0 : { int ret = r_postlude(z);
599 0 : if (ret < 0) return ret;
600 : }
601 0 : z->c = c3;
602 : }
603 0 : return 1;
604 : }
605 :
606 0 : extern struct SN_env * dutch_ISO_8859_1_create_env(void) { return SN_create_env(0, 4); }
607 :
608 0 : extern void dutch_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
609 :
|