YAZ 5.35.1
stem_ISO_8859_1_porter.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 porter_ISO_8859_1_stem (struct SN_env *z);
11#ifdef __cplusplus
12}
13#endif
14static int r_Step_5b (struct SN_env *z);
15static int r_Step_5a (struct SN_env *z);
16static int r_Step_4 (struct SN_env *z);
17static int r_Step_3 (struct SN_env *z);
18static int r_Step_2 (struct SN_env *z);
19static int r_Step_1c (struct SN_env *z);
20static int r_Step_1b (struct SN_env *z);
21static int r_Step_1a (struct SN_env *z);
22static int r_R2 (struct SN_env *z);
23static int r_R1 (struct SN_env *z);
24static int r_shortv (struct SN_env *z);
25#ifdef __cplusplus
26extern "C"
27{
28#endif
29
30
31 extern struct SN_env *porter_ISO_8859_1_create_env (void);
32 extern void porter_ISO_8859_1_close_env (struct SN_env *z);
33
34
35#ifdef __cplusplus
36}
37#endif
38static const symbol s_0_0[1] = { 's' };
39static const symbol s_0_1[3] = { 'i', 'e', 's' };
40static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
41static const symbol s_0_3[2] = { 's', 's' };
42
43static const struct among a_0[4] = {
44/* 0 */ {1, s_0_0, -1, 3, 0},
45/* 1 */ {3, s_0_1, 0, 2, 0},
46/* 2 */ {4, s_0_2, 0, 1, 0},
47/* 3 */ {2, s_0_3, 0, -1, 0}
48};
49
50static const symbol s_1_1[2] = { 'b', 'b' };
51static const symbol s_1_2[2] = { 'd', 'd' };
52static const symbol s_1_3[2] = { 'f', 'f' };
53static const symbol s_1_4[2] = { 'g', 'g' };
54static const symbol s_1_5[2] = { 'b', 'l' };
55static const symbol s_1_6[2] = { 'm', 'm' };
56static const symbol s_1_7[2] = { 'n', 'n' };
57static const symbol s_1_8[2] = { 'p', 'p' };
58static const symbol s_1_9[2] = { 'r', 'r' };
59static const symbol s_1_10[2] = { 'a', 't' };
60static const symbol s_1_11[2] = { 't', 't' };
61static const symbol s_1_12[2] = { 'i', 'z' };
62
63static const struct among a_1[13] = {
64/* 0 */ {0, 0, -1, 3, 0},
65/* 1 */ {2, s_1_1, 0, 2, 0},
66/* 2 */ {2, s_1_2, 0, 2, 0},
67/* 3 */ {2, s_1_3, 0, 2, 0},
68/* 4 */ {2, s_1_4, 0, 2, 0},
69/* 5 */ {2, s_1_5, 0, 1, 0},
70/* 6 */ {2, s_1_6, 0, 2, 0},
71/* 7 */ {2, s_1_7, 0, 2, 0},
72/* 8 */ {2, s_1_8, 0, 2, 0},
73/* 9 */ {2, s_1_9, 0, 2, 0},
74/* 10 */ {2, s_1_10, 0, 1, 0},
75/* 11 */ {2, s_1_11, 0, 2, 0},
76/* 12 */ {2, s_1_12, 0, 1, 0}
77};
78
79static const symbol s_2_0[2] = { 'e', 'd' };
80static const symbol s_2_1[3] = { 'e', 'e', 'd' };
81static const symbol s_2_2[3] = { 'i', 'n', 'g' };
82
83static const struct among a_2[3] = {
84/* 0 */ {2, s_2_0, -1, 2, 0},
85/* 1 */ {3, s_2_1, 0, 1, 0},
86/* 2 */ {3, s_2_2, -1, 2, 0}
87};
88
89static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
90static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
91static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
92static const symbol s_3_3[3] = { 'e', 'l', 'i' };
93static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
94static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
95static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
96static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
97static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
98static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
99static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
100static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
101static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
102static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
103static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
104static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
105static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
106static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
107static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
108static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
109
110static const struct among a_3[20] = {
111/* 0 */ {4, s_3_0, -1, 3, 0},
112/* 1 */ {4, s_3_1, -1, 2, 0},
113/* 2 */ {4, s_3_2, -1, 4, 0},
114/* 3 */ {3, s_3_3, -1, 6, 0},
115/* 4 */ {4, s_3_4, -1, 9, 0},
116/* 5 */ {5, s_3_5, -1, 12, 0},
117/* 6 */ {5, s_3_6, -1, 5, 0},
118/* 7 */ {5, s_3_7, -1, 10, 0},
119/* 8 */ {6, s_3_8, -1, 14, 0},
120/* 9 */ {5, s_3_9, -1, 13, 0},
121/* 10 */ {6, s_3_10, -1, 1, 0},
122/* 11 */ {7, s_3_11, 10, 8, 0},
123/* 12 */ {5, s_3_12, -1, 10, 0},
124/* 13 */ {5, s_3_13, -1, 8, 0},
125/* 14 */ {7, s_3_14, 13, 7, 0},
126/* 15 */ {4, s_3_15, -1, 7, 0},
127/* 16 */ {4, s_3_16, -1, 8, 0},
128/* 17 */ {7, s_3_17, -1, 13, 0},
129/* 18 */ {7, s_3_18, -1, 11, 0},
130/* 19 */ {7, s_3_19, -1, 12, 0}
131};
132
133static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
134static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
135static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
136static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
137static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
138static const symbol s_4_5[3] = { 'f', 'u', 'l' };
139static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
140
141static const struct among a_4[7] = {
142/* 0 */ {5, s_4_0, -1, 2, 0},
143/* 1 */ {5, s_4_1, -1, 3, 0},
144/* 2 */ {5, s_4_2, -1, 1, 0},
145/* 3 */ {5, s_4_3, -1, 2, 0},
146/* 4 */ {4, s_4_4, -1, 2, 0},
147/* 5 */ {3, s_4_5, -1, 3, 0},
148/* 6 */ {4, s_4_6, -1, 3, 0}
149};
150
151static const symbol s_5_0[2] = { 'i', 'c' };
152static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
153static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
154static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
155static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
156static const symbol s_5_5[3] = { 'a', 't', 'e' };
157static const symbol s_5_6[3] = { 'i', 'v', 'e' };
158static const symbol s_5_7[3] = { 'i', 'z', 'e' };
159static const symbol s_5_8[3] = { 'i', 't', 'i' };
160static const symbol s_5_9[2] = { 'a', 'l' };
161static const symbol s_5_10[3] = { 'i', 's', 'm' };
162static const symbol s_5_11[3] = { 'i', 'o', 'n' };
163static const symbol s_5_12[2] = { 'e', 'r' };
164static const symbol s_5_13[3] = { 'o', 'u', 's' };
165static const symbol s_5_14[3] = { 'a', 'n', 't' };
166static const symbol s_5_15[3] = { 'e', 'n', 't' };
167static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
168static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
169static const symbol s_5_18[2] = { 'o', 'u' };
170
171static const struct among a_5[19] = {
172/* 0 */ {2, s_5_0, -1, 1, 0},
173/* 1 */ {4, s_5_1, -1, 1, 0},
174/* 2 */ {4, s_5_2, -1, 1, 0},
175/* 3 */ {4, s_5_3, -1, 1, 0},
176/* 4 */ {4, s_5_4, -1, 1, 0},
177/* 5 */ {3, s_5_5, -1, 1, 0},
178/* 6 */ {3, s_5_6, -1, 1, 0},
179/* 7 */ {3, s_5_7, -1, 1, 0},
180/* 8 */ {3, s_5_8, -1, 1, 0},
181/* 9 */ {2, s_5_9, -1, 1, 0},
182/* 10 */ {3, s_5_10, -1, 1, 0},
183/* 11 */ {3, s_5_11, -1, 2, 0},
184/* 12 */ {2, s_5_12, -1, 1, 0},
185/* 13 */ {3, s_5_13, -1, 1, 0},
186/* 14 */ {3, s_5_14, -1, 1, 0},
187/* 15 */ {3, s_5_15, -1, 1, 0},
188/* 16 */ {4, s_5_16, 15, 1, 0},
189/* 17 */ {5, s_5_17, 16, 1, 0},
190/* 18 */ {2, s_5_18, -1, 1, 0}
191};
192
193static const unsigned char g_v[] = { 17, 65, 16, 1 };
194
195static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
196
197static const symbol s_0[] = { 's', 's' };
198static const symbol s_1[] = { 'i' };
199static const symbol s_2[] = { 'e', 'e' };
200static const symbol s_3[] = { 'e' };
201static const symbol s_4[] = { 'e' };
202static const symbol s_5[] = { 'y' };
203static const symbol s_6[] = { 'Y' };
204static const symbol s_7[] = { 'i' };
205static const symbol s_8[] = { 't', 'i', 'o', 'n' };
206static const symbol s_9[] = { 'e', 'n', 'c', 'e' };
207static const symbol s_10[] = { 'a', 'n', 'c', 'e' };
208static const symbol s_11[] = { 'a', 'b', 'l', 'e' };
209static const symbol s_12[] = { 'e', 'n', 't' };
210static const symbol s_13[] = { 'e' };
211static const symbol s_14[] = { 'i', 'z', 'e' };
212static const symbol s_15[] = { 'a', 't', 'e' };
213static const symbol s_16[] = { 'a', 'l' };
214static const symbol s_17[] = { 'a', 'l' };
215static const symbol s_18[] = { 'f', 'u', 'l' };
216static const symbol s_19[] = { 'o', 'u', 's' };
217static const symbol s_20[] = { 'i', 'v', 'e' };
218static const symbol s_21[] = { 'b', 'l', 'e' };
219static const symbol s_22[] = { 'a', 'l' };
220static const symbol s_23[] = { 'i', 'c' };
221static const symbol s_24[] = { 's' };
222static const symbol s_25[] = { 't' };
223static const symbol s_26[] = { 'e' };
224static const symbol s_27[] = { 'l' };
225static const symbol s_28[] = { 'l' };
226static const symbol s_29[] = { 'y' };
227static const symbol s_30[] = { 'Y' };
228static const symbol s_31[] = { 'y' };
229static const symbol s_32[] = { 'Y' };
230static const symbol s_33[] = { 'Y' };
231static const symbol s_34[] = { 'y' };
232
233static int
234r_shortv (struct SN_env *z)
235{
236 if (out_grouping_b (z, g_v_WXY, 89, 121, 0))
237 return 0;
238 if (in_grouping_b (z, g_v, 97, 121, 0))
239 return 0;
240 if (out_grouping_b (z, g_v, 97, 121, 0))
241 return 0;
242 return 1;
243}
244
245static int
246r_R1 (struct SN_env *z)
247{
248 if (!(z->I[0] <= z->c))
249 return 0;
250 return 1;
251}
252
253static int
254r_R2 (struct SN_env *z)
255{
256 if (!(z->I[1] <= z->c))
257 return 0;
258 return 1;
259}
260
261static int
262r_Step_1a (struct SN_env *z)
263{
264 int among_var;
265 z->ket = z->c; /* [, line 25 */
266 if (z->c <= z->lb || z->p[z->c - 1] != 115)
267 return 0;
268 among_var = find_among_b (z, a_0, 4); /* substring, line 25 */
269 if (!(among_var))
270 return 0;
271 z->bra = z->c; /* ], line 25 */
272 switch (among_var)
273 {
274 case 0:
275 return 0;
276 case 1:
277 {
278 int ret = slice_from_s (z, 2, s_0); /* <-, line 26 */
279 if (ret < 0)
280 return ret;
281 }
282 break;
283 case 2:
284 {
285 int ret = slice_from_s (z, 1, s_1); /* <-, line 27 */
286 if (ret < 0)
287 return ret;
288 }
289 break;
290 case 3:
291 {
292 int ret = slice_del (z); /* delete, line 29 */
293 if (ret < 0)
294 return ret;
295 }
296 break;
297 }
298 return 1;
299}
300
301static int
302r_Step_1b (struct SN_env *z)
303{
304 int among_var;
305 z->ket = z->c; /* [, line 34 */
306 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103))
307 return 0;
308 among_var = find_among_b (z, a_2, 3); /* substring, line 34 */
309 if (!(among_var))
310 return 0;
311 z->bra = z->c; /* ], line 34 */
312 switch (among_var)
313 {
314 case 0:
315 return 0;
316 case 1:
317 {
318 int ret = r_R1 (z);
319 if (ret == 0)
320 return 0; /* call R1, line 35 */
321 if (ret < 0)
322 return ret;
323 }
324 {
325 int ret = slice_from_s (z, 2, s_2); /* <-, line 35 */
326 if (ret < 0)
327 return ret;
328 }
329 break;
330 case 2:
331 {
332 int m_test = z->l - z->c; /* test, line 38 */
333 { /* gopast *//* grouping v, line 38 */
334 int ret = out_grouping_b (z, g_v, 97, 121, 1);
335 if (ret < 0)
336 return 0;
337 z->c -= ret;
338 }
339 z->c = z->l - m_test;
340 }
341 {
342 int ret = slice_del (z); /* delete, line 38 */
343 if (ret < 0)
344 return ret;
345 }
346 {
347 int m_test = z->l - z->c; /* test, line 39 */
348 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3
349 || !((68514004 >> (z->p[z->c - 1] & 0x1f)) & 1))
350 among_var = 3;
351 else
352 among_var = find_among_b (z, a_1, 13); /* substring, line 39 */
353 if (!(among_var))
354 return 0;
355 z->c = z->l - m_test;
356 }
357 switch (among_var)
358 {
359 case 0:
360 return 0;
361 case 1:
362 {
363 int c_keep = z->c;
364 int ret = insert_s (z, z->c, z->c, 1, s_3); /* <+, line 41 */
365 z->c = c_keep;
366 if (ret < 0)
367 return ret;
368 }
369 break;
370 case 2:
371 z->ket = z->c; /* [, line 44 */
372 if (z->c <= z->lb)
373 return 0;
374 z->c--; /* next, line 44 */
375 z->bra = z->c; /* ], line 44 */
376 {
377 int ret = slice_del (z); /* delete, line 44 */
378 if (ret < 0)
379 return ret;
380 }
381 break;
382 case 3:
383 if (z->c != z->I[0])
384 return 0; /* atmark, line 45 */
385 {
386 int m_test = z->l - z->c; /* test, line 45 */
387 {
388 int ret = r_shortv (z);
389 if (ret == 0)
390 return 0; /* call shortv, line 45 */
391 if (ret < 0)
392 return ret;
393 }
394 z->c = z->l - m_test;
395 }
396 {
397 int c_keep = z->c;
398 int ret = insert_s (z, z->c, z->c, 1, s_4); /* <+, line 45 */
399 z->c = c_keep;
400 if (ret < 0)
401 return ret;
402 }
403 break;
404 }
405 break;
406 }
407 return 1;
408}
409
410static int
411r_Step_1c (struct SN_env *z)
412{
413 z->ket = z->c; /* [, line 52 */
414 {
415 int m1 = z->l - z->c;
416 (void) m1; /* or, line 52 */
417 if (!(eq_s_b (z, 1, s_5)))
418 goto lab1;
419 goto lab0;
420 lab1:
421 z->c = z->l - m1;
422 if (!(eq_s_b (z, 1, s_6)))
423 return 0;
424 }
425lab0:
426 z->bra = z->c; /* ], line 52 */
427 { /* gopast *//* grouping v, line 53 */
428 int ret = out_grouping_b (z, g_v, 97, 121, 1);
429 if (ret < 0)
430 return 0;
431 z->c -= ret;
432 }
433 {
434 int ret = slice_from_s (z, 1, s_7); /* <-, line 54 */
435 if (ret < 0)
436 return ret;
437 }
438 return 1;
439}
440
441static int
442r_Step_2 (struct SN_env *z)
443{
444 int among_var;
445 z->ket = z->c; /* [, line 58 */
446 if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3
447 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1))
448 return 0;
449 among_var = find_among_b (z, a_3, 20); /* substring, line 58 */
450 if (!(among_var))
451 return 0;
452 z->bra = z->c; /* ], line 58 */
453 {
454 int ret = r_R1 (z);
455 if (ret == 0)
456 return 0; /* call R1, line 58 */
457 if (ret < 0)
458 return ret;
459 }
460 switch (among_var)
461 {
462 case 0:
463 return 0;
464 case 1:
465 {
466 int ret = slice_from_s (z, 4, s_8); /* <-, line 59 */
467 if (ret < 0)
468 return ret;
469 }
470 break;
471 case 2:
472 {
473 int ret = slice_from_s (z, 4, s_9); /* <-, line 60 */
474 if (ret < 0)
475 return ret;
476 }
477 break;
478 case 3:
479 {
480 int ret = slice_from_s (z, 4, s_10); /* <-, line 61 */
481 if (ret < 0)
482 return ret;
483 }
484 break;
485 case 4:
486 {
487 int ret = slice_from_s (z, 4, s_11); /* <-, line 62 */
488 if (ret < 0)
489 return ret;
490 }
491 break;
492 case 5:
493 {
494 int ret = slice_from_s (z, 3, s_12); /* <-, line 63 */
495 if (ret < 0)
496 return ret;
497 }
498 break;
499 case 6:
500 {
501 int ret = slice_from_s (z, 1, s_13); /* <-, line 64 */
502 if (ret < 0)
503 return ret;
504 }
505 break;
506 case 7:
507 {
508 int ret = slice_from_s (z, 3, s_14); /* <-, line 66 */
509 if (ret < 0)
510 return ret;
511 }
512 break;
513 case 8:
514 {
515 int ret = slice_from_s (z, 3, s_15); /* <-, line 68 */
516 if (ret < 0)
517 return ret;
518 }
519 break;
520 case 9:
521 {
522 int ret = slice_from_s (z, 2, s_16); /* <-, line 69 */
523 if (ret < 0)
524 return ret;
525 }
526 break;
527 case 10:
528 {
529 int ret = slice_from_s (z, 2, s_17); /* <-, line 71 */
530 if (ret < 0)
531 return ret;
532 }
533 break;
534 case 11:
535 {
536 int ret = slice_from_s (z, 3, s_18); /* <-, line 72 */
537 if (ret < 0)
538 return ret;
539 }
540 break;
541 case 12:
542 {
543 int ret = slice_from_s (z, 3, s_19); /* <-, line 74 */
544 if (ret < 0)
545 return ret;
546 }
547 break;
548 case 13:
549 {
550 int ret = slice_from_s (z, 3, s_20); /* <-, line 76 */
551 if (ret < 0)
552 return ret;
553 }
554 break;
555 case 14:
556 {
557 int ret = slice_from_s (z, 3, s_21); /* <-, line 77 */
558 if (ret < 0)
559 return ret;
560 }
561 break;
562 }
563 return 1;
564}
565
566static int
567r_Step_3 (struct SN_env *z)
568{
569 int among_var;
570 z->ket = z->c; /* [, line 82 */
571 if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3
572 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1))
573 return 0;
574 among_var = find_among_b (z, a_4, 7); /* substring, line 82 */
575 if (!(among_var))
576 return 0;
577 z->bra = z->c; /* ], line 82 */
578 {
579 int ret = r_R1 (z);
580 if (ret == 0)
581 return 0; /* call R1, line 82 */
582 if (ret < 0)
583 return ret;
584 }
585 switch (among_var)
586 {
587 case 0:
588 return 0;
589 case 1:
590 {
591 int ret = slice_from_s (z, 2, s_22); /* <-, line 83 */
592 if (ret < 0)
593 return ret;
594 }
595 break;
596 case 2:
597 {
598 int ret = slice_from_s (z, 2, s_23); /* <-, line 85 */
599 if (ret < 0)
600 return ret;
601 }
602 break;
603 case 3:
604 {
605 int ret = slice_del (z); /* delete, line 87 */
606 if (ret < 0)
607 return ret;
608 }
609 break;
610 }
611 return 1;
612}
613
614static int
615r_Step_4 (struct SN_env *z)
616{
617 int among_var;
618 z->ket = z->c; /* [, line 92 */
619 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3
620 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1))
621 return 0;
622 among_var = find_among_b (z, a_5, 19); /* substring, line 92 */
623 if (!(among_var))
624 return 0;
625 z->bra = z->c; /* ], line 92 */
626 {
627 int ret = r_R2 (z);
628 if (ret == 0)
629 return 0; /* call R2, line 92 */
630 if (ret < 0)
631 return ret;
632 }
633 switch (among_var)
634 {
635 case 0:
636 return 0;
637 case 1:
638 {
639 int ret = slice_del (z); /* delete, line 95 */
640 if (ret < 0)
641 return ret;
642 }
643 break;
644 case 2:
645 {
646 int m1 = z->l - z->c;
647 (void) m1; /* or, line 96 */
648 if (!(eq_s_b (z, 1, s_24)))
649 goto lab1;
650 goto lab0;
651 lab1:
652 z->c = z->l - m1;
653 if (!(eq_s_b (z, 1, s_25)))
654 return 0;
655 }
656 lab0:
657 {
658 int ret = slice_del (z); /* delete, line 96 */
659 if (ret < 0)
660 return ret;
661 }
662 break;
663 }
664 return 1;
665}
666
667static int
668r_Step_5a (struct SN_env *z)
669{
670 z->ket = z->c; /* [, line 101 */
671 if (!(eq_s_b (z, 1, s_26)))
672 return 0;
673 z->bra = z->c; /* ], line 101 */
674 {
675 int m1 = z->l - z->c;
676 (void) m1; /* or, line 102 */
677 {
678 int ret = r_R2 (z);
679 if (ret == 0)
680 goto lab1; /* call R2, line 102 */
681 if (ret < 0)
682 return ret;
683 }
684 goto lab0;
685 lab1:
686 z->c = z->l - m1;
687 {
688 int ret = r_R1 (z);
689 if (ret == 0)
690 return 0; /* call R1, line 102 */
691 if (ret < 0)
692 return ret;
693 }
694 {
695 int m2 = z->l - z->c;
696 (void) m2; /* not, line 102 */
697 {
698 int ret = r_shortv (z);
699 if (ret == 0)
700 goto lab2; /* call shortv, line 102 */
701 if (ret < 0)
702 return ret;
703 }
704 return 0;
705 lab2:
706 z->c = z->l - m2;
707 }
708 }
709lab0:
710 {
711 int ret = slice_del (z); /* delete, line 103 */
712 if (ret < 0)
713 return ret;
714 }
715 return 1;
716}
717
718static int
719r_Step_5b (struct SN_env *z)
720{
721 z->ket = z->c; /* [, line 107 */
722 if (!(eq_s_b (z, 1, s_27)))
723 return 0;
724 z->bra = z->c; /* ], line 107 */
725 {
726 int ret = r_R2 (z);
727 if (ret == 0)
728 return 0; /* call R2, line 108 */
729 if (ret < 0)
730 return ret;
731 }
732 if (!(eq_s_b (z, 1, s_28)))
733 return 0;
734 {
735 int ret = slice_del (z); /* delete, line 109 */
736 if (ret < 0)
737 return ret;
738 }
739 return 1;
740}
741
742extern int
744{
745 z->B[0] = 0; /* unset Y_found, line 115 */
746 {
747 int c1 = z->c; /* do, line 116 */
748 z->bra = z->c; /* [, line 116 */
749 if (!(eq_s (z, 1, s_29)))
750 goto lab0;
751 z->ket = z->c; /* ], line 116 */
752 {
753 int ret = slice_from_s (z, 1, s_30); /* <-, line 116 */
754 if (ret < 0)
755 return ret;
756 }
757 z->B[0] = 1; /* set Y_found, line 116 */
758 lab0:
759 z->c = c1;
760 }
761 {
762 int c2 = z->c; /* do, line 117 */
763 while (1)
764 { /* repeat, line 117 */
765 int c3 = z->c;
766 while (1)
767 { /* goto, line 117 */
768 int c4 = z->c;
769 if (in_grouping (z, g_v, 97, 121, 0))
770 goto lab3;
771 z->bra = z->c; /* [, line 117 */
772 if (!(eq_s (z, 1, s_31)))
773 goto lab3;
774 z->ket = z->c; /* ], line 117 */
775 z->c = c4;
776 break;
777 lab3:
778 z->c = c4;
779 if (z->c >= z->l)
780 goto lab2;
781 z->c++; /* goto, line 117 */
782 }
783 {
784 int ret = slice_from_s (z, 1, s_32); /* <-, line 117 */
785 if (ret < 0)
786 return ret;
787 }
788 z->B[0] = 1; /* set Y_found, line 117 */
789 continue;
790 lab2:
791 z->c = c3;
792 break;
793 }
794 z->c = c2;
795 }
796 z->I[0] = z->l;
797 z->I[1] = z->l;
798 {
799 int c5 = z->c; /* do, line 121 */
800 { /* gopast *//* grouping v, line 122 */
801 int ret = out_grouping (z, g_v, 97, 121, 1);
802 if (ret < 0)
803 goto lab4;
804 z->c += ret;
805 }
806 { /* gopast *//* non v, line 122 */
807 int ret = in_grouping (z, g_v, 97, 121, 1);
808 if (ret < 0)
809 goto lab4;
810 z->c += ret;
811 }
812 z->I[0] = z->c; /* setmark p1, line 122 */
813 { /* gopast *//* grouping v, line 123 */
814 int ret = out_grouping (z, g_v, 97, 121, 1);
815 if (ret < 0)
816 goto lab4;
817 z->c += ret;
818 }
819 { /* gopast *//* non v, line 123 */
820 int ret = in_grouping (z, g_v, 97, 121, 1);
821 if (ret < 0)
822 goto lab4;
823 z->c += ret;
824 }
825 z->I[1] = z->c; /* setmark p2, line 123 */
826 lab4:
827 z->c = c5;
828 }
829 z->lb = z->c;
830 z->c = z->l; /* backwards, line 126 */
831
832 {
833 int m6 = z->l - z->c;
834 (void) m6; /* do, line 127 */
835 {
836 int ret = r_Step_1a (z);
837 if (ret == 0)
838 goto lab5; /* call Step_1a, line 127 */
839 if (ret < 0)
840 return ret;
841 }
842 lab5:
843 z->c = z->l - m6;
844 }
845 {
846 int m7 = z->l - z->c;
847 (void) m7; /* do, line 128 */
848 {
849 int ret = r_Step_1b (z);
850 if (ret == 0)
851 goto lab6; /* call Step_1b, line 128 */
852 if (ret < 0)
853 return ret;
854 }
855 lab6:
856 z->c = z->l - m7;
857 }
858 {
859 int m8 = z->l - z->c;
860 (void) m8; /* do, line 129 */
861 {
862 int ret = r_Step_1c (z);
863 if (ret == 0)
864 goto lab7; /* call Step_1c, line 129 */
865 if (ret < 0)
866 return ret;
867 }
868 lab7:
869 z->c = z->l - m8;
870 }
871 {
872 int m9 = z->l - z->c;
873 (void) m9; /* do, line 130 */
874 {
875 int ret = r_Step_2 (z);
876 if (ret == 0)
877 goto lab8; /* call Step_2, line 130 */
878 if (ret < 0)
879 return ret;
880 }
881 lab8:
882 z->c = z->l - m9;
883 }
884 {
885 int m10 = z->l - z->c;
886 (void) m10; /* do, line 131 */
887 {
888 int ret = r_Step_3 (z);
889 if (ret == 0)
890 goto lab9; /* call Step_3, line 131 */
891 if (ret < 0)
892 return ret;
893 }
894 lab9:
895 z->c = z->l - m10;
896 }
897 {
898 int m11 = z->l - z->c;
899 (void) m11; /* do, line 132 */
900 {
901 int ret = r_Step_4 (z);
902 if (ret == 0)
903 goto lab10; /* call Step_4, line 132 */
904 if (ret < 0)
905 return ret;
906 }
907 lab10:
908 z->c = z->l - m11;
909 }
910 {
911 int m12 = z->l - z->c;
912 (void) m12; /* do, line 133 */
913 {
914 int ret = r_Step_5a (z);
915 if (ret == 0)
916 goto lab11; /* call Step_5a, line 133 */
917 if (ret < 0)
918 return ret;
919 }
920 lab11:
921 z->c = z->l - m12;
922 }
923 {
924 int m13 = z->l - z->c;
925 (void) m13; /* do, line 134 */
926 {
927 int ret = r_Step_5b (z);
928 if (ret == 0)
929 goto lab12; /* call Step_5b, line 134 */
930 if (ret < 0)
931 return ret;
932 }
933 lab12:
934 z->c = z->l - m13;
935 }
936 z->c = z->lb;
937 {
938 int c14 = z->c; /* do, line 137 */
939 if (!(z->B[0]))
940 goto lab13; /* Boolean test Y_found, line 137 */
941 while (1)
942 { /* repeat, line 137 */
943 int c15 = z->c;
944 while (1)
945 { /* goto, line 137 */
946 int c16 = z->c;
947 z->bra = z->c; /* [, line 137 */
948 if (!(eq_s (z, 1, s_33)))
949 goto lab15;
950 z->ket = z->c; /* ], line 137 */
951 z->c = c16;
952 break;
953 lab15:
954 z->c = c16;
955 if (z->c >= z->l)
956 goto lab14;
957 z->c++; /* goto, line 137 */
958 }
959 {
960 int ret = slice_from_s (z, 1, s_34); /* <-, line 137 */
961 if (ret < 0)
962 return ret;
963 }
964 continue;
965 lab14:
966 z->c = c15;
967 break;
968 }
969 lab13:
970 z->c = c14;
971 }
972 return 1;
973}
974
975extern struct SN_env *
977{
978 return SN_create_env (0, 2, 1);
979}
980
981extern void
983{
984 SN_close_env (z, 0);
985}
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 insert_s(struct SN_env *z, int bra, int ket, int s_size, const symbol *s)
Definition utilities.c:579
int slice_del(struct SN_env *z)
Definition utilities.c:573
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:206
int eq_s(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:280
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
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
int porter_ISO_8859_1_stem(struct SN_env *z)
static const symbol s_0_2[4]
static const symbol s_1_5[2]
static const symbol s_25[]
static const symbol s_2[]
static const symbol s_5_6[3]
static const symbol s_3_12[5]
static const struct among a_3[20]
static const symbol s_3_8[6]
static const symbol s_4[]
static const symbol s_3_15[4]
static const symbol s_1_9[2]
static const symbol s_1_6[2]
static const symbol s_3_14[7]
static const symbol s_4_6[4]
static const symbol s_5_12[2]
static const symbol s_30[]
static int r_Step_5b(struct SN_env *z)
static int r_Step_3(struct SN_env *z)
static const symbol s_1_2[2]
static const symbol s_0_0[1]
static const symbol s_5_0[2]
static const symbol s_4_3[5]
static const symbol s_29[]
void porter_ISO_8859_1_close_env(struct SN_env *z)
static const symbol s_4_4[4]
static const symbol s_2_0[2]
struct SN_env * porter_ISO_8859_1_create_env(void)
static const symbol s_27[]
static const symbol s_1_3[2]
static const symbol s_2_1[3]
static const symbol s_3_0[4]
static const symbol s_3_6[5]
static const symbol s_6[]
static const symbol s_5_9[2]
static const symbol s_21[]
static const symbol s_3[]
static const symbol s_3_4[4]
static const symbol s_5_17[5]
static int r_R2(struct SN_env *z)
static const symbol s_7[]
static const symbol s_5_7[3]
static const symbol s_32[]
static const symbol s_13[]
static const symbol s_1_7[2]
static const symbol s_1_1[2]
static const symbol s_20[]
static const symbol s_3_17[7]
static const symbol s_3_10[6]
static const symbol s_3_13[5]
static const symbol s_19[]
static const symbol s_23[]
static const symbol s_5_14[3]
static const symbol s_24[]
static const symbol s_4_5[3]
static int r_Step_1c(struct SN_env *z)
static const symbol s_0_1[3]
static const unsigned char g_v_WXY[]
static int r_R1(struct SN_env *z)
static const symbol s_5_3[4]
static const symbol s_16[]
static const symbol s_5_4[4]
static const symbol s_14[]
static int r_Step_5a(struct SN_env *z)
static const symbol s_22[]
static const symbol s_1_11[2]
static const symbol s_4_0[5]
static const symbol s_10[]
static const struct among a_0[4]
static const symbol s_1_10[2]
static const symbol s_5_2[4]
static const symbol s_1[]
static const symbol s_3_19[7]
static int r_Step_1a(struct SN_env *z)
static int r_shortv(struct SN_env *z)
static const struct among a_2[3]
static const symbol s_1_8[2]
static const struct among a_5[19]
static const symbol s_3_1[4]
static const symbol s_1_4[2]
static const symbol s_31[]
static const symbol s_3_3[3]
static const symbol s_3_9[5]
static const symbol s_2_2[3]
static const struct among a_1[13]
static const symbol s_11[]
static const symbol s_12[]
static const symbol s_5_8[3]
static const symbol s_3_18[7]
static const symbol s_5_11[3]
static const symbol s_33[]
static int r_Step_4(struct SN_env *z)
static int r_Step_2(struct SN_env *z)
static const struct among a_4[7]
static const symbol s_5_16[4]
static const symbol s_5_15[3]
static const symbol s_18[]
static const symbol s_17[]
static const symbol s_5_13[3]
static int r_Step_1b(struct SN_env *z)
static const symbol s_28[]
static const symbol s_0_3[2]
static const symbol s_3_2[4]
static const symbol s_5_5[3]
static const symbol s_5_10[3]
static const unsigned char g_v[]
static const symbol s_8[]
static const symbol s_9[]
static const symbol s_3_7[5]
static const symbol s_4_1[5]
static const symbol s_5[]
static const symbol s_5_18[2]
static const symbol s_3_5[5]
static const symbol s_15[]
static const symbol s_1_12[2]
static const symbol s_26[]
static const symbol s_3_16[4]
static const symbol s_4_2[5]
static const symbol s_5_1[4]
static const symbol s_0[]
static const symbol s_34[]
static const symbol s_3_11[7]
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
Definition header.h:16