00001
00002
00003
00004 #include "header.h"
00005
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 extern int finnish_ISO_8859_1_stem(struct SN_env * z);
00010 #ifdef __cplusplus
00011 }
00012 #endif
00013 static int r_tidy(struct SN_env * z);
00014 static int r_other_endings(struct SN_env * z);
00015 static int r_t_plural(struct SN_env * z);
00016 static int r_i_plural(struct SN_env * z);
00017 static int r_case_ending(struct SN_env * z);
00018 static int r_VI(struct SN_env * z);
00019 static int r_LONG(struct SN_env * z);
00020 static int r_possessive(struct SN_env * z);
00021 static int r_particle_etc(struct SN_env * z);
00022 static int r_R2(struct SN_env * z);
00023 static int r_mark_regions(struct SN_env * z);
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027
00028
00029 extern struct SN_env * finnish_ISO_8859_1_create_env(void);
00030 extern void finnish_ISO_8859_1_close_env(struct SN_env * z);
00031
00032
00033 #ifdef __cplusplus
00034 }
00035 #endif
00036 static const symbol s_0_0[2] = { 'p', 'a' };
00037 static const symbol s_0_1[3] = { 's', 't', 'i' };
00038 static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
00039 static const symbol s_0_3[3] = { 'h', 'a', 'n' };
00040 static const symbol s_0_4[3] = { 'k', 'i', 'n' };
00041 static const symbol s_0_5[3] = { 'h', 0xE4, 'n' };
00042 static const symbol s_0_6[4] = { 'k', 0xE4, 0xE4, 'n' };
00043 static const symbol s_0_7[2] = { 'k', 'o' };
00044 static const symbol s_0_8[2] = { 'p', 0xE4 };
00045 static const symbol s_0_9[2] = { 'k', 0xF6 };
00046
00047 static const struct among a_0[10] =
00048 {
00049 { 2, s_0_0, -1, 1, 0},
00050 { 3, s_0_1, -1, 2, 0},
00051 { 4, s_0_2, -1, 1, 0},
00052 { 3, s_0_3, -1, 1, 0},
00053 { 3, s_0_4, -1, 1, 0},
00054 { 3, s_0_5, -1, 1, 0},
00055 { 4, s_0_6, -1, 1, 0},
00056 { 2, s_0_7, -1, 1, 0},
00057 { 2, s_0_8, -1, 1, 0},
00058 { 2, s_0_9, -1, 1, 0}
00059 };
00060
00061 static const symbol s_1_0[3] = { 'l', 'l', 'a' };
00062 static const symbol s_1_1[2] = { 'n', 'a' };
00063 static const symbol s_1_2[3] = { 's', 's', 'a' };
00064 static const symbol s_1_3[2] = { 't', 'a' };
00065 static const symbol s_1_4[3] = { 'l', 't', 'a' };
00066 static const symbol s_1_5[3] = { 's', 't', 'a' };
00067
00068 static const struct among a_1[6] =
00069 {
00070 { 3, s_1_0, -1, -1, 0},
00071 { 2, s_1_1, -1, -1, 0},
00072 { 3, s_1_2, -1, -1, 0},
00073 { 2, s_1_3, -1, -1, 0},
00074 { 3, s_1_4, 3, -1, 0},
00075 { 3, s_1_5, 3, -1, 0}
00076 };
00077
00078 static const symbol s_2_0[3] = { 'l', 'l', 0xE4 };
00079 static const symbol s_2_1[2] = { 'n', 0xE4 };
00080 static const symbol s_2_2[3] = { 's', 's', 0xE4 };
00081 static const symbol s_2_3[2] = { 't', 0xE4 };
00082 static const symbol s_2_4[3] = { 'l', 't', 0xE4 };
00083 static const symbol s_2_5[3] = { 's', 't', 0xE4 };
00084
00085 static const struct among a_2[6] =
00086 {
00087 { 3, s_2_0, -1, -1, 0},
00088 { 2, s_2_1, -1, -1, 0},
00089 { 3, s_2_2, -1, -1, 0},
00090 { 2, s_2_3, -1, -1, 0},
00091 { 3, s_2_4, 3, -1, 0},
00092 { 3, s_2_5, 3, -1, 0}
00093 };
00094
00095 static const symbol s_3_0[3] = { 'l', 'l', 'e' };
00096 static const symbol s_3_1[3] = { 'i', 'n', 'e' };
00097
00098 static const struct among a_3[2] =
00099 {
00100 { 3, s_3_0, -1, -1, 0},
00101 { 3, s_3_1, -1, -1, 0}
00102 };
00103
00104 static const symbol s_4_0[3] = { 'n', 's', 'a' };
00105 static const symbol s_4_1[3] = { 'm', 'm', 'e' };
00106 static const symbol s_4_2[3] = { 'n', 'n', 'e' };
00107 static const symbol s_4_3[2] = { 'n', 'i' };
00108 static const symbol s_4_4[2] = { 's', 'i' };
00109 static const symbol s_4_5[2] = { 'a', 'n' };
00110 static const symbol s_4_6[2] = { 'e', 'n' };
00111 static const symbol s_4_7[2] = { 0xE4, 'n' };
00112 static const symbol s_4_8[3] = { 'n', 's', 0xE4 };
00113
00114 static const struct among a_4[9] =
00115 {
00116 { 3, s_4_0, -1, 3, 0},
00117 { 3, s_4_1, -1, 3, 0},
00118 { 3, s_4_2, -1, 3, 0},
00119 { 2, s_4_3, -1, 2, 0},
00120 { 2, s_4_4, -1, 1, 0},
00121 { 2, s_4_5, -1, 4, 0},
00122 { 2, s_4_6, -1, 6, 0},
00123 { 2, s_4_7, -1, 5, 0},
00124 { 3, s_4_8, -1, 3, 0}
00125 };
00126
00127 static const symbol s_5_0[2] = { 'a', 'a' };
00128 static const symbol s_5_1[2] = { 'e', 'e' };
00129 static const symbol s_5_2[2] = { 'i', 'i' };
00130 static const symbol s_5_3[2] = { 'o', 'o' };
00131 static const symbol s_5_4[2] = { 'u', 'u' };
00132 static const symbol s_5_5[2] = { 0xE4, 0xE4 };
00133 static const symbol s_5_6[2] = { 0xF6, 0xF6 };
00134
00135 static const struct among a_5[7] =
00136 {
00137 { 2, s_5_0, -1, -1, 0},
00138 { 2, s_5_1, -1, -1, 0},
00139 { 2, s_5_2, -1, -1, 0},
00140 { 2, s_5_3, -1, -1, 0},
00141 { 2, s_5_4, -1, -1, 0},
00142 { 2, s_5_5, -1, -1, 0},
00143 { 2, s_5_6, -1, -1, 0}
00144 };
00145
00146 static const symbol s_6_0[1] = { 'a' };
00147 static const symbol s_6_1[3] = { 'l', 'l', 'a' };
00148 static const symbol s_6_2[2] = { 'n', 'a' };
00149 static const symbol s_6_3[3] = { 's', 's', 'a' };
00150 static const symbol s_6_4[2] = { 't', 'a' };
00151 static const symbol s_6_5[3] = { 'l', 't', 'a' };
00152 static const symbol s_6_6[3] = { 's', 't', 'a' };
00153 static const symbol s_6_7[3] = { 't', 't', 'a' };
00154 static const symbol s_6_8[3] = { 'l', 'l', 'e' };
00155 static const symbol s_6_9[3] = { 'i', 'n', 'e' };
00156 static const symbol s_6_10[3] = { 'k', 's', 'i' };
00157 static const symbol s_6_11[1] = { 'n' };
00158 static const symbol s_6_12[3] = { 'h', 'a', 'n' };
00159 static const symbol s_6_13[3] = { 'd', 'e', 'n' };
00160 static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
00161 static const symbol s_6_15[3] = { 'h', 'e', 'n' };
00162 static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
00163 static const symbol s_6_17[3] = { 'h', 'i', 'n' };
00164 static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
00165 static const symbol s_6_19[3] = { 'h', 'o', 'n' };
00166 static const symbol s_6_20[3] = { 'h', 0xE4, 'n' };
00167 static const symbol s_6_21[3] = { 'h', 0xF6, 'n' };
00168 static const symbol s_6_22[1] = { 0xE4 };
00169 static const symbol s_6_23[3] = { 'l', 'l', 0xE4 };
00170 static const symbol s_6_24[2] = { 'n', 0xE4 };
00171 static const symbol s_6_25[3] = { 's', 's', 0xE4 };
00172 static const symbol s_6_26[2] = { 't', 0xE4 };
00173 static const symbol s_6_27[3] = { 'l', 't', 0xE4 };
00174 static const symbol s_6_28[3] = { 's', 't', 0xE4 };
00175 static const symbol s_6_29[3] = { 't', 't', 0xE4 };
00176
00177 static const struct among a_6[30] =
00178 {
00179 { 1, s_6_0, -1, 8, 0},
00180 { 3, s_6_1, 0, -1, 0},
00181 { 2, s_6_2, 0, -1, 0},
00182 { 3, s_6_3, 0, -1, 0},
00183 { 2, s_6_4, 0, -1, 0},
00184 { 3, s_6_5, 4, -1, 0},
00185 { 3, s_6_6, 4, -1, 0},
00186 { 3, s_6_7, 4, 9, 0},
00187 { 3, s_6_8, -1, -1, 0},
00188 { 3, s_6_9, -1, -1, 0},
00189 { 3, s_6_10, -1, -1, 0},
00190 { 1, s_6_11, -1, 7, 0},
00191 { 3, s_6_12, 11, 1, 0},
00192 { 3, s_6_13, 11, -1, r_VI},
00193 { 4, s_6_14, 11, -1, r_LONG},
00194 { 3, s_6_15, 11, 2, 0},
00195 { 4, s_6_16, 11, -1, r_VI},
00196 { 3, s_6_17, 11, 3, 0},
00197 { 4, s_6_18, 11, -1, r_VI},
00198 { 3, s_6_19, 11, 4, 0},
00199 { 3, s_6_20, 11, 5, 0},
00200 { 3, s_6_21, 11, 6, 0},
00201 { 1, s_6_22, -1, 8, 0},
00202 { 3, s_6_23, 22, -1, 0},
00203 { 2, s_6_24, 22, -1, 0},
00204 { 3, s_6_25, 22, -1, 0},
00205 { 2, s_6_26, 22, -1, 0},
00206 { 3, s_6_27, 26, -1, 0},
00207 { 3, s_6_28, 26, -1, 0},
00208 { 3, s_6_29, 26, 9, 0}
00209 };
00210
00211 static const symbol s_7_0[3] = { 'e', 'j', 'a' };
00212 static const symbol s_7_1[3] = { 'm', 'm', 'a' };
00213 static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
00214 static const symbol s_7_3[3] = { 'm', 'p', 'a' };
00215 static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
00216 static const symbol s_7_5[3] = { 'm', 'm', 'i' };
00217 static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
00218 static const symbol s_7_7[3] = { 'm', 'p', 'i' };
00219 static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
00220 static const symbol s_7_9[3] = { 'e', 'j', 0xE4 };
00221 static const symbol s_7_10[3] = { 'm', 'm', 0xE4 };
00222 static const symbol s_7_11[4] = { 'i', 'm', 'm', 0xE4 };
00223 static const symbol s_7_12[3] = { 'm', 'p', 0xE4 };
00224 static const symbol s_7_13[4] = { 'i', 'm', 'p', 0xE4 };
00225
00226 static const struct among a_7[14] =
00227 {
00228 { 3, s_7_0, -1, -1, 0},
00229 { 3, s_7_1, -1, 1, 0},
00230 { 4, s_7_2, 1, -1, 0},
00231 { 3, s_7_3, -1, 1, 0},
00232 { 4, s_7_4, 3, -1, 0},
00233 { 3, s_7_5, -1, 1, 0},
00234 { 4, s_7_6, 5, -1, 0},
00235 { 3, s_7_7, -1, 1, 0},
00236 { 4, s_7_8, 7, -1, 0},
00237 { 3, s_7_9, -1, -1, 0},
00238 { 3, s_7_10, -1, 1, 0},
00239 { 4, s_7_11, 10, -1, 0},
00240 { 3, s_7_12, -1, 1, 0},
00241 { 4, s_7_13, 12, -1, 0}
00242 };
00243
00244 static const symbol s_8_0[1] = { 'i' };
00245 static const symbol s_8_1[1] = { 'j' };
00246
00247 static const struct among a_8[2] =
00248 {
00249 { 1, s_8_0, -1, -1, 0},
00250 { 1, s_8_1, -1, -1, 0}
00251 };
00252
00253 static const symbol s_9_0[3] = { 'm', 'm', 'a' };
00254 static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
00255
00256 static const struct among a_9[2] =
00257 {
00258 { 3, s_9_0, -1, 1, 0},
00259 { 4, s_9_1, 0, -1, 0}
00260 };
00261
00262 static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
00263
00264 static const unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
00265
00266 static const unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
00267
00268 static const unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
00269
00270 static const symbol s_0[] = { 'k' };
00271 static const symbol s_1[] = { 'k', 's', 'e' };
00272 static const symbol s_2[] = { 'k', 's', 'i' };
00273 static const symbol s_3[] = { 'i' };
00274 static const symbol s_4[] = { 'a' };
00275 static const symbol s_5[] = { 'e' };
00276 static const symbol s_6[] = { 'i' };
00277 static const symbol s_7[] = { 'o' };
00278 static const symbol s_8[] = { 0xE4 };
00279 static const symbol s_9[] = { 0xF6 };
00280 static const symbol s_10[] = { 'i', 'e' };
00281 static const symbol s_11[] = { 'e' };
00282 static const symbol s_12[] = { 'p', 'o' };
00283 static const symbol s_13[] = { 't' };
00284 static const symbol s_14[] = { 'p', 'o' };
00285 static const symbol s_15[] = { 'j' };
00286 static const symbol s_16[] = { 'o' };
00287 static const symbol s_17[] = { 'u' };
00288 static const symbol s_18[] = { 'o' };
00289 static const symbol s_19[] = { 'j' };
00290
00291 static int r_mark_regions(struct SN_env * z) {
00292 z->I[0] = z->l;
00293 z->I[1] = z->l;
00294 if (out_grouping(z, g_V1, 97, 246, 1) < 0) return 0;
00295 {
00296 int ret = in_grouping(z, g_V1, 97, 246, 1);
00297 if (ret < 0) return 0;
00298 z->c += ret;
00299 }
00300 z->I[0] = z->c;
00301 if (out_grouping(z, g_V1, 97, 246, 1) < 0) return 0;
00302 {
00303 int ret = in_grouping(z, g_V1, 97, 246, 1);
00304 if (ret < 0) return 0;
00305 z->c += ret;
00306 }
00307 z->I[1] = z->c;
00308 return 1;
00309 }
00310
00311 static int r_R2(struct SN_env * z) {
00312 if (!(z->I[1] <= z->c)) return 0;
00313 return 1;
00314 }
00315
00316 static int r_particle_etc(struct SN_env * z) {
00317 int among_var;
00318 { int mlimit;
00319 int m1 = z->l - z->c; (void)m1;
00320 if (z->c < z->I[0]) return 0;
00321 z->c = z->I[0];
00322 mlimit = z->lb; z->lb = z->c;
00323 z->c = z->l - m1;
00324 z->ket = z->c;
00325 among_var = find_among_b(z, a_0, 10);
00326 if (!(among_var)) { z->lb = mlimit; return 0; }
00327 z->bra = z->c;
00328 z->lb = mlimit;
00329 }
00330 switch(among_var) {
00331 case 0: return 0;
00332 case 1:
00333 if (in_grouping_b(z, g_particle_end, 97, 246, 0)) return 0;
00334 break;
00335 case 2:
00336 { int ret = r_R2(z);
00337 if (ret == 0) return 0;
00338 if (ret < 0) return ret;
00339 }
00340 break;
00341 }
00342 { int ret = slice_del(z);
00343 if (ret < 0) return ret;
00344 }
00345 return 1;
00346 }
00347
00348 static int r_possessive(struct SN_env * z) {
00349 int among_var;
00350 { int mlimit;
00351 int m1 = z->l - z->c; (void)m1;
00352 if (z->c < z->I[0]) return 0;
00353 z->c = z->I[0];
00354 mlimit = z->lb; z->lb = z->c;
00355 z->c = z->l - m1;
00356 z->ket = z->c;
00357 among_var = find_among_b(z, a_4, 9);
00358 if (!(among_var)) { z->lb = mlimit; return 0; }
00359 z->bra = z->c;
00360 z->lb = mlimit;
00361 }
00362 switch(among_var) {
00363 case 0: return 0;
00364 case 1:
00365 { int m2 = z->l - z->c; (void)m2;
00366 if (!(eq_s_b(z, 1, s_0))) goto lab0;
00367 return 0;
00368 lab0:
00369 z->c = z->l - m2;
00370 }
00371 { int ret = slice_del(z);
00372 if (ret < 0) return ret;
00373 }
00374 break;
00375 case 2:
00376 { int ret = slice_del(z);
00377 if (ret < 0) return ret;
00378 }
00379 z->ket = z->c;
00380 if (!(eq_s_b(z, 3, s_1))) return 0;
00381 z->bra = z->c;
00382 { int ret = slice_from_s(z, 3, s_2);
00383 if (ret < 0) return ret;
00384 }
00385 break;
00386 case 3:
00387 { int ret = slice_del(z);
00388 if (ret < 0) return ret;
00389 }
00390 break;
00391 case 4:
00392 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
00393 if (!(find_among_b(z, a_1, 6))) return 0;
00394 { int ret = slice_del(z);
00395 if (ret < 0) return ret;
00396 }
00397 break;
00398 case 5:
00399 if (z->c - 1 <= z->lb || z->p[z->c - 1] != 228) return 0;
00400 if (!(find_among_b(z, a_2, 6))) return 0;
00401 { int ret = slice_del(z);
00402 if (ret < 0) return ret;
00403 }
00404 break;
00405 case 6:
00406 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
00407 if (!(find_among_b(z, a_3, 2))) return 0;
00408 { int ret = slice_del(z);
00409 if (ret < 0) return ret;
00410 }
00411 break;
00412 }
00413 return 1;
00414 }
00415
00416 static int r_LONG(struct SN_env * z) {
00417 if (!(find_among_b(z, a_5, 7))) return 0;
00418 return 1;
00419 }
00420
00421 static int r_VI(struct SN_env * z) {
00422 if (!(eq_s_b(z, 1, s_3))) return 0;
00423 if (in_grouping_b(z, g_V2, 97, 246, 0)) return 0;
00424 return 1;
00425 }
00426
00427 static int r_case_ending(struct SN_env * z) {
00428 int among_var;
00429 { int mlimit;
00430 int m1 = z->l - z->c; (void)m1;
00431 if (z->c < z->I[0]) return 0;
00432 z->c = z->I[0];
00433 mlimit = z->lb; z->lb = z->c;
00434 z->c = z->l - m1;
00435 z->ket = z->c;
00436 among_var = find_among_b(z, a_6, 30);
00437 if (!(among_var)) { z->lb = mlimit; return 0; }
00438 z->bra = z->c;
00439 z->lb = mlimit;
00440 }
00441 switch(among_var) {
00442 case 0: return 0;
00443 case 1:
00444 if (!(eq_s_b(z, 1, s_4))) return 0;
00445 break;
00446 case 2:
00447 if (!(eq_s_b(z, 1, s_5))) return 0;
00448 break;
00449 case 3:
00450 if (!(eq_s_b(z, 1, s_6))) return 0;
00451 break;
00452 case 4:
00453 if (!(eq_s_b(z, 1, s_7))) return 0;
00454 break;
00455 case 5:
00456 if (!(eq_s_b(z, 1, s_8))) return 0;
00457 break;
00458 case 6:
00459 if (!(eq_s_b(z, 1, s_9))) return 0;
00460 break;
00461 case 7:
00462 { int m_keep = z->l - z->c;
00463 { int m2 = z->l - z->c; (void)m2;
00464 { int m3 = z->l - z->c; (void)m3;
00465 { int ret = r_LONG(z);
00466 if (ret == 0) goto lab2;
00467 if (ret < 0) return ret;
00468 }
00469 goto lab1;
00470 lab2:
00471 z->c = z->l - m3;
00472 if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m_keep; goto lab0; }
00473 }
00474 lab1:
00475 z->c = z->l - m2;
00476 if (z->c <= z->lb) { z->c = z->l - m_keep; goto lab0; }
00477 z->c--;
00478 }
00479 z->bra = z->c;
00480 lab0:
00481 ;
00482 }
00483 break;
00484 case 8:
00485 if (in_grouping_b(z, g_V1, 97, 246, 0)) return 0;
00486 if (out_grouping_b(z, g_V1, 97, 246, 0)) return 0;
00487 break;
00488 case 9:
00489 if (!(eq_s_b(z, 1, s_11))) return 0;
00490 break;
00491 }
00492 { int ret = slice_del(z);
00493 if (ret < 0) return ret;
00494 }
00495 z->B[0] = 1;
00496 return 1;
00497 }
00498
00499 static int r_other_endings(struct SN_env * z) {
00500 int among_var;
00501 { int mlimit;
00502 int m1 = z->l - z->c; (void)m1;
00503 if (z->c < z->I[1]) return 0;
00504 z->c = z->I[1];
00505 mlimit = z->lb; z->lb = z->c;
00506 z->c = z->l - m1;
00507 z->ket = z->c;
00508 among_var = find_among_b(z, a_7, 14);
00509 if (!(among_var)) { z->lb = mlimit; return 0; }
00510 z->bra = z->c;
00511 z->lb = mlimit;
00512 }
00513 switch(among_var) {
00514 case 0: return 0;
00515 case 1:
00516 { int m2 = z->l - z->c; (void)m2;
00517 if (!(eq_s_b(z, 2, s_12))) goto lab0;
00518 return 0;
00519 lab0:
00520 z->c = z->l - m2;
00521 }
00522 break;
00523 }
00524 { int ret = slice_del(z);
00525 if (ret < 0) return ret;
00526 }
00527 return 1;
00528 }
00529
00530 static int r_i_plural(struct SN_env * z) {
00531 { int mlimit;
00532 int m1 = z->l - z->c; (void)m1;
00533 if (z->c < z->I[0]) return 0;
00534 z->c = z->I[0];
00535 mlimit = z->lb; z->lb = z->c;
00536 z->c = z->l - m1;
00537 z->ket = z->c;
00538 if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit; return 0; }
00539 if (!(find_among_b(z, a_8, 2))) { z->lb = mlimit; return 0; }
00540 z->bra = z->c;
00541 z->lb = mlimit;
00542 }
00543 { int ret = slice_del(z);
00544 if (ret < 0) return ret;
00545 }
00546 return 1;
00547 }
00548
00549 static int r_t_plural(struct SN_env * z) {
00550 int among_var;
00551 { int mlimit;
00552 int m1 = z->l - z->c; (void)m1;
00553 if (z->c < z->I[0]) return 0;
00554 z->c = z->I[0];
00555 mlimit = z->lb; z->lb = z->c;
00556 z->c = z->l - m1;
00557 z->ket = z->c;
00558 if (!(eq_s_b(z, 1, s_13))) { z->lb = mlimit; return 0; }
00559 z->bra = z->c;
00560 { int m_test = z->l - z->c;
00561 if (in_grouping_b(z, g_V1, 97, 246, 0)) { z->lb = mlimit; return 0; }
00562 z->c = z->l - m_test;
00563 }
00564 { int ret = slice_del(z);
00565 if (ret < 0) return ret;
00566 }
00567 z->lb = mlimit;
00568 }
00569 { int mlimit;
00570 int m2 = z->l - z->c; (void)m2;
00571 if (z->c < z->I[1]) return 0;
00572 z->c = z->I[1];
00573 mlimit = z->lb; z->lb = z->c;
00574 z->c = z->l - m2;
00575 z->ket = z->c;
00576 if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit; return 0; }
00577 among_var = find_among_b(z, a_9, 2);
00578 if (!(among_var)) { z->lb = mlimit; return 0; }
00579 z->bra = z->c;
00580 z->lb = mlimit;
00581 }
00582 switch(among_var) {
00583 case 0: return 0;
00584 case 1:
00585 { int m3 = z->l - z->c; (void)m3;
00586 if (!(eq_s_b(z, 2, s_14))) goto lab0;
00587 return 0;
00588 lab0:
00589 z->c = z->l - m3;
00590 }
00591 break;
00592 }
00593 { int ret = slice_del(z);
00594 if (ret < 0) return ret;
00595 }
00596 return 1;
00597 }
00598
00599 static int r_tidy(struct SN_env * z) {
00600 { int mlimit;
00601 int m1 = z->l - z->c; (void)m1;
00602 if (z->c < z->I[0]) return 0;
00603 z->c = z->I[0];
00604 mlimit = z->lb; z->lb = z->c;
00605 z->c = z->l - m1;
00606 { int m2 = z->l - z->c; (void)m2;
00607 { int m3 = z->l - z->c; (void)m3;
00608 { int ret = r_LONG(z);
00609 if (ret == 0) goto lab0;
00610 if (ret < 0) return ret;
00611 }
00612 z->c = z->l - m3;
00613 z->ket = z->c;
00614 if (z->c <= z->lb) goto lab0;
00615 z->c--;
00616 z->bra = z->c;
00617 { int ret = slice_del(z);
00618 if (ret < 0) return ret;
00619 }
00620 }
00621 lab0:
00622 z->c = z->l - m2;
00623 }
00624 { int m4 = z->l - z->c; (void)m4;
00625 z->ket = z->c;
00626 if (in_grouping_b(z, g_AEI, 97, 228, 0)) goto lab1;
00627 z->bra = z->c;
00628 if (out_grouping_b(z, g_V1, 97, 246, 0)) goto lab1;
00629 { int ret = slice_del(z);
00630 if (ret < 0) return ret;
00631 }
00632 lab1:
00633 z->c = z->l - m4;
00634 }
00635 { int m5 = z->l - z->c; (void)m5;
00636 z->ket = z->c;
00637 if (!(eq_s_b(z, 1, s_15))) goto lab2;
00638 z->bra = z->c;
00639 { int m6 = z->l - z->c; (void)m6;
00640 if (!(eq_s_b(z, 1, s_16))) goto lab4;
00641 goto lab3;
00642 lab4:
00643 z->c = z->l - m6;
00644 if (!(eq_s_b(z, 1, s_17))) goto lab2;
00645 }
00646 lab3:
00647 { int ret = slice_del(z);
00648 if (ret < 0) return ret;
00649 }
00650 lab2:
00651 z->c = z->l - m5;
00652 }
00653 { int m7 = z->l - z->c; (void)m7;
00654 z->ket = z->c;
00655 if (!(eq_s_b(z, 1, s_18))) goto lab5;
00656 z->bra = z->c;
00657 if (!(eq_s_b(z, 1, s_19))) goto lab5;
00658 { int ret = slice_del(z);
00659 if (ret < 0) return ret;
00660 }
00661 lab5:
00662 z->c = z->l - m7;
00663 }
00664 z->lb = mlimit;
00665 }
00666 if (in_grouping_b(z, g_V1, 97, 246, 1) < 0) return 0;
00667 z->ket = z->c;
00668 if (z->c <= z->lb) return 0;
00669 z->c--;
00670 z->bra = z->c;
00671 z->S[0] = slice_to(z, z->S[0]);
00672 if (z->S[0] == 0) return -1;
00673 if (!(eq_v_b(z, z->S[0]))) return 0;
00674 { int ret = slice_del(z);
00675 if (ret < 0) return ret;
00676 }
00677 return 1;
00678 }
00679
00680 extern int finnish_ISO_8859_1_stem(struct SN_env * z) {
00681 { int c1 = z->c;
00682 { int ret = r_mark_regions(z);
00683 if (ret == 0) goto lab0;
00684 if (ret < 0) return ret;
00685 }
00686 lab0:
00687 z->c = c1;
00688 }
00689 z->B[0] = 0;
00690 z->lb = z->c; z->c = z->l;
00691
00692 { int m2 = z->l - z->c; (void)m2;
00693 { int ret = r_particle_etc(z);
00694 if (ret == 0) goto lab1;
00695 if (ret < 0) return ret;
00696 }
00697 lab1:
00698 z->c = z->l - m2;
00699 }
00700 { int m3 = z->l - z->c; (void)m3;
00701 { int ret = r_possessive(z);
00702 if (ret == 0) goto lab2;
00703 if (ret < 0) return ret;
00704 }
00705 lab2:
00706 z->c = z->l - m3;
00707 }
00708 { int m4 = z->l - z->c; (void)m4;
00709 { int ret = r_case_ending(z);
00710 if (ret == 0) goto lab3;
00711 if (ret < 0) return ret;
00712 }
00713 lab3:
00714 z->c = z->l - m4;
00715 }
00716 { int m5 = z->l - z->c; (void)m5;
00717 { int ret = r_other_endings(z);
00718 if (ret == 0) goto lab4;
00719 if (ret < 0) return ret;
00720 }
00721 lab4:
00722 z->c = z->l - m5;
00723 }
00724 { int m6 = z->l - z->c; (void)m6;
00725 if (!(z->B[0])) goto lab6;
00726 { int m7 = z->l - z->c; (void)m7;
00727 { int ret = r_i_plural(z);
00728 if (ret == 0) goto lab7;
00729 if (ret < 0) return ret;
00730 }
00731 lab7:
00732 z->c = z->l - m7;
00733 }
00734 goto lab5;
00735 lab6:
00736 z->c = z->l - m6;
00737 { int m8 = z->l - z->c; (void)m8;
00738 { int ret = r_t_plural(z);
00739 if (ret == 0) goto lab8;
00740 if (ret < 0) return ret;
00741 }
00742 lab8:
00743 z->c = z->l - m8;
00744 }
00745 }
00746 lab5:
00747 { int m9 = z->l - z->c; (void)m9;
00748 { int ret = r_tidy(z);
00749 if (ret == 0) goto lab9;
00750 if (ret < 0) return ret;
00751 }
00752 lab9:
00753 z->c = z->l - m9;
00754 }
00755 z->c = z->lb;
00756 return 1;
00757 }
00758
00759 extern struct SN_env * finnish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2, 1); }
00760
00761 extern void finnish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
00762