PostgreSQL Source Code git master
stem_UTF_8_english.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 english_UTF_8_stem(struct SN_env * z);
9#ifdef __cplusplus
10}
11#endif
12static int r_exception2(struct SN_env * z);
13static int r_exception1(struct SN_env * z);
14static int r_Step_5(struct SN_env * z);
15static int r_Step_4(struct SN_env * z);
16static int r_Step_3(struct SN_env * z);
17static int r_Step_2(struct SN_env * z);
18static int r_Step_1c(struct SN_env * z);
19static int r_Step_1b(struct SN_env * z);
20static int r_Step_1a(struct SN_env * z);
21static int r_R2(struct SN_env * z);
22static int r_R1(struct SN_env * z);
23static int r_shortv(struct SN_env * z);
24static int r_mark_regions(struct SN_env * z);
25static int r_postlude(struct SN_env * z);
26static int r_prelude(struct SN_env * z);
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31
32extern struct SN_env * english_UTF_8_create_env(void);
33extern void english_UTF_8_close_env(struct SN_env * z);
34
35
36#ifdef __cplusplus
37}
38#endif
39static const symbol s_0_0[5] = { 'a', 'r', 's', 'e', 'n' };
40static const symbol s_0_1[6] = { 'c', 'o', 'm', 'm', 'u', 'n' };
41static const symbol s_0_2[5] = { 'g', 'e', 'n', 'e', 'r' };
42
43static const struct among a_0[3] =
44{
45{ 5, s_0_0, -1, -1, 0},
46{ 6, s_0_1, -1, -1, 0},
47{ 5, s_0_2, -1, -1, 0}
48};
49
50static const symbol s_1_0[1] = { '\'' };
51static const symbol s_1_1[3] = { '\'', 's', '\'' };
52static const symbol s_1_2[2] = { '\'', 's' };
53
54static const struct among a_1[3] =
55{
56{ 1, s_1_0, -1, 1, 0},
57{ 3, s_1_1, 0, 1, 0},
58{ 2, s_1_2, -1, 1, 0}
59};
60
61static const symbol s_2_0[3] = { 'i', 'e', 'd' };
62static const symbol s_2_1[1] = { 's' };
63static const symbol s_2_2[3] = { 'i', 'e', 's' };
64static const symbol s_2_3[4] = { 's', 's', 'e', 's' };
65static const symbol s_2_4[2] = { 's', 's' };
66static const symbol s_2_5[2] = { 'u', 's' };
67
68static const struct among a_2[6] =
69{
70{ 3, s_2_0, -1, 2, 0},
71{ 1, s_2_1, -1, 3, 0},
72{ 3, s_2_2, 1, 2, 0},
73{ 4, s_2_3, 1, 1, 0},
74{ 2, s_2_4, 1, -1, 0},
75{ 2, s_2_5, 1, -1, 0}
76};
77
78static const symbol s_3_1[2] = { 'b', 'b' };
79static const symbol s_3_2[2] = { 'd', 'd' };
80static const symbol s_3_3[2] = { 'f', 'f' };
81static const symbol s_3_4[2] = { 'g', 'g' };
82static const symbol s_3_5[2] = { 'b', 'l' };
83static const symbol s_3_6[2] = { 'm', 'm' };
84static const symbol s_3_7[2] = { 'n', 'n' };
85static const symbol s_3_8[2] = { 'p', 'p' };
86static const symbol s_3_9[2] = { 'r', 'r' };
87static const symbol s_3_10[2] = { 'a', 't' };
88static const symbol s_3_11[2] = { 't', 't' };
89static const symbol s_3_12[2] = { 'i', 'z' };
90
91static const struct among a_3[13] =
92{
93{ 0, 0, -1, 3, 0},
94{ 2, s_3_1, 0, 2, 0},
95{ 2, s_3_2, 0, 2, 0},
96{ 2, s_3_3, 0, 2, 0},
97{ 2, s_3_4, 0, 2, 0},
98{ 2, s_3_5, 0, 1, 0},
99{ 2, s_3_6, 0, 2, 0},
100{ 2, s_3_7, 0, 2, 0},
101{ 2, s_3_8, 0, 2, 0},
102{ 2, s_3_9, 0, 2, 0},
103{ 2, s_3_10, 0, 1, 0},
104{ 2, s_3_11, 0, 2, 0},
105{ 2, s_3_12, 0, 1, 0}
106};
107
108static const symbol s_4_0[2] = { 'e', 'd' };
109static const symbol s_4_1[3] = { 'e', 'e', 'd' };
110static const symbol s_4_2[3] = { 'i', 'n', 'g' };
111static const symbol s_4_3[4] = { 'e', 'd', 'l', 'y' };
112static const symbol s_4_4[5] = { 'e', 'e', 'd', 'l', 'y' };
113static const symbol s_4_5[5] = { 'i', 'n', 'g', 'l', 'y' };
114
115static const struct among a_4[6] =
116{
117{ 2, s_4_0, -1, 2, 0},
118{ 3, s_4_1, 0, 1, 0},
119{ 3, s_4_2, -1, 2, 0},
120{ 4, s_4_3, -1, 2, 0},
121{ 5, s_4_4, 3, 1, 0},
122{ 5, s_4_5, -1, 2, 0}
123};
124
125static const symbol s_5_0[4] = { 'a', 'n', 'c', 'i' };
126static const symbol s_5_1[4] = { 'e', 'n', 'c', 'i' };
127static const symbol s_5_2[3] = { 'o', 'g', 'i' };
128static const symbol s_5_3[2] = { 'l', 'i' };
129static const symbol s_5_4[3] = { 'b', 'l', 'i' };
130static const symbol s_5_5[4] = { 'a', 'b', 'l', 'i' };
131static const symbol s_5_6[4] = { 'a', 'l', 'l', 'i' };
132static const symbol s_5_7[5] = { 'f', 'u', 'l', 'l', 'i' };
133static const symbol s_5_8[6] = { 'l', 'e', 's', 's', 'l', 'i' };
134static const symbol s_5_9[5] = { 'o', 'u', 's', 'l', 'i' };
135static const symbol s_5_10[5] = { 'e', 'n', 't', 'l', 'i' };
136static const symbol s_5_11[5] = { 'a', 'l', 'i', 't', 'i' };
137static const symbol s_5_12[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
138static const symbol s_5_13[5] = { 'i', 'v', 'i', 't', 'i' };
139static const symbol s_5_14[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
140static const symbol s_5_15[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
141static const symbol s_5_16[5] = { 'a', 'l', 'i', 's', 'm' };
142static const symbol s_5_17[5] = { 'a', 't', 'i', 'o', 'n' };
143static const symbol s_5_18[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
144static const symbol s_5_19[4] = { 'i', 'z', 'e', 'r' };
145static const symbol s_5_20[4] = { 'a', 't', 'o', 'r' };
146static const symbol s_5_21[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
147static const symbol s_5_22[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
148static const symbol s_5_23[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
149
150static const struct among a_5[24] =
151{
152{ 4, s_5_0, -1, 3, 0},
153{ 4, s_5_1, -1, 2, 0},
154{ 3, s_5_2, -1, 13, 0},
155{ 2, s_5_3, -1, 15, 0},
156{ 3, s_5_4, 3, 12, 0},
157{ 4, s_5_5, 4, 4, 0},
158{ 4, s_5_6, 3, 8, 0},
159{ 5, s_5_7, 3, 9, 0},
160{ 6, s_5_8, 3, 14, 0},
161{ 5, s_5_9, 3, 10, 0},
162{ 5, s_5_10, 3, 5, 0},
163{ 5, s_5_11, -1, 8, 0},
164{ 6, s_5_12, -1, 12, 0},
165{ 5, s_5_13, -1, 11, 0},
166{ 6, s_5_14, -1, 1, 0},
167{ 7, s_5_15, 14, 7, 0},
168{ 5, s_5_16, -1, 8, 0},
169{ 5, s_5_17, -1, 7, 0},
170{ 7, s_5_18, 17, 6, 0},
171{ 4, s_5_19, -1, 6, 0},
172{ 4, s_5_20, -1, 7, 0},
173{ 7, s_5_21, -1, 11, 0},
174{ 7, s_5_22, -1, 9, 0},
175{ 7, s_5_23, -1, 10, 0}
176};
177
178static const symbol s_6_0[5] = { 'i', 'c', 'a', 't', 'e' };
179static const symbol s_6_1[5] = { 'a', 't', 'i', 'v', 'e' };
180static const symbol s_6_2[5] = { 'a', 'l', 'i', 'z', 'e' };
181static const symbol s_6_3[5] = { 'i', 'c', 'i', 't', 'i' };
182static const symbol s_6_4[4] = { 'i', 'c', 'a', 'l' };
183static const symbol s_6_5[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
184static const symbol s_6_6[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
185static const symbol s_6_7[3] = { 'f', 'u', 'l' };
186static const symbol s_6_8[4] = { 'n', 'e', 's', 's' };
187
188static const struct among a_6[9] =
189{
190{ 5, s_6_0, -1, 4, 0},
191{ 5, s_6_1, -1, 6, 0},
192{ 5, s_6_2, -1, 3, 0},
193{ 5, s_6_3, -1, 4, 0},
194{ 4, s_6_4, -1, 4, 0},
195{ 6, s_6_5, -1, 1, 0},
196{ 7, s_6_6, 5, 2, 0},
197{ 3, s_6_7, -1, 5, 0},
198{ 4, s_6_8, -1, 5, 0}
199};
200
201static const symbol s_7_0[2] = { 'i', 'c' };
202static const symbol s_7_1[4] = { 'a', 'n', 'c', 'e' };
203static const symbol s_7_2[4] = { 'e', 'n', 'c', 'e' };
204static const symbol s_7_3[4] = { 'a', 'b', 'l', 'e' };
205static const symbol s_7_4[4] = { 'i', 'b', 'l', 'e' };
206static const symbol s_7_5[3] = { 'a', 't', 'e' };
207static const symbol s_7_6[3] = { 'i', 'v', 'e' };
208static const symbol s_7_7[3] = { 'i', 'z', 'e' };
209static const symbol s_7_8[3] = { 'i', 't', 'i' };
210static const symbol s_7_9[2] = { 'a', 'l' };
211static const symbol s_7_10[3] = { 'i', 's', 'm' };
212static const symbol s_7_11[3] = { 'i', 'o', 'n' };
213static const symbol s_7_12[2] = { 'e', 'r' };
214static const symbol s_7_13[3] = { 'o', 'u', 's' };
215static const symbol s_7_14[3] = { 'a', 'n', 't' };
216static const symbol s_7_15[3] = { 'e', 'n', 't' };
217static const symbol s_7_16[4] = { 'm', 'e', 'n', 't' };
218static const symbol s_7_17[5] = { 'e', 'm', 'e', 'n', 't' };
219
220static const struct among a_7[18] =
221{
222{ 2, s_7_0, -1, 1, 0},
223{ 4, s_7_1, -1, 1, 0},
224{ 4, s_7_2, -1, 1, 0},
225{ 4, s_7_3, -1, 1, 0},
226{ 4, s_7_4, -1, 1, 0},
227{ 3, s_7_5, -1, 1, 0},
228{ 3, s_7_6, -1, 1, 0},
229{ 3, s_7_7, -1, 1, 0},
230{ 3, s_7_8, -1, 1, 0},
231{ 2, s_7_9, -1, 1, 0},
232{ 3, s_7_10, -1, 1, 0},
233{ 3, s_7_11, -1, 2, 0},
234{ 2, s_7_12, -1, 1, 0},
235{ 3, s_7_13, -1, 1, 0},
236{ 3, s_7_14, -1, 1, 0},
237{ 3, s_7_15, -1, 1, 0},
238{ 4, s_7_16, 15, 1, 0},
239{ 5, s_7_17, 16, 1, 0}
240};
241
242static const symbol s_8_0[1] = { 'e' };
243static const symbol s_8_1[1] = { 'l' };
244
245static const struct among a_8[2] =
246{
247{ 1, s_8_0, -1, 1, 0},
248{ 1, s_8_1, -1, 2, 0}
249};
250
251static const symbol s_9_0[7] = { 's', 'u', 'c', 'c', 'e', 'e', 'd' };
252static const symbol s_9_1[7] = { 'p', 'r', 'o', 'c', 'e', 'e', 'd' };
253static const symbol s_9_2[6] = { 'e', 'x', 'c', 'e', 'e', 'd' };
254static const symbol s_9_3[7] = { 'c', 'a', 'n', 'n', 'i', 'n', 'g' };
255static const symbol s_9_4[6] = { 'i', 'n', 'n', 'i', 'n', 'g' };
256static const symbol s_9_5[7] = { 'e', 'a', 'r', 'r', 'i', 'n', 'g' };
257static const symbol s_9_6[7] = { 'h', 'e', 'r', 'r', 'i', 'n', 'g' };
258static const symbol s_9_7[6] = { 'o', 'u', 't', 'i', 'n', 'g' };
259
260static const struct among a_9[8] =
261{
262{ 7, s_9_0, -1, -1, 0},
263{ 7, s_9_1, -1, -1, 0},
264{ 6, s_9_2, -1, -1, 0},
265{ 7, s_9_3, -1, -1, 0},
266{ 6, s_9_4, -1, -1, 0},
267{ 7, s_9_5, -1, -1, 0},
268{ 7, s_9_6, -1, -1, 0},
269{ 6, s_9_7, -1, -1, 0}
270};
271
272static const symbol s_10_0[5] = { 'a', 'n', 'd', 'e', 's' };
273static const symbol s_10_1[5] = { 'a', 't', 'l', 'a', 's' };
274static const symbol s_10_2[4] = { 'b', 'i', 'a', 's' };
275static const symbol s_10_3[6] = { 'c', 'o', 's', 'm', 'o', 's' };
276static const symbol s_10_4[5] = { 'd', 'y', 'i', 'n', 'g' };
277static const symbol s_10_5[5] = { 'e', 'a', 'r', 'l', 'y' };
278static const symbol s_10_6[6] = { 'g', 'e', 'n', 't', 'l', 'y' };
279static const symbol s_10_7[4] = { 'h', 'o', 'w', 'e' };
280static const symbol s_10_8[4] = { 'i', 'd', 'l', 'y' };
281static const symbol s_10_9[5] = { 'l', 'y', 'i', 'n', 'g' };
282static const symbol s_10_10[4] = { 'n', 'e', 'w', 's' };
283static const symbol s_10_11[4] = { 'o', 'n', 'l', 'y' };
284static const symbol s_10_12[6] = { 's', 'i', 'n', 'g', 'l', 'y' };
285static const symbol s_10_13[5] = { 's', 'k', 'i', 'e', 's' };
286static const symbol s_10_14[4] = { 's', 'k', 'i', 's' };
287static const symbol s_10_15[3] = { 's', 'k', 'y' };
288static const symbol s_10_16[5] = { 't', 'y', 'i', 'n', 'g' };
289static const symbol s_10_17[4] = { 'u', 'g', 'l', 'y' };
290
291static const struct among a_10[18] =
292{
293{ 5, s_10_0, -1, -1, 0},
294{ 5, s_10_1, -1, -1, 0},
295{ 4, s_10_2, -1, -1, 0},
296{ 6, s_10_3, -1, -1, 0},
297{ 5, s_10_4, -1, 3, 0},
298{ 5, s_10_5, -1, 9, 0},
299{ 6, s_10_6, -1, 7, 0},
300{ 4, s_10_7, -1, -1, 0},
301{ 4, s_10_8, -1, 6, 0},
302{ 5, s_10_9, -1, 4, 0},
303{ 4, s_10_10, -1, -1, 0},
304{ 4, s_10_11, -1, 10, 0},
305{ 6, s_10_12, -1, 11, 0},
306{ 5, s_10_13, -1, 2, 0},
307{ 4, s_10_14, -1, 1, 0},
308{ 3, s_10_15, -1, -1, 0},
309{ 5, s_10_16, -1, 5, 0},
310{ 4, s_10_17, -1, 8, 0}
311};
312
313static const unsigned char g_aeo[] = { 17, 64 };
314
315static const unsigned char g_v[] = { 17, 65, 16, 1 };
316
317static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
318
319static const unsigned char g_valid_LI[] = { 55, 141, 2 };
320
321static const symbol s_0[] = { 'Y' };
322static const symbol s_1[] = { 'Y' };
323static const symbol s_2[] = { 's', 's' };
324static const symbol s_3[] = { 'i' };
325static const symbol s_4[] = { 'i', 'e' };
326static const symbol s_5[] = { 'e', 'e' };
327static const symbol s_6[] = { 'e' };
328static const symbol s_7[] = { 'e' };
329static const symbol s_8[] = { 'i' };
330static const symbol s_9[] = { 't', 'i', 'o', 'n' };
331static const symbol s_10[] = { 'e', 'n', 'c', 'e' };
332static const symbol s_11[] = { 'a', 'n', 'c', 'e' };
333static const symbol s_12[] = { 'a', 'b', 'l', 'e' };
334static const symbol s_13[] = { 'e', 'n', 't' };
335static const symbol s_14[] = { 'i', 'z', 'e' };
336static const symbol s_15[] = { 'a', 't', 'e' };
337static const symbol s_16[] = { 'a', 'l' };
338static const symbol s_17[] = { 'f', 'u', 'l' };
339static const symbol s_18[] = { 'o', 'u', 's' };
340static const symbol s_19[] = { 'i', 'v', 'e' };
341static const symbol s_20[] = { 'b', 'l', 'e' };
342static const symbol s_21[] = { 'o', 'g' };
343static const symbol s_22[] = { 'l', 'e', 's', 's' };
344static const symbol s_23[] = { 't', 'i', 'o', 'n' };
345static const symbol s_24[] = { 'a', 't', 'e' };
346static const symbol s_25[] = { 'a', 'l' };
347static const symbol s_26[] = { 'i', 'c' };
348static const symbol s_27[] = { 's', 'k', 'i' };
349static const symbol s_28[] = { 's', 'k', 'y' };
350static const symbol s_29[] = { 'd', 'i', 'e' };
351static const symbol s_30[] = { 'l', 'i', 'e' };
352static const symbol s_31[] = { 't', 'i', 'e' };
353static const symbol s_32[] = { 'i', 'd', 'l' };
354static const symbol s_33[] = { 'g', 'e', 'n', 't', 'l' };
355static const symbol s_34[] = { 'u', 'g', 'l', 'i' };
356static const symbol s_35[] = { 'e', 'a', 'r', 'l', 'i' };
357static const symbol s_36[] = { 'o', 'n', 'l', 'i' };
358static const symbol s_37[] = { 's', 'i', 'n', 'g', 'l' };
359static const symbol s_38[] = { 'y' };
360
361static int r_prelude(struct SN_env * z) {
362 z->I[2] = 0;
363 { int c1 = z->c;
364 z->bra = z->c;
365 if (z->c == z->l || z->p[z->c] != '\'') goto lab0;
366 z->c++;
367 z->ket = z->c;
368 { int ret = slice_del(z);
369 if (ret < 0) return ret;
370 }
371 lab0:
372 z->c = c1;
373 }
374 { int c2 = z->c;
375 z->bra = z->c;
376 if (z->c == z->l || z->p[z->c] != 'y') goto lab1;
377 z->c++;
378 z->ket = z->c;
379 { int ret = slice_from_s(z, 1, s_0);
380 if (ret < 0) return ret;
381 }
382 z->I[2] = 1;
383 lab1:
384 z->c = c2;
385 }
386 { int c3 = z->c;
387 while(1) {
388 int c4 = z->c;
389 while(1) {
390 int c5 = z->c;
391 if (in_grouping_U(z, g_v, 97, 121, 0)) goto lab4;
392 z->bra = z->c;
393 if (z->c == z->l || z->p[z->c] != 'y') goto lab4;
394 z->c++;
395 z->ket = z->c;
396 z->c = c5;
397 break;
398 lab4:
399 z->c = c5;
400 { int ret = skip_utf8(z->p, z->c, z->l, 1);
401 if (ret < 0) goto lab3;
402 z->c = ret;
403 }
404 }
405 { int ret = slice_from_s(z, 1, s_1);
406 if (ret < 0) return ret;
407 }
408 z->I[2] = 1;
409 continue;
410 lab3:
411 z->c = c4;
412 break;
413 }
414 z->c = c3;
415 }
416 return 1;
417}
418
419static int r_mark_regions(struct SN_env * z) {
420 z->I[1] = z->l;
421 z->I[0] = z->l;
422 { int c1 = z->c;
423 { int c2 = z->c;
424 if (z->c + 4 >= z->l || z->p[z->c + 4] >> 5 != 3 || !((2375680 >> (z->p[z->c + 4] & 0x1f)) & 1)) goto lab2;
425 if (!find_among(z, a_0, 3)) goto lab2;
426 goto lab1;
427 lab2:
428 z->c = c2;
429
430 {
431 int ret = out_grouping_U(z, g_v, 97, 121, 1);
432 if (ret < 0) goto lab0;
433 z->c += ret;
434 }
435
436 {
437 int ret = in_grouping_U(z, g_v, 97, 121, 1);
438 if (ret < 0) goto lab0;
439 z->c += ret;
440 }
441 }
442 lab1:
443 z->I[1] = z->c;
444
445 {
446 int ret = out_grouping_U(z, g_v, 97, 121, 1);
447 if (ret < 0) goto lab0;
448 z->c += ret;
449 }
450
451 {
452 int ret = in_grouping_U(z, g_v, 97, 121, 1);
453 if (ret < 0) goto lab0;
454 z->c += ret;
455 }
456 z->I[0] = z->c;
457 lab0:
458 z->c = c1;
459 }
460 return 1;
461}
462
463static int r_shortv(struct SN_env * z) {
464 { int m1 = z->l - z->c; (void)m1;
465 if (out_grouping_b_U(z, g_v_WXY, 89, 121, 0)) goto lab1;
466 if (in_grouping_b_U(z, g_v, 97, 121, 0)) goto lab1;
467 if (out_grouping_b_U(z, g_v, 97, 121, 0)) goto lab1;
468 goto lab0;
469 lab1:
470 z->c = z->l - m1;
471 if (out_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
472 if (in_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
473 if (z->c > z->lb) return 0;
474 }
475lab0:
476 return 1;
477}
478
479static int r_R1(struct SN_env * z) {
480 return z->I[1] <= z->c;
481}
482
483static int r_R2(struct SN_env * z) {
484 return z->I[0] <= z->c;
485}
486
487static int r_Step_1a(struct SN_env * z) {
488 int among_var;
489 { int m1 = z->l - z->c; (void)m1;
490 z->ket = z->c;
491 if (z->c <= z->lb || (z->p[z->c - 1] != 39 && z->p[z->c - 1] != 115)) { z->c = z->l - m1; goto lab0; }
492 if (!find_among_b(z, a_1, 3)) { z->c = z->l - m1; goto lab0; }
493 z->bra = z->c;
494 { int ret = slice_del(z);
495 if (ret < 0) return ret;
496 }
497 lab0:
498 ;
499 }
500 z->ket = z->c;
501 if (z->c <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 115)) return 0;
502 among_var = find_among_b(z, a_2, 6);
503 if (!among_var) return 0;
504 z->bra = z->c;
505 switch (among_var) {
506 case 1:
507 { int ret = slice_from_s(z, 2, s_2);
508 if (ret < 0) return ret;
509 }
510 break;
511 case 2:
512 { int m2 = z->l - z->c; (void)m2;
513 { int ret = skip_b_utf8(z->p, z->c, z->lb, 2);
514 if (ret < 0) goto lab2;
515 z->c = ret;
516 }
517 { int ret = slice_from_s(z, 1, s_3);
518 if (ret < 0) return ret;
519 }
520 goto lab1;
521 lab2:
522 z->c = z->l - m2;
523 { int ret = slice_from_s(z, 2, s_4);
524 if (ret < 0) return ret;
525 }
526 }
527 lab1:
528 break;
529 case 3:
530 { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
531 if (ret < 0) return 0;
532 z->c = ret;
533 }
534
535 {
536 int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
537 if (ret < 0) return 0;
538 z->c -= ret;
539 }
540 { int ret = slice_del(z);
541 if (ret < 0) return ret;
542 }
543 break;
544 }
545 return 1;
546}
547
548static int r_Step_1b(struct SN_env * z) {
549 int among_var;
550 z->ket = z->c;
551 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((33554576 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
552 among_var = find_among_b(z, a_4, 6);
553 if (!among_var) return 0;
554 z->bra = z->c;
555 switch (among_var) {
556 case 1:
557 { int ret = r_R1(z);
558 if (ret <= 0) return ret;
559 }
560 { int ret = slice_from_s(z, 2, s_5);
561 if (ret < 0) return ret;
562 }
563 break;
564 case 2:
565 { int m_test1 = z->l - z->c;
566
567 {
568 int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
569 if (ret < 0) return 0;
570 z->c -= ret;
571 }
572 z->c = z->l - m_test1;
573 }
574 { int ret = slice_del(z);
575 if (ret < 0) return ret;
576 }
577 z->ket = z->c;
578 z->bra = z->c;
579 { int m_test2 = z->l - z->c;
580 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
581 among_var = find_among_b(z, a_3, 13);
582 switch (among_var) {
583 case 1:
584 { int ret = slice_from_s(z, 1, s_6);
585 if (ret < 0) return ret;
586 }
587 return 0;
588 break;
589 case 2:
590 { int m3 = z->l - z->c; (void)m3;
591 if (in_grouping_b_U(z, g_aeo, 97, 111, 0)) goto lab0;
592 if (z->c > z->lb) goto lab0;
593 return 0;
594 lab0:
595 z->c = z->l - m3;
596 }
597 break;
598 case 3:
599 if (z->c != z->I[1]) return 0;
600 { int m_test4 = z->l - z->c;
601 { int ret = r_shortv(z);
602 if (ret <= 0) return ret;
603 }
604 z->c = z->l - m_test4;
605 }
606 { int ret = slice_from_s(z, 1, s_7);
607 if (ret < 0) return ret;
608 }
609 return 0;
610 break;
611 }
612 z->c = z->l - m_test2;
613 }
614 z->ket = z->c;
615 { int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
616 if (ret < 0) return 0;
617 z->c = ret;
618 }
619 z->bra = z->c;
620 { int ret = slice_del(z);
621 if (ret < 0) return ret;
622 }
623 break;
624 }
625 return 1;
626}
627
628static int r_Step_1c(struct SN_env * z) {
629 z->ket = z->c;
630 { int m1 = z->l - z->c; (void)m1;
631 if (z->c <= z->lb || z->p[z->c - 1] != 'y') goto lab1;
632 z->c--;
633 goto lab0;
634 lab1:
635 z->c = z->l - m1;
636 if (z->c <= z->lb || z->p[z->c - 1] != 'Y') return 0;
637 z->c--;
638 }
639lab0:
640 z->bra = z->c;
641 if (out_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
642
643 if (z->c > z->lb) goto lab2;
644 return 0;
645lab2:
646 { int ret = slice_from_s(z, 1, s_8);
647 if (ret < 0) return ret;
648 }
649 return 1;
650}
651
652static int r_Step_2(struct SN_env * z) {
653 int among_var;
654 z->ket = z->c;
655 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
656 among_var = find_among_b(z, a_5, 24);
657 if (!among_var) return 0;
658 z->bra = z->c;
659 { int ret = r_R1(z);
660 if (ret <= 0) return ret;
661 }
662 switch (among_var) {
663 case 1:
664 { int ret = slice_from_s(z, 4, s_9);
665 if (ret < 0) return ret;
666 }
667 break;
668 case 2:
669 { int ret = slice_from_s(z, 4, s_10);
670 if (ret < 0) return ret;
671 }
672 break;
673 case 3:
674 { int ret = slice_from_s(z, 4, s_11);
675 if (ret < 0) return ret;
676 }
677 break;
678 case 4:
679 { int ret = slice_from_s(z, 4, s_12);
680 if (ret < 0) return ret;
681 }
682 break;
683 case 5:
684 { int ret = slice_from_s(z, 3, s_13);
685 if (ret < 0) return ret;
686 }
687 break;
688 case 6:
689 { int ret = slice_from_s(z, 3, s_14);
690 if (ret < 0) return ret;
691 }
692 break;
693 case 7:
694 { int ret = slice_from_s(z, 3, s_15);
695 if (ret < 0) return ret;
696 }
697 break;
698 case 8:
699 { int ret = slice_from_s(z, 2, s_16);
700 if (ret < 0) return ret;
701 }
702 break;
703 case 9:
704 { int ret = slice_from_s(z, 3, s_17);
705 if (ret < 0) return ret;
706 }
707 break;
708 case 10:
709 { int ret = slice_from_s(z, 3, s_18);
710 if (ret < 0) return ret;
711 }
712 break;
713 case 11:
714 { int ret = slice_from_s(z, 3, s_19);
715 if (ret < 0) return ret;
716 }
717 break;
718 case 12:
719 { int ret = slice_from_s(z, 3, s_20);
720 if (ret < 0) return ret;
721 }
722 break;
723 case 13:
724 if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0;
725 z->c--;
726 { int ret = slice_from_s(z, 2, s_21);
727 if (ret < 0) return ret;
728 }
729 break;
730 case 14:
731 { int ret = slice_from_s(z, 4, s_22);
732 if (ret < 0) return ret;
733 }
734 break;
735 case 15:
736 if (in_grouping_b_U(z, g_valid_LI, 99, 116, 0)) return 0;
737 { int ret = slice_del(z);
738 if (ret < 0) return ret;
739 }
740 break;
741 }
742 return 1;
743}
744
745static int r_Step_3(struct SN_env * z) {
746 int among_var;
747 z->ket = z->c;
748 if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
749 among_var = find_among_b(z, a_6, 9);
750 if (!among_var) return 0;
751 z->bra = z->c;
752 { int ret = r_R1(z);
753 if (ret <= 0) return ret;
754 }
755 switch (among_var) {
756 case 1:
757 { int ret = slice_from_s(z, 4, s_23);
758 if (ret < 0) return ret;
759 }
760 break;
761 case 2:
762 { int ret = slice_from_s(z, 3, s_24);
763 if (ret < 0) return ret;
764 }
765 break;
766 case 3:
767 { int ret = slice_from_s(z, 2, s_25);
768 if (ret < 0) return ret;
769 }
770 break;
771 case 4:
772 { int ret = slice_from_s(z, 2, s_26);
773 if (ret < 0) return ret;
774 }
775 break;
776 case 5:
777 { int ret = slice_del(z);
778 if (ret < 0) return ret;
779 }
780 break;
781 case 6:
782 { int ret = r_R2(z);
783 if (ret <= 0) return ret;
784 }
785 { int ret = slice_del(z);
786 if (ret < 0) return ret;
787 }
788 break;
789 }
790 return 1;
791}
792
793static int r_Step_4(struct SN_env * z) {
794 int among_var;
795 z->ket = z->c;
796 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1864232 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
797 among_var = find_among_b(z, a_7, 18);
798 if (!among_var) return 0;
799 z->bra = z->c;
800 { int ret = r_R2(z);
801 if (ret <= 0) return ret;
802 }
803 switch (among_var) {
804 case 1:
805 { int ret = slice_del(z);
806 if (ret < 0) return ret;
807 }
808 break;
809 case 2:
810 { int m1 = z->l - z->c; (void)m1;
811 if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab1;
812 z->c--;
813 goto lab0;
814 lab1:
815 z->c = z->l - m1;
816 if (z->c <= z->lb || z->p[z->c - 1] != 't') return 0;
817 z->c--;
818 }
819 lab0:
820 { int ret = slice_del(z);
821 if (ret < 0) return ret;
822 }
823 break;
824 }
825 return 1;
826}
827
828static int r_Step_5(struct SN_env * z) {
829 int among_var;
830 z->ket = z->c;
831 if (z->c <= z->lb || (z->p[z->c - 1] != 101 && z->p[z->c - 1] != 108)) return 0;
832 among_var = find_among_b(z, a_8, 2);
833 if (!among_var) return 0;
834 z->bra = z->c;
835 switch (among_var) {
836 case 1:
837
838 { int ret = r_R2(z);
839 if (ret == 0) goto lab1;
840 if (ret < 0) return ret;
841 }
842 goto lab0;
843 lab1:
844 { int ret = r_R1(z);
845 if (ret <= 0) return ret;
846 }
847 { int m1 = z->l - z->c; (void)m1;
848 { int ret = r_shortv(z);
849 if (ret == 0) goto lab2;
850 if (ret < 0) return ret;
851 }
852 return 0;
853 lab2:
854 z->c = z->l - m1;
855 }
856 lab0:
857 { int ret = slice_del(z);
858 if (ret < 0) return ret;
859 }
860 break;
861 case 2:
862 { int ret = r_R2(z);
863 if (ret <= 0) return ret;
864 }
865 if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0;
866 z->c--;
867 { int ret = slice_del(z);
868 if (ret < 0) return ret;
869 }
870 break;
871 }
872 return 1;
873}
874
875static int r_exception2(struct SN_env * z) {
876 z->ket = z->c;
877 if (z->c - 5 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0;
878 if (!find_among_b(z, a_9, 8)) return 0;
879 z->bra = z->c;
880 if (z->c > z->lb) return 0;
881 return 1;
882}
883
884static int r_exception1(struct SN_env * z) {
885 int among_var;
886 z->bra = z->c;
887 if (z->c + 2 >= z->l || z->p[z->c + 2] >> 5 != 3 || !((42750482 >> (z->p[z->c + 2] & 0x1f)) & 1)) return 0;
888 among_var = find_among(z, a_10, 18);
889 if (!among_var) return 0;
890 z->ket = z->c;
891 if (z->c < z->l) return 0;
892 switch (among_var) {
893 case 1:
894 { int ret = slice_from_s(z, 3, s_27);
895 if (ret < 0) return ret;
896 }
897 break;
898 case 2:
899 { int ret = slice_from_s(z, 3, s_28);
900 if (ret < 0) return ret;
901 }
902 break;
903 case 3:
904 { int ret = slice_from_s(z, 3, s_29);
905 if (ret < 0) return ret;
906 }
907 break;
908 case 4:
909 { int ret = slice_from_s(z, 3, s_30);
910 if (ret < 0) return ret;
911 }
912 break;
913 case 5:
914 { int ret = slice_from_s(z, 3, s_31);
915 if (ret < 0) return ret;
916 }
917 break;
918 case 6:
919 { int ret = slice_from_s(z, 3, s_32);
920 if (ret < 0) return ret;
921 }
922 break;
923 case 7:
924 { int ret = slice_from_s(z, 5, s_33);
925 if (ret < 0) return ret;
926 }
927 break;
928 case 8:
929 { int ret = slice_from_s(z, 4, s_34);
930 if (ret < 0) return ret;
931 }
932 break;
933 case 9:
934 { int ret = slice_from_s(z, 5, s_35);
935 if (ret < 0) return ret;
936 }
937 break;
938 case 10:
939 { int ret = slice_from_s(z, 4, s_36);
940 if (ret < 0) return ret;
941 }
942 break;
943 case 11:
944 { int ret = slice_from_s(z, 5, s_37);
945 if (ret < 0) return ret;
946 }
947 break;
948 }
949 return 1;
950}
951
952static int r_postlude(struct SN_env * z) {
953 if (!(z->I[2])) return 0;
954 while(1) {
955 int c1 = z->c;
956 while(1) {
957 int c2 = z->c;
958 z->bra = z->c;
959 if (z->c == z->l || z->p[z->c] != 'Y') goto lab1;
960 z->c++;
961 z->ket = z->c;
962 z->c = c2;
963 break;
964 lab1:
965 z->c = c2;
966 { int ret = skip_utf8(z->p, z->c, z->l, 1);
967 if (ret < 0) goto lab0;
968 z->c = ret;
969 }
970 }
971 { int ret = slice_from_s(z, 1, s_38);
972 if (ret < 0) return ret;
973 }
974 continue;
975 lab0:
976 z->c = c1;
977 break;
978 }
979 return 1;
980}
981
982extern int english_UTF_8_stem(struct SN_env * z) {
983 { int c1 = z->c;
984 { int ret = r_exception1(z);
985 if (ret == 0) goto lab1;
986 if (ret < 0) return ret;
987 }
988 goto lab0;
989 lab1:
990 z->c = c1;
991 { int c2 = z->c;
992 { int ret = skip_utf8(z->p, z->c, z->l, 3);
993 if (ret < 0) goto lab3;
994 z->c = ret;
995 }
996 goto lab2;
997 lab3:
998 z->c = c2;
999 }
1000 goto lab0;
1001 lab2:
1002 z->c = c1;
1003
1004 { int ret = r_prelude(z);
1005 if (ret < 0) return ret;
1006 }
1007
1008 { int ret = r_mark_regions(z);
1009 if (ret < 0) return ret;
1010 }
1011 z->lb = z->c; z->c = z->l;
1012
1013 { int m3 = z->l - z->c; (void)m3;
1014 { int ret = r_Step_1a(z);
1015 if (ret < 0) return ret;
1016 }
1017 z->c = z->l - m3;
1018 }
1019 { int m4 = z->l - z->c; (void)m4;
1020 { int ret = r_exception2(z);
1021 if (ret == 0) goto lab5;
1022 if (ret < 0) return ret;
1023 }
1024 goto lab4;
1025 lab5:
1026 z->c = z->l - m4;
1027 { int m5 = z->l - z->c; (void)m5;
1028 { int ret = r_Step_1b(z);
1029 if (ret < 0) return ret;
1030 }
1031 z->c = z->l - m5;
1032 }
1033 { int m6 = z->l - z->c; (void)m6;
1034 { int ret = r_Step_1c(z);
1035 if (ret < 0) return ret;
1036 }
1037 z->c = z->l - m6;
1038 }
1039 { int m7 = z->l - z->c; (void)m7;
1040 { int ret = r_Step_2(z);
1041 if (ret < 0) return ret;
1042 }
1043 z->c = z->l - m7;
1044 }
1045 { int m8 = z->l - z->c; (void)m8;
1046 { int ret = r_Step_3(z);
1047 if (ret < 0) return ret;
1048 }
1049 z->c = z->l - m8;
1050 }
1051 { int m9 = z->l - z->c; (void)m9;
1052 { int ret = r_Step_4(z);
1053 if (ret < 0) return ret;
1054 }
1055 z->c = z->l - m9;
1056 }
1057 { int m10 = z->l - z->c; (void)m10;
1058 { int ret = r_Step_5(z);
1059 if (ret < 0) return ret;
1060 }
1061 z->c = z->l - m10;
1062 }
1063 }
1064 lab4:
1065 z->c = z->lb;
1066 { int c11 = z->c;
1067 { int ret = r_postlude(z);
1068 if (ret < 0) return ret;
1069 }
1070 z->c = c11;
1071 }
1072 }
1073lab0:
1074 return 1;
1075}
1076
1077extern struct SN_env * english_UTF_8_create_env(void) { return SN_create_env(0, 3); }
1078
1079extern void english_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
1080
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_25[]
static const symbol s_2[]
static const symbol s_10_1[5]
static const symbol s_0_0[5]
static const struct among a_10[18]
static const symbol s_2_5[2]
static const symbol s_10_4[5]
static const symbol s_4[]
static const symbol s_5_23[7]
static const symbol s_8_1[1]
static const symbol s_4_1[3]
static const symbol s_5_6[4]
static const symbol s_9_3[7]
static const symbol s_7_7[3]
static const symbol s_30[]
static const symbol s_38[]
static const symbol s_9_0[7]
static int r_Step_3(struct SN_env *z)
static const symbol s_1_2[2]
static const symbol s_5_16[5]
static const symbol s_5_3[2]
static int r_Step_5(struct SN_env *z)
static const symbol s_3_4[2]
static const symbol s_4_3[4]
static const symbol s_3_1[2]
static const symbol s_5_0[4]
static const struct among a_7[18]
static const symbol s_10_5[5]
static const symbol s_4_5[5]
static const symbol s_7_14[3]
static const symbol s_29[]
static const symbol s_5_21[7]
static const symbol s_9_2[6]
static const struct among a_2[6]
static const symbol s_6_6[7]
static const symbol s_3_6[2]
static const symbol s_7_8[3]
static int r_exception1(struct SN_env *z)
static const symbol s_10_12[6]
static const symbol s_7_9[2]
static const symbol s_27[]
static const struct among a_4[6]
static const struct among a_0[3]
static const symbol s_7_11[3]
static const symbol s_5_10[5]
struct SN_env * english_UTF_8_create_env(void)
static const symbol s_6[]
static const symbol s_10_17[4]
static const symbol s_7_1[4]
static const struct among a_6[9]
static const symbol s_10_16[5]
static const symbol s_21[]
static const symbol s_3[]
static const symbol s_5_12[6]
static const symbol s_10_6[6]
static const symbol s_5_11[5]
static const symbol s_37[]
static const symbol s_7_12[2]
static const symbol s_5_17[5]
static const symbol s_7_0[2]
static int r_R2(struct SN_env *z)
static const symbol s_7[]
static const symbol s_32[]
static const symbol s_5_22[7]
static const symbol s_13[]
static const symbol s_6_5[6]
static const symbol s_7_13[3]
static const symbol s_5_13[5]
static const symbol s_5_9[5]
static const symbol s_7_5[3]
static const symbol s_6_2[5]
static const symbol s_20[]
static const symbol s_6_4[4]
static const symbol s_10_10[4]
static const symbol s_35[]
static const symbol s_7_3[4]
static const symbol s_6_8[4]
static const symbol s_19[]
static const symbol s_23[]
static const symbol s_3_7[2]
static const unsigned char g_valid_LI[]
static const symbol s_24[]
static const symbol s_9_5[7]
static int r_Step_1c(struct SN_env *z)
static const symbol s_6_1[5]
static const symbol s_6_3[5]
static const unsigned char g_v_WXY[]
static const symbol s_2_0[3]
static const symbol s_3_3[2]
static const symbol s_5_15[7]
static const symbol s_6_7[3]
static const symbol s_5_4[3]
static int r_R1(struct SN_env *z)
static const symbol s_7_2[4]
static const symbol s_5_7[5]
static const symbol s_16[]
static int r_postlude(struct SN_env *z)
static const symbol s_14[]
static const symbol s_3_9[2]
static const symbol s_5_19[4]
static const symbol s_22[]
static const symbol s_9_4[6]
static const symbol s_7_10[3]
static const symbol s_7_16[4]
static const symbol s_7_15[3]
static const symbol s_7_4[4]
static const symbol s_9_7[6]
static int r_prelude(struct SN_env *z)
static const symbol s_10_8[4]
static const symbol s_6_0[5]
void english_UTF_8_close_env(struct SN_env *z)
static const symbol s_10[]
int english_UTF_8_stem(struct SN_env *z)
static const symbol s_3_5[2]
static const struct among a_5[24]
static const symbol s_5_8[6]
static const struct among a_1[3]
static const symbol s_2_4[2]
static const unsigned char g_aeo[]
static const struct among a_9[8]
static const symbol s_1[]
static const symbol s_10_9[5]
static int r_exception2(struct SN_env *z)
static const symbol s_5_5[4]
static int r_Step_1a(struct SN_env *z)
static int r_shortv(struct SN_env *z)
static const symbol s_10_0[5]
static const symbol s_10_7[4]
static const symbol s_9_6[7]
static const symbol s_10_11[4]
static const symbol s_31[]
static const symbol s_4_0[2]
static const symbol s_1_0[1]
static const symbol s_2_2[3]
static int r_mark_regions(struct SN_env *z)
static const symbol s_10_13[5]
static const symbol s_11[]
static const symbol s_12[]
static const symbol s_36[]
static const symbol s_2_1[1]
static const symbol s_2_3[4]
static const symbol s_10_3[6]
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 symbol s_10_14[4]
static const symbol s_3_8[2]
static const symbol s_10_2[4]
static const symbol s_7_17[5]
static const symbol s_1_1[3]
static const symbol s_18[]
static const symbol s_0_1[6]
static const symbol s_17[]
static const symbol s_5_2[3]
static int r_Step_1b(struct SN_env *z)
static const struct among a_3[13]
static const symbol s_7_6[3]
static const symbol s_28[]
static const symbol s_5_14[6]
static const symbol s_4_4[5]
static const unsigned char g_v[]
static const symbol s_10_15[3]
static const symbol s_3_11[2]
static const symbol s_8[]
static const symbol s_9[]
static const symbol s_9_1[7]
static const symbol s_3_10[2]
static const symbol s_3_2[2]
static const symbol s_0_2[5]
static const symbol s_5[]
static const symbol s_8_0[1]
static const symbol s_15[]
static const symbol s_5_20[4]
static const symbol s_5_18[7]
static const symbol s_3_12[2]
static const symbol s_4_2[3]
static const symbol s_26[]
static const symbol s_5_1[4]
static const symbol s_0[]
static const struct among a_8[2]
static const symbol s_34[]
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
Definition: header.h:16
int find_among_b(struct SN_env *z, const struct among *v, int v_size)
Definition: utilities.c:298
int out_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:141
int slice_del(struct SN_env *z)
Definition: utilities.c:431
int in_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:117
int in_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:129
int skip_b_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:52
int out_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:153
int find_among(struct SN_env *z, const struct among *v, int v_size)
Definition: utilities.c:233
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:27
int slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:422