languages/finnish.cc

Go to the documentation of this file.
00001 /* This file was generated automatically by the Snowball to ISO C++ compiler */
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 /*  1 */ tr_VI,
00017 /*  2 */ 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 /*  0 */ { 2, s_0_0, -1, 1},
00034 /*  1 */ { 3, s_0_1, -1, 2},
00035 /*  2 */ { 4, s_0_2, -1, 1},
00036 /*  3 */ { 3, s_0_3, -1, 1},
00037 /*  4 */ { 3, s_0_4, -1, 1},
00038 /*  5 */ { 4, s_0_5, -1, 1},
00039 /*  6 */ { 6, s_0_6, -1, 1},
00040 /*  7 */ { 2, s_0_7, -1, 1},
00041 /*  8 */ { 3, s_0_8, -1, 1},
00042 /*  9 */ { 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 /*  0 */ { 3, s_1_0, -1, -1},
00055 /*  1 */ { 2, s_1_1, -1, -1},
00056 /*  2 */ { 3, s_1_2, -1, -1},
00057 /*  3 */ { 2, s_1_3, -1, -1},
00058 /*  4 */ { 3, s_1_4, 3, -1},
00059 /*  5 */ { 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 /*  0 */ { 4, s_2_0, -1, -1},
00072 /*  1 */ { 3, s_2_1, -1, -1},
00073 /*  2 */ { 4, s_2_2, -1, -1},
00074 /*  3 */ { 3, s_2_3, -1, -1},
00075 /*  4 */ { 4, s_2_4, 3, -1},
00076 /*  5 */ { 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 /*  0 */ { 3, s_3_0, -1, -1},
00085 /*  1 */ { 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 /*  0 */ { 3, s_4_0, -1, 3},
00101 /*  1 */ { 3, s_4_1, -1, 3},
00102 /*  2 */ { 3, s_4_2, -1, 3},
00103 /*  3 */ { 2, s_4_3, -1, 2},
00104 /*  4 */ { 2, s_4_4, -1, 1},
00105 /*  5 */ { 2, s_4_5, -1, 4},
00106 /*  6 */ { 2, s_4_6, -1, 6},
00107 /*  7 */ { 3, s_4_7, -1, 5},
00108 /*  8 */ { 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 /*  0 */ { 2, s_5_0, -1, -1},
00122 /*  1 */ { 2, s_5_1, -1, -1},
00123 /*  2 */ { 2, s_5_2, -1, -1},
00124 /*  3 */ { 2, s_5_3, -1, -1},
00125 /*  4 */ { 2, s_5_4, -1, -1},
00126 /*  5 */ { 4, s_5_5, -1, -1},
00127 /*  6 */ { 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 /*  0 */ { 1, s_6_0, -1, 8},
00164 /*  1 */ { 3, s_6_1, 0, -1},
00165 /*  2 */ { 2, s_6_2, 0, -1},
00166 /*  3 */ { 3, s_6_3, 0, -1},
00167 /*  4 */ { 2, s_6_4, 0, -1},
00168 /*  5 */ { 3, s_6_5, 4, -1},
00169 /*  6 */ { 3, s_6_6, 4, -1},
00170 /*  7 */ { 3, s_6_7, 4, 9},
00171 /*  8 */ { 3, s_6_8, -1, -1},
00172 /*  9 */ { 3, s_6_9, -1, -1},
00173 /* 10 */ { 3, s_6_10, -1, -1},
00174 /* 11 */ { 1, s_6_11, -1, 7},
00175 /* 12 */ { 3, s_6_12, 11, 1},
00176 /* 13 */ { 3, s_6_13, 11, -1},
00177 /* 14 */ { 4, s_6_14, 11, -1},
00178 /* 15 */ { 3, s_6_15, 11, 2},
00179 /* 16 */ { 4, s_6_16, 11, -1},
00180 /* 17 */ { 3, s_6_17, 11, 3},
00181 /* 18 */ { 4, s_6_18, 11, -1},
00182 /* 19 */ { 3, s_6_19, 11, 4},
00183 /* 20 */ { 4, s_6_20, 11, 5},
00184 /* 21 */ { 4, s_6_21, 11, 6},
00185 /* 22 */ { 2, s_6_22, -1, 8},
00186 /* 23 */ { 4, s_6_23, 22, -1},
00187 /* 24 */ { 3, s_6_24, 22, -1},
00188 /* 25 */ { 4, s_6_25, 22, -1},
00189 /* 26 */ { 3, s_6_26, 22, -1},
00190 /* 27 */ { 4, s_6_27, 26, -1},
00191 /* 28 */ { 4, s_6_28, 26, -1},
00192 /* 29 */ { 4, s_6_29, 26, 9}
00193 };
00194 
00195 static const unsigned char af_6[30] =
00196 {
00197 /*  0 */ 0,
00198 /*  1 */ 0,
00199 /*  2 */ 0,
00200 /*  3 */ 0,
00201 /*  4 */ 0,
00202 /*  5 */ 0,
00203 /*  6 */ 0,
00204 /*  7 */ 0,
00205 /*  8 */ 0,
00206 /*  9 */ 0,
00207 /* 10 */ 0,
00208 /* 11 */ 0,
00209 /* 12 */ 0,
00210 /* 13 */ 1 /* tr_VI */,
00211 /* 14 */ 2 /* tr_LONG */,
00212 /* 15 */ 0,
00213 /* 16 */ 1 /* tr_VI */,
00214 /* 17 */ 0,
00215 /* 18 */ 1 /* tr_VI */,
00216 /* 19 */ 0,
00217 /* 20 */ 0,
00218 /* 21 */ 0,
00219 /* 22 */ 0,
00220 /* 23 */ 0,
00221 /* 24 */ 0,
00222 /* 25 */ 0,
00223 /* 26 */ 0,
00224 /* 27 */ 0,
00225 /* 28 */ 0,
00226 /* 29 */ 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 /*  0 */ { 3, s_7_0, -1, -1},
00247 /*  1 */ { 3, s_7_1, -1, 1},
00248 /*  2 */ { 4, s_7_2, 1, -1},
00249 /*  3 */ { 3, s_7_3, -1, 1},
00250 /*  4 */ { 4, s_7_4, 3, -1},
00251 /*  5 */ { 3, s_7_5, -1, 1},
00252 /*  6 */ { 4, s_7_6, 5, -1},
00253 /*  7 */ { 3, s_7_7, -1, 1},
00254 /*  8 */ { 4, s_7_8, 7, -1},
00255 /*  9 */ { 4, s_7_9, -1, -1},
00256 /* 10 */ { 4, s_7_10, -1, 1},
00257 /* 11 */ { 5, s_7_11, 10, -1},
00258 /* 12 */ { 4, s_7_12, -1, 1},
00259 /* 13 */ { 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 /*  0 */ { 1, s_8_0, -1, -1},
00268 /*  1 */ { 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 /*  0 */ { 3, s_9_0, -1, 1},
00277 /*  1 */ { 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() { /* forwardmode */
00297     I_p1 = l; /* p1 = <integer expression>, line 43 */
00298     I_p2 = l; /* p2 = <integer expression>, line 44 */
00299     if (out_grouping_U(g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 46 */
00300     {   int ret = in_grouping_U(g_V1, 97, 246, 1); /* gopast */ /* non V1, line 46 */
00301         if (ret < 0) return 0;
00302         c += ret;
00303     }
00304     I_p1 = c; /* setmark p1, line 46 */
00305     if (out_grouping_U(g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 47 */
00306     {   int ret = in_grouping_U(g_V1, 97, 246, 1); /* gopast */ /* non V1, line 47 */
00307         if (ret < 0) return 0;
00308         c += ret;
00309     }
00310     I_p2 = c; /* setmark p2, line 47 */
00311     return 1;
00312 }
00313 
00314 int Xapian::InternalStemFinnish::r_R2() { /* backwardmode */
00315     if (!(I_p2 <= c)) return 0; /* p2 <= <integer expression>, line 52 */
00316     return 1;
00317 }
00318 
00319 int Xapian::InternalStemFinnish::r_particle_etc() { /* backwardmode */
00320     int among_var;
00321     {   int m1 = l - c; (void)m1; /* setlimit, line 55 */
00322         int mlimit1;
00323         if (c < I_p1) return 0;
00324         c = I_p1; /* tomark, line 55 */
00325         mlimit1 = lb; lb = c;
00326         c = l - m1;
00327         ket = c; /* [, line 55 */
00328         among_var = find_among_b(a_0, 10, 0, 0); /* substring, line 55 */
00329         if (!(among_var)) { lb = mlimit1; return 0; }
00330         bra = c; /* ], line 55 */
00331         lb = mlimit1;
00332     }
00333     switch(among_var) { /* among, line 56 */
00334         case 0: return 0;
00335         case 1:
00336             if (in_grouping_b_U(g_particle_end, 97, 246, 0)) return 0; /* grouping particle_end, line 62 */
00337             break;
00338         case 2:
00339             {   int ret = r_R2(); /* call R2, line 64 */
00340                 if (ret <= 0) return ret;
00341             }
00342             break;
00343     }
00344     if (slice_del() == -1) return -1; /* delete, line 66 */
00345     return 1;
00346 }
00347 
00348 int Xapian::InternalStemFinnish::r_possessive() { /* backwardmode */
00349     int among_var;
00350     {   int m1 = l - c; (void)m1; /* setlimit, line 69 */
00351         int mlimit1;
00352         if (c < I_p1) return 0;
00353         c = I_p1; /* tomark, line 69 */
00354         mlimit1 = lb; lb = c;
00355         c = l - m1;
00356         ket = c; /* [, line 69 */
00357         among_var = find_among_b(a_4, 9, 0, 0); /* substring, line 69 */
00358         if (!(among_var)) { lb = mlimit1; return 0; }
00359         bra = c; /* ], line 69 */
00360         lb = mlimit1;
00361     }
00362     switch(among_var) { /* among, line 70 */
00363         case 0: return 0;
00364         case 1:
00365             {   int m2 = l - c; (void)m2; /* not, line 72 */
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; /* delete, line 72 */
00373             break;
00374         case 2:
00375             if (slice_del() == -1) return -1; /* delete, line 74 */
00376             ket = c; /* [, line 74 */
00377             if (!(eq_s_b(3, s_0))) return 0; /* literal, line 74 */
00378             bra = c; /* ], line 74 */
00379             {   int ret = slice_from_s(3, s_1); /* <-, line 74 */
00380                 if (ret < 0) return ret;
00381             }
00382             break;
00383         case 3:
00384             if (slice_del() == -1) return -1; /* delete, line 78 */
00385             break;
00386         case 4:
00387             if (c - 1 <= lb || p[c - 1] != 97) return 0; /* among, line 81 */
00388             if (!(find_among_b(a_1, 6, 0, 0))) return 0;
00389             if (slice_del() == -1) return -1; /* delete, line 81 */
00390             break;
00391         case 5:
00392             if (c - 2 <= lb || p[c - 1] != 164) return 0; /* among, line 83 */
00393             if (!(find_among_b(a_2, 6, 0, 0))) return 0;
00394             if (slice_del() == -1) return -1; /* delete, line 84 */
00395             break;
00396         case 6:
00397             if (c - 2 <= lb || p[c - 1] != 101) return 0; /* among, line 86 */
00398             if (!(find_among_b(a_3, 2, 0, 0))) return 0;
00399             if (slice_del() == -1) return -1; /* delete, line 86 */
00400             break;
00401     }
00402     return 1;
00403 }
00404 
00405 int Xapian::InternalStemFinnish::r_LONG() { /* backwardmode */
00406     if (!(find_among_b(a_5, 7, 0, 0))) return 0; /* among, line 91 */
00407     return 1;
00408 }
00409 
00410 int Xapian::InternalStemFinnish::r_VI() { /* backwardmode */
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; /* grouping V2, line 93 */
00414     return 1;
00415 }
00416 
00417 int Xapian::InternalStemFinnish::r_case_ending() { /* backwardmode */
00418     int among_var;
00419     {   int m1 = l - c; (void)m1; /* setlimit, line 96 */
00420         int mlimit1;
00421         if (c < I_p1) return 0;
00422         c = I_p1; /* tomark, line 96 */
00423         mlimit1 = lb; lb = c;
00424         c = l - m1;
00425         ket = c; /* [, line 96 */
00426         among_var = find_among_b(a_6, 30, af_6, af); /* substring, line 96 */
00427         if (!(among_var)) { lb = mlimit1; return 0; }
00428         bra = c; /* ], line 96 */
00429         lb = mlimit1;
00430     }
00431     switch(among_var) { /* among, line 97 */
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; /* literal, line 102 */
00451             break;
00452         case 6:
00453             if (!(eq_s_b(2, s_3))) return 0; /* literal, line 103 */
00454             break;
00455         case 7:
00456             {   int m2 = l - c; (void)m2; /* try, line 111 */
00457                 {   int m3 = l - c; (void)m3; /* and, line 113 */
00458                     {   int m4 = l - c; (void)m4; /* or, line 112 */
00459                         {   int ret = r_LONG(); /* call LONG, line 111 */
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; } /* literal, line 112 */
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; /* next, line 113 */
00473                     }
00474                 }
00475                 bra = c; /* ], line 113 */
00476             lab0:
00477                 ;
00478             }
00479             break;
00480         case 8:
00481             if (in_grouping_b_U(g_V1, 97, 246, 0)) return 0; /* grouping V1, line 119 */
00482             if (out_grouping_b_U(g_V1, 97, 246, 0)) return 0; /* non V1, line 119 */
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; /* delete, line 138 */
00490     B_ending_removed = 1; /* set ending_removed, line 139 */
00491     return 1;
00492 }
00493 
00494 int Xapian::InternalStemFinnish::r_other_endings() { /* backwardmode */
00495     int among_var;
00496     {   int m1 = l - c; (void)m1; /* setlimit, line 142 */
00497         int mlimit1;
00498         if (c < I_p2) return 0;
00499         c = I_p2; /* tomark, line 142 */
00500         mlimit1 = lb; lb = c;
00501         c = l - m1;
00502         ket = c; /* [, line 142 */
00503         among_var = find_among_b(a_7, 14, 0, 0); /* substring, line 142 */
00504         if (!(among_var)) { lb = mlimit1; return 0; }
00505         bra = c; /* ], line 142 */
00506         lb = mlimit1;
00507     }
00508     switch(among_var) { /* among, line 143 */
00509         case 0: return 0;
00510         case 1:
00511             {   int m2 = l - c; (void)m2; /* not, line 146 */
00512                 if (!(eq_s_b(2, s_5))) goto lab0; /* literal, line 146 */
00513                 return 0;
00514             lab0:
00515                 c = l - m2;
00516             }
00517             break;
00518     }
00519     if (slice_del() == -1) return -1; /* delete, line 151 */
00520     return 1;
00521 }
00522 
00523 int Xapian::InternalStemFinnish::r_i_plural() { /* backwardmode */
00524     {   int m1 = l - c; (void)m1; /* setlimit, line 154 */
00525         int mlimit1;
00526         if (c < I_p1) return 0;
00527         c = I_p1; /* tomark, line 154 */
00528         mlimit1 = lb; lb = c;
00529         c = l - m1;
00530         ket = c; /* [, line 154 */
00531         if (c <= lb || (p[c - 1] != 105 && p[c - 1] != 106)) { lb = mlimit1; return 0; } /* substring, line 154 */
00532         if (!(find_among_b(a_8, 2, 0, 0))) { lb = mlimit1; return 0; }
00533         bra = c; /* ], line 154 */
00534         lb = mlimit1;
00535     }
00536     if (slice_del() == -1) return -1; /* delete, line 158 */
00537     return 1;
00538 }
00539 
00540 int Xapian::InternalStemFinnish::r_t_plural() { /* backwardmode */
00541     int among_var;
00542     {   int m1 = l - c; (void)m1; /* setlimit, line 161 */
00543         int mlimit1;
00544         if (c < I_p1) return 0;
00545         c = I_p1; /* tomark, line 161 */
00546         mlimit1 = lb; lb = c;
00547         c = l - m1;
00548         ket = c; /* [, line 162 */
00549         if (c <= lb || p[c - 1] != 't') { lb = mlimit1; return 0; }
00550         c--;
00551         bra = c; /* ], line 162 */
00552         {   int m_test2 = l - c; /* test, line 162 */
00553             if (in_grouping_b_U(g_V1, 97, 246, 0)) { lb = mlimit1; return 0; } /* grouping V1, line 162 */
00554             c = l - m_test2;
00555         }
00556         if (slice_del() == -1) return -1; /* delete, line 163 */
00557         lb = mlimit1;
00558     }
00559     {   int m3 = l - c; (void)m3; /* setlimit, line 165 */
00560         int mlimit3;
00561         if (c < I_p2) return 0;
00562         c = I_p2; /* tomark, line 165 */
00563         mlimit3 = lb; lb = c;
00564         c = l - m3;
00565         ket = c; /* [, line 165 */
00566         if (c - 2 <= lb || p[c - 1] != 97) { lb = mlimit3; return 0; } /* substring, line 165 */
00567         among_var = find_among_b(a_9, 2, 0, 0);
00568         if (!(among_var)) { lb = mlimit3; return 0; }
00569         bra = c; /* ], line 165 */
00570         lb = mlimit3;
00571     }
00572     switch(among_var) { /* among, line 166 */
00573         case 0: return 0;
00574         case 1:
00575             {   int m4 = l - c; (void)m4; /* not, line 167 */
00576                 if (!(eq_s_b(2, s_6))) goto lab0; /* literal, line 167 */
00577                 return 0;
00578             lab0:
00579                 c = l - m4;
00580             }
00581             break;
00582     }
00583     if (slice_del() == -1) return -1; /* delete, line 170 */
00584     return 1;
00585 }
00586 
00587 int Xapian::InternalStemFinnish::r_tidy() { /* backwardmode */
00588     {   int m1 = l - c; (void)m1; /* setlimit, line 173 */
00589         int mlimit1;
00590         if (c < I_p1) return 0;
00591         c = I_p1; /* tomark, line 173 */
00592         mlimit1 = lb; lb = c;
00593         c = l - m1;
00594         {   int m2 = l - c; (void)m2; /* do, line 174 */
00595             {   int m3 = l - c; (void)m3; /* and, line 174 */
00596                 {   int ret = r_LONG(); /* call LONG, line 174 */
00597                     if (ret == 0) goto lab0;
00598                     if (ret < 0) return ret;
00599                 }
00600                 c = l - m3;
00601                 ket = c; /* [, line 174 */
00602                 {   int ret = skip_utf8(p, c, lb, 0, -1);
00603                     if (ret < 0) goto lab0;
00604                     c = ret; /* next, line 174 */
00605                 }
00606                 bra = c; /* ], line 174 */
00607                 if (slice_del() == -1) return -1; /* delete, line 174 */
00608             }
00609         lab0:
00610             c = l - m2;
00611         }
00612         {   int m4 = l - c; (void)m4; /* do, line 175 */
00613             ket = c; /* [, line 175 */
00614             if (in_grouping_b_U(g_AEI, 97, 228, 0)) goto lab1; /* grouping AEI, line 175 */
00615             bra = c; /* ], line 175 */
00616             if (out_grouping_b_U(g_V1, 97, 246, 0)) goto lab1; /* non V1, line 175 */
00617             if (slice_del() == -1) return -1; /* delete, line 175 */
00618         lab1:
00619             c = l - m4;
00620         }
00621         {   int m5 = l - c; (void)m5; /* do, line 176 */
00622             ket = c; /* [, line 176 */
00623             if (c <= lb || p[c - 1] != 'j') goto lab2;
00624             c--;
00625             bra = c; /* ], line 176 */
00626             {   int m6 = l - c; (void)m6; /* or, line 176 */
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; /* delete, line 176 */
00637         lab2:
00638             c = l - m5;
00639         }
00640         {   int m7 = l - c; (void)m7; /* do, line 177 */
00641             ket = c; /* [, line 177 */
00642             if (c <= lb || p[c - 1] != 'o') goto lab5;
00643             c--;
00644             bra = c; /* ], line 177 */
00645             if (c <= lb || p[c - 1] != 'j') goto lab5;
00646             c--;
00647             if (slice_del() == -1) return -1; /* delete, line 177 */
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; /* goto */ /* non V1, line 179 */
00654     ket = c; /* [, line 179 */
00655     {   int ret = skip_utf8(p, c, lb, 0, -1);
00656         if (ret < 0) return 0;
00657         c = ret; /* next, line 179 */
00658     }
00659     bra = c; /* ], line 179 */
00660     {   symbol * ret = slice_to(S_x); /* -> x, line 179 */
00661         if (ret == 0) return -1;
00662         S_x = ret;
00663     }
00664     if (!(eq_v_b(S_x))) return 0; /* name x, line 179 */
00665     if (slice_del() == -1) return -1; /* delete, line 179 */
00666     return 1;
00667 }
00668 
00669 int Xapian::InternalStemFinnish::stem() { /* forwardmode */
00670     {   int c1 = c; /* do, line 185 */
00671         {   int ret = r_mark_regions(); /* call mark_regions, line 185 */
00672             if (ret == 0) goto lab0;
00673             if (ret < 0) return ret;
00674         }
00675     lab0:
00676         c = c1;
00677     }
00678     B_ending_removed = 0; /* unset ending_removed, line 186 */
00679     lb = c; c = l; /* backwards, line 187 */
00680 
00681     {   int m2 = l - c; (void)m2; /* do, line 188 */
00682         {   int ret = r_particle_etc(); /* call particle_etc, line 188 */
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; /* do, line 189 */
00690         {   int ret = r_possessive(); /* call possessive, line 189 */
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; /* do, line 190 */
00698         {   int ret = r_case_ending(); /* call case_ending, line 190 */
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; /* do, line 191 */
00706         {   int ret = r_other_endings(); /* call other_endings, line 191 */
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; /* or, line 192 */
00714         if (!(B_ending_removed)) goto lab6; /* Boolean test ending_removed, line 192 */
00715         {   int m7 = l - c; (void)m7; /* do, line 192 */
00716             {   int ret = r_i_plural(); /* call i_plural, line 192 */
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; /* do, line 192 */
00727             {   int ret = r_t_plural(); /* call t_plural, line 192 */
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; /* do, line 193 */
00737         {   int ret = r_tidy(); /* call tidy, line 193 */
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 }

Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.