2
/* This file was generated automatically by the Snowball to ANSI C compiler */
4
#include "../runtime/header.h"
9
extern int dutch_UTF_8_stem(struct SN_env * z);
13
static int r_standard_suffix(struct SN_env * z);
14
static int r_undouble(struct SN_env * z);
15
static int r_R2(struct SN_env * z);
16
static int r_R1(struct SN_env * z);
17
static int r_mark_regions(struct SN_env * z);
18
static int r_en_ending(struct SN_env * z);
19
static int r_e_ending(struct SN_env * z);
20
static int r_postlude(struct SN_env * z);
21
static int r_prelude(struct SN_env * z);
27
extern struct SN_env * dutch_UTF_8_create_env(void);
28
extern void dutch_UTF_8_close_env(struct SN_env * z);
34
static const symbol s_0_1[2] = { 0xC3, 0xA1 };
35
static const symbol s_0_2[2] = { 0xC3, 0xA4 };
36
static const symbol s_0_3[2] = { 0xC3, 0xA9 };
37
static const symbol s_0_4[2] = { 0xC3, 0xAB };
38
static const symbol s_0_5[2] = { 0xC3, 0xAD };
39
static const symbol s_0_6[2] = { 0xC3, 0xAF };
40
static const symbol s_0_7[2] = { 0xC3, 0xB3 };
41
static const symbol s_0_8[2] = { 0xC3, 0xB6 };
42
static const symbol s_0_9[2] = { 0xC3, 0xBA };
43
static const symbol s_0_10[2] = { 0xC3, 0xBC };
45
static const struct among a_0[11] =
47
/* 0 */ { 0, 0, -1, 6, 0},
48
/* 1 */ { 2, s_0_1, 0, 1, 0},
49
/* 2 */ { 2, s_0_2, 0, 1, 0},
50
/* 3 */ { 2, s_0_3, 0, 2, 0},
51
/* 4 */ { 2, s_0_4, 0, 2, 0},
52
/* 5 */ { 2, s_0_5, 0, 3, 0},
53
/* 6 */ { 2, s_0_6, 0, 3, 0},
54
/* 7 */ { 2, s_0_7, 0, 4, 0},
55
/* 8 */ { 2, s_0_8, 0, 4, 0},
56
/* 9 */ { 2, s_0_9, 0, 5, 0},
57
/* 10 */ { 2, s_0_10, 0, 5, 0}
60
static const symbol s_1_1[1] = { 'I' };
61
static const symbol s_1_2[1] = { 'Y' };
63
static const struct among a_1[3] =
65
/* 0 */ { 0, 0, -1, 3, 0},
66
/* 1 */ { 1, s_1_1, 0, 2, 0},
67
/* 2 */ { 1, s_1_2, 0, 1, 0}
70
static const symbol s_2_0[2] = { 'd', 'd' };
71
static const symbol s_2_1[2] = { 'k', 'k' };
72
static const symbol s_2_2[2] = { 't', 't' };
74
static const struct among a_2[3] =
76
/* 0 */ { 2, s_2_0, -1, -1, 0},
77
/* 1 */ { 2, s_2_1, -1, -1, 0},
78
/* 2 */ { 2, s_2_2, -1, -1, 0}
81
static const symbol s_3_0[3] = { 'e', 'n', 'e' };
82
static const symbol s_3_1[2] = { 's', 'e' };
83
static const symbol s_3_2[2] = { 'e', 'n' };
84
static const symbol s_3_3[5] = { 'h', 'e', 'd', 'e', 'n' };
85
static const symbol s_3_4[1] = { 's' };
87
static const struct among a_3[5] =
89
/* 0 */ { 3, s_3_0, -1, 2, 0},
90
/* 1 */ { 2, s_3_1, -1, 3, 0},
91
/* 2 */ { 2, s_3_2, -1, 2, 0},
92
/* 3 */ { 5, s_3_3, 2, 1, 0},
93
/* 4 */ { 1, s_3_4, -1, 3, 0}
96
static const symbol s_4_0[3] = { 'e', 'n', 'd' };
97
static const symbol s_4_1[2] = { 'i', 'g' };
98
static const symbol s_4_2[3] = { 'i', 'n', 'g' };
99
static const symbol s_4_3[4] = { 'l', 'i', 'j', 'k' };
100
static const symbol s_4_4[4] = { 'b', 'a', 'a', 'r' };
101
static const symbol s_4_5[3] = { 'b', 'a', 'r' };
103
static const struct among a_4[6] =
105
/* 0 */ { 3, s_4_0, -1, 1, 0},
106
/* 1 */ { 2, s_4_1, -1, 2, 0},
107
/* 2 */ { 3, s_4_2, -1, 1, 0},
108
/* 3 */ { 4, s_4_3, -1, 3, 0},
109
/* 4 */ { 4, s_4_4, -1, 4, 0},
110
/* 5 */ { 3, s_4_5, -1, 5, 0}
113
static const symbol s_5_0[2] = { 'a', 'a' };
114
static const symbol s_5_1[2] = { 'e', 'e' };
115
static const symbol s_5_2[2] = { 'o', 'o' };
116
static const symbol s_5_3[2] = { 'u', 'u' };
118
static const struct among a_5[4] =
120
/* 0 */ { 2, s_5_0, -1, -1, 0},
121
/* 1 */ { 2, s_5_1, -1, -1, 0},
122
/* 2 */ { 2, s_5_2, -1, -1, 0},
123
/* 3 */ { 2, s_5_3, -1, -1, 0}
126
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
128
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 };
130
static const unsigned char g_v_j[] = { 17, 67, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
132
static const symbol s_0[] = { 'a' };
133
static const symbol s_1[] = { 'e' };
134
static const symbol s_2[] = { 'i' };
135
static const symbol s_3[] = { 'o' };
136
static const symbol s_4[] = { 'u' };
137
static const symbol s_5[] = { 'y' };
138
static const symbol s_6[] = { 'Y' };
139
static const symbol s_7[] = { 'i' };
140
static const symbol s_8[] = { 'I' };
141
static const symbol s_9[] = { 'y' };
142
static const symbol s_10[] = { 'Y' };
143
static const symbol s_11[] = { 'y' };
144
static const symbol s_12[] = { 'i' };
145
static const symbol s_13[] = { 'e' };
146
static const symbol s_14[] = { 'g', 'e', 'm' };
147
static const symbol s_15[] = { 'h', 'e', 'i', 'd' };
148
static const symbol s_16[] = { 'h', 'e', 'i', 'd' };
149
static const symbol s_17[] = { 'c' };
150
static const symbol s_18[] = { 'e', 'n' };
151
static const symbol s_19[] = { 'i', 'g' };
152
static const symbol s_20[] = { 'e' };
153
static const symbol s_21[] = { 'e' };
155
static int r_prelude(struct SN_env * z) {
157
{ int c_test = z->c; /* test, line 42 */
158
while(1) { /* repeat, line 42 */
160
z->bra = z->c; /* [, line 43 */
161
if (z->c + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 0x1f)) & 1)) among_var = 6; else
162
among_var = find_among(z, a_0, 11); /* substring, line 43 */
163
if (!(among_var)) goto lab0;
164
z->ket = z->c; /* ], line 43 */
168
{ int ret = slice_from_s(z, 1, s_0); /* <-, line 45 */
169
if (ret < 0) return ret;
173
{ int ret = slice_from_s(z, 1, s_1); /* <-, line 47 */
174
if (ret < 0) return ret;
178
{ int ret = slice_from_s(z, 1, s_2); /* <-, line 49 */
179
if (ret < 0) return ret;
183
{ int ret = slice_from_s(z, 1, s_3); /* <-, line 51 */
184
if (ret < 0) return ret;
188
{ int ret = slice_from_s(z, 1, s_4); /* <-, line 53 */
189
if (ret < 0) return ret;
193
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
194
if (ret < 0) goto lab0;
195
z->c = ret; /* next, line 54 */
206
{ int c_keep = z->c; /* try, line 57 */
207
z->bra = z->c; /* [, line 57 */
208
if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
209
z->ket = z->c; /* ], line 57 */
210
{ int ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
211
if (ret < 0) return ret;
216
while(1) { /* repeat, line 58 */
218
while(1) { /* goto, line 58 */
220
if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab3;
221
z->bra = z->c; /* [, line 59 */
222
{ int c4 = z->c; /* or, line 59 */
223
if (!(eq_s(z, 1, s_7))) goto lab5;
224
z->ket = z->c; /* ], line 59 */
225
if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab5;
226
{ int ret = slice_from_s(z, 1, s_8); /* <-, line 59 */
227
if (ret < 0) return ret;
232
if (!(eq_s(z, 1, s_9))) goto lab3;
233
z->ket = z->c; /* ], line 60 */
234
{ int ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
235
if (ret < 0) return ret;
243
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
244
if (ret < 0) goto lab2;
245
z->c = ret; /* goto, line 58 */
256
static int r_mark_regions(struct SN_env * z) {
259
{ /* gopast */ /* grouping v, line 69 */
260
int ret = out_grouping_U(z, g_v, 97, 232, 1);
261
if (ret < 0) return 0;
264
{ /* gopast */ /* non v, line 69 */
265
int ret = in_grouping_U(z, g_v, 97, 232, 1);
266
if (ret < 0) return 0;
269
z->I[0] = z->c; /* setmark p1, line 69 */
271
if (!(z->I[0] < 3)) goto lab0;
274
{ /* gopast */ /* grouping v, line 71 */
275
int ret = out_grouping_U(z, g_v, 97, 232, 1);
276
if (ret < 0) return 0;
279
{ /* gopast */ /* non v, line 71 */
280
int ret = in_grouping_U(z, g_v, 97, 232, 1);
281
if (ret < 0) return 0;
284
z->I[1] = z->c; /* setmark p2, line 71 */
288
static int r_postlude(struct SN_env * z) {
290
while(1) { /* repeat, line 75 */
292
z->bra = z->c; /* [, line 77 */
293
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
294
among_var = find_among(z, a_1, 3); /* substring, line 77 */
295
if (!(among_var)) goto lab0;
296
z->ket = z->c; /* ], line 77 */
300
{ int ret = slice_from_s(z, 1, s_11); /* <-, line 78 */
301
if (ret < 0) return ret;
305
{ int ret = slice_from_s(z, 1, s_12); /* <-, line 79 */
306
if (ret < 0) return ret;
310
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
311
if (ret < 0) goto lab0;
312
z->c = ret; /* next, line 80 */
324
static int r_R1(struct SN_env * z) {
325
if (!(z->I[0] <= z->c)) return 0;
329
static int r_R2(struct SN_env * z) {
330
if (!(z->I[1] <= z->c)) return 0;
334
static int r_undouble(struct SN_env * z) {
335
{ int m_test = z->l - z->c; /* test, line 91 */
336
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
337
if (!(find_among_b(z, a_2, 3))) return 0; /* among, line 91 */
338
z->c = z->l - m_test;
340
z->ket = z->c; /* [, line 91 */
341
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
342
if (ret < 0) return 0;
343
z->c = ret; /* next, line 91 */
345
z->bra = z->c; /* ], line 91 */
346
{ int ret = slice_del(z); /* delete, line 91 */
347
if (ret < 0) return ret;
352
static int r_e_ending(struct SN_env * z) {
353
z->B[0] = 0; /* unset e_found, line 95 */
354
z->ket = z->c; /* [, line 96 */
355
if (!(eq_s_b(z, 1, s_13))) return 0;
356
z->bra = z->c; /* ], line 96 */
358
if (ret == 0) return 0; /* call R1, line 96 */
359
if (ret < 0) return ret;
361
{ int m_test = z->l - z->c; /* test, line 96 */
362
if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
363
z->c = z->l - m_test;
365
{ int ret = slice_del(z); /* delete, line 96 */
366
if (ret < 0) return ret;
368
z->B[0] = 1; /* set e_found, line 97 */
369
{ int ret = r_undouble(z);
370
if (ret == 0) return 0; /* call undouble, line 98 */
371
if (ret < 0) return ret;
376
static int r_en_ending(struct SN_env * z) {
378
if (ret == 0) return 0; /* call R1, line 102 */
379
if (ret < 0) return ret;
381
{ int m1 = z->l - z->c; (void)m1; /* and, line 102 */
382
if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
384
{ int m2 = z->l - z->c; (void)m2; /* not, line 102 */
385
if (!(eq_s_b(z, 3, s_14))) goto lab0;
391
{ int ret = slice_del(z); /* delete, line 102 */
392
if (ret < 0) return ret;
394
{ int ret = r_undouble(z);
395
if (ret == 0) return 0; /* call undouble, line 103 */
396
if (ret < 0) return ret;
401
static int r_standard_suffix(struct SN_env * z) {
403
{ int m1 = z->l - z->c; (void)m1; /* do, line 107 */
404
z->ket = z->c; /* [, line 108 */
405
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
406
among_var = find_among_b(z, a_3, 5); /* substring, line 108 */
407
if (!(among_var)) goto lab0;
408
z->bra = z->c; /* ], line 108 */
413
if (ret == 0) goto lab0; /* call R1, line 110 */
414
if (ret < 0) return ret;
416
{ int ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
417
if (ret < 0) return ret;
421
{ int ret = r_en_ending(z);
422
if (ret == 0) goto lab0; /* call en_ending, line 113 */
423
if (ret < 0) return ret;
428
if (ret == 0) goto lab0; /* call R1, line 116 */
429
if (ret < 0) return ret;
431
if (out_grouping_b_U(z, g_v_j, 97, 232, 0)) goto lab0;
432
{ int ret = slice_del(z); /* delete, line 116 */
433
if (ret < 0) return ret;
440
{ int m2 = z->l - z->c; (void)m2; /* do, line 120 */
441
{ int ret = r_e_ending(z);
442
if (ret == 0) goto lab1; /* call e_ending, line 120 */
443
if (ret < 0) return ret;
448
{ int m3 = z->l - z->c; (void)m3; /* do, line 122 */
449
z->ket = z->c; /* [, line 122 */
450
if (!(eq_s_b(z, 4, s_16))) goto lab2;
451
z->bra = z->c; /* ], line 122 */
453
if (ret == 0) goto lab2; /* call R2, line 122 */
454
if (ret < 0) return ret;
456
{ int m4 = z->l - z->c; (void)m4; /* not, line 122 */
457
if (!(eq_s_b(z, 1, s_17))) goto lab3;
462
{ int ret = slice_del(z); /* delete, line 122 */
463
if (ret < 0) return ret;
465
z->ket = z->c; /* [, line 123 */
466
if (!(eq_s_b(z, 2, s_18))) goto lab2;
467
z->bra = z->c; /* ], line 123 */
468
{ int ret = r_en_ending(z);
469
if (ret == 0) goto lab2; /* call en_ending, line 123 */
470
if (ret < 0) return ret;
475
{ int m5 = z->l - z->c; (void)m5; /* do, line 126 */
476
z->ket = z->c; /* [, line 127 */
477
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
478
among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
479
if (!(among_var)) goto lab4;
480
z->bra = z->c; /* ], line 127 */
485
if (ret == 0) goto lab4; /* call R2, line 129 */
486
if (ret < 0) return ret;
488
{ int ret = slice_del(z); /* delete, line 129 */
489
if (ret < 0) return ret;
491
{ int m6 = z->l - z->c; (void)m6; /* or, line 130 */
492
z->ket = z->c; /* [, line 130 */
493
if (!(eq_s_b(z, 2, s_19))) goto lab6;
494
z->bra = z->c; /* ], line 130 */
496
if (ret == 0) goto lab6; /* call R2, line 130 */
497
if (ret < 0) return ret;
499
{ int m7 = z->l - z->c; (void)m7; /* not, line 130 */
500
if (!(eq_s_b(z, 1, s_20))) goto lab7;
505
{ int ret = slice_del(z); /* delete, line 130 */
506
if (ret < 0) return ret;
511
{ int ret = r_undouble(z);
512
if (ret == 0) goto lab4; /* call undouble, line 130 */
513
if (ret < 0) return ret;
520
if (ret == 0) goto lab4; /* call R2, line 133 */
521
if (ret < 0) return ret;
523
{ int m8 = z->l - z->c; (void)m8; /* not, line 133 */
524
if (!(eq_s_b(z, 1, s_21))) goto lab8;
529
{ int ret = slice_del(z); /* delete, line 133 */
530
if (ret < 0) return ret;
535
if (ret == 0) goto lab4; /* call R2, line 136 */
536
if (ret < 0) return ret;
538
{ int ret = slice_del(z); /* delete, line 136 */
539
if (ret < 0) return ret;
541
{ int ret = r_e_ending(z);
542
if (ret == 0) goto lab4; /* call e_ending, line 136 */
543
if (ret < 0) return ret;
548
if (ret == 0) goto lab4; /* call R2, line 139 */
549
if (ret < 0) return ret;
551
{ int ret = slice_del(z); /* delete, line 139 */
552
if (ret < 0) return ret;
557
if (ret == 0) goto lab4; /* call R2, line 142 */
558
if (ret < 0) return ret;
560
if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
561
{ int ret = slice_del(z); /* delete, line 142 */
562
if (ret < 0) return ret;
569
{ int m9 = z->l - z->c; (void)m9; /* do, line 146 */
570
if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab9;
571
{ int m_test = z->l - z->c; /* test, line 148 */
572
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
573
if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
574
if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab9;
575
z->c = z->l - m_test;
577
z->ket = z->c; /* [, line 152 */
578
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
579
if (ret < 0) goto lab9;
580
z->c = ret; /* next, line 152 */
582
z->bra = z->c; /* ], line 152 */
583
{ int ret = slice_del(z); /* delete, line 152 */
584
if (ret < 0) return ret;
592
extern int dutch_UTF_8_stem(struct SN_env * z) {
593
{ int c1 = z->c; /* do, line 159 */
594
{ int ret = r_prelude(z);
595
if (ret == 0) goto lab0; /* call prelude, line 159 */
596
if (ret < 0) return ret;
601
{ int c2 = z->c; /* do, line 160 */
602
{ int ret = r_mark_regions(z);
603
if (ret == 0) goto lab1; /* call mark_regions, line 160 */
604
if (ret < 0) return ret;
609
z->lb = z->c; z->c = z->l; /* backwards, line 161 */
611
{ int m3 = z->l - z->c; (void)m3; /* do, line 162 */
612
{ int ret = r_standard_suffix(z);
613
if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
614
if (ret < 0) return ret;
620
{ int c4 = z->c; /* do, line 163 */
621
{ int ret = r_postlude(z);
622
if (ret == 0) goto lab3; /* call postlude, line 163 */
623
if (ret < 0) return ret;
631
extern struct SN_env * dutch_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
633
extern void dutch_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }