PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
stem_ISO_8859_1_porter.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_envporter_ISO_8859_1_create_env (void)
 
void porter_ISO_8859_1_close_env (struct SN_env *z)
 
int porter_ISO_8859_1_stem (struct SN_env *z)
 

Function Documentation

◆ porter_ISO_8859_1_close_env()

void porter_ISO_8859_1_close_env ( struct SN_env z)

Definition at line 716 of file stem_ISO_8859_1_porter.c.

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

References SN_close_env().

◆ porter_ISO_8859_1_create_env()

struct SN_env * porter_ISO_8859_1_create_env ( void  )

Definition at line 714 of file stem_ISO_8859_1_porter.c.

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

References SN_create_env().

◆ porter_ISO_8859_1_stem()

int porter_ISO_8859_1_stem ( struct SN_env z)

Definition at line 562 of file stem_ISO_8859_1_porter.c.

562 {
563 z->I[2] = 0;
564 { int c1 = z->c;
565 z->bra = z->c;
566 if (z->c == z->l || z->p[z->c] != 'y') goto lab0;
567 z->c++;
568 z->ket = z->c;
569 { int ret = slice_from_s(z, 1, s_21);
570 if (ret < 0) return ret;
571 }
572 z->I[2] = 1;
573 lab0:
574 z->c = c1;
575 }
576 { int c2 = z->c;
577 while(1) {
578 int c3 = z->c;
579 while(1) {
580 int c4 = z->c;
581 if (in_grouping(z, g_v, 97, 121, 0)) goto lab3;
582 z->bra = z->c;
583 if (z->c == z->l || z->p[z->c] != 'y') goto lab3;
584 z->c++;
585 z->ket = z->c;
586 z->c = c4;
587 break;
588 lab3:
589 z->c = c4;
590 if (z->c >= z->l) goto lab2;
591 z->c++;
592 }
593 { int ret = slice_from_s(z, 1, s_22);
594 if (ret < 0) return ret;
595 }
596 z->I[2] = 1;
597 continue;
598 lab2:
599 z->c = c3;
600 break;
601 }
602 z->c = c2;
603 }
604 z->I[1] = z->l;
605 z->I[0] = z->l;
606 { int c5 = z->c;
607 {
608 int ret = out_grouping(z, g_v, 97, 121, 1);
609 if (ret < 0) goto lab4;
610 z->c += ret;
611 }
612 {
613 int ret = in_grouping(z, g_v, 97, 121, 1);
614 if (ret < 0) goto lab4;
615 z->c += ret;
616 }
617 z->I[1] = z->c;
618 {
619 int ret = out_grouping(z, g_v, 97, 121, 1);
620 if (ret < 0) goto lab4;
621 z->c += ret;
622 }
623 {
624 int ret = in_grouping(z, g_v, 97, 121, 1);
625 if (ret < 0) goto lab4;
626 z->c += ret;
627 }
628 z->I[0] = z->c;
629 lab4:
630 z->c = c5;
631 }
632 z->lb = z->c; z->c = z->l;
633
634 { int m6 = z->l - z->c; (void)m6;
635 { int ret = r_Step_1a(z);
636 if (ret < 0) return ret;
637 }
638 z->c = z->l - m6;
639 }
640 { int m7 = z->l - z->c; (void)m7;
641 { int ret = r_Step_1b(z);
642 if (ret < 0) return ret;
643 }
644 z->c = z->l - m7;
645 }
646 { int m8 = z->l - z->c; (void)m8;
647 { int ret = r_Step_1c(z);
648 if (ret < 0) return ret;
649 }
650 z->c = z->l - m8;
651 }
652 { int m9 = z->l - z->c; (void)m9;
653 { int ret = r_Step_2(z);
654 if (ret < 0) return ret;
655 }
656 z->c = z->l - m9;
657 }
658 { int m10 = z->l - z->c; (void)m10;
659 { int ret = r_Step_3(z);
660 if (ret < 0) return ret;
661 }
662 z->c = z->l - m10;
663 }
664 { int m11 = z->l - z->c; (void)m11;
665 { int ret = r_Step_4(z);
666 if (ret < 0) return ret;
667 }
668 z->c = z->l - m11;
669 }
670 { int m12 = z->l - z->c; (void)m12;
671 { int ret = r_Step_5a(z);
672 if (ret < 0) return ret;
673 }
674 z->c = z->l - m12;
675 }
676 { int m13 = z->l - z->c; (void)m13;
677 { int ret = r_Step_5b(z);
678 if (ret < 0) return ret;
679 }
680 z->c = z->l - m13;
681 }
682 z->c = z->lb;
683 { int c14 = z->c;
684 if (!(z->I[2])) goto lab5;
685 while(1) {
686 int c15 = z->c;
687 while(1) {
688 int c16 = z->c;
689 z->bra = z->c;
690 if (z->c == z->l || z->p[z->c] != 'Y') goto lab7;
691 z->c++;
692 z->ket = z->c;
693 z->c = c16;
694 break;
695 lab7:
696 z->c = c16;
697 if (z->c >= z->l) goto lab6;
698 z->c++;
699 }
700 { int ret = slice_from_s(z, 1, s_23);
701 if (ret < 0) return ret;
702 }
703 continue;
704 lab6:
705 z->c = c15;
706 break;
707 }
708 lab5:
709 z->c = c14;
710 }
711 return 1;
712}
static int r_Step_5b(struct SN_env *z)
static int r_Step_3(struct SN_env *z)
static const symbol s_21[]
static const symbol s_23[]
static int r_Step_1c(struct SN_env *z)
static int r_Step_5a(struct SN_env *z)
static const symbol s_22[]
static int r_Step_1a(struct SN_env *z)
static int r_Step_4(struct SN_env *z)
static int r_Step_2(struct SN_env *z)
static int r_Step_1b(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 ket
Definition: api.h:16
int c
Definition: api.h:16
int bra
Definition: api.h:16
int l
Definition: api.h:16
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:167
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:191
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, g_v, SN_env::I, in_grouping(), SN_env::ket, SN_env::l, SN_env::lb, out_grouping(), SN_env::p, r_Step_1a(), r_Step_1b(), r_Step_1c(), r_Step_2(), r_Step_3(), r_Step_4(), r_Step_5a(), r_Step_5b(), s_21, s_22, s_23, and slice_from_s().