Age Owner Branch data TLA 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 finnish_UTF_8_stem(struct SN_env * z);
9 : : #ifdef __cplusplus
10 : : }
11 : : #endif
12 : : static int r_tidy(struct SN_env * z);
13 : : static int r_other_endings(struct SN_env * z);
14 : : static int r_t_plural(struct SN_env * z);
15 : : static int r_i_plural(struct SN_env * z);
16 : : static int r_case_ending(struct SN_env * z);
17 : : static int r_VI(struct SN_env * z);
18 : : static int r_LONG(struct SN_env * z);
19 : : static int r_possessive(struct SN_env * z);
20 : : static int r_particle_etc(struct SN_env * z);
21 : : static int r_R2(struct SN_env * z);
22 : : static int r_mark_regions(struct SN_env * z);
23 : : #ifdef __cplusplus
24 : : extern "C" {
25 : : #endif
26 : :
27 : :
28 : : extern struct SN_env * finnish_UTF_8_create_env(void);
29 : : extern void finnish_UTF_8_close_env(struct SN_env * z);
30 : :
31 : :
32 : : #ifdef __cplusplus
33 : : }
34 : : #endif
35 : : static const symbol s_0_0[2] = { 'p', 'a' };
36 : : static const symbol s_0_1[3] = { 's', 't', 'i' };
37 : : static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
38 : : static const symbol s_0_3[3] = { 'h', 'a', 'n' };
39 : : static const symbol s_0_4[3] = { 'k', 'i', 'n' };
40 : : static const symbol s_0_5[4] = { 'h', 0xC3, 0xA4, 'n' };
41 : : static const symbol s_0_6[6] = { 'k', 0xC3, 0xA4, 0xC3, 0xA4, 'n' };
42 : : static const symbol s_0_7[2] = { 'k', 'o' };
43 : : static const symbol s_0_8[3] = { 'p', 0xC3, 0xA4 };
44 : : static const symbol s_0_9[3] = { 'k', 0xC3, 0xB6 };
45 : :
46 : : static const struct among a_0[10] =
47 : : {
48 : : { 2, s_0_0, -1, 1, 0},
49 : : { 3, s_0_1, -1, 2, 0},
50 : : { 4, s_0_2, -1, 1, 0},
51 : : { 3, s_0_3, -1, 1, 0},
52 : : { 3, s_0_4, -1, 1, 0},
53 : : { 4, s_0_5, -1, 1, 0},
54 : : { 6, s_0_6, -1, 1, 0},
55 : : { 2, s_0_7, -1, 1, 0},
56 : : { 3, s_0_8, -1, 1, 0},
57 : : { 3, s_0_9, -1, 1, 0}
58 : : };
59 : :
60 : : static const symbol s_1_0[3] = { 'l', 'l', 'a' };
61 : : static const symbol s_1_1[2] = { 'n', 'a' };
62 : : static const symbol s_1_2[3] = { 's', 's', 'a' };
63 : : static const symbol s_1_3[2] = { 't', 'a' };
64 : : static const symbol s_1_4[3] = { 'l', 't', 'a' };
65 : : static const symbol s_1_5[3] = { 's', 't', 'a' };
66 : :
67 : : static const struct among a_1[6] =
68 : : {
69 : : { 3, s_1_0, -1, -1, 0},
70 : : { 2, s_1_1, -1, -1, 0},
71 : : { 3, s_1_2, -1, -1, 0},
72 : : { 2, s_1_3, -1, -1, 0},
73 : : { 3, s_1_4, 3, -1, 0},
74 : : { 3, s_1_5, 3, -1, 0}
75 : : };
76 : :
77 : : static const symbol s_2_0[4] = { 'l', 'l', 0xC3, 0xA4 };
78 : : static const symbol s_2_1[3] = { 'n', 0xC3, 0xA4 };
79 : : static const symbol s_2_2[4] = { 's', 's', 0xC3, 0xA4 };
80 : : static const symbol s_2_3[3] = { 't', 0xC3, 0xA4 };
81 : : static const symbol s_2_4[4] = { 'l', 't', 0xC3, 0xA4 };
82 : : static const symbol s_2_5[4] = { 's', 't', 0xC3, 0xA4 };
83 : :
84 : : static const struct among a_2[6] =
85 : : {
86 : : { 4, s_2_0, -1, -1, 0},
87 : : { 3, s_2_1, -1, -1, 0},
88 : : { 4, s_2_2, -1, -1, 0},
89 : : { 3, s_2_3, -1, -1, 0},
90 : : { 4, s_2_4, 3, -1, 0},
91 : : { 4, s_2_5, 3, -1, 0}
92 : : };
93 : :
94 : : static const symbol s_3_0[3] = { 'l', 'l', 'e' };
95 : : static const symbol s_3_1[3] = { 'i', 'n', 'e' };
96 : :
97 : : static const struct among a_3[2] =
98 : : {
99 : : { 3, s_3_0, -1, -1, 0},
100 : : { 3, s_3_1, -1, -1, 0}
101 : : };
102 : :
103 : : static const symbol s_4_0[3] = { 'n', 's', 'a' };
104 : : static const symbol s_4_1[3] = { 'm', 'm', 'e' };
105 : : static const symbol s_4_2[3] = { 'n', 'n', 'e' };
106 : : static const symbol s_4_3[2] = { 'n', 'i' };
107 : : static const symbol s_4_4[2] = { 's', 'i' };
108 : : static const symbol s_4_5[2] = { 'a', 'n' };
109 : : static const symbol s_4_6[2] = { 'e', 'n' };
110 : : static const symbol s_4_7[3] = { 0xC3, 0xA4, 'n' };
111 : : static const symbol s_4_8[4] = { 'n', 's', 0xC3, 0xA4 };
112 : :
113 : : static const struct among a_4[9] =
114 : : {
115 : : { 3, s_4_0, -1, 3, 0},
116 : : { 3, s_4_1, -1, 3, 0},
117 : : { 3, s_4_2, -1, 3, 0},
118 : : { 2, s_4_3, -1, 2, 0},
119 : : { 2, s_4_4, -1, 1, 0},
120 : : { 2, s_4_5, -1, 4, 0},
121 : : { 2, s_4_6, -1, 6, 0},
122 : : { 3, s_4_7, -1, 5, 0},
123 : : { 4, s_4_8, -1, 3, 0}
124 : : };
125 : :
126 : : static const symbol s_5_0[2] = { 'a', 'a' };
127 : : static const symbol s_5_1[2] = { 'e', 'e' };
128 : : static const symbol s_5_2[2] = { 'i', 'i' };
129 : : static const symbol s_5_3[2] = { 'o', 'o' };
130 : : static const symbol s_5_4[2] = { 'u', 'u' };
131 : : static const symbol s_5_5[4] = { 0xC3, 0xA4, 0xC3, 0xA4 };
132 : : static const symbol s_5_6[4] = { 0xC3, 0xB6, 0xC3, 0xB6 };
133 : :
134 : : static const struct among a_5[7] =
135 : : {
136 : : { 2, s_5_0, -1, -1, 0},
137 : : { 2, s_5_1, -1, -1, 0},
138 : : { 2, s_5_2, -1, -1, 0},
139 : : { 2, s_5_3, -1, -1, 0},
140 : : { 2, s_5_4, -1, -1, 0},
141 : : { 4, s_5_5, -1, -1, 0},
142 : : { 4, s_5_6, -1, -1, 0}
143 : : };
144 : :
145 : : static const symbol s_6_0[1] = { 'a' };
146 : : static const symbol s_6_1[3] = { 'l', 'l', 'a' };
147 : : static const symbol s_6_2[2] = { 'n', 'a' };
148 : : static const symbol s_6_3[3] = { 's', 's', 'a' };
149 : : static const symbol s_6_4[2] = { 't', 'a' };
150 : : static const symbol s_6_5[3] = { 'l', 't', 'a' };
151 : : static const symbol s_6_6[3] = { 's', 't', 'a' };
152 : : static const symbol s_6_7[3] = { 't', 't', 'a' };
153 : : static const symbol s_6_8[3] = { 'l', 'l', 'e' };
154 : : static const symbol s_6_9[3] = { 'i', 'n', 'e' };
155 : : static const symbol s_6_10[3] = { 'k', 's', 'i' };
156 : : static const symbol s_6_11[1] = { 'n' };
157 : : static const symbol s_6_12[3] = { 'h', 'a', 'n' };
158 : : static const symbol s_6_13[3] = { 'd', 'e', 'n' };
159 : : static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
160 : : static const symbol s_6_15[3] = { 'h', 'e', 'n' };
161 : : static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
162 : : static const symbol s_6_17[3] = { 'h', 'i', 'n' };
163 : : static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
164 : : static const symbol s_6_19[3] = { 'h', 'o', 'n' };
165 : : static const symbol s_6_20[4] = { 'h', 0xC3, 0xA4, 'n' };
166 : : static const symbol s_6_21[4] = { 'h', 0xC3, 0xB6, 'n' };
167 : : static const symbol s_6_22[2] = { 0xC3, 0xA4 };
168 : : static const symbol s_6_23[4] = { 'l', 'l', 0xC3, 0xA4 };
169 : : static const symbol s_6_24[3] = { 'n', 0xC3, 0xA4 };
170 : : static const symbol s_6_25[4] = { 's', 's', 0xC3, 0xA4 };
171 : : static const symbol s_6_26[3] = { 't', 0xC3, 0xA4 };
172 : : static const symbol s_6_27[4] = { 'l', 't', 0xC3, 0xA4 };
173 : : static const symbol s_6_28[4] = { 's', 't', 0xC3, 0xA4 };
174 : : static const symbol s_6_29[4] = { 't', 't', 0xC3, 0xA4 };
175 : :
176 : : static const struct among a_6[30] =
177 : : {
178 : : { 1, s_6_0, -1, 8, 0},
179 : : { 3, s_6_1, 0, -1, 0},
180 : : { 2, s_6_2, 0, -1, 0},
181 : : { 3, s_6_3, 0, -1, 0},
182 : : { 2, s_6_4, 0, -1, 0},
183 : : { 3, s_6_5, 4, -1, 0},
184 : : { 3, s_6_6, 4, -1, 0},
185 : : { 3, s_6_7, 4, 2, 0},
186 : : { 3, s_6_8, -1, -1, 0},
187 : : { 3, s_6_9, -1, -1, 0},
188 : : { 3, s_6_10, -1, -1, 0},
189 : : { 1, s_6_11, -1, 7, 0},
190 : : { 3, s_6_12, 11, 1, 0},
191 : : { 3, s_6_13, 11, -1, r_VI},
192 : : { 4, s_6_14, 11, -1, r_LONG},
193 : : { 3, s_6_15, 11, 2, 0},
194 : : { 4, s_6_16, 11, -1, r_VI},
195 : : { 3, s_6_17, 11, 3, 0},
196 : : { 4, s_6_18, 11, -1, r_VI},
197 : : { 3, s_6_19, 11, 4, 0},
198 : : { 4, s_6_20, 11, 5, 0},
199 : : { 4, s_6_21, 11, 6, 0},
200 : : { 2, s_6_22, -1, 8, 0},
201 : : { 4, s_6_23, 22, -1, 0},
202 : : { 3, s_6_24, 22, -1, 0},
203 : : { 4, s_6_25, 22, -1, 0},
204 : : { 3, s_6_26, 22, -1, 0},
205 : : { 4, s_6_27, 26, -1, 0},
206 : : { 4, s_6_28, 26, -1, 0},
207 : : { 4, s_6_29, 26, 2, 0}
208 : : };
209 : :
210 : : static const symbol s_7_0[3] = { 'e', 'j', 'a' };
211 : : static const symbol s_7_1[3] = { 'm', 'm', 'a' };
212 : : static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
213 : : static const symbol s_7_3[3] = { 'm', 'p', 'a' };
214 : : static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
215 : : static const symbol s_7_5[3] = { 'm', 'm', 'i' };
216 : : static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
217 : : static const symbol s_7_7[3] = { 'm', 'p', 'i' };
218 : : static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
219 : : static const symbol s_7_9[4] = { 'e', 'j', 0xC3, 0xA4 };
220 : : static const symbol s_7_10[4] = { 'm', 'm', 0xC3, 0xA4 };
221 : : static const symbol s_7_11[5] = { 'i', 'm', 'm', 0xC3, 0xA4 };
222 : : static const symbol s_7_12[4] = { 'm', 'p', 0xC3, 0xA4 };
223 : : static const symbol s_7_13[5] = { 'i', 'm', 'p', 0xC3, 0xA4 };
224 : :
225 : : static const struct among a_7[14] =
226 : : {
227 : : { 3, s_7_0, -1, -1, 0},
228 : : { 3, s_7_1, -1, 1, 0},
229 : : { 4, s_7_2, 1, -1, 0},
230 : : { 3, s_7_3, -1, 1, 0},
231 : : { 4, s_7_4, 3, -1, 0},
232 : : { 3, s_7_5, -1, 1, 0},
233 : : { 4, s_7_6, 5, -1, 0},
234 : : { 3, s_7_7, -1, 1, 0},
235 : : { 4, s_7_8, 7, -1, 0},
236 : : { 4, s_7_9, -1, -1, 0},
237 : : { 4, s_7_10, -1, 1, 0},
238 : : { 5, s_7_11, 10, -1, 0},
239 : : { 4, s_7_12, -1, 1, 0},
240 : : { 5, s_7_13, 12, -1, 0}
241 : : };
242 : :
243 : : static const symbol s_8_0[1] = { 'i' };
244 : : static const symbol s_8_1[1] = { 'j' };
245 : :
246 : : static const struct among a_8[2] =
247 : : {
248 : : { 1, s_8_0, -1, -1, 0},
249 : : { 1, s_8_1, -1, -1, 0}
250 : : };
251 : :
252 : : static const symbol s_9_0[3] = { 'm', 'm', 'a' };
253 : : static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
254 : :
255 : : static const struct among a_9[2] =
256 : : {
257 : : { 3, s_9_0, -1, 1, 0},
258 : : { 4, s_9_1, 0, -1, 0}
259 : : };
260 : :
261 : : static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
262 : :
263 : : static const unsigned char g_C[] = { 119, 223, 119, 1 };
264 : :
265 : : static const unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
266 : :
267 : : static const unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
268 : :
269 : : static const unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
270 : :
271 : : static const symbol s_0[] = { 'k', 's', 'e' };
272 : : static const symbol s_1[] = { 'k', 's', 'i' };
273 : : static const symbol s_2[] = { 0xC3, 0xA4 };
274 : : static const symbol s_3[] = { 0xC3, 0xB6 };
275 : : static const symbol s_4[] = { 'i', 'e' };
276 : : static const symbol s_5[] = { 'p', 'o' };
277 : : static const symbol s_6[] = { 'p', 'o' };
278 : :
1660 peter@eisentraut.org 279 :UBC 0 : static int r_mark_regions(struct SN_env * z) {
280 : 0 : z->I[1] = z->l;
281 : 0 : z->I[0] = z->l;
282 : :
283 [ # # ]: 0 : if (out_grouping_U(z, g_V1, 97, 246, 1) < 0) return 0;
284 : :
285 : : {
6591 tgl@sss.pgh.pa.us 286 : 0 : int ret = in_grouping_U(z, g_V1, 97, 246, 1);
287 [ # # ]: 0 : if (ret < 0) return 0;
288 : 0 : z->c += ret;
289 : : }
1660 peter@eisentraut.org 290 : 0 : z->I[1] = z->c;
291 : :
292 [ # # ]: 0 : if (out_grouping_U(z, g_V1, 97, 246, 1) < 0) return 0;
293 : :
294 : : {
6591 tgl@sss.pgh.pa.us 295 : 0 : int ret = in_grouping_U(z, g_V1, 97, 246, 1);
296 [ # # ]: 0 : if (ret < 0) return 0;
297 : 0 : z->c += ret;
298 : : }
1660 peter@eisentraut.org 299 : 0 : z->I[0] = z->c;
6591 tgl@sss.pgh.pa.us 300 : 0 : return 1;
301 : : }
302 : :
1660 peter@eisentraut.org 303 : 0 : static int r_R2(struct SN_env * z) {
200 tgl@sss.pgh.pa.us 304 : 0 : return z->I[0] <= z->c;
305 : : }
306 : :
1660 peter@eisentraut.org 307 : 0 : static int r_particle_etc(struct SN_env * z) {
308 : : int among_var;
309 : :
310 : : { int mlimit1;
311 [ # # ]: 0 : if (z->c < z->I[1]) return 0;
312 : 0 : mlimit1 = z->lb; z->lb = z->I[1];
313 : 0 : z->ket = z->c;
314 : 0 : among_var = find_among_b(z, a_0, 10);
200 tgl@sss.pgh.pa.us 315 [ # # ]: 0 : if (!among_var) { z->lb = mlimit1; return 0; }
1660 peter@eisentraut.org 316 : 0 : z->bra = z->c;
2539 tgl@sss.pgh.pa.us 317 : 0 : z->lb = mlimit1;
318 : : }
1660 peter@eisentraut.org 319 [ # # # ]: 0 : switch (among_var) {
6591 tgl@sss.pgh.pa.us 320 : 0 : case 1:
1660 peter@eisentraut.org 321 [ # # ]: 0 : if (in_grouping_b_U(z, g_particle_end, 97, 246, 0)) return 0;
6591 tgl@sss.pgh.pa.us 322 : 0 : break;
323 : 0 : case 2:
1660 peter@eisentraut.org 324 : 0 : { int ret = r_R2(z);
2539 tgl@sss.pgh.pa.us 325 [ # # ]: 0 : if (ret <= 0) return ret;
326 : : }
6591 327 : 0 : break;
328 : : }
1660 peter@eisentraut.org 329 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 330 [ # # ]: 0 : if (ret < 0) return ret;
331 : : }
332 : 0 : return 1;
333 : : }
334 : :
1660 peter@eisentraut.org 335 : 0 : static int r_possessive(struct SN_env * z) {
336 : : int among_var;
337 : :
338 : : { int mlimit1;
339 [ # # ]: 0 : if (z->c < z->I[1]) return 0;
340 : 0 : mlimit1 = z->lb; z->lb = z->I[1];
341 : 0 : z->ket = z->c;
342 : 0 : among_var = find_among_b(z, a_4, 9);
200 tgl@sss.pgh.pa.us 343 [ # # ]: 0 : if (!among_var) { z->lb = mlimit1; return 0; }
1660 peter@eisentraut.org 344 : 0 : z->bra = z->c;
2539 tgl@sss.pgh.pa.us 345 : 0 : z->lb = mlimit1;
346 : : }
1660 peter@eisentraut.org 347 [ # # # # : 0 : switch (among_var) {
# # # ]
6591 tgl@sss.pgh.pa.us 348 : 0 : case 1:
1660 peter@eisentraut.org 349 : 0 : { int m2 = z->l - z->c; (void)m2;
350 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'k') goto lab0;
2539 tgl@sss.pgh.pa.us 351 : 0 : z->c--;
6591 352 : 0 : return 0;
353 : 0 : lab0:
354 : 0 : z->c = z->l - m2;
355 : : }
1660 peter@eisentraut.org 356 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 357 [ # # ]: 0 : if (ret < 0) return ret;
358 : : }
359 : 0 : break;
360 : 0 : case 2:
1660 peter@eisentraut.org 361 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 362 [ # # ]: 0 : if (ret < 0) return ret;
363 : : }
1660 peter@eisentraut.org 364 : 0 : z->ket = z->c;
365 [ # # ]: 0 : if (!(eq_s_b(z, 3, s_0))) return 0;
366 : 0 : z->bra = z->c;
367 : 0 : { int ret = slice_from_s(z, 3, s_1);
6591 tgl@sss.pgh.pa.us 368 [ # # ]: 0 : if (ret < 0) return ret;
369 : : }
370 : 0 : break;
371 : 0 : case 3:
1660 peter@eisentraut.org 372 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 373 [ # # ]: 0 : if (ret < 0) return ret;
374 : : }
375 : 0 : break;
376 : 0 : case 4:
1660 peter@eisentraut.org 377 [ # # # # ]: 0 : if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
200 tgl@sss.pgh.pa.us 378 [ # # ]: 0 : if (!find_among_b(z, a_1, 6)) return 0;
1660 peter@eisentraut.org 379 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 380 [ # # ]: 0 : if (ret < 0) return ret;
381 : : }
382 : 0 : break;
383 : 0 : case 5:
1660 peter@eisentraut.org 384 [ # # # # ]: 0 : if (z->c - 2 <= z->lb || z->p[z->c - 1] != 164) return 0;
200 tgl@sss.pgh.pa.us 385 [ # # ]: 0 : if (!find_among_b(z, a_2, 6)) return 0;
1660 peter@eisentraut.org 386 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 387 [ # # ]: 0 : if (ret < 0) return ret;
388 : : }
389 : 0 : break;
390 : 0 : case 6:
1660 peter@eisentraut.org 391 [ # # # # ]: 0 : if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
200 tgl@sss.pgh.pa.us 392 [ # # ]: 0 : if (!find_among_b(z, a_3, 2)) return 0;
1660 peter@eisentraut.org 393 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 394 [ # # ]: 0 : if (ret < 0) return ret;
395 : : }
396 : 0 : break;
397 : : }
398 : 0 : return 1;
399 : : }
400 : :
1660 peter@eisentraut.org 401 : 0 : static int r_LONG(struct SN_env * z) {
200 tgl@sss.pgh.pa.us 402 [ # # ]: 0 : if (!find_among_b(z, a_5, 7)) return 0;
6591 403 : 0 : return 1;
404 : : }
405 : :
1660 peter@eisentraut.org 406 : 0 : static int r_VI(struct SN_env * z) {
407 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'i') return 0;
2539 tgl@sss.pgh.pa.us 408 : 0 : z->c--;
1660 peter@eisentraut.org 409 [ # # ]: 0 : if (in_grouping_b_U(z, g_V2, 97, 246, 0)) return 0;
6591 tgl@sss.pgh.pa.us 410 : 0 : return 1;
411 : : }
412 : :
1660 peter@eisentraut.org 413 : 0 : static int r_case_ending(struct SN_env * z) {
414 : : int among_var;
415 : :
416 : : { int mlimit1;
417 [ # # ]: 0 : if (z->c < z->I[1]) return 0;
418 : 0 : mlimit1 = z->lb; z->lb = z->I[1];
419 : 0 : z->ket = z->c;
420 : 0 : among_var = find_among_b(z, a_6, 30);
200 tgl@sss.pgh.pa.us 421 [ # # ]: 0 : if (!among_var) { z->lb = mlimit1; return 0; }
1660 peter@eisentraut.org 422 : 0 : z->bra = z->c;
2539 tgl@sss.pgh.pa.us 423 : 0 : z->lb = mlimit1;
424 : : }
1660 peter@eisentraut.org 425 [ # # # # : 0 : switch (among_var) {
# # # #
# ]
6591 tgl@sss.pgh.pa.us 426 : 0 : case 1:
1660 peter@eisentraut.org 427 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'a') return 0;
2539 tgl@sss.pgh.pa.us 428 : 0 : z->c--;
6591 429 : 0 : break;
430 : 0 : case 2:
1660 peter@eisentraut.org 431 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
2539 tgl@sss.pgh.pa.us 432 : 0 : z->c--;
6591 433 : 0 : break;
434 : 0 : case 3:
1660 peter@eisentraut.org 435 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'i') return 0;
2539 tgl@sss.pgh.pa.us 436 : 0 : z->c--;
6591 437 : 0 : break;
438 : 0 : case 4:
1660 peter@eisentraut.org 439 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'o') return 0;
2539 tgl@sss.pgh.pa.us 440 : 0 : z->c--;
6591 441 : 0 : break;
442 : 0 : case 5:
1660 peter@eisentraut.org 443 [ # # ]: 0 : if (!(eq_s_b(z, 2, s_2))) return 0;
6591 tgl@sss.pgh.pa.us 444 : 0 : break;
445 : 0 : case 6:
1660 peter@eisentraut.org 446 [ # # ]: 0 : if (!(eq_s_b(z, 2, s_3))) return 0;
6591 tgl@sss.pgh.pa.us 447 : 0 : break;
448 : 0 : case 7:
1660 peter@eisentraut.org 449 : 0 : { int m2 = z->l - z->c; (void)m2;
450 : 0 : { int m3 = z->l - z->c; (void)m3;
451 : 0 : { int m4 = z->l - z->c; (void)m4;
452 : 0 : { int ret = r_LONG(z);
2539 tgl@sss.pgh.pa.us 453 [ # # ]: 0 : if (ret == 0) goto lab2;
6591 454 [ # # ]: 0 : if (ret < 0) return ret;
455 : : }
456 : 0 : goto lab1;
457 : 0 : lab2:
2539 458 : 0 : z->c = z->l - m4;
1660 peter@eisentraut.org 459 [ # # ]: 0 : if (!(eq_s_b(z, 2, s_4))) { z->c = z->l - m2; goto lab0; }
460 : : }
6591 tgl@sss.pgh.pa.us 461 : 0 : lab1:
2539 462 : 0 : z->c = z->l - m3;
1660 peter@eisentraut.org 463 : 0 : { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
2539 tgl@sss.pgh.pa.us 464 [ # # ]: 0 : if (ret < 0) { z->c = z->l - m2; goto lab0; }
1660 peter@eisentraut.org 465 : 0 : z->c = ret;
466 : : }
467 : : }
468 : 0 : z->bra = z->c;
6591 tgl@sss.pgh.pa.us 469 : 0 : lab0:
470 : : ;
471 : : }
472 : 0 : break;
473 : 0 : case 8:
1660 peter@eisentraut.org 474 [ # # ]: 0 : if (in_grouping_b_U(z, g_V1, 97, 246, 0)) return 0;
475 [ # # ]: 0 : if (in_grouping_b_U(z, g_C, 98, 122, 0)) return 0;
6591 tgl@sss.pgh.pa.us 476 : 0 : break;
477 : : }
1660 peter@eisentraut.org 478 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 479 [ # # ]: 0 : if (ret < 0) return ret;
480 : : }
1660 peter@eisentraut.org 481 : 0 : z->I[2] = 1;
6591 tgl@sss.pgh.pa.us 482 : 0 : return 1;
483 : : }
484 : :
1660 peter@eisentraut.org 485 : 0 : static int r_other_endings(struct SN_env * z) {
486 : : int among_var;
487 : :
488 : : { int mlimit1;
489 [ # # ]: 0 : if (z->c < z->I[0]) return 0;
490 : 0 : mlimit1 = z->lb; z->lb = z->I[0];
491 : 0 : z->ket = z->c;
492 : 0 : among_var = find_among_b(z, a_7, 14);
200 tgl@sss.pgh.pa.us 493 [ # # ]: 0 : if (!among_var) { z->lb = mlimit1; return 0; }
1660 peter@eisentraut.org 494 : 0 : z->bra = z->c;
2539 tgl@sss.pgh.pa.us 495 : 0 : z->lb = mlimit1;
496 : : }
1660 peter@eisentraut.org 497 [ # # ]: 0 : switch (among_var) {
6591 tgl@sss.pgh.pa.us 498 : 0 : case 1:
1660 peter@eisentraut.org 499 : 0 : { int m2 = z->l - z->c; (void)m2;
500 [ # # ]: 0 : if (!(eq_s_b(z, 2, s_5))) goto lab0;
6591 tgl@sss.pgh.pa.us 501 : 0 : return 0;
502 : 0 : lab0:
503 : 0 : z->c = z->l - m2;
504 : : }
505 : 0 : break;
506 : : }
1660 peter@eisentraut.org 507 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 508 [ # # ]: 0 : if (ret < 0) return ret;
509 : : }
510 : 0 : return 1;
511 : : }
512 : :
1660 peter@eisentraut.org 513 : 0 : static int r_i_plural(struct SN_env * z) {
514 : :
515 : : { int mlimit1;
516 [ # # ]: 0 : if (z->c < z->I[1]) return 0;
517 : 0 : mlimit1 = z->lb; z->lb = z->I[1];
518 : 0 : z->ket = z->c;
519 [ # # # # : 0 : if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit1; return 0; }
# # ]
200 tgl@sss.pgh.pa.us 520 [ # # ]: 0 : if (!find_among_b(z, a_8, 2)) { z->lb = mlimit1; return 0; }
1660 peter@eisentraut.org 521 : 0 : z->bra = z->c;
2539 tgl@sss.pgh.pa.us 522 : 0 : z->lb = mlimit1;
523 : : }
1660 peter@eisentraut.org 524 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 525 [ # # ]: 0 : if (ret < 0) return ret;
526 : : }
527 : 0 : return 1;
528 : : }
529 : :
1660 peter@eisentraut.org 530 : 0 : static int r_t_plural(struct SN_env * z) {
531 : : int among_var;
532 : :
533 : : { int mlimit1;
534 [ # # ]: 0 : if (z->c < z->I[1]) return 0;
535 : 0 : mlimit1 = z->lb; z->lb = z->I[1];
536 : 0 : z->ket = z->c;
537 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 't') { z->lb = mlimit1; return 0; }
2539 tgl@sss.pgh.pa.us 538 : 0 : z->c--;
1660 peter@eisentraut.org 539 : 0 : z->bra = z->c;
540 : 0 : { int m_test2 = z->l - z->c;
541 [ # # ]: 0 : if (in_grouping_b_U(z, g_V1, 97, 246, 0)) { z->lb = mlimit1; return 0; }
2539 tgl@sss.pgh.pa.us 542 : 0 : z->c = z->l - m_test2;
543 : : }
1660 peter@eisentraut.org 544 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 545 [ # # ]: 0 : if (ret < 0) return ret;
546 : : }
2539 547 : 0 : z->lb = mlimit1;
548 : : }
549 : :
550 : : { int mlimit3;
1660 peter@eisentraut.org 551 [ # # ]: 0 : if (z->c < z->I[0]) return 0;
552 : 0 : mlimit3 = z->lb; z->lb = z->I[0];
553 : 0 : z->ket = z->c;
554 [ # # # # ]: 0 : if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit3; return 0; }
2539 tgl@sss.pgh.pa.us 555 : 0 : among_var = find_among_b(z, a_9, 2);
200 556 [ # # ]: 0 : if (!among_var) { z->lb = mlimit3; return 0; }
1660 peter@eisentraut.org 557 : 0 : z->bra = z->c;
2539 tgl@sss.pgh.pa.us 558 : 0 : z->lb = mlimit3;
559 : : }
1660 peter@eisentraut.org 560 [ # # ]: 0 : switch (among_var) {
6591 tgl@sss.pgh.pa.us 561 : 0 : case 1:
1660 peter@eisentraut.org 562 : 0 : { int m4 = z->l - z->c; (void)m4;
563 [ # # ]: 0 : if (!(eq_s_b(z, 2, s_6))) goto lab0;
6591 tgl@sss.pgh.pa.us 564 : 0 : return 0;
565 : 0 : lab0:
2539 566 : 0 : z->c = z->l - m4;
567 : : }
6591 568 : 0 : break;
569 : : }
1660 peter@eisentraut.org 570 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 571 [ # # ]: 0 : if (ret < 0) return ret;
572 : : }
573 : 0 : return 1;
574 : : }
575 : :
1660 peter@eisentraut.org 576 : 0 : static int r_tidy(struct SN_env * z) {
577 : :
578 : : { int mlimit1;
579 [ # # ]: 0 : if (z->c < z->I[1]) return 0;
580 : 0 : mlimit1 = z->lb; z->lb = z->I[1];
581 : 0 : { int m2 = z->l - z->c; (void)m2;
582 : 0 : { int m3 = z->l - z->c; (void)m3;
583 : 0 : { int ret = r_LONG(z);
2539 tgl@sss.pgh.pa.us 584 [ # # ]: 0 : if (ret == 0) goto lab0;
6591 585 [ # # ]: 0 : if (ret < 0) return ret;
586 : : }
587 : 0 : z->c = z->l - m3;
1660 peter@eisentraut.org 588 : 0 : z->ket = z->c;
589 : 0 : { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
6591 tgl@sss.pgh.pa.us 590 [ # # ]: 0 : if (ret < 0) goto lab0;
1660 peter@eisentraut.org 591 : 0 : z->c = ret;
592 : : }
593 : 0 : z->bra = z->c;
594 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 595 [ # # ]: 0 : if (ret < 0) return ret;
596 : : }
597 : : }
598 : 0 : lab0:
599 : 0 : z->c = z->l - m2;
600 : : }
1660 peter@eisentraut.org 601 : 0 : { int m4 = z->l - z->c; (void)m4;
602 : 0 : z->ket = z->c;
603 [ # # ]: 0 : if (in_grouping_b_U(z, g_AEI, 97, 228, 0)) goto lab1;
604 : 0 : z->bra = z->c;
605 [ # # ]: 0 : if (in_grouping_b_U(z, g_C, 98, 122, 0)) goto lab1;
606 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 607 [ # # ]: 0 : if (ret < 0) return ret;
608 : : }
609 : 0 : lab1:
610 : 0 : z->c = z->l - m4;
611 : : }
1660 peter@eisentraut.org 612 : 0 : { int m5 = z->l - z->c; (void)m5;
613 : 0 : z->ket = z->c;
614 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'j') goto lab2;
2539 tgl@sss.pgh.pa.us 615 : 0 : z->c--;
1660 peter@eisentraut.org 616 : 0 : z->bra = z->c;
617 : 0 : { int m6 = z->l - z->c; (void)m6;
618 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'o') goto lab4;
2539 tgl@sss.pgh.pa.us 619 : 0 : z->c--;
6591 620 : 0 : goto lab3;
621 : 0 : lab4:
622 : 0 : z->c = z->l - m6;
1660 peter@eisentraut.org 623 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'u') goto lab2;
2539 tgl@sss.pgh.pa.us 624 : 0 : z->c--;
625 : : }
6591 626 : 0 : lab3:
1660 peter@eisentraut.org 627 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 628 [ # # ]: 0 : if (ret < 0) return ret;
629 : : }
630 : 0 : lab2:
631 : 0 : z->c = z->l - m5;
632 : : }
1660 peter@eisentraut.org 633 : 0 : { int m7 = z->l - z->c; (void)m7;
634 : 0 : z->ket = z->c;
635 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'o') goto lab5;
2539 tgl@sss.pgh.pa.us 636 : 0 : z->c--;
1660 peter@eisentraut.org 637 : 0 : z->bra = z->c;
638 [ # # # # ]: 0 : if (z->c <= z->lb || z->p[z->c - 1] != 'j') goto lab5;
2539 tgl@sss.pgh.pa.us 639 : 0 : z->c--;
1660 peter@eisentraut.org 640 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 641 [ # # ]: 0 : if (ret < 0) return ret;
642 : : }
643 : 0 : lab5:
644 : 0 : z->c = z->l - m7;
645 : : }
2539 646 : 0 : z->lb = mlimit1;
647 : : }
648 : :
1660 peter@eisentraut.org 649 [ # # ]: 0 : if (in_grouping_b_U(z, g_V1, 97, 246, 1) < 0) return 0;
650 : 0 : z->ket = z->c;
651 [ # # ]: 0 : if (in_grouping_b_U(z, g_C, 98, 122, 0)) return 0;
652 : 0 : z->bra = z->c;
653 : 0 : z->S[0] = slice_to(z, z->S[0]);
654 [ # # ]: 0 : if (z->S[0] == 0) return -1;
655 [ # # ]: 0 : if (!(eq_v_b(z, z->S[0]))) return 0;
656 : 0 : { int ret = slice_del(z);
6591 tgl@sss.pgh.pa.us 657 [ # # ]: 0 : if (ret < 0) return ret;
658 : : }
659 : 0 : return 1;
660 : : }
661 : :
1660 peter@eisentraut.org 662 : 0 : extern int finnish_UTF_8_stem(struct SN_env * z) {
663 : 0 : { int c1 = z->c;
664 : 0 : { int ret = r_mark_regions(z);
6591 tgl@sss.pgh.pa.us 665 [ # # ]: 0 : if (ret < 0) return ret;
666 : : }
667 : 0 : z->c = c1;
668 : : }
1660 peter@eisentraut.org 669 : 0 : z->I[2] = 0;
670 : 0 : z->lb = z->c; z->c = z->l;
671 : :
672 : 0 : { int m2 = z->l - z->c; (void)m2;
673 : 0 : { int ret = r_particle_etc(z);
6591 tgl@sss.pgh.pa.us 674 [ # # ]: 0 : if (ret < 0) return ret;
675 : : }
676 : 0 : z->c = z->l - m2;
677 : : }
1660 peter@eisentraut.org 678 : 0 : { int m3 = z->l - z->c; (void)m3;
679 : 0 : { int ret = r_possessive(z);
6591 tgl@sss.pgh.pa.us 680 [ # # ]: 0 : if (ret < 0) return ret;
681 : : }
682 : 0 : z->c = z->l - m3;
683 : : }
1660 peter@eisentraut.org 684 : 0 : { int m4 = z->l - z->c; (void)m4;
685 : 0 : { int ret = r_case_ending(z);
6591 tgl@sss.pgh.pa.us 686 [ # # ]: 0 : if (ret < 0) return ret;
687 : : }
688 : 0 : z->c = z->l - m4;
689 : : }
1660 peter@eisentraut.org 690 : 0 : { int m5 = z->l - z->c; (void)m5;
691 : 0 : { int ret = r_other_endings(z);
6591 tgl@sss.pgh.pa.us 692 [ # # ]: 0 : if (ret < 0) return ret;
693 : : }
694 : 0 : z->c = z->l - m5;
695 : : }
696 : :
1660 peter@eisentraut.org 697 [ # # ]: 0 : if (!(z->I[2])) goto lab1;
698 : 0 : { int m6 = z->l - z->c; (void)m6;
699 : 0 : { int ret = r_i_plural(z);
2539 tgl@sss.pgh.pa.us 700 [ # # ]: 0 : if (ret < 0) return ret;
701 : : }
6591 702 : 0 : z->c = z->l - m6;
703 : : }
1916 peter@eisentraut.org 704 : 0 : goto lab0;
705 : 0 : lab1:
1660 706 : 0 : { int m7 = z->l - z->c; (void)m7;
707 : 0 : { int ret = r_t_plural(z);
2539 tgl@sss.pgh.pa.us 708 [ # # ]: 0 : if (ret < 0) return ret;
709 : : }
710 : 0 : z->c = z->l - m7;
711 : : }
1916 peter@eisentraut.org 712 : 0 : lab0:
1660 713 : 0 : { int m8 = z->l - z->c; (void)m8;
714 : 0 : { int ret = r_tidy(z);
6591 tgl@sss.pgh.pa.us 715 [ # # ]: 0 : if (ret < 0) return ret;
716 : : }
2539 717 : 0 : z->c = z->l - m8;
718 : : }
6591 719 : 0 : z->c = z->lb;
720 : 0 : return 1;
721 : : }
722 : :
1660 peter@eisentraut.org 723 : 0 : extern struct SN_env * finnish_UTF_8_create_env(void) { return SN_create_env(1, 3); }
724 : :
6591 tgl@sss.pgh.pa.us 725 : 0 : extern void finnish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }
726 : :
|