PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 680 of file stem_UTF_8_russian.c.

680{ 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 678 of file stem_UTF_8_russian.c.

678{ 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 568 of file stem_UTF_8_russian.c.

568 {
569 { int c1 = z->c;
570 while(1) {
571 int c2 = z->c;
572 while(1) {
573 int c3 = z->c;
574 z->bra = z->c;
575 if (!(eq_s(z, 2, s_9))) goto lab2;
576 z->ket = z->c;
577 z->c = c3;
578 break;
579 lab2:
580 z->c = c3;
581 { int ret = skip_utf8(z->p, z->c, z->l, 1);
582 if (ret < 0) goto lab1;
583 z->c = ret;
584 }
585 }
586 { int ret = slice_from_s(z, 2, s_10);
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 (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m9; goto lab10; }
653 z->bra = z->c;
654 { int ret = slice_del(z);
655 if (ret < 0) return ret;
656 }
657 lab10:
658 ;
659 }
660 { int m10 = z->l - z->c; (void)m10;
661 { int ret = r_derivational(z);
662 if (ret < 0) return ret;
663 }
664 z->c = z->l - m10;
665 }
666 { int m11 = z->l - z->c; (void)m11;
667 { int ret = r_tidy_up(z);
668 if (ret < 0) return ret;
669 }
670 z->c = z->l - m11;
671 }
672 z->lb = mlimit4;
673 }
674 z->c = z->lb;
675 return 1;
676}
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().