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