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