PostgreSQL Source Code  git master
stem_KOI8_R_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_KOI8_R_create_env (void)
 
void russian_KOI8_R_close_env (struct SN_env *z)
 
int russian_KOI8_R_stem (struct SN_env *z)
 

Function Documentation

◆ russian_KOI8_R_close_env()

void russian_KOI8_R_close_env ( struct SN_env z)

Definition at line 681 of file stem_KOI8_R_russian.c.

681 { 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_KOI8_R_create_env()

struct SN_env* russian_KOI8_R_create_env ( void  )

Definition at line 679 of file stem_KOI8_R_russian.c.

679 { 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_KOI8_R_stem()

int russian_KOI8_R_stem ( struct SN_env z)

Definition at line 569 of file stem_KOI8_R_russian.c.

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

References SN_env::bra, SN_env::c, 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_0, slice_del(), and slice_from_s().