LCOV - code coverage report
Current view: top level - src/backend/snowball/libstemmer - stem_UTF_8_porter.c (source / functions) Coverage Total Hit
Test: Code coverage Lines: 0.0 % 433 0
Test Date: 2026-01-26 10:56:24 Functions: 0.0 % 14 0
Legend: Lines:     hit not hit
Branches: + taken - not taken # not executed
Branches: 0.0 % 414 0

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

Generated by: LCOV version 2.3.2-1