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