00001
00002
00003 #include <limits.h>
00004 #include "english.h"
00005
00006 static const symbol s_0_0[5] = { 'a', 'r', 's', 'e', 'n' };
00007 static const symbol s_0_1[6] = { 'c', 'o', 'm', 'm', 'u', 'n' };
00008 static const symbol s_0_2[5] = { 'g', 'e', 'n', 'e', 'r' };
00009
00010 static const struct among a_0[3] =
00011 {
00012 { 5, s_0_0, -1, -1},
00013 { 6, s_0_1, -1, -1},
00014 { 5, s_0_2, -1, -1}
00015 };
00016
00017 static const symbol s_1_0[1] = { '\'' };
00018 static const symbol s_1_1[3] = { '\'', 's', '\'' };
00019 static const symbol s_1_2[2] = { '\'', 's' };
00020
00021 static const struct among a_1[3] =
00022 {
00023 { 1, s_1_0, -1, 1},
00024 { 3, s_1_1, 0, 1},
00025 { 2, s_1_2, -1, 1}
00026 };
00027
00028 static const symbol s_2_0[3] = { 'i', 'e', 'd' };
00029 static const symbol s_2_1[1] = { 's' };
00030 static const symbol s_2_2[3] = { 'i', 'e', 's' };
00031 static const symbol s_2_3[4] = { 's', 's', 'e', 's' };
00032 static const symbol s_2_4[2] = { 's', 's' };
00033 static const symbol s_2_5[2] = { 'u', 's' };
00034
00035 static const struct among a_2[6] =
00036 {
00037 { 3, s_2_0, -1, 2},
00038 { 1, s_2_1, -1, 3},
00039 { 3, s_2_2, 1, 2},
00040 { 4, s_2_3, 1, 1},
00041 { 2, s_2_4, 1, -1},
00042 { 2, s_2_5, 1, -1}
00043 };
00044
00045 static const symbol s_3_1[2] = { 'b', 'b' };
00046 static const symbol s_3_2[2] = { 'd', 'd' };
00047 static const symbol s_3_3[2] = { 'f', 'f' };
00048 static const symbol s_3_4[2] = { 'g', 'g' };
00049 static const symbol s_3_5[2] = { 'b', 'l' };
00050 static const symbol s_3_6[2] = { 'm', 'm' };
00051 static const symbol s_3_7[2] = { 'n', 'n' };
00052 static const symbol s_3_8[2] = { 'p', 'p' };
00053 static const symbol s_3_9[2] = { 'r', 'r' };
00054 static const symbol s_3_10[2] = { 'a', 't' };
00055 static const symbol s_3_11[2] = { 't', 't' };
00056 static const symbol s_3_12[2] = { 'i', 'z' };
00057
00058 static const struct among a_3[13] =
00059 {
00060 { 0, 0, -1, 3},
00061 { 2, s_3_1, 0, 2},
00062 { 2, s_3_2, 0, 2},
00063 { 2, s_3_3, 0, 2},
00064 { 2, s_3_4, 0, 2},
00065 { 2, s_3_5, 0, 1},
00066 { 2, s_3_6, 0, 2},
00067 { 2, s_3_7, 0, 2},
00068 { 2, s_3_8, 0, 2},
00069 { 2, s_3_9, 0, 2},
00070 { 2, s_3_10, 0, 1},
00071 { 2, s_3_11, 0, 2},
00072 { 2, s_3_12, 0, 1}
00073 };
00074
00075 static const symbol s_4_0[2] = { 'e', 'd' };
00076 static const symbol s_4_1[3] = { 'e', 'e', 'd' };
00077 static const symbol s_4_2[3] = { 'i', 'n', 'g' };
00078 static const symbol s_4_3[4] = { 'e', 'd', 'l', 'y' };
00079 static const symbol s_4_4[5] = { 'e', 'e', 'd', 'l', 'y' };
00080 static const symbol s_4_5[5] = { 'i', 'n', 'g', 'l', 'y' };
00081
00082 static const struct among a_4[6] =
00083 {
00084 { 2, s_4_0, -1, 2},
00085 { 3, s_4_1, 0, 1},
00086 { 3, s_4_2, -1, 2},
00087 { 4, s_4_3, -1, 2},
00088 { 5, s_4_4, 3, 1},
00089 { 5, s_4_5, -1, 2}
00090 };
00091
00092 static const symbol s_5_0[4] = { 'a', 'n', 'c', 'i' };
00093 static const symbol s_5_1[4] = { 'e', 'n', 'c', 'i' };
00094 static const symbol s_5_2[3] = { 'o', 'g', 'i' };
00095 static const symbol s_5_3[2] = { 'l', 'i' };
00096 static const symbol s_5_4[3] = { 'b', 'l', 'i' };
00097 static const symbol s_5_5[4] = { 'a', 'b', 'l', 'i' };
00098 static const symbol s_5_6[4] = { 'a', 'l', 'l', 'i' };
00099 static const symbol s_5_7[5] = { 'f', 'u', 'l', 'l', 'i' };
00100 static const symbol s_5_8[6] = { 'l', 'e', 's', 's', 'l', 'i' };
00101 static const symbol s_5_9[5] = { 'o', 'u', 's', 'l', 'i' };
00102 static const symbol s_5_10[5] = { 'e', 'n', 't', 'l', 'i' };
00103 static const symbol s_5_11[5] = { 'a', 'l', 'i', 't', 'i' };
00104 static const symbol s_5_12[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
00105 static const symbol s_5_13[5] = { 'i', 'v', 'i', 't', 'i' };
00106 static const symbol s_5_14[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
00107 static const symbol s_5_15[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
00108 static const symbol s_5_16[5] = { 'a', 'l', 'i', 's', 'm' };
00109 static const symbol s_5_17[5] = { 'a', 't', 'i', 'o', 'n' };
00110 static const symbol s_5_18[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
00111 static const symbol s_5_19[4] = { 'i', 'z', 'e', 'r' };
00112 static const symbol s_5_20[4] = { 'a', 't', 'o', 'r' };
00113 static const symbol s_5_21[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
00114 static const symbol s_5_22[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
00115 static const symbol s_5_23[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
00116
00117 static const struct among a_5[24] =
00118 {
00119 { 4, s_5_0, -1, 3},
00120 { 4, s_5_1, -1, 2},
00121 { 3, s_5_2, -1, 13},
00122 { 2, s_5_3, -1, 16},
00123 { 3, s_5_4, 3, 12},
00124 { 4, s_5_5, 4, 4},
00125 { 4, s_5_6, 3, 8},
00126 { 5, s_5_7, 3, 14},
00127 { 6, s_5_8, 3, 15},
00128 { 5, s_5_9, 3, 10},
00129 { 5, s_5_10, 3, 5},
00130 { 5, s_5_11, -1, 8},
00131 { 6, s_5_12, -1, 12},
00132 { 5, s_5_13, -1, 11},
00133 { 6, s_5_14, -1, 1},
00134 { 7, s_5_15, 14, 7},
00135 { 5, s_5_16, -1, 8},
00136 { 5, s_5_17, -1, 7},
00137 { 7, s_5_18, 17, 6},
00138 { 4, s_5_19, -1, 6},
00139 { 4, s_5_20, -1, 7},
00140 { 7, s_5_21, -1, 11},
00141 { 7, s_5_22, -1, 9},
00142 { 7, s_5_23, -1, 10}
00143 };
00144
00145 static const symbol s_6_0[5] = { 'i', 'c', 'a', 't', 'e' };
00146 static const symbol s_6_1[5] = { 'a', 't', 'i', 'v', 'e' };
00147 static const symbol s_6_2[5] = { 'a', 'l', 'i', 'z', 'e' };
00148 static const symbol s_6_3[5] = { 'i', 'c', 'i', 't', 'i' };
00149 static const symbol s_6_4[4] = { 'i', 'c', 'a', 'l' };
00150 static const symbol s_6_5[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
00151 static const symbol s_6_6[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
00152 static const symbol s_6_7[3] = { 'f', 'u', 'l' };
00153 static const symbol s_6_8[4] = { 'n', 'e', 's', 's' };
00154
00155 static const struct among a_6[9] =
00156 {
00157 { 5, s_6_0, -1, 4},
00158 { 5, s_6_1, -1, 6},
00159 { 5, s_6_2, -1, 3},
00160 { 5, s_6_3, -1, 4},
00161 { 4, s_6_4, -1, 4},
00162 { 6, s_6_5, -1, 1},
00163 { 7, s_6_6, 5, 2},
00164 { 3, s_6_7, -1, 5},
00165 { 4, s_6_8, -1, 5}
00166 };
00167
00168 static const symbol s_7_0[2] = { 'i', 'c' };
00169 static const symbol s_7_1[4] = { 'a', 'n', 'c', 'e' };
00170 static const symbol s_7_2[4] = { 'e', 'n', 'c', 'e' };
00171 static const symbol s_7_3[4] = { 'a', 'b', 'l', 'e' };
00172 static const symbol s_7_4[4] = { 'i', 'b', 'l', 'e' };
00173 static const symbol s_7_5[3] = { 'a', 't', 'e' };
00174 static const symbol s_7_6[3] = { 'i', 'v', 'e' };
00175 static const symbol s_7_7[3] = { 'i', 'z', 'e' };
00176 static const symbol s_7_8[3] = { 'i', 't', 'i' };
00177 static const symbol s_7_9[2] = { 'a', 'l' };
00178 static const symbol s_7_10[3] = { 'i', 's', 'm' };
00179 static const symbol s_7_11[3] = { 'i', 'o', 'n' };
00180 static const symbol s_7_12[2] = { 'e', 'r' };
00181 static const symbol s_7_13[3] = { 'o', 'u', 's' };
00182 static const symbol s_7_14[3] = { 'a', 'n', 't' };
00183 static const symbol s_7_15[3] = { 'e', 'n', 't' };
00184 static const symbol s_7_16[4] = { 'm', 'e', 'n', 't' };
00185 static const symbol s_7_17[5] = { 'e', 'm', 'e', 'n', 't' };
00186
00187 static const struct among a_7[18] =
00188 {
00189 { 2, s_7_0, -1, 1},
00190 { 4, s_7_1, -1, 1},
00191 { 4, s_7_2, -1, 1},
00192 { 4, s_7_3, -1, 1},
00193 { 4, s_7_4, -1, 1},
00194 { 3, s_7_5, -1, 1},
00195 { 3, s_7_6, -1, 1},
00196 { 3, s_7_7, -1, 1},
00197 { 3, s_7_8, -1, 1},
00198 { 2, s_7_9, -1, 1},
00199 { 3, s_7_10, -1, 1},
00200 { 3, s_7_11, -1, 2},
00201 { 2, s_7_12, -1, 1},
00202 { 3, s_7_13, -1, 1},
00203 { 3, s_7_14, -1, 1},
00204 { 3, s_7_15, -1, 1},
00205 { 4, s_7_16, 15, 1},
00206 { 5, s_7_17, 16, 1}
00207 };
00208
00209 static const symbol s_8_0[1] = { 'e' };
00210 static const symbol s_8_1[1] = { 'l' };
00211
00212 static const struct among a_8[2] =
00213 {
00214 { 1, s_8_0, -1, 1},
00215 { 1, s_8_1, -1, 2}
00216 };
00217
00218 static const symbol s_9_0[7] = { 's', 'u', 'c', 'c', 'e', 'e', 'd' };
00219 static const symbol s_9_1[7] = { 'p', 'r', 'o', 'c', 'e', 'e', 'd' };
00220 static const symbol s_9_2[6] = { 'e', 'x', 'c', 'e', 'e', 'd' };
00221 static const symbol s_9_3[7] = { 'c', 'a', 'n', 'n', 'i', 'n', 'g' };
00222 static const symbol s_9_4[6] = { 'i', 'n', 'n', 'i', 'n', 'g' };
00223 static const symbol s_9_5[7] = { 'e', 'a', 'r', 'r', 'i', 'n', 'g' };
00224 static const symbol s_9_6[7] = { 'h', 'e', 'r', 'r', 'i', 'n', 'g' };
00225 static const symbol s_9_7[6] = { 'o', 'u', 't', 'i', 'n', 'g' };
00226
00227 static const struct among a_9[8] =
00228 {
00229 { 7, s_9_0, -1, -1},
00230 { 7, s_9_1, -1, -1},
00231 { 6, s_9_2, -1, -1},
00232 { 7, s_9_3, -1, -1},
00233 { 6, s_9_4, -1, -1},
00234 { 7, s_9_5, -1, -1},
00235 { 7, s_9_6, -1, -1},
00236 { 6, s_9_7, -1, -1}
00237 };
00238
00239 static const symbol s_10_0[5] = { 'a', 'n', 'd', 'e', 's' };
00240 static const symbol s_10_1[5] = { 'a', 't', 'l', 'a', 's' };
00241 static const symbol s_10_2[4] = { 'b', 'i', 'a', 's' };
00242 static const symbol s_10_3[6] = { 'c', 'o', 's', 'm', 'o', 's' };
00243 static const symbol s_10_4[5] = { 'd', 'y', 'i', 'n', 'g' };
00244 static const symbol s_10_5[5] = { 'e', 'a', 'r', 'l', 'y' };
00245 static const symbol s_10_6[6] = { 'g', 'e', 'n', 't', 'l', 'y' };
00246 static const symbol s_10_7[4] = { 'h', 'o', 'w', 'e' };
00247 static const symbol s_10_8[4] = { 'i', 'd', 'l', 'y' };
00248 static const symbol s_10_9[5] = { 'l', 'y', 'i', 'n', 'g' };
00249 static const symbol s_10_10[4] = { 'n', 'e', 'w', 's' };
00250 static const symbol s_10_11[4] = { 'o', 'n', 'l', 'y' };
00251 static const symbol s_10_12[6] = { 's', 'i', 'n', 'g', 'l', 'y' };
00252 static const symbol s_10_13[5] = { 's', 'k', 'i', 'e', 's' };
00253 static const symbol s_10_14[4] = { 's', 'k', 'i', 's' };
00254 static const symbol s_10_15[3] = { 's', 'k', 'y' };
00255 static const symbol s_10_16[5] = { 't', 'y', 'i', 'n', 'g' };
00256 static const symbol s_10_17[4] = { 'u', 'g', 'l', 'y' };
00257
00258 static const struct among a_10[18] =
00259 {
00260 { 5, s_10_0, -1, -1},
00261 { 5, s_10_1, -1, -1},
00262 { 4, s_10_2, -1, -1},
00263 { 6, s_10_3, -1, -1},
00264 { 5, s_10_4, -1, 3},
00265 { 5, s_10_5, -1, 9},
00266 { 6, s_10_6, -1, 7},
00267 { 4, s_10_7, -1, -1},
00268 { 4, s_10_8, -1, 6},
00269 { 5, s_10_9, -1, 4},
00270 { 4, s_10_10, -1, -1},
00271 { 4, s_10_11, -1, 10},
00272 { 6, s_10_12, -1, 11},
00273 { 5, s_10_13, -1, 2},
00274 { 4, s_10_14, -1, 1},
00275 { 3, s_10_15, -1, -1},
00276 { 5, s_10_16, -1, 5},
00277 { 4, s_10_17, -1, 8}
00278 };
00279
00280 static const unsigned char g_v[] = { 17, 65, 16, 1 };
00281
00282 static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
00283
00284 static const unsigned char g_valid_LI[] = { 55, 141, 2 };
00285
00286 static const symbol s_0[] = { 'Y' };
00287 static const symbol s_1[] = { 'Y' };
00288 static const symbol s_2[] = { 's', 's' };
00289 static const symbol s_3[] = { 'i' };
00290 static const symbol s_4[] = { 'i', 'e' };
00291 static const symbol s_5[] = { 'e', 'e' };
00292 static const symbol s_6[] = { 'e' };
00293 static const symbol s_7[] = { 'e' };
00294 static const symbol s_8[] = { 'i' };
00295 static const symbol s_9[] = { 't', 'i', 'o', 'n' };
00296 static const symbol s_10[] = { 'e', 'n', 'c', 'e' };
00297 static const symbol s_11[] = { 'a', 'n', 'c', 'e' };
00298 static const symbol s_12[] = { 'a', 'b', 'l', 'e' };
00299 static const symbol s_13[] = { 'e', 'n', 't' };
00300 static const symbol s_14[] = { 'i', 'z', 'e' };
00301 static const symbol s_15[] = { 'a', 't', 'e' };
00302 static const symbol s_16[] = { 'a', 'l' };
00303 static const symbol s_17[] = { 'f', 'u', 'l' };
00304 static const symbol s_18[] = { 'o', 'u', 's' };
00305 static const symbol s_19[] = { 'i', 'v', 'e' };
00306 static const symbol s_20[] = { 'b', 'l', 'e' };
00307 static const symbol s_21[] = { 'o', 'g' };
00308 static const symbol s_22[] = { 'f', 'u', 'l' };
00309 static const symbol s_23[] = { 'l', 'e', 's', 's' };
00310 static const symbol s_24[] = { 't', 'i', 'o', 'n' };
00311 static const symbol s_25[] = { 'a', 't', 'e' };
00312 static const symbol s_26[] = { 'a', 'l' };
00313 static const symbol s_27[] = { 'i', 'c' };
00314 static const symbol s_28[] = { 's', 'k', 'i' };
00315 static const symbol s_29[] = { 's', 'k', 'y' };
00316 static const symbol s_30[] = { 'd', 'i', 'e' };
00317 static const symbol s_31[] = { 'l', 'i', 'e' };
00318 static const symbol s_32[] = { 't', 'i', 'e' };
00319 static const symbol s_33[] = { 'i', 'd', 'l' };
00320 static const symbol s_34[] = { 'g', 'e', 'n', 't', 'l' };
00321 static const symbol s_35[] = { 'u', 'g', 'l', 'i' };
00322 static const symbol s_36[] = { 'e', 'a', 'r', 'l', 'i' };
00323 static const symbol s_37[] = { 'o', 'n', 'l', 'i' };
00324 static const symbol s_38[] = { 's', 'i', 'n', 'g', 'l' };
00325 static const symbol s_39[] = { 'y' };
00326
00327 int Xapian::InternalStemEnglish::r_prelude() {
00328 B_Y_found = 0;
00329 { int c1 = c;
00330 bra = c;
00331 if (c == l || p[c] != 39) goto lab0;
00332 c++;
00333 ket = c;
00334 if (slice_del() == -1) return -1;
00335 lab0:
00336 c = c1;
00337 }
00338 { int c2 = c;
00339 bra = c;
00340 if (c == l || p[c] != 'y') goto lab1;
00341 c++;
00342 ket = c;
00343 { int ret = slice_from_s(1, s_0);
00344 if (ret < 0) return ret;
00345 }
00346 B_Y_found = 1;
00347 lab1:
00348 c = c2;
00349 }
00350 { int c3 = c;
00351 while(1) {
00352 int c4 = c;
00353 while(1) {
00354 int c5 = c;
00355 if (in_grouping_U(g_v, 97, 121, 0)) goto lab4;
00356 bra = c;
00357 if (c == l || p[c] != 'y') goto lab4;
00358 c++;
00359 ket = c;
00360 c = c5;
00361 break;
00362 lab4:
00363 c = c5;
00364 { int ret = skip_utf8(p, c, 0, l, 1);
00365 if (ret < 0) goto lab3;
00366 c = ret;
00367 }
00368 }
00369 { int ret = slice_from_s(1, s_1);
00370 if (ret < 0) return ret;
00371 }
00372 B_Y_found = 1;
00373 continue;
00374 lab3:
00375 c = c4;
00376 break;
00377 }
00378 c = c3;
00379 }
00380 return 1;
00381 }
00382
00383 int Xapian::InternalStemEnglish::r_mark_regions() {
00384 I_p1 = l;
00385 I_p2 = l;
00386 { int c1 = c;
00387 { int c2 = c;
00388 if (c + 4 >= l || p[c + 4] >> 5 != 3 || !((2375680 >> (p[c + 4] & 0x1f)) & 1)) goto lab2;
00389 if (!(find_among(a_0, 3, 0, 0))) goto lab2;
00390 goto lab1;
00391 lab2:
00392 c = c2;
00393 { int ret = out_grouping_U(g_v, 97, 121, 1);
00394 if (ret < 0) goto lab0;
00395 c += ret;
00396 }
00397 { int ret = in_grouping_U(g_v, 97, 121, 1);
00398 if (ret < 0) goto lab0;
00399 c += ret;
00400 }
00401 }
00402 lab1:
00403 I_p1 = c;
00404 { int ret = out_grouping_U(g_v, 97, 121, 1);
00405 if (ret < 0) goto lab0;
00406 c += ret;
00407 }
00408 { int ret = in_grouping_U(g_v, 97, 121, 1);
00409 if (ret < 0) goto lab0;
00410 c += ret;
00411 }
00412 I_p2 = c;
00413 lab0:
00414 c = c1;
00415 }
00416 return 1;
00417 }
00418
00419 int Xapian::InternalStemEnglish::r_shortv() {
00420 { int m1 = l - c; (void)m1;
00421 if (out_grouping_b_U(g_v_WXY, 89, 121, 0)) goto lab1;
00422 if (in_grouping_b_U(g_v, 97, 121, 0)) goto lab1;
00423 if (out_grouping_b_U(g_v, 97, 121, 0)) goto lab1;
00424 goto lab0;
00425 lab1:
00426 c = l - m1;
00427 if (out_grouping_b_U(g_v, 97, 121, 0)) return 0;
00428 if (in_grouping_b_U(g_v, 97, 121, 0)) return 0;
00429 if (c > lb) return 0;
00430 }
00431 lab0:
00432 return 1;
00433 }
00434
00435 int Xapian::InternalStemEnglish::r_R1() {
00436 if (!(I_p1 <= c)) return 0;
00437 return 1;
00438 }
00439
00440 int Xapian::InternalStemEnglish::r_R2() {
00441 if (!(I_p2 <= c)) return 0;
00442 return 1;
00443 }
00444
00445 int Xapian::InternalStemEnglish::r_Step_1a() {
00446 int among_var;
00447 { int m1 = l - c; (void)m1;
00448 ket = c;
00449 if (c <= lb || (p[c - 1] != 39 && p[c - 1] != 115)) { c = l - m1; goto lab0; }
00450 among_var = find_among_b(a_1, 3, 0, 0);
00451 if (!(among_var)) { c = l - m1; goto lab0; }
00452 bra = c;
00453 switch(among_var) {
00454 case 0: { c = l - m1; goto lab0; }
00455 case 1:
00456 if (slice_del() == -1) return -1;
00457 break;
00458 }
00459 lab0:
00460 ;
00461 }
00462 ket = c;
00463 if (c <= lb || (p[c - 1] != 100 && p[c - 1] != 115)) return 0;
00464 among_var = find_among_b(a_2, 6, 0, 0);
00465 if (!(among_var)) return 0;
00466 bra = c;
00467 switch(among_var) {
00468 case 0: return 0;
00469 case 1:
00470 { int ret = slice_from_s(2, s_2);
00471 if (ret < 0) return ret;
00472 }
00473 break;
00474 case 2:
00475 { int m2 = l - c; (void)m2;
00476 { int ret = skip_utf8(p, c, lb, l, - 2);
00477 if (ret < 0) goto lab2;
00478 c = ret;
00479 }
00480 { int ret = slice_from_s(1, s_3);
00481 if (ret < 0) return ret;
00482 }
00483 goto lab1;
00484 lab2:
00485 c = l - m2;
00486 { int ret = slice_from_s(2, s_4);
00487 if (ret < 0) return ret;
00488 }
00489 }
00490 lab1:
00491 break;
00492 case 3:
00493 { int ret = skip_utf8(p, c, lb, 0, -1);
00494 if (ret < 0) return 0;
00495 c = ret;
00496 }
00497 { int ret = out_grouping_b_U(g_v, 97, 121, 1);
00498 if (ret < 0) return 0;
00499 c -= ret;
00500 }
00501 if (slice_del() == -1) return -1;
00502 break;
00503 }
00504 return 1;
00505 }
00506
00507 int Xapian::InternalStemEnglish::r_Step_1b() {
00508 int among_var;
00509 ket = c;
00510 if (c - 1 <= lb || p[c - 1] >> 5 != 3 || !((33554576 >> (p[c - 1] & 0x1f)) & 1)) return 0;
00511 among_var = find_among_b(a_4, 6, 0, 0);
00512 if (!(among_var)) return 0;
00513 bra = c;
00514 switch(among_var) {
00515 case 0: return 0;
00516 case 1:
00517 { int ret = r_R1();
00518 if (ret <= 0) return ret;
00519 }
00520 { int ret = slice_from_s(2, s_5);
00521 if (ret < 0) return ret;
00522 }
00523 break;
00524 case 2:
00525 { int m_test1 = l - c;
00526 { int ret = out_grouping_b_U(g_v, 97, 121, 1);
00527 if (ret < 0) return 0;
00528 c -= ret;
00529 }
00530 c = l - m_test1;
00531 }
00532 if (slice_del() == -1) return -1;
00533 { int m_test2 = l - c;
00534 if (c - 1 <= lb || p[c - 1] >> 5 != 3 || !((68514004 >> (p[c - 1] & 0x1f)) & 1)) among_var = 3; else
00535 among_var = find_among_b(a_3, 13, 0, 0);
00536 if (!(among_var)) return 0;
00537 c = l - m_test2;
00538 }
00539 switch(among_var) {
00540 case 0: return 0;
00541 case 1:
00542 { int saved_c = c;
00543 insert_s(c, c, 1, s_6);
00544 c = saved_c;
00545 }
00546 break;
00547 case 2:
00548 ket = c;
00549 { int ret = skip_utf8(p, c, lb, 0, -1);
00550 if (ret < 0) return 0;
00551 c = ret;
00552 }
00553 bra = c;
00554 if (slice_del() == -1) return -1;
00555 break;
00556 case 3:
00557 if (c != I_p1) return 0;
00558 { int m_test3 = l - c;
00559 { int ret = r_shortv();
00560 if (ret <= 0) return ret;
00561 }
00562 c = l - m_test3;
00563 }
00564 { int saved_c = c;
00565 insert_s(c, c, 1, s_7);
00566 c = saved_c;
00567 }
00568 break;
00569 }
00570 break;
00571 }
00572 return 1;
00573 }
00574
00575 int Xapian::InternalStemEnglish::r_Step_1c() {
00576 ket = c;
00577 { int m1 = l - c; (void)m1;
00578 if (c <= lb || p[c - 1] != 'y') goto lab1;
00579 c--;
00580 goto lab0;
00581 lab1:
00582 c = l - m1;
00583 if (c <= lb || p[c - 1] != 'Y') return 0;
00584 c--;
00585 }
00586 lab0:
00587 bra = c;
00588 if (out_grouping_b_U(g_v, 97, 121, 0)) return 0;
00589 { int m2 = l - c; (void)m2;
00590 if (c > lb) goto lab2;
00591 return 0;
00592 lab2:
00593 c = l - m2;
00594 }
00595 { int ret = slice_from_s(1, s_8);
00596 if (ret < 0) return ret;
00597 }
00598 return 1;
00599 }
00600
00601 int Xapian::InternalStemEnglish::r_Step_2() {
00602 int among_var;
00603 ket = c;
00604 if (c - 1 <= lb || p[c - 1] >> 5 != 3 || !((815616 >> (p[c - 1] & 0x1f)) & 1)) return 0;
00605 among_var = find_among_b(a_5, 24, 0, 0);
00606 if (!(among_var)) return 0;
00607 bra = c;
00608 { int ret = r_R1();
00609 if (ret <= 0) return ret;
00610 }
00611 switch(among_var) {
00612 case 0: return 0;
00613 case 1:
00614 { int ret = slice_from_s(4, s_9);
00615 if (ret < 0) return ret;
00616 }
00617 break;
00618 case 2:
00619 { int ret = slice_from_s(4, s_10);
00620 if (ret < 0) return ret;
00621 }
00622 break;
00623 case 3:
00624 { int ret = slice_from_s(4, s_11);
00625 if (ret < 0) return ret;
00626 }
00627 break;
00628 case 4:
00629 { int ret = slice_from_s(4, s_12);
00630 if (ret < 0) return ret;
00631 }
00632 break;
00633 case 5:
00634 { int ret = slice_from_s(3, s_13);
00635 if (ret < 0) return ret;
00636 }
00637 break;
00638 case 6:
00639 { int ret = slice_from_s(3, s_14);
00640 if (ret < 0) return ret;
00641 }
00642 break;
00643 case 7:
00644 { int ret = slice_from_s(3, s_15);
00645 if (ret < 0) return ret;
00646 }
00647 break;
00648 case 8:
00649 { int ret = slice_from_s(2, s_16);
00650 if (ret < 0) return ret;
00651 }
00652 break;
00653 case 9:
00654 { int ret = slice_from_s(3, s_17);
00655 if (ret < 0) return ret;
00656 }
00657 break;
00658 case 10:
00659 { int ret = slice_from_s(3, s_18);
00660 if (ret < 0) return ret;
00661 }
00662 break;
00663 case 11:
00664 { int ret = slice_from_s(3, s_19);
00665 if (ret < 0) return ret;
00666 }
00667 break;
00668 case 12:
00669 { int ret = slice_from_s(3, s_20);
00670 if (ret < 0) return ret;
00671 }
00672 break;
00673 case 13:
00674 if (c <= lb || p[c - 1] != 'l') return 0;
00675 c--;
00676 { int ret = slice_from_s(2, s_21);
00677 if (ret < 0) return ret;
00678 }
00679 break;
00680 case 14:
00681 { int ret = slice_from_s(3, s_22);
00682 if (ret < 0) return ret;
00683 }
00684 break;
00685 case 15:
00686 { int ret = slice_from_s(4, s_23);
00687 if (ret < 0) return ret;
00688 }
00689 break;
00690 case 16:
00691 if (in_grouping_b_U(g_valid_LI, 99, 116, 0)) return 0;
00692 if (slice_del() == -1) return -1;
00693 break;
00694 }
00695 return 1;
00696 }
00697
00698 int Xapian::InternalStemEnglish::r_Step_3() {
00699 int among_var;
00700 ket = c;
00701 if (c - 2 <= lb || p[c - 1] >> 5 != 3 || !((528928 >> (p[c - 1] & 0x1f)) & 1)) return 0;
00702 among_var = find_among_b(a_6, 9, 0, 0);
00703 if (!(among_var)) return 0;
00704 bra = c;
00705 { int ret = r_R1();
00706 if (ret <= 0) return ret;
00707 }
00708 switch(among_var) {
00709 case 0: return 0;
00710 case 1:
00711 { int ret = slice_from_s(4, s_24);
00712 if (ret < 0) return ret;
00713 }
00714 break;
00715 case 2:
00716 { int ret = slice_from_s(3, s_25);
00717 if (ret < 0) return ret;
00718 }
00719 break;
00720 case 3:
00721 { int ret = slice_from_s(2, s_26);
00722 if (ret < 0) return ret;
00723 }
00724 break;
00725 case 4:
00726 { int ret = slice_from_s(2, s_27);
00727 if (ret < 0) return ret;
00728 }
00729 break;
00730 case 5:
00731 if (slice_del() == -1) return -1;
00732 break;
00733 case 6:
00734 { int ret = r_R2();
00735 if (ret <= 0) return ret;
00736 }
00737 if (slice_del() == -1) return -1;
00738 break;
00739 }
00740 return 1;
00741 }
00742
00743 int Xapian::InternalStemEnglish::r_Step_4() {
00744 int among_var;
00745 ket = c;
00746 if (c - 1 <= lb || p[c - 1] >> 5 != 3 || !((1864232 >> (p[c - 1] & 0x1f)) & 1)) return 0;
00747 among_var = find_among_b(a_7, 18, 0, 0);
00748 if (!(among_var)) return 0;
00749 bra = c;
00750 { int ret = r_R2();
00751 if (ret <= 0) return ret;
00752 }
00753 switch(among_var) {
00754 case 0: return 0;
00755 case 1:
00756 if (slice_del() == -1) return -1;
00757 break;
00758 case 2:
00759 { int m1 = l - c; (void)m1;
00760 if (c <= lb || p[c - 1] != 's') goto lab1;
00761 c--;
00762 goto lab0;
00763 lab1:
00764 c = l - m1;
00765 if (c <= lb || p[c - 1] != 't') return 0;
00766 c--;
00767 }
00768 lab0:
00769 if (slice_del() == -1) return -1;
00770 break;
00771 }
00772 return 1;
00773 }
00774
00775 int Xapian::InternalStemEnglish::r_Step_5() {
00776 int among_var;
00777 ket = c;
00778 if (c <= lb || (p[c - 1] != 101 && p[c - 1] != 108)) return 0;
00779 among_var = find_among_b(a_8, 2, 0, 0);
00780 if (!(among_var)) return 0;
00781 bra = c;
00782 switch(among_var) {
00783 case 0: return 0;
00784 case 1:
00785 { int m1 = l - c; (void)m1;
00786 { int ret = r_R2();
00787 if (ret == 0) goto lab1;
00788 if (ret < 0) return ret;
00789 }
00790 goto lab0;
00791 lab1:
00792 c = l - m1;
00793 { int ret = r_R1();
00794 if (ret <= 0) return ret;
00795 }
00796 { int m2 = l - c; (void)m2;
00797 { int ret = r_shortv();
00798 if (ret == 0) goto lab2;
00799 if (ret < 0) return ret;
00800 }
00801 return 0;
00802 lab2:
00803 c = l - m2;
00804 }
00805 }
00806 lab0:
00807 if (slice_del() == -1) return -1;
00808 break;
00809 case 2:
00810 { int ret = r_R2();
00811 if (ret <= 0) return ret;
00812 }
00813 if (c <= lb || p[c - 1] != 'l') return 0;
00814 c--;
00815 if (slice_del() == -1) return -1;
00816 break;
00817 }
00818 return 1;
00819 }
00820
00821 int Xapian::InternalStemEnglish::r_exception2() {
00822 ket = c;
00823 if (c - 5 <= lb || (p[c - 1] != 100 && p[c - 1] != 103)) return 0;
00824 if (!(find_among_b(a_9, 8, 0, 0))) return 0;
00825 bra = c;
00826 if (c > lb) return 0;
00827 return 1;
00828 }
00829
00830 int Xapian::InternalStemEnglish::r_exception1() {
00831 int among_var;
00832 bra = c;
00833 if (c + 2 >= l || p[c + 2] >> 5 != 3 || !((42750482 >> (p[c + 2] & 0x1f)) & 1)) return 0;
00834 among_var = find_among(a_10, 18, 0, 0);
00835 if (!(among_var)) return 0;
00836 ket = c;
00837 if (c < l) return 0;
00838 switch(among_var) {
00839 case 0: return 0;
00840 case 1:
00841 { int ret = slice_from_s(3, s_28);
00842 if (ret < 0) return ret;
00843 }
00844 break;
00845 case 2:
00846 { int ret = slice_from_s(3, s_29);
00847 if (ret < 0) return ret;
00848 }
00849 break;
00850 case 3:
00851 { int ret = slice_from_s(3, s_30);
00852 if (ret < 0) return ret;
00853 }
00854 break;
00855 case 4:
00856 { int ret = slice_from_s(3, s_31);
00857 if (ret < 0) return ret;
00858 }
00859 break;
00860 case 5:
00861 { int ret = slice_from_s(3, s_32);
00862 if (ret < 0) return ret;
00863 }
00864 break;
00865 case 6:
00866 { int ret = slice_from_s(3, s_33);
00867 if (ret < 0) return ret;
00868 }
00869 break;
00870 case 7:
00871 { int ret = slice_from_s(5, s_34);
00872 if (ret < 0) return ret;
00873 }
00874 break;
00875 case 8:
00876 { int ret = slice_from_s(4, s_35);
00877 if (ret < 0) return ret;
00878 }
00879 break;
00880 case 9:
00881 { int ret = slice_from_s(5, s_36);
00882 if (ret < 0) return ret;
00883 }
00884 break;
00885 case 10:
00886 { int ret = slice_from_s(4, s_37);
00887 if (ret < 0) return ret;
00888 }
00889 break;
00890 case 11:
00891 { int ret = slice_from_s(5, s_38);
00892 if (ret < 0) return ret;
00893 }
00894 break;
00895 }
00896 return 1;
00897 }
00898
00899 int Xapian::InternalStemEnglish::r_postlude() {
00900 if (!(B_Y_found)) return 0;
00901 while(1) {
00902 int c1 = c;
00903 while(1) {
00904 int c2 = c;
00905 bra = c;
00906 if (c == l || p[c] != 'Y') goto lab1;
00907 c++;
00908 ket = c;
00909 c = c2;
00910 break;
00911 lab1:
00912 c = c2;
00913 { int ret = skip_utf8(p, c, 0, l, 1);
00914 if (ret < 0) goto lab0;
00915 c = ret;
00916 }
00917 }
00918 { int ret = slice_from_s(1, s_39);
00919 if (ret < 0) return ret;
00920 }
00921 continue;
00922 lab0:
00923 c = c1;
00924 break;
00925 }
00926 return 1;
00927 }
00928
00929 int Xapian::InternalStemEnglish::stem() {
00930 { int c1 = c;
00931 { int ret = r_exception1();
00932 if (ret == 0) goto lab1;
00933 if (ret < 0) return ret;
00934 }
00935 goto lab0;
00936 lab1:
00937 c = c1;
00938 { int c2 = c;
00939 { int ret = skip_utf8(p, c, 0, l, + 3);
00940 if (ret < 0) goto lab3;
00941 c = ret;
00942 }
00943 goto lab2;
00944 lab3:
00945 c = c2;
00946 }
00947 goto lab0;
00948 lab2:
00949 c = c1;
00950 { int c3 = c;
00951 { int ret = r_prelude();
00952 if (ret == 0) goto lab4;
00953 if (ret < 0) return ret;
00954 }
00955 lab4:
00956 c = c3;
00957 }
00958 { int c4 = c;
00959 { int ret = r_mark_regions();
00960 if (ret == 0) goto lab5;
00961 if (ret < 0) return ret;
00962 }
00963 lab5:
00964 c = c4;
00965 }
00966 lb = c; c = l;
00967
00968 { int m5 = l - c; (void)m5;
00969 { int ret = r_Step_1a();
00970 if (ret == 0) goto lab6;
00971 if (ret < 0) return ret;
00972 }
00973 lab6:
00974 c = l - m5;
00975 }
00976 { int m6 = l - c; (void)m6;
00977 { int ret = r_exception2();
00978 if (ret == 0) goto lab8;
00979 if (ret < 0) return ret;
00980 }
00981 goto lab7;
00982 lab8:
00983 c = l - m6;
00984 { int m7 = l - c; (void)m7;
00985 { int ret = r_Step_1b();
00986 if (ret == 0) goto lab9;
00987 if (ret < 0) return ret;
00988 }
00989 lab9:
00990 c = l - m7;
00991 }
00992 { int m8 = l - c; (void)m8;
00993 { int ret = r_Step_1c();
00994 if (ret == 0) goto lab10;
00995 if (ret < 0) return ret;
00996 }
00997 lab10:
00998 c = l - m8;
00999 }
01000 { int m9 = l - c; (void)m9;
01001 { int ret = r_Step_2();
01002 if (ret == 0) goto lab11;
01003 if (ret < 0) return ret;
01004 }
01005 lab11:
01006 c = l - m9;
01007 }
01008 { int m10 = l - c; (void)m10;
01009 { int ret = r_Step_3();
01010 if (ret == 0) goto lab12;
01011 if (ret < 0) return ret;
01012 }
01013 lab12:
01014 c = l - m10;
01015 }
01016 { int m11 = l - c; (void)m11;
01017 { int ret = r_Step_4();
01018 if (ret == 0) goto lab13;
01019 if (ret < 0) return ret;
01020 }
01021 lab13:
01022 c = l - m11;
01023 }
01024 { int m12 = l - c; (void)m12;
01025 { int ret = r_Step_5();
01026 if (ret == 0) goto lab14;
01027 if (ret < 0) return ret;
01028 }
01029 lab14:
01030 c = l - m12;
01031 }
01032 }
01033 lab7:
01034 c = lb;
01035 { int c13 = c;
01036 { int ret = r_postlude();
01037 if (ret == 0) goto lab15;
01038 if (ret < 0) return ret;
01039 }
01040 lab15:
01041 c = c13;
01042 }
01043 }
01044 lab0:
01045 return 1;
01046 }
01047
01048 Xapian::InternalStemEnglish::InternalStemEnglish()
01049 : B_Y_found(0), I_p2(0), I_p1(0)
01050 {
01051 }
01052
01053 Xapian::InternalStemEnglish::~InternalStemEnglish()
01054 {
01055 }
01056
01057 const char *
01058 Xapian::InternalStemEnglish::get_description() const
01059 {
01060 return "english";
01061 }