PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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

void russian_UTF_8_close_env ( struct SN_env z)

Definition at line 693 of file stem_UTF_8_russian.c.

References SN_close_env().

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

Definition at line 691 of file stem_UTF_8_russian.c.

References SN_create_env().

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

Definition at line 598 of file stem_UTF_8_russian.c.

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

598  {
599  { int c1 = z->c; /* do, line 201 */
600  { int ret = r_mark_regions(z);
601  if (ret == 0) goto lab0; /* call mark_regions, line 201 */
602  if (ret < 0) return ret;
603  }
604  lab0:
605  z->c = c1;
606  }
607  z->lb = z->c; z->c = z->l; /* backwards, line 202 */
608 
609  { int mlimit; /* setlimit, line 202 */
610  int m2 = z->l - z->c; (void)m2;
611  if (z->c < z->I[0]) return 0;
612  z->c = z->I[0]; /* tomark, line 202 */
613  mlimit = z->lb; z->lb = z->c;
614  z->c = z->l - m2;
615  { int m3 = z->l - z->c; (void)m3; /* do, line 203 */
616  { int m4 = z->l - z->c; (void)m4; /* or, line 204 */
617  { int ret = r_perfective_gerund(z);
618  if (ret == 0) goto lab3; /* call perfective_gerund, line 204 */
619  if (ret < 0) return ret;
620  }
621  goto lab2;
622  lab3:
623  z->c = z->l - m4;
624  { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 205 */
625  { int ret = r_reflexive(z);
626  if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call reflexive, line 205 */
627  if (ret < 0) return ret;
628  }
629  lab4:
630  ;
631  }
632  { int m5 = z->l - z->c; (void)m5; /* or, line 206 */
633  { int ret = r_adjectival(z);
634  if (ret == 0) goto lab6; /* call adjectival, line 206 */
635  if (ret < 0) return ret;
636  }
637  goto lab5;
638  lab6:
639  z->c = z->l - m5;
640  { int ret = r_verb(z);
641  if (ret == 0) goto lab7; /* call verb, line 206 */
642  if (ret < 0) return ret;
643  }
644  goto lab5;
645  lab7:
646  z->c = z->l - m5;
647  { int ret = r_noun(z);
648  if (ret == 0) goto lab1; /* call noun, line 206 */
649  if (ret < 0) return ret;
650  }
651  }
652  lab5:
653  ;
654  }
655  lab2:
656  lab1:
657  z->c = z->l - m3;
658  }
659  { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 209 */
660  z->ket = z->c; /* [, line 209 */
661  if (!(eq_s_b(z, 2, s_9))) { z->c = z->l - m_keep; goto lab8; }
662  z->bra = z->c; /* ], line 209 */
663  { int ret = slice_del(z); /* delete, line 209 */
664  if (ret < 0) return ret;
665  }
666  lab8:
667  ;
668  }
669  { int m6 = z->l - z->c; (void)m6; /* do, line 212 */
670  { int ret = r_derivational(z);
671  if (ret == 0) goto lab9; /* call derivational, line 212 */
672  if (ret < 0) return ret;
673  }
674  lab9:
675  z->c = z->l - m6;
676  }
677  { int m7 = z->l - z->c; (void)m7; /* do, line 213 */
678  { int ret = r_tidy_up(z);
679  if (ret == 0) goto lab10; /* call tidy_up, line 213 */
680  if (ret < 0) return ret;
681  }
682  lab10:
683  z->c = z->l - m7;
684  }
685  z->lb = mlimit;
686  }
687  z->c = z->lb;
688  return 1;
689 }
static int r_tidy_up(struct SN_env *z)
static int r_derivational(struct SN_env *z)
int eq_s_b(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:194
int * I
Definition: api.h:18
int ket
Definition: api.h:16
int slice_del(struct SN_env *z)
Definition: utilities.c:401
int bra
Definition: api.h:16
static int r_adjectival(struct SN_env *z)
int c
Definition: api.h:16
int lb
Definition: api.h:16
static int r_noun(struct SN_env *z)
static int r_verb(struct SN_env *z)
static int r_mark_regions(struct SN_env *z)
static const symbol s_9[]
static int r_reflexive(struct SN_env *z)
int l
Definition: api.h:16
static int r_perfective_gerund(struct SN_env *z)