LCOV - code coverage report
Current view: top level - src/backend/snowball/libstemmer - stem_UTF_8_porter.c (source / functions) Hit Total Coverage
Test: PostgreSQL 14devel Lines: 0 369 0.0 %
Date: 2020-09-25 16:06:32 Functions: 0 14 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Generated by Snowball 2.0.0 - https://snowballstem.org/ */
       2             : 
       3             : #include "header.h"
       4             : 
       5             : #ifdef __cplusplus
       6             : extern "C" {
       7             : #endif
       8             : extern int porter_UTF_8_stem(struct SN_env * z);
       9             : #ifdef __cplusplus
      10             : }
      11             : #endif
      12             : static int r_Step_5b(struct SN_env * z);
      13             : static int r_Step_5a(struct SN_env * z);
      14             : static int r_Step_4(struct SN_env * z);
      15             : static int r_Step_3(struct SN_env * z);
      16             : static int r_Step_2(struct SN_env * z);
      17             : static int r_Step_1c(struct SN_env * z);
      18             : static int r_Step_1b(struct SN_env * z);
      19             : static int r_Step_1a(struct SN_env * z);
      20             : static int r_R2(struct SN_env * z);
      21             : static int r_R1(struct SN_env * z);
      22             : static int r_shortv(struct SN_env * z);
      23             : #ifdef __cplusplus
      24             : extern "C" {
      25             : #endif
      26             : 
      27             : 
      28             : extern struct SN_env * porter_UTF_8_create_env(void);
      29             : extern void porter_UTF_8_close_env(struct SN_env * z);
      30             : 
      31             : 
      32             : #ifdef __cplusplus
      33             : }
      34             : #endif
      35             : static const symbol s_0_0[1] = { 's' };
      36             : static const symbol s_0_1[3] = { 'i', 'e', 's' };
      37             : static const symbol s_0_2[4] = { 's', 's', 'e', 's' };
      38             : static const symbol s_0_3[2] = { 's', 's' };
      39             : 
      40             : static const struct among a_0[4] =
      41             : {
      42             : /*  0 */ { 1, s_0_0, -1, 3, 0},
      43             : /*  1 */ { 3, s_0_1, 0, 2, 0},
      44             : /*  2 */ { 4, s_0_2, 0, 1, 0},
      45             : /*  3 */ { 2, s_0_3, 0, -1, 0}
      46             : };
      47             : 
      48             : static const symbol s_1_1[2] = { 'b', 'b' };
      49             : static const symbol s_1_2[2] = { 'd', 'd' };
      50             : static const symbol s_1_3[2] = { 'f', 'f' };
      51             : static const symbol s_1_4[2] = { 'g', 'g' };
      52             : static const symbol s_1_5[2] = { 'b', 'l' };
      53             : static const symbol s_1_6[2] = { 'm', 'm' };
      54             : static const symbol s_1_7[2] = { 'n', 'n' };
      55             : static const symbol s_1_8[2] = { 'p', 'p' };
      56             : static const symbol s_1_9[2] = { 'r', 'r' };
      57             : static const symbol s_1_10[2] = { 'a', 't' };
      58             : static const symbol s_1_11[2] = { 't', 't' };
      59             : static const symbol s_1_12[2] = { 'i', 'z' };
      60             : 
      61             : static const struct among a_1[13] =
      62             : {
      63             : /*  0 */ { 0, 0, -1, 3, 0},
      64             : /*  1 */ { 2, s_1_1, 0, 2, 0},
      65             : /*  2 */ { 2, s_1_2, 0, 2, 0},
      66             : /*  3 */ { 2, s_1_3, 0, 2, 0},
      67             : /*  4 */ { 2, s_1_4, 0, 2, 0},
      68             : /*  5 */ { 2, s_1_5, 0, 1, 0},
      69             : /*  6 */ { 2, s_1_6, 0, 2, 0},
      70             : /*  7 */ { 2, s_1_7, 0, 2, 0},
      71             : /*  8 */ { 2, s_1_8, 0, 2, 0},
      72             : /*  9 */ { 2, s_1_9, 0, 2, 0},
      73             : /* 10 */ { 2, s_1_10, 0, 1, 0},
      74             : /* 11 */ { 2, s_1_11, 0, 2, 0},
      75             : /* 12 */ { 2, s_1_12, 0, 1, 0}
      76             : };
      77             : 
      78             : static const symbol s_2_0[2] = { 'e', 'd' };
      79             : static const symbol s_2_1[3] = { 'e', 'e', 'd' };
      80             : static const symbol s_2_2[3] = { 'i', 'n', 'g' };
      81             : 
      82             : static const struct among a_2[3] =
      83             : {
      84             : /*  0 */ { 2, s_2_0, -1, 2, 0},
      85             : /*  1 */ { 3, s_2_1, 0, 1, 0},
      86             : /*  2 */ { 3, s_2_2, -1, 2, 0}
      87             : };
      88             : 
      89             : static const symbol s_3_0[4] = { 'a', 'n', 'c', 'i' };
      90             : static const symbol s_3_1[4] = { 'e', 'n', 'c', 'i' };
      91             : static const symbol s_3_2[4] = { 'a', 'b', 'l', 'i' };
      92             : static const symbol s_3_3[3] = { 'e', 'l', 'i' };
      93             : static const symbol s_3_4[4] = { 'a', 'l', 'l', 'i' };
      94             : static const symbol s_3_5[5] = { 'o', 'u', 's', 'l', 'i' };
      95             : static const symbol s_3_6[5] = { 'e', 'n', 't', 'l', 'i' };
      96             : static const symbol s_3_7[5] = { 'a', 'l', 'i', 't', 'i' };
      97             : static const symbol s_3_8[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
      98             : static const symbol s_3_9[5] = { 'i', 'v', 'i', 't', 'i' };
      99             : static const symbol s_3_10[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
     100             : static const symbol s_3_11[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
     101             : static const symbol s_3_12[5] = { 'a', 'l', 'i', 's', 'm' };
     102             : static const symbol s_3_13[5] = { 'a', 't', 'i', 'o', 'n' };
     103             : static const symbol s_3_14[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
     104             : static const symbol s_3_15[4] = { 'i', 'z', 'e', 'r' };
     105             : static const symbol s_3_16[4] = { 'a', 't', 'o', 'r' };
     106             : static const symbol s_3_17[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
     107             : static const symbol s_3_18[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
     108             : static const symbol s_3_19[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
     109             : 
     110             : static const struct among a_3[20] =
     111             : {
     112             : /*  0 */ { 4, s_3_0, -1, 3, 0},
     113             : /*  1 */ { 4, s_3_1, -1, 2, 0},
     114             : /*  2 */ { 4, s_3_2, -1, 4, 0},
     115             : /*  3 */ { 3, s_3_3, -1, 6, 0},
     116             : /*  4 */ { 4, s_3_4, -1, 9, 0},
     117             : /*  5 */ { 5, s_3_5, -1, 11, 0},
     118             : /*  6 */ { 5, s_3_6, -1, 5, 0},
     119             : /*  7 */ { 5, s_3_7, -1, 9, 0},
     120             : /*  8 */ { 6, s_3_8, -1, 13, 0},
     121             : /*  9 */ { 5, s_3_9, -1, 12, 0},
     122             : /* 10 */ { 6, s_3_10, -1, 1, 0},
     123             : /* 11 */ { 7, s_3_11, 10, 8, 0},
     124             : /* 12 */ { 5, s_3_12, -1, 9, 0},
     125             : /* 13 */ { 5, s_3_13, -1, 8, 0},
     126             : /* 14 */ { 7, s_3_14, 13, 7, 0},
     127             : /* 15 */ { 4, s_3_15, -1, 7, 0},
     128             : /* 16 */ { 4, s_3_16, -1, 8, 0},
     129             : /* 17 */ { 7, s_3_17, -1, 12, 0},
     130             : /* 18 */ { 7, s_3_18, -1, 10, 0},
     131             : /* 19 */ { 7, s_3_19, -1, 11, 0}
     132             : };
     133             : 
     134             : static const symbol s_4_0[5] = { 'i', 'c', 'a', 't', 'e' };
     135             : static const symbol s_4_1[5] = { 'a', 't', 'i', 'v', 'e' };
     136             : static const symbol s_4_2[5] = { 'a', 'l', 'i', 'z', 'e' };
     137             : static const symbol s_4_3[5] = { 'i', 'c', 'i', 't', 'i' };
     138             : static const symbol s_4_4[4] = { 'i', 'c', 'a', 'l' };
     139             : static const symbol s_4_5[3] = { 'f', 'u', 'l' };
     140             : static const symbol s_4_6[4] = { 'n', 'e', 's', 's' };
     141             : 
     142             : static const struct among a_4[7] =
     143             : {
     144             : /*  0 */ { 5, s_4_0, -1, 2, 0},
     145             : /*  1 */ { 5, s_4_1, -1, 3, 0},
     146             : /*  2 */ { 5, s_4_2, -1, 1, 0},
     147             : /*  3 */ { 5, s_4_3, -1, 2, 0},
     148             : /*  4 */ { 4, s_4_4, -1, 2, 0},
     149             : /*  5 */ { 3, s_4_5, -1, 3, 0},
     150             : /*  6 */ { 4, s_4_6, -1, 3, 0}
     151             : };
     152             : 
     153             : static const symbol s_5_0[2] = { 'i', 'c' };
     154             : static const symbol s_5_1[4] = { 'a', 'n', 'c', 'e' };
     155             : static const symbol s_5_2[4] = { 'e', 'n', 'c', 'e' };
     156             : static const symbol s_5_3[4] = { 'a', 'b', 'l', 'e' };
     157             : static const symbol s_5_4[4] = { 'i', 'b', 'l', 'e' };
     158             : static const symbol s_5_5[3] = { 'a', 't', 'e' };
     159             : static const symbol s_5_6[3] = { 'i', 'v', 'e' };
     160             : static const symbol s_5_7[3] = { 'i', 'z', 'e' };
     161             : static const symbol s_5_8[3] = { 'i', 't', 'i' };
     162             : static const symbol s_5_9[2] = { 'a', 'l' };
     163             : static const symbol s_5_10[3] = { 'i', 's', 'm' };
     164             : static const symbol s_5_11[3] = { 'i', 'o', 'n' };
     165             : static const symbol s_5_12[2] = { 'e', 'r' };
     166             : static const symbol s_5_13[3] = { 'o', 'u', 's' };
     167             : static const symbol s_5_14[3] = { 'a', 'n', 't' };
     168             : static const symbol s_5_15[3] = { 'e', 'n', 't' };
     169             : static const symbol s_5_16[4] = { 'm', 'e', 'n', 't' };
     170             : static const symbol s_5_17[5] = { 'e', 'm', 'e', 'n', 't' };
     171             : static const symbol s_5_18[2] = { 'o', 'u' };
     172             : 
     173             : static const struct among a_5[19] =
     174             : {
     175             : /*  0 */ { 2, s_5_0, -1, 1, 0},
     176             : /*  1 */ { 4, s_5_1, -1, 1, 0},
     177             : /*  2 */ { 4, s_5_2, -1, 1, 0},
     178             : /*  3 */ { 4, s_5_3, -1, 1, 0},
     179             : /*  4 */ { 4, s_5_4, -1, 1, 0},
     180             : /*  5 */ { 3, s_5_5, -1, 1, 0},
     181             : /*  6 */ { 3, s_5_6, -1, 1, 0},
     182             : /*  7 */ { 3, s_5_7, -1, 1, 0},
     183             : /*  8 */ { 3, s_5_8, -1, 1, 0},
     184             : /*  9 */ { 2, s_5_9, -1, 1, 0},
     185             : /* 10 */ { 3, s_5_10, -1, 1, 0},
     186             : /* 11 */ { 3, s_5_11, -1, 2, 0},
     187             : /* 12 */ { 2, s_5_12, -1, 1, 0},
     188             : /* 13 */ { 3, s_5_13, -1, 1, 0},
     189             : /* 14 */ { 3, s_5_14, -1, 1, 0},
     190             : /* 15 */ { 3, s_5_15, -1, 1, 0},
     191             : /* 16 */ { 4, s_5_16, 15, 1, 0},
     192             : /* 17 */ { 5, s_5_17, 16, 1, 0},
     193             : /* 18 */ { 2, s_5_18, -1, 1, 0}
     194             : };
     195             : 
     196             : static const unsigned char g_v[] = { 17, 65, 16, 1 };
     197             : 
     198             : static const unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
     199             : 
     200             : static const symbol s_0[] = { 's', 's' };
     201             : static const symbol s_1[] = { 'i' };
     202             : static const symbol s_2[] = { 'e', 'e' };
     203             : static const symbol s_3[] = { 'e' };
     204             : static const symbol s_4[] = { 'e' };
     205             : static const symbol s_5[] = { 'i' };
     206             : static const symbol s_6[] = { 't', 'i', 'o', 'n' };
     207             : static const symbol s_7[] = { 'e', 'n', 'c', 'e' };
     208             : static const symbol s_8[] = { 'a', 'n', 'c', 'e' };
     209             : static const symbol s_9[] = { 'a', 'b', 'l', 'e' };
     210             : static const symbol s_10[] = { 'e', 'n', 't' };
     211             : static const symbol s_11[] = { 'e' };
     212             : static const symbol s_12[] = { 'i', 'z', 'e' };
     213             : static const symbol s_13[] = { 'a', 't', 'e' };
     214             : static const symbol s_14[] = { 'a', 'l' };
     215             : static const symbol s_15[] = { 'f', 'u', 'l' };
     216             : static const symbol s_16[] = { 'o', 'u', 's' };
     217             : static const symbol s_17[] = { 'i', 'v', 'e' };
     218             : static const symbol s_18[] = { 'b', 'l', 'e' };
     219             : static const symbol s_19[] = { 'a', 'l' };
     220             : static const symbol s_20[] = { 'i', 'c' };
     221             : static const symbol s_21[] = { 'Y' };
     222             : static const symbol s_22[] = { 'Y' };
     223             : static const symbol s_23[] = { 'y' };
     224             : 
     225           0 : static int r_shortv(struct SN_env * z) { /* backwardmode */
     226           0 :     if (out_grouping_b_U(z, g_v_WXY, 89, 121, 0)) return 0; /* non v_WXY, line 19 */
     227           0 :     if (in_grouping_b_U(z, g_v, 97, 121, 0)) return 0; /* grouping v, line 19 */
     228           0 :     if (out_grouping_b_U(z, g_v, 97, 121, 0)) return 0; /* non v, line 19 */
     229           0 :     return 1;
     230             : }
     231             : 
     232           0 : static int r_R1(struct SN_env * z) { /* backwardmode */
     233           0 :     if (!(z->I[0] <= z->c)) return 0; /* $(<integer expression> <= <integer expression>), line 21 */
     234           0 :     return 1;
     235             : }
     236             : 
     237           0 : static int r_R2(struct SN_env * z) { /* backwardmode */
     238           0 :     if (!(z->I[1] <= z->c)) return 0; /* $(<integer expression> <= <integer expression>), line 22 */
     239           0 :     return 1;
     240             : }
     241             : 
     242           0 : static int r_Step_1a(struct SN_env * z) { /* backwardmode */
     243             :     int among_var;
     244           0 :     z->ket = z->c; /* [, line 25 */
     245           0 :     if (z->c <= z->lb || z->p[z->c - 1] != 115) return 0; /* substring, line 25 */
     246           0 :     among_var = find_among_b(z, a_0, 4);
     247           0 :     if (!(among_var)) return 0;
     248           0 :     z->bra = z->c; /* ], line 25 */
     249           0 :     switch (among_var) { /* among, line 25 */
     250           0 :         case 1:
     251           0 :             {   int ret = slice_from_s(z, 2, s_0); /* <-, line 26 */
     252           0 :                 if (ret < 0) return ret;
     253             :             }
     254           0 :             break;
     255           0 :         case 2:
     256           0 :             {   int ret = slice_from_s(z, 1, s_1); /* <-, line 27 */
     257           0 :                 if (ret < 0) return ret;
     258             :             }
     259           0 :             break;
     260           0 :         case 3:
     261           0 :             {   int ret = slice_del(z); /* delete, line 29 */
     262           0 :                 if (ret < 0) return ret;
     263             :             }
     264           0 :             break;
     265             :     }
     266           0 :     return 1;
     267             : }
     268             : 
     269           0 : static int r_Step_1b(struct SN_env * z) { /* backwardmode */
     270             :     int among_var;
     271           0 :     z->ket = z->c; /* [, line 34 */
     272           0 :     if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 100 && z->p[z->c - 1] != 103)) return 0; /* substring, line 34 */
     273           0 :     among_var = find_among_b(z, a_2, 3);
     274           0 :     if (!(among_var)) return 0;
     275           0 :     z->bra = z->c; /* ], line 34 */
     276           0 :     switch (among_var) { /* among, line 34 */
     277           0 :         case 1:
     278           0 :             {   int ret = r_R1(z); /* call R1, line 35 */
     279           0 :                 if (ret <= 0) return ret;
     280             :             }
     281           0 :             {   int ret = slice_from_s(z, 2, s_2); /* <-, line 35 */
     282           0 :                 if (ret < 0) return ret;
     283             :             }
     284           0 :             break;
     285           0 :         case 2:
     286           0 :             {   int m_test1 = z->l - z->c; /* test, line 38 */
     287             :                 {    /* gopast */ /* grouping v, line 38 */
     288           0 :                     int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
     289           0 :                     if (ret < 0) return 0;
     290           0 :                     z->c -= ret;
     291             :                 }
     292           0 :                 z->c = z->l - m_test1;
     293             :             }
     294           0 :             {   int ret = slice_del(z); /* delete, line 38 */
     295           0 :                 if (ret < 0) return ret;
     296             :             }
     297           0 :             {   int m_test2 = z->l - z->c; /* test, line 39 */
     298           0 :                 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 /* substring, line 39 */
     299           0 :                 among_var = find_among_b(z, a_1, 13);
     300           0 :                 if (!(among_var)) return 0;
     301           0 :                 z->c = z->l - m_test2;
     302             :             }
     303             :             switch (among_var) { /* among, line 39 */
     304           0 :                 case 1:
     305           0 :                     {   int ret;
     306           0 :                         {   int saved_c = z->c;
     307           0 :                             ret = insert_s(z, z->c, z->c, 1, s_3); /* <+, line 41 */
     308           0 :                             z->c = saved_c;
     309             :                         }
     310           0 :                         if (ret < 0) return ret;
     311             :                     }
     312           0 :                     break;
     313           0 :                 case 2:
     314           0 :                     z->ket = z->c; /* [, line 44 */
     315           0 :                     {   int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
     316           0 :                         if (ret < 0) return 0;
     317           0 :                         z->c = ret; /* next, line 44 */
     318             :                     }
     319           0 :                     z->bra = z->c; /* ], line 44 */
     320           0 :                     {   int ret = slice_del(z); /* delete, line 44 */
     321           0 :                         if (ret < 0) return ret;
     322             :                     }
     323           0 :                     break;
     324           0 :                 case 3:
     325           0 :                     if (z->c != z->I[0]) return 0; /* atmark, line 45 */
     326           0 :                     {   int m_test3 = z->l - z->c; /* test, line 45 */
     327           0 :                         {   int ret = r_shortv(z); /* call shortv, line 45 */
     328           0 :                             if (ret <= 0) return ret;
     329             :                         }
     330           0 :                         z->c = z->l - m_test3;
     331             :                     }
     332           0 :                     {   int ret;
     333           0 :                         {   int saved_c = z->c;
     334           0 :                             ret = insert_s(z, z->c, z->c, 1, s_4); /* <+, line 45 */
     335           0 :                             z->c = saved_c;
     336             :                         }
     337           0 :                         if (ret < 0) return ret;
     338             :                     }
     339           0 :                     break;
     340             :             }
     341           0 :             break;
     342             :     }
     343           0 :     return 1;
     344             : }
     345             : 
     346           0 : static int r_Step_1c(struct SN_env * z) { /* backwardmode */
     347           0 :     z->ket = z->c; /* [, line 52 */
     348           0 :     {   int m1 = z->l - z->c; (void)m1; /* or, line 52 */
     349           0 :         if (z->c <= z->lb || z->p[z->c - 1] != 'y') goto lab1; /* literal, line 52 */
     350           0 :         z->c--;
     351           0 :         goto lab0;
     352           0 :     lab1:
     353           0 :         z->c = z->l - m1;
     354           0 :         if (z->c <= z->lb || z->p[z->c - 1] != 'Y') return 0; /* literal, line 52 */
     355           0 :         z->c--;
     356             :     }
     357           0 : lab0:
     358           0 :     z->bra = z->c; /* ], line 52 */
     359             :     {    /* gopast */ /* grouping v, line 53 */
     360           0 :         int ret = out_grouping_b_U(z, g_v, 97, 121, 1);
     361           0 :         if (ret < 0) return 0;
     362           0 :         z->c -= ret;
     363             :     }
     364           0 :     {   int ret = slice_from_s(z, 1, s_5); /* <-, line 54 */
     365           0 :         if (ret < 0) return ret;
     366             :     }
     367           0 :     return 1;
     368             : }
     369             : 
     370           0 : static int r_Step_2(struct SN_env * z) { /* backwardmode */
     371             :     int among_var;
     372           0 :     z->ket = z->c; /* [, line 58 */
     373           0 :     if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((815616 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 58 */
     374           0 :     among_var = find_among_b(z, a_3, 20);
     375           0 :     if (!(among_var)) return 0;
     376           0 :     z->bra = z->c; /* ], line 58 */
     377           0 :     {   int ret = r_R1(z); /* call R1, line 58 */
     378           0 :         if (ret <= 0) return ret;
     379             :     }
     380           0 :     switch (among_var) { /* among, line 58 */
     381           0 :         case 1:
     382           0 :             {   int ret = slice_from_s(z, 4, s_6); /* <-, line 59 */
     383           0 :                 if (ret < 0) return ret;
     384             :             }
     385           0 :             break;
     386           0 :         case 2:
     387           0 :             {   int ret = slice_from_s(z, 4, s_7); /* <-, line 60 */
     388           0 :                 if (ret < 0) return ret;
     389             :             }
     390           0 :             break;
     391           0 :         case 3:
     392           0 :             {   int ret = slice_from_s(z, 4, s_8); /* <-, line 61 */
     393           0 :                 if (ret < 0) return ret;
     394             :             }
     395           0 :             break;
     396           0 :         case 4:
     397           0 :             {   int ret = slice_from_s(z, 4, s_9); /* <-, line 62 */
     398           0 :                 if (ret < 0) return ret;
     399             :             }
     400           0 :             break;
     401           0 :         case 5:
     402           0 :             {   int ret = slice_from_s(z, 3, s_10); /* <-, line 63 */
     403           0 :                 if (ret < 0) return ret;
     404             :             }
     405           0 :             break;
     406           0 :         case 6:
     407           0 :             {   int ret = slice_from_s(z, 1, s_11); /* <-, line 64 */
     408           0 :                 if (ret < 0) return ret;
     409             :             }
     410           0 :             break;
     411           0 :         case 7:
     412           0 :             {   int ret = slice_from_s(z, 3, s_12); /* <-, line 66 */
     413           0 :                 if (ret < 0) return ret;
     414             :             }
     415           0 :             break;
     416           0 :         case 8:
     417           0 :             {   int ret = slice_from_s(z, 3, s_13); /* <-, line 68 */
     418           0 :                 if (ret < 0) return ret;
     419             :             }
     420           0 :             break;
     421           0 :         case 9:
     422           0 :             {   int ret = slice_from_s(z, 2, s_14); /* <-, line 69 */
     423           0 :                 if (ret < 0) return ret;
     424             :             }
     425           0 :             break;
     426           0 :         case 10:
     427           0 :             {   int ret = slice_from_s(z, 3, s_15); /* <-, line 72 */
     428           0 :                 if (ret < 0) return ret;
     429             :             }
     430           0 :             break;
     431           0 :         case 11:
     432           0 :             {   int ret = slice_from_s(z, 3, s_16); /* <-, line 74 */
     433           0 :                 if (ret < 0) return ret;
     434             :             }
     435           0 :             break;
     436           0 :         case 12:
     437           0 :             {   int ret = slice_from_s(z, 3, s_17); /* <-, line 76 */
     438           0 :                 if (ret < 0) return ret;
     439             :             }
     440           0 :             break;
     441           0 :         case 13:
     442           0 :             {   int ret = slice_from_s(z, 3, s_18); /* <-, line 77 */
     443           0 :                 if (ret < 0) return ret;
     444             :             }
     445           0 :             break;
     446             :     }
     447           0 :     return 1;
     448             : }
     449             : 
     450           0 : static int r_Step_3(struct SN_env * z) { /* backwardmode */
     451             :     int among_var;
     452           0 :     z->ket = z->c; /* [, line 82 */
     453           0 :     if (z->c - 2 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((528928 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 82 */
     454           0 :     among_var = find_among_b(z, a_4, 7);
     455           0 :     if (!(among_var)) return 0;
     456           0 :     z->bra = z->c; /* ], line 82 */
     457           0 :     {   int ret = r_R1(z); /* call R1, line 82 */
     458           0 :         if (ret <= 0) return ret;
     459             :     }
     460           0 :     switch (among_var) { /* among, line 82 */
     461           0 :         case 1:
     462           0 :             {   int ret = slice_from_s(z, 2, s_19); /* <-, line 83 */
     463           0 :                 if (ret < 0) return ret;
     464             :             }
     465           0 :             break;
     466           0 :         case 2:
     467           0 :             {   int ret = slice_from_s(z, 2, s_20); /* <-, line 85 */
     468           0 :                 if (ret < 0) return ret;
     469             :             }
     470           0 :             break;
     471           0 :         case 3:
     472           0 :             {   int ret = slice_del(z); /* delete, line 87 */
     473           0 :                 if (ret < 0) return ret;
     474             :             }
     475           0 :             break;
     476             :     }
     477           0 :     return 1;
     478             : }
     479             : 
     480           0 : static int r_Step_4(struct SN_env * z) { /* backwardmode */
     481             :     int among_var;
     482           0 :     z->ket = z->c; /* [, line 92 */
     483           0 :     if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((3961384 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0; /* substring, line 92 */
     484           0 :     among_var = find_among_b(z, a_5, 19);
     485           0 :     if (!(among_var)) return 0;
     486           0 :     z->bra = z->c; /* ], line 92 */
     487           0 :     {   int ret = r_R2(z); /* call R2, line 92 */
     488           0 :         if (ret <= 0) return ret;
     489             :     }
     490           0 :     switch (among_var) { /* among, line 92 */
     491           0 :         case 1:
     492           0 :             {   int ret = slice_del(z); /* delete, line 95 */
     493           0 :                 if (ret < 0) return ret;
     494             :             }
     495           0 :             break;
     496           0 :         case 2:
     497           0 :             {   int m1 = z->l - z->c; (void)m1; /* or, line 96 */
     498           0 :                 if (z->c <= z->lb || z->p[z->c - 1] != 's') goto lab1; /* literal, line 96 */
     499           0 :                 z->c--;
     500           0 :                 goto lab0;
     501           0 :             lab1:
     502           0 :                 z->c = z->l - m1;
     503           0 :                 if (z->c <= z->lb || z->p[z->c - 1] != 't') return 0; /* literal, line 96 */
     504           0 :                 z->c--;
     505             :             }
     506           0 :         lab0:
     507           0 :             {   int ret = slice_del(z); /* delete, line 96 */
     508           0 :                 if (ret < 0) return ret;
     509             :             }
     510           0 :             break;
     511             :     }
     512           0 :     return 1;
     513             : }
     514             : 
     515           0 : static int r_Step_5a(struct SN_env * z) { /* backwardmode */
     516           0 :     z->ket = z->c; /* [, line 101 */
     517           0 :     if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0; /* literal, line 101 */
     518           0 :     z->c--;
     519           0 :     z->bra = z->c; /* ], line 101 */
     520           0 :     {   int m1 = z->l - z->c; (void)m1; /* or, line 102 */
     521           0 :         {   int ret = r_R2(z); /* call R2, line 102 */
     522           0 :             if (ret == 0) goto lab1;
     523           0 :             if (ret < 0) return ret;
     524             :         }
     525           0 :         goto lab0;
     526           0 :     lab1:
     527           0 :         z->c = z->l - m1;
     528           0 :         {   int ret = r_R1(z); /* call R1, line 102 */
     529           0 :             if (ret <= 0) return ret;
     530             :         }
     531           0 :         {   int m2 = z->l - z->c; (void)m2; /* not, line 102 */
     532           0 :             {   int ret = r_shortv(z); /* call shortv, line 102 */
     533           0 :                 if (ret == 0) goto lab2;
     534           0 :                 if (ret < 0) return ret;
     535             :             }
     536           0 :             return 0;
     537           0 :         lab2:
     538           0 :             z->c = z->l - m2;
     539             :         }
     540             :     }
     541           0 : lab0:
     542           0 :     {   int ret = slice_del(z); /* delete, line 103 */
     543           0 :         if (ret < 0) return ret;
     544             :     }
     545           0 :     return 1;
     546             : }
     547             : 
     548           0 : static int r_Step_5b(struct SN_env * z) { /* backwardmode */
     549           0 :     z->ket = z->c; /* [, line 107 */
     550           0 :     if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0; /* literal, line 107 */
     551           0 :     z->c--;
     552           0 :     z->bra = z->c; /* ], line 107 */
     553           0 :     {   int ret = r_R2(z); /* call R2, line 108 */
     554           0 :         if (ret <= 0) return ret;
     555             :     }
     556           0 :     if (z->c <= z->lb || z->p[z->c - 1] != 'l') return 0; /* literal, line 108 */
     557           0 :     z->c--;
     558           0 :     {   int ret = slice_del(z); /* delete, line 109 */
     559           0 :         if (ret < 0) return ret;
     560             :     }
     561           0 :     return 1;
     562             : }
     563             : 
     564           0 : extern int porter_UTF_8_stem(struct SN_env * z) { /* forwardmode */
     565           0 :     z->B[0] = 0; /* unset Y_found, line 115 */
     566           0 :     {   int c1 = z->c; /* do, line 116 */
     567           0 :         z->bra = z->c; /* [, line 116 */
     568           0 :         if (z->c == z->l || z->p[z->c] != 'y') goto lab0; /* literal, line 116 */
     569           0 :         z->c++;
     570           0 :         z->ket = z->c; /* ], line 116 */
     571           0 :         {   int ret = slice_from_s(z, 1, s_21); /* <-, line 116 */
     572           0 :             if (ret < 0) return ret;
     573             :         }
     574           0 :         z->B[0] = 1; /* set Y_found, line 116 */
     575           0 :     lab0:
     576           0 :         z->c = c1;
     577             :     }
     578           0 :     {   int c2 = z->c; /* do, line 117 */
     579             : /* repeat, line 117 */
     580             : 
     581           0 :         while(1) {            int c3 = z->c;
     582           0 :             while(1) { /* goto, line 117 */
     583           0 :                 int c4 = z->c;
     584           0 :                 if (in_grouping_U(z, g_v, 97, 121, 0)) goto lab3; /* grouping v, line 117 */
     585           0 :                 z->bra = z->c; /* [, line 117 */
     586           0 :                 if (z->c == z->l || z->p[z->c] != 'y') goto lab3; /* literal, line 117 */
     587           0 :                 z->c++;
     588           0 :                 z->ket = z->c; /* ], line 117 */
     589           0 :                 z->c = c4;
     590           0 :                 break;
     591           0 :             lab3:
     592           0 :                 z->c = c4;
     593           0 :                 {   int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
     594           0 :                     if (ret < 0) goto lab2;
     595           0 :                     z->c = ret; /* goto, line 117 */
     596             :                 }
     597             :             }
     598           0 :             {   int ret = slice_from_s(z, 1, s_22); /* <-, line 117 */
     599           0 :                 if (ret < 0) return ret;
     600             :             }
     601           0 :             z->B[0] = 1; /* set Y_found, line 117 */
     602           0 :             continue;
     603           0 :         lab2:
     604           0 :             z->c = c3;
     605           0 :             break;
     606             :         }
     607           0 :         z->c = c2;
     608             :     }
     609           0 :     z->I[0] = z->l; /* $p1 = <integer expression>, line 119 */
     610           0 :     z->I[1] = z->l; /* $p2 = <integer expression>, line 120 */
     611           0 :     {   int c5 = z->c; /* do, line 121 */
     612             :         {    /* gopast */ /* grouping v, line 122 */
     613           0 :             int ret = out_grouping_U(z, g_v, 97, 121, 1);
     614           0 :             if (ret < 0) goto lab4;
     615           0 :             z->c += ret;
     616             :         }
     617             :         {    /* gopast */ /* non v, line 122 */
     618           0 :             int ret = in_grouping_U(z, g_v, 97, 121, 1);
     619           0 :             if (ret < 0) goto lab4;
     620           0 :             z->c += ret;
     621             :         }
     622           0 :         z->I[0] = z->c; /* setmark p1, line 122 */
     623             :         {    /* gopast */ /* grouping v, line 123 */
     624           0 :             int ret = out_grouping_U(z, g_v, 97, 121, 1);
     625           0 :             if (ret < 0) goto lab4;
     626           0 :             z->c += ret;
     627             :         }
     628             :         {    /* gopast */ /* non v, line 123 */
     629           0 :             int ret = in_grouping_U(z, g_v, 97, 121, 1);
     630           0 :             if (ret < 0) goto lab4;
     631           0 :             z->c += ret;
     632             :         }
     633           0 :         z->I[1] = z->c; /* setmark p2, line 123 */
     634           0 :     lab4:
     635           0 :         z->c = c5;
     636             :     }
     637           0 :     z->lb = z->c; z->c = z->l; /* backwards, line 126 */
     638             : 
     639           0 :     {   int m6 = z->l - z->c; (void)m6; /* do, line 127 */
     640           0 :         {   int ret = r_Step_1a(z); /* call Step_1a, line 127 */
     641           0 :             if (ret < 0) return ret;
     642             :         }
     643           0 :         z->c = z->l - m6;
     644             :     }
     645           0 :     {   int m7 = z->l - z->c; (void)m7; /* do, line 128 */
     646           0 :         {   int ret = r_Step_1b(z); /* call Step_1b, line 128 */
     647           0 :             if (ret < 0) return ret;
     648             :         }
     649           0 :         z->c = z->l - m7;
     650             :     }
     651           0 :     {   int m8 = z->l - z->c; (void)m8; /* do, line 129 */
     652           0 :         {   int ret = r_Step_1c(z); /* call Step_1c, line 129 */
     653           0 :             if (ret < 0) return ret;
     654             :         }
     655           0 :         z->c = z->l - m8;
     656             :     }
     657           0 :     {   int m9 = z->l - z->c; (void)m9; /* do, line 130 */
     658           0 :         {   int ret = r_Step_2(z); /* call Step_2, line 130 */
     659           0 :             if (ret < 0) return ret;
     660             :         }
     661           0 :         z->c = z->l - m9;
     662             :     }
     663           0 :     {   int m10 = z->l - z->c; (void)m10; /* do, line 131 */
     664           0 :         {   int ret = r_Step_3(z); /* call Step_3, line 131 */
     665           0 :             if (ret < 0) return ret;
     666             :         }
     667           0 :         z->c = z->l - m10;
     668             :     }
     669           0 :     {   int m11 = z->l - z->c; (void)m11; /* do, line 132 */
     670           0 :         {   int ret = r_Step_4(z); /* call Step_4, line 132 */
     671           0 :             if (ret < 0) return ret;
     672             :         }
     673           0 :         z->c = z->l - m11;
     674             :     }
     675           0 :     {   int m12 = z->l - z->c; (void)m12; /* do, line 133 */
     676           0 :         {   int ret = r_Step_5a(z); /* call Step_5a, line 133 */
     677           0 :             if (ret < 0) return ret;
     678             :         }
     679           0 :         z->c = z->l - m12;
     680             :     }
     681           0 :     {   int m13 = z->l - z->c; (void)m13; /* do, line 134 */
     682           0 :         {   int ret = r_Step_5b(z); /* call Step_5b, line 134 */
     683           0 :             if (ret < 0) return ret;
     684             :         }
     685           0 :         z->c = z->l - m13;
     686             :     }
     687           0 :     z->c = z->lb;
     688           0 :     {   int c14 = z->c; /* do, line 137 */
     689           0 :         if (!(z->B[0])) goto lab5; /* Boolean test Y_found, line 137 */
     690             : /* repeat, line 137 */
     691             : 
     692           0 :         while(1) {            int c15 = z->c;
     693           0 :             while(1) { /* goto, line 137 */
     694           0 :                 int c16 = z->c;
     695           0 :                 z->bra = z->c; /* [, line 137 */
     696           0 :                 if (z->c == z->l || z->p[z->c] != 'Y') goto lab7; /* literal, line 137 */
     697           0 :                 z->c++;
     698           0 :                 z->ket = z->c; /* ], line 137 */
     699           0 :                 z->c = c16;
     700           0 :                 break;
     701           0 :             lab7:
     702           0 :                 z->c = c16;
     703           0 :                 {   int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
     704           0 :                     if (ret < 0) goto lab6;
     705           0 :                     z->c = ret; /* goto, line 137 */
     706             :                 }
     707             :             }
     708           0 :             {   int ret = slice_from_s(z, 1, s_23); /* <-, line 137 */
     709           0 :                 if (ret < 0) return ret;
     710             :             }
     711           0 :             continue;
     712           0 :         lab6:
     713           0 :             z->c = c15;
     714           0 :             break;
     715             :         }
     716           0 :     lab5:
     717           0 :         z->c = c14;
     718             :     }
     719           0 :     return 1;
     720             : }
     721             : 
     722           0 : extern struct SN_env * porter_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
     723             : 
     724           0 : extern void porter_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
     725             : 

Generated by: LCOV version 1.13