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