PostgreSQL Source Code  git master
stem_UTF_8_lithuanian.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_envlithuanian_UTF_8_create_env (void)
 
void lithuanian_UTF_8_close_env (struct SN_env *z)
 
int lithuanian_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ lithuanian_UTF_8_close_env()

void lithuanian_UTF_8_close_env ( struct SN_env z)

Definition at line 836 of file stem_UTF_8_lithuanian.c.

836 { SN_close_env(z, 0); }
void SN_close_env(struct SN_env *z, int S_size)
Definition: api.c:34

References SN_close_env().

◆ lithuanian_UTF_8_create_env()

struct SN_env* lithuanian_UTF_8_create_env ( void  )

Definition at line 834 of file stem_UTF_8_lithuanian.c.

834 { return SN_create_env(0, 1); }
struct SN_env * SN_create_env(int S_size, int I_size)
Definition: api.c:3

References SN_create_env().

◆ lithuanian_UTF_8_stem()

int lithuanian_UTF_8_stem ( struct SN_env z)

Definition at line 761 of file stem_UTF_8_lithuanian.c.

761  {
762  z->I[0] = z->l;
763  { int c1 = z->c;
764  { int c2 = z->c;
765  { int c_test3 = z->c;
766  if (z->c == z->l || z->p[z->c] != 'a') { z->c = c2; goto lab1; }
767  z->c++;
768  z->c = c_test3;
769  }
770  if (!(len_utf8(z->p) > 6)) { z->c = c2; goto lab1; }
771  { int ret = skip_utf8(z->p, z->c, z->l, 1);
772  if (ret < 0) { z->c = c2; goto lab1; }
773  z->c = ret;
774  }
775  lab1:
776  ;
777  }
778  {
779  int ret = out_grouping_U(z, g_v, 97, 371, 1);
780  if (ret < 0) goto lab0;
781  z->c += ret;
782  }
783  {
784  int ret = in_grouping_U(z, g_v, 97, 371, 1);
785  if (ret < 0) goto lab0;
786  z->c += ret;
787  }
788  z->I[0] = z->c;
789  lab0:
790  z->c = c1;
791  }
792  z->lb = z->c; z->c = z->l;
793 
794  { int m4 = z->l - z->c; (void)m4;
795  { int ret = r_fix_conflicts(z);
796  if (ret < 0) return ret;
797  }
798  z->c = z->l - m4;
799  }
800  { int m5 = z->l - z->c; (void)m5;
801  { int ret = r_step1(z);
802  if (ret < 0) return ret;
803  }
804  z->c = z->l - m5;
805  }
806  { int m6 = z->l - z->c; (void)m6;
807  { int ret = r_fix_chdz(z);
808  if (ret < 0) return ret;
809  }
810  z->c = z->l - m6;
811  }
812  { int m7 = z->l - z->c; (void)m7;
813  { int ret = r_step2(z);
814  if (ret < 0) return ret;
815  }
816  z->c = z->l - m7;
817  }
818  { int m8 = z->l - z->c; (void)m8;
819  { int ret = r_fix_chdz(z);
820  if (ret < 0) return ret;
821  }
822  z->c = z->l - m8;
823  }
824  { int m9 = z->l - z->c; (void)m9;
825  { int ret = r_fix_gd(z);
826  if (ret < 0) return ret;
827  }
828  z->c = z->l - m9;
829  }
830  z->c = z->lb;
831  return 1;
832 }
static int r_step1(struct SN_env *z)
static int r_fix_gd(struct SN_env *z)
static int r_fix_chdz(struct SN_env *z)
static int r_step2(struct SN_env *z)
static int r_fix_conflicts(struct SN_env *z)
static const unsigned char g_v[]
int lb
Definition: api.h:16
symbol * p
Definition: api.h:15
int * I
Definition: api.h:18
int c
Definition: api.h:16
int l
Definition: api.h:16
int out_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:141
int in_grouping_U(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:117
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:27
int len_utf8(const symbol *p)
Definition: utilities.c:478

References SN_env::c, g_v, SN_env::I, in_grouping_U(), SN_env::l, SN_env::lb, len_utf8(), out_grouping_U(), SN_env::p, r_fix_chdz(), r_fix_conflicts(), r_fix_gd(), r_step1(), r_step2(), and skip_utf8().