Header And Logo

PostgreSQL
| The world's most advanced open source database.

stem_UTF_8_porter.c

Go to the documentation of this file.
00001 
00002 /* This file was generated automatically by the Snowball to ANSI C compiler */
00003 
00004 #include "header.h"
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif
00009 extern int porter_UTF_8_stem(struct SN_env * z);
00010 #ifdef __cplusplus
00011 }
00012 #endif
00013 static int r_Step_5b(struct SN_env * z);
00014 static int r_Step_5a(struct SN_env * z);
00015 static int r_Step_4(struct SN_env * z);
00016 static int r_Step_3(struct SN_env * z);
00017 static int r_Step_2(struct SN_env * z);
00018 static int r_Step_1c(struct SN_env * z);
00019 static int r_Step_1b(struct SN_env * z);
00020 static int r_Step_1a(struct SN_env * z);
00021 static int r_R2(struct SN_env * z);
00022 static int r_R1(struct SN_env * z);
00023 static int r_shortv(struct SN_env * z);
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 
00029 extern struct SN_env * porter_UTF_8_create_env(void);
00030 extern void porter_UTF_8_close_env(struct SN_env * z);
00031 
00032 
00033 #ifdef __cplusplus
00034 }
00035 #endif
00036 static const symbol s_0_0[1] = { 's' };
00037 static const symbol s_0_1[3] = { 'i', 'e', 's' };
00038 static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
00039 static const symbol s_0_3[2] = { 's', 's' };
00040 
00041 static const struct among a_0[4] =
00042 {
00043 /*  0 */ { 1, s_0_0, -1, 3, 0},
00044 /*  1 */ { 3, s_0_1, 0, 2, 0},
00045 /*  2 */ { 4, s_0_2, 0, 1, 0},
00046 /*  3 */ { 2, s_0_3, 0, -1, 0}
00047 };
00048 
00049 static const symbol s_1_1[2] = { 'b', 'b' };
00050 static const symbol s_1_2[2] = { 'd', 'd' };
00051 static const symbol s_1_3[2] = { 'f', 'f' };
00052 static const symbol s_1_4[2] = { 'g', 'g' };
00053 static const symbol s_1_5[2] = { 'b', 'l' };
00054 static const symbol s_1_6[2] = { 'm', 'm' };
00055 static const symbol s_1_7[2] = { 'n', 'n' };
00056 static const symbol s_1_8[2] = { 'p', 'p' };
00057 static const symbol s_1_9[2] = { 'r', 'r' };
00058 static const symbol s_1_10[2] = { 'a', 't' };
00059 static const symbol s_1_11[2] = { 't', 't' };
00060 static const symbol s_1_12[2] = { 'i', 'z' };
00061 
00062 static const struct among a_1[13] =
00063 {
00064 /*  0 */ { 0, 0, -1, 3, 0},
00065 /*  1 */ { 2, s_1_1, 0, 2, 0},
00066 /*  2 */ { 2, s_1_2, 0, 2, 0},
00067 /*  3 */ { 2, s_1_3, 0, 2, 0},
00068 /*  4 */ { 2, s_1_4, 0, 2, 0},
00069 /*  5 */ { 2, s_1_5, 0, 1, 0},
00070 /*  6 */ { 2, s_1_6, 0, 2, 0},
00071 /*  7 */ { 2, s_1_7, 0, 2, 0},
00072 /*  8 */ { 2, s_1_8, 0, 2, 0},
00073 /*  9 */ { 2, s_1_9, 0, 2, 0},
00074 /* 10 */ { 2, s_1_10, 0, 1, 0},
00075 /* 11 */ { 2, s_1_11, 0, 2, 0},
00076 /* 12 */ { 2, s_1_12, 0, 1, 0}
00077 };
00078 
00079 static const symbol s_2_0[2] = { 'e', 'd' };
00080 static const symbol s_2_1[3] = { 'e', 'e', 'd' };
00081 static const symbol s_2_2[3] = { 'i', 'n', 'g' };
00082 
00083 static const struct among a_2[3] =
00084 {
00085 /*  0 */ { 2, s_2_0, -1, 2, 0},
00086 /*  1 */ { 3, s_2_1, 0, 1, 0},
00087 /*  2 */ { 3, s_2_2, -1, 2, 0}
00088 };
00089 
00090 static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
00091 static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
00092 static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
00093 static const symbol s_3_3[3] = { 'e', 'l', 'i' };
00094 static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
00095 static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
00096 static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
00097 static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
00098 static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
00099 static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
00100 static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
00101 static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
00102 static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
00103 static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
00104 static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
00105 static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
00106 static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
00107 static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
00108 static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
00109 static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
00110 
00111 static const struct among a_3[20] =
00112 {
00113 /*  0 */ { 4, s_3_0, -1, 3, 0},
00114 /*  1 */ { 4, s_3_1, -1, 2, 0},
00115 /*  2 */ { 4, s_3_2, -1, 4, 0},
00116 /*  3 */ { 3, s_3_3, -1, 6, 0},
00117 /*  4 */ { 4, s_3_4, -1, 9, 0},
00118 /*  5 */ { 5, s_3_5, -1, 12, 0},
00119 /*  6 */ { 5, s_3_6, -1, 5, 0},
00120 /*  7 */ { 5, s_3_7, -1, 10, 0},
00121 /*  8 */ { 6, s_3_8, -1, 14, 0},
00122 /*  9 */ { 5, s_3_9, -1, 13, 0},
00123 /* 10 */ { 6, s_3_10, -1, 1, 0},
00124 /* 11 */ { 7, s_3_11, 10, 8, 0},
00125 /* 12 */ { 5, s_3_12, -1, 10, 0},
00126 /* 13 */ { 5, s_3_13, -1, 8, 0},
00127 /* 14 */ { 7, s_3_14, 13, 7, 0},
00128 /* 15 */ { 4, s_3_15, -1, 7, 0},
00129 /* 16 */ { 4, s_3_16, -1, 8, 0},
00130 /* 17 */ { 7, s_3_17, -1, 13, 0},
00131 /* 18 */ { 7, s_3_18, -1, 11, 0},
00132 /* 19 */ { 7, s_3_19, -1, 12, 0}
00133 };
00134 
00135 static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
00136 static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
00137 static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
00138 static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
00139 static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
00140 static const symbol s_4_5[3] = { 'f', 'u', 'l' };
00141 static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
00142 
00143 static const struct among a_4[7] =
00144 {
00145 /*  0 */ { 5, s_4_0, -1, 2, 0},
00146 /*  1 */ { 5, s_4_1, -1, 3, 0},
00147 /*  2 */ { 5, s_4_2, -1, 1, 0},
00148 /*  3 */ { 5, s_4_3, -1, 2, 0},
00149 /*  4 */ { 4, s_4_4, -1, 2, 0},
00150 /*  5 */ { 3, s_4_5, -1, 3, 0},
00151 /*  6 */ { 4, s_4_6, -1, 3, 0}
00152 };
00153 
00154 static const symbol s_5_0[2] = { 'i', 'c' };
00155 static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
00156 static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
00157 static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
00158 static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
00159 static const symbol s_5_5[3] = { 'a', 't', 'e' };
00160 static const symbol s_5_6[3] = { 'i', 'v', 'e' };
00161 static const symbol s_5_7[3] = { 'i', 'z', 'e' };
00162 static const symbol s_5_8[3] = { 'i', 't', 'i' };
00163 static const symbol s_5_9[2] = { 'a', 'l' };
00164 static const symbol s_5_10[3] = { 'i', 's', 'm' };
00165 static const symbol s_5_11[3] = { 'i', 'o', 'n' };
00166 static const symbol s_5_12[2] = { 'e', 'r' };
00167 static const symbol s_5_13[3] = { 'o', 'u', 's' };
00168 static const symbol s_5_14[3] = { 'a', 'n', 't' };
00169 static const symbol s_5_15[3] = { 'e', 'n', 't' };
00170 static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
00171 static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
00172 static const symbol s_5_18[2] = { 'o', 'u' };
00173 
00174 static const struct among a_5[19] =
00175 {
00176 /*  0 */ { 2, s_5_0, -1, 1, 0},
00177 /*  1 */ { 4, s_5_1, -1, 1, 0},
00178 /*  2 */ { 4, s_5_2, -1, 1, 0},
00179 /*  3 */ { 4, s_5_3, -1, 1, 0},
00180 /*  4 */ { 4, s_5_4, -1, 1, 0},
00181 /*  5 */ { 3, s_5_5, -1, 1, 0},
00182 /*  6 */ { 3, s_5_6, -1, 1, 0},
00183 /*  7 */ { 3, s_5_7, -1, 1, 0},
00184 /*  8 */ { 3, s_5_8, -1, 1, 0},
00185 /*  9 */ { 2, s_5_9, -1, 1, 0},
00186 /* 10 */ { 3, s_5_10, -1, 1, 0},
00187 /* 11 */ { 3, s_5_11, -1, 2, 0},
00188 /* 12 */ { 2, s_5_12, -1, 1, 0},
00189 /* 13 */ { 3, s_5_13, -1, 1, 0},
00190 /* 14 */ { 3, s_5_14, -1, 1, 0},
00191 /* 15 */ { 3, s_5_15, -1, 1, 0},
00192 /* 16 */ { 4, s_5_16, 15, 1, 0},
00193 /* 17 */ { 5, s_5_17, 16, 1, 0},
00194 /* 18 */ { 2, s_5_18, -1, 1, 0}
00195 };
00196 
00197 static const unsigned char g_v[] = { 17, 65, 16, 1 };
00198 
00199 static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
00200 
00201 static const symbol s_0[] = { 's', 's' };
00202 static const symbol s_1[] = { 'i' };
00203 static const symbol s_2[] = { 'e', 'e' };
00204 static const symbol s_3[] = { 'e' };
00205 static const symbol s_4[] = { 'e' };
00206 static const symbol s_5[] = { 'y' };
00207 static const symbol s_6[] = { 'Y' };
00208 static const symbol s_7[] = { 'i' };
00209 static const symbol s_8[] = { 't', 'i', 'o', 'n' };
00210 static const symbol s_9[] = { 'e', 'n', 'c', 'e' };
00211 static const symbol s_10[] = { 'a', 'n', 'c', 'e' };
00212 static const symbol s_11[] = { 'a', 'b', 'l', 'e' };
00213 static const symbol s_12[] = { 'e', 'n', 't' };
00214 static const symbol s_13[] = { 'e' };
00215 static const symbol s_14[] = { 'i', 'z', 'e' };
00216 static const symbol s_15[] = { 'a', 't', 'e' };
00217 static const symbol s_16[] = { 'a', 'l' };
00218 static const symbol s_17[] = { 'a', 'l' };
00219 static const symbol s_18[] = { 'f', 'u', 'l' };
00220 static const symbol s_19[] = { 'o', 'u', 's' };
00221 static const symbol s_20[] = { 'i', 'v', 'e' };
00222 static const symbol s_21[] = { 'b', 'l', 'e' };
00223 static const symbol s_22[] = { 'a', 'l' };
00224 static const symbol s_23[] = { 'i', 'c' };
00225 static const symbol s_24[] = { 's' };
00226 static const symbol s_25[] = { 't' };
00227 static const symbol s_26[] = { 'e' };
00228 static const symbol s_27[] = { 'l' };
00229 static const symbol s_28[] = { 'l' };
00230 static const symbol s_29[] = { 'y' };
00231 static const symbol s_30[] = { 'Y' };
00232 static const symbol s_31[] = { 'y' };
00233 static const symbol s_32[] = { 'Y' };
00234 static const symbol s_33[] = { 'Y' };
00235 static const symbol s_34[] = { 'y' };
00236 
00237 static int r_shortv(struct SN_env * z) {
00238     if (out_grouping_b_U(z, g_v_WXY, 89, 121, 0)) return 0;
00239     if (in_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
00240     if (out_grouping_b_U(z, g_v, 97, 121, 0)) return 0;
00241     return 1;
00242 }
00243 
00244 static int r_R1(struct SN_env * z) {
00245     if (!(z->I[0] <= z->c)) return 0;
00246     return 1;
00247 }
00248 
00249 static int r_R2(struct SN_env * z) {
00250     if (!(z->I[1] <= z->c)) return 0;
00251     return 1;
00252 }
00253 
00254 static int r_Step_1a(struct SN_env * z) {
00255     int among_var;
00256     z->ket = z->c; /* [, line 25 */
00257     if (z->c <= z->lb || z->p[z->c - 1] != 115) return 0;
00258     among_var = find_among_b(z, a_0, 4); /* substring, line 25 */
00259     if (!(among_var)) return 0;
00260     z->bra = z->c; /* ], line 25 */
00261     switch(among_var) {
00262         case 0: return 0;
00263         case 1:
00264             {   int ret = slice_from_s(z, 2, s_0); /* <-, line 26 */
00265                 if (ret < 0) return ret;
00266             }
00267             break;
00268         case 2:
00269             {   int ret = slice_from_s(z, 1, s_1); /* <-, line 27 */
00270                 if (ret < 0) return ret;
00271             }
00272             break;
00273         case 3:
00274             {   int ret = slice_del(z); /* delete, line 29 */
00275                 if (ret < 0) return ret;
00276             }
00277             break;
00278     }
00279     return 1;
00280 }
00281 
00282 static int r_Step_1b(struct SN_env * z) {
00283     int among_var;
00284     z->ket = z->c; /* [, line 34 */
00285     if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0;
00286     among_var = find_among_b(z, a_2, 3); /* substring, line 34 */
00287     if (!(among_var)) return 0;
00288     z->bra = z->c; /* ], line 34 */
00289     switch(among_var) {
00290         case 0: return 0;
00291         case 1:
00292             {   int ret = r_R1(z);
00293                 if (ret == 0) return 0; /* call R1, line 35 */
00294                 if (ret < 0) return ret;
00295             }
00296             {   int ret = slice_from_s(z, 2, s_2); /* <-, line 35 */
00297                 if (ret < 0) return ret;
00298             }
00299             break;
00300         case 2:
00301             {   int m_test = z->l - z->c; /* test, line 38 */
00302                 {    /* gopast */ /* grouping v, line 38 */
00303                     int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
00304                     if (ret < 0) return 0;
00305                     z->c -= ret;
00306                 }
00307                 z->c = z->l - m_test;
00308             }
00309             {   int ret = slice_del(z); /* delete, line 38 */
00310                 if (ret < 0) return ret;
00311             }
00312             {   int m_test = z->l - z->c; /* test, line 39 */
00313                 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
00314                 among_var = find_among_b(z, a_1, 13); /* substring, line 39 */
00315                 if (!(among_var)) return 0;
00316                 z->c = z->l - m_test;
00317             }
00318             switch(among_var) {
00319                 case 0: return 0;
00320                 case 1:
00321                     {   int c_keep = z->c;
00322                         int ret = insert_s(z, z->c, z->c, 1, s_3); /* <+, line 41 */
00323                         z->c = c_keep;
00324                         if (ret < 0) return ret;
00325                     }
00326                     break;
00327                 case 2:
00328                     z->ket = z->c; /* [, line 44 */
00329                     {   int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
00330                         if (ret < 0) return 0;
00331                         z->c = ret; /* next, line 44 */
00332                     }
00333                     z->bra = z->c; /* ], line 44 */
00334                     {   int ret = slice_del(z); /* delete, line 44 */
00335                         if (ret < 0) return ret;
00336                     }
00337                     break;
00338                 case 3:
00339                     if (z->c != z->I[0]) return 0; /* atmark, line 45 */
00340                     {   int m_test = z->l - z->c; /* test, line 45 */
00341                         {   int ret = r_shortv(z);
00342                             if (ret == 0) return 0; /* call shortv, line 45 */
00343                             if (ret < 0) return ret;
00344                         }
00345                         z->c = z->l - m_test;
00346                     }
00347                     {   int c_keep = z->c;
00348                         int ret = insert_s(z, z->c, z->c, 1, s_4); /* <+, line 45 */
00349                         z->c = c_keep;
00350                         if (ret < 0) return ret;
00351                     }
00352                     break;
00353             }
00354             break;
00355     }
00356     return 1;
00357 }
00358 
00359 static int r_Step_1c(struct SN_env * z) {
00360     z->ket = z->c; /* [, line 52 */
00361     {   int m1 = z->l - z->c; (void)m1; /* or, line 52 */
00362         if (!(eq_s_b(z, 1, s_5))) goto lab1;
00363         goto lab0;
00364     lab1:
00365         z->c = z->l - m1;
00366         if (!(eq_s_b(z, 1, s_6))) return 0;
00367     }
00368 lab0:
00369     z->bra = z->c; /* ], line 52 */
00370     {    /* gopast */ /* grouping v, line 53 */
00371         int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
00372         if (ret < 0) return 0;
00373         z->c -= ret;
00374     }
00375     {   int ret = slice_from_s(z, 1, s_7); /* <-, line 54 */
00376         if (ret < 0) return ret;
00377     }
00378     return 1;
00379 }
00380 
00381 static int r_Step_2(struct SN_env * z) {
00382     int among_var;
00383     z->ket = z->c; /* [, line 58 */
00384     if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
00385     among_var = find_among_b(z, a_3, 20); /* substring, line 58 */
00386     if (!(among_var)) return 0;
00387     z->bra = z->c; /* ], line 58 */
00388     {   int ret = r_R1(z);
00389         if (ret == 0) return 0; /* call R1, line 58 */
00390         if (ret < 0) return ret;
00391     }
00392     switch(among_var) {
00393         case 0: return 0;
00394         case 1:
00395             {   int ret = slice_from_s(z, 4, s_8); /* <-, line 59 */
00396                 if (ret < 0) return ret;
00397             }
00398             break;
00399         case 2:
00400             {   int ret = slice_from_s(z, 4, s_9); /* <-, line 60 */
00401                 if (ret < 0) return ret;
00402             }
00403             break;
00404         case 3:
00405             {   int ret = slice_from_s(z, 4, s_10); /* <-, line 61 */
00406                 if (ret < 0) return ret;
00407             }
00408             break;
00409         case 4:
00410             {   int ret = slice_from_s(z, 4, s_11); /* <-, line 62 */
00411                 if (ret < 0) return ret;
00412             }
00413             break;
00414         case 5:
00415             {   int ret = slice_from_s(z, 3, s_12); /* <-, line 63 */
00416                 if (ret < 0) return ret;
00417             }
00418             break;
00419         case 6:
00420             {   int ret = slice_from_s(z, 1, s_13); /* <-, line 64 */
00421                 if (ret < 0) return ret;
00422             }
00423             break;
00424         case 7:
00425             {   int ret = slice_from_s(z, 3, s_14); /* <-, line 66 */
00426                 if (ret < 0) return ret;
00427             }
00428             break;
00429         case 8:
00430             {   int ret = slice_from_s(z, 3, s_15); /* <-, line 68 */
00431                 if (ret < 0) return ret;
00432             }
00433             break;
00434         case 9:
00435             {   int ret = slice_from_s(z, 2, s_16); /* <-, line 69 */
00436                 if (ret < 0) return ret;
00437             }
00438             break;
00439         case 10:
00440             {   int ret = slice_from_s(z, 2, s_17); /* <-, line 71 */
00441                 if (ret < 0) return ret;
00442             }
00443             break;
00444         case 11:
00445             {   int ret = slice_from_s(z, 3, s_18); /* <-, line 72 */
00446                 if (ret < 0) return ret;
00447             }
00448             break;
00449         case 12:
00450             {   int ret = slice_from_s(z, 3, s_19); /* <-, line 74 */
00451                 if (ret < 0) return ret;
00452             }
00453             break;
00454         case 13:
00455             {   int ret = slice_from_s(z, 3, s_20); /* <-, line 76 */
00456                 if (ret < 0) return ret;
00457             }
00458             break;
00459         case 14:
00460             {   int ret = slice_from_s(z, 3, s_21); /* <-, line 77 */
00461                 if (ret < 0) return ret;
00462             }
00463             break;
00464     }
00465     return 1;
00466 }
00467 
00468 static int r_Step_3(struct SN_env * z) {
00469     int among_var;
00470     z->ket = z->c; /* [, line 82 */
00471     if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
00472     among_var = find_among_b(z, a_4, 7); /* substring, line 82 */
00473     if (!(among_var)) return 0;
00474     z->bra = z->c; /* ], line 82 */
00475     {   int ret = r_R1(z);
00476         if (ret == 0) return 0; /* call R1, line 82 */
00477         if (ret < 0) return ret;
00478     }
00479     switch(among_var) {
00480         case 0: return 0;
00481         case 1:
00482             {   int ret = slice_from_s(z, 2, s_22); /* <-, line 83 */
00483                 if (ret < 0) return ret;
00484             }
00485             break;
00486         case 2:
00487             {   int ret = slice_from_s(z, 2, s_23); /* <-, line 85 */
00488                 if (ret < 0) return ret;
00489             }
00490             break;
00491         case 3:
00492             {   int ret = slice_del(z); /* delete, line 87 */
00493                 if (ret < 0) return ret;
00494             }
00495             break;
00496     }
00497     return 1;
00498 }
00499 
00500 static int r_Step_4(struct SN_env * z) {
00501     int among_var;
00502     z->ket = z->c; /* [, line 92 */
00503     if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
00504     among_var = find_among_b(z, a_5, 19); /* substring, line 92 */
00505     if (!(among_var)) return 0;
00506     z->bra = z->c; /* ], line 92 */
00507     {   int ret = r_R2(z);
00508         if (ret == 0) return 0; /* call R2, line 92 */
00509         if (ret < 0) return ret;
00510     }
00511     switch(among_var) {
00512         case 0: return 0;
00513         case 1:
00514             {   int ret = slice_del(z); /* delete, line 95 */
00515                 if (ret < 0) return ret;
00516             }
00517             break;
00518         case 2:
00519             {   int m1 = z->l - z->c; (void)m1; /* or, line 96 */
00520                 if (!(eq_s_b(z, 1, s_24))) goto lab1;
00521                 goto lab0;
00522             lab1:
00523                 z->c = z->l - m1;
00524                 if (!(eq_s_b(z, 1, s_25))) return 0;
00525             }
00526         lab0:
00527             {   int ret = slice_del(z); /* delete, line 96 */
00528                 if (ret < 0) return ret;
00529             }
00530             break;
00531     }
00532     return 1;
00533 }
00534 
00535 static int r_Step_5a(struct SN_env * z) {
00536     z->ket = z->c; /* [, line 101 */
00537     if (!(eq_s_b(z, 1, s_26))) return 0;
00538     z->bra = z->c; /* ], line 101 */
00539     {   int m1 = z->l - z->c; (void)m1; /* or, line 102 */
00540         {   int ret = r_R2(z);
00541             if (ret == 0) goto lab1; /* call R2, line 102 */
00542             if (ret < 0) return ret;
00543         }
00544         goto lab0;
00545     lab1:
00546         z->c = z->l - m1;
00547         {   int ret = r_R1(z);
00548             if (ret == 0) return 0; /* call R1, line 102 */
00549             if (ret < 0) return ret;
00550         }
00551         {   int m2 = z->l - z->c; (void)m2; /* not, line 102 */
00552             {   int ret = r_shortv(z);
00553                 if (ret == 0) goto lab2; /* call shortv, line 102 */
00554                 if (ret < 0) return ret;
00555             }
00556             return 0;
00557         lab2:
00558             z->c = z->l - m2;
00559         }
00560     }
00561 lab0:
00562     {   int ret = slice_del(z); /* delete, line 103 */
00563         if (ret < 0) return ret;
00564     }
00565     return 1;
00566 }
00567 
00568 static int r_Step_5b(struct SN_env * z) {
00569     z->ket = z->c; /* [, line 107 */
00570     if (!(eq_s_b(z, 1, s_27))) return 0;
00571     z->bra = z->c; /* ], line 107 */
00572     {   int ret = r_R2(z);
00573         if (ret == 0) return 0; /* call R2, line 108 */
00574         if (ret < 0) return ret;
00575     }
00576     if (!(eq_s_b(z, 1, s_28))) return 0;
00577     {   int ret = slice_del(z); /* delete, line 109 */
00578         if (ret < 0) return ret;
00579     }
00580     return 1;
00581 }
00582 
00583 extern int porter_UTF_8_stem(struct SN_env * z) {
00584     z->B[0] = 0; /* unset Y_found, line 115 */
00585     {   int c1 = z->c; /* do, line 116 */
00586         z->bra = z->c; /* [, line 116 */
00587         if (!(eq_s(z, 1, s_29))) goto lab0;
00588         z->ket = z->c; /* ], line 116 */
00589         {   int ret = slice_from_s(z, 1, s_30); /* <-, line 116 */
00590             if (ret < 0) return ret;
00591         }
00592         z->B[0] = 1; /* set Y_found, line 116 */
00593     lab0:
00594         z->c = c1;
00595     }
00596     {   int c2 = z->c; /* do, line 117 */
00597         while(1) { /* repeat, line 117 */
00598             int c3 = z->c;
00599             while(1) { /* goto, line 117 */
00600                 int c4 = z->c;
00601                 if (in_grouping_U(z, g_v, 97, 121, 0)) goto lab3;
00602                 z->bra = z->c; /* [, line 117 */
00603                 if (!(eq_s(z, 1, s_31))) goto lab3;
00604                 z->ket = z->c; /* ], line 117 */
00605                 z->c = c4;
00606                 break;
00607             lab3:
00608                 z->c = c4;
00609                 {   int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
00610                     if (ret < 0) goto lab2;
00611                     z->c = ret; /* goto, line 117 */
00612                 }
00613             }
00614             {   int ret = slice_from_s(z, 1, s_32); /* <-, line 117 */
00615                 if (ret < 0) return ret;
00616             }
00617             z->B[0] = 1; /* set Y_found, line 117 */
00618             continue;
00619         lab2:
00620             z->c = c3;
00621             break;
00622         }
00623         z->c = c2;
00624     }
00625     z->I[0] = z->l;
00626     z->I[1] = z->l;
00627     {   int c5 = z->c; /* do, line 121 */
00628         {    /* gopast */ /* grouping v, line 122 */
00629             int ret = out_grouping_U(z, g_v, 97, 121, 1);
00630             if (ret < 0) goto lab4;
00631             z->c += ret;
00632         }
00633         {    /* gopast */ /* non v, line 122 */
00634             int ret = in_grouping_U(z, g_v, 97, 121, 1);
00635             if (ret < 0) goto lab4;
00636             z->c += ret;
00637         }
00638         z->I[0] = z->c; /* setmark p1, line 122 */
00639         {    /* gopast */ /* grouping v, line 123 */
00640             int ret = out_grouping_U(z, g_v, 97, 121, 1);
00641             if (ret < 0) goto lab4;
00642             z->c += ret;
00643         }
00644         {    /* gopast */ /* non v, line 123 */
00645             int ret = in_grouping_U(z, g_v, 97, 121, 1);
00646             if (ret < 0) goto lab4;
00647             z->c += ret;
00648         }
00649         z->I[1] = z->c; /* setmark p2, line 123 */
00650     lab4:
00651         z->c = c5;
00652     }
00653     z->lb = z->c; z->c = z->l; /* backwards, line 126 */
00654 
00655     {   int m6 = z->l - z->c; (void)m6; /* do, line 127 */
00656         {   int ret = r_Step_1a(z);
00657             if (ret == 0) goto lab5; /* call Step_1a, line 127 */
00658             if (ret < 0) return ret;
00659         }
00660     lab5:
00661         z->c = z->l - m6;
00662     }
00663     {   int m7 = z->l - z->c; (void)m7; /* do, line 128 */
00664         {   int ret = r_Step_1b(z);
00665             if (ret == 0) goto lab6; /* call Step_1b, line 128 */
00666             if (ret < 0) return ret;
00667         }
00668     lab6:
00669         z->c = z->l - m7;
00670     }
00671     {   int m8 = z->l - z->c; (void)m8; /* do, line 129 */
00672         {   int ret = r_Step_1c(z);
00673             if (ret == 0) goto lab7; /* call Step_1c, line 129 */
00674             if (ret < 0) return ret;
00675         }
00676     lab7:
00677         z->c = z->l - m8;
00678     }
00679     {   int m9 = z->l - z->c; (void)m9; /* do, line 130 */
00680         {   int ret = r_Step_2(z);
00681             if (ret == 0) goto lab8; /* call Step_2, line 130 */
00682             if (ret < 0) return ret;
00683         }
00684     lab8:
00685         z->c = z->l - m9;
00686     }
00687     {   int m10 = z->l - z->c; (void)m10; /* do, line 131 */
00688         {   int ret = r_Step_3(z);
00689             if (ret == 0) goto lab9; /* call Step_3, line 131 */
00690             if (ret < 0) return ret;
00691         }
00692     lab9:
00693         z->c = z->l - m10;
00694     }
00695     {   int m11 = z->l - z->c; (void)m11; /* do, line 132 */
00696         {   int ret = r_Step_4(z);
00697             if (ret == 0) goto lab10; /* call Step_4, line 132 */
00698             if (ret < 0) return ret;
00699         }
00700     lab10:
00701         z->c = z->l - m11;
00702     }
00703     {   int m12 = z->l - z->c; (void)m12; /* do, line 133 */
00704         {   int ret = r_Step_5a(z);
00705             if (ret == 0) goto lab11; /* call Step_5a, line 133 */
00706             if (ret < 0) return ret;
00707         }
00708     lab11:
00709         z->c = z->l - m12;
00710     }
00711     {   int m13 = z->l - z->c; (void)m13; /* do, line 134 */
00712         {   int ret = r_Step_5b(z);
00713             if (ret == 0) goto lab12; /* call Step_5b, line 134 */
00714             if (ret < 0) return ret;
00715         }
00716     lab12:
00717         z->c = z->l - m13;
00718     }
00719     z->c = z->lb;
00720     {   int c14 = z->c; /* do, line 137 */
00721         if (!(z->B[0])) goto lab13; /* Boolean test Y_found, line 137 */
00722         while(1) { /* repeat, line 137 */
00723             int c15 = z->c;
00724             while(1) { /* goto, line 137 */
00725                 int c16 = z->c;
00726                 z->bra = z->c; /* [, line 137 */
00727                 if (!(eq_s(z, 1, s_33))) goto lab15;
00728                 z->ket = z->c; /* ], line 137 */
00729                 z->c = c16;
00730                 break;
00731             lab15:
00732                 z->c = c16;
00733                 {   int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
00734                     if (ret < 0) goto lab14;
00735                     z->c = ret; /* goto, line 137 */
00736                 }
00737             }
00738             {   int ret = slice_from_s(z, 1, s_34); /* <-, line 137 */
00739                 if (ret < 0) return ret;
00740             }
00741             continue;
00742         lab14:
00743             z->c = c15;
00744             break;
00745         }
00746     lab13:
00747         z->c = c14;
00748     }
00749     return 1;
00750 }
00751 
00752 extern struct SN_env * porter_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
00753 
00754 extern void porter_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
00755