PostgreSQL Source Code git master
stem_UTF_8_portuguese.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct SN_envportuguese_UTF_8_create_env (void)
 
void portuguese_UTF_8_close_env (struct SN_env *z)
 
int portuguese_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ portuguese_UTF_8_close_env()

void portuguese_UTF_8_close_env ( struct SN_env z)

Definition at line 1018 of file stem_UTF_8_portuguese.c.

1018 {
1019 SN_delete_env(z);
1020}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ portuguese_UTF_8_create_env()

struct SN_env * portuguese_UTF_8_create_env ( void  )

Definition at line 1008 of file stem_UTF_8_portuguese.c.

1008 {
1009 struct SN_env * z = SN_new_env(sizeof(SN_local));
1010 if (z) {
1011 ((SN_local *)z)->i_p2 = 0;
1012 ((SN_local *)z)->i_p1 = 0;
1013 ((SN_local *)z)->i_pV = 0;
1014 }
1015 return z;
1016}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ portuguese_UTF_8_stem()

int portuguese_UTF_8_stem ( struct SN_env z)

Definition at line 914 of file stem_UTF_8_portuguese.c.

914 {
915 {
916 int v_1 = z->c;
917 {
918 int ret = r_prelude(z);
919 if (ret < 0) return ret;
920 }
921 z->c = v_1;
922 }
923 {
924 int ret = r_mark_regions(z);
925 if (ret < 0) return ret;
926 }
927 z->lb = z->c; z->c = z->l;
928 {
929 int v_2 = z->l - z->c;
930 do {
931 int v_3 = z->l - z->c;
932 {
933 int v_4 = z->l - z->c;
934 do {
935 int v_5 = z->l - z->c;
936 {
937 int ret = r_standard_suffix(z);
938 if (ret == 0) goto lab2;
939 if (ret < 0) return ret;
940 }
941 break;
942 lab2:
943 z->c = z->l - v_5;
944 {
945 int ret = r_verb_suffix(z);
946 if (ret == 0) goto lab1;
947 if (ret < 0) return ret;
948 }
949 } while (0);
950 z->c = z->l - v_4;
951 {
952 int v_6 = z->l - z->c;
953 z->ket = z->c;
954 if (z->c <= z->lb || z->p[z->c - 1] != 'i') goto lab3;
955 z->c--;
956 z->bra = z->c;
957 {
958 int v_7 = z->l - z->c;
959 if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab3;
960 z->c--;
961 z->c = z->l - v_7;
962 }
963 {
964 int ret = r_RV(z);
965 if (ret == 0) goto lab3;
966 if (ret < 0) return ret;
967 }
968 {
969 int ret = slice_del(z);
970 if (ret < 0) return ret;
971 }
972 lab3:
973 z->c = z->l - v_6;
974 }
975 }
976 break;
977 lab1:
978 z->c = z->l - v_3;
979 {
980 int ret = r_residual_suffix(z);
981 if (ret == 0) goto lab0;
982 if (ret < 0) return ret;
983 }
984 } while (0);
985 lab0:
986 z->c = z->l - v_2;
987 }
988 {
989 int v_8 = z->l - z->c;
990 {
991 int ret = r_residual_form(z);
992 if (ret < 0) return ret;
993 }
994 z->c = z->l - v_8;
995 }
996 z->c = z->lb;
997 {
998 int v_9 = z->c;
999 {
1000 int ret = r_postlude(z);
1001 if (ret < 0) return ret;
1002 }
1003 z->c = v_9;
1004 }
1005 return 1;
1006}
static int r_standard_suffix(struct SN_env *z)
static int r_verb_suffix(struct SN_env *z)
static int r_RV(struct SN_env *z)
static int r_postlude(struct SN_env *z)
static int r_prelude(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
static int r_residual_form(struct SN_env *z)
static int r_residual_suffix(struct SN_env *z)
int lb
Definition: api.h:17
symbol * p
Definition: api.h:16
int ket
Definition: api.h:17
int c
Definition: api.h:17
int bra
Definition: api.h:17
int l
Definition: api.h:17
SNOWBALL_ERR slice_del(struct SN_env *z)
Definition: utilities.c:443

References SN_env::bra, SN_env::c, SN_env::ket, SN_env::l, SN_env::lb, SN_env::p, r_mark_regions(), r_postlude(), r_prelude(), r_residual_form(), r_residual_suffix(), r_RV(), r_standard_suffix(), r_verb_suffix(), and slice_del().