YAZ 5.35.1
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{
9#endif
10 extern int russian_KOI8_R_stem (struct SN_env *z);
11#ifdef __cplusplus
12}
13#endif
14static int r_tidy_up (struct SN_env *z);
15static int r_derivational (struct SN_env *z);
16static int r_noun (struct SN_env *z);
17static int r_verb (struct SN_env *z);
18static int r_reflexive (struct SN_env *z);
19static int r_adjectival (struct SN_env *z);
20static int r_adjective (struct SN_env *z);
21static int r_perfective_gerund (struct SN_env *z);
22static int r_R2 (struct SN_env *z);
23static int r_mark_regions (struct SN_env *z);
24#ifdef __cplusplus
25extern "C"
26{
27#endif
28
29
30 extern struct SN_env *russian_KOI8_R_create_env (void);
31 extern void russian_KOI8_R_close_env (struct SN_env *z);
32
33
34#ifdef __cplusplus
35}
36#endif
37static const symbol s_0_0[3] = { 0xD7, 0xDB, 0xC9 };
38static const symbol s_0_1[4] = { 0xC9, 0xD7, 0xDB, 0xC9 };
39static const symbol s_0_2[4] = { 0xD9, 0xD7, 0xDB, 0xC9 };
40static const symbol s_0_3[1] = { 0xD7 };
41static const symbol s_0_4[2] = { 0xC9, 0xD7 };
42static const symbol s_0_5[2] = { 0xD9, 0xD7 };
43static const symbol s_0_6[5] = { 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
44static const symbol s_0_7[6] = { 0xC9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
45static const symbol s_0_8[6] = { 0xD9, 0xD7, 0xDB, 0xC9, 0xD3, 0xD8 };
46
47static const struct among a_0[9] = {
48/* 0 */ {3, s_0_0, -1, 1, 0},
49/* 1 */ {4, s_0_1, 0, 2, 0},
50/* 2 */ {4, s_0_2, 0, 2, 0},
51/* 3 */ {1, s_0_3, -1, 1, 0},
52/* 4 */ {2, s_0_4, 3, 2, 0},
53/* 5 */ {2, s_0_5, 3, 2, 0},
54/* 6 */ {5, s_0_6, -1, 1, 0},
55/* 7 */ {6, s_0_7, 6, 2, 0},
56/* 8 */ {6, s_0_8, 6, 2, 0}
57};
58
59static const symbol s_1_0[2] = { 0xC0, 0xC0 };
60static const symbol s_1_1[2] = { 0xC5, 0xC0 };
61static const symbol s_1_2[2] = { 0xCF, 0xC0 };
62static const symbol s_1_3[2] = { 0xD5, 0xC0 };
63static const symbol s_1_4[2] = { 0xC5, 0xC5 };
64static const symbol s_1_5[2] = { 0xC9, 0xC5 };
65static const symbol s_1_6[2] = { 0xCF, 0xC5 };
66static const symbol s_1_7[2] = { 0xD9, 0xC5 };
67static const symbol s_1_8[2] = { 0xC9, 0xC8 };
68static const symbol s_1_9[2] = { 0xD9, 0xC8 };
69static const symbol s_1_10[3] = { 0xC9, 0xCD, 0xC9 };
70static const symbol s_1_11[3] = { 0xD9, 0xCD, 0xC9 };
71static const symbol s_1_12[2] = { 0xC5, 0xCA };
72static const symbol s_1_13[2] = { 0xC9, 0xCA };
73static const symbol s_1_14[2] = { 0xCF, 0xCA };
74static const symbol s_1_15[2] = { 0xD9, 0xCA };
75static const symbol s_1_16[2] = { 0xC5, 0xCD };
76static const symbol s_1_17[2] = { 0xC9, 0xCD };
77static const symbol s_1_18[2] = { 0xCF, 0xCD };
78static const symbol s_1_19[2] = { 0xD9, 0xCD };
79static const symbol s_1_20[3] = { 0xC5, 0xC7, 0xCF };
80static const symbol s_1_21[3] = { 0xCF, 0xC7, 0xCF };
81static const symbol s_1_22[2] = { 0xC1, 0xD1 };
82static const symbol s_1_23[2] = { 0xD1, 0xD1 };
83static const symbol s_1_24[3] = { 0xC5, 0xCD, 0xD5 };
84static const symbol s_1_25[3] = { 0xCF, 0xCD, 0xD5 };
85
86static const struct among a_1[26] = {
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/* 0 */ {2, s_2_0, -1, 1, 0},
126/* 1 */ {2, s_2_1, -1, 1, 0},
127/* 2 */ {2, s_2_2, -1, 1, 0},
128/* 3 */ {3, s_2_3, 2, 2, 0},
129/* 4 */ {3, s_2_4, 2, 2, 0},
130/* 5 */ {1, s_2_5, -1, 1, 0},
131/* 6 */ {2, s_2_6, 5, 1, 0},
132/* 7 */ {3, s_2_7, 6, 2, 0}
133};
134
135static const symbol s_3_0[2] = { 0xD3, 0xD1 };
136static const symbol s_3_1[2] = { 0xD3, 0xD8 };
137
138static const struct among a_3[2] = {
139/* 0 */ {2, s_3_0, -1, 1, 0},
140/* 1 */ {2, s_3_1, -1, 1, 0}
141};
142
143static const symbol s_4_0[1] = { 0xC0 };
144static const symbol s_4_1[2] = { 0xD5, 0xC0 };
145static const symbol s_4_2[2] = { 0xCC, 0xC1 };
146static const symbol s_4_3[3] = { 0xC9, 0xCC, 0xC1 };
147static const symbol s_4_4[3] = { 0xD9, 0xCC, 0xC1 };
148static const symbol s_4_5[2] = { 0xCE, 0xC1 };
149static const symbol s_4_6[3] = { 0xC5, 0xCE, 0xC1 };
150static const symbol s_4_7[3] = { 0xC5, 0xD4, 0xC5 };
151static const symbol s_4_8[3] = { 0xC9, 0xD4, 0xC5 };
152static const symbol s_4_9[3] = { 0xCA, 0xD4, 0xC5 };
153static const symbol s_4_10[4] = { 0xC5, 0xCA, 0xD4, 0xC5 };
154static const symbol s_4_11[4] = { 0xD5, 0xCA, 0xD4, 0xC5 };
155static const symbol s_4_12[2] = { 0xCC, 0xC9 };
156static const symbol s_4_13[3] = { 0xC9, 0xCC, 0xC9 };
157static const symbol s_4_14[3] = { 0xD9, 0xCC, 0xC9 };
158static const symbol s_4_15[1] = { 0xCA };
159static const symbol s_4_16[2] = { 0xC5, 0xCA };
160static const symbol s_4_17[2] = { 0xD5, 0xCA };
161static const symbol s_4_18[1] = { 0xCC };
162static const symbol s_4_19[2] = { 0xC9, 0xCC };
163static const symbol s_4_20[2] = { 0xD9, 0xCC };
164static const symbol s_4_21[2] = { 0xC5, 0xCD };
165static const symbol s_4_22[2] = { 0xC9, 0xCD };
166static const symbol s_4_23[2] = { 0xD9, 0xCD };
167static const symbol s_4_24[1] = { 0xCE };
168static const symbol s_4_25[2] = { 0xC5, 0xCE };
169static const symbol s_4_26[2] = { 0xCC, 0xCF };
170static const symbol s_4_27[3] = { 0xC9, 0xCC, 0xCF };
171static const symbol s_4_28[3] = { 0xD9, 0xCC, 0xCF };
172static const symbol s_4_29[2] = { 0xCE, 0xCF };
173static const symbol s_4_30[3] = { 0xC5, 0xCE, 0xCF };
174static const symbol s_4_31[3] = { 0xCE, 0xCE, 0xCF };
175static const symbol s_4_32[2] = { 0xC0, 0xD4 };
176static const symbol s_4_33[3] = { 0xD5, 0xC0, 0xD4 };
177static const symbol s_4_34[2] = { 0xC5, 0xD4 };
178static const symbol s_4_35[3] = { 0xD5, 0xC5, 0xD4 };
179static const symbol s_4_36[2] = { 0xC9, 0xD4 };
180static const symbol s_4_37[2] = { 0xD1, 0xD4 };
181static const symbol s_4_38[2] = { 0xD9, 0xD4 };
182static const symbol s_4_39[2] = { 0xD4, 0xD8 };
183static const symbol s_4_40[3] = { 0xC9, 0xD4, 0xD8 };
184static const symbol s_4_41[3] = { 0xD9, 0xD4, 0xD8 };
185static const symbol s_4_42[3] = { 0xC5, 0xDB, 0xD8 };
186static const symbol s_4_43[3] = { 0xC9, 0xDB, 0xD8 };
187static const symbol s_4_44[2] = { 0xCE, 0xD9 };
188static const symbol s_4_45[3] = { 0xC5, 0xCE, 0xD9 };
189
190static const struct among a_4[46] = {
191/* 0 */ {1, s_4_0, -1, 2, 0},
192/* 1 */ {2, s_4_1, 0, 2, 0},
193/* 2 */ {2, s_4_2, -1, 1, 0},
194/* 3 */ {3, s_4_3, 2, 2, 0},
195/* 4 */ {3, s_4_4, 2, 2, 0},
196/* 5 */ {2, s_4_5, -1, 1, 0},
197/* 6 */ {3, s_4_6, 5, 2, 0},
198/* 7 */ {3, s_4_7, -1, 1, 0},
199/* 8 */ {3, s_4_8, -1, 2, 0},
200/* 9 */ {3, s_4_9, -1, 1, 0},
201/* 10 */ {4, s_4_10, 9, 2, 0},
202/* 11 */ {4, s_4_11, 9, 2, 0},
203/* 12 */ {2, s_4_12, -1, 1, 0},
204/* 13 */ {3, s_4_13, 12, 2, 0},
205/* 14 */ {3, s_4_14, 12, 2, 0},
206/* 15 */ {1, s_4_15, -1, 1, 0},
207/* 16 */ {2, s_4_16, 15, 2, 0},
208/* 17 */ {2, s_4_17, 15, 2, 0},
209/* 18 */ {1, s_4_18, -1, 1, 0},
210/* 19 */ {2, s_4_19, 18, 2, 0},
211/* 20 */ {2, s_4_20, 18, 2, 0},
212/* 21 */ {2, s_4_21, -1, 1, 0},
213/* 22 */ {2, s_4_22, -1, 2, 0},
214/* 23 */ {2, s_4_23, -1, 2, 0},
215/* 24 */ {1, s_4_24, -1, 1, 0},
216/* 25 */ {2, s_4_25, 24, 2, 0},
217/* 26 */ {2, s_4_26, -1, 1, 0},
218/* 27 */ {3, s_4_27, 26, 2, 0},
219/* 28 */ {3, s_4_28, 26, 2, 0},
220/* 29 */ {2, s_4_29, -1, 1, 0},
221/* 30 */ {3, s_4_30, 29, 2, 0},
222/* 31 */ {3, s_4_31, 29, 1, 0},
223/* 32 */ {2, s_4_32, -1, 1, 0},
224/* 33 */ {3, s_4_33, 32, 2, 0},
225/* 34 */ {2, s_4_34, -1, 1, 0},
226/* 35 */ {3, s_4_35, 34, 2, 0},
227/* 36 */ {2, s_4_36, -1, 2, 0},
228/* 37 */ {2, s_4_37, -1, 2, 0},
229/* 38 */ {2, s_4_38, -1, 2, 0},
230/* 39 */ {2, s_4_39, -1, 1, 0},
231/* 40 */ {3, s_4_40, 39, 2, 0},
232/* 41 */ {3, s_4_41, 39, 2, 0},
233/* 42 */ {3, s_4_42, -1, 1, 0},
234/* 43 */ {3, s_4_43, -1, 2, 0},
235/* 44 */ {2, s_4_44, -1, 1, 0},
236/* 45 */ {3, s_4_45, 44, 2, 0}
237};
238
239static const symbol s_5_0[1] = { 0xC0 };
240static const symbol s_5_1[2] = { 0xC9, 0xC0 };
241static const symbol s_5_2[2] = { 0xD8, 0xC0 };
242static const symbol s_5_3[1] = { 0xC1 };
243static const symbol s_5_4[1] = { 0xC5 };
244static const symbol s_5_5[2] = { 0xC9, 0xC5 };
245static const symbol s_5_6[2] = { 0xD8, 0xC5 };
246static const symbol s_5_7[2] = { 0xC1, 0xC8 };
247static const symbol s_5_8[2] = { 0xD1, 0xC8 };
248static const symbol s_5_9[3] = { 0xC9, 0xD1, 0xC8 };
249static const symbol s_5_10[1] = { 0xC9 };
250static const symbol s_5_11[2] = { 0xC5, 0xC9 };
251static const symbol s_5_12[2] = { 0xC9, 0xC9 };
252static const symbol s_5_13[3] = { 0xC1, 0xCD, 0xC9 };
253static const symbol s_5_14[3] = { 0xD1, 0xCD, 0xC9 };
254static const symbol s_5_15[4] = { 0xC9, 0xD1, 0xCD, 0xC9 };
255static const symbol s_5_16[1] = { 0xCA };
256static const symbol s_5_17[2] = { 0xC5, 0xCA };
257static const symbol s_5_18[3] = { 0xC9, 0xC5, 0xCA };
258static const symbol s_5_19[2] = { 0xC9, 0xCA };
259static const symbol s_5_20[2] = { 0xCF, 0xCA };
260static const symbol s_5_21[2] = { 0xC1, 0xCD };
261static const symbol s_5_22[2] = { 0xC5, 0xCD };
262static const symbol s_5_23[3] = { 0xC9, 0xC5, 0xCD };
263static const symbol s_5_24[2] = { 0xCF, 0xCD };
264static const symbol s_5_25[2] = { 0xD1, 0xCD };
265static const symbol s_5_26[3] = { 0xC9, 0xD1, 0xCD };
266static const symbol s_5_27[1] = { 0xCF };
267static const symbol s_5_28[1] = { 0xD1 };
268static const symbol s_5_29[2] = { 0xC9, 0xD1 };
269static const symbol s_5_30[2] = { 0xD8, 0xD1 };
270static const symbol s_5_31[1] = { 0xD5 };
271static const symbol s_5_32[2] = { 0xC5, 0xD7 };
272static const symbol s_5_33[2] = { 0xCF, 0xD7 };
273static const symbol s_5_34[1] = { 0xD8 };
274static const symbol s_5_35[1] = { 0xD9 };
275
276static const struct among a_5[36] = {
277/* 0 */ {1, s_5_0, -1, 1, 0},
278/* 1 */ {2, s_5_1, 0, 1, 0},
279/* 2 */ {2, s_5_2, 0, 1, 0},
280/* 3 */ {1, s_5_3, -1, 1, 0},
281/* 4 */ {1, s_5_4, -1, 1, 0},
282/* 5 */ {2, s_5_5, 4, 1, 0},
283/* 6 */ {2, s_5_6, 4, 1, 0},
284/* 7 */ {2, s_5_7, -1, 1, 0},
285/* 8 */ {2, s_5_8, -1, 1, 0},
286/* 9 */ {3, s_5_9, 8, 1, 0},
287/* 10 */ {1, s_5_10, -1, 1, 0},
288/* 11 */ {2, s_5_11, 10, 1, 0},
289/* 12 */ {2, s_5_12, 10, 1, 0},
290/* 13 */ {3, s_5_13, 10, 1, 0},
291/* 14 */ {3, s_5_14, 10, 1, 0},
292/* 15 */ {4, s_5_15, 14, 1, 0},
293/* 16 */ {1, s_5_16, -1, 1, 0},
294/* 17 */ {2, s_5_17, 16, 1, 0},
295/* 18 */ {3, s_5_18, 17, 1, 0},
296/* 19 */ {2, s_5_19, 16, 1, 0},
297/* 20 */ {2, s_5_20, 16, 1, 0},
298/* 21 */ {2, s_5_21, -1, 1, 0},
299/* 22 */ {2, s_5_22, -1, 1, 0},
300/* 23 */ {3, s_5_23, 22, 1, 0},
301/* 24 */ {2, s_5_24, -1, 1, 0},
302/* 25 */ {2, s_5_25, -1, 1, 0},
303/* 26 */ {3, s_5_26, 25, 1, 0},
304/* 27 */ {1, s_5_27, -1, 1, 0},
305/* 28 */ {1, s_5_28, -1, 1, 0},
306/* 29 */ {2, s_5_29, 28, 1, 0},
307/* 30 */ {2, s_5_30, 28, 1, 0},
308/* 31 */ {1, s_5_31, -1, 1, 0},
309/* 32 */ {2, s_5_32, -1, 1, 0},
310/* 33 */ {2, s_5_33, -1, 1, 0},
311/* 34 */ {1, s_5_34, -1, 1, 0},
312/* 35 */ {1, s_5_35, -1, 1, 0}
313};
314
315static const symbol s_6_0[3] = { 0xCF, 0xD3, 0xD4 };
316static const symbol s_6_1[4] = { 0xCF, 0xD3, 0xD4, 0xD8 };
317
318static const struct among a_6[2] = {
319/* 0 */ {3, s_6_0, -1, 1, 0},
320/* 1 */ {4, s_6_1, -1, 1, 0}
321};
322
323static const symbol s_7_0[4] = { 0xC5, 0xCA, 0xDB, 0xC5 };
324static const symbol s_7_1[1] = { 0xCE };
325static const symbol s_7_2[1] = { 0xD8 };
326static const symbol s_7_3[3] = { 0xC5, 0xCA, 0xDB };
327
328static const struct among a_7[4] = {
329/* 0 */ {4, s_7_0, -1, 1, 0},
330/* 1 */ {1, s_7_1, -1, 2, 0},
331/* 2 */ {1, s_7_2, -1, 3, 0},
332/* 3 */ {3, s_7_3, -1, 1, 0}
333};
334
335static const unsigned char g_v[] = { 35, 130, 34, 18 };
336
337static const symbol s_0[] = { 0xC1 };
338static const symbol s_1[] = { 0xD1 };
339static const symbol s_2[] = { 0xC1 };
340static const symbol s_3[] = { 0xD1 };
341static const symbol s_4[] = { 0xC1 };
342static const symbol s_5[] = { 0xD1 };
343static const symbol s_6[] = { 0xCE };
344static const symbol s_7[] = { 0xCE };
345static const symbol s_8[] = { 0xCE };
346static const symbol s_9[] = { 0xC9 };
347
348static int
350{
351 z->I[0] = z->l;
352 z->I[1] = z->l;
353 {
354 int c1 = z->c; /* do, line 63 */
355 { /* gopast *//* grouping v, line 64 */
356 int ret = out_grouping (z, g_v, 192, 220, 1);
357 if (ret < 0)
358 goto lab0;
359 z->c += ret;
360 }
361 z->I[0] = z->c; /* setmark pV, line 64 */
362 { /* gopast *//* non v, line 64 */
363 int ret = in_grouping (z, g_v, 192, 220, 1);
364 if (ret < 0)
365 goto lab0;
366 z->c += ret;
367 }
368 { /* gopast *//* grouping v, line 65 */
369 int ret = out_grouping (z, g_v, 192, 220, 1);
370 if (ret < 0)
371 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)
377 goto lab0;
378 z->c += ret;
379 }
380 z->I[1] = z->c; /* setmark p2, line 65 */
381 lab0:
382 z->c = c1;
383 }
384 return 1;
385}
386
387static int
388r_R2 (struct SN_env *z)
389{
390 if (!(z->I[1] <= z->c))
391 return 0;
392 return 1;
393}
394
395static int
397{
398 int among_var;
399 z->ket = z->c; /* [, line 74 */
400 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6
401 || !((25166336 >> (z->p[z->c - 1] & 0x1f)) & 1))
402 return 0;
403 among_var = find_among_b (z, a_0, 9); /* substring, line 74 */
404 if (!(among_var))
405 return 0;
406 z->bra = z->c; /* ], line 74 */
407 switch (among_var)
408 {
409 case 0:
410 return 0;
411 case 1:
412 {
413 int m1 = z->l - z->c;
414 (void) m1; /* or, line 78 */
415 if (!(eq_s_b (z, 1, s_0)))
416 goto lab1;
417 goto lab0;
418 lab1:
419 z->c = z->l - m1;
420 if (!(eq_s_b (z, 1, s_1)))
421 return 0;
422 }
423 lab0:
424 {
425 int ret = slice_del (z); /* delete, line 78 */
426 if (ret < 0)
427 return ret;
428 }
429 break;
430 case 2:
431 {
432 int ret = slice_del (z); /* delete, line 85 */
433 if (ret < 0)
434 return ret;
435 }
436 break;
437 }
438 return 1;
439}
440
441static int
443{
444 int among_var;
445 z->ket = z->c; /* [, line 90 */
446 if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 6
447 || !((2271009 >> (z->p[z->c - 1] & 0x1f)) & 1))
448 return 0;
449 among_var = find_among_b (z, a_1, 26); /* substring, line 90 */
450 if (!(among_var))
451 return 0;
452 z->bra = z->c; /* ], line 90 */
453 switch (among_var)
454 {
455 case 0:
456 return 0;
457 case 1:
458 {
459 int ret = slice_del (z); /* delete, line 99 */
460 if (ret < 0)
461 return ret;
462 }
463 break;
464 }
465 return 1;
466}
467
468static int
470{
471 int among_var;
472 {
473 int ret = r_adjective (z);
474 if (ret == 0)
475 return 0; /* call adjective, line 104 */
476 if (ret < 0)
477 return ret;
478 }
479 {
480 int m_keep = z->l - z->c; /* (void) m_keep; *//* try, line 111 */
481 z->ket = z->c; /* [, line 112 */
482 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6
483 || !((671113216 >> (z->p[z->c - 1] & 0x1f)) & 1))
484 {
485 z->c = z->l - m_keep;
486 goto lab0;
487 }
488 among_var = find_among_b (z, a_2, 8); /* substring, line 112 */
489 if (!(among_var))
490 {
491 z->c = z->l - m_keep;
492 goto lab0;
493 }
494 z->bra = z->c; /* ], line 112 */
495 switch (among_var)
496 {
497 case 0:
498 {
499 z->c = z->l - m_keep;
500 goto lab0;
501 }
502 case 1:
503 {
504 int m1 = z->l - z->c;
505 (void) m1; /* or, line 117 */
506 if (!(eq_s_b (z, 1, s_2)))
507 goto lab2;
508 goto lab1;
509 lab2:
510 z->c = z->l - m1;
511 if (!(eq_s_b (z, 1, s_3)))
512 {
513 z->c = z->l - m_keep;
514 goto lab0;
515 }
516 }
517 lab1:
518 {
519 int ret = slice_del (z); /* delete, line 117 */
520 if (ret < 0)
521 return ret;
522 }
523 break;
524 case 2:
525 {
526 int ret = slice_del (z); /* delete, line 124 */
527 if (ret < 0)
528 return ret;
529 }
530 break;
531 }
532 lab0:
533 ;
534 }
535 return 1;
536}
537
538static int
540{
541 int among_var;
542 z->ket = z->c; /* [, line 131 */
543 if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 209 && z->p[z->c - 1] != 216))
544 return 0;
545 among_var = find_among_b (z, a_3, 2); /* substring, line 131 */
546 if (!(among_var))
547 return 0;
548 z->bra = z->c; /* ], line 131 */
549 switch (among_var)
550 {
551 case 0:
552 return 0;
553 case 1:
554 {
555 int ret = slice_del (z); /* delete, line 134 */
556 if (ret < 0)
557 return ret;
558 }
559 break;
560 }
561 return 1;
562}
563
564static int
565r_verb (struct SN_env *z)
566{
567 int among_var;
568 z->ket = z->c; /* [, line 139 */
569 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6
570 || !((51443235 >> (z->p[z->c - 1] & 0x1f)) & 1))
571 return 0;
572 among_var = find_among_b (z, a_4, 46); /* substring, line 139 */
573 if (!(among_var))
574 return 0;
575 z->bra = z->c; /* ], line 139 */
576 switch (among_var)
577 {
578 case 0:
579 return 0;
580 case 1:
581 {
582 int m1 = z->l - z->c;
583 (void) m1; /* or, line 145 */
584 if (!(eq_s_b (z, 1, s_4)))
585 goto lab1;
586 goto lab0;
587 lab1:
588 z->c = z->l - m1;
589 if (!(eq_s_b (z, 1, s_5)))
590 return 0;
591 }
592 lab0:
593 {
594 int ret = slice_del (z); /* delete, line 145 */
595 if (ret < 0)
596 return ret;
597 }
598 break;
599 case 2:
600 {
601 int ret = slice_del (z); /* delete, line 153 */
602 if (ret < 0)
603 return ret;
604 }
605 break;
606 }
607 return 1;
608}
609
610static int
611r_noun (struct SN_env *z)
612{
613 int among_var;
614 z->ket = z->c; /* [, line 162 */
615 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6
616 || !((60991267 >> (z->p[z->c - 1] & 0x1f)) & 1))
617 return 0;
618 among_var = find_among_b (z, a_5, 36); /* substring, line 162 */
619 if (!(among_var))
620 return 0;
621 z->bra = z->c; /* ], line 162 */
622 switch (among_var)
623 {
624 case 0:
625 return 0;
626 case 1:
627 {
628 int ret = slice_del (z); /* delete, line 169 */
629 if (ret < 0)
630 return ret;
631 }
632 break;
633 }
634 return 1;
635}
636
637static int
639{
640 int among_var;
641 z->ket = z->c; /* [, line 178 */
642 if (z->c - 2 <= z->lb || (z->p[z->c - 1] != 212 && z->p[z->c - 1] != 216))
643 return 0;
644 among_var = find_among_b (z, a_6, 2); /* substring, line 178 */
645 if (!(among_var))
646 return 0;
647 z->bra = z->c; /* ], line 178 */
648 {
649 int ret = r_R2 (z);
650 if (ret == 0)
651 return 0; /* call R2, line 178 */
652 if (ret < 0)
653 return ret;
654 }
655 switch (among_var)
656 {
657 case 0:
658 return 0;
659 case 1:
660 {
661 int ret = slice_del (z); /* delete, line 181 */
662 if (ret < 0)
663 return ret;
664 }
665 break;
666 }
667 return 1;
668}
669
670static int
671r_tidy_up (struct SN_env *z)
672{
673 int among_var;
674 z->ket = z->c; /* [, line 186 */
675 if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 6
676 || !((151011360 >> (z->p[z->c - 1] & 0x1f)) & 1))
677 return 0;
678 among_var = find_among_b (z, a_7, 4); /* substring, line 186 */
679 if (!(among_var))
680 return 0;
681 z->bra = z->c; /* ], line 186 */
682 switch (among_var)
683 {
684 case 0:
685 return 0;
686 case 1:
687 {
688 int ret = slice_del (z); /* delete, line 190 */
689 if (ret < 0)
690 return ret;
691 }
692 z->ket = z->c; /* [, line 191 */
693 if (!(eq_s_b (z, 1, s_6)))
694 return 0;
695 z->bra = z->c; /* ], line 191 */
696 if (!(eq_s_b (z, 1, s_7)))
697 return 0;
698 {
699 int ret = slice_del (z); /* delete, line 191 */
700 if (ret < 0)
701 return ret;
702 }
703 break;
704 case 2:
705 if (!(eq_s_b (z, 1, s_8)))
706 return 0;
707 {
708 int ret = slice_del (z); /* delete, line 194 */
709 if (ret < 0)
710 return ret;
711 }
712 break;
713 case 3:
714 {
715 int ret = slice_del (z); /* delete, line 196 */
716 if (ret < 0)
717 return ret;
718 }
719 break;
720 }
721 return 1;
722}
723
724extern int
726{
727 {
728 int c1 = z->c; /* do, line 203 */
729 {
730 int ret = r_mark_regions (z);
731 if (ret == 0)
732 goto lab0; /* call mark_regions, line 203 */
733 if (ret < 0)
734 return ret;
735 }
736 lab0:
737 z->c = c1;
738 }
739 z->lb = z->c;
740 z->c = z->l; /* backwards, line 204 */
741
742 {
743 int mlimit; /* setlimit, line 204 */
744 int m2 = z->l - z->c;
745 (void) m2;
746 if (z->c < z->I[0])
747 return 0;
748 z->c = z->I[0]; /* tomark, line 204 */
749 mlimit = z->lb;
750 z->lb = z->c;
751 z->c = z->l - m2;
752 {
753 int m3 = z->l - z->c;
754 (void) m3; /* do, line 205 */
755 {
756 int m4 = z->l - z->c;
757 (void) m4; /* or, line 206 */
758 {
759 int ret = r_perfective_gerund (z);
760 if (ret == 0)
761 goto lab3; /* call perfective_gerund, line 206 */
762 if (ret < 0)
763 return ret;
764 }
765 goto lab2;
766 lab3:
767 z->c = z->l - m4;
768 {
769 int m_keep = z->l - z->c; /* (void) m_keep; *//* try, line 207 */
770 {
771 int ret = r_reflexive (z);
772 if (ret == 0)
773 {
774 z->c = z->l - m_keep;
775 goto lab4;
776 } /* call reflexive, line 207 */
777 if (ret < 0)
778 return ret;
779 }
780 lab4:
781 ;
782 }
783 {
784 int m5 = z->l - z->c;
785 (void) m5; /* or, line 208 */
786 {
787 int ret = r_adjectival (z);
788 if (ret == 0)
789 goto lab6; /* call adjectival, line 208 */
790 if (ret < 0)
791 return ret;
792 }
793 goto lab5;
794 lab6:
795 z->c = z->l - m5;
796 {
797 int ret = r_verb (z);
798 if (ret == 0)
799 goto lab7; /* call verb, line 208 */
800 if (ret < 0)
801 return ret;
802 }
803 goto lab5;
804 lab7:
805 z->c = z->l - m5;
806 {
807 int ret = r_noun (z);
808 if (ret == 0)
809 goto lab1; /* call noun, line 208 */
810 if (ret < 0)
811 return ret;
812 }
813 }
814 lab5:
815 ;
816 }
817 lab2:
818 lab1:
819 z->c = z->l - m3;
820 }
821 {
822 int m_keep = z->l - z->c; /* (void) m_keep; *//* try, line 211 */
823 z->ket = z->c; /* [, line 211 */
824 if (!(eq_s_b (z, 1, s_9)))
825 {
826 z->c = z->l - m_keep;
827 goto lab8;
828 }
829 z->bra = z->c; /* ], line 211 */
830 {
831 int ret = slice_del (z); /* delete, line 211 */
832 if (ret < 0)
833 return ret;
834 }
835 lab8:
836 ;
837 }
838 {
839 int m6 = z->l - z->c;
840 (void) m6; /* do, line 214 */
841 {
842 int ret = r_derivational (z);
843 if (ret == 0)
844 goto lab9; /* call derivational, line 214 */
845 if (ret < 0)
846 return ret;
847 }
848 lab9:
849 z->c = z->l - m6;
850 }
851 {
852 int m7 = z->l - z->c;
853 (void) m7; /* do, line 215 */
854 {
855 int ret = r_tidy_up (z);
856 if (ret == 0)
857 goto lab10; /* call tidy_up, line 215 */
858 if (ret < 0)
859 return ret;
860 }
861 lab10:
862 z->c = z->l - m7;
863 }
864 z->lb = mlimit;
865 }
866 z->c = z->lb;
867 return 1;
868}
869
870extern struct SN_env *
872{
873 return SN_create_env (0, 2, 0);
874}
875
876extern void
878{
879 SN_close_env (z, 0);
880}
struct SN_env * SN_create_env(int S_size, int I_size, int B_size)
Definition api.c:6
void SN_close_env(struct SN_env *z, int S_size)
Definition api.c:50
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:400
int slice_del(struct SN_env *z)
Definition utilities.c:573
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:206
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition utilities.c:290
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition utilities.c:244
static const symbol s_4_3[3]
static const symbol s_0_2[4]
static const symbol s_1_5[2]
static const symbol s_1_19[2]
static const symbol s_2[]
static const symbol s_4_37[2]
static const symbol s_4_22[2]
static const symbol s_1_13[2]
static const struct among a_7[4]
static const symbol s_5_30[2]
static const symbol s_0_4[2]
static int r_adjective(struct SN_env *z)
static const struct among a_3[2]
static const symbol s_2_2[2]
static const symbol s_4_18[1]
static const symbol s_1_24[3]
static const symbol s_4_32[2]
static const symbol s_0_5[2]
static const symbol s_4[]
static const symbol s_1_11[3]
static const symbol s_1_10[3]
static const symbol s_1_9[2]
static const symbol s_5_35[1]
static const symbol s_5_28[1]
static int r_tidy_up(struct SN_env *z)
static const symbol s_1_6[2]
static const symbol s_1_23[2]
static const symbol s_4_29[2]
static const symbol s_4_15[1]
static const symbol s_5_12[2]
static const symbol s_0_8[6]
static const symbol s_5_18[3]
static const symbol s_1_2[2]
static const symbol s_0_6[5]
static const symbol s_3_1[2]
static const symbol s_7_2[1]
static const symbol s_5_27[1]
static const symbol s_1_18[2]
static const symbol s_5_11[2]
static const symbol s_2_3[3]
static const symbol s_5_9[3]
static const symbol s_4_1[2]
static const symbol s_2_0[2]
static const symbol s_4_9[3]
static const symbol s_5_6[2]
static const symbol s_5_16[1]
static const symbol s_1_3[2]
static int r_adjectival(struct SN_env *z)
static const symbol s_1_0[2]
static const symbol s_6[]
static const symbol s_7_1[1]
static const symbol s_5_17[2]
static int r_verb(struct SN_env *z)
void russian_KOI8_R_close_env(struct SN_env *z)
static const symbol s_3[]
static const symbol s_3_0[2]
static const symbol s_2_5[1]
static const symbol s_5_4[1]
static const symbol s_1_15[2]
static const symbol s_4_35[3]
static int r_R2(struct SN_env *z)
static const symbol s_7[]
static const symbol s_5_24[2]
static const struct among a_5[36]
static const symbol s_5_31[1]
static const symbol s_5_8[2]
static const symbol s_1_7[2]
static const struct among a_6[2]
static const symbol s_4_36[2]
static const symbol s_4_30[3]
static const struct among a_2[8]
static const symbol s_5_33[2]
static const symbol s_1_1[2]
static const symbol s_0_0[3]
static const symbol s_4_21[2]
static const symbol s_5_21[2]
static const symbol s_5_22[2]
static const symbol s_4_4[3]
static const symbol s_5_3[1]
static const symbol s_4_6[3]
static int r_derivational(struct SN_env *z)
static const symbol s_1_21[3]
static const symbol s_2_7[3]
static const symbol s_5_7[2]
int russian_KOI8_R_stem(struct SN_env *z)
static const symbol s_4_24[1]
static const symbol s_4_16[2]
static const symbol s_5_14[3]
static const symbol s_4_17[2]
static const struct among a_1[26]
static const symbol s_4_42[3]
static const symbol s_5_23[3]
static int r_perfective_gerund(struct SN_env *z)
static const symbol s_4_43[3]
static const symbol s_4_40[3]
static const symbol s_1_17[2]
static const symbol s_2_4[3]
static const symbol s_4_12[2]
static const struct among a_0[9]
static const symbol s_4_33[3]
static const symbol s_5_25[2]
static const symbol s_4_26[2]
static const symbol s_4_8[3]
static const symbol s_5_20[2]
static const symbol s_4_2[2]
static const symbol s_4_45[3]
static const symbol s_1_14[2]
static const symbol s_4_0[1]
static const symbol s_1[]
static const symbol s_4_39[2]
static const symbol s_4_19[2]
static const symbol s_4_23[2]
static const symbol s_0_7[6]
static const symbol s_1_8[2]
static const symbol s_5_2[2]
static const symbol s_5_0[1]
static const symbol s_7_0[4]
static const symbol s_1_4[2]
static const symbol s_4_11[4]
static const symbol s_4_25[2]
static const struct among a_4[46]
static const symbol s_4_44[2]
static const symbol s_4_14[3]
static int r_mark_regions(struct SN_env *z)
static const symbol s_7_3[3]
static const symbol s_0_3[1]
static const symbol s_6_0[3]
static const symbol s_5_29[2]
static const symbol s_5_32[2]
static const symbol s_4_13[3]
static const symbol s_5_1[2]
static const symbol s_4_34[2]
static const symbol s_6_1[4]
static const symbol s_1_16[2]
static const symbol s_5_34[1]
static const symbol s_1_25[3]
static const symbol s_4_41[3]
static const symbol s_5_5[2]
static const symbol s_5_13[3]
static const symbol s_4_27[3]
static const symbol s_2_6[2]
static const symbol s_2_1[2]
static const symbol s_5_26[3]
static const unsigned char g_v[]
static const symbol s_1_22[2]
static const symbol s_1_20[3]
static const symbol s_4_7[3]
static int r_reflexive(struct SN_env *z)
static const symbol s_4_31[3]
static const symbol s_5_19[2]
static const symbol s_8[]
static const symbol s_9[]
static int r_noun(struct SN_env *z)
struct SN_env * russian_KOI8_R_create_env(void)
static const symbol s_5[]
static const symbol s_1_12[2]
static const symbol s_5_10[1]
static const symbol s_4_10[4]
static const symbol s_4_28[3]
static const symbol s_0_1[4]
static const symbol s_4_5[2]
static const symbol s_0[]
static const symbol s_4_20[2]
static const symbol s_5_15[4]
static const symbol s_4_38[2]
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