1/* This file was generated automatically by the Snowball to ISO C compiler */
2/* http://snowballstem.org/ */
3
4#include "header.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9extern int german_ISO_8859_1_stem(struct SN_env * z);
10#ifdef __cplusplus
11}
12#endif
13static int r_standard_suffix(struct SN_env * z);
14static int r_R2(struct SN_env * z);
15static int r_R1(struct SN_env * z);
16static int r_mark_regions(struct SN_env * z);
17static int r_postlude(struct SN_env * z);
18static int r_prelude(struct SN_env * z);
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23
24extern struct SN_env * german_ISO_8859_1_create_env(void);
25extern void german_ISO_8859_1_close_env(struct SN_env * z);
26
27
28#ifdef __cplusplus
29}
30#endif
31static const symbol s_0_1[1] = { 'U' };
32static const symbol s_0_2[1] = { 'Y' };
33static const symbol s_0_3[1] = { 0xE4 };
34static const symbol s_0_4[1] = { 0xF6 };
35static const symbol s_0_5[1] = { 0xFC };
36
37static const struct among a_0[6] =
38{
39/* 0 */ { 0, 0, -1, 5, 0},
40/* 1 */ { 1, s_0_1, 0, 2, 0},
41/* 2 */ { 1, s_0_2, 0, 1, 0},
42/* 3 */ { 1, s_0_3, 0, 3, 0},
43/* 4 */ { 1, s_0_4, 0, 4, 0},
44/* 5 */ { 1, s_0_5, 0, 2, 0}
45};
46
47static const symbol s_1_0[1] = { 'e' };
48static const symbol s_1_1[2] = { 'e', 'm' };
49static const symbol s_1_2[2] = { 'e', 'n' };
50static const symbol s_1_3[3] = { 'e', 'r', 'n' };
51static const symbol s_1_4[2] = { 'e', 'r' };
52static const symbol s_1_5[1] = { 's' };
53static const symbol s_1_6[2] = { 'e', 's' };
54
55static const struct among a_1[7] =
56{
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}
64};
65
66static const symbol s_2_0[2] = { 'e', 'n' };
67static const symbol s_2_1[2] = { 'e', 'r' };
68static const symbol s_2_2[2] = { 's', 't' };
69static const symbol s_2_3[3] = { 'e', 's', 't' };
70
71static const struct among a_2[4] =
72{
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}
77};
78
79static const symbol s_3_0[2] = { 'i', 'g' };
80static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
81
82static const struct among a_3[2] =
83{
84/* 0 */ { 2, s_3_0, -1, 1, 0},
85/* 1 */ { 4, s_3_1, -1, 1, 0}
86};
87
88static const symbol s_4_0[3] = { 'e', 'n', 'd' };
89static const symbol s_4_1[2] = { 'i', 'g' };
90static const symbol s_4_2[3] = { 'u', 'n', 'g' };
91static const symbol s_4_3[4] = { 'l', 'i', 'c', 'h' };
92static const symbol s_4_4[4] = { 'i', 's', 'c', 'h' };
93static const symbol s_4_5[2] = { 'i', 'k' };
94static const symbol s_4_6[4] = { 'h', 'e', 'i', 't' };
95static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
96
97static const struct among a_4[8] =
98{
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}
107};
108
109static 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 };
110
111static const unsigned char g_s_ending[] = { 117, 30, 5 };
112
113static const unsigned char g_st_ending[] = { 117, 30, 4 };
114
115static const symbol s_0[] = { 's', 's' };
116static const symbol s_1[] = { 'U' };
117static const symbol s_2[] = { 'Y' };
118static const symbol s_3[] = { 'y' };
119static const symbol s_4[] = { 'u' };
120static const symbol s_5[] = { 'a' };
121static const symbol s_6[] = { 'o' };
122static const symbol s_7[] = { 'n', 'i', 's' };
123static const symbol s_8[] = { 'i', 'g' };
124static const symbol s_9[] = { 'e', 'r' };
125static const symbol s_10[] = { 'e', 'n' };
126
127static int r_prelude(struct SN_env * z) { /* forwardmode */
128 { int c_test1 = z->c; /* test, line 35 */
129 while(1) { /* repeat, line 35 */
130 int c2 = z->c;
131 { int c3 = z->c; /* or, line 38 */
132 z->bra = z->c; /* [, line 37 */
133 if (z->c == z->l || z->p[z->c] != 0xDF) goto lab2; /* literal, line 37 */
134 z->c++;
135 z->ket = z->c; /* ], line 37 */
136 { int ret = slice_from_s(z, 2, s_0); /* <-, line 37 */
137 if (ret < 0) return ret;
138 }
139 goto lab1;
140 lab2:
141 z->c = c3;
142 if (z->c >= z->l) goto lab0;
143 z->c++; /* next, line 38 */
144 }
145 lab1:
146 continue;
147 lab0:
148 z->c = c2;
149 break;
150 }
151 z->c = c_test1;
152 }
153 while(1) { /* repeat, line 41 */
154 int c4 = z->c;
155 while(1) { /* goto, line 41 */
156 int c5 = z->c;
157 if (in_grouping(z, g_v, 97, 252, 0)) goto lab4; /* grouping v, line 42 */
158 z->bra = z->c; /* [, line 42 */
159 { int c6 = z->c; /* or, line 42 */
160 if (z->c == z->l || z->p[z->c] != 'u') goto lab6; /* literal, line 42 */
161 z->c++;
162 z->ket = z->c; /* ], line 42 */
163 if (in_grouping(z, g_v, 97, 252, 0)) goto lab6; /* grouping v, line 42 */
164 { int ret = slice_from_s(z, 1, s_1); /* <-, line 42 */
165 if (ret < 0) return ret;
166 }
167 goto lab5;
168 lab6:
169 z->c = c6;
170 if (z->c == z->l || z->p[z->c] != 'y') goto lab4; /* literal, line 43 */
171 z->c++;
172 z->ket = z->c; /* ], line 43 */
173 if (in_grouping(z, g_v, 97, 252, 0)) goto lab4; /* grouping v, line 43 */
174 { int ret = slice_from_s(z, 1, s_2); /* <-, line 43 */
175 if (ret < 0) return ret;
176 }
177 }
178 lab5:
179 z->c = c5;
180 break;
181 lab4:
182 z->c = c5;
183 if (z->c >= z->l) goto lab3;
184 z->c++; /* goto, line 41 */
185 }
186 continue;
187 lab3:
188 z->c = c4;
189 break;
190 }
191 return 1;
192}
193
194static int r_mark_regions(struct SN_env * z) { /* forwardmode */
195 z->I[0] = z->l; /* $p1 = <integer expression>, line 49 */
196 z->I[1] = z->l; /* $p2 = <integer expression>, line 50 */
197 { int c_test1 = z->c; /* test, line 52 */
198 { int ret = z->c + 3; /* hop, line 52 */
199 if (0 > ret || ret > z->l) return 0;
200 z->c = ret;
201 }
202 z->I[2] = z->c; /* setmark x, line 52 */
203 z->c = c_test1;
204 }
205 { /* gopast */ /* grouping v, line 54 */
206 int ret = out_grouping(z, g_v, 97, 252, 1);
207 if (ret < 0) return 0;
208 z->c += ret;
209 }
210 { /* gopast */ /* non v, line 54 */
211 int ret = in_grouping(z, g_v, 97, 252, 1);
212 if (ret < 0) return 0;
213 z->c += ret;
214 }
215 z->I[0] = z->c; /* setmark p1, line 54 */
216 /* try, line 55 */
217 if (!(z->I[0] < z->I[2])) goto lab0; /* $(<integer expression> < <integer expression>), line 55 */
218 z->I[0] = z->I[2]; /* $p1 = <integer expression>, line 55 */
219lab0:
220 { /* gopast */ /* grouping v, line 56 */
221 int ret = out_grouping(z, g_v, 97, 252, 1);
222 if (ret < 0) return 0;
223 z->c += ret;
224 }
225 { /* gopast */ /* non v, line 56 */
226 int ret = in_grouping(z, g_v, 97, 252, 1);
227 if (ret < 0) return 0;
228 z->c += ret;
229 }
230 z->I[1] = z->c; /* setmark p2, line 56 */
231 return 1;
232}
233
234static int r_postlude(struct SN_env * z) { /* forwardmode */
235 int among_var;
236 while(1) { /* repeat, line 60 */
237 int c1 = z->c;
238 z->bra = z->c; /* [, line 62 */
239 among_var = find_among(z, a_0, 6); /* substring, line 62 */
240 if (!(among_var)) goto lab0;
241 z->ket = z->c; /* ], line 62 */
242 switch (among_var) { /* among, line 62 */
243 case 1:
244 { int ret = slice_from_s(z, 1, s_3); /* <-, line 63 */
245 if (ret < 0) return ret;
246 }
247 break;
248 case 2:
249 { int ret = slice_from_s(z, 1, s_4); /* <-, line 64 */
250 if (ret < 0) return ret;
251 }
252 break;
253 case 3:
254 { int ret = slice_from_s(z, 1, s_5); /* <-, line 65 */
255 if (ret < 0) return ret;
256 }
257 break;
258 case 4:
259 { int ret = slice_from_s(z, 1, s_6); /* <-, line 66 */
260 if (ret < 0) return ret;
261 }
262 break;
263 case 5:
264 if (z->c >= z->l) goto lab0;
265 z->c++; /* next, line 68 */
266 break;
267 }
268 continue;
269 lab0:
270 z->c = c1;
271 break;
272 }
273 return 1;
274}
275
276static int r_R1(struct SN_env * z) { /* backwardmode */
277 if (!(z->I[0] <= z->c)) return 0; /* $(<integer expression> <= <integer expression>), line 75 */
278 return 1;
279}
280
281static int r_R2(struct SN_env * z) { /* backwardmode */
282 if (!(z->I[1] <= z->c)) return 0; /* $(<integer expression> <= <integer expression>), line 76 */
283 return 1;
284}
285
286static int r_standard_suffix(struct SN_env * z) { /* backwardmode */
287 int among_var;
288 { int m1 = z->l - z->c; (void)m1; /* do, line 79 */
289 z->ket = z->c; /* [, line 80 */
290 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0; /* substring, line 80 */
291 among_var = find_among_b(z, a_1, 7);
292 if (!(among_var)) goto lab0;
293 z->bra = z->c; /* ], line 80 */
294 { int ret = r_R1(z); /* call R1, line 80 */
295 if (ret == 0) goto lab0;
296 if (ret < 0) return ret;
297 }
298 switch (among_var) { /* among, line 80 */
299 case 1:
300 { int ret = slice_del(z); /* delete, line 82 */
301 if (ret < 0) return ret;
302 }
303 break;
304 case 2:
305 { int ret = slice_del(z); /* delete, line 85 */
306 if (ret < 0) return ret;
307 }
308 { int m2 = z->l - z->c; (void)m2; /* try, line 86 */
309 z->ket = z->c; /* [, line 86 */
310 if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - m2; goto lab1; } /* literal, line 86 */
311 z->c--;
312 z->bra = z->c; /* ], line 86 */
313 if (!(eq_s_b(z, 3, s_7))) { z->c = z->l - m2; goto lab1; } /* literal, line 86 */
314 { int ret = slice_del(z); /* delete, line 86 */
315 if (ret < 0) return ret;
316 }
317 lab1:
318 ;
319 }
320 break;
321 case 3:
322 if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0; /* grouping s_ending, line 89 */
323 { int ret = slice_del(z); /* delete, line 89 */
324 if (ret < 0) return ret;
325 }
326 break;
327 }
328 lab0:
329 z->c = z->l - m1;
330 }
331 { int m3 = z->l - z->c; (void)m3; /* do, line 93 */
332 z->ket = z->c; /* [, line 94 */
333 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2; /* substring, line 94 */
334 among_var = find_among_b(z, a_2, 4);
335 if (!(among_var)) goto lab2;
336 z->bra = z->c; /* ], line 94 */
337 { int ret = r_R1(z); /* call R1, line 94 */
338 if (ret == 0) goto lab2;
339 if (ret < 0) return ret;
340 }
341 switch (among_var) { /* among, line 94 */
342 case 1:
343 { int ret = slice_del(z); /* delete, line 96 */
344 if (ret < 0) return ret;
345 }
346 break;
347 case 2:
348 if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab2; /* grouping st_ending, line 99 */
349 { int ret = z->c - 3; /* hop, line 99 */
350 if (z->lb > ret || ret > z->l) goto lab2;
351 z->c = ret;
352 }
353 { int ret = slice_del(z); /* delete, line 99 */
354 if (ret < 0) return ret;
355 }
356 break;
357 }
358 lab2:
359 z->c = z->l - m3;
360 }
361 { int m4 = z->l - z->c; (void)m4; /* do, line 103 */
362 z->ket = z->c; /* [, line 104 */
363 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3; /* substring, line 104 */
364 among_var = find_among_b(z, a_4, 8);
365 if (!(among_var)) goto lab3;
366 z->bra = z->c; /* ], line 104 */
367 { int ret = r_R2(z); /* call R2, line 104 */
368 if (ret == 0) goto lab3;
369 if (ret < 0) return ret;
370 }
371 switch (among_var) { /* among, line 104 */
372 case 1:
373 { int ret = slice_del(z); /* delete, line 106 */
374 if (ret < 0) return ret;
375 }
376 { int m5 = z->l - z->c; (void)m5; /* try, line 107 */
377 z->ket = z->c; /* [, line 107 */
378 if (!(eq_s_b(z, 2, s_8))) { z->c = z->l - m5; goto lab4; } /* literal, line 107 */
379 z->bra = z->c; /* ], line 107 */
380 { int m6 = z->l - z->c; (void)m6; /* not, line 107 */
381 if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab5; /* literal, line 107 */
382 z->c--;
383 { z->c = z->l - m5; goto lab4; }
384 lab5:
385 z->c = z->l - m6;
386 }
387 { int ret = r_R2(z); /* call R2, line 107 */
388 if (ret == 0) { z->c = z->l - m5; goto lab4; }
389 if (ret < 0) return ret;
390 }
391 { int ret = slice_del(z); /* delete, line 107 */
392 if (ret < 0) return ret;
393 }
394 lab4:
395 ;
396 }
397 break;
398 case 2:
399 { int m7 = z->l - z->c; (void)m7; /* not, line 110 */
400 if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6; /* literal, line 110 */
401 z->c--;
402 goto lab3;
403 lab6:
404 z->c = z->l - m7;
405 }
406 { int ret = slice_del(z); /* delete, line 110 */
407 if (ret < 0) return ret;
408 }
409 break;
410 case 3:
411 { int ret = slice_del(z); /* delete, line 113 */
412 if (ret < 0) return ret;
413 }
414 { int m8 = z->l - z->c; (void)m8; /* try, line 114 */
415 z->ket = z->c; /* [, line 115 */
416 { int m9 = z->l - z->c; (void)m9; /* or, line 115 */
417 if (!(eq_s_b(z, 2, s_9))) goto lab9; /* literal, line 115 */
418 goto lab8;
419 lab9:
420 z->c = z->l - m9;
421 if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m8; goto lab7; } /* literal, line 115 */
422 }
423 lab8:
424 z->bra = z->c; /* ], line 115 */
425 { int ret = r_R1(z); /* call R1, line 115 */
426 if (ret == 0) { z->c = z->l - m8; goto lab7; }
427 if (ret < 0) return ret;
428 }
429 { int ret = slice_del(z); /* delete, line 115 */
430 if (ret < 0) return ret;
431 }
432 lab7:
433 ;
434 }
435 break;
436 case 4:
437 { int ret = slice_del(z); /* delete, line 119 */
438 if (ret < 0) return ret;
439 }
440 { int m10 = z->l - z->c; (void)m10; /* try, line 120 */
441 z->ket = z->c; /* [, line 121 */
442 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m10; goto lab10; } /* substring, line 121 */
443 if (!(find_among_b(z, a_3, 2))) { z->c = z->l - m10; goto lab10; }
444 z->bra = z->c; /* ], line 121 */
445 { int ret = r_R2(z); /* call R2, line 121 */
446 if (ret == 0) { z->c = z->l - m10; goto lab10; }
447 if (ret < 0) return ret;
448 }
449 { int ret = slice_del(z); /* delete, line 123 */
450 if (ret < 0) return ret;
451 }
452 lab10:
453 ;
454 }
455 break;
456 }
457 lab3:
458 z->c = z->l - m4;
459 }
460 return 1;
461}
462
463extern int german_ISO_8859_1_stem(struct SN_env * z) { /* forwardmode */
464 { int c1 = z->c; /* do, line 134 */
465 { int ret = r_prelude(z); /* call prelude, line 134 */
466 if (ret == 0) goto lab0;
467 if (ret < 0) return ret;
468 }
469 lab0:
470 z->c = c1;
471 }
472 { int c2 = z->c; /* do, line 135 */
473 { int ret = r_mark_regions(z); /* call mark_regions, line 135 */
474 if (ret == 0) goto lab1;
475 if (ret < 0) return ret;
476 }
477 lab1:
478 z->c = c2;
479 }
480 z->lb = z->c; z->c = z->l; /* backwards, line 136 */
481
482 /* do, line 137 */
483 { int ret = r_standard_suffix(z); /* call standard_suffix, line 137 */
484 if (ret == 0) goto lab2;
485 if (ret < 0) return ret;
486 }
487lab2:
488 z->c = z->lb;
489 { int c3 = z->c; /* do, line 138 */
490 { int ret = r_postlude(z); /* call postlude, line 138 */
491 if (ret == 0) goto lab3;
492 if (ret < 0) return ret;
493 }
494 lab3:
495 z->c = c3;
496 }
497 return 1;
498}
499
500extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3, 0); }
501
502extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
503
504