tracker-0.16.2/src/libstemmer/stem_UTF_8_russian.c

No issues found

  1 /*
  2  * Copyright (c) 2001, Dr Martin Porter
  3  * All rights reserved.
  4  *
  5  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  6  * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  7  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  8  * Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  9  *
 10  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 11  */
 12 
 13 
 14 
 15 /* This file was generated automatically by the Snowball to ANSI C compiler */
 16 
 17 #include "header.h"
 18 
 19 extern int russian_UTF_8_stem(struct SN_env * z);
 20 static int r_tidy_up(struct SN_env * z);
 21 static int r_derivational(struct SN_env * z);
 22 static int r_noun(struct SN_env * z);
 23 static int r_verb(struct SN_env * z);
 24 static int r_reflexive(struct SN_env * z);
 25 static int r_adjectival(struct SN_env * z);
 26 static int r_adjective(struct SN_env * z);
 27 static int r_perfective_gerund(struct SN_env * z);
 28 static int r_R2(struct SN_env * z);
 29 static int r_mark_regions(struct SN_env * z);
 30 
 31 extern struct SN_env * russian_UTF_8_create_env(void);
 32 extern void russian_UTF_8_close_env(struct SN_env * z);
 33 
 34 static symbol s_0_0[10] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
 35 static symbol s_0_1[12] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
 36 static symbol s_0_2[12] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
 37 static symbol s_0_3[2] = { 0xD0, 0xB2 };
 38 static symbol s_0_4[4] = { 0xD1, 0x8B, 0xD0, 0xB2 };
 39 static symbol s_0_5[4] = { 0xD0, 0xB8, 0xD0, 0xB2 };
 40 static symbol s_0_6[6] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
 41 static symbol s_0_7[8] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
 42 static symbol s_0_8[8] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
 43 
 44 static struct among a_0[9] =
 45 {
 46 /*  0 */ { 10, s_0_0, -1, 1, 0},
 47 /*  1 */ { 12, s_0_1, 0, 2, 0},
 48 /*  2 */ { 12, s_0_2, 0, 2, 0},
 49 /*  3 */ { 2, s_0_3, -1, 1, 0},
 50 /*  4 */ { 4, s_0_4, 3, 2, 0},
 51 /*  5 */ { 4, s_0_5, 3, 2, 0},
 52 /*  6 */ { 6, s_0_6, -1, 1, 0},
 53 /*  7 */ { 8, s_0_7, 6, 2, 0},
 54 /*  8 */ { 8, s_0_8, 6, 2, 0}
 55 };
 56 
 57 static symbol s_1_0[6] = { 0xD0, 0xB5, 0xD0, 0xBC, 0xD1, 0x83 };
 58 static symbol s_1_1[6] = { 0xD0, 0xBE, 0xD0, 0xBC, 0xD1, 0x83 };
 59 static symbol s_1_2[4] = { 0xD1, 0x8B, 0xD1, 0x85 };
 60 static symbol s_1_3[4] = { 0xD0, 0xB8, 0xD1, 0x85 };
 61 static symbol s_1_4[4] = { 0xD1, 0x83, 0xD1, 0x8E };
 62 static symbol s_1_5[4] = { 0xD1, 0x8E, 0xD1, 0x8E };
 63 static symbol s_1_6[4] = { 0xD0, 0xB5, 0xD1, 0x8E };
 64 static symbol s_1_7[4] = { 0xD0, 0xBE, 0xD1, 0x8E };
 65 static symbol s_1_8[4] = { 0xD1, 0x8F, 0xD1, 0x8F };
 66 static symbol s_1_9[4] = { 0xD0, 0xB0, 0xD1, 0x8F };
 67 static symbol s_1_10[4] = { 0xD1, 0x8B, 0xD0, 0xB5 };
 68 static symbol s_1_11[4] = { 0xD0, 0xB5, 0xD0, 0xB5 };
 69 static symbol s_1_12[4] = { 0xD0, 0xB8, 0xD0, 0xB5 };
 70 static symbol s_1_13[4] = { 0xD0, 0xBE, 0xD0, 0xB5 };
 71 static symbol s_1_14[6] = { 0xD1, 0x8B, 0xD0, 0xBC, 0xD0, 0xB8 };
 72 static symbol s_1_15[6] = { 0xD0, 0xB8, 0xD0, 0xBC, 0xD0, 0xB8 };
 73 static symbol s_1_16[4] = { 0xD1, 0x8B, 0xD0, 0xB9 };
 74 static symbol s_1_17[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
 75 static symbol s_1_18[4] = { 0xD0, 0xB8, 0xD0, 0xB9 };
 76 static symbol s_1_19[4] = { 0xD0, 0xBE, 0xD0, 0xB9 };
 77 static symbol s_1_20[4] = { 0xD1, 0x8B, 0xD0, 0xBC };
 78 static symbol s_1_21[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
 79 static symbol s_1_22[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
 80 static symbol s_1_23[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
 81 static symbol s_1_24[6] = { 0xD0, 0xB5, 0xD0, 0xB3, 0xD0, 0xBE };
 82 static symbol s_1_25[6] = { 0xD0, 0xBE, 0xD0, 0xB3, 0xD0, 0xBE };
 83 
 84 static struct among a_1[26] =
 85 {
 86 /*  0 */ { 6, s_1_0, -1, 1, 0},
 87 /*  1 */ { 6, s_1_1, -1, 1, 0},
 88 /*  2 */ { 4, s_1_2, -1, 1, 0},
 89 /*  3 */ { 4, s_1_3, -1, 1, 0},
 90 /*  4 */ { 4, s_1_4, -1, 1, 0},
 91 /*  5 */ { 4, s_1_5, -1, 1, 0},
 92 /*  6 */ { 4, s_1_6, -1, 1, 0},
 93 /*  7 */ { 4, s_1_7, -1, 1, 0},
 94 /*  8 */ { 4, s_1_8, -1, 1, 0},
 95 /*  9 */ { 4, s_1_9, -1, 1, 0},
 96 /* 10 */ { 4, s_1_10, -1, 1, 0},
 97 /* 11 */ { 4, s_1_11, -1, 1, 0},
 98 /* 12 */ { 4, s_1_12, -1, 1, 0},
 99 /* 13 */ { 4, s_1_13, -1, 1, 0},
100 /* 14 */ { 6, s_1_14, -1, 1, 0},
101 /* 15 */ { 6, s_1_15, -1, 1, 0},
102 /* 16 */ { 4, s_1_16, -1, 1, 0},
103 /* 17 */ { 4, s_1_17, -1, 1, 0},
104 /* 18 */ { 4, s_1_18, -1, 1, 0},
105 /* 19 */ { 4, s_1_19, -1, 1, 0},
106 /* 20 */ { 4, s_1_20, -1, 1, 0},
107 /* 21 */ { 4, s_1_21, -1, 1, 0},
108 /* 22 */ { 4, s_1_22, -1, 1, 0},
109 /* 23 */ { 4, s_1_23, -1, 1, 0},
110 /* 24 */ { 6, s_1_24, -1, 1, 0},
111 /* 25 */ { 6, s_1_25, -1, 1, 0}
112 };
113 
114 static symbol s_2_0[4] = { 0xD0, 0xB2, 0xD1, 0x88 };
115 static symbol s_2_1[6] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88 };
116 static symbol s_2_2[6] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88 };
117 static symbol s_2_3[2] = { 0xD1, 0x89 };
118 static symbol s_2_4[4] = { 0xD1, 0x8E, 0xD1, 0x89 };
119 static symbol s_2_5[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x89 };
120 static symbol s_2_6[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
121 static symbol s_2_7[4] = { 0xD0, 0xBD, 0xD0, 0xBD };
122 
123 static struct among a_2[8] =
124 {
125 /*  0 */ { 4, s_2_0, -1, 1, 0},
126 /*  1 */ { 6, s_2_1, 0, 2, 0},
127 /*  2 */ { 6, s_2_2, 0, 2, 0},
128 /*  3 */ { 2, s_2_3, -1, 1, 0},
129 /*  4 */ { 4, s_2_4, 3, 1, 0},
130 /*  5 */ { 6, s_2_5, 4, 2, 0},
131 /*  6 */ { 4, s_2_6, -1, 1, 0},
132 /*  7 */ { 4, s_2_7, -1, 1, 0}
133 };
134 
135 static symbol s_3_0[4] = { 0xD1, 0x81, 0xD1, 0x8C };
136 static symbol s_3_1[4] = { 0xD1, 0x81, 0xD1, 0x8F };
137 
138 static struct among a_3[2] =
139 {
140 /*  0 */ { 4, s_3_0, -1, 1, 0},
141 /*  1 */ { 4, s_3_1, -1, 1, 0}
142 };
143 
144 static symbol s_4_0[4] = { 0xD1, 0x8B, 0xD1, 0x82 };
145 static symbol s_4_1[4] = { 0xD1, 0x8E, 0xD1, 0x82 };
146 static symbol s_4_2[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x82 };
147 static symbol s_4_3[4] = { 0xD1, 0x8F, 0xD1, 0x82 };
148 static symbol s_4_4[4] = { 0xD0, 0xB5, 0xD1, 0x82 };
149 static symbol s_4_5[6] = { 0xD1, 0x83, 0xD0, 0xB5, 0xD1, 0x82 };
150 static symbol s_4_6[4] = { 0xD0, 0xB8, 0xD1, 0x82 };
151 static symbol s_4_7[4] = { 0xD0, 0xBD, 0xD1, 0x8B };
152 static symbol s_4_8[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD1, 0x8B };
153 static symbol s_4_9[4] = { 0xD1, 0x82, 0xD1, 0x8C };
154 static symbol s_4_10[6] = { 0xD1, 0x8B, 0xD1, 0x82, 0xD1, 0x8C };
155 static symbol s_4_11[6] = { 0xD0, 0xB8, 0xD1, 0x82, 0xD1, 0x8C };
156 static symbol s_4_12[6] = { 0xD0, 0xB5, 0xD1, 0x88, 0xD1, 0x8C };
157 static symbol s_4_13[6] = { 0xD0, 0xB8, 0xD1, 0x88, 0xD1, 0x8C };
158 static symbol s_4_14[2] = { 0xD1, 0x8E };
159 static symbol s_4_15[4] = { 0xD1, 0x83, 0xD1, 0x8E };
160 static symbol s_4_16[4] = { 0xD0, 0xBB, 0xD0, 0xB0 };
161 static symbol s_4_17[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xB0 };
162 static symbol s_4_18[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xB0 };
163 static symbol s_4_19[4] = { 0xD0, 0xBD, 0xD0, 0xB0 };
164 static symbol s_4_20[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xB0 };
165 static symbol s_4_21[6] = { 0xD0, 0xB5, 0xD1, 0x82, 0xD0, 0xB5 };
166 static symbol s_4_22[6] = { 0xD0, 0xB8, 0xD1, 0x82, 0xD0, 0xB5 };
167 static symbol s_4_23[6] = { 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
168 static symbol s_4_24[8] = { 0xD1, 0x83, 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
169 static symbol s_4_25[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
170 static symbol s_4_26[4] = { 0xD0, 0xBB, 0xD0, 0xB8 };
171 static symbol s_4_27[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xB8 };
172 static symbol s_4_28[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xB8 };
173 static symbol s_4_29[2] = { 0xD0, 0xB9 };
174 static symbol s_4_30[4] = { 0xD1, 0x83, 0xD0, 0xB9 };
175 static symbol s_4_31[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
176 static symbol s_4_32[2] = { 0xD0, 0xBB };
177 static symbol s_4_33[4] = { 0xD1, 0x8B, 0xD0, 0xBB };
178 static symbol s_4_34[4] = { 0xD0, 0xB8, 0xD0, 0xBB };
179 static symbol s_4_35[4] = { 0xD1, 0x8B, 0xD0, 0xBC };
180 static symbol s_4_36[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
181 static symbol s_4_37[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
182 static symbol s_4_38[2] = { 0xD0, 0xBD };
183 static symbol s_4_39[4] = { 0xD0, 0xB5, 0xD0, 0xBD };
184 static symbol s_4_40[4] = { 0xD0, 0xBB, 0xD0, 0xBE };
185 static symbol s_4_41[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xBE };
186 static symbol s_4_42[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xBE };
187 static symbol s_4_43[4] = { 0xD0, 0xBD, 0xD0, 0xBE };
188 static symbol s_4_44[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xBE };
189 static symbol s_4_45[6] = { 0xD0, 0xBD, 0xD0, 0xBD, 0xD0, 0xBE };
190 
191 static struct among a_4[46] =
192 {
193 /*  0 */ { 4, s_4_0, -1, 2, 0},
194 /*  1 */ { 4, s_4_1, -1, 1, 0},
195 /*  2 */ { 6, s_4_2, 1, 2, 0},
196 /*  3 */ { 4, s_4_3, -1, 2, 0},
197 /*  4 */ { 4, s_4_4, -1, 1, 0},
198 /*  5 */ { 6, s_4_5, 4, 2, 0},
199 /*  6 */ { 4, s_4_6, -1, 2, 0},
200 /*  7 */ { 4, s_4_7, -1, 1, 0},
201 /*  8 */ { 6, s_4_8, 7, 2, 0},
202 /*  9 */ { 4, s_4_9, -1, 1, 0},
203 /* 10 */ { 6, s_4_10, 9, 2, 0},
204 /* 11 */ { 6, s_4_11, 9, 2, 0},
205 /* 12 */ { 6, s_4_12, -1, 1, 0},
206 /* 13 */ { 6, s_4_13, -1, 2, 0},
207 /* 14 */ { 2, s_4_14, -1, 2, 0},
208 /* 15 */ { 4, s_4_15, 14, 2, 0},
209 /* 16 */ { 4, s_4_16, -1, 1, 0},
210 /* 17 */ { 6, s_4_17, 16, 2, 0},
211 /* 18 */ { 6, s_4_18, 16, 2, 0},
212 /* 19 */ { 4, s_4_19, -1, 1, 0},
213 /* 20 */ { 6, s_4_20, 19, 2, 0},
214 /* 21 */ { 6, s_4_21, -1, 1, 0},
215 /* 22 */ { 6, s_4_22, -1, 2, 0},
216 /* 23 */ { 6, s_4_23, -1, 1, 0},
217 /* 24 */ { 8, s_4_24, 23, 2, 0},
218 /* 25 */ { 8, s_4_25, 23, 2, 0},
219 /* 26 */ { 4, s_4_26, -1, 1, 0},
220 /* 27 */ { 6, s_4_27, 26, 2, 0},
221 /* 28 */ { 6, s_4_28, 26, 2, 0},
222 /* 29 */ { 2, s_4_29, -1, 1, 0},
223 /* 30 */ { 4, s_4_30, 29, 2, 0},
224 /* 31 */ { 4, s_4_31, 29, 2, 0},
225 /* 32 */ { 2, s_4_32, -1, 1, 0},
226 /* 33 */ { 4, s_4_33, 32, 2, 0},
227 /* 34 */ { 4, s_4_34, 32, 2, 0},
228 /* 35 */ { 4, s_4_35, -1, 2, 0},
229 /* 36 */ { 4, s_4_36, -1, 1, 0},
230 /* 37 */ { 4, s_4_37, -1, 2, 0},
231 /* 38 */ { 2, s_4_38, -1, 1, 0},
232 /* 39 */ { 4, s_4_39, 38, 2, 0},
233 /* 40 */ { 4, s_4_40, -1, 1, 0},
234 /* 41 */ { 6, s_4_41, 40, 2, 0},
235 /* 42 */ { 6, s_4_42, 40, 2, 0},
236 /* 43 */ { 4, s_4_43, -1, 1, 0},
237 /* 44 */ { 6, s_4_44, 43, 2, 0},
238 /* 45 */ { 6, s_4_45, 43, 1, 0}
239 };
240 
241 static symbol s_5_0[2] = { 0xD1, 0x83 };
242 static symbol s_5_1[4] = { 0xD1, 0x8F, 0xD1, 0x85 };
243 static symbol s_5_2[6] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD1, 0x85 };
244 static symbol s_5_3[4] = { 0xD0, 0xB0, 0xD1, 0x85 };
245 static symbol s_5_4[2] = { 0xD1, 0x8B };
246 static symbol s_5_5[2] = { 0xD1, 0x8C };
247 static symbol s_5_6[2] = { 0xD1, 0x8E };
248 static symbol s_5_7[4] = { 0xD1, 0x8C, 0xD1, 0x8E };
249 static symbol s_5_8[4] = { 0xD0, 0xB8, 0xD1, 0x8E };
250 static symbol s_5_9[2] = { 0xD1, 0x8F };
251 static symbol s_5_10[4] = { 0xD1, 0x8C, 0xD1, 0x8F };
252 static symbol s_5_11[4] = { 0xD0, 0xB8, 0xD1, 0x8F };
253 static symbol s_5_12[2] = { 0xD0, 0xB0 };
254 static symbol s_5_13[4] = { 0xD0, 0xB5, 0xD0, 0xB2 };
255 static symbol s_5_14[4] = { 0xD0, 0xBE, 0xD0, 0xB2 };
256 static symbol s_5_15[2] = { 0xD0, 0xB5 };
257 static symbol s_5_16[4] = { 0xD1, 0x8C, 0xD0, 0xB5 };
258 static symbol s_5_17[4] = { 0xD0, 0xB8, 0xD0, 0xB5 };
259 static symbol s_5_18[2] = { 0xD0, 0xB8 };
260 static symbol s_5_19[4] = { 0xD0, 0xB5, 0xD0, 0xB8 };
261 static symbol s_5_20[4] = { 0xD0, 0xB8, 0xD0, 0xB8 };
262 static symbol s_5_21[6] = { 0xD1, 0x8F, 0xD0, 0xBC, 0xD0, 0xB8 };
263 static symbol s_5_22[8] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD0, 0xBC, 0xD0, 0xB8 };
264 static symbol s_5_23[6] = { 0xD0, 0xB0, 0xD0, 0xBC, 0xD0, 0xB8 };
265 static symbol s_5_24[2] = { 0xD0, 0xB9 };
266 static symbol s_5_25[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
267 static symbol s_5_26[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xB9 };
268 static symbol s_5_27[4] = { 0xD0, 0xB8, 0xD0, 0xB9 };
269 static symbol s_5_28[4] = { 0xD0, 0xBE, 0xD0, 0xB9 };
270 static symbol s_5_29[4] = { 0xD1, 0x8F, 0xD0, 0xBC };
271 static symbol s_5_30[6] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD0, 0xBC };
272 static symbol s_5_31[4] = { 0xD0, 0xB0, 0xD0, 0xBC };
273 static symbol s_5_32[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
274 static symbol s_5_33[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xBC };
275 static symbol s_5_34[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
276 static symbol s_5_35[2] = { 0xD0, 0xBE };
277 
278 static struct among a_5[36] =
279 {
280 /*  0 */ { 2, s_5_0, -1, 1, 0},
281 /*  1 */ { 4, s_5_1, -1, 1, 0},
282 /*  2 */ { 6, s_5_2, 1, 1, 0},
283 /*  3 */ { 4, s_5_3, -1, 1, 0},
284 /*  4 */ { 2, s_5_4, -1, 1, 0},
285 /*  5 */ { 2, s_5_5, -1, 1, 0},
286 /*  6 */ { 2, s_5_6, -1, 1, 0},
287 /*  7 */ { 4, s_5_7, 6, 1, 0},
288 /*  8 */ { 4, s_5_8, 6, 1, 0},
289 /*  9 */ { 2, s_5_9, -1, 1, 0},
290 /* 10 */ { 4, s_5_10, 9, 1, 0},
291 /* 11 */ { 4, s_5_11, 9, 1, 0},
292 /* 12 */ { 2, s_5_12, -1, 1, 0},
293 /* 13 */ { 4, s_5_13, -1, 1, 0},
294 /* 14 */ { 4, s_5_14, -1, 1, 0},
295 /* 15 */ { 2, s_5_15, -1, 1, 0},
296 /* 16 */ { 4, s_5_16, 15, 1, 0},
297 /* 17 */ { 4, s_5_17, 15, 1, 0},
298 /* 18 */ { 2, s_5_18, -1, 1, 0},
299 /* 19 */ { 4, s_5_19, 18, 1, 0},
300 /* 20 */ { 4, s_5_20, 18, 1, 0},
301 /* 21 */ { 6, s_5_21, 18, 1, 0},
302 /* 22 */ { 8, s_5_22, 21, 1, 0},
303 /* 23 */ { 6, s_5_23, 18, 1, 0},
304 /* 24 */ { 2, s_5_24, -1, 1, 0},
305 /* 25 */ { 4, s_5_25, 24, 1, 0},
306 /* 26 */ { 6, s_5_26, 25, 1, 0},
307 /* 27 */ { 4, s_5_27, 24, 1, 0},
308 /* 28 */ { 4, s_5_28, 24, 1, 0},
309 /* 29 */ { 4, s_5_29, -1, 1, 0},
310 /* 30 */ { 6, s_5_30, 29, 1, 0},
311 /* 31 */ { 4, s_5_31, -1, 1, 0},
312 /* 32 */ { 4, s_5_32, -1, 1, 0},
313 /* 33 */ { 6, s_5_33, 32, 1, 0},
314 /* 34 */ { 4, s_5_34, -1, 1, 0},
315 /* 35 */ { 2, s_5_35, -1, 1, 0}
316 };
317 
318 static symbol s_6_0[6] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82 };
319 static symbol s_6_1[8] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82, 0xD1, 0x8C };
320 
321 static struct among a_6[2] =
322 {
323 /*  0 */ { 6, s_6_0, -1, 1, 0},
324 /*  1 */ { 8, s_6_1, -1, 1, 0}
325 };
326 
327 static symbol s_7_0[6] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88 };
328 static symbol s_7_1[2] = { 0xD1, 0x8C };
329 static symbol s_7_2[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88, 0xD0, 0xB5 };
330 static symbol s_7_3[2] = { 0xD0, 0xBD };
331 
332 static struct among a_7[4] =
333 {
334 /*  0 */ { 6, s_7_0, -1, 1, 0},
335 /*  1 */ { 2, s_7_1, -1, 3, 0},
336 /*  2 */ { 8, s_7_2, -1, 1, 0},
337 /*  3 */ { 2, s_7_3, -1, 2, 0}
338 };
339 
340 static unsigned char g_v[] = { 33, 65, 8, 232 };
341 
342 static symbol s_0[] = { 0xD0, 0xB0 };
343 static symbol s_1[] = { 0xD1, 0x8F };
344 static symbol s_2[] = { 0xD0, 0xB0 };
345 static symbol s_3[] = { 0xD1, 0x8F };
346 static symbol s_4[] = { 0xD0, 0xB0 };
347 static symbol s_5[] = { 0xD1, 0x8F };
348 static symbol s_6[] = { 0xD0, 0xBD };
349 static symbol s_7[] = { 0xD0, 0xBD };
350 static symbol s_8[] = { 0xD0, 0xBD };
351 static symbol s_9[] = { 0xD0, 0xB8 };
352 
353 static int r_mark_regions(struct SN_env * z) {
354     z->I[0] = z->l;
355     z->I[1] = z->l;
356     {	int c = z->c; /* do, line 61 */
357 	while(1) { /* gopast, line 62 */
358 	    if (!(in_grouping_U(z, g_v, 1072, 1103))) goto lab1;
359 	    break;
360 	lab1:
361 	    {	int c = skip_utf8(z->p, z->c, 0, z->l, 1);
362 		if (c < 0) goto lab0;
363 		z->c = c; /* gopast, line 62 */
364 	    }
365 	}
366 	z->I[0] = z->c; /* setmark pV, line 62 */
367 	while(1) { /* gopast, line 62 */
368 	    if (!(out_grouping_U(z, g_v, 1072, 1103))) goto lab2;
369 	    break;
370 	lab2:
371 	    {	int c = skip_utf8(z->p, z->c, 0, z->l, 1);
372 		if (c < 0) goto lab0;
373 		z->c = c; /* gopast, line 62 */
374 	    }
375 	}
376 	while(1) { /* gopast, line 63 */
377 	    if (!(in_grouping_U(z, g_v, 1072, 1103))) goto lab3;
378 	    break;
379 	lab3:
380 	    {	int c = skip_utf8(z->p, z->c, 0, z->l, 1);
381 		if (c < 0) goto lab0;
382 		z->c = c; /* gopast, line 63 */
383 	    }
384 	}
385 	while(1) { /* gopast, line 63 */
386 	    if (!(out_grouping_U(z, g_v, 1072, 1103))) goto lab4;
387 	    break;
388 	lab4:
389 	    {	int c = skip_utf8(z->p, z->c, 0, z->l, 1);
390 		if (c < 0) goto lab0;
391 		z->c = c; /* gopast, line 63 */
392 	    }
393 	}
394 	z->I[1] = z->c; /* setmark p2, line 63 */
395     lab0:
396 	z->c = c;
397     }
398     return 1;
399 }
400 
401 static int r_R2(struct SN_env * z) {
402     if (!(z->I[1] <= z->c)) return 0;
403     return 1;
404 }
405 
406 static int r_perfective_gerund(struct SN_env * z) {
407     int among_var;
408     z->ket = z->c; /* [, line 72 */
409     among_var = find_among_b(z, a_0, 9); /* substring, line 72 */
410     if (!(among_var)) return 0;
411     z->bra = z->c; /* ], line 72 */
412     switch(among_var) {
413 	case 0: return 0;
414 	case 1:
415 	    {	int m = z->l - z->c; (void) m; /* or, line 76 */
416 		if (!(eq_s_b(z, 2, s_0))) goto lab1;
417 		goto lab0;
418 	    lab1:
419 		z->c = z->l - m;
420 		if (!(eq_s_b(z, 2, s_1))) return 0;
421 	    }
422 	lab0:
423 	    {	int ret;
424 		ret = slice_del(z); /* delete, line 76 */
425 		if (ret < 0) return ret;
426 	    }
427 	    break;
428 	case 2:
429 	    {	int ret;
430 		ret = slice_del(z); /* delete, line 83 */
431 		if (ret < 0) return ret;
432 	    }
433 	    break;
434     }
435     return 1;
436 }
437 
438 static int r_adjective(struct SN_env * z) {
439     int among_var;
440     z->ket = z->c; /* [, line 88 */
441     among_var = find_among_b(z, a_1, 26); /* substring, line 88 */
442     if (!(among_var)) return 0;
443     z->bra = z->c; /* ], line 88 */
444     switch(among_var) {
445 	case 0: return 0;
446 	case 1:
447 	    {	int ret;
448 		ret = slice_del(z); /* delete, line 97 */
449 		if (ret < 0) return ret;
450 	    }
451 	    break;
452     }
453     return 1;
454 }
455 
456 static int r_adjectival(struct SN_env * z) {
457     int among_var;
458     {	int ret = r_adjective(z);
459 	if (ret == 0) return 0; /* call adjective, line 102 */
460 	if (ret < 0) return ret;
461     }
462     {	int m = z->l - z->c; (void) m; /* try, line 109 */
463 	z->ket = z->c; /* [, line 110 */
464 	among_var = find_among_b(z, a_2, 8); /* substring, line 110 */
465 	if (!(among_var)) { z->c = z->l - m; goto lab0; }
466 	z->bra = z->c; /* ], line 110 */
467 	switch(among_var) {
468 	    case 0: { z->c = z->l - m; goto lab0; }
469 	    case 1:
470 		{   int m = z->l - z->c; (void) m; /* or, line 115 */
471 		    if (!(eq_s_b(z, 2, s_2))) goto lab2;
472 		    goto lab1;
473 		lab2:
474 		    z->c = z->l - m;
475 		    if (!(eq_s_b(z, 2, s_3))) { z->c = z->l - m; goto lab0; }
476 		}
477 	    lab1:
478 		{   int ret;
479 		    ret = slice_del(z); /* delete, line 115 */
480 		    if (ret < 0) return ret;
481 		}
482 		break;
483 	    case 2:
484 		{   int ret;
485 		    ret = slice_del(z); /* delete, line 122 */
486 		    if (ret < 0) return ret;
487 		}
488 		break;
489 	}
490     lab0:
491 	;
492     }
493     return 1;
494 }
495 
496 static int r_reflexive(struct SN_env * z) {
497     int among_var;
498     z->ket = z->c; /* [, line 129 */
499     among_var = find_among_b(z, a_3, 2); /* substring, line 129 */
500     if (!(among_var)) return 0;
501     z->bra = z->c; /* ], line 129 */
502     switch(among_var) {
503 	case 0: return 0;
504 	case 1:
505 	    {	int ret;
506 		ret = slice_del(z); /* delete, line 132 */
507 		if (ret < 0) return ret;
508 	    }
509 	    break;
510     }
511     return 1;
512 }
513 
514 static int r_verb(struct SN_env * z) {
515     int among_var;
516     z->ket = z->c; /* [, line 137 */
517     among_var = find_among_b(z, a_4, 46); /* substring, line 137 */
518     if (!(among_var)) return 0;
519     z->bra = z->c; /* ], line 137 */
520     switch(among_var) {
521 	case 0: return 0;
522 	case 1:
523 	    {	int m = z->l - z->c; (void) m; /* or, line 143 */
524 		if (!(eq_s_b(z, 2, s_4))) goto lab1;
525 		goto lab0;
526 	    lab1:
527 		z->c = z->l - m;
528 		if (!(eq_s_b(z, 2, s_5))) return 0;
529 	    }
530 	lab0:
531 	    {	int ret;
532 		ret = slice_del(z); /* delete, line 143 */
533 		if (ret < 0) return ret;
534 	    }
535 	    break;
536 	case 2:
537 	    {	int ret;
538 		ret = slice_del(z); /* delete, line 151 */
539 		if (ret < 0) return ret;
540 	    }
541 	    break;
542     }
543     return 1;
544 }
545 
546 static int r_noun(struct SN_env * z) {
547     int among_var;
548     z->ket = z->c; /* [, line 160 */
549     among_var = find_among_b(z, a_5, 36); /* substring, line 160 */
550     if (!(among_var)) return 0;
551     z->bra = z->c; /* ], line 160 */
552     switch(among_var) {
553 	case 0: return 0;
554 	case 1:
555 	    {	int ret;
556 		ret = slice_del(z); /* delete, line 167 */
557 		if (ret < 0) return ret;
558 	    }
559 	    break;
560     }
561     return 1;
562 }
563 
564 static int r_derivational(struct SN_env * z) {
565     int among_var;
566     z->ket = z->c; /* [, line 176 */
567     among_var = find_among_b(z, a_6, 2); /* substring, line 176 */
568     if (!(among_var)) return 0;
569     z->bra = z->c; /* ], line 176 */
570     {	int ret = r_R2(z);
571 	if (ret == 0) return 0; /* call R2, line 176 */
572 	if (ret < 0) return ret;
573     }
574     switch(among_var) {
575 	case 0: return 0;
576 	case 1:
577 	    {	int ret;
578 		ret = slice_del(z); /* delete, line 179 */
579 		if (ret < 0) return ret;
580 	    }
581 	    break;
582     }
583     return 1;
584 }
585 
586 static int r_tidy_up(struct SN_env * z) {
587     int among_var;
588     z->ket = z->c; /* [, line 184 */
589     among_var = find_among_b(z, a_7, 4); /* substring, line 184 */
590     if (!(among_var)) return 0;
591     z->bra = z->c; /* ], line 184 */
592     switch(among_var) {
593 	case 0: return 0;
594 	case 1:
595 	    {	int ret;
596 		ret = slice_del(z); /* delete, line 188 */
597 		if (ret < 0) return ret;
598 	    }
599 	    z->ket = z->c; /* [, line 189 */
600 	    if (!(eq_s_b(z, 2, s_6))) return 0;
601 	    z->bra = z->c; /* ], line 189 */
602 	    if (!(eq_s_b(z, 2, s_7))) return 0;
603 	    {	int ret;
604 		ret = slice_del(z); /* delete, line 189 */
605 		if (ret < 0) return ret;
606 	    }
607 	    break;
608 	case 2:
609 	    if (!(eq_s_b(z, 2, s_8))) return 0;
610 	    {	int ret;
611 		ret = slice_del(z); /* delete, line 192 */
612 		if (ret < 0) return ret;
613 	    }
614 	    break;
615 	case 3:
616 	    {	int ret;
617 		ret = slice_del(z); /* delete, line 194 */
618 		if (ret < 0) return ret;
619 	    }
620 	    break;
621     }
622     return 1;
623 }
624 
625 extern int russian_UTF_8_stem(struct SN_env * z) {
626     {	int c = z->c; /* do, line 201 */
627 	{   int ret = r_mark_regions(z);
628 	    if (ret == 0) goto lab0; /* call mark_regions, line 201 */
629 	    if (ret < 0) return ret;
630 	}
631     lab0:
632 	z->c = c;
633     }
634     z->lb = z->c; z->c = z->l; /* backwards, line 202 */
635 
636     {	int m3; /* setlimit, line 202 */
637 	int m = z->l - z->c; (void) m;
638 	if (z->c < z->I[0]) return 0;
639 	z->c = z->I[0]; /* tomark, line 202 */
640 	m3 = z->lb; z->lb = z->c;
641 	z->c = z->l - m;
642 	{   int m = z->l - z->c; (void) m; /* do, line 203 */
643 	    {	int m = z->l - z->c; (void) m; /* or, line 204 */
644 		{   int ret = r_perfective_gerund(z);
645 		    if (ret == 0) goto lab3; /* call perfective_gerund, line 204 */
646 		    if (ret < 0) return ret;
647 		}
648 		goto lab2;
649 	    lab3:
650 		z->c = z->l - m;
651 		{   int m = z->l - z->c; (void) m; /* try, line 205 */
652 		    {	int ret = r_reflexive(z);
653 			if (ret == 0) { z->c = z->l - m; goto lab4; } /* call reflexive, line 205 */
654 			if (ret < 0) return ret;
655 		    }
656 		lab4:
657 		    ;
658 		}
659 		{   int m = z->l - z->c; (void) m; /* or, line 206 */
660 		    {	int ret = r_adjectival(z);
661 			if (ret == 0) goto lab6; /* call adjectival, line 206 */
662 			if (ret < 0) return ret;
663 		    }
664 		    goto lab5;
665 		lab6:
666 		    z->c = z->l - m;
667 		    {	int ret = r_verb(z);
668 			if (ret == 0) goto lab7; /* call verb, line 206 */
669 			if (ret < 0) return ret;
670 		    }
671 		    goto lab5;
672 		lab7:
673 		    z->c = z->l - m;
674 		    {	int ret = r_noun(z);
675 			if (ret == 0) goto lab1; /* call noun, line 206 */
676 			if (ret < 0) return ret;
677 		    }
678 		}
679 	    lab5:
680 		;
681 	    }
682 	lab2:
683 	lab1:
684 	    z->c = z->l - m;
685 	}
686 	{   int m = z->l - z->c; (void) m; /* try, line 209 */
687 	    z->ket = z->c; /* [, line 209 */
688 	    if (!(eq_s_b(z, 2, s_9))) { z->c = z->l - m; goto lab8; }
689 	    z->bra = z->c; /* ], line 209 */
690 	    {	int ret;
691 		ret = slice_del(z); /* delete, line 209 */
692 		if (ret < 0) return ret;
693 	    }
694 	lab8:
695 	    ;
696 	}
697 	{   int m = z->l - z->c; (void) m; /* do, line 212 */
698 	    {	int ret = r_derivational(z);
699 		if (ret == 0) goto lab9; /* call derivational, line 212 */
700 		if (ret < 0) return ret;
701 	    }
702 	lab9:
703 	    z->c = z->l - m;
704 	}
705 	{   int m = z->l - z->c; (void) m; /* do, line 213 */
706 	    {	int ret = r_tidy_up(z);
707 		if (ret == 0) goto lab10; /* call tidy_up, line 213 */
708 		if (ret < 0) return ret;
709 	    }
710 	lab10:
711 	    z->c = z->l - m;
712 	}
713 	z->lb = m3;
714     }
715     z->c = z->lb;
716     return 1;
717 }
718 
719 extern struct SN_env * russian_UTF_8_create_env(void) { return SN_create_env(0, 2, 0); }
720 
721 extern void russian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z); }