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