2 /* This file was generated automatically by the Snowball to ANSI C compiler */
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, 1, 0},
58 /* 1 */ { 2, s_1_1
, -1, 1, 0},
59 /* 2 */ { 2, s_1_2
, -1, 1, 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, 2, 0},
63 /* 6 */ { 2, s_1_6
, 5, 1, 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
[] = { 'i', 'g' };
127 static const symbol s_12
[] = { 'e' };
128 static const symbol s_13
[] = { 'e' };
129 static const symbol s_14
[] = { 'e', 'r' };
130 static const symbol s_15
[] = { 'e', 'n' };
132 static int r_prelude(struct SN_env
* z
) {
133 { int c_test
= z
->c
; /* test, line 30 */
134 while(1) { /* repeat, line 30 */
136 { int c2
= z
->c
; /* or, line 33 */
137 z
->bra
= z
->c
; /* [, line 32 */
138 if (!(eq_s(z
, 2, s_0
))) goto lab2
;
139 z
->ket
= z
->c
; /* ], line 32 */
140 { int ret
= slice_from_s(z
, 2, s_1
); /* <-, line 32 */
141 if (ret
< 0) return ret
;
146 { int ret
= skip_utf8(z
->p
, z
->c
, 0, z
->l
, 1);
147 if (ret
< 0) goto lab0
;
148 z
->c
= ret
; /* next, line 33 */
159 while(1) { /* repeat, line 36 */
161 while(1) { /* goto, line 36 */
163 if (in_grouping_U(z
, g_v
, 97, 252, 0)) goto lab4
;
164 z
->bra
= z
->c
; /* [, line 37 */
165 { int c5
= z
->c
; /* or, line 37 */
166 if (!(eq_s(z
, 1, s_2
))) goto lab6
;
167 z
->ket
= z
->c
; /* ], line 37 */
168 if (in_grouping_U(z
, g_v
, 97, 252, 0)) goto lab6
;
169 { int ret
= slice_from_s(z
, 1, s_3
); /* <-, line 37 */
170 if (ret
< 0) return ret
;
175 if (!(eq_s(z
, 1, s_4
))) goto lab4
;
176 z
->ket
= z
->c
; /* ], line 38 */
177 if (in_grouping_U(z
, g_v
, 97, 252, 0)) goto lab4
;
178 { int ret
= slice_from_s(z
, 1, s_5
); /* <-, line 38 */
179 if (ret
< 0) return ret
;
187 { int ret
= skip_utf8(z
->p
, z
->c
, 0, z
->l
, 1);
188 if (ret
< 0) goto lab3
;
189 z
->c
= ret
; /* goto, line 36 */
200 static int r_mark_regions(struct SN_env
* z
) {
203 { int c_test
= z
->c
; /* test, line 47 */
204 { int ret
= skip_utf8(z
->p
, z
->c
, 0, z
->l
, + 3);
205 if (ret
< 0) return 0;
206 z
->c
= ret
; /* hop, line 47 */
208 z
->I
[2] = z
->c
; /* setmark x, line 47 */
211 { /* gopast */ /* grouping v, line 49 */
212 int ret
= out_grouping_U(z
, g_v
, 97, 252, 1);
213 if (ret
< 0) return 0;
216 { /* gopast */ /* non v, line 49 */
217 int ret
= in_grouping_U(z
, g_v
, 97, 252, 1);
218 if (ret
< 0) return 0;
221 z
->I
[0] = z
->c
; /* setmark p1, line 49 */
223 if (!(z
->I
[0] < z
->I
[2])) goto lab0
;
226 { /* gopast */ /* grouping v, line 51 */
227 int ret
= out_grouping_U(z
, g_v
, 97, 252, 1);
228 if (ret
< 0) return 0;
231 { /* gopast */ /* non v, line 51 */
232 int ret
= in_grouping_U(z
, g_v
, 97, 252, 1);
233 if (ret
< 0) return 0;
236 z
->I
[1] = z
->c
; /* setmark p2, line 51 */
240 static int r_postlude(struct SN_env
* z
) {
242 while(1) { /* repeat, line 55 */
244 z
->bra
= z
->c
; /* [, line 57 */
245 among_var
= find_among(z
, a_0
, 6); /* substring, line 57 */
246 if (!(among_var
)) goto lab0
;
247 z
->ket
= z
->c
; /* ], line 57 */
251 { int ret
= slice_from_s(z
, 1, s_6
); /* <-, line 58 */
252 if (ret
< 0) return ret
;
256 { int ret
= slice_from_s(z
, 1, s_7
); /* <-, line 59 */
257 if (ret
< 0) return ret
;
261 { int ret
= slice_from_s(z
, 1, s_8
); /* <-, line 60 */
262 if (ret
< 0) return ret
;
266 { int ret
= slice_from_s(z
, 1, s_9
); /* <-, line 61 */
267 if (ret
< 0) return ret
;
271 { int ret
= slice_from_s(z
, 1, s_10
); /* <-, line 62 */
272 if (ret
< 0) return ret
;
276 { int ret
= skip_utf8(z
->p
, z
->c
, 0, z
->l
, 1);
277 if (ret
< 0) goto lab0
;
278 z
->c
= ret
; /* next, line 63 */
290 static int r_R1(struct SN_env
* z
) {
291 if (!(z
->I
[0] <= z
->c
)) return 0;
295 static int r_R2(struct SN_env
* z
) {
296 if (!(z
->I
[1] <= z
->c
)) return 0;
300 static int r_standard_suffix(struct SN_env
* z
) {
302 { int m1
= z
->l
- z
->c
; (void)m1
; /* do, line 74 */
303 z
->ket
= z
->c
; /* [, line 75 */
304 if (z
->c
<= z
->lb
|| z
->p
[z
->c
- 1] >> 5 != 3 || !((811040 >> (z
->p
[z
->c
- 1] & 0x1f)) & 1)) goto lab0
;
305 among_var
= find_among_b(z
, a_1
, 7); /* substring, line 75 */
306 if (!(among_var
)) goto lab0
;
307 z
->bra
= z
->c
; /* ], line 75 */
309 if (ret
== 0) goto lab0
; /* call R1, line 75 */
310 if (ret
< 0) return ret
;
315 { int ret
= slice_del(z
); /* delete, line 77 */
316 if (ret
< 0) return ret
;
320 if (in_grouping_b_U(z
, g_s_ending
, 98, 116, 0)) goto lab0
;
321 { int ret
= slice_del(z
); /* delete, line 80 */
322 if (ret
< 0) return ret
;
329 { int m2
= z
->l
- z
->c
; (void)m2
; /* do, line 84 */
330 z
->ket
= z
->c
; /* [, line 85 */
331 if (z
->c
- 1 <= z
->lb
|| z
->p
[z
->c
- 1] >> 5 != 3 || !((1327104 >> (z
->p
[z
->c
- 1] & 0x1f)) & 1)) goto lab1
;
332 among_var
= find_among_b(z
, a_2
, 4); /* substring, line 85 */
333 if (!(among_var
)) goto lab1
;
334 z
->bra
= z
->c
; /* ], line 85 */
336 if (ret
== 0) goto lab1
; /* call R1, line 85 */
337 if (ret
< 0) return ret
;
342 { int ret
= slice_del(z
); /* delete, line 87 */
343 if (ret
< 0) return ret
;
347 if (in_grouping_b_U(z
, g_st_ending
, 98, 116, 0)) goto lab1
;
348 { int ret
= skip_utf8(z
->p
, z
->c
, z
->lb
, z
->l
, - 3);
349 if (ret
< 0) goto lab1
;
350 z
->c
= ret
; /* hop, line 90 */
352 { int ret
= slice_del(z
); /* delete, line 90 */
353 if (ret
< 0) return ret
;
360 { int m3
= z
->l
- z
->c
; (void)m3
; /* do, line 94 */
361 z
->ket
= z
->c
; /* [, line 95 */
362 if (z
->c
- 1 <= z
->lb
|| z
->p
[z
->c
- 1] >> 5 != 3 || !((1051024 >> (z
->p
[z
->c
- 1] & 0x1f)) & 1)) goto lab2
;
363 among_var
= find_among_b(z
, a_4
, 8); /* substring, line 95 */
364 if (!(among_var
)) goto lab2
;
365 z
->bra
= z
->c
; /* ], line 95 */
367 if (ret
== 0) goto lab2
; /* call R2, line 95 */
368 if (ret
< 0) return ret
;
373 { int ret
= slice_del(z
); /* delete, line 97 */
374 if (ret
< 0) return ret
;
376 { int m_keep
= z
->l
- z
->c
;/* (void) m_keep;*/ /* try, line 98 */
377 z
->ket
= z
->c
; /* [, line 98 */
378 if (!(eq_s_b(z
, 2, s_11
))) { z
->c
= z
->l
- m_keep
; goto lab3
; }
379 z
->bra
= z
->c
; /* ], line 98 */
380 { int m4
= z
->l
- z
->c
; (void)m4
; /* not, line 98 */
381 if (!(eq_s_b(z
, 1, s_12
))) goto lab4
;
382 { z
->c
= z
->l
- m_keep
; goto lab3
; }
387 if (ret
== 0) { z
->c
= z
->l
- m_keep
; goto lab3
; } /* call R2, line 98 */
388 if (ret
< 0) return ret
;
390 { int ret
= slice_del(z
); /* delete, line 98 */
391 if (ret
< 0) return ret
;
398 { int m5
= z
->l
- z
->c
; (void)m5
; /* not, line 101 */
399 if (!(eq_s_b(z
, 1, s_13
))) goto lab5
;
404 { int ret
= slice_del(z
); /* delete, line 101 */
405 if (ret
< 0) return ret
;
409 { int ret
= slice_del(z
); /* delete, line 104 */
410 if (ret
< 0) return ret
;
412 { int m_keep
= z
->l
- z
->c
;/* (void) m_keep;*/ /* try, line 105 */
413 z
->ket
= z
->c
; /* [, line 106 */
414 { int m6
= z
->l
- z
->c
; (void)m6
; /* or, line 106 */
415 if (!(eq_s_b(z
, 2, s_14
))) goto lab8
;
419 if (!(eq_s_b(z
, 2, s_15
))) { z
->c
= z
->l
- m_keep
; goto lab6
; }
422 z
->bra
= z
->c
; /* ], line 106 */
424 if (ret
== 0) { z
->c
= z
->l
- m_keep
; goto lab6
; } /* call R1, line 106 */
425 if (ret
< 0) return ret
;
427 { int ret
= slice_del(z
); /* delete, line 106 */
428 if (ret
< 0) return ret
;
435 { int ret
= slice_del(z
); /* delete, line 110 */
436 if (ret
< 0) return ret
;
438 { int m_keep
= z
->l
- z
->c
;/* (void) m_keep;*/ /* try, line 111 */
439 z
->ket
= z
->c
; /* [, line 112 */
440 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 lab9
; }
441 among_var
= find_among_b(z
, a_3
, 2); /* substring, line 112 */
442 if (!(among_var
)) { z
->c
= z
->l
- m_keep
; goto lab9
; }
443 z
->bra
= z
->c
; /* ], line 112 */
445 if (ret
== 0) { z
->c
= z
->l
- m_keep
; goto lab9
; } /* call R2, line 112 */
446 if (ret
< 0) return ret
;
449 case 0: { z
->c
= z
->l
- m_keep
; goto lab9
; }
451 { int ret
= slice_del(z
); /* delete, line 114 */
452 if (ret
< 0) return ret
;
467 extern int german_UTF_8_stem(struct SN_env
* z
) {
468 { int c1
= z
->c
; /* do, line 125 */
469 { int ret
= r_prelude(z
);
470 if (ret
== 0) goto lab0
; /* call prelude, line 125 */
471 if (ret
< 0) return ret
;
476 { int c2
= z
->c
; /* do, line 126 */
477 { int ret
= r_mark_regions(z
);
478 if (ret
== 0) goto lab1
; /* call mark_regions, line 126 */
479 if (ret
< 0) return ret
;
484 z
->lb
= z
->c
; z
->c
= z
->l
; /* backwards, line 127 */
486 { int m3
= z
->l
- z
->c
; (void)m3
; /* do, line 128 */
487 { int ret
= r_standard_suffix(z
);
488 if (ret
== 0) goto lab2
; /* call standard_suffix, line 128 */
489 if (ret
< 0) return ret
;
495 { int c4
= z
->c
; /* do, line 129 */
496 { int ret
= r_postlude(z
);
497 if (ret
== 0) goto lab3
; /* call postlude, line 129 */
498 if (ret
< 0) return ret
;
506 extern struct SN_env
* german_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
508 extern void german_UTF_8_close_env(struct SN_env
* z
) { SN_close_env(z
, 0); }