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