PostgreSQL Source Code git master
stem_ISO_8859_1_porter.c
Go to the documentation of this file.
1/* Generated from porter.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
2
4
5#include <stddef.h>
6
7#include "snowball_runtime.h"
8
9struct SN_local {
10 struct SN_env z;
11 int i_p2;
12 int i_p1;
13};
14
15typedef struct SN_local SN_local;
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20extern int porter_ISO_8859_1_stem(struct SN_env * z);
21#ifdef __cplusplus
22}
23#endif
24
25static int r_Step_5b(struct SN_env * z);
26static int r_Step_5a(struct SN_env * z);
27static int r_Step_4(struct SN_env * z);
28static int r_Step_3(struct SN_env * z);
29static int r_Step_2(struct SN_env * z);
30static int r_Step_1c(struct SN_env * z);
31static int r_Step_1b(struct SN_env * z);
32static int r_Step_1a(struct SN_env * z);
33static int r_R2(struct SN_env * z);
34static int r_R1(struct SN_env * z);
35static int r_shortv(struct SN_env * z);
36
37static const symbol s_0[] = { 's', 's' };
38static const symbol s_1[] = { 'i' };
39static const symbol s_2[] = { 'e', 'e' };
40static const symbol s_3[] = { 'e' };
41static const symbol s_4[] = { 'e' };
42static const symbol s_5[] = { 'i' };
43static const symbol s_6[] = { 't', 'i', 'o', 'n' };
44static const symbol s_7[] = { 'e', 'n', 'c', 'e' };
45static const symbol s_8[] = { 'a', 'n', 'c', 'e' };
46static const symbol s_9[] = { 'a', 'b', 'l', 'e' };
47static const symbol s_10[] = { 'e', 'n', 't' };
48static const symbol s_11[] = { 'e' };
49static const symbol s_12[] = { 'i', 'z', 'e' };
50static const symbol s_13[] = { 'a', 't', 'e' };
51static const symbol s_14[] = { 'a', 'l' };
52static const symbol s_15[] = { 'f', 'u', 'l' };
53static const symbol s_16[] = { 'o', 'u', 's' };
54static const symbol s_17[] = { 'i', 'v', 'e' };
55static const symbol s_18[] = { 'b', 'l', 'e' };
56static const symbol s_19[] = { 'a', 'l' };
57static const symbol s_20[] = { 'i', 'c' };
58static const symbol s_21[] = { 'Y' };
59static const symbol s_22[] = { 'Y' };
60static const symbol s_23[] = { 'y' };
61
62static const symbol s_0_0[1] = { 's' };
63static const symbol s_0_1[3] = { 'i', 'e', 's' };
64static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
65static const symbol s_0_3[2] = { 's', 's' };
66static const struct among a_0[4] = {
67{ 1, s_0_0, 0, 3, 0},
68{ 3, s_0_1, -1, 2, 0},
69{ 4, s_0_2, -2, 1, 0},
70{ 2, s_0_3, -3, -1, 0}
71};
72
73static const symbol s_1_1[2] = { 'b', 'b' };
74static const symbol s_1_2[2] = { 'd', 'd' };
75static const symbol s_1_3[2] = { 'f', 'f' };
76static const symbol s_1_4[2] = { 'g', 'g' };
77static const symbol s_1_5[2] = { 'b', 'l' };
78static const symbol s_1_6[2] = { 'm', 'm' };
79static const symbol s_1_7[2] = { 'n', 'n' };
80static const symbol s_1_8[2] = { 'p', 'p' };
81static const symbol s_1_9[2] = { 'r', 'r' };
82static const symbol s_1_10[2] = { 'a', 't' };
83static const symbol s_1_11[2] = { 't', 't' };
84static const symbol s_1_12[2] = { 'i', 'z' };
85static const struct among a_1[13] = {
86{ 0, 0, 0, 3, 0},
87{ 2, s_1_1, -1, 2, 0},
88{ 2, s_1_2, -2, 2, 0},
89{ 2, s_1_3, -3, 2, 0},
90{ 2, s_1_4, -4, 2, 0},
91{ 2, s_1_5, -5, 1, 0},
92{ 2, s_1_6, -6, 2, 0},
93{ 2, s_1_7, -7, 2, 0},
94{ 2, s_1_8, -8, 2, 0},
95{ 2, s_1_9, -9, 2, 0},
96{ 2, s_1_10, -10, 1, 0},
97{ 2, s_1_11, -11, 2, 0},
98{ 2, s_1_12, -12, 1, 0}
99};
100
101static const symbol s_2_0[2] = { 'e', 'd' };
102static const symbol s_2_1[3] = { 'e', 'e', 'd' };
103static const symbol s_2_2[3] = { 'i', 'n', 'g' };
104static const struct among a_2[3] = {
105{ 2, s_2_0, 0, 2, 0},
106{ 3, s_2_1, -1, 1, 0},
107{ 3, s_2_2, 0, 2, 0}
108};
109
110static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
111static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
112static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
113static const symbol s_3_3[3] = { 'e', 'l', 'i' };
114static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
115static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
116static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
117static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
118static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
119static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
120static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
121static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
122static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
123static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
124static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
125static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
126static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
127static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
128static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
129static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
130static const struct among a_3[20] = {
131{ 4, s_3_0, 0, 3, 0},
132{ 4, s_3_1, 0, 2, 0},
133{ 4, s_3_2, 0, 4, 0},
134{ 3, s_3_3, 0, 6, 0},
135{ 4, s_3_4, 0, 9, 0},
136{ 5, s_3_5, 0, 11, 0},
137{ 5, s_3_6, 0, 5, 0},
138{ 5, s_3_7, 0, 9, 0},
139{ 6, s_3_8, 0, 13, 0},
140{ 5, s_3_9, 0, 12, 0},
141{ 6, s_3_10, 0, 1, 0},
142{ 7, s_3_11, -1, 8, 0},
143{ 5, s_3_12, 0, 9, 0},
144{ 5, s_3_13, 0, 8, 0},
145{ 7, s_3_14, -1, 7, 0},
146{ 4, s_3_15, 0, 7, 0},
147{ 4, s_3_16, 0, 8, 0},
148{ 7, s_3_17, 0, 12, 0},
149{ 7, s_3_18, 0, 10, 0},
150{ 7, s_3_19, 0, 11, 0}
151};
152
153static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
154static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
155static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
156static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
157static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
158static const symbol s_4_5[3] = { 'f', 'u', 'l' };
159static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
160static const struct among a_4[7] = {
161{ 5, s_4_0, 0, 2, 0},
162{ 5, s_4_1, 0, 3, 0},
163{ 5, s_4_2, 0, 1, 0},
164{ 5, s_4_3, 0, 2, 0},
165{ 4, s_4_4, 0, 2, 0},
166{ 3, s_4_5, 0, 3, 0},
167{ 4, s_4_6, 0, 3, 0}
168};
169
170static const symbol s_5_0[2] = { 'i', 'c' };
171static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
172static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
173static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
174static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
175static const symbol s_5_5[3] = { 'a', 't', 'e' };
176static const symbol s_5_6[3] = { 'i', 'v', 'e' };
177static const symbol s_5_7[3] = { 'i', 'z', 'e' };
178static const symbol s_5_8[3] = { 'i', 't', 'i' };
179static const symbol s_5_9[2] = { 'a', 'l' };
180static const symbol s_5_10[3] = { 'i', 's', 'm' };
181static const symbol s_5_11[3] = { 'i', 'o', 'n' };
182static const symbol s_5_12[2] = { 'e', 'r' };
183static const symbol s_5_13[3] = { 'o', 'u', 's' };
184static const symbol s_5_14[3] = { 'a', 'n', 't' };
185static const symbol s_5_15[3] = { 'e', 'n', 't' };
186static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
187static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
188static const symbol s_5_18[2] = { 'o', 'u' };
189static const struct among a_5[19] = {
190{ 2, s_5_0, 0, 1, 0},
191{ 4, s_5_1, 0, 1, 0},
192{ 4, s_5_2, 0, 1, 0},
193{ 4, s_5_3, 0, 1, 0},
194{ 4, s_5_4, 0, 1, 0},
195{ 3, s_5_5, 0, 1, 0},
196{ 3, s_5_6, 0, 1, 0},
197{ 3, s_5_7, 0, 1, 0},
198{ 3, s_5_8, 0, 1, 0},
199{ 2, s_5_9, 0, 1, 0},
200{ 3, s_5_10, 0, 1, 0},
201{ 3, s_5_11, 0, 2, 0},
202{ 2, s_5_12, 0, 1, 0},
203{ 3, s_5_13, 0, 1, 0},
204{ 3, s_5_14, 0, 1, 0},
205{ 3, s_5_15, 0, 1, 0},
206{ 4, s_5_16, -1, 1, 0},
207{ 5, s_5_17, -1, 1, 0},
208{ 2, s_5_18, 0, 1, 0}
209};
210
211static const unsigned char g_v[] = { 17, 65, 16, 1 };
212
213static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
214
215static int r_shortv(struct SN_env * z) {
216 if (out_grouping_b(z, g_v_WXY, 89, 121, 0)) return 0;
217 if (in_grouping_b(z, g_v, 97, 121, 0)) return 0;
218 return !out_grouping_b(z, g_v, 97, 121, 0);
219}
220
221static int r_R1(struct SN_env * z) {
222 return ((SN_local *)z)->i_p1 <= z->c;
223}
224
225static int r_R2(struct SN_env * z) {
226 return ((SN_local *)z)->i_p2 <= z->c;
227}
228
229static int r_Step_1a(struct SN_env * z) {
230 int among_var;
231 z->ket = z->c;
232 if (z->c <= z->lb || z->p[z->c - 1] != 115) return 0;
233 among_var = find_among_b(z, a_0, 4, 0);
234 if (!among_var) return 0;
235 z->bra = z->c;
236 switch (among_var) {
237 case 1:
238 {
239 int ret = slice_from_s(z, 2, s_0);
240 if (ret < 0) return ret;
241 }
242 break;
243 case 2:
244 {
245 int ret = slice_from_s(z, 1, s_1);
246 if (ret < 0) return ret;
247 }
248 break;
249 case 3:
250 {
251 int ret = slice_del(z);
252 if (ret < 0) return ret;
253 }
254 break;
255 }
256 return 1;
257}
258
259static int r_Step_1b(struct SN_env * z) {
260 int among_var;
261 z->ket = z->c;
262 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0;
263 among_var = find_among_b(z, a_2, 3, 0);
264 if (!among_var) return 0;
265 z->bra = z->c;
266 switch (among_var) {
267 case 1:
268 {
269 int ret = r_R1(z);
270 if (ret <= 0) return ret;
271 }
272 {
273 int ret = slice_from_s(z, 2, s_2);
274 if (ret < 0) return ret;
275 }
276 break;
277 case 2:
278 {
279 int v_1 = z->l - z->c;
280 {
281 int ret = out_grouping_b(z, g_v, 97, 121, 1);
282 if (ret < 0) return 0;
283 z->c -= ret;
284 }
285 z->c = z->l - v_1;
286 }
287 {
288 int ret = slice_del(z);
289 if (ret < 0) return ret;
290 }
291 {
292 int v_2 = z->l - z->c;
293 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((68514004 >> (z->p[z->c - 1] & 0x1f)) & 1)) among_var = 3; else
294 among_var = find_among_b(z, a_1, 13, 0);
295 z->c = z->l - v_2;
296 }
297 switch (among_var) {
298 case 1:
299 {
300 int saved_c = z->c;
301 int ret = insert_s(z, z->c, z->c, 1, s_3);
302 z->c = saved_c;
303 if (ret < 0) return ret;
304 }
305 break;
306 case 2:
307 z->ket = z->c;
308 if (z->c <= z->lb) return 0;
309 z->c--;
310 z->bra = z->c;
311 {
312 int ret = slice_del(z);
313 if (ret < 0) return ret;
314 }
315 break;
316 case 3:
317 if (z->c != ((SN_local *)z)->i_p1) return 0;
318 {
319 int v_3 = z->l - z->c;
320 {
321 int ret = r_shortv(z);
322 if (ret <= 0) return ret;
323 }
324 z->c = z->l - v_3;
325 }
326 {
327 int saved_c = z->c;
328 int ret = insert_s(z, z->c, z->c, 1, s_4);
329 z->c = saved_c;
330 if (ret < 0) return ret;
331 }
332 break;
333 }
334 break;
335 }
336 return 1;
337}
338
339static int r_Step_1c(struct SN_env * z) {
340 z->ket = z->c;
341 do {
342 int v_1 = z->l - z->c;
343 if (z->c <= z->lb || z->p[z->c - 1] != 'y') goto lab0;
344 z->c--;
345 break;
346 lab0:
347 z->c = z->l - v_1;
348 if (z->c <= z->lb || z->p[z->c - 1] != 'Y') return 0;
349 z->c--;
350 } while (0);
351 z->bra = z->c;
352 {
353 int ret = out_grouping_b(z, g_v, 97, 121, 1);
354 if (ret < 0) return 0;
355 z->c -= ret;
356 }
357 {
358 int ret = slice_from_s(z, 1, s_5);
359 if (ret < 0) return ret;
360 }
361 return 1;
362}
363
364static int r_Step_2(struct SN_env * z) {
365 int among_var;
366 z->ket = z->c;
367 if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
368 among_var = find_among_b(z, a_3, 20, 0);
369 if (!among_var) return 0;
370 z->bra = z->c;
371 {
372 int ret = r_R1(z);
373 if (ret <= 0) return ret;
374 }
375 switch (among_var) {
376 case 1:
377 {
378 int ret = slice_from_s(z, 4, s_6);
379 if (ret < 0) return ret;
380 }
381 break;
382 case 2:
383 {
384 int ret = slice_from_s(z, 4, s_7);
385 if (ret < 0) return ret;
386 }
387 break;
388 case 3:
389 {
390 int ret = slice_from_s(z, 4, s_8);
391 if (ret < 0) return ret;
392 }
393 break;
394 case 4:
395 {
396 int ret = slice_from_s(z, 4, s_9);
397 if (ret < 0) return ret;
398 }
399 break;
400 case 5:
401 {
402 int ret = slice_from_s(z, 3, s_10);
403 if (ret < 0) return ret;
404 }
405 break;
406 case 6:
407 {
408 int ret = slice_from_s(z, 1, s_11);
409 if (ret < 0) return ret;
410 }
411 break;
412 case 7:
413 {
414 int ret = slice_from_s(z, 3, s_12);
415 if (ret < 0) return ret;
416 }
417 break;
418 case 8:
419 {
420 int ret = slice_from_s(z, 3, s_13);
421 if (ret < 0) return ret;
422 }
423 break;
424 case 9:
425 {
426 int ret = slice_from_s(z, 2, s_14);
427 if (ret < 0) return ret;
428 }
429 break;
430 case 10:
431 {
432 int ret = slice_from_s(z, 3, s_15);
433 if (ret < 0) return ret;
434 }
435 break;
436 case 11:
437 {
438 int ret = slice_from_s(z, 3, s_16);
439 if (ret < 0) return ret;
440 }
441 break;
442 case 12:
443 {
444 int ret = slice_from_s(z, 3, s_17);
445 if (ret < 0) return ret;
446 }
447 break;
448 case 13:
449 {
450 int ret = slice_from_s(z, 3, s_18);
451 if (ret < 0) return ret;
452 }
453 break;
454 }
455 return 1;
456}
457
458static int r_Step_3(struct SN_env * z) {
459 int among_var;
460 z->ket = z->c;
461 if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
462 among_var = find_among_b(z, a_4, 7, 0);
463 if (!among_var) return 0;
464 z->bra = z->c;
465 {
466 int ret = r_R1(z);
467 if (ret <= 0) return ret;
468 }
469 switch (among_var) {
470 case 1:
471 {
472 int ret = slice_from_s(z, 2, s_19);
473 if (ret < 0) return ret;
474 }
475 break;
476 case 2:
477 {
478 int ret = slice_from_s(z, 2, s_20);
479 if (ret < 0) return ret;
480 }
481 break;
482 case 3:
483 {
484 int ret = slice_del(z);
485 if (ret < 0) return ret;
486 }
487 break;
488 }
489 return 1;
490}
491
492static int r_Step_4(struct SN_env * z) {
493 int among_var;
494 z->ket = z->c;
495 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
496 among_var = find_among_b(z, a_5, 19, 0);
497 if (!among_var) return 0;
498 z->bra = z->c;
499 {
500 int ret = r_R2(z);
501 if (ret <= 0) return ret;
502 }
503 switch (among_var) {
504 case 1:
505 {
506 int ret = slice_del(z);
507 if (ret < 0) return ret;
508 }
509 break;
510 case 2:
511 do {
512 int v_1 = z->l - z->c;
513 if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab0;
514 z->c--;
515 break;
516 lab0:
517 z->c = z->l - v_1;
518 if (z->c <= z->lb || z->p[z->c - 1] != 't') return 0;
519 z->c--;
520 } while (0);
521 {
522 int ret = slice_del(z);
523 if (ret < 0) return ret;
524 }
525 break;
526 }
527 return 1;
528}
529
530static int r_Step_5a(struct SN_env * z) {
531 z->ket = z->c;
532 if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
533 z->c--;
534 z->bra = z->c;
535 do {
536 {
537 int ret = r_R2(z);
538 if (ret == 0) goto lab0;
539 if (ret < 0) return ret;
540 }
541 break;
542 lab0:
543 {
544 int ret = r_R1(z);
545 if (ret <= 0) return ret;
546 }
547 {
548 int v_1 = z->l - z->c;
549 {
550 int ret = r_shortv(z);
551 if (ret == 0) goto lab1;
552 if (ret < 0) return ret;
553 }
554 return 0;
555 lab1:
556 z->c = z->l - v_1;
557 }
558 } while (0);
559 {
560 int ret = slice_del(z);
561 if (ret < 0) return ret;
562 }
563 return 1;
564}
565
566static int r_Step_5b(struct SN_env * z) {
567 z->ket = z->c;
568 if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0;
569 z->c--;
570 z->bra = z->c;
571 {
572 int ret = r_R2(z);
573 if (ret <= 0) return ret;
574 }
575 if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0;
576 z->c--;
577 {
578 int ret = slice_del(z);
579 if (ret < 0) return ret;
580 }
581 return 1;
582}
583
584extern int porter_ISO_8859_1_stem(struct SN_env * z) {
585 int b_Y_found;
586 b_Y_found = 0;
587 {
588 int v_1 = z->c;
589 z->bra = z->c;
590 if (z->c == z->l || z->p[z->c] != 'y') goto lab0;
591 z->c++;
592 z->ket = z->c;
593 {
594 int ret = slice_from_s(z, 1, s_21);
595 if (ret < 0) return ret;
596 }
597 b_Y_found = 1;
598 lab0:
599 z->c = v_1;
600 }
601 {
602 int v_2 = z->c;
603 while (1) {
604 int v_3 = z->c;
605 while (1) {
606 int v_4 = z->c;
607 if (in_grouping(z, g_v, 97, 121, 0)) goto lab3;
608 z->bra = z->c;
609 if (z->c == z->l || z->p[z->c] != 'y') goto lab3;
610 z->c++;
611 z->ket = z->c;
612 z->c = v_4;
613 break;
614 lab3:
615 z->c = v_4;
616 if (z->c >= z->l) goto lab2;
617 z->c++;
618 }
619 {
620 int ret = slice_from_s(z, 1, s_22);
621 if (ret < 0) return ret;
622 }
623 b_Y_found = 1;
624 continue;
625 lab2:
626 z->c = v_3;
627 break;
628 }
629 z->c = v_2;
630 }
631 ((SN_local *)z)->i_p1 = z->l;
632 ((SN_local *)z)->i_p2 = z->l;
633 {
634 int v_5 = z->c;
635 {
636 int ret = out_grouping(z, g_v, 97, 121, 1);
637 if (ret < 0) goto lab4;
638 z->c += ret;
639 }
640 {
641 int ret = in_grouping(z, g_v, 97, 121, 1);
642 if (ret < 0) goto lab4;
643 z->c += ret;
644 }
645 ((SN_local *)z)->i_p1 = z->c;
646 {
647 int ret = out_grouping(z, g_v, 97, 121, 1);
648 if (ret < 0) goto lab4;
649 z->c += ret;
650 }
651 {
652 int ret = in_grouping(z, g_v, 97, 121, 1);
653 if (ret < 0) goto lab4;
654 z->c += ret;
655 }
656 ((SN_local *)z)->i_p2 = z->c;
657 lab4:
658 z->c = v_5;
659 }
660 z->lb = z->c; z->c = z->l;
661 {
662 int v_6 = z->l - z->c;
663 {
664 int ret = r_Step_1a(z);
665 if (ret < 0) return ret;
666 }
667 z->c = z->l - v_6;
668 }
669 {
670 int v_7 = z->l - z->c;
671 {
672 int ret = r_Step_1b(z);
673 if (ret < 0) return ret;
674 }
675 z->c = z->l - v_7;
676 }
677 {
678 int v_8 = z->l - z->c;
679 {
680 int ret = r_Step_1c(z);
681 if (ret < 0) return ret;
682 }
683 z->c = z->l - v_8;
684 }
685 {
686 int v_9 = z->l - z->c;
687 {
688 int ret = r_Step_2(z);
689 if (ret < 0) return ret;
690 }
691 z->c = z->l - v_9;
692 }
693 {
694 int v_10 = z->l - z->c;
695 {
696 int ret = r_Step_3(z);
697 if (ret < 0) return ret;
698 }
699 z->c = z->l - v_10;
700 }
701 {
702 int v_11 = z->l - z->c;
703 {
704 int ret = r_Step_4(z);
705 if (ret < 0) return ret;
706 }
707 z->c = z->l - v_11;
708 }
709 {
710 int v_12 = z->l - z->c;
711 {
712 int ret = r_Step_5a(z);
713 if (ret < 0) return ret;
714 }
715 z->c = z->l - v_12;
716 }
717 {
718 int v_13 = z->l - z->c;
719 {
720 int ret = r_Step_5b(z);
721 if (ret < 0) return ret;
722 }
723 z->c = z->l - v_13;
724 }
725 z->c = z->lb;
726 {
727 int v_14 = z->c;
728 if (!b_Y_found) goto lab5;
729 while (1) {
730 int v_15 = z->c;
731 while (1) {
732 int v_16 = z->c;
733 z->bra = z->c;
734 if (z->c == z->l || z->p[z->c] != 'Y') goto lab7;
735 z->c++;
736 z->ket = z->c;
737 z->c = v_16;
738 break;
739 lab7:
740 z->c = v_16;
741 if (z->c >= z->l) goto lab6;
742 z->c++;
743 }
744 {
745 int ret = slice_from_s(z, 1, s_23);
746 if (ret < 0) return ret;
747 }
748 continue;
749 lab6:
750 z->c = v_15;
751 break;
752 }
753 lab5:
754 z->c = v_14;
755 }
756 return 1;
757}
758
760 struct SN_env * z = SN_new_env(sizeof(SN_local));
761 if (z) {
762 ((SN_local *)z)->i_p2 = 0;
763 ((SN_local *)z)->i_p1 = 0;
764 }
765 return z;
766}
767
768extern void porter_ISO_8859_1_close_env(struct SN_env * z) {
769 SN_delete_env(z);
770}
771
void SN_delete_env(struct SN_env *z)
Definition: api.c:18
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
unsigned char symbol
Definition: api.h:4
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_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 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]
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_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_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_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_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 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_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_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_3_11[7]
Definition: api.h:15
int lb
Definition: api.h:17
symbol * p
Definition: api.h:16
int ket
Definition: api.h:17
int c
Definition: api.h:17
int bra
Definition: api.h:17
int l
Definition: api.h:17
struct SN_env z
SNOWBALL_ERR insert_s(struct SN_env *z, int bra, int ket, int s_size, const symbol *s)
Definition: utilities.c:464
SNOWBALL_ERR slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:432
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:183
int out_grouping_b(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:219
int find_among_b(struct SN_env *z, const struct among *v, int v_size, int(*call_among_func)(struct SN_env *))
Definition: utilities.c:315
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:207
SNOWBALL_ERR slice_del(struct SN_env *z)
Definition: utilities.c:443
int in_grouping_b(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:195