Line data Source code
1 : /* Generated from polish.sbl by Snowball 3.0.0 - https://snowballstem.org/ */
2 :
3 : #include "stem_ISO_8859_2_polish.h"
4 :
5 : #include <stddef.h>
6 :
7 : #include "snowball_runtime.h"
8 :
9 : struct SN_local {
10 : struct SN_env z;
11 : int i_p1;
12 : };
13 :
14 : typedef struct SN_local SN_local;
15 :
16 : #ifdef __cplusplus
17 : extern "C" {
18 : #endif
19 : extern int polish_ISO_8859_2_stem(struct SN_env * z);
20 : #ifdef __cplusplus
21 : }
22 : #endif
23 :
24 : static int r_R1(struct SN_env * z);
25 : static int r_normalize_consonant(struct SN_env * z);
26 : static int r_remove_endings(struct SN_env * z);
27 : static int r_mark_regions(struct SN_env * z);
28 :
29 : static const symbol s_0[] = { 's' };
30 : static const symbol s_1[] = { 's' };
31 : static const symbol s_2[] = { 0xB3 };
32 : static const symbol s_3[] = { 's' };
33 : static const symbol s_4[] = { 'c' };
34 : static const symbol s_5[] = { 'n' };
35 : static const symbol s_6[] = { 's' };
36 : static const symbol s_7[] = { 'z' };
37 :
38 : static const symbol s_0_0[6] = { 'b', 'y', 0xB6, 'c', 'i', 'e' };
39 : static const symbol s_0_1[3] = { 'b', 'y', 'm' };
40 : static const symbol s_0_2[2] = { 'b', 'y' };
41 : static const symbol s_0_3[5] = { 'b', 'y', 0xB6, 'm', 'y' };
42 : static const symbol s_0_4[3] = { 'b', 'y', 0xB6 };
43 : static const struct among a_0[5] = {
44 : { 6, s_0_0, 0, 1, 0},
45 : { 3, s_0_1, 0, 1, 0},
46 : { 2, s_0_2, 0, 1, 0},
47 : { 5, s_0_3, 0, 1, 0},
48 : { 3, s_0_4, 0, 1, 0}
49 : };
50 :
51 : static const symbol s_1_0[2] = { 0xB1, 'c' };
52 : static const symbol s_1_1[4] = { 'a', 'j', 0xB1, 'c' };
53 : static const symbol s_1_2[4] = { 's', 'z', 0xB1, 'c' };
54 : static const symbol s_1_3[2] = { 's', 'z' };
55 : static const symbol s_1_4[5] = { 'i', 'e', 'j', 's', 'z' };
56 : static const struct among a_1[5] = {
57 : { 2, s_1_0, 0, 1, 0},
58 : { 4, s_1_1, -1, 1, 0},
59 : { 4, s_1_2, -2, 2, 0},
60 : { 2, s_1_3, 0, 1, 0},
61 : { 5, s_1_4, -1, 1, 0}
62 : };
63 :
64 : static const symbol s_2_0[1] = { 'a' };
65 : static const symbol s_2_1[3] = { 0xB1, 'c', 'a' };
66 : static const symbol s_2_2[5] = { 'a', 'j', 0xB1, 'c', 'a' };
67 : static const symbol s_2_3[5] = { 's', 'z', 0xB1, 'c', 'a' };
68 : static const symbol s_2_4[2] = { 'i', 'a' };
69 : static const symbol s_2_5[3] = { 's', 'z', 'a' };
70 : static const symbol s_2_6[6] = { 'i', 'e', 'j', 's', 'z', 'a' };
71 : static const symbol s_2_7[3] = { 'a', 0xB3, 'a' };
72 : static const symbol s_2_8[4] = { 'i', 'a', 0xB3, 'a' };
73 : static const symbol s_2_9[3] = { 'i', 0xB3, 'a' };
74 : static const symbol s_2_10[2] = { 0xB1, 'c' };
75 : static const symbol s_2_11[4] = { 'a', 'j', 0xB1, 'c' };
76 : static const symbol s_2_12[1] = { 'e' };
77 : static const symbol s_2_13[3] = { 0xB1, 'c', 'e' };
78 : static const symbol s_2_14[5] = { 'a', 'j', 0xB1, 'c', 'e' };
79 : static const symbol s_2_15[5] = { 's', 'z', 0xB1, 'c', 'e' };
80 : static const symbol s_2_16[2] = { 'i', 'e' };
81 : static const symbol s_2_17[3] = { 'c', 'i', 'e' };
82 : static const symbol s_2_18[4] = { 'a', 'c', 'i', 'e' };
83 : static const symbol s_2_19[4] = { 'e', 'c', 'i', 'e' };
84 : static const symbol s_2_20[4] = { 'i', 'c', 'i', 'e' };
85 : static const symbol s_2_21[5] = { 'a', 'j', 'c', 'i', 'e' };
86 : static const symbol s_2_22[6] = { 'l', 'i', 0xB6, 'c', 'i', 'e' };
87 : static const symbol s_2_23[7] = { 'a', 'l', 'i', 0xB6, 'c', 'i', 'e' };
88 : static const symbol s_2_24[8] = { 'i', 'e', 'l', 'i', 0xB6, 'c', 'i', 'e' };
89 : static const symbol s_2_25[7] = { 'i', 'l', 'i', 0xB6, 'c', 'i', 'e' };
90 : static const symbol s_2_26[6] = { 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
91 : static const symbol s_2_27[7] = { 'a', 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
92 : static const symbol s_2_28[8] = { 'i', 'a', 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
93 : static const symbol s_2_29[7] = { 'i', 0xB3, 'y', 0xB6, 'c', 'i', 'e' };
94 : static const symbol s_2_30[3] = { 's', 'z', 'e' };
95 : static const symbol s_2_31[6] = { 'i', 'e', 'j', 's', 'z', 'e' };
96 : static const symbol s_2_32[3] = { 'a', 'c', 'h' };
97 : static const symbol s_2_33[4] = { 'i', 'a', 'c', 'h' };
98 : static const symbol s_2_34[3] = { 'i', 'c', 'h' };
99 : static const symbol s_2_35[3] = { 'y', 'c', 'h' };
100 : static const symbol s_2_36[1] = { 'i' };
101 : static const symbol s_2_37[3] = { 'a', 'l', 'i' };
102 : static const symbol s_2_38[4] = { 'i', 'e', 'l', 'i' };
103 : static const symbol s_2_39[3] = { 'i', 'l', 'i' };
104 : static const symbol s_2_40[3] = { 'a', 'm', 'i' };
105 : static const symbol s_2_41[4] = { 'i', 'a', 'm', 'i' };
106 : static const symbol s_2_42[3] = { 'i', 'm', 'i' };
107 : static const symbol s_2_43[3] = { 'y', 'm', 'i' };
108 : static const symbol s_2_44[3] = { 'o', 'w', 'i' };
109 : static const symbol s_2_45[4] = { 'i', 'o', 'w', 'i' };
110 : static const symbol s_2_46[2] = { 'a', 'j' };
111 : static const symbol s_2_47[2] = { 'e', 'j' };
112 : static const symbol s_2_48[3] = { 'i', 'e', 'j' };
113 : static const symbol s_2_49[2] = { 'a', 'm' };
114 : static const symbol s_2_50[4] = { 'a', 0xB3, 'a', 'm' };
115 : static const symbol s_2_51[5] = { 'i', 'a', 0xB3, 'a', 'm' };
116 : static const symbol s_2_52[4] = { 'i', 0xB3, 'a', 'm' };
117 : static const symbol s_2_53[2] = { 'e', 'm' };
118 : static const symbol s_2_54[3] = { 'i', 'e', 'm' };
119 : static const symbol s_2_55[4] = { 'a', 0xB3, 'e', 'm' };
120 : static const symbol s_2_56[5] = { 'i', 'a', 0xB3, 'e', 'm' };
121 : static const symbol s_2_57[4] = { 'i', 0xB3, 'e', 'm' };
122 : static const symbol s_2_58[2] = { 'i', 'm' };
123 : static const symbol s_2_59[2] = { 'o', 'm' };
124 : static const symbol s_2_60[3] = { 'i', 'o', 'm' };
125 : static const symbol s_2_61[2] = { 'y', 'm' };
126 : static const symbol s_2_62[1] = { 'o' };
127 : static const symbol s_2_63[3] = { 'e', 'g', 'o' };
128 : static const symbol s_2_64[4] = { 'i', 'e', 'g', 'o' };
129 : static const symbol s_2_65[3] = { 'a', 0xB3, 'o' };
130 : static const symbol s_2_66[4] = { 'i', 'a', 0xB3, 'o' };
131 : static const symbol s_2_67[3] = { 'i', 0xB3, 'o' };
132 : static const symbol s_2_68[1] = { 'u' };
133 : static const symbol s_2_69[2] = { 'i', 'u' };
134 : static const symbol s_2_70[3] = { 'e', 'm', 'u' };
135 : static const symbol s_2_71[4] = { 'i', 'e', 'm', 'u' };
136 : static const symbol s_2_72[2] = { 0xF3, 'w' };
137 : static const symbol s_2_73[1] = { 'y' };
138 : static const symbol s_2_74[3] = { 'a', 'm', 'y' };
139 : static const symbol s_2_75[3] = { 'e', 'm', 'y' };
140 : static const symbol s_2_76[3] = { 'i', 'm', 'y' };
141 : static const symbol s_2_77[5] = { 'l', 'i', 0xB6, 'm', 'y' };
142 : static const symbol s_2_78[6] = { 'a', 'l', 'i', 0xB6, 'm', 'y' };
143 : static const symbol s_2_79[7] = { 'i', 'e', 'l', 'i', 0xB6, 'm', 'y' };
144 : static const symbol s_2_80[6] = { 'i', 'l', 'i', 0xB6, 'm', 'y' };
145 : static const symbol s_2_81[5] = { 0xB3, 'y', 0xB6, 'm', 'y' };
146 : static const symbol s_2_82[6] = { 'a', 0xB3, 'y', 0xB6, 'm', 'y' };
147 : static const symbol s_2_83[7] = { 'i', 'a', 0xB3, 'y', 0xB6, 'm', 'y' };
148 : static const symbol s_2_84[6] = { 'i', 0xB3, 'y', 0xB6, 'm', 'y' };
149 : static const symbol s_2_85[3] = { 'a', 0xB3, 'y' };
150 : static const symbol s_2_86[4] = { 'i', 'a', 0xB3, 'y' };
151 : static const symbol s_2_87[3] = { 'i', 0xB3, 'y' };
152 : static const symbol s_2_88[3] = { 'a', 's', 'z' };
153 : static const symbol s_2_89[3] = { 'e', 's', 'z' };
154 : static const symbol s_2_90[3] = { 'i', 's', 'z' };
155 : static const symbol s_2_91[1] = { 0xB1 };
156 : static const symbol s_2_92[3] = { 0xB1, 'c', 0xB1 };
157 : static const symbol s_2_93[5] = { 'a', 'j', 0xB1, 'c', 0xB1 };
158 : static const symbol s_2_94[5] = { 's', 'z', 0xB1, 'c', 0xB1 };
159 : static const symbol s_2_95[2] = { 'i', 0xB1 };
160 : static const symbol s_2_96[3] = { 'a', 'j', 0xB1 };
161 : static const symbol s_2_97[3] = { 's', 'z', 0xB1 };
162 : static const symbol s_2_98[6] = { 'i', 'e', 'j', 's', 'z', 0xB1 };
163 : static const symbol s_2_99[2] = { 'a', 0xB3 };
164 : static const symbol s_2_100[3] = { 'i', 'a', 0xB3 };
165 : static const symbol s_2_101[2] = { 'i', 0xB3 };
166 : static const symbol s_2_102[3] = { 0xB3, 'a', 0xB6 };
167 : static const symbol s_2_103[4] = { 'a', 0xB3, 'a', 0xB6 };
168 : static const symbol s_2_104[5] = { 'i', 'a', 0xB3, 'a', 0xB6 };
169 : static const symbol s_2_105[4] = { 'i', 0xB3, 'a', 0xB6 };
170 : static const symbol s_2_106[3] = { 0xB3, 'e', 0xB6 };
171 : static const symbol s_2_107[4] = { 'a', 0xB3, 'e', 0xB6 };
172 : static const symbol s_2_108[5] = { 'i', 'a', 0xB3, 'e', 0xB6 };
173 : static const symbol s_2_109[4] = { 'i', 0xB3, 'e', 0xB6 };
174 : static const symbol s_2_110[2] = { 'a', 0xE6 };
175 : static const symbol s_2_111[3] = { 'i', 'e', 0xE6 };
176 : static const symbol s_2_112[2] = { 'i', 0xE6 };
177 : static const symbol s_2_113[2] = { 0xB1, 0xE6 };
178 : static const symbol s_2_114[3] = { 'a', 0xB6, 0xE6 };
179 : static const symbol s_2_115[3] = { 'e', 0xB6, 0xE6 };
180 : static const symbol s_2_116[1] = { 0xEA };
181 : static const symbol s_2_117[3] = { 's', 'z', 0xEA };
182 : static const struct among a_2[118] = {
183 : { 1, s_2_0, 0, 1, 1},
184 : { 3, s_2_1, -1, 1, 0},
185 : { 5, s_2_2, -1, 1, 0},
186 : { 5, s_2_3, -2, 2, 0},
187 : { 2, s_2_4, -4, 1, 1},
188 : { 3, s_2_5, -5, 1, 0},
189 : { 6, s_2_6, -1, 1, 0},
190 : { 3, s_2_7, -7, 1, 0},
191 : { 4, s_2_8, -1, 1, 0},
192 : { 3, s_2_9, -9, 1, 0},
193 : { 2, s_2_10, 0, 1, 0},
194 : { 4, s_2_11, -1, 1, 0},
195 : { 1, s_2_12, 0, 1, 1},
196 : { 3, s_2_13, -1, 1, 0},
197 : { 5, s_2_14, -1, 1, 0},
198 : { 5, s_2_15, -2, 2, 0},
199 : { 2, s_2_16, -4, 1, 1},
200 : { 3, s_2_17, -1, 1, 0},
201 : { 4, s_2_18, -1, 1, 0},
202 : { 4, s_2_19, -2, 1, 0},
203 : { 4, s_2_20, -3, 1, 0},
204 : { 5, s_2_21, -4, 1, 0},
205 : { 6, s_2_22, -5, 4, 0},
206 : { 7, s_2_23, -1, 1, 0},
207 : { 8, s_2_24, -2, 1, 0},
208 : { 7, s_2_25, -3, 1, 0},
209 : { 6, s_2_26, -9, 4, 0},
210 : { 7, s_2_27, -1, 1, 0},
211 : { 8, s_2_28, -1, 1, 0},
212 : { 7, s_2_29, -3, 1, 0},
213 : { 3, s_2_30, -18, 1, 0},
214 : { 6, s_2_31, -1, 1, 0},
215 : { 3, s_2_32, 0, 1, 1},
216 : { 4, s_2_33, -1, 1, 1},
217 : { 3, s_2_34, 0, 5, 0},
218 : { 3, s_2_35, 0, 5, 0},
219 : { 1, s_2_36, 0, 1, 1},
220 : { 3, s_2_37, -1, 1, 0},
221 : { 4, s_2_38, -2, 1, 0},
222 : { 3, s_2_39, -3, 1, 0},
223 : { 3, s_2_40, -4, 1, 1},
224 : { 4, s_2_41, -1, 1, 1},
225 : { 3, s_2_42, -6, 5, 0},
226 : { 3, s_2_43, -7, 5, 0},
227 : { 3, s_2_44, -8, 1, 1},
228 : { 4, s_2_45, -1, 1, 1},
229 : { 2, s_2_46, 0, 1, 0},
230 : { 2, s_2_47, 0, 5, 0},
231 : { 3, s_2_48, -1, 5, 0},
232 : { 2, s_2_49, 0, 1, 0},
233 : { 4, s_2_50, -1, 1, 0},
234 : { 5, s_2_51, -1, 1, 0},
235 : { 4, s_2_52, -3, 1, 0},
236 : { 2, s_2_53, 0, 1, 1},
237 : { 3, s_2_54, -1, 1, 1},
238 : { 4, s_2_55, -2, 1, 0},
239 : { 5, s_2_56, -1, 1, 0},
240 : { 4, s_2_57, -4, 1, 0},
241 : { 2, s_2_58, 0, 5, 0},
242 : { 2, s_2_59, 0, 1, 1},
243 : { 3, s_2_60, -1, 1, 1},
244 : { 2, s_2_61, 0, 5, 0},
245 : { 1, s_2_62, 0, 1, 1},
246 : { 3, s_2_63, -1, 5, 0},
247 : { 4, s_2_64, -1, 5, 0},
248 : { 3, s_2_65, -3, 1, 0},
249 : { 4, s_2_66, -1, 1, 0},
250 : { 3, s_2_67, -5, 1, 0},
251 : { 1, s_2_68, 0, 1, 1},
252 : { 2, s_2_69, -1, 1, 1},
253 : { 3, s_2_70, -2, 5, 0},
254 : { 4, s_2_71, -1, 5, 0},
255 : { 2, s_2_72, 0, 1, 1},
256 : { 1, s_2_73, 0, 5, 0},
257 : { 3, s_2_74, -1, 1, 0},
258 : { 3, s_2_75, -2, 1, 0},
259 : { 3, s_2_76, -3, 1, 0},
260 : { 5, s_2_77, -4, 4, 0},
261 : { 6, s_2_78, -1, 1, 0},
262 : { 7, s_2_79, -2, 1, 0},
263 : { 6, s_2_80, -3, 1, 0},
264 : { 5, s_2_81, -8, 4, 0},
265 : { 6, s_2_82, -1, 1, 0},
266 : { 7, s_2_83, -1, 1, 0},
267 : { 6, s_2_84, -3, 1, 0},
268 : { 3, s_2_85, -12, 1, 0},
269 : { 4, s_2_86, -1, 1, 0},
270 : { 3, s_2_87, -14, 1, 0},
271 : { 3, s_2_88, 0, 1, 0},
272 : { 3, s_2_89, 0, 1, 0},
273 : { 3, s_2_90, 0, 1, 0},
274 : { 1, s_2_91, 0, 1, 1},
275 : { 3, s_2_92, -1, 1, 0},
276 : { 5, s_2_93, -1, 1, 0},
277 : { 5, s_2_94, -2, 2, 0},
278 : { 2, s_2_95, -4, 1, 1},
279 : { 3, s_2_96, -5, 1, 0},
280 : { 3, s_2_97, -6, 3, 0},
281 : { 6, s_2_98, -1, 1, 0},
282 : { 2, s_2_99, 0, 1, 0},
283 : { 3, s_2_100, -1, 1, 0},
284 : { 2, s_2_101, 0, 1, 0},
285 : { 3, s_2_102, 0, 4, 0},
286 : { 4, s_2_103, -1, 1, 0},
287 : { 5, s_2_104, -1, 1, 0},
288 : { 4, s_2_105, -3, 1, 0},
289 : { 3, s_2_106, 0, 4, 0},
290 : { 4, s_2_107, -1, 1, 0},
291 : { 5, s_2_108, -1, 1, 0},
292 : { 4, s_2_109, -3, 1, 0},
293 : { 2, s_2_110, 0, 1, 0},
294 : { 3, s_2_111, 0, 1, 0},
295 : { 2, s_2_112, 0, 1, 0},
296 : { 2, s_2_113, 0, 1, 0},
297 : { 3, s_2_114, 0, 1, 0},
298 : { 3, s_2_115, 0, 1, 0},
299 : { 1, s_2_116, 0, 1, 0},
300 : { 3, s_2_117, -1, 2, 0}
301 : };
302 :
303 : static const symbol s_3_0[1] = { 0xB6 };
304 : static const symbol s_3_1[1] = { 0xBC };
305 : static const symbol s_3_2[1] = { 0xE6 };
306 : static const symbol s_3_3[1] = { 0xF1 };
307 : static const struct among a_3[4] = {
308 : { 1, s_3_0, 0, 3, 0},
309 : { 1, s_3_1, 0, 4, 0},
310 : { 1, s_3_2, 0, 1, 0},
311 : { 1, s_3_3, 0, 2, 0}
312 : };
313 :
314 : static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, 4 };
315 :
316 0 : static int r_mark_regions(struct SN_env * z) {
317 0 : ((SN_local *)z)->i_p1 = z->l;
318 : {
319 0 : int ret = out_grouping(z, g_v, 97, 243, 1);
320 0 : if (ret < 0) return 0;
321 0 : z->c += ret;
322 : }
323 : {
324 0 : int ret = in_grouping(z, g_v, 97, 243, 1);
325 0 : if (ret < 0) return 0;
326 0 : z->c += ret;
327 : }
328 0 : ((SN_local *)z)->i_p1 = z->c;
329 0 : return 1;
330 : }
331 :
332 0 : static int r_R1(struct SN_env * z) {
333 0 : return ((SN_local *)z)->i_p1 <= z->c;
334 : }
335 :
336 0 : static int r_remove_endings(struct SN_env * z) {
337 : int among_var;
338 : {
339 0 : int v_1 = z->l - z->c;
340 : {
341 : int v_2;
342 0 : if (z->c < ((SN_local *)z)->i_p1) goto lab0;
343 0 : v_2 = z->lb; z->lb = ((SN_local *)z)->i_p1;
344 0 : z->ket = z->c;
345 0 : if (!find_among_b(z, a_0, 5, 0)) { z->lb = v_2; goto lab0; }
346 0 : z->bra = z->c;
347 0 : z->lb = v_2;
348 : }
349 : {
350 0 : int ret = slice_del(z);
351 0 : if (ret < 0) return ret;
352 : }
353 0 : lab0:
354 0 : z->c = z->l - v_1;
355 : }
356 0 : z->ket = z->c;
357 0 : among_var = find_among_b(z, a_2, 118, r_R1);
358 0 : if (!among_var) return 0;
359 0 : z->bra = z->c;
360 0 : switch (among_var) {
361 0 : case 1:
362 : {
363 0 : int ret = slice_del(z);
364 0 : if (ret < 0) return ret;
365 : }
366 0 : break;
367 0 : case 2:
368 : {
369 0 : int ret = slice_from_s(z, 1, s_0);
370 0 : if (ret < 0) return ret;
371 : }
372 0 : break;
373 0 : case 3:
374 : do {
375 0 : int v_3 = z->l - z->c;
376 : {
377 0 : int v_4 = z->l - z->c;
378 : {
379 0 : int ret = r_R1(z);
380 0 : if (ret == 0) goto lab1;
381 0 : if (ret < 0) return ret;
382 : }
383 0 : z->c = z->l - v_4;
384 : {
385 0 : int ret = slice_del(z);
386 0 : if (ret < 0) return ret;
387 : }
388 : }
389 0 : break;
390 0 : lab1:
391 0 : z->c = z->l - v_3;
392 : {
393 0 : int ret = slice_from_s(z, 1, s_1);
394 0 : if (ret < 0) return ret;
395 : }
396 : } while (0);
397 0 : break;
398 0 : case 4:
399 : {
400 0 : int ret = slice_from_s(z, 1, s_2);
401 0 : if (ret < 0) return ret;
402 : }
403 0 : break;
404 0 : case 5:
405 : {
406 0 : int ret = slice_del(z);
407 0 : if (ret < 0) return ret;
408 : }
409 : {
410 0 : int v_5 = z->l - z->c;
411 0 : z->ket = z->c;
412 0 : if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 99 && z->p[z->c - 1] != 122)) { z->c = z->l - v_5; goto lab2; }
413 0 : among_var = find_among_b(z, a_1, 5, 0);
414 0 : if (!among_var) { z->c = z->l - v_5; goto lab2; }
415 0 : z->bra = z->c;
416 : switch (among_var) {
417 0 : case 1:
418 : {
419 0 : int ret = slice_del(z);
420 0 : if (ret < 0) return ret;
421 : }
422 0 : break;
423 0 : case 2:
424 : {
425 0 : int ret = slice_from_s(z, 1, s_3);
426 0 : if (ret < 0) return ret;
427 : }
428 0 : break;
429 : }
430 0 : lab2:
431 : ;
432 : }
433 0 : break;
434 : }
435 0 : return 1;
436 : }
437 :
438 0 : static int r_normalize_consonant(struct SN_env * z) {
439 : int among_var;
440 0 : z->ket = z->c;
441 0 : among_var = find_among_b(z, a_3, 4, 0);
442 0 : if (!among_var) return 0;
443 0 : z->bra = z->c;
444 0 : if (z->c > z->lb) goto lab0;
445 0 : return 0;
446 0 : lab0:
447 0 : switch (among_var) {
448 0 : case 1:
449 : {
450 0 : int ret = slice_from_s(z, 1, s_4);
451 0 : if (ret < 0) return ret;
452 : }
453 0 : break;
454 0 : case 2:
455 : {
456 0 : int ret = slice_from_s(z, 1, s_5);
457 0 : if (ret < 0) return ret;
458 : }
459 0 : break;
460 0 : case 3:
461 : {
462 0 : int ret = slice_from_s(z, 1, s_6);
463 0 : if (ret < 0) return ret;
464 : }
465 0 : break;
466 0 : case 4:
467 : {
468 0 : int ret = slice_from_s(z, 1, s_7);
469 0 : if (ret < 0) return ret;
470 : }
471 0 : break;
472 : }
473 0 : return 1;
474 : }
475 :
476 0 : extern int polish_ISO_8859_2_stem(struct SN_env * z) {
477 : {
478 0 : int v_1 = z->c;
479 : {
480 0 : int ret = r_mark_regions(z);
481 0 : if (ret < 0) return ret;
482 : }
483 0 : z->c = v_1;
484 : }
485 : do {
486 0 : int v_2 = z->c;
487 0 : if (z->c + 2 > z->l) goto lab0;
488 0 : z->c += 2;
489 0 : z->lb = z->c; z->c = z->l;
490 : {
491 0 : int ret = r_remove_endings(z);
492 0 : if (ret == 0) goto lab0;
493 0 : if (ret < 0) return ret;
494 : }
495 0 : z->c = z->lb;
496 0 : break;
497 0 : lab0:
498 0 : z->c = v_2;
499 0 : z->lb = z->c; z->c = z->l;
500 : {
501 0 : int ret = r_normalize_consonant(z);
502 0 : if (ret <= 0) return ret;
503 : }
504 0 : z->c = z->lb;
505 : } while (0);
506 0 : return 1;
507 : }
508 :
509 0 : extern struct SN_env * polish_ISO_8859_2_create_env(void) {
510 0 : struct SN_env * z = SN_new_env(sizeof(SN_local));
511 0 : if (z) {
512 0 : ((SN_local *)z)->i_p1 = 0;
513 : }
514 0 : return z;
515 : }
516 :
517 0 : extern void polish_ISO_8859_2_close_env(struct SN_env * z) {
518 0 : SN_delete_env(z);
519 0 : }
520 :
|