YAZ 5.37.0
stem_KOI8_R_russian.c
Go to the documentation of this file.
1
2/* This file was generated automatically by the Snowball to ANSI C compiler */
3
4#include "../runtime/header.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9extern int russian_KOI8_R_stem(struct SN_env * z);
10#ifdef __cplusplus
11}
12#endif
13static int r_tidy_up(struct SN_env * z);
14static int r_derivational(struct SN_env * z);
15static int r_noun(struct SN_env * z);
16static int r_verb(struct SN_env * z);
17static int r_reflexive(struct SN_env * z);
18static int r_adjectival(struct SN_env * z);
19static int r_adjective(struct SN_env * z);
20static int r_perfective_gerund(struct SN_env * z);
21static int r_R2(struct SN_env * z);
22static int r_mark_regions(struct SN_env * z);
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27
28extern struct SN_env * russian_KOI8_R_create_env(void);
29extern void russian_KOI8_R_close_env(struct SN_env * z);
30
31
32#ifdef __cplusplus
33}
34#endif
35static const symbol s_0_0[3] = { 0xD7, 0xDB, 0xC9 };
36static const symbol s_0_1[4] = { 0xC9, 0xD7, 0xDB, 0xC9 };
37static const symbol s_0_2[4] = { 0xD9, 0xD7, 0xDB, 0xC9 };
38static const symbol s_0_3[1] = { 0xD7 };
39static const symbol s_0_4[2] = { 0xC9, 0xD7 };
40static const symbol s_0_5[2] = { 0xD9, 0xD7 };
41static const symbol s_0_6[5] = { 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
42static const symbol s_0_7[6] = { 0xC9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
43static const symbol s_0_8[6] = { 0xD9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
44
45static const struct among a_0[9] =
46{
47/* 0 */ { 3, s_0_0, -1, 1, 0},
48/* 1 */ { 4, s_0_1, 0, 2, 0},
49/* 2 */ { 4, s_0_2, 0, 2, 0},
50/* 3 */ { 1, s_0_3, -1, 1, 0},
51/* 4 */ { 2, s_0_4, 3, 2, 0},
52/* 5 */ { 2, s_0_5, 3, 2, 0},
53/* 6 */ { 5, s_0_6, -1, 1, 0},
54/* 7 */ { 6, s_0_7, 6, 2, 0},
55/* 8 */ { 6, s_0_8, 6, 2, 0}
56};
57
58static const symbol s_1_0[2] = { 0xC0, 0xC0 };
59static const symbol s_1_1[2] = { 0xC5, 0xC0 };
60static const symbol s_1_2[2] = { 0xCF, 0xC0 };
61static const symbol s_1_3[2] = { 0xD5, 0xC0 };
62static const symbol s_1_4[2] = { 0xC5, 0xC5 };
63static const symbol s_1_5[2] = { 0xC9, 0xC5 };
64static const symbol s_1_6[2] = { 0xCF, 0xC5 };
65static const symbol s_1_7[2] = { 0xD9, 0xC5 };
66static const symbol s_1_8[2] = { 0xC9, 0xC8 };
67static const symbol s_1_9[2] = { 0xD9, 0xC8 };
68static const symbol s_1_10[3] = { 0xC9, 0xCD, 0xC9 };
69static const symbol s_1_11[3] = { 0xD9, 0xCD, 0xC9 };
70static const symbol s_1_12[2] = { 0xC5, 0xCA };
71static const symbol s_1_13[2] = { 0xC9, 0xCA };
72static const symbol s_1_14[2] = { 0xCF, 0xCA };
73static const symbol s_1_15[2] = { 0xD9, 0xCA };
74static const symbol s_1_16[2] = { 0xC5, 0xCD };
75static const symbol s_1_17[2] = { 0xC9, 0xCD };
76static const symbol s_1_18[2] = { 0xCF, 0xCD };
77static const symbol s_1_19[2] = { 0xD9, 0xCD };
78static const symbol s_1_20[3] = { 0xC5, 0xC7, 0xCF };
79static const symbol s_1_21[3] = { 0xCF, 0xC7, 0xCF };
80static const symbol s_1_22[2] = { 0xC1, 0xD1 };
81static const symbol s_1_23[2] = { 0xD1, 0xD1 };
82static const symbol s_1_24[3] = { 0xC5, 0xCD, 0xD5 };
83static const symbol s_1_25[3] = { 0xCF, 0xCD, 0xD5 };
84
85static const struct among a_1[26] =
86{
87/* 0 */ { 2, s_1_0, -1, 1, 0},
88/* 1 */ { 2, s_1_1, -1, 1, 0},
89/* 2 */ { 2, s_1_2, -1, 1, 0},
90/* 3 */ { 2, s_1_3, -1, 1, 0},
91/* 4 */ { 2, s_1_4, -1, 1, 0},
92/* 5 */ { 2, s_1_5, -1, 1, 0},
93/* 6 */ { 2, s_1_6, -1, 1, 0},
94/* 7 */ { 2, s_1_7, -1, 1, 0},
95/* 8 */ { 2, s_1_8, -1, 1, 0},
96/* 9 */ { 2, s_1_9, -1, 1, 0},
97/* 10 */ { 3, s_1_10, -1, 1, 0},
98/* 11 */ { 3, s_1_11, -1, 1, 0},
99/* 12 */ { 2, s_1_12, -1, 1, 0},
100/* 13 */ { 2, s_1_13, -1, 1, 0},
101/* 14 */ { 2, s_1_14, -1, 1, 0},
102/* 15 */ { 2, s_1_15, -1, 1, 0},
103/* 16 */ { 2, s_1_16, -1, 1, 0},
104/* 17 */ { 2, s_1_17, -1, 1, 0},
105/* 18 */ { 2, s_1_18, -1, 1, 0},
106/* 19 */ { 2, s_1_19, -1, 1, 0},
107/* 20 */ { 3, s_1_20, -1, 1, 0},
108/* 21 */ { 3, s_1_21, -1, 1, 0},
109/* 22 */ { 2, s_1_22, -1, 1, 0},
110/* 23 */ { 2, s_1_23, -1, 1, 0},
111/* 24 */ { 3, s_1_24, -1, 1, 0},
112/* 25 */ { 3, s_1_25, -1, 1, 0}
113};
114
115static const symbol s_2_0[2] = { 0xC5, 0xCD };
116static const symbol s_2_1[2] = { 0xCE, 0xCE };
117static const symbol s_2_2[2] = { 0xD7, 0xDB };
118static const symbol s_2_3[3] = { 0xC9, 0xD7, 0xDB };
119static const symbol s_2_4[3] = { 0xD9, 0xD7, 0xDB };
120static const symbol s_2_5[1] = { 0xDD };
121static const symbol s_2_6[2] = { 0xC0, 0xDD };
122static const symbol s_2_7[3] = { 0xD5, 0xC0, 0xDD };
123
124static const struct among a_2[8] =
125{
126/* 0 */ { 2, s_2_0, -1, 1, 0},
127/* 1 */ { 2, s_2_1, -1, 1, 0},
128/* 2 */ { 2, s_2_2, -1, 1, 0},
129/* 3 */ { 3, s_2_3, 2, 2, 0},
130/* 4 */ { 3, s_2_4, 2, 2, 0},
131/* 5 */ { 1, s_2_5, -1, 1, 0},
132/* 6 */ { 2, s_2_6, 5, 1, 0},
133/* 7 */ { 3, s_2_7, 6, 2, 0}
134};
135
136static const symbol s_3_0[2] = { 0xD3, 0xD1 };
137static const symbol s_3_1[2] = { 0xD3, 0xD8 };
138
139static const struct among a_3[2] =
140{
141/* 0 */ { 2, s_3_0, -1, 1, 0},
142/* 1 */ { 2, s_3_1, -1, 1, 0}
143};
144
145static const symbol s_4_0[1] = { 0xC0 };
146static const symbol s_4_1[2] = { 0xD5, 0xC0 };
147static const symbol s_4_2[2] = { 0xCC, 0xC1 };
148static const symbol s_4_3[3] = { 0xC9, 0xCC, 0xC1 };
149static const symbol s_4_4[3] = { 0xD9, 0xCC, 0xC1 };
150static const symbol s_4_5[2] = { 0xCE, 0xC1 };
151static const symbol s_4_6[3] = { 0xC5, 0xCE, 0xC1 };
152static const symbol s_4_7[3] = { 0xC5, 0xD4, 0xC5 };
153static const symbol s_4_8[3] = { 0xC9, 0xD4, 0xC5 };
154static const symbol s_4_9[3] = { 0xCA, 0xD4, 0xC5 };
155static const symbol s_4_10[4] = { 0xC5, 0xCA, 0xD4, 0xC5 };
156static const symbol s_4_11[4] = { 0xD5, 0xCA, 0xD4, 0xC5 };
157static const symbol s_4_12[2] = { 0xCC, 0xC9 };
158static const symbol s_4_13[3] = { 0xC9, 0xCC, 0xC9 };
159static const symbol s_4_14[3] = { 0xD9, 0xCC, 0xC9 };
160static const symbol s_4_15[1] = { 0xCA };
161static const symbol s_4_16[2] = { 0xC5, 0xCA };
162static const symbol s_4_17[2] = { 0xD5, 0xCA };
163static const symbol s_4_18[1] = { 0xCC };
164static const symbol s_4_19[2] = { 0xC9, 0xCC };
165static const symbol s_4_20[2] = { 0xD9, 0xCC };
166static const symbol s_4_21[2] = { 0xC5, 0xCD };
167static const symbol s_4_22[2] = { 0xC9, 0xCD };
168static const symbol s_4_23[2] = { 0xD9, 0xCD };
169static const symbol s_4_24[1] = { 0xCE };
170static const symbol s_4_25[2] = { 0xC5, 0xCE };
171static const symbol s_4_26[2] = { 0xCC, 0xCF };
172static const symbol s_4_27[3] = { 0xC9, 0xCC, 0xCF };
173static const symbol s_4_28[3] = { 0xD9, 0xCC, 0xCF };
174static const symbol s_4_29[2] = { 0xCE, 0xCF };
175static const symbol s_4_30[3] = { 0xC5, 0xCE, 0xCF };
176static const symbol s_4_31[3] = { 0xCE, 0xCE, 0xCF };
177static const symbol s_4_32[2] = { 0xC0, 0xD4 };
178static const symbol s_4_33[3] = { 0xD5, 0xC0, 0xD4 };
179static const symbol s_4_34[2] = { 0xC5, 0xD4 };
180static const symbol s_4_35[3] = { 0xD5, 0xC5, 0xD4 };
181static const symbol s_4_36[2] = { 0xC9, 0xD4 };
182static const symbol s_4_37[2] = { 0xD1, 0xD4 };
183static const symbol s_4_38[2] = { 0xD9, 0xD4 };
184static const symbol s_4_39[2] = { 0xD4, 0xD8 };
185static const symbol s_4_40[3] = { 0xC9, 0xD4, 0xD8 };
186static const symbol s_4_41[3] = { 0xD9, 0xD4, 0xD8 };
187static const symbol s_4_42[3] = { 0xC5, 0xDB, 0xD8 };
188static const symbol s_4_43[3] = { 0xC9, 0xDB, 0xD8 };
189static const symbol s_4_44[2] = { 0xCE, 0xD9 };
190static const symbol s_4_45[3] = { 0xC5, 0xCE, 0xD9 };
191
192static const struct among a_4[46] =
193{
194/* 0 */ { 1, s_4_0, -1, 2, 0},
195/* 1 */ { 2, s_4_1, 0, 2, 0},
196/* 2 */ { 2, s_4_2, -1, 1, 0},
197/* 3 */ { 3, s_4_3, 2, 2, 0},
198/* 4 */ { 3, s_4_4, 2, 2, 0},
199/* 5 */ { 2, s_4_5, -1, 1, 0},
200/* 6 */ { 3, s_4_6, 5, 2, 0},
201/* 7 */ { 3, s_4_7, -1, 1, 0},
202/* 8 */ { 3, s_4_8, -1, 2, 0},
203/* 9 */ { 3, s_4_9, -1, 1, 0},
204/* 10 */ { 4, s_4_10, 9, 2, 0},
205/* 11 */ { 4, s_4_11, 9, 2, 0},
206/* 12 */ { 2, s_4_12, -1, 1, 0},
207/* 13 */ { 3, s_4_13, 12, 2, 0},
208/* 14 */ { 3, s_4_14, 12, 2, 0},
209/* 15 */ { 1, s_4_15, -1, 1, 0},
210/* 16 */ { 2, s_4_16, 15, 2, 0},
211/* 17 */ { 2, s_4_17, 15, 2, 0},
212/* 18 */ { 1, s_4_18, -1, 1, 0},
213/* 19 */ { 2, s_4_19, 18, 2, 0},
214/* 20 */ { 2, s_4_20, 18, 2, 0},
215/* 21 */ { 2, s_4_21, -1, 1, 0},
216/* 22 */ { 2, s_4_22, -1, 2, 0},
217/* 23 */ { 2, s_4_23, -1, 2, 0},
218/* 24 */ { 1, s_4_24, -1, 1, 0},
219/* 25 */ { 2, s_4_25, 24, 2, 0},
220/* 26 */ { 2, s_4_26, -1, 1, 0},
221/* 27 */ { 3, s_4_27, 26, 2, 0},
222/* 28 */ { 3, s_4_28, 26, 2, 0},
223/* 29 */ { 2, s_4_29, -1, 1, 0},
224/* 30 */ { 3, s_4_30, 29, 2, 0},
225/* 31 */ { 3, s_4_31, 29, 1, 0},
226/* 32 */ { 2, s_4_32, -1, 1, 0},
227/* 33 */ { 3, s_4_33, 32, 2, 0},
228/* 34 */ { 2, s_4_34, -1, 1, 0},
229/* 35 */ { 3, s_4_35, 34, 2, 0},
230/* 36 */ { 2, s_4_36, -1, 2, 0},
231/* 37 */ { 2, s_4_37, -1, 2, 0},
232/* 38 */ { 2, s_4_38, -1, 2, 0},
233/* 39 */ { 2, s_4_39, -1, 1, 0},
234/* 40 */ { 3, s_4_40, 39, 2, 0},
235/* 41 */ { 3, s_4_41, 39, 2, 0},
236/* 42 */ { 3, s_4_42, -1, 1, 0},
237/* 43 */ { 3, s_4_43, -1, 2, 0},
238/* 44 */ { 2, s_4_44, -1, 1, 0},
239/* 45 */ { 3, s_4_45, 44, 2, 0}
240};
241
242static const symbol s_5_0[1] = { 0xC0 };
243static const symbol s_5_1[2] = { 0xC9, 0xC0 };
244static const symbol s_5_2[2] = { 0xD8, 0xC0 };
245static const symbol s_5_3[1] = { 0xC1 };
246static const symbol s_5_4[1] = { 0xC5 };
247static const symbol s_5_5[2] = { 0xC9, 0xC5 };
248static const symbol s_5_6[2] = { 0xD8, 0xC5 };
249static const symbol s_5_7[2] = { 0xC1, 0xC8 };
250static const symbol s_5_8[2] = { 0xD1, 0xC8 };
251static const symbol s_5_9[3] = { 0xC9, 0xD1, 0xC8 };
252static const symbol s_5_10[1] = { 0xC9 };
253static const symbol s_5_11[2] = { 0xC5, 0xC9 };
254static const symbol s_5_12[2] = { 0xC9, 0xC9 };
255static const symbol s_5_13[3] = { 0xC1, 0xCD, 0xC9 };
256static const symbol s_5_14[3] = { 0xD1, 0xCD, 0xC9 };
257static const symbol s_5_15[4] = { 0xC9, 0xD1, 0xCD, 0xC9 };
258static const symbol s_5_16[1] = { 0xCA };
259static const symbol s_5_17[2] = { 0xC5, 0xCA };
260static const symbol s_5_18[3] = { 0xC9, 0xC5, 0xCA };
261static const symbol s_5_19[2] = { 0xC9, 0xCA };
262static const symbol s_5_20[2] = { 0xCF, 0xCA };
263static const symbol s_5_21[2] = { 0xC1, 0xCD };
264static const symbol s_5_22[2] = { 0xC5, 0xCD };
265static const symbol s_5_23[3] = { 0xC9, 0xC5, 0xCD };
266static const symbol s_5_24[2] = { 0xCF, 0xCD };
267static const symbol s_5_25[2] = { 0xD1, 0xCD };
268static const symbol s_5_26[3] = { 0xC9, 0xD1, 0xCD };
269static const symbol s_5_27[1] = { 0xCF };
270static const symbol s_5_28[1] = { 0xD1 };
271static const symbol s_5_29[2] = { 0xC9, 0xD1 };
272static const symbol s_5_30[2] = { 0xD8, 0xD1 };
273static const symbol s_5_31[1] = { 0xD5 };
274static const symbol s_5_32[2] = { 0xC5, 0xD7 };
275static const symbol s_5_33[2] = { 0xCF, 0xD7 };
276static const symbol s_5_34[1] = { 0xD8 };
277static const symbol s_5_35[1] = { 0xD9 };
278
279static const struct among a_5[36] =
280{
281/* 0 */ { 1, s_5_0, -1, 1, 0},
282/* 1 */ { 2, s_5_1, 0, 1, 0},
283/* 2 */ { 2, s_5_2, 0, 1, 0},
284/* 3 */ { 1, s_5_3, -1, 1, 0},
285/* 4 */ { 1, s_5_4, -1, 1, 0},
286/* 5 */ { 2, s_5_5, 4, 1, 0},
287/* 6 */ { 2, s_5_6, 4, 1, 0},
288/* 7 */ { 2, s_5_7, -1, 1, 0},
289/* 8 */ { 2, s_5_8, -1, 1, 0},
290/* 9 */ { 3, s_5_9, 8, 1, 0},
291/* 10 */ { 1, s_5_10, -1, 1, 0},
292/* 11 */ { 2, s_5_11, 10, 1, 0},
293/* 12 */ { 2, s_5_12, 10, 1, 0},
294/* 13 */ { 3, s_5_13, 10, 1, 0},
295/* 14 */ { 3, s_5_14, 10, 1, 0},
296/* 15 */ { 4, s_5_15, 14, 1, 0},
297/* 16 */ { 1, s_5_16, -1, 1, 0},
298/* 17 */ { 2, s_5_17, 16, 1, 0},
299/* 18 */ { 3, s_5_18, 17, 1, 0},
300/* 19 */ { 2, s_5_19, 16, 1, 0},
301/* 20 */ { 2, s_5_20, 16, 1, 0},
302/* 21 */ { 2, s_5_21, -1, 1, 0},
303/* 22 */ { 2, s_5_22, -1, 1, 0},
304/* 23 */ { 3, s_5_23, 22, 1, 0},
305/* 24 */ { 2, s_5_24, -1, 1, 0},
306/* 25 */ { 2, s_5_25, -1, 1, 0},
307/* 26 */ { 3, s_5_26, 25, 1, 0},
308/* 27 */ { 1, s_5_27, -1, 1, 0},
309/* 28 */ { 1, s_5_28, -1, 1, 0},
310/* 29 */ { 2, s_5_29, 28, 1, 0},
311/* 30 */ { 2, s_5_30, 28, 1, 0},
312/* 31 */ { 1, s_5_31, -1, 1, 0},
313/* 32 */ { 2, s_5_32, -1, 1, 0},
314/* 33 */ { 2, s_5_33, -1, 1, 0},
315/* 34 */ { 1, s_5_34, -1, 1, 0},
316/* 35 */ { 1, s_5_35, -1, 1, 0}
317};
318
319static const symbol s_6_0[3] = { 0xCF, 0xD3, 0xD4 };
320static const symbol s_6_1[4] = { 0xCF, 0xD3, 0xD4, 0xD8 };
321
322static const struct among a_6[2] =
323{
324/* 0 */ { 3, s_6_0, -1, 1, 0},
325/* 1 */ { 4, s_6_1, -1, 1, 0}
326};
327
328static const symbol s_7_0[4] = { 0xC5, 0xCA, 0xDB, 0xC5 };
329static const symbol s_7_1[1] = { 0xCE };
330static const symbol s_7_2[1] = { 0xD8 };
331static const symbol s_7_3[3] = { 0xC5, 0xCA, 0xDB };
332
333static const struct among a_7[4] =
334{
335/* 0 */ { 4, s_7_0, -1, 1, 0},
336/* 1 */ { 1, s_7_1, -1, 2, 0},
337/* 2 */ { 1, s_7_2, -1, 3, 0},
338/* 3 */ { 3, s_7_3, -1, 1, 0}
339};
340
341static const unsigned char g_v[] = { 35, 130, 34, 18 };
342
343static const symbol s_0[] = { 0xC1 };
344static const symbol s_1[] = { 0xD1 };
345static const symbol s_2[] = { 0xC1 };
346static const symbol s_3[] = { 0xD1 };
347static const symbol s_4[] = { 0xC1 };
348static const symbol s_5[] = { 0xD1 };
349static const symbol s_6[] = { 0xCE };
350static const symbol s_7[] = { 0xCE };
351static const symbol s_8[] = { 0xCE };
352static const symbol s_9[] = { 0xC9 };
353
354static int r_mark_regions(struct SN_env * z) {
355 z->I[0] = z->l;
356 z->I[1] = z->l;
357 { int c1 = z->c; /* do, line 63 */
358 { /* gopast */ /* grouping v, line 64 */
359 int ret = out_grouping(z, g_v, 192, 220, 1);
360 if (ret < 0) goto lab0;
361 z->c += ret;
362 }
363 z->I[0] = z->c; /* setmark pV, line 64 */
364 { /* gopast */ /* non v, line 64 */
365 int ret = in_grouping(z, g_v, 192, 220, 1);
366 if (ret < 0) goto lab0;
367 z->c += ret;
368 }
369 { /* gopast */ /* grouping v, line 65 */
370 int ret = out_grouping(z, g_v, 192, 220, 1);
371 if (ret < 0) goto lab0;
372 z->c += ret;
373 }
374 { /* gopast */ /* non v, line 65 */
375 int ret = in_grouping(z, g_v, 192, 220, 1);
376 if (ret < 0) goto lab0;
377 z->c += ret;
378 }
379 z->I[1] = z->c; /* setmark p2, line 65 */
380 lab0:
381 z->c = c1;
382 }
383 return 1;
384}
385
386static int r_R2(struct SN_env * z) {
387 if (!(z->I[1] <= z->c)) return 0;
388 return 1;
389}
390
391static int r_perfective_gerund(struct SN_env * z) {
392 int among_var;
393 z->ket = z->c; /* [, line 74 */
394 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((25166336 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
395 among_var = find_among_b(z, a_0, 9); /* substring, line 74 */
396 if (!(among_var)) return 0;
397 z->bra = z->c; /* ], line 74 */
398 switch(among_var) {
399 case 0: return 0;
400 case 1:
401 { int m1 = z->l - z->c; (void)m1; /* or, line 78 */
402 if (!(eq_s_b(z, 1, s_0))) goto lab1;
403 goto lab0;
404 lab1:
405 z->c = z->l - m1;
406 if (!(eq_s_b(z, 1, s_1))) return 0;
407 }
408 lab0:
409 { int ret = slice_del(z); /* delete, line 78 */
410 if (ret < 0) return ret;
411 }
412 break;
413 case 2:
414 { int ret = slice_del(z); /* delete, line 85 */
415 if (ret < 0) return ret;
416 }
417 break;
418 }
419 return 1;
420}
421
422static int r_adjective(struct SN_env * z) {
423 int among_var;
424 z->ket = z->c; /* [, line 90 */
425 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((2271009 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
426 among_var = find_among_b(z, a_1, 26); /* substring, line 90 */
427 if (!(among_var)) return 0;
428 z->bra = z->c; /* ], line 90 */
429 switch(among_var) {
430 case 0: return 0;
431 case 1:
432 { int ret = slice_del(z); /* delete, line 99 */
433 if (ret < 0) return ret;
434 }
435 break;
436 }
437 return 1;
438}
439
440static int r_adjectival(struct SN_env * z) {
441 int among_var;
442 { int ret = r_adjective(z);
443 if (ret == 0) return 0; /* call adjective, line 104 */
444 if (ret < 0) return ret;
445 }
446 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
447 z->ket = z->c; /* [, line 112 */
448 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->c = z->l - m_keep; goto lab0; }
449 among_var = find_among_b(z, a_2, 8); /* substring, line 112 */
450 if (!(among_var)) { z->c = z->l - m_keep; goto lab0; }
451 z->bra = z->c; /* ], line 112 */
452 switch(among_var) {
453 case 0: { z->c = z->l - m_keep; goto lab0; }
454 case 1:
455 { int m1 = z->l - z->c; (void)m1; /* or, line 117 */
456 if (!(eq_s_b(z, 1, s_2))) goto lab2;
457 goto lab1;
458 lab2:
459 z->c = z->l - m1;
460 if (!(eq_s_b(z, 1, s_3))) { z->c = z->l - m_keep; goto lab0; }
461 }
462 lab1:
463 { int ret = slice_del(z); /* delete, line 117 */
464 if (ret < 0) return ret;
465 }
466 break;
467 case 2:
468 { int ret = slice_del(z); /* delete, line 124 */
469 if (ret < 0) return ret;
470 }
471 break;
472 }
473 lab0:
474 ;
475 }
476 return 1;
477}
478
479static int r_reflexive(struct SN_env * z) {
480 int among_var;
481 z->ket = z->c; /* [, line 131 */
482 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 209 && z->p[z->c - 1] != 216)) return 0;
483 among_var = find_among_b(z, a_3, 2); /* substring, line 131 */
484 if (!(among_var)) return 0;
485 z->bra = z->c; /* ], line 131 */
486 switch(among_var) {
487 case 0: return 0;
488 case 1:
489 { int ret = slice_del(z); /* delete, line 134 */
490 if (ret < 0) return ret;
491 }
492 break;
493 }
494 return 1;
495}
496
497static int r_verb(struct SN_env * z) {
498 int among_var;
499 z->ket = z->c; /* [, line 139 */
500 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((51443235 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
501 among_var = find_among_b(z, a_4, 46); /* substring, line 139 */
502 if (!(among_var)) return 0;
503 z->bra = z->c; /* ], line 139 */
504 switch(among_var) {
505 case 0: return 0;
506 case 1:
507 { int m1 = z->l - z->c; (void)m1; /* or, line 145 */
508 if (!(eq_s_b(z, 1, s_4))) goto lab1;
509 goto lab0;
510 lab1:
511 z->c = z->l - m1;
512 if (!(eq_s_b(z, 1, s_5))) return 0;
513 }
514 lab0:
515 { int ret = slice_del(z); /* delete, line 145 */
516 if (ret < 0) return ret;
517 }
518 break;
519 case 2:
520 { int ret = slice_del(z); /* delete, line 153 */
521 if (ret < 0) return ret;
522 }
523 break;
524 }
525 return 1;
526}
527
528static int r_noun(struct SN_env * z) {
529 int among_var;
530 z->ket = z->c; /* [, line 162 */
531 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((60991267 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
532 among_var = find_among_b(z, a_5, 36); /* substring, line 162 */
533 if (!(among_var)) return 0;
534 z->bra = z->c; /* ], line 162 */
535 switch(among_var) {
536 case 0: return 0;
537 case 1:
538 { int ret = slice_del(z); /* delete, line 169 */
539 if (ret < 0) return ret;
540 }
541 break;
542 }
543 return 1;
544}
545
546static int r_derivational(struct SN_env * z) {
547 int among_var;
548 z->ket = z->c; /* [, line 178 */
549 if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 212 && z->p[z->c - 1] != 216)) return 0;
550 among_var = find_among_b(z, a_6, 2); /* substring, line 178 */
551 if (!(among_var)) return 0;
552 z->bra = z->c; /* ], line 178 */
553 { int ret = r_R2(z);
554 if (ret == 0) return 0; /* call R2, line 178 */
555 if (ret < 0) return ret;
556 }
557 switch(among_var) {
558 case 0: return 0;
559 case 1:
560 { int ret = slice_del(z); /* delete, line 181 */
561 if (ret < 0) return ret;
562 }
563 break;
564 }
565 return 1;
566}
567
568static int r_tidy_up(struct SN_env * z) {
569 int among_var;
570 z->ket = z->c; /* [, line 186 */
571 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((151011360 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
572 among_var = find_among_b(z, a_7, 4); /* substring, line 186 */
573 if (!(among_var)) return 0;
574 z->bra = z->c; /* ], line 186 */
575 switch(among_var) {
576 case 0: return 0;
577 case 1:
578 { int ret = slice_del(z); /* delete, line 190 */
579 if (ret < 0) return ret;
580 }
581 z->ket = z->c; /* [, line 191 */
582 if (!(eq_s_b(z, 1, s_6))) return 0;
583 z->bra = z->c; /* ], line 191 */
584 if (!(eq_s_b(z, 1, s_7))) return 0;
585 { int ret = slice_del(z); /* delete, line 191 */
586 if (ret < 0) return ret;
587 }
588 break;
589 case 2:
590 if (!(eq_s_b(z, 1, s_8))) return 0;
591 { int ret = slice_del(z); /* delete, line 194 */
592 if (ret < 0) return ret;
593 }
594 break;
595 case 3:
596 { int ret = slice_del(z); /* delete, line 196 */
597 if (ret < 0) return ret;
598 }
599 break;
600 }
601 return 1;
602}
603
604extern int russian_KOI8_R_stem(struct SN_env * z) {
605 { int c1 = z->c; /* do, line 203 */
606 { int ret = r_mark_regions(z);
607 if (ret == 0) goto lab0; /* call mark_regions, line 203 */
608 if (ret < 0) return ret;
609 }
610 lab0:
611 z->c = c1;
612 }
613 z->lb = z->c; z->c = z->l; /* backwards, line 204 */
614
615 { int mlimit; /* setlimit, line 204 */
616 int m2 = z->l - z->c; (void)m2;
617 if (z->c < z->I[0]) return 0;
618 z->c = z->I[0]; /* tomark, line 204 */
619 mlimit = z->lb; z->lb = z->c;
620 z->c = z->l - m2;
621 { int m3 = z->l - z->c; (void)m3; /* do, line 205 */
622 { int m4 = z->l - z->c; (void)m4; /* or, line 206 */
623 { int ret = r_perfective_gerund(z);
624 if (ret == 0) goto lab3; /* call perfective_gerund, line 206 */
625 if (ret < 0) return ret;
626 }
627 goto lab2;
628 lab3:
629 z->c = z->l - m4;
630 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 207 */
631 { int ret = r_reflexive(z);
632 if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call reflexive, line 207 */
633 if (ret < 0) return ret;
634 }
635 lab4:
636 ;
637 }
638 { int m5 = z->l - z->c; (void)m5; /* or, line 208 */
639 { int ret = r_adjectival(z);
640 if (ret == 0) goto lab6; /* call adjectival, line 208 */
641 if (ret < 0) return ret;
642 }
643 goto lab5;
644 lab6:
645 z->c = z->l - m5;
646 { int ret = r_verb(z);
647 if (ret == 0) goto lab7; /* call verb, line 208 */
648 if (ret < 0) return ret;
649 }
650 goto lab5;
651 lab7:
652 z->c = z->l - m5;
653 { int ret = r_noun(z);
654 if (ret == 0) goto lab1; /* call noun, line 208 */
655 if (ret < 0) return ret;
656 }
657 }
658 lab5:
659 ;
660 }
661 lab2:
662 lab1:
663 z->c = z->l - m3;
664 }
665 { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 211 */
666 z->ket = z->c; /* [, line 211 */
667 if (!(eq_s_b(z, 1, s_9))) { z->c = z->l - m_keep; goto lab8; }
668 z->bra = z->c; /* ], line 211 */
669 { int ret = slice_del(z); /* delete, line 211 */
670 if (ret < 0) return ret;
671 }
672 lab8:
673 ;
674 }
675 { int m6 = z->l - z->c; (void)m6; /* do, line 214 */
676 { int ret = r_derivational(z);
677 if (ret == 0) goto lab9; /* call derivational, line 214 */
678 if (ret < 0) return ret;
679 }
680 lab9:
681 z->c = z->l - m6;
682 }
683 { int m7 = z->l - z->c; (void)m7; /* do, line 215 */
684 { int ret = r_tidy_up(z);
685 if (ret == 0) goto lab10; /* call tidy_up, line 215 */
686 if (ret < 0) return ret;
687 }
688 lab10:
689 z->c = z->l - m7;
690 }
691 z->lb = mlimit;
692 }
693 z->c = z->lb;
694 return 1;
695}
696
697extern struct SN_env * russian_KOI8_R_create_env(void) { return SN_create_env(0, 2, 0); }
698
699extern void russian_KOI8_R_close_env(struct SN_env * z) { SN_close_env(z, 0); }
700
struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
Definition api.c:5
void SN_close_env(struct SN_env *z, int S_size)
Definition api.c:42
unsigned char symbol
Definition api.h:2
int find_among_b(struct SN_env *z, const struct among *v, int v_size)
Definition utilities.c:272
int slice_del(struct SN_env *z)
Definition utilities.c:406
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:146
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:199
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:170
static const struct among a_2[5]
static const symbol s_0_2[4]
static const symbol s_2[]
static const struct among a_0[32]
static const symbol s_1_2[2]
static const symbol s_2_3[3]
static const symbol s_2_0[2]
static const struct among a_1[4]
static const symbol s_1_3[2]
static const symbol s_2_1[3]
static const symbol s_1_0[2]
static const symbol s_0_5[4]
static const symbol s_2_2[4]
static const symbol s_2_4[4]
static const symbol s_0_1[5]
static const symbol s_1_1[2]
static const symbol s_0_0[3]
static const symbol s_1[]
static const symbol s_0_3[1]
static const symbol s_0_6[6]
static const symbol s_0_8[4]
static const symbol s_0_7[3]
static const unsigned char g_v[]
static const symbol s_0[]
static const symbol s_0_4[5]
static const struct among a_5[4]
static const symbol s_4[]
static const symbol s_5_3[2]
static const symbol s_4_3[4]
static const symbol s_3_1[2]
static const symbol s_5_0[2]
static const symbol s_4_1[2]
static const symbol s_4_4[4]
static const struct among a_4[6]
static const symbol s_6[]
static const symbol s_3[]
static const symbol s_3_0[3]
static const symbol s_7[]
static const symbol s_4_5[3]
static const symbol s_5_2[2]
static const struct among a_3[5]
static const symbol s_5_1[2]
static const symbol s_8[]
static const symbol s_9[]
static const symbol s_5[]
static const symbol s_4_2[3]
static const symbol s_4_0[3]
static const symbol s_2_5[2]
static const symbol s_5_23[7]
static const symbol s_5_6[4]
static const symbol s_5_16[5]
static const struct among a_7[18]
static const symbol s_5_21[7]
static const symbol s_5_10[5]
static const symbol s_7_1[4]
static const struct among a_6[9]
static const symbol s_5_12[6]
static const symbol s_5_11[5]
static const symbol s_5_17[5]
static const symbol s_7_0[2]
static const symbol s_5_22[7]
static const symbol s_5_13[5]
static const symbol s_5_9[5]
static const symbol s_7_3[4]
static const symbol s_6_1[5]
static const symbol s_5_15[7]
static const symbol s_5_4[3]
static const symbol s_7_2[4]
static const symbol s_5_7[5]
static const symbol s_5_19[4]
static const symbol s_6_0[5]
static const symbol s_5_8[6]
static const symbol s_5_5[4]
static const symbol s_5_14[6]
static const symbol s_5_20[4]
static const symbol s_5_18[7]
static const symbol s_1_5[3]
static const symbol s_4_7[2]
static const symbol s_4_6[2]
static const symbol s_4_8[3]
static const symbol s_1_4[3]
static const symbol s_4_27[6]
static const symbol s_4_30[5]
static const symbol s_5_30[2]
static const symbol s_4_13[5]
static const symbol s_5_27[5]
static const symbol s_4_36[8]
static const symbol s_4_28[6]
static const symbol s_4_37[6]
static const symbol s_5_31[5]
static const symbol s_4_32[9]
static const symbol s_5_33[4]
static const symbol s_4_20[5]
static const symbol s_4_39[3]
static const symbol s_4_9[3]
static const symbol s_5_24[6]
static const symbol s_4_40[4]
static const symbol s_4_21[5]
static const symbol s_4_29[6]
static const symbol s_5_25[7]
static const symbol s_4_15[5]
static const symbol s_4_12[5]
static const symbol s_4_24[4]
static const symbol s_5_26[8]
static const symbol s_4_22[5]
static const symbol s_5_34[5]
static const symbol s_4_35[5]
static const symbol s_4_18[5]
static const symbol s_4_11[5]
static const symbol s_4_33[4]
static const symbol s_4_17[5]
static const symbol s_4_19[6]
static const symbol s_4_42[3]
static const symbol s_4_14[5]
static const symbol s_4_31[6]
static const symbol s_4_16[7]
static const symbol s_4_10[2]
static const symbol s_4_34[4]
static const symbol s_5_32[6]
static const symbol s_4_41[3]
static const symbol s_5_29[5]
static const symbol s_5_28[6]
static const symbol s_4_26[6]
static const symbol s_4_25[3]
static const symbol s_4_38[6]
static const symbol s_4_23[5]
static const symbol s_1_6[2]
static const symbol s_2_7[2]
static const symbol s_4_43[2]
static const symbol s_2_6[2]
static const symbol s_1_9[2]
static const symbol s_1_7[2]
static const symbol s_1_11[2]
static const symbol s_1_10[2]
static const symbol s_1_8[2]
static const symbol s_1_12[2]
static const symbol s_5_35[7]
static const symbol s_1_14[4]
static const symbol s_4_44[5]
static const symbol s_4_45[6]
static const symbol s_1_15[5]
static const symbol s_1_13[4]
static const symbol s_1_19[2]
static int r_adjective(struct SN_env *z)
static const symbol s_1_24[3]
static int r_tidy_up(struct SN_env *z)
static const symbol s_1_23[2]
static const symbol s_1_18[2]
static int r_adjectival(struct SN_env *z)
static int r_verb(struct SN_env *z)
void russian_KOI8_R_close_env(struct SN_env *z)
static int r_R2(struct SN_env *z)
static int r_derivational(struct SN_env *z)
static const symbol s_1_21[3]
int russian_KOI8_R_stem(struct SN_env *z)
static int r_perfective_gerund(struct SN_env *z)
static const symbol s_1_17[2]
static int r_mark_regions(struct SN_env *z)
static const symbol s_1_16[2]
static const symbol s_1_25[3]
static const symbol s_1_22[2]
static const symbol s_1_20[3]
static int r_reflexive(struct SN_env *z)
static int r_noun(struct SN_env *z)
struct SN_env * russian_KOI8_R_create_env(void)
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