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 717 of file stem_ISO_8859_1_porter.c.

717{ 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 715 of file stem_ISO_8859_1_porter.c.

715{ 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 559 of file stem_ISO_8859_1_porter.c.

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