1/* This file was generated automatically by the Snowball to ISO C compiler */
2/* http://snowballstem.org/ */
3
4#include "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[] = { 0xC5 };
344
345static int r_mark_regions(struct SN_env * z) { /* forwardmode */
346 z->I[0] = z->l; /* $pV = <integer expression>, line 61 */
347 z->I[1] = z->l; /* $p2 = <integer expression>, line 62 */
348 { int c1 = z->c; /* do, line 63 */
349 { /* gopast */ /* grouping v, line 64 */
350 int ret = out_grouping(z, g_v, 192, 220, 1);
351 if (ret < 0) goto lab0;
352 z->c += ret;
353 }
354 z->I[0] = z->c; /* setmark pV, line 64 */
355 { /* gopast */ /* non v, line 64 */
356 int ret = in_grouping(z, g_v, 192, 220, 1);
357 if (ret < 0) goto lab0;
358 z->c += ret;
359 }
360 { /* gopast */ /* grouping v, line 65 */
361 int ret = out_grouping(z, g_v, 192, 220, 1);
362 if (ret < 0) goto lab0;
363 z->c += ret;
364 }
365 { /* gopast */ /* non v, line 65 */
366 int ret = in_grouping(z, g_v, 192, 220, 1);
367 if (ret < 0) goto lab0;
368 z->c += ret;
369 }
370 z->I[1] = z->c; /* setmark p2, line 65 */
371 lab0:
372 z->c = c1;
373 }
374 return 1;
375}
376
377static int r_R2(struct SN_env * z) { /* backwardmode */
378 if (!(z->I[1] <= z->c)) return 0; /* $(<integer expression> <= <integer expression>), line 71 */
379 return 1;
380}
381
382static int r_perfective_gerund(struct SN_env * z) { /* backwardmode */
383 int among_var;
384 z->ket = z->c; /* [, line 74 */
385 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((25166336 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 74 */
386 among_var = find_among_b(z, a_0, 9);
387 if (!(among_var)) return 0;
388 z->bra = z->c; /* ], line 74 */
389 switch (among_var) { /* among, line 74 */
390 case 1:
391 { int m1 = z->l - z->c; (void)m1; /* or, line 78 */
392 if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab1; /* literal, line 78 */
393 z->c--;
394 goto lab0;
395 lab1:
396 z->c = z->l - m1;
397 if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) return 0; /* literal, line 78 */
398 z->c--;
399 }
400 lab0:
401 { int ret = slice_del(z); /* delete, line 78 */
402 if (ret < 0) return ret;
403 }
404 break;
405 case 2:
406 { int ret = slice_del(z); /* delete, line 85 */
407 if (ret < 0) return ret;
408 }
409 break;
410 }
411 return 1;
412}
413
414static int r_adjective(struct SN_env * z) { /* backwardmode */
415 z->ket = z->c; /* [, line 90 */
416 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((2271009 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 90 */
417 if (!(find_among_b(z, a_1, 26))) return 0;
418 z->bra = z->c; /* ], line 90 */
419 { int ret = slice_del(z); /* delete, line 99 */
420 if (ret < 0) return ret;
421 }
422 return 1;
423}
424
425static int r_adjectival(struct SN_env * z) { /* backwardmode */
426 int among_var;
427 { int ret = r_adjective(z); /* call adjective, line 104 */
428 if (ret <= 0) return ret;
429 }
430 { int m1 = z->l - z->c; (void)m1; /* try, line 111 */
431 z->ket = z->c; /* [, line 112 */
432 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->c = z->l - m1; goto lab0; } /* substring, line 112 */
433 among_var = find_among_b(z, a_2, 8);
434 if (!(among_var)) { z->c = z->l - m1; goto lab0; }
435 z->bra = z->c; /* ], line 112 */
436 switch (among_var) { /* among, line 112 */
437 case 1:
438 { int m2 = z->l - z->c; (void)m2; /* or, line 117 */
439 if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab2; /* literal, line 117 */
440 z->c--;
441 goto lab1;
442 lab2:
443 z->c = z->l - m2;
444 if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) { z->c = z->l - m1; goto lab0; } /* literal, line 117 */
445 z->c--;
446 }
447 lab1:
448 { int ret = slice_del(z); /* delete, line 117 */
449 if (ret < 0) return ret;
450 }
451 break;
452 case 2:
453 { int ret = slice_del(z); /* delete, line 124 */
454 if (ret < 0) return ret;
455 }
456 break;
457 }
458 lab0:
459 ;
460 }
461 return 1;
462}
463
464static int r_reflexive(struct SN_env * z) { /* backwardmode */
465 z->ket = z->c; /* [, line 131 */
466 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 209 && z->p[z->c - 1] != 216)) return 0; /* substring, line 131 */
467 if (!(find_among_b(z, a_3, 2))) return 0;
468 z->bra = z->c; /* ], line 131 */
469 { int ret = slice_del(z); /* delete, line 134 */
470 if (ret < 0) return ret;
471 }
472 return 1;
473}
474
475static int r_verb(struct SN_env * z) { /* backwardmode */
476 int among_var;
477 z->ket = z->c; /* [, line 139 */
478 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((51443235 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 139 */
479 among_var = find_among_b(z, a_4, 46);
480 if (!(among_var)) return 0;
481 z->bra = z->c; /* ], line 139 */
482 switch (among_var) { /* among, line 139 */
483 case 1:
484 { int m1 = z->l - z->c; (void)m1; /* or, line 145 */
485 if (z->c <= z->lb || z->p[z->c - 1] != 0xC1) goto lab1; /* literal, line 145 */
486 z->c--;
487 goto lab0;
488 lab1:
489 z->c = z->l - m1;
490 if (z->c <= z->lb || z->p[z->c - 1] != 0xD1) return 0; /* literal, line 145 */
491 z->c--;
492 }
493 lab0:
494 { int ret = slice_del(z); /* delete, line 145 */
495 if (ret < 0) return ret;
496 }
497 break;
498 case 2:
499 { int ret = slice_del(z); /* delete, line 153 */
500 if (ret < 0) return ret;
501 }
502 break;
503 }
504 return 1;
505}
506
507static int r_noun(struct SN_env * z) { /* backwardmode */
508 z->ket = z->c; /* [, line 162 */
509 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((60991267 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 162 */
510 if (!(find_among_b(z, a_5, 36))) return 0;
511 z->bra = z->c; /* ], line 162 */
512 { int ret = slice_del(z); /* delete, line 169 */
513 if (ret < 0) return ret;
514 }
515 return 1;
516}
517
518static int r_derivational(struct SN_env * z) { /* backwardmode */
519 z->ket = z->c; /* [, line 178 */
520 if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 212 && z->p[z->c - 1] != 216)) return 0; /* substring, line 178 */
521 if (!(find_among_b(z, a_6, 2))) return 0;
522 z->bra = z->c; /* ], line 178 */
523 { int ret = r_R2(z); /* call R2, line 178 */
524 if (ret <= 0) return ret;
525 }
526 { int ret = slice_del(z); /* delete, line 181 */
527 if (ret < 0) return ret;
528 }
529 return 1;
530}
531
532static int r_tidy_up(struct SN_env * z) { /* backwardmode */
533 int among_var;
534 z->ket = z->c; /* [, line 186 */
535 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6 || !((151011360 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 186 */
536 among_var = find_among_b(z, a_7, 4);
537 if (!(among_var)) return 0;
538 z->bra = z->c; /* ], line 186 */
539 switch (among_var) { /* among, line 186 */
540 case 1:
541 { int ret = slice_del(z); /* delete, line 190 */
542 if (ret < 0) return ret;
543 }
544 z->ket = z->c; /* [, line 191 */
545 if (z->c <= z->lb || z->p[z->c - 1] != 0xCE) return 0; /* literal, line 191 */
546 z->c--;
547 z->bra = z->c; /* ], line 191 */
548 if (z->c <= z->lb || z->p[z->c - 1] != 0xCE) return 0; /* literal, line 191 */
549 z->c--;
550 { int ret = slice_del(z); /* delete, line 191 */
551 if (ret < 0) return ret;
552 }
553 break;
554 case 2:
555 if (z->c <= z->lb || z->p[z->c - 1] != 0xCE) return 0; /* literal, line 194 */
556 z->c--;
557 { int ret = slice_del(z); /* delete, line 194 */
558 if (ret < 0) return ret;
559 }
560 break;
561 case 3:
562 { int ret = slice_del(z); /* delete, line 196 */
563 if (ret < 0) return ret;
564 }
565 break;
566 }
567 return 1;
568}
569
570extern int russian_KOI8_R_stem(struct SN_env * z) { /* forwardmode */
571 { int c1 = z->c; /* do, line 205 */
572 while(1) { /* repeat, line 205 */
573 int c2 = z->c;
574 while(1) { /* goto, line 205 */
575 int c3 = z->c;
576 z->bra = z->c; /* [, line 205 */
577 if (z->c == z->l || z->p[z->c] != 0xA3) goto lab2; /* literal, line 205 */
578 z->c++;
579 z->ket = z->c; /* ], line 205 */
580 z->c = c3;
581 break;
582 lab2:
583 z->c = c3;
584 if (z->c >= z->l) goto lab1;
585 z->c++; /* goto, line 205 */
586 }
587 { int ret = slice_from_s(z, 1, s_0); /* <-, line 205 */
588 if (ret < 0) return ret;
589 }
590 continue;
591 lab1:
592 z->c = c2;
593 break;
594 }
595 z->c = c1;
596 }
597 /* do, line 207 */
598 { int ret = r_mark_regions(z); /* call mark_regions, line 207 */
599 if (ret == 0) goto lab3;
600 if (ret < 0) return ret;
601 }
602lab3:
603 z->lb = z->c; z->c = z->l; /* backwards, line 208 */
604
605
606 { int mlimit4; /* setlimit, line 208 */
607 if (z->c < z->I[0]) return 0;
608 mlimit4 = z->lb; z->lb = z->I[0];
609 { int m5 = z->l - z->c; (void)m5; /* do, line 209 */
610 { int m6 = z->l - z->c; (void)m6; /* or, line 210 */
611 { int ret = r_perfective_gerund(z); /* call perfective_gerund, line 210 */
612 if (ret == 0) goto lab6;
613 if (ret < 0) return ret;
614 }
615 goto lab5;
616 lab6:
617 z->c = z->l - m6;
618 { int m7 = z->l - z->c; (void)m7; /* try, line 211 */
619 { int ret = r_reflexive(z); /* call reflexive, line 211 */
620 if (ret == 0) { z->c = z->l - m7; goto lab7; }
621 if (ret < 0) return ret;
622 }
623 lab7:
624 ;
625 }
626 { int m8 = z->l - z->c; (void)m8; /* or, line 212 */
627 { int ret = r_adjectival(z); /* call adjectival, line 212 */
628 if (ret == 0) goto lab9;
629 if (ret < 0) return ret;
630 }
631 goto lab8;
632 lab9:
633 z->c = z->l - m8;
634 { int ret = r_verb(z); /* call verb, line 212 */
635 if (ret == 0) goto lab10;
636 if (ret < 0) return ret;
637 }
638 goto lab8;
639 lab10:
640 z->c = z->l - m8;
641 { int ret = r_noun(z); /* call noun, line 212 */
642 if (ret == 0) goto lab4;
643 if (ret < 0) return ret;
644 }
645 }
646 lab8:
647 ;
648 }
649 lab5:
650 lab4:
651 z->c = z->l - m5;
652 }
653 { int m9 = z->l - z->c; (void)m9; /* try, line 215 */
654 z->ket = z->c; /* [, line 215 */
655 if (z->c <= z->lb || z->p[z->c - 1] != 0xC9) { z->c = z->l - m9; goto lab11; } /* literal, line 215 */
656 z->c--;
657 z->bra = z->c; /* ], line 215 */
658 { int ret = slice_del(z); /* delete, line 215 */
659 if (ret < 0) return ret;
660 }
661 lab11:
662 ;
663 }
664 { int m10 = z->l - z->c; (void)m10; /* do, line 218 */
665 { int ret = r_derivational(z); /* call derivational, line 218 */
666 if (ret == 0) goto lab12;
667 if (ret < 0) return ret;
668 }
669 lab12:
670 z->c = z->l - m10;
671 }
672 { int m11 = z->l - z->c; (void)m11; /* do, line 219 */
673 { int ret = r_tidy_up(z); /* call tidy_up, line 219 */
674 if (ret == 0) goto lab13;
675 if (ret < 0) return ret;
676 }
677 lab13:
678 z->c = z->l - m11;
679 }
680 z->lb = mlimit4;
681 }
682 z->c = z->lb;
683 return 1;
684}
685
686extern struct SN_env * russian_KOI8_R_create_env(void) { return SN_create_env(0, 2, 0); }
687
688extern void russian_KOI8_R_close_env(struct SN_env * z) { SN_close_env(z, 0); }
689
690