PostgreSQL Source Code  git master
stem_UTF_8_russian.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_envrussian_UTF_8_create_env (void)
 
void russian_UTF_8_close_env (struct SN_env *z)
 
int russian_UTF_8_stem (struct SN_env *z)
 

Function Documentation

◆ russian_UTF_8_close_env()

void russian_UTF_8_close_env ( struct SN_env z)

Definition at line 677 of file stem_UTF_8_russian.c.

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

References SN_close_env().

◆ russian_UTF_8_create_env()

struct SN_env* russian_UTF_8_create_env ( void  )

Definition at line 675 of file stem_UTF_8_russian.c.

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

References SN_create_env().

◆ russian_UTF_8_stem()

int russian_UTF_8_stem ( struct SN_env z)

Definition at line 565 of file stem_UTF_8_russian.c.

565  {
566  { int c1 = z->c;
567  while(1) {
568  int c2 = z->c;
569  while(1) {
570  int c3 = z->c;
571  z->bra = z->c;
572  if (!(eq_s(z, 2, s_9))) goto lab2;
573  z->ket = z->c;
574  z->c = c3;
575  break;
576  lab2:
577  z->c = c3;
578  { int ret = skip_utf8(z->p, z->c, z->l, 1);
579  if (ret < 0) goto lab1;
580  z->c = ret;
581  }
582  }
583  { int ret = slice_from_s(z, 2, s_10);
584  if (ret < 0) return ret;
585  }
586  continue;
587  lab1:
588  z->c = c2;
589  break;
590  }
591  z->c = c1;
592  }
593 
594  { int ret = r_mark_regions(z);
595  if (ret < 0) return ret;
596  }
597  z->lb = z->c; z->c = z->l;
598 
599 
600  { int mlimit4;
601  if (z->c < z->I[1]) return 0;
602  mlimit4 = z->lb; z->lb = z->I[1];
603  { int m5 = z->l - z->c; (void)m5;
604  { int m6 = z->l - z->c; (void)m6;
605  { int ret = r_perfective_gerund(z);
606  if (ret == 0) goto lab5;
607  if (ret < 0) return ret;
608  }
609  goto lab4;
610  lab5:
611  z->c = z->l - m6;
612  { int m7 = z->l - z->c; (void)m7;
613  { int ret = r_reflexive(z);
614  if (ret == 0) { z->c = z->l - m7; goto lab6; }
615  if (ret < 0) return ret;
616  }
617  lab6:
618  ;
619  }
620  { int m8 = z->l - z->c; (void)m8;
621  { int ret = r_adjectival(z);
622  if (ret == 0) goto lab8;
623  if (ret < 0) return ret;
624  }
625  goto lab7;
626  lab8:
627  z->c = z->l - m8;
628  { int ret = r_verb(z);
629  if (ret == 0) goto lab9;
630  if (ret < 0) return ret;
631  }
632  goto lab7;
633  lab9:
634  z->c = z->l - m8;
635  { int ret = r_noun(z);
636  if (ret == 0) goto lab3;
637  if (ret < 0) return ret;
638  }
639  }
640  lab7:
641  ;
642  }
643  lab4:
644  lab3:
645  z->c = z->l - m5;
646  }
647  { int m9 = z->l - z->c; (void)m9;
648  z->ket = z->c;
649  if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m9; goto lab10; }
650  z->bra = z->c;
651  { int ret = slice_del(z);
652  if (ret < 0) return ret;
653  }
654  lab10:
655  ;
656  }
657  { int m10 = z->l - z->c; (void)m10;
658  { int ret = r_derivational(z);
659  if (ret < 0) return ret;
660  }
661  z->c = z->l - m10;
662  }
663  { int m11 = z->l - z->c; (void)m11;
664  { int ret = r_tidy_up(z);
665  if (ret < 0) return ret;
666  }
667  z->c = z->l - m11;
668  }
669  z->lb = mlimit4;
670  }
671  z->c = z->lb;
672  return 1;
673 }
static int r_tidy_up(struct SN_env *z)
static int r_adjectival(struct SN_env *z)
static int r_verb(struct SN_env *z)
static int r_derivational(struct SN_env *z)
static int r_perfective_gerund(struct SN_env *z)
static const symbol s_10[]
static int r_mark_regions(struct SN_env *z)
static const symbol s_11[]
static int r_reflexive(struct SN_env *z)
static const symbol s_9[]
static int r_noun(struct SN_env *z)
int lb
Definition: api.h:16
symbol * p
Definition: api.h:15
int * I
Definition: api.h:18
int ket
Definition: api.h:16
int c
Definition: api.h:16
int bra
Definition: api.h:16
int l
Definition: api.h:16
int slice_del(struct SN_env *z)
Definition: utilities.c:431
int eq_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:215
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:220
int skip_utf8(const symbol *p, int c, int limit, int n)
Definition: utilities.c:27
int slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:422

References SN_env::bra, SN_env::c, eq_s(), eq_s_b(), SN_env::I, SN_env::ket, SN_env::l, SN_env::lb, SN_env::p, r_adjectival(), r_derivational(), r_mark_regions(), r_noun(), r_perfective_gerund(), r_reflexive(), r_tidy_up(), r_verb(), s_10, s_11, s_9, skip_utf8(), slice_del(), and slice_from_s().