2 /* This file was generated automatically by the Snowball to ANSI C compiler */
4 #include "../runtime/header.h"
9 extern int german_UTF_8_stem(struct SN_env * z);
13 static int r_standard_suffix(struct SN_env * z);
14 static int r_R2(struct SN_env * z);
15 static int r_R1(struct SN_env * z);
16 static int r_mark_regions(struct SN_env * z);
17 static int r_postlude(struct SN_env * z);
18 static int r_prelude(struct SN_env * z);
24 extern struct SN_env * german_UTF_8_create_env(void);
25 extern void german_UTF_8_close_env(struct SN_env * z);
31 static const symbol s_0_1[1] = { 'U' };
32 static const symbol s_0_2[1] = { 'Y' };
33 static const symbol s_0_3[2] = { 0xC3, 0xA4 };
34 static const symbol s_0_4[2] = { 0xC3, 0xB6 };
35 static const symbol s_0_5[2] = { 0xC3, 0xBC };
37 static const struct among a_0[6] =
39 /* 0 */ { 0, 0, -1, 6, 0},
40 /* 1 */ { 1, s_0_1, 0, 2, 0},
41 /* 2 */ { 1, s_0_2, 0, 1, 0},
42 /* 3 */ { 2, s_0_3, 0, 3, 0},
43 /* 4 */ { 2, s_0_4, 0, 4, 0},
44 /* 5 */ { 2, s_0_5, 0, 5, 0}
47 static const symbol s_1_0[1] = { 'e' };
48 static const symbol s_1_1[2] = { 'e', 'm' };
49 static const symbol s_1_2[2] = { 'e', 'n' };
50 static const symbol s_1_3[3] = { 'e', 'r', 'n' };
51 static const symbol s_1_4[2] = { 'e', 'r' };
52 static const symbol s_1_5[1] = { 's' };
53 static const symbol s_1_6[2] = { 'e', 's' };
55 static const struct among a_1[7] =
57 /* 0 */ { 1, s_1_0, -1, 2, 0},
58 /* 1 */ { 2, s_1_1, -1, 1, 0},
59 /* 2 */ { 2, s_1_2, -1, 2, 0},
60 /* 3 */ { 3, s_1_3, -1, 1, 0},
61 /* 4 */ { 2, s_1_4, -1, 1, 0},
62 /* 5 */ { 1, s_1_5, -1, 3, 0},
63 /* 6 */ { 2, s_1_6, 5, 2, 0}
66 static const symbol s_2_0[2] = { 'e', 'n' };
67 static const symbol s_2_1[2] = { 'e', 'r' };
68 static const symbol s_2_2[2] = { 's', 't' };
69 static const symbol s_2_3[3] = { 'e', 's', 't' };
71 static const struct among a_2[4] =
73 /* 0 */ { 2, s_2_0, -1, 1, 0},
74 /* 1 */ { 2, s_2_1, -1, 1, 0},
75 /* 2 */ { 2, s_2_2, -1, 2, 0},
76 /* 3 */ { 3, s_2_3, 2, 1, 0}
79 static const symbol s_3_0[2] = { 'i', 'g' };
80 static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
82 static const struct among a_3[2] =
84 /* 0 */ { 2, s_3_0, -1, 1, 0},
85 /* 1 */ { 4, s_3_1, -1, 1, 0}
88 static const symbol s_4_0[3] = { 'e', 'n', 'd' };
89 static const symbol s_4_1[2] = { 'i', 'g' };
90 static const symbol s_4_2[3] = { 'u', 'n', 'g' };
91 static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
92 static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
93 static const symbol s_4_5[2] = { 'i', 'k' };
94 static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
95 static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
97 static const struct among a_4[8] =
99 /* 0 */ { 3, s_4_0, -1, 1, 0},
100 /* 1 */ { 2, s_4_1, -1, 2, 0},
101 /* 2 */ { 3, s_4_2, -1, 1, 0},
102 /* 3 */ { 4, s_4_3, -1, 3, 0},
103 /* 4 */ { 4, s_4_4, -1, 2, 0},
104 /* 5 */ { 2, s_4_5, -1, 2, 0},
105 /* 6 */ { 4, s_4_6, -1, 3, 0},
106 /* 7 */ { 4, s_4_7, -1, 4, 0}
109 static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
111 static const unsigned char g_s_ending[] = { 117, 30, 5 };
113 static const unsigned char g_st_ending[] = { 117, 30, 4 };
115 static const symbol s_0[] = { 0xC3, 0x9F };
116 static const symbol s_1[] = { 's', 's' };
117 static const symbol s_2[] = { 'u' };
118 static const symbol s_3[] = { 'U' };
119 static const symbol s_4[] = { 'y' };
120 static const symbol s_5[] = { 'Y' };
121 static const symbol s_6[] = { 'y' };
122 static const symbol s_7[] = { 'u' };
123 static const symbol s_8[] = { 'a' };
124 static const symbol s_9[] = { 'o' };
125 static const symbol s_10[] = { 'u' };
126 static const symbol s_11[] = { 's' };
127 static const symbol s_12[] = { 'n', 'i', 's' };
128 static const symbol s_13[] = { 'i', 'g' };
129 static const symbol s_14[] = { 'e' };
130 static const symbol s_15[] = { 'e' };
131 static const symbol s_16[] = { 'e', 'r' };
132 static const symbol s_17[] = { 'e', 'n' };
134 static int r_prelude(struct SN_env * z) {
135 { int c_test = z->c; /* test, line 35 */
136 while(1) { /* repeat, line 35 */
138 { int c2 = z->c; /* or, line 38 */
139 z->bra = z->c; /* [, line 37 */
140 if (!(eq_s(z, 2, s_0))) goto lab2;
141 z->ket = z->c; /* ], line 37 */
142 { int ret = slice_from_s(z, 2, s_1); /* <-, line 37 */
143 if (ret < 0) return ret;
148 { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
149 if (ret < 0) goto lab0;
150 z->c = ret; /* next, line 38 */
161 while(1) { /* repeat, line 41 */
163 while(1) { /* goto, line 41 */
165 if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
166 z->bra = z->c; /* [, line 42 */
167 { int c5 = z->c; /* or, line 42 */
168 if (!(eq_s(z, 1, s_2))) goto lab6;
169 z->ket = z->c; /* ], line 42 */
170 if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
171 { int ret = slice_from_s(z, 1, s_3); /* <-, line 42 */
172 if (ret < 0) return ret;
177 if (!(eq_s(z, 1, s_4))) goto lab4;
178 z->ket = z->c; /* ], line 43 */
179 if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
180 { int ret = slice_from_s(z, 1, s_5); /* <-, line 43 */
181 if (ret < 0) return ret;
189 { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
190 if (ret < 0) goto lab3;
191 z->c = ret; /* goto, line 41 */
202 static int r_mark_regions(struct SN_env * z) {
205 { int c_test = z->c; /* test, line 52 */
206 { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
207 if (ret < 0) return 0;
208 z->c = ret; /* hop, line 52 */
210 z->I[2] = z->c; /* setmark x, line 52 */
213 { /* gopast */ /* grouping v, line 54 */
214 int ret = out_grouping_U(z, g_v, 97, 252, 1);
215 if (ret < 0) return 0;
218 { /* gopast */ /* non v, line 54 */
219 int ret = in_grouping_U(z, g_v, 97, 252, 1);
220 if (ret < 0) return 0;
223 z->I[0] = z->c; /* setmark p1, line 54 */
225 if (!(z->I[0] < z->I[2])) goto lab0;
228 { /* gopast */ /* grouping v, line 56 */
229 int ret = out_grouping_U(z, g_v, 97, 252, 1);
230 if (ret < 0) return 0;
233 { /* gopast */ /* non v, line 56 */
234 int ret = in_grouping_U(z, g_v, 97, 252, 1);
235 if (ret < 0) return 0;
238 z->I[1] = z->c; /* setmark p2, line 56 */
242 static int r_postlude(struct SN_env * z) {
244 while(1) { /* repeat, line 60 */
246 z->bra = z->c; /* [, line 62 */
247 among_var = find_among(z, a_0, 6); /* substring, line 62 */
248 if (!(among_var)) goto lab0;
249 z->ket = z->c; /* ], line 62 */
253 { int ret = slice_from_s(z, 1, s_6); /* <-, line 63 */
254 if (ret < 0) return ret;
258 { int ret = slice_from_s(z, 1, s_7); /* <-, line 64 */
259 if (ret < 0) return ret;
263 { int ret = slice_from_s(z, 1, s_8); /* <-, line 65 */
264 if (ret < 0) return ret;
268 { int ret = slice_from_s(z, 1, s_9); /* <-, line 66 */
269 if (ret < 0) return ret;
273 { int ret = slice_from_s(z, 1, s_10); /* <-, line 67 */
274 if (ret < 0) return ret;
278 { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
279 if (ret < 0) goto lab0;
280 z->c = ret; /* next, line 68 */
292 static int r_R1(struct SN_env * z) {
293 if (!(z->I[0] <= z->c)) return 0;
297 static int r_R2(struct SN_env * z) {
298 if (!(z->I[1] <= z->c)) return 0;
302 static int r_standard_suffix(struct SN_env * z) {
304 { int m1 = z->l - z->c; (void)m1; /* do, line 79 */
305 z->ket = z->c; /* [, line 80 */
306 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
307 among_var = find_among_b(z, a_1, 7); /* substring, line 80 */
308 if (!(among_var)) goto lab0;
309 z->bra = z->c; /* ], line 80 */
311 if (ret == 0) goto lab0; /* call R1, line 80 */
312 if (ret < 0) return ret;
317 { int ret = slice_del(z); /* delete, line 82 */
318 if (ret < 0) return ret;
322 { int ret = slice_del(z); /* delete, line 85 */
323 if (ret < 0) return ret;
325 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 86 */
326 z->ket = z->c; /* [, line 86 */
327 if (!(eq_s_b(z, 1, s_11))) { z->c = z->l - m_keep; goto lab1; }
328 z->bra = z->c; /* ], line 86 */
329 if (!(eq_s_b(z, 3, s_12))) { z->c = z->l - m_keep; goto lab1; }
330 { int ret = slice_del(z); /* delete, line 86 */
331 if (ret < 0) return ret;
338 if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
339 { int ret = slice_del(z); /* delete, line 89 */
340 if (ret < 0) return ret;
347 { int m2 = z->l - z->c; (void)m2; /* do, line 93 */
348 z->ket = z->c; /* [, line 94 */
349 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
350 among_var = find_among_b(z, a_2, 4); /* substring, line 94 */
351 if (!(among_var)) goto lab2;
352 z->bra = z->c; /* ], line 94 */
354 if (ret == 0) goto lab2; /* call R1, line 94 */
355 if (ret < 0) return ret;
360 { int ret = slice_del(z); /* delete, line 96 */
361 if (ret < 0) return ret;
365 if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab2;
366 { int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
367 if (ret < 0) goto lab2;
368 z->c = ret; /* hop, line 99 */
370 { int ret = slice_del(z); /* delete, line 99 */
371 if (ret < 0) return ret;
378 { int m3 = z->l - z->c; (void)m3; /* do, line 103 */
379 z->ket = z->c; /* [, line 104 */
380 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
381 among_var = find_among_b(z, a_4, 8); /* substring, line 104 */
382 if (!(among_var)) goto lab3;
383 z->bra = z->c; /* ], line 104 */
385 if (ret == 0) goto lab3; /* call R2, line 104 */
386 if (ret < 0) return ret;
391 { int ret = slice_del(z); /* delete, line 106 */
392 if (ret < 0) return ret;
394 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 107 */
395 z->ket = z->c; /* [, line 107 */
396 if (!(eq_s_b(z, 2, s_13))) { z->c = z->l - m_keep; goto lab4; }
397 z->bra = z->c; /* ], line 107 */
398 { int m4 = z->l - z->c; (void)m4; /* not, line 107 */
399 if (!(eq_s_b(z, 1, s_14))) goto lab5;
400 { z->c = z->l - m_keep; goto lab4; }
405 if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call R2, line 107 */
406 if (ret < 0) return ret;
408 { int ret = slice_del(z); /* delete, line 107 */
409 if (ret < 0) return ret;
416 { int m5 = z->l - z->c; (void)m5; /* not, line 110 */
417 if (!(eq_s_b(z, 1, s_15))) goto lab6;
422 { int ret = slice_del(z); /* delete, line 110 */
423 if (ret < 0) return ret;
427 { int ret = slice_del(z); /* delete, line 113 */
428 if (ret < 0) return ret;
430 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 114 */
431 z->ket = z->c; /* [, line 115 */
432 { int m6 = z->l - z->c; (void)m6; /* or, line 115 */
433 if (!(eq_s_b(z, 2, s_16))) goto lab9;
437 if (!(eq_s_b(z, 2, s_17))) { z->c = z->l - m_keep; goto lab7; }
440 z->bra = z->c; /* ], line 115 */
442 if (ret == 0) { z->c = z->l - m_keep; goto lab7; } /* call R1, line 115 */
443 if (ret < 0) return ret;
445 { int ret = slice_del(z); /* delete, line 115 */
446 if (ret < 0) return ret;
453 { int ret = slice_del(z); /* delete, line 119 */
454 if (ret < 0) return ret;
456 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 120 */
457 z->ket = z->c; /* [, line 121 */
458 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab10; }
459 among_var = find_among_b(z, a_3, 2); /* substring, line 121 */
460 if (!(among_var)) { z->c = z->l - m_keep; goto lab10; }
461 z->bra = z->c; /* ], line 121 */
463 if (ret == 0) { z->c = z->l - m_keep; goto lab10; } /* call R2, line 121 */
464 if (ret < 0) return ret;
467 case 0: { z->c = z->l - m_keep; goto lab10; }
469 { int ret = slice_del(z); /* delete, line 123 */
470 if (ret < 0) return ret;
485 extern int german_UTF_8_stem(struct SN_env * z) {
486 { int c1 = z->c; /* do, line 134 */
487 { int ret = r_prelude(z);
488 if (ret == 0) goto lab0; /* call prelude, line 134 */
489 if (ret < 0) return ret;
494 { int c2 = z->c; /* do, line 135 */
495 { int ret = r_mark_regions(z);
496 if (ret == 0) goto lab1; /* call mark_regions, line 135 */
497 if (ret < 0) return ret;
502 z->lb = z->c; z->c = z->l; /* backwards, line 136 */
504 { int m3 = z->l - z->c; (void)m3; /* do, line 137 */
505 { int ret = r_standard_suffix(z);
506 if (ret == 0) goto lab2; /* call standard_suffix, line 137 */
507 if (ret < 0) return ret;
513 { int c4 = z->c; /* do, line 138 */
514 { int ret = r_postlude(z);
515 if (ret == 0) goto lab3; /* call postlude, line 138 */
516 if (ret < 0) return ret;
524 extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
526 extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }