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