xapian-core  2.0.0
esperanto.cc
Go to the documentation of this file.
1 /* Generated from esperanto.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
2 
3 #include <config.h>
4 
5 #define SNOWBALL_RUNTIME_THROW_EXCEPTIONS
6 #include "esperanto.h"
7 
8 #include <stddef.h>
9 
11 
12 static int r_uninflected(struct SN_env * z);
13 static int r_ujn_suffix(struct SN_env * z);
14 static int r_standard_suffix(struct SN_env * z);
15 static int r_pronoun(struct SN_env * z);
16 static int r_merged_numeral(struct SN_env * z);
17 static int r_long_word(struct SN_env * z);
18 static int r_initial_apostrophe(struct SN_env * z);
19 static int r_final_apostrophe(struct SN_env * z);
20 static int r_correlative(struct SN_env * z);
21 static int r_canonical_form(struct SN_env * z);
22 
23 static const symbol s_0[] = { 0xC4, 0x89 };
24 static const symbol s_1[] = { 0xC4, 0x9D };
25 static const symbol s_2[] = { 0xC4, 0xA5 };
26 static const symbol s_3[] = { 0xC4, 0xB5 };
27 static const symbol s_4[] = { 0xC5, 0x9D };
28 static const symbol s_5[] = { 0xC5, 0xAD };
29 static const symbol s_6[] = { 'a' };
30 static const symbol s_7[] = { 'e' };
31 static const symbol s_8[] = { 'i' };
32 static const symbol s_9[] = { 'o' };
33 static const symbol s_10[] = { 'u' };
34 static const symbol s_11[] = { 's', 't' };
35 static const symbol s_12[] = { 'e' };
36 static const symbol s_13[] = { 'a' };
37 static const symbol s_14[] = { 'u', 'n' };
38 static const symbol s_15[] = { 'u' };
39 static const symbol s_16[] = { 'a', 0xC5, 0xAD };
40 static const symbol s_17[] = { 'o' };
41 
42 static const symbol s_0_1[1] = { '-' };
43 static const symbol s_0_2[2] = { 'c', 'x' };
44 static const symbol s_0_3[2] = { 'g', 'x' };
45 static const symbol s_0_4[2] = { 'h', 'x' };
46 static const symbol s_0_5[2] = { 'j', 'x' };
47 static const symbol s_0_6[1] = { 'q' };
48 static const symbol s_0_7[2] = { 's', 'x' };
49 static const symbol s_0_8[2] = { 'u', 'x' };
50 static const symbol s_0_9[1] = { 'w' };
51 static const symbol s_0_10[1] = { 'x' };
52 static const symbol s_0_11[1] = { 'y' };
53 static const symbol s_0_12[2] = { 0xC3, 0xA1 };
54 static const symbol s_0_13[2] = { 0xC3, 0xA9 };
55 static const symbol s_0_14[2] = { 0xC3, 0xAD };
56 static const symbol s_0_15[2] = { 0xC3, 0xB3 };
57 static const symbol s_0_16[2] = { 0xC3, 0xBA };
58 static const struct among a_0[17] = {
59 { 0, 0, 0, 14, 0},
60 { 1, s_0_1, -1, 13, 0},
61 { 2, s_0_2, -2, 1, 0},
62 { 2, s_0_3, -3, 2, 0},
63 { 2, s_0_4, -4, 3, 0},
64 { 2, s_0_5, -5, 4, 0},
65 { 1, s_0_6, -6, 12, 0},
66 { 2, s_0_7, -7, 5, 0},
67 { 2, s_0_8, -8, 6, 0},
68 { 1, s_0_9, -9, 12, 0},
69 { 1, s_0_10, -10, 12, 0},
70 { 1, s_0_11, -11, 12, 0},
71 { 2, s_0_12, -12, 7, 0},
72 { 2, s_0_13, -13, 8, 0},
73 { 2, s_0_14, -14, 9, 0},
74 { 2, s_0_15, -15, 10, 0},
75 { 2, s_0_16, -16, 11, 0}
76 };
77 
78 static const symbol s_1_0[2] = { 'a', 's' };
79 static const symbol s_1_1[1] = { 'i' };
80 static const symbol s_1_2[2] = { 'i', 's' };
81 static const symbol s_1_3[2] = { 'o', 's' };
82 static const symbol s_1_4[1] = { 'u' };
83 static const symbol s_1_5[2] = { 'u', 's' };
84 static const struct among a_1[6] = {
85 { 2, s_1_0, 0, -1, 0},
86 { 1, s_1_1, 0, -1, 0},
87 { 2, s_1_2, -1, -1, 0},
88 { 2, s_1_3, 0, -1, 0},
89 { 1, s_1_4, 0, -1, 0},
90 { 2, s_1_5, -1, -1, 0}
91 };
92 
93 static const symbol s_2_0[2] = { 'c', 'i' };
94 static const symbol s_2_1[2] = { 'g', 'i' };
95 static const symbol s_2_2[2] = { 'h', 'i' };
96 static const symbol s_2_3[2] = { 'l', 'i' };
97 static const symbol s_2_4[3] = { 'i', 'l', 'i' };
98 static const symbol s_2_5[4] = { 0xC5, 0x9D, 'l', 'i' };
99 static const symbol s_2_6[2] = { 'm', 'i' };
100 static const symbol s_2_7[2] = { 'n', 'i' };
101 static const symbol s_2_8[3] = { 'o', 'n', 'i' };
102 static const symbol s_2_9[2] = { 'r', 'i' };
103 static const symbol s_2_10[2] = { 's', 'i' };
104 static const symbol s_2_11[2] = { 'v', 'i' };
105 static const symbol s_2_12[3] = { 'i', 'v', 'i' };
106 static const symbol s_2_13[3] = { 0xC4, 0x9D, 'i' };
107 static const symbol s_2_14[3] = { 0xC5, 0x9D, 'i' };
108 static const symbol s_2_15[4] = { 'i', 0xC5, 0x9D, 'i' };
109 static const symbol s_2_16[6] = { 'm', 'a', 'l', 0xC5, 0x9D, 'i' };
110 static const struct among a_2[17] = {
111 { 2, s_2_0, 0, -1, 0},
112 { 2, s_2_1, 0, -1, 0},
113 { 2, s_2_2, 0, -1, 0},
114 { 2, s_2_3, 0, -1, 0},
115 { 3, s_2_4, -1, -1, 0},
116 { 4, s_2_5, -2, -1, 0},
117 { 2, s_2_6, 0, -1, 0},
118 { 2, s_2_7, 0, -1, 0},
119 { 3, s_2_8, -1, -1, 0},
120 { 2, s_2_9, 0, -1, 0},
121 { 2, s_2_10, 0, -1, 0},
122 { 2, s_2_11, 0, -1, 0},
123 { 3, s_2_12, -1, -1, 0},
124 { 3, s_2_13, 0, -1, 0},
125 { 3, s_2_14, 0, -1, 0},
126 { 4, s_2_15, -1, -1, 0},
127 { 6, s_2_16, -2, -1, 0}
128 };
129 
130 static const symbol s_3_0[3] = { 'a', 'm', 'b' };
131 static const symbol s_3_1[4] = { 'b', 'a', 'l', 'd' };
132 static const symbol s_3_2[7] = { 'm', 'a', 'l', 'b', 'a', 'l', 'd' };
133 static const symbol s_3_3[4] = { 'm', 'o', 'r', 'g' };
134 static const symbol s_3_4[8] = { 'p', 'o', 's', 't', 'm', 'o', 'r', 'g' };
135 static const symbol s_3_5[3] = { 'a', 'd', 'i' };
136 static const symbol s_3_6[4] = { 'h', 'o', 'd', 'i' };
137 static const symbol s_3_7[3] = { 'a', 'n', 'k' };
138 static const symbol s_3_8[5] = { 0xC4, 0x89, 'i', 'r', 'k' };
139 static const symbol s_3_9[8] = { 't', 'u', 't', 0xC4, 0x89, 'i', 'r', 'k' };
140 static const symbol s_3_10[5] = { 'p', 'r', 'e', 's', 'k' };
141 static const symbol s_3_11[5] = { 'a', 'l', 'm', 'e', 'n' };
142 static const symbol s_3_12[4] = { 'a', 'p', 'e', 'n' };
143 static const symbol s_3_13[4] = { 'h', 'i', 'e', 'r' };
144 static const symbol s_3_14[10] = { 'a', 'n', 't', 'a', 0xC5, 0xAD, 'h', 'i', 'e', 'r' };
145 static const symbol s_3_15[5] = { 'm', 'a', 'l', 'g', 'r' };
146 static const symbol s_3_16[5] = { 'a', 'n', 'k', 'o', 'r' };
147 static const symbol s_3_17[5] = { 'k', 'o', 'n', 't', 'r' };
148 static const symbol s_3_18[6] = { 'a', 'n', 's', 't', 'a', 't' };
149 static const symbol s_3_19[4] = { 'k', 'v', 'a', 'z' };
150 static const struct among a_3[20] = {
151 { 3, s_3_0, 0, -1, 0},
152 { 4, s_3_1, 0, -1, 0},
153 { 7, s_3_2, -1, -1, 0},
154 { 4, s_3_3, 0, -1, 0},
155 { 8, s_3_4, -1, -1, 0},
156 { 3, s_3_5, 0, -1, 0},
157 { 4, s_3_6, 0, -1, 0},
158 { 3, s_3_7, 0, -1, 0},
159 { 5, s_3_8, 0, -1, 0},
160 { 8, s_3_9, -1, -1, 0},
161 { 5, s_3_10, 0, -1, 0},
162 { 5, s_3_11, 0, -1, 0},
163 { 4, s_3_12, 0, -1, 0},
164 { 4, s_3_13, 0, -1, 0},
165 { 10, s_3_14, -1, -1, 0},
166 { 5, s_3_15, 0, -1, 0},
167 { 5, s_3_16, 0, -1, 0},
168 { 5, s_3_17, 0, -1, 0},
169 { 6, s_3_18, 0, -1, 0},
170 { 4, s_3_19, 0, -1, 0}
171 };
172 
173 static const symbol s_4_0[4] = { 'a', 'l', 'i', 'u' };
174 static const symbol s_4_1[3] = { 'u', 'n', 'u' };
175 static const struct among a_4[2] = {
176 { 4, s_4_0, 0, -1, 0},
177 { 3, s_4_1, 0, -1, 0}
178 };
179 
180 static const symbol s_5_0[3] = { 'a', 'h', 'a' };
181 static const symbol s_5_1[4] = { 'h', 'a', 'h', 'a' };
182 static const symbol s_5_2[8] = { 'h', 'a', 'l', 'e', 'l', 'u', 'j', 'a' };
183 static const symbol s_5_3[4] = { 'h', 'o', 'l', 'a' };
184 static const symbol s_5_4[6] = { 'h', 'o', 's', 'a', 'n', 'a' };
185 static const symbol s_5_5[6] = { 'm', 'a', 'l', 't', 'r', 'a' };
186 static const symbol s_5_6[4] = { 'h', 'u', 'r', 'a' };
187 static const symbol s_5_7[6] = { 0xC4, 0xA5, 'a', 0xC4, 0xA5, 'a' };
188 static const symbol s_5_8[4] = { 'e', 'k', 'd', 'e' };
189 static const symbol s_5_9[4] = { 'e', 'l', 'd', 'e' };
190 static const symbol s_5_10[5] = { 'd', 'i', 's', 'd', 'e' };
191 static const symbol s_5_11[3] = { 'e', 'h', 'e' };
192 static const symbol s_5_12[6] = { 'm', 'a', 'l', 't', 'r', 'e' };
193 static const symbol s_5_13[9] = { 'd', 'i', 'r', 'l', 'i', 'd', 'i', 'd', 'i' };
194 static const symbol s_5_14[6] = { 'm', 'a', 'l', 'p', 'l', 'i' };
195 static const symbol s_5_15[6] = { 'm', 'a', 'l', 0xC4, 0x89, 'i' };
196 static const symbol s_5_16[6] = { 'm', 'a', 'l', 'k', 'a', 'j' };
197 static const symbol s_5_17[4] = { 'a', 'm', 'e', 'n' };
198 static const symbol s_5_18[5] = { 't', 'a', 'm', 'e', 'n' };
199 static const symbol s_5_19[3] = { 'o', 'h', 'o' };
200 static const symbol s_5_20[6] = { 'm', 'a', 'l', 't', 'r', 'o' };
201 static const symbol s_5_21[5] = { 'm', 'i', 'n', 'u', 's' };
202 static const symbol s_5_22[3] = { 'u', 'h', 'u' };
203 static const symbol s_5_23[3] = { 'm', 'u', 'u' };
204 static const struct among a_5[24] = {
205 { 3, s_5_0, 0, -1, 0},
206 { 4, s_5_1, -1, -1, 0},
207 { 8, s_5_2, 0, -1, 0},
208 { 4, s_5_3, 0, -1, 0},
209 { 6, s_5_4, 0, -1, 0},
210 { 6, s_5_5, 0, -1, 0},
211 { 4, s_5_6, 0, -1, 0},
212 { 6, s_5_7, 0, -1, 0},
213 { 4, s_5_8, 0, -1, 0},
214 { 4, s_5_9, 0, -1, 0},
215 { 5, s_5_10, 0, -1, 0},
216 { 3, s_5_11, 0, -1, 0},
217 { 6, s_5_12, 0, -1, 0},
218 { 9, s_5_13, 0, -1, 0},
219 { 6, s_5_14, 0, -1, 0},
220 { 6, s_5_15, 0, -1, 0},
221 { 6, s_5_16, 0, -1, 0},
222 { 4, s_5_17, 0, -1, 0},
223 { 5, s_5_18, -1, -1, 0},
224 { 3, s_5_19, 0, -1, 0},
225 { 6, s_5_20, 0, -1, 0},
226 { 5, s_5_21, 0, -1, 0},
227 { 3, s_5_22, 0, -1, 0},
228 { 3, s_5_23, 0, -1, 0}
229 };
230 
231 static const symbol s_6_0[3] = { 't', 'r', 'i' };
232 static const symbol s_6_1[2] = { 'd', 'u' };
233 static const symbol s_6_2[3] = { 'u', 'n', 'u' };
234 static const struct among a_6[3] = {
235 { 3, s_6_0, 0, -1, 0},
236 { 2, s_6_1, 0, -1, 0},
237 { 3, s_6_2, 0, -1, 0}
238 };
239 
240 static const symbol s_7_0[3] = { 'd', 'e', 'k' };
241 static const symbol s_7_1[4] = { 'c', 'e', 'n', 't' };
242 static const struct among a_7[2] = {
243 { 3, s_7_0, 0, -1, 0},
244 { 4, s_7_1, 0, -1, 0}
245 };
246 
247 static const symbol s_8_0[1] = { 'k' };
248 static const symbol s_8_1[4] = { 'k', 'e', 'l', 'k' };
249 static const symbol s_8_2[3] = { 'n', 'e', 'n' };
250 static const symbol s_8_3[1] = { 't' };
251 static const symbol s_8_4[4] = { 'm', 'u', 'l', 't' };
252 static const symbol s_8_5[4] = { 's', 'a', 'm', 't' };
253 static const symbol s_8_6[2] = { 0xC4, 0x89 };
254 static const struct among a_8[7] = {
255 { 1, s_8_0, 0, -1, 0},
256 { 4, s_8_1, -1, -1, 0},
257 { 3, s_8_2, 0, -1, 0},
258 { 1, s_8_3, 0, -1, 0},
259 { 4, s_8_4, -1, -1, 0},
260 { 4, s_8_5, -2, -1, 0},
261 { 2, s_8_6, 0, -1, 0}
262 };
263 
264 static const symbol s_9_0[1] = { 'a' };
265 static const symbol s_9_1[1] = { 'e' };
266 static const symbol s_9_2[1] = { 'i' };
267 static const symbol s_9_3[1] = { 'j' };
268 static const symbol s_9_4[2] = { 'a', 'j' };
269 static const symbol s_9_5[2] = { 'o', 'j' };
270 static const symbol s_9_6[1] = { 'n' };
271 static const symbol s_9_7[2] = { 'a', 'n' };
272 static const symbol s_9_8[2] = { 'e', 'n' };
273 static const symbol s_9_9[2] = { 'j', 'n' };
274 static const symbol s_9_10[3] = { 'a', 'j', 'n' };
275 static const symbol s_9_11[3] = { 'o', 'j', 'n' };
276 static const symbol s_9_12[2] = { 'o', 'n' };
277 static const symbol s_9_13[1] = { 'o' };
278 static const symbol s_9_14[2] = { 'a', 's' };
279 static const symbol s_9_15[2] = { 'i', 's' };
280 static const symbol s_9_16[2] = { 'o', 's' };
281 static const symbol s_9_17[2] = { 'u', 's' };
282 static const symbol s_9_18[1] = { 'u' };
283 static const struct among a_9[19] = {
284 { 1, s_9_0, 0, -1, 0},
285 { 1, s_9_1, 0, -1, 0},
286 { 1, s_9_2, 0, -1, 0},
287 { 1, s_9_3, 0, 1, 0},
288 { 2, s_9_4, -1, -1, 0},
289 { 2, s_9_5, -2, -1, 0},
290 { 1, s_9_6, 0, 1, 0},
291 { 2, s_9_7, -1, -1, 0},
292 { 2, s_9_8, -2, -1, 0},
293 { 2, s_9_9, -3, 1, 0},
294 { 3, s_9_10, -1, -1, 0},
295 { 3, s_9_11, -2, -1, 0},
296 { 2, s_9_12, -6, -1, 0},
297 { 1, s_9_13, 0, -1, 0},
298 { 2, s_9_14, 0, -1, 0},
299 { 2, s_9_15, 0, -1, 0},
300 { 2, s_9_16, 0, -1, 0},
301 { 2, s_9_17, 0, -1, 0},
302 { 1, s_9_18, 0, -1, 0}
303 };
304 
305 static const unsigned char g_vowel[] = { 17, 65, 16 };
306 
307 static const unsigned char g_aou[] = { 1, 64, 16 };
308 
309 static const unsigned char g_digit[] = { 255, 3 };
310 
311 static int r_canonical_form(struct SN_env * z) {
312  int among_var;
313  bool b_foreign;
314  b_foreign = false;
315  while (1) {
316  int v_1 = z->c;
317  z->bra = z->c;
318  among_var = find_among(z, a_0, 17, 0);
319  z->ket = z->c;
320  switch (among_var) {
321  case 1:
322  slice_from_s(z, 2, s_0);
323  break;
324  case 2:
325  slice_from_s(z, 2, s_1);
326  break;
327  case 3:
328  slice_from_s(z, 2, s_2);
329  break;
330  case 4:
331  slice_from_s(z, 2, s_3);
332  break;
333  case 5:
334  slice_from_s(z, 2, s_4);
335  break;
336  case 6:
337  slice_from_s(z, 2, s_5);
338  break;
339  case 7:
340  slice_from_s(z, 1, s_6);
341  b_foreign = true;
342  break;
343  case 8:
344  slice_from_s(z, 1, s_7);
345  b_foreign = true;
346  break;
347  case 9:
348  slice_from_s(z, 1, s_8);
349  b_foreign = true;
350  break;
351  case 10:
352  slice_from_s(z, 1, s_9);
353  b_foreign = true;
354  break;
355  case 11:
356  slice_from_s(z, 1, s_10);
357  b_foreign = true;
358  break;
359  case 12:
360  b_foreign = true;
361  break;
362  case 13:
363  b_foreign = false;
364  break;
365  case 14:
366  {
367  int ret = skip_utf8(z->p, z->c, z->l, 1);
368  if (ret < 0) goto lab0;
369  z->c = ret;
370  }
371  break;
372  }
373  continue;
374  lab0:
375  z->c = v_1;
376  break;
377  }
378  return !b_foreign;
379 }
380 
381 static int r_initial_apostrophe(struct SN_env * z) {
382  z->bra = z->c;
383  if (z->c == z->l || z->p[z->c] != '\'') return 0;
384  z->c++;
385  z->ket = z->c;
386  if (!(eq_s(z, 2, s_11))) return 0;
387  if (z->c >= z->l || z->p[z->c + 0] >> 5 != 3 || !((2130434 >> (z->p[z->c + 0] & 0x1f)) & 1)) return 0;
388  if (!find_among(z, a_1, 6, 0)) return 0;
389  if (z->c < z->l) return 0;
390  slice_from_s(z, 1, s_12);
391  return 1;
392 }
393 
394 static int r_pronoun(struct SN_env * z) {
395  z->ket = z->c;
396  {
397  int v_1 = z->l - z->c;
398  if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_1; goto lab0; }
399  z->c--;
400  lab0:
401  ;
402  }
403  z->bra = z->c;
404  if (z->c - 1 <= z->lb || z->p[z->c - 1] != 105) return 0;
405  if (!find_among_b(z, a_2, 17, 0)) return 0;
406  do {
407  int v_2 = z->l - z->c;
408  if (z->c > z->lb) goto lab1;
409  break;
410  lab1:
411  z->c = z->l - v_2;
412  if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
413  z->c--;
414  } while (0);
415  slice_del(z);
416  return 1;
417 }
418 
419 static int r_final_apostrophe(struct SN_env * z) {
420  z->ket = z->c;
421  if (z->c <= z->lb || z->p[z->c - 1] != '\'') return 0;
422  z->c--;
423  z->bra = z->c;
424  do {
425  int v_1 = z->l - z->c;
426  if (z->c <= z->lb || z->p[z->c - 1] != 'l') goto lab0;
427  z->c--;
428  if (z->c > z->lb) goto lab0;
429  slice_from_s(z, 1, s_13);
430  break;
431  lab0:
432  z->c = z->l - v_1;
433  if (!(eq_s_b(z, 2, s_14))) goto lab1;
434  if (z->c > z->lb) goto lab1;
435  slice_from_s(z, 1, s_15);
436  break;
437  lab1:
438  z->c = z->l - v_1;
439  if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((68438676 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
440  if (!find_among_b(z, a_3, 20, 0)) goto lab2;
441  do {
442  int v_2 = z->l - z->c;
443  if (z->c > z->lb) goto lab3;
444  break;
445  lab3:
446  z->c = z->l - v_2;
447  if (z->c <= z->lb || z->p[z->c - 1] != '-') goto lab2;
448  z->c--;
449  } while (0);
450  slice_from_s(z, 3, s_16);
451  break;
452  lab2:
453  z->c = z->l - v_1;
454  slice_from_s(z, 1, s_17);
455  } while (0);
456  return 1;
457 }
458 
459 static int r_ujn_suffix(struct SN_env * z) {
460  z->ket = z->c;
461  {
462  int v_1 = z->l - z->c;
463  if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_1; goto lab0; }
464  z->c--;
465  lab0:
466  ;
467  }
468  {
469  int v_2 = z->l - z->c;
470  if (z->c <= z->lb || z->p[z->c - 1] != 'j') { z->c = z->l - v_2; goto lab1; }
471  z->c--;
472  lab1:
473  ;
474  }
475  z->bra = z->c;
476  if (z->c - 2 <= z->lb || z->p[z->c - 1] != 117) return 0;
477  if (!find_among_b(z, a_4, 2, 0)) return 0;
478  do {
479  int v_3 = z->l - z->c;
480  if (z->c > z->lb) goto lab2;
481  break;
482  lab2:
483  z->c = z->l - v_3;
484  if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
485  z->c--;
486  } while (0);
487  slice_del(z);
488  return 1;
489 }
490 
491 static int r_uninflected(struct SN_env * z) {
492  if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2672162 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
493  if (!find_among_b(z, a_5, 24, 0)) return 0;
494  do {
495  int v_1 = z->l - z->c;
496  if (z->c > z->lb) goto lab0;
497  break;
498  lab0:
499  z->c = z->l - v_1;
500  if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
501  z->c--;
502  } while (0);
503  return 1;
504 }
505 
506 static int r_merged_numeral(struct SN_env * z) {
507  if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 117)) return 0;
508  if (!find_among_b(z, a_6, 3, 0)) return 0;
509  if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 107 && z->p[z->c - 1] != 116)) return 0;
510  return find_among_b(z, a_7, 2, 0) != 0;
511 }
512 
513 static int r_correlative(struct SN_env * z) {
514  z->ket = z->c;
515  z->bra = z->c;
516  {
517  int v_1 = z->l - z->c;
518  do {
519  int v_2 = z->l - z->c;
520  {
521  int v_3 = z->l - z->c;
522  if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_3; goto lab1; }
523  z->c--;
524  lab1:
525  ;
526  }
527  z->bra = z->c;
528  if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab0;
529  z->c--;
530  break;
531  lab0:
532  z->c = z->l - v_2;
533  {
534  int v_4 = z->l - z->c;
535  if (z->c <= z->lb || z->p[z->c - 1] != 'n') { z->c = z->l - v_4; goto lab2; }
536  z->c--;
537  lab2:
538  ;
539  }
540  {
541  int v_5 = z->l - z->c;
542  if (z->c <= z->lb || z->p[z->c - 1] != 'j') { z->c = z->l - v_5; goto lab3; }
543  z->c--;
544  lab3:
545  ;
546  }
547  z->bra = z->c;
548  if (in_grouping_b_U(z, g_aou, 97, 117, 0)) return 0;
549  } while (0);
550  if (z->c <= z->lb || z->p[z->c - 1] != 'i') return 0;
551  z->c--;
552  {
553  int v_6 = z->l - z->c;
554  if (!find_among_b(z, a_8, 7, 0)) { z->c = z->l - v_6; goto lab4; }
555  lab4:
556  ;
557  }
558  do {
559  int v_7 = z->l - z->c;
560  if (z->c > z->lb) goto lab5;
561  break;
562  lab5:
563  z->c = z->l - v_7;
564  if (z->c <= z->lb || z->p[z->c - 1] != '-') return 0;
565  z->c--;
566  } while (0);
567  z->c = z->l - v_1;
568  }
569  slice_del(z);
570  return 1;
571 }
572 
573 static int r_long_word(struct SN_env * z) {
574  do {
575  int v_1 = z->l - z->c;
576  {
577  int i; for (i = 2; i > 0; i--) {
578  {
579  int ret = out_grouping_b_U(z, g_vowel, 97, 117, 1);
580  if (ret < 0) goto lab0;
581  z->c -= ret;
582  }
583  }
584  }
585  break;
586  lab0:
587  z->c = z->l - v_1;
588  while (1) {
589  if (z->c <= z->lb || z->p[z->c - 1] != '-') goto lab2;
590  z->c--;
591  break;
592  lab2:
593  {
594  int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
595  if (ret < 0) goto lab1;
596  z->c = ret;
597  }
598  }
599  {
600  int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
601  if (ret < 0) goto lab1;
602  z->c = ret;
603  }
604  break;
605  lab1:
606  z->c = z->l - v_1;
607  {
608  int ret = out_grouping_b_U(z, g_digit, 48, 57, 1);
609  if (ret < 0) return 0;
610  z->c -= ret;
611  }
612  } while (0);
613  return 1;
614 }
615 
616 static int r_standard_suffix(struct SN_env * z) {
617  int among_var;
618  z->ket = z->c;
619  if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2672162 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
620  among_var = find_among_b(z, a_9, 19, 0);
621  if (!among_var) return 0;
622  switch (among_var) {
623  case 1:
624  {
625  int v_1 = z->l - z->c;
626  do {
627  int v_2 = z->l - z->c;
628  if (z->c <= z->lb || z->p[z->c - 1] != '-') goto lab0;
629  z->c--;
630  break;
631  lab0:
632  z->c = z->l - v_2;
633  if (in_grouping_b_U(z, g_digit, 48, 57, 0)) return 0;
634  } while (0);
635  z->c = z->l - v_1;
636  }
637  break;
638  }
639  {
640  int v_3 = z->l - z->c;
641  if (z->c <= z->lb || z->p[z->c - 1] != '-') { z->c = z->l - v_3; goto lab1; }
642  z->c--;
643  lab1:
644  ;
645  }
646  z->bra = z->c;
647  slice_del(z);
648  return 1;
649 }
650 
652  {
653  int v_1 = z->c;
654  {
655  int ret = r_canonical_form(z);
656  if (ret == 0) return ret;
657  }
658  z->c = v_1;
659  }
660  {
661  int v_2 = z->c;
663  z->c = v_2;
664  }
665  z->lb = z->c; z->c = z->l;
666  {
667  int v_3 = z->l - z->c;
668  if (!r_pronoun(z)) goto lab0;
669  return 0;
670  lab0:
671  z->c = z->l - v_3;
672  }
673  {
674  int v_4 = z->l - z->c;
676  z->c = z->l - v_4;
677  }
678  {
679  int v_5 = z->l - z->c;
680  if (!r_correlative(z)) goto lab1;
681  return 0;
682  lab1:
683  z->c = z->l - v_5;
684  }
685  {
686  int v_6 = z->l - z->c;
687  if (!r_uninflected(z)) goto lab2;
688  return 0;
689  lab2:
690  z->c = z->l - v_6;
691  }
692  {
693  int v_7 = z->l - z->c;
694  if (!r_merged_numeral(z)) goto lab3;
695  return 0;
696  lab3:
697  z->c = z->l - v_7;
698  }
699  {
700  int v_8 = z->l - z->c;
701  if (!r_ujn_suffix(z)) goto lab4;
702  return 0;
703  lab4:
704  z->c = z->l - v_8;
705  }
706  {
707  int v_9 = z->l - z->c;
708  {
709  int ret = r_long_word(z);
710  if (ret == 0) return ret;
711  }
712  z->c = z->l - v_9;
713  }
714  {
715  int ret = r_standard_suffix(z);
716  if (ret == 0) return ret;
717  }
718  z->c = z->lb;
719  return 1;
720 }
unsigned char symbol
Definition: api.h:4
static int stem(struct SN_env *z)
Definition: esperanto.cc:651
static const symbol s_2_12[3]
Definition: esperanto.cc:105
static const symbol s_8_6[2]
Definition: esperanto.cc:253
static const symbol s_1_5[2]
Definition: esperanto.cc:83
static const symbol s_2[]
Definition: esperanto.cc:25
static const symbol s_0_4[2]
Definition: esperanto.cc:45
static const unsigned char g_aou[]
Definition: esperanto.cc:307
static const symbol s_5_20[6]
Definition: esperanto.cc:200
static const symbol s_9_17[2]
Definition: esperanto.cc:281
static const symbol s_3_2[7]
Definition: esperanto.cc:132
static const struct among a_3[20]
Definition: esperanto.cc:150
static const struct among a_6[3]
Definition: esperanto.cc:234
static const symbol s_2_2[2]
Definition: esperanto.cc:95
static const symbol s_3_10[5]
Definition: esperanto.cc:140
static const symbol s_0_5[2]
Definition: esperanto.cc:46
static const symbol s_4[]
Definition: esperanto.cc:27
static const struct among a_9[19]
Definition: esperanto.cc:283
static const symbol s_4_1[3]
Definition: esperanto.cc:174
static const symbol s_5_16[6]
Definition: esperanto.cc:196
static const symbol s_3_7[3]
Definition: esperanto.cc:137
static const symbol s_5_6[4]
Definition: esperanto.cc:186
static const symbol s_5_22[3]
Definition: esperanto.cc:202
static const symbol s_0_13[2]
Definition: esperanto.cc:54
static const symbol s_9_0[1]
Definition: esperanto.cc:264
static const symbol s_2_9[2]
Definition: esperanto.cc:102
static const symbol s_5_17[4]
Definition: esperanto.cc:197
static const symbol s_3_14[10]
Definition: esperanto.cc:144
static int r_pronoun(struct SN_env *z)
Definition: esperanto.cc:394
static const symbol s_0_11[1]
Definition: esperanto.cc:52
static const symbol s_3_17[5]
Definition: esperanto.cc:147
static const symbol s_0_8[2]
Definition: esperanto.cc:49
static const symbol s_1_2[2]
Definition: esperanto.cc:80
static const symbol s_9_6[1]
Definition: esperanto.cc:270
static const struct among a_7[2]
Definition: esperanto.cc:242
static int r_standard_suffix(struct SN_env *z)
Definition: esperanto.cc:616
static int r_merged_numeral(struct SN_env *z)
Definition: esperanto.cc:506
static int r_correlative(struct SN_env *z)
Definition: esperanto.cc:513
static const symbol s_2_0[2]
Definition: esperanto.cc:93
static const symbol s_5_2[8]
Definition: esperanto.cc:182
static const symbol s_1_3[2]
Definition: esperanto.cc:81
static const symbol s_9_12[2]
Definition: esperanto.cc:276
static int r_ujn_suffix(struct SN_env *z)
Definition: esperanto.cc:459
static const symbol s_1_0[2]
Definition: esperanto.cc:78
static const symbol s_5_10[5]
Definition: esperanto.cc:190
static const symbol s_6[]
Definition: esperanto.cc:29
static const symbol s_0_15[2]
Definition: esperanto.cc:56
static const symbol s_0_6[1]
Definition: esperanto.cc:47
static const symbol s_9_15[2]
Definition: esperanto.cc:279
static const symbol s_7_1[4]
Definition: esperanto.cc:241
static int r_final_apostrophe(struct SN_env *z)
Definition: esperanto.cc:419
static const symbol s_1_4[1]
Definition: esperanto.cc:82
static const symbol s_3[]
Definition: esperanto.cc:26
static const symbol s_2_15[4]
Definition: esperanto.cc:108
static const symbol s_5_12[6]
Definition: esperanto.cc:192
static const symbol s_3_0[3]
Definition: esperanto.cc:130
static const symbol s_9_10[3]
Definition: esperanto.cc:274
static const symbol s_9_7[2]
Definition: esperanto.cc:271
static const symbol s_0_7[2]
Definition: esperanto.cc:48
static const symbol s_9_18[1]
Definition: esperanto.cc:282
static const symbol s_0_16[2]
Definition: esperanto.cc:57
static const symbol s_3_4[8]
Definition: esperanto.cc:134
static const symbol s_5_19[3]
Definition: esperanto.cc:199
static const symbol s_5_8[4]
Definition: esperanto.cc:188
static const symbol s_5_0[3]
Definition: esperanto.cc:180
static const symbol s_2_11[2]
Definition: esperanto.cc:104
static const symbol s_7[]
Definition: esperanto.cc:30
static const symbol s_13[]
Definition: esperanto.cc:36
static const symbol s_8_2[3]
Definition: esperanto.cc:249
static int r_uninflected(struct SN_env *z)
Definition: esperanto.cc:491
static const symbol s_5_18[5]
Definition: esperanto.cc:198
static const symbol s_6_2[3]
Definition: esperanto.cc:233
static const symbol s_0_9[1]
Definition: esperanto.cc:50
static const symbol s_3_6[4]
Definition: esperanto.cc:136
static int r_long_word(struct SN_env *z)
Definition: esperanto.cc:573
static const symbol s_2_10[2]
Definition: esperanto.cc:103
static const symbol s_3_12[4]
Definition: esperanto.cc:142
static const symbol s_9_14[2]
Definition: esperanto.cc:278
static const symbol s_7_0[3]
Definition: esperanto.cc:240
static const symbol s_3_11[5]
Definition: esperanto.cc:141
static const symbol s_3_9[8]
Definition: esperanto.cc:139
static const symbol s_2_14[3]
Definition: esperanto.cc:107
static const symbol s_3_3[4]
Definition: esperanto.cc:133
static const symbol s_5_23[3]
Definition: esperanto.cc:203
static const symbol s_8_4[4]
Definition: esperanto.cc:251
static const symbol s_0_10[1]
Definition: esperanto.cc:51
static const symbol s_5_4[6]
Definition: esperanto.cc:184
static const symbol s_2_4[3]
Definition: esperanto.cc:97
static const symbol s_5_3[4]
Definition: esperanto.cc:183
static const symbol s_9_9[2]
Definition: esperanto.cc:273
static const symbol s_5_5[6]
Definition: esperanto.cc:185
static const symbol s_16[]
Definition: esperanto.cc:39
static const symbol s_14[]
Definition: esperanto.cc:37
static const symbol s_3_5[3]
Definition: esperanto.cc:135
static const symbol s_9_8[2]
Definition: esperanto.cc:272
static const symbol s_4_0[4]
Definition: esperanto.cc:173
static const symbol s_5_15[6]
Definition: esperanto.cc:195
static const symbol s_9_5[2]
Definition: esperanto.cc:269
static const struct among a_4[2]
Definition: esperanto.cc:175
static const symbol s_9_1[1]
Definition: esperanto.cc:265
static const symbol s_2_3[2]
Definition: esperanto.cc:96
static const symbol s_2_7[2]
Definition: esperanto.cc:100
static const symbol s_9_11[3]
Definition: esperanto.cc:275
static const symbol s_10[]
Definition: esperanto.cc:33
static const symbol s_1_1[1]
Definition: esperanto.cc:79
static const symbol s_9_2[1]
Definition: esperanto.cc:266
static const struct among a_5[24]
Definition: esperanto.cc:204
static const struct among a_1[6]
Definition: esperanto.cc:84
static const symbol s_3_19[4]
Definition: esperanto.cc:149
static const symbol s_1[]
Definition: esperanto.cc:24
static const symbol s_9_13[1]
Definition: esperanto.cc:277
static const symbol s_3_1[4]
Definition: esperanto.cc:131
static const symbol s_0_14[2]
Definition: esperanto.cc:55
static const symbol s_5_21[5]
Definition: esperanto.cc:201
static const unsigned char g_digit[]
Definition: esperanto.cc:309
static const symbol s_9_3[1]
Definition: esperanto.cc:267
static const struct among a_8[7]
Definition: esperanto.cc:254
static const symbol s_9_4[2]
Definition: esperanto.cc:268
static const struct among a_2[17]
Definition: esperanto.cc:110
static const symbol s_11[]
Definition: esperanto.cc:34
static const symbol s_12[]
Definition: esperanto.cc:35
static const symbol s_3_15[5]
Definition: esperanto.cc:145
static const symbol s_6_1[2]
Definition: esperanto.cc:232
static const symbol s_3_18[6]
Definition: esperanto.cc:148
static const symbol s_3_13[4]
Definition: esperanto.cc:143
static const symbol s_2_8[3]
Definition: esperanto.cc:101
static const symbol s_5_13[9]
Definition: esperanto.cc:193
static const symbol s_8_3[1]
Definition: esperanto.cc:250
static const symbol s_0_1[1]
Definition: esperanto.cc:42
static const symbol s_6_0[3]
Definition: esperanto.cc:231
static const symbol s_5_11[3]
Definition: esperanto.cc:191
static const symbol s_5_7[6]
Definition: esperanto.cc:187
static const symbol s_0_12[2]
Definition: esperanto.cc:53
static const symbol s_0_2[2]
Definition: esperanto.cc:43
Xapian::Internal::Snowball::Esperanto::SN_local SN_local
Definition: esperanto.cc:10
static const symbol s_17[]
Definition: esperanto.cc:40
static const symbol s_8_1[4]
Definition: esperanto.cc:248
static int r_initial_apostrophe(struct SN_env *z)
Definition: esperanto.cc:381
static const symbol s_2_5[4]
Definition: esperanto.cc:98
static const symbol s_0_3[2]
Definition: esperanto.cc:44
static const unsigned char g_vowel[]
Definition: esperanto.cc:305
static const symbol s_5_14[6]
Definition: esperanto.cc:194
static const symbol s_2_6[2]
Definition: esperanto.cc:99
static const symbol s_2_1[2]
Definition: esperanto.cc:94
static int r_canonical_form(struct SN_env *z)
Definition: esperanto.cc:311
static const symbol s_3_8[5]
Definition: esperanto.cc:138
static const symbol s_8_5[4]
Definition: esperanto.cc:252
static const symbol s_8[]
Definition: esperanto.cc:31
static const symbol s_9[]
Definition: esperanto.cc:32
static const struct among a_0[17]
Definition: esperanto.cc:58
static const symbol s_5[]
Definition: esperanto.cc:28
static const symbol s_5_9[4]
Definition: esperanto.cc:189
static const symbol s_8_0[1]
Definition: esperanto.cc:247
static const symbol s_9_16[2]
Definition: esperanto.cc:280
static const symbol s_15[]
Definition: esperanto.cc:38
static const symbol s_3_16[5]
Definition: esperanto.cc:146
static const symbol s_2_13[3]
Definition: esperanto.cc:106
static const symbol s_5_1[4]
Definition: esperanto.cc:181
static const symbol s_2_16[6]
Definition: esperanto.cc:109
static const symbol s_0[]
Definition: esperanto.cc:23
SNOWBALL_ERR slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.cc:439
int eq_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.cc:238
int in_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.cc:152
int skip_b_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.cc:75
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.cc:243
SNOWBALL_ERR slice_del(struct SN_env *z)
Definition: utilities.cc:450
int out_grouping_b_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.cc:176
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.cc:50
int find_among_b(struct SN_env *z, const struct among *v, int v_size, int(*)(struct SN_env *))
Definition: utilities.cc:322
int find_among(struct SN_env *z, const struct among *v, int v_size, int(*)(struct SN_env *))
Definition: utilities.cc:256
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
Definition: header.h:256