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