YAZ 5.35.1
stem_ISO_8859_1_finnish.c
Go to the documentation of this file.
1
2/* This file was generated automatically by the Snowball to ANSI C compiler */
3
4#include "../runtime/header.h"
5
6#ifdef __cplusplus
7extern "C"
8{
9#endif
10 extern int finnish_ISO_8859_1_stem (struct SN_env *z);
11#ifdef __cplusplus
12}
13#endif
14static int r_tidy (struct SN_env *z);
15static int r_other_endings (struct SN_env *z);
16static int r_t_plural (struct SN_env *z);
17static int r_i_plural (struct SN_env *z);
18static int r_case_ending (struct SN_env *z);
19static int r_VI (struct SN_env *z);
20static int r_LONG (struct SN_env *z);
21static int r_possessive (struct SN_env *z);
22static int r_particle_etc (struct SN_env *z);
23static int r_R2 (struct SN_env *z);
24static int r_mark_regions (struct SN_env *z);
25#ifdef __cplusplus
26extern "C"
27{
28#endif
29
30
31 extern struct SN_env *finnish_ISO_8859_1_create_env (void);
32 extern void finnish_ISO_8859_1_close_env (struct SN_env *z);
33
34
35#ifdef __cplusplus
36}
37#endif
38static const symbol s_0_0[2] = { 'p', 'a' };
39static const symbol s_0_1[3] = { 's', 't', 'i' };
40static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
41static const symbol s_0_3[3] = { 'h', 'a', 'n' };
42static const symbol s_0_4[3] = { 'k', 'i', 'n' };
43static const symbol s_0_5[3] = { 'h', 0xE4, 'n' };
44static const symbol s_0_6[4] = { 'k', 0xE4, 0xE4, 'n' };
45static const symbol s_0_7[2] = { 'k', 'o' };
46static const symbol s_0_8[2] = { 'p', 0xE4 };
47static const symbol s_0_9[2] = { 'k', 0xF6 };
48
49static const struct among a_0[10] = {
50/* 0 */ {2, s_0_0, -1, 1, 0},
51/* 1 */ {3, s_0_1, -1, 2, 0},
52/* 2 */ {4, s_0_2, -1, 1, 0},
53/* 3 */ {3, s_0_3, -1, 1, 0},
54/* 4 */ {3, s_0_4, -1, 1, 0},
55/* 5 */ {3, s_0_5, -1, 1, 0},
56/* 6 */ {4, s_0_6, -1, 1, 0},
57/* 7 */ {2, s_0_7, -1, 1, 0},
58/* 8 */ {2, s_0_8, -1, 1, 0},
59/* 9 */ {2, s_0_9, -1, 1, 0}
60};
61
62static const symbol s_1_0[3] = { 'l', 'l', 'a' };
63static const symbol s_1_1[2] = { 'n', 'a' };
64static const symbol s_1_2[3] = { 's', 's', 'a' };
65static const symbol s_1_3[2] = { 't', 'a' };
66static const symbol s_1_4[3] = { 'l', 't', 'a' };
67static const symbol s_1_5[3] = { 's', 't', 'a' };
68
69static const struct among a_1[6] = {
70/* 0 */ {3, s_1_0, -1, -1, 0},
71/* 1 */ {2, s_1_1, -1, -1, 0},
72/* 2 */ {3, s_1_2, -1, -1, 0},
73/* 3 */ {2, s_1_3, -1, -1, 0},
74/* 4 */ {3, s_1_4, 3, -1, 0},
75/* 5 */ {3, s_1_5, 3, -1, 0}
76};
77
78static const symbol s_2_0[3] = { 'l', 'l', 0xE4 };
79static const symbol s_2_1[2] = { 'n', 0xE4 };
80static const symbol s_2_2[3] = { 's', 's', 0xE4 };
81static const symbol s_2_3[2] = { 't', 0xE4 };
82static const symbol s_2_4[3] = { 'l', 't', 0xE4 };
83static const symbol s_2_5[3] = { 's', 't', 0xE4 };
84
85static const struct among a_2[6] = {
86/* 0 */ {3, s_2_0, -1, -1, 0},
87/* 1 */ {2, s_2_1, -1, -1, 0},
88/* 2 */ {3, s_2_2, -1, -1, 0},
89/* 3 */ {2, s_2_3, -1, -1, 0},
90/* 4 */ {3, s_2_4, 3, -1, 0},
91/* 5 */ {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/* 0 */ {3, s_3_0, -1, -1, 0},
99/* 1 */ {3, s_3_1, -1, -1, 0}
100};
101
102static const symbol s_4_0[3] = { 'n', 's', 'a' };
103static const symbol s_4_1[3] = { 'm', 'm', 'e' };
104static const symbol s_4_2[3] = { 'n', 'n', 'e' };
105static const symbol s_4_3[2] = { 'n', 'i' };
106static const symbol s_4_4[2] = { 's', 'i' };
107static const symbol s_4_5[2] = { 'a', 'n' };
108static const symbol s_4_6[2] = { 'e', 'n' };
109static const symbol s_4_7[2] = { 0xE4, 'n' };
110static const symbol s_4_8[3] = { 'n', 's', 0xE4 };
111
112static const struct among a_4[9] = {
113/* 0 */ {3, s_4_0, -1, 3, 0},
114/* 1 */ {3, s_4_1, -1, 3, 0},
115/* 2 */ {3, s_4_2, -1, 3, 0},
116/* 3 */ {2, s_4_3, -1, 2, 0},
117/* 4 */ {2, s_4_4, -1, 1, 0},
118/* 5 */ {2, s_4_5, -1, 4, 0},
119/* 6 */ {2, s_4_6, -1, 6, 0},
120/* 7 */ {2, s_4_7, -1, 5, 0},
121/* 8 */ {3, s_4_8, -1, 3, 0}
122};
123
124static const symbol s_5_0[2] = { 'a', 'a' };
125static const symbol s_5_1[2] = { 'e', 'e' };
126static const symbol s_5_2[2] = { 'i', 'i' };
127static const symbol s_5_3[2] = { 'o', 'o' };
128static const symbol s_5_4[2] = { 'u', 'u' };
129static const symbol s_5_5[2] = { 0xE4, 0xE4 };
130static const symbol s_5_6[2] = { 0xF6, 0xF6 };
131
132static const struct among a_5[7] = {
133/* 0 */ {2, s_5_0, -1, -1, 0},
134/* 1 */ {2, s_5_1, -1, -1, 0},
135/* 2 */ {2, s_5_2, -1, -1, 0},
136/* 3 */ {2, s_5_3, -1, -1, 0},
137/* 4 */ {2, s_5_4, -1, -1, 0},
138/* 5 */ {2, s_5_5, -1, -1, 0},
139/* 6 */ {2, s_5_6, -1, -1, 0}
140};
141
142static const symbol s_6_0[1] = { 'a' };
143static const symbol s_6_1[3] = { 'l', 'l', 'a' };
144static const symbol s_6_2[2] = { 'n', 'a' };
145static const symbol s_6_3[3] = { 's', 's', 'a' };
146static const symbol s_6_4[2] = { 't', 'a' };
147static const symbol s_6_5[3] = { 'l', 't', 'a' };
148static const symbol s_6_6[3] = { 's', 't', 'a' };
149static const symbol s_6_7[3] = { 't', 't', 'a' };
150static const symbol s_6_8[3] = { 'l', 'l', 'e' };
151static const symbol s_6_9[3] = { 'i', 'n', 'e' };
152static const symbol s_6_10[3] = { 'k', 's', 'i' };
153static const symbol s_6_11[1] = { 'n' };
154static const symbol s_6_12[3] = { 'h', 'a', 'n' };
155static const symbol s_6_13[3] = { 'd', 'e', 'n' };
156static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
157static const symbol s_6_15[3] = { 'h', 'e', 'n' };
158static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
159static const symbol s_6_17[3] = { 'h', 'i', 'n' };
160static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
161static const symbol s_6_19[3] = { 'h', 'o', 'n' };
162static const symbol s_6_20[3] = { 'h', 0xE4, 'n' };
163static const symbol s_6_21[3] = { 'h', 0xF6, 'n' };
164static const symbol s_6_22[1] = { 0xE4 };
165static const symbol s_6_23[3] = { 'l', 'l', 0xE4 };
166static const symbol s_6_24[2] = { 'n', 0xE4 };
167static const symbol s_6_25[3] = { 's', 's', 0xE4 };
168static const symbol s_6_26[2] = { 't', 0xE4 };
169static const symbol s_6_27[3] = { 'l', 't', 0xE4 };
170static const symbol s_6_28[3] = { 's', 't', 0xE4 };
171static const symbol s_6_29[3] = { 't', 't', 0xE4 };
172
173static const struct among a_6[30] = {
174/* 0 */ {1, s_6_0, -1, 8, 0},
175/* 1 */ {3, s_6_1, 0, -1, 0},
176/* 2 */ {2, s_6_2, 0, -1, 0},
177/* 3 */ {3, s_6_3, 0, -1, 0},
178/* 4 */ {2, s_6_4, 0, -1, 0},
179/* 5 */ {3, s_6_5, 4, -1, 0},
180/* 6 */ {3, s_6_6, 4, -1, 0},
181/* 7 */ {3, s_6_7, 4, 9, 0},
182/* 8 */ {3, s_6_8, -1, -1, 0},
183/* 9 */ {3, s_6_9, -1, -1, 0},
184/* 10 */ {3, s_6_10, -1, -1, 0},
185/* 11 */ {1, s_6_11, -1, 7, 0},
186/* 12 */ {3, s_6_12, 11, 1, 0},
187/* 13 */ {3, s_6_13, 11, -1, r_VI},
188/* 14 */ {4, s_6_14, 11, -1, r_LONG},
189/* 15 */ {3, s_6_15, 11, 2, 0},
190/* 16 */ {4, s_6_16, 11, -1, r_VI},
191/* 17 */ {3, s_6_17, 11, 3, 0},
192/* 18 */ {4, s_6_18, 11, -1, r_VI},
193/* 19 */ {3, s_6_19, 11, 4, 0},
194/* 20 */ {3, s_6_20, 11, 5, 0},
195/* 21 */ {3, s_6_21, 11, 6, 0},
196/* 22 */ {1, s_6_22, -1, 8, 0},
197/* 23 */ {3, s_6_23, 22, -1, 0},
198/* 24 */ {2, s_6_24, 22, -1, 0},
199/* 25 */ {3, s_6_25, 22, -1, 0},
200/* 26 */ {2, s_6_26, 22, -1, 0},
201/* 27 */ {3, s_6_27, 26, -1, 0},
202/* 28 */ {3, s_6_28, 26, -1, 0},
203/* 29 */ {3, s_6_29, 26, 9, 0}
204};
205
206static const symbol s_7_0[3] = { 'e', 'j', 'a' };
207static const symbol s_7_1[3] = { 'm', 'm', 'a' };
208static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
209static const symbol s_7_3[3] = { 'm', 'p', 'a' };
210static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
211static const symbol s_7_5[3] = { 'm', 'm', 'i' };
212static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
213static const symbol s_7_7[3] = { 'm', 'p', 'i' };
214static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
215static const symbol s_7_9[3] = { 'e', 'j', 0xE4 };
216static const symbol s_7_10[3] = { 'm', 'm', 0xE4 };
217static const symbol s_7_11[4] = { 'i', 'm', 'm', 0xE4 };
218static const symbol s_7_12[3] = { 'm', 'p', 0xE4 };
219static const symbol s_7_13[4] = { 'i', 'm', 'p', 0xE4 };
220
221static const struct among a_7[14] = {
222/* 0 */ {3, s_7_0, -1, -1, 0},
223/* 1 */ {3, s_7_1, -1, 1, 0},
224/* 2 */ {4, s_7_2, 1, -1, 0},
225/* 3 */ {3, s_7_3, -1, 1, 0},
226/* 4 */ {4, s_7_4, 3, -1, 0},
227/* 5 */ {3, s_7_5, -1, 1, 0},
228/* 6 */ {4, s_7_6, 5, -1, 0},
229/* 7 */ {3, s_7_7, -1, 1, 0},
230/* 8 */ {4, s_7_8, 7, -1, 0},
231/* 9 */ {3, s_7_9, -1, -1, 0},
232/* 10 */ {3, s_7_10, -1, 1, 0},
233/* 11 */ {4, s_7_11, 10, -1, 0},
234/* 12 */ {3, s_7_12, -1, 1, 0},
235/* 13 */ {4, s_7_13, 12, -1, 0}
236};
237
238static const symbol s_8_0[1] = { 'i' };
239static const symbol s_8_1[1] = { 'j' };
240
241static const struct among a_8[2] = {
242/* 0 */ {1, s_8_0, -1, -1, 0},
243/* 1 */ {1, s_8_1, -1, -1, 0}
244};
245
246static const symbol s_9_0[3] = { 'm', 'm', 'a' };
247static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
248
249static const struct among a_9[2] = {
250/* 0 */ {3, s_9_0, -1, 1, 0},
251/* 1 */ {4, s_9_1, 0, -1, 0}
252};
253
254static const unsigned char g_AEI[] =
255 { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
256
257static const unsigned char g_V1[] =
258 { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
259
260static const unsigned char g_V2[] =
261 { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
262
263static const unsigned char g_particle_end[] =
264 { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
265
266static const symbol s_0[] = { 'k' };
267static const symbol s_1[] = { 'k', 's', 'e' };
268static const symbol s_2[] = { 'k', 's', 'i' };
269static const symbol s_3[] = { 'i' };
270static const symbol s_4[] = { 'a' };
271static const symbol s_5[] = { 'e' };
272static const symbol s_6[] = { 'i' };
273static const symbol s_7[] = { 'o' };
274static const symbol s_8[] = { 0xE4 };
275static const symbol s_9[] = { 0xF6 };
276static const symbol s_10[] = { 'i', 'e' };
277static const symbol s_11[] = { 'e' };
278static const symbol s_12[] = { 'p', 'o' };
279static const symbol s_13[] = { 't' };
280static const symbol s_14[] = { 'p', 'o' };
281static const symbol s_15[] = { 'j' };
282static const symbol s_16[] = { 'o' };
283static const symbol s_17[] = { 'u' };
284static const symbol s_18[] = { 'o' };
285static const symbol s_19[] = { 'j' };
286
287static int
289{
290 z->I[0] = z->l;
291 z->I[1] = z->l;
292 if (out_grouping (z, g_V1, 97, 246, 1) < 0)
293 return 0; /* goto *//* grouping V1, line 46 */
294 { /* gopast *//* non V1, line 46 */
295 int ret = in_grouping (z, g_V1, 97, 246, 1);
296 if (ret < 0)
297 return 0;
298 z->c += ret;
299 }
300 z->I[0] = z->c; /* setmark p1, line 46 */
301 if (out_grouping (z, g_V1, 97, 246, 1) < 0)
302 return 0; /* goto *//* grouping V1, line 47 */
303 { /* gopast *//* non V1, line 47 */
304 int ret = in_grouping (z, g_V1, 97, 246, 1);
305 if (ret < 0)
306 return 0;
307 z->c += ret;
308 }
309 z->I[1] = z->c; /* setmark p2, line 47 */
310 return 1;
311}
312
313static int
314r_R2 (struct SN_env *z)
315{
316 if (!(z->I[1] <= z->c))
317 return 0;
318 return 1;
319}
320
321static int
323{
324 int among_var;
325 {
326 int mlimit; /* setlimit, line 55 */
327 int m1 = z->l - z->c;
328 (void) m1;
329 if (z->c < z->I[0])
330 return 0;
331 z->c = z->I[0]; /* tomark, line 55 */
332 mlimit = z->lb;
333 z->lb = z->c;
334 z->c = z->l - m1;
335 z->ket = z->c; /* [, line 55 */
336 among_var = find_among_b (z, a_0, 10); /* substring, line 55 */
337 if (!(among_var))
338 {
339 z->lb = mlimit;
340 return 0;
341 }
342 z->bra = z->c; /* ], line 55 */
343 z->lb = mlimit;
344 }
345 switch (among_var)
346 {
347 case 0:
348 return 0;
349 case 1:
350 if (in_grouping_b (z, g_particle_end, 97, 246, 0))
351 return 0;
352 break;
353 case 2:
354 {
355 int ret = r_R2 (z);
356 if (ret == 0)
357 return 0; /* call R2, line 64 */
358 if (ret < 0)
359 return ret;
360 }
361 break;
362 }
363 {
364 int ret = slice_del (z); /* delete, line 66 */
365 if (ret < 0)
366 return ret;
367 }
368 return 1;
369}
370
371static int
373{
374 int among_var;
375 {
376 int mlimit; /* setlimit, line 69 */
377 int m1 = z->l - z->c;
378 (void) m1;
379 if (z->c < z->I[0])
380 return 0;
381 z->c = z->I[0]; /* tomark, line 69 */
382 mlimit = z->lb;
383 z->lb = z->c;
384 z->c = z->l - m1;
385 z->ket = z->c; /* [, line 69 */
386 among_var = find_among_b (z, a_4, 9); /* substring, line 69 */
387 if (!(among_var))
388 {
389 z->lb = mlimit;
390 return 0;
391 }
392 z->bra = z->c; /* ], line 69 */
393 z->lb = mlimit;
394 }
395 switch (among_var)
396 {
397 case 0:
398 return 0;
399 case 1:
400 {
401 int m2 = z->l - z->c;
402 (void) m2; /* not, line 72 */
403 if (!(eq_s_b (z, 1, s_0)))
404 goto lab0;
405 return 0;
406 lab0:
407 z->c = z->l - m2;
408 }
409 {
410 int ret = slice_del (z); /* delete, line 72 */
411 if (ret < 0)
412 return ret;
413 }
414 break;
415 case 2:
416 {
417 int ret = slice_del (z); /* delete, line 74 */
418 if (ret < 0)
419 return ret;
420 }
421 z->ket = z->c; /* [, line 74 */
422 if (!(eq_s_b (z, 3, s_1)))
423 return 0;
424 z->bra = z->c; /* ], line 74 */
425 {
426 int ret = slice_from_s (z, 3, s_2); /* <-, line 74 */
427 if (ret < 0)
428 return ret;
429 }
430 break;
431 case 3:
432 {
433 int ret = slice_del (z); /* delete, line 78 */
434 if (ret < 0)
435 return ret;
436 }
437 break;
438 case 4:
439 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97)
440 return 0;
441 if (!(find_among_b (z, a_1, 6)))
442 return 0; /* among, line 81 */
443 {
444 int ret = slice_del (z); /* delete, line 81 */
445 if (ret < 0)
446 return ret;
447 }
448 break;
449 case 5:
450 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 228)
451 return 0;
452 if (!(find_among_b (z, a_2, 6)))
453 return 0; /* among, line 83 */
454 {
455 int ret = slice_del (z); /* delete, line 84 */
456 if (ret < 0)
457 return ret;
458 }
459 break;
460 case 6:
461 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101)
462 return 0;
463 if (!(find_among_b (z, a_3, 2)))
464 return 0; /* among, line 86 */
465 {
466 int ret = slice_del (z); /* delete, line 86 */
467 if (ret < 0)
468 return ret;
469 }
470 break;
471 }
472 return 1;
473}
474
475static int
476r_LONG (struct SN_env *z)
477{
478 if (!(find_among_b (z, a_5, 7)))
479 return 0; /* among, line 91 */
480 return 1;
481}
482
483static int
484r_VI (struct SN_env *z)
485{
486 if (!(eq_s_b (z, 1, s_3)))
487 return 0;
488 if (in_grouping_b (z, g_V2, 97, 246, 0))
489 return 0;
490 return 1;
491}
492
493static int
495{
496 int among_var;
497 {
498 int mlimit; /* setlimit, line 96 */
499 int m1 = z->l - z->c;
500 (void) m1;
501 if (z->c < z->I[0])
502 return 0;
503 z->c = z->I[0]; /* tomark, line 96 */
504 mlimit = z->lb;
505 z->lb = z->c;
506 z->c = z->l - m1;
507 z->ket = z->c; /* [, line 96 */
508 among_var = find_among_b (z, a_6, 30); /* substring, line 96 */
509 if (!(among_var))
510 {
511 z->lb = mlimit;
512 return 0;
513 }
514 z->bra = z->c; /* ], line 96 */
515 z->lb = mlimit;
516 }
517 switch (among_var)
518 {
519 case 0:
520 return 0;
521 case 1:
522 if (!(eq_s_b (z, 1, s_4)))
523 return 0;
524 break;
525 case 2:
526 if (!(eq_s_b (z, 1, s_5)))
527 return 0;
528 break;
529 case 3:
530 if (!(eq_s_b (z, 1, s_6)))
531 return 0;
532 break;
533 case 4:
534 if (!(eq_s_b (z, 1, s_7)))
535 return 0;
536 break;
537 case 5:
538 if (!(eq_s_b (z, 1, s_8)))
539 return 0;
540 break;
541 case 6:
542 if (!(eq_s_b (z, 1, s_9)))
543 return 0;
544 break;
545 case 7:
546 {
547 int m_keep = z->l - z->c; /* (void) m_keep; *//* try, line 111 */
548 {
549 int m2 = z->l - z->c;
550 (void) m2; /* and, line 113 */
551 {
552 int m3 = z->l - z->c;
553 (void) m3; /* or, line 112 */
554 {
555 int ret = r_LONG (z);
556 if (ret == 0)
557 goto lab2; /* call LONG, line 111 */
558 if (ret < 0)
559 return ret;
560 }
561 goto lab1;
562 lab2:
563 z->c = z->l - m3;
564 if (!(eq_s_b (z, 2, s_10)))
565 {
566 z->c = z->l - m_keep;
567 goto lab0;
568 }
569 }
570 lab1:
571 z->c = z->l - m2;
572 if (z->c <= z->lb)
573 {
574 z->c = z->l - m_keep;
575 goto lab0;
576 }
577 z->c--; /* next, line 113 */
578 }
579 z->bra = z->c; /* ], line 113 */
580 lab0:
581 ;
582 }
583 break;
584 case 8:
585 if (in_grouping_b (z, g_V1, 97, 246, 0))
586 return 0;
587 if (out_grouping_b (z, g_V1, 97, 246, 0))
588 return 0;
589 break;
590 case 9:
591 if (!(eq_s_b (z, 1, s_11)))
592 return 0;
593 break;
594 }
595 {
596 int ret = slice_del (z); /* delete, line 138 */
597 if (ret < 0)
598 return ret;
599 }
600 z->B[0] = 1; /* set ending_removed, line 139 */
601 return 1;
602}
603
604static int
606{
607 int among_var;
608 {
609 int mlimit; /* setlimit, line 142 */
610 int m1 = z->l - z->c;
611 (void) m1;
612 if (z->c < z->I[1])
613 return 0;
614 z->c = z->I[1]; /* tomark, line 142 */
615 mlimit = z->lb;
616 z->lb = z->c;
617 z->c = z->l - m1;
618 z->ket = z->c; /* [, line 142 */
619 among_var = find_among_b (z, a_7, 14); /* substring, line 142 */
620 if (!(among_var))
621 {
622 z->lb = mlimit;
623 return 0;
624 }
625 z->bra = z->c; /* ], line 142 */
626 z->lb = mlimit;
627 }
628 switch (among_var)
629 {
630 case 0:
631 return 0;
632 case 1:
633 {
634 int m2 = z->l - z->c;
635 (void) m2; /* not, line 146 */
636 if (!(eq_s_b (z, 2, s_12)))
637 goto lab0;
638 return 0;
639 lab0:
640 z->c = z->l - m2;
641 }
642 break;
643 }
644 {
645 int ret = slice_del (z); /* delete, line 151 */
646 if (ret < 0)
647 return ret;
648 }
649 return 1;
650}
651
652static int
654{
655 {
656 int mlimit; /* setlimit, line 154 */
657 int m1 = z->l - z->c;
658 (void) m1;
659 if (z->c < z->I[0])
660 return 0;
661 z->c = z->I[0]; /* tomark, line 154 */
662 mlimit = z->lb;
663 z->lb = z->c;
664 z->c = z->l - m1;
665 z->ket = z->c; /* [, line 154 */
666 if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106))
667 {
668 z->lb = mlimit;
669 return 0;
670 }
671 if (!(find_among_b (z, a_8, 2)))
672 {
673 z->lb = mlimit;
674 return 0;
675 } /* substring, line 154 */
676 z->bra = z->c; /* ], line 154 */
677 z->lb = mlimit;
678 }
679 {
680 int ret = slice_del (z); /* delete, line 158 */
681 if (ret < 0)
682 return ret;
683 }
684 return 1;
685}
686
687static int
689{
690 int among_var;
691 {
692 int mlimit; /* setlimit, line 161 */
693 int m1 = z->l - z->c;
694 (void) m1;
695 if (z->c < z->I[0])
696 return 0;
697 z->c = z->I[0]; /* tomark, line 161 */
698 mlimit = z->lb;
699 z->lb = z->c;
700 z->c = z->l - m1;
701 z->ket = z->c; /* [, line 162 */
702 if (!(eq_s_b (z, 1, s_13)))
703 {
704 z->lb = mlimit;
705 return 0;
706 }
707 z->bra = z->c; /* ], line 162 */
708 {
709 int m_test = z->l - z->c; /* test, line 162 */
710 if (in_grouping_b (z, g_V1, 97, 246, 0))
711 {
712 z->lb = mlimit;
713 return 0;
714 }
715 z->c = z->l - m_test;
716 }
717 {
718 int ret = slice_del (z); /* delete, line 163 */
719 if (ret < 0)
720 return ret;
721 }
722 z->lb = mlimit;
723 }
724 {
725 int mlimit; /* setlimit, line 165 */
726 int m2 = z->l - z->c;
727 (void) m2;
728 if (z->c < z->I[1])
729 return 0;
730 z->c = z->I[1]; /* tomark, line 165 */
731 mlimit = z->lb;
732 z->lb = z->c;
733 z->c = z->l - m2;
734 z->ket = z->c; /* [, line 165 */
735 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97)
736 {
737 z->lb = mlimit;
738 return 0;
739 }
740 among_var = find_among_b (z, a_9, 2); /* substring, line 165 */
741 if (!(among_var))
742 {
743 z->lb = mlimit;
744 return 0;
745 }
746 z->bra = z->c; /* ], line 165 */
747 z->lb = mlimit;
748 }
749 switch (among_var)
750 {
751 case 0:
752 return 0;
753 case 1:
754 {
755 int m3 = z->l - z->c;
756 (void) m3; /* not, line 167 */
757 if (!(eq_s_b (z, 2, s_14)))
758 goto lab0;
759 return 0;
760 lab0:
761 z->c = z->l - m3;
762 }
763 break;
764 }
765 {
766 int ret = slice_del (z); /* delete, line 170 */
767 if (ret < 0)
768 return ret;
769 }
770 return 1;
771}
772
773static int
774r_tidy (struct SN_env *z)
775{
776 {
777 int mlimit; /* setlimit, line 173 */
778 int m1 = z->l - z->c;
779 (void) m1;
780 if (z->c < z->I[0])
781 return 0;
782 z->c = z->I[0]; /* tomark, line 173 */
783 mlimit = z->lb;
784 z->lb = z->c;
785 z->c = z->l - m1;
786 {
787 int m2 = z->l - z->c;
788 (void) m2; /* do, line 174 */
789 {
790 int m3 = z->l - z->c;
791 (void) m3; /* and, line 174 */
792 {
793 int ret = r_LONG (z);
794 if (ret == 0)
795 goto lab0; /* call LONG, line 174 */
796 if (ret < 0)
797 return ret;
798 }
799 z->c = z->l - m3;
800 z->ket = z->c; /* [, line 174 */
801 if (z->c <= z->lb)
802 goto lab0;
803 z->c--; /* next, line 174 */
804 z->bra = z->c; /* ], line 174 */
805 {
806 int ret = slice_del (z); /* delete, line 174 */
807 if (ret < 0)
808 return ret;
809 }
810 }
811 lab0:
812 z->c = z->l - m2;
813 }
814 {
815 int m4 = z->l - z->c;
816 (void) m4; /* do, line 175 */
817 z->ket = z->c; /* [, line 175 */
818 if (in_grouping_b (z, g_AEI, 97, 228, 0))
819 goto lab1;
820 z->bra = z->c; /* ], line 175 */
821 if (out_grouping_b (z, g_V1, 97, 246, 0))
822 goto lab1;
823 {
824 int ret = slice_del (z); /* delete, line 175 */
825 if (ret < 0)
826 return ret;
827 }
828 lab1:
829 z->c = z->l - m4;
830 }
831 {
832 int m5 = z->l - z->c;
833 (void) m5; /* do, line 176 */
834 z->ket = z->c; /* [, line 176 */
835 if (!(eq_s_b (z, 1, s_15)))
836 goto lab2;
837 z->bra = z->c; /* ], line 176 */
838 {
839 int m6 = z->l - z->c;
840 (void) m6; /* or, line 176 */
841 if (!(eq_s_b (z, 1, s_16)))
842 goto lab4;
843 goto lab3;
844 lab4:
845 z->c = z->l - m6;
846 if (!(eq_s_b (z, 1, s_17)))
847 goto lab2;
848 }
849 lab3:
850 {
851 int ret = slice_del (z); /* delete, line 176 */
852 if (ret < 0)
853 return ret;
854 }
855 lab2:
856 z->c = z->l - m5;
857 }
858 {
859 int m7 = z->l - z->c;
860 (void) m7; /* do, line 177 */
861 z->ket = z->c; /* [, line 177 */
862 if (!(eq_s_b (z, 1, s_18)))
863 goto lab5;
864 z->bra = z->c; /* ], line 177 */
865 if (!(eq_s_b (z, 1, s_19)))
866 goto lab5;
867 {
868 int ret = slice_del (z); /* delete, line 177 */
869 if (ret < 0)
870 return ret;
871 }
872 lab5:
873 z->c = z->l - m7;
874 }
875 z->lb = mlimit;
876 }
877 if (in_grouping_b (z, g_V1, 97, 246, 1) < 0)
878 return 0; /* goto *//* non V1, line 179 */
879 z->ket = z->c; /* [, line 179 */
880 if (z->c <= z->lb)
881 return 0;
882 z->c--; /* next, line 179 */
883 z->bra = z->c; /* ], line 179 */
884 z->S[0] = slice_to (z, z->S[0]); /* -> x, line 179 */
885 if (z->S[0] == 0)
886 return -1; /* -> x, line 179 */
887 if (!(eq_v_b (z, z->S[0])))
888 return 0; /* name x, line 179 */
889 {
890 int ret = slice_del (z); /* delete, line 179 */
891 if (ret < 0)
892 return ret;
893 }
894 return 1;
895}
896
897extern int
899{
900 {
901 int c1 = z->c; /* do, line 185 */
902 {
903 int ret = r_mark_regions (z);
904 if (ret == 0)
905 goto lab0; /* call mark_regions, line 185 */
906 if (ret < 0)
907 return ret;
908 }
909 lab0:
910 z->c = c1;
911 }
912 z->B[0] = 0; /* unset ending_removed, line 186 */
913 z->lb = z->c;
914 z->c = z->l; /* backwards, line 187 */
915
916 {
917 int m2 = z->l - z->c;
918 (void) m2; /* do, line 188 */
919 {
920 int ret = r_particle_etc (z);
921 if (ret == 0)
922 goto lab1; /* call particle_etc, line 188 */
923 if (ret < 0)
924 return ret;
925 }
926 lab1:
927 z->c = z->l - m2;
928 }
929 {
930 int m3 = z->l - z->c;
931 (void) m3; /* do, line 189 */
932 {
933 int ret = r_possessive (z);
934 if (ret == 0)
935 goto lab2; /* call possessive, line 189 */
936 if (ret < 0)
937 return ret;
938 }
939 lab2:
940 z->c = z->l - m3;
941 }
942 {
943 int m4 = z->l - z->c;
944 (void) m4; /* do, line 190 */
945 {
946 int ret = r_case_ending (z);
947 if (ret == 0)
948 goto lab3; /* call case_ending, line 190 */
949 if (ret < 0)
950 return ret;
951 }
952 lab3:
953 z->c = z->l - m4;
954 }
955 {
956 int m5 = z->l - z->c;
957 (void) m5; /* do, line 191 */
958 {
959 int ret = r_other_endings (z);
960 if (ret == 0)
961 goto lab4; /* call other_endings, line 191 */
962 if (ret < 0)
963 return ret;
964 }
965 lab4:
966 z->c = z->l - m5;
967 }
968 {
969 int m6 = z->l - z->c;
970 (void) m6; /* or, line 192 */
971 if (!(z->B[0]))
972 goto lab6; /* Boolean test ending_removed, line 192 */
973 {
974 int m7 = z->l - z->c;
975 (void) m7; /* do, line 192 */
976 {
977 int ret = r_i_plural (z);
978 if (ret == 0)
979 goto lab7; /* call i_plural, line 192 */
980 if (ret < 0)
981 return ret;
982 }
983 lab7:
984 z->c = z->l - m7;
985 }
986 goto lab5;
987 lab6:
988 z->c = z->l - m6;
989 {
990 int m8 = z->l - z->c;
991 (void) m8; /* do, line 192 */
992 {
993 int ret = r_t_plural (z);
994 if (ret == 0)
995 goto lab8; /* call t_plural, line 192 */
996 if (ret < 0)
997 return ret;
998 }
999 lab8:
1000 z->c = z->l - m8;
1001 }
1002 }
1003lab5:
1004 {
1005 int m9 = z->l - z->c;
1006 (void) m9; /* do, line 193 */
1007 {
1008 int ret = r_tidy (z);
1009 if (ret == 0)
1010 goto lab9; /* call tidy, line 193 */
1011 if (ret < 0)
1012 return ret;
1013 }
1014 lab9:
1015 z->c = z->l - m9;
1016 }
1017 z->c = z->lb;
1018 return 1;
1019}
1020
1021extern struct SN_env *
1023{
1024 return SN_create_env (1, 2, 1);
1025}
1026
1027extern void
1029{
1030 SN_close_env (z, 1);
1031}
struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
Definition api.c:6
void SN_close_env(struct SN_env *z, int S_size)
Definition api.c:50
unsigned char symbol
Definition api.h:2
int find_among_b(struct SN_env *z, const struct among *v, int v_size)
Definition utilities.c:400
int slice_del(struct SN_env *z)
Definition utilities.c:573
int eq_v_b(struct SN_env *z, const symbol *p)
Definition utilities.c:306
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:206
int out_grouping_b(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:262
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:290
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:244
symbol * slice_to(struct SN_env *z, symbol *p)
Definition utilities.c:605
int slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:559
int in_grouping_b(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:225
static const symbol s_0_2[4]
static int r_case_ending(struct SN_env *z)
static const symbol s_2[]
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_6[]
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_7[]
static const symbol s_13[]
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_19[]
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 const symbol s_16[]
static const symbol s_14[]
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 symbol s_10[]
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_11[]
static const symbol s_12[]
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_18[]
static const symbol s_17[]
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_8[]
static const symbol s_9[]
static const symbol s_0_9[2]
static const symbol s_5[]
static const symbol s_8_0[1]
static const symbol s_15[]
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
unsigned char * B
Definition api.h:19
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