PostgreSQL Source Code git master
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 768 of file stem_ISO_8859_1_porter.c.

768 {
769 SN_delete_env(z);
770}
void SN_delete_env(struct SN_env *z)
Definition: api.c:18

References SN_delete_env().

◆ porter_ISO_8859_1_create_env()

struct SN_env * porter_ISO_8859_1_create_env ( void  )

Definition at line 759 of file stem_ISO_8859_1_porter.c.

759 {
760 struct SN_env * z = SN_new_env(sizeof(SN_local));
761 if (z) {
762 ((SN_local *)z)->i_p2 = 0;
763 ((SN_local *)z)->i_p1 = 0;
764 }
765 return z;
766}
struct SN_env * SN_new_env(int alloc_size)
Definition: api.c:5
Definition: api.h:15

References SN_new_env().

◆ porter_ISO_8859_1_stem()

int porter_ISO_8859_1_stem ( struct SN_env z)

Definition at line 584 of file stem_ISO_8859_1_porter.c.

584 {
585 int b_Y_found;
586 b_Y_found = 0;
587 {
588 int v_1 = z->c;
589 z->bra = z->c;
590 if (z->c == z->l || z->p[z->c] != 'y') goto lab0;
591 z->c++;
592 z->ket = z->c;
593 {
594 int ret = slice_from_s(z, 1, s_21);
595 if (ret < 0) return ret;
596 }
597 b_Y_found = 1;
598 lab0:
599 z->c = v_1;
600 }
601 {
602 int v_2 = z->c;
603 while (1) {
604 int v_3 = z->c;
605 while (1) {
606 int v_4 = z->c;
607 if (in_grouping(z, g_v, 97, 121, 0)) goto lab3;
608 z->bra = z->c;
609 if (z->c == z->l || z->p[z->c] != 'y') goto lab3;
610 z->c++;
611 z->ket = z->c;
612 z->c = v_4;
613 break;
614 lab3:
615 z->c = v_4;
616 if (z->c >= z->l) goto lab2;
617 z->c++;
618 }
619 {
620 int ret = slice_from_s(z, 1, s_22);
621 if (ret < 0) return ret;
622 }
623 b_Y_found = 1;
624 continue;
625 lab2:
626 z->c = v_3;
627 break;
628 }
629 z->c = v_2;
630 }
631 ((SN_local *)z)->i_p1 = z->l;
632 ((SN_local *)z)->i_p2 = z->l;
633 {
634 int v_5 = z->c;
635 {
636 int ret = out_grouping(z, g_v, 97, 121, 1);
637 if (ret < 0) goto lab4;
638 z->c += ret;
639 }
640 {
641 int ret = in_grouping(z, g_v, 97, 121, 1);
642 if (ret < 0) goto lab4;
643 z->c += ret;
644 }
645 ((SN_local *)z)->i_p1 = z->c;
646 {
647 int ret = out_grouping(z, g_v, 97, 121, 1);
648 if (ret < 0) goto lab4;
649 z->c += ret;
650 }
651 {
652 int ret = in_grouping(z, g_v, 97, 121, 1);
653 if (ret < 0) goto lab4;
654 z->c += ret;
655 }
656 ((SN_local *)z)->i_p2 = z->c;
657 lab4:
658 z->c = v_5;
659 }
660 z->lb = z->c; z->c = z->l;
661 {
662 int v_6 = z->l - z->c;
663 {
664 int ret = r_Step_1a(z);
665 if (ret < 0) return ret;
666 }
667 z->c = z->l - v_6;
668 }
669 {
670 int v_7 = z->l - z->c;
671 {
672 int ret = r_Step_1b(z);
673 if (ret < 0) return ret;
674 }
675 z->c = z->l - v_7;
676 }
677 {
678 int v_8 = z->l - z->c;
679 {
680 int ret = r_Step_1c(z);
681 if (ret < 0) return ret;
682 }
683 z->c = z->l - v_8;
684 }
685 {
686 int v_9 = z->l - z->c;
687 {
688 int ret = r_Step_2(z);
689 if (ret < 0) return ret;
690 }
691 z->c = z->l - v_9;
692 }
693 {
694 int v_10 = z->l - z->c;
695 {
696 int ret = r_Step_3(z);
697 if (ret < 0) return ret;
698 }
699 z->c = z->l - v_10;
700 }
701 {
702 int v_11 = z->l - z->c;
703 {
704 int ret = r_Step_4(z);
705 if (ret < 0) return ret;
706 }
707 z->c = z->l - v_11;
708 }
709 {
710 int v_12 = z->l - z->c;
711 {
712 int ret = r_Step_5a(z);
713 if (ret < 0) return ret;
714 }
715 z->c = z->l - v_12;
716 }
717 {
718 int v_13 = z->l - z->c;
719 {
720 int ret = r_Step_5b(z);
721 if (ret < 0) return ret;
722 }
723 z->c = z->l - v_13;
724 }
725 z->c = z->lb;
726 {
727 int v_14 = z->c;
728 if (!b_Y_found) goto lab5;
729 while (1) {
730 int v_15 = z->c;
731 while (1) {
732 int v_16 = z->c;
733 z->bra = z->c;
734 if (z->c == z->l || z->p[z->c] != 'Y') goto lab7;
735 z->c++;
736 z->ket = z->c;
737 z->c = v_16;
738 break;
739 lab7:
740 z->c = v_16;
741 if (z->c >= z->l) goto lab6;
742 z->c++;
743 }
744 {
745 int ret = slice_from_s(z, 1, s_23);
746 if (ret < 0) return ret;
747 }
748 continue;
749 lab6:
750 z->c = v_15;
751 break;
752 }
753 lab5:
754 z->c = v_14;
755 }
756 return 1;
757}
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:17
symbol * p
Definition: api.h:16
int ket
Definition: api.h:17
int c
Definition: api.h:17
int bra
Definition: api.h:17
int l
Definition: api.h:17
SNOWBALL_ERR slice_from_s(struct SN_env *z, int s_size, const symbol *s)
Definition: utilities.c:432
int in_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:183
int out_grouping(struct SN_env *z, const unsigned char *s, int min, int max, int repeat)
Definition: utilities.c:207

References SN_env::bra, SN_env::c, g_v, 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().