aboutsummaryrefslogtreecommitdiff
path: root/src/backend/snowball/libstemmer/stem_UTF_8_swedish.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/snowball/libstemmer/stem_UTF_8_swedish.c')
-rw-r--r--src/backend/snowball/libstemmer/stem_UTF_8_swedish.c102
1 files changed, 47 insertions, 55 deletions
diff --git a/src/backend/snowball/libstemmer/stem_UTF_8_swedish.c b/src/backend/snowball/libstemmer/stem_UTF_8_swedish.c
index 1372cec1eeb..c47777d7c5f 100644
--- a/src/backend/snowball/libstemmer/stem_UTF_8_swedish.c
+++ b/src/backend/snowball/libstemmer/stem_UTF_8_swedish.c
@@ -1,5 +1,5 @@
-
-/* This file was generated automatically by the Snowball to ANSI C compiler */
+/* This file was generated automatically by the Snowball to ISO C compiler */
+/* http://snowballstem.org/ */
#include "header.h"
@@ -146,15 +146,15 @@ static const unsigned char g_s_ending[] = { 119, 127, 149 };
static const symbol s_0[] = { 'l', 0xC3, 0xB6, 's' };
static const symbol s_1[] = { 'f', 'u', 'l', 'l' };
-static int r_mark_regions(struct SN_env * z) {
- z->I[0] = z->l;
- { int c_test = z->c; /* test, line 29 */
- { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
+static int r_mark_regions(struct SN_env * z) { /* forwardmode */
+ z->I[0] = z->l; /* $p1 = <integer expression>, line 28 */
+ { int c_test1 = z->c; /* test, line 29 */
+ { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3); /* hop, line 29 */
if (ret < 0) return 0;
- z->c = ret; /* hop, line 29 */
+ z->c = ret;
}
z->I[1] = z->c; /* setmark x, line 29 */
- z->c = c_test;
+ z->c = c_test1;
}
if (out_grouping_U(z, g_v, 97, 246, 1) < 0) return 0; /* goto */ /* grouping v, line 30 */
{ /* gopast */ /* non v, line 30 */
@@ -163,37 +163,34 @@ static int r_mark_regions(struct SN_env * z) {
z->c += ret;
}
z->I[0] = z->c; /* setmark p1, line 30 */
- /* try, line 31 */
- if (!(z->I[0] < z->I[1])) goto lab0;
- z->I[0] = z->I[1];
+ /* try, line 31 */
+ if (!(z->I[0] < z->I[1])) goto lab0; /* $(<integer expression> < <integer expression>), line 31 */
+ z->I[0] = z->I[1]; /* $p1 = <integer expression>, line 31 */
lab0:
return 1;
}
-static int r_main_suffix(struct SN_env * z) {
+static int r_main_suffix(struct SN_env * z) { /* backwardmode */
int among_var;
- { int mlimit; /* setlimit, line 37 */
- int m1 = z->l - z->c; (void)m1;
+
+ { int mlimit1; /* setlimit, line 37 */
if (z->c < z->I[0]) return 0;
- z->c = z->I[0]; /* tomark, line 37 */
- mlimit = z->lb; z->lb = z->c;
- z->c = z->l - m1;
+ mlimit1 = z->lb; z->lb = z->I[0];
z->ket = z->c; /* [, line 37 */
- if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
- among_var = find_among_b(z, a_0, 37); /* substring, line 37 */
- if (!(among_var)) { z->lb = mlimit; return 0; }
+ if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1851442 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; } /* substring, line 37 */
+ among_var = find_among_b(z, a_0, 37);
+ if (!(among_var)) { z->lb = mlimit1; return 0; }
z->bra = z->c; /* ], line 37 */
- z->lb = mlimit;
+ z->lb = mlimit1;
}
- switch(among_var) {
- case 0: return 0;
+ switch (among_var) { /* among, line 38 */
case 1:
{ int ret = slice_del(z); /* delete, line 44 */
if (ret < 0) return ret;
}
break;
case 2:
- if (in_grouping_b_U(z, g_s_ending, 98, 121, 0)) return 0;
+ if (in_grouping_b_U(z, g_s_ending, 98, 121, 0)) return 0; /* grouping s_ending, line 46 */
{ int ret = slice_del(z); /* delete, line 46 */
if (ret < 0) return ret;
}
@@ -202,20 +199,18 @@ static int r_main_suffix(struct SN_env * z) {
return 1;
}
-static int r_consonant_pair(struct SN_env * z) {
- { int mlimit; /* setlimit, line 50 */
- int m1 = z->l - z->c; (void)m1;
+static int r_consonant_pair(struct SN_env * z) { /* backwardmode */
+
+ { int mlimit1; /* setlimit, line 50 */
if (z->c < z->I[0]) return 0;
- z->c = z->I[0]; /* tomark, line 50 */
- mlimit = z->lb; z->lb = z->c;
- z->c = z->l - m1;
+ mlimit1 = z->lb; z->lb = z->I[0];
{ int m2 = z->l - z->c; (void)m2; /* and, line 52 */
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
- if (!(find_among_b(z, a_1, 7))) { z->lb = mlimit; return 0; } /* among, line 51 */
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1064976 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; } /* among, line 51 */
+ if (!(find_among_b(z, a_1, 7))) { z->lb = mlimit1; return 0; }
z->c = z->l - m2;
z->ket = z->c; /* [, line 52 */
{ int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
- if (ret < 0) { z->lb = mlimit; return 0; }
+ if (ret < 0) { z->lb = mlimit1; return 0; }
z->c = ret; /* next, line 52 */
}
z->bra = z->c; /* ], line 52 */
@@ -223,26 +218,23 @@ static int r_consonant_pair(struct SN_env * z) {
if (ret < 0) return ret;
}
}
- z->lb = mlimit;
+ z->lb = mlimit1;
}
return 1;
}
-static int r_other_suffix(struct SN_env * z) {
+static int r_other_suffix(struct SN_env * z) { /* backwardmode */
int among_var;
- { int mlimit; /* setlimit, line 55 */
- int m1 = z->l - z->c; (void)m1;
+
+ { int mlimit1; /* setlimit, line 55 */
if (z->c < z->I[0]) return 0;
- z->c = z->I[0]; /* tomark, line 55 */
- mlimit = z->lb; z->lb = z->c;
- z->c = z->l - m1;
+ mlimit1 = z->lb; z->lb = z->I[0];
z->ket = z->c; /* [, line 56 */
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit; return 0; }
- among_var = find_among_b(z, a_2, 5); /* substring, line 56 */
- if (!(among_var)) { z->lb = mlimit; return 0; }
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1572992 >> (z->p[z->c - 1] & 0x1f)) & 1)) { z->lb = mlimit1; return 0; } /* substring, line 56 */
+ among_var = find_among_b(z, a_2, 5);
+ if (!(among_var)) { z->lb = mlimit1; return 0; }
z->bra = z->c; /* ], line 56 */
- switch(among_var) {
- case 0: { z->lb = mlimit; return 0; }
+ switch (among_var) { /* among, line 56 */
case 1:
{ int ret = slice_del(z); /* delete, line 57 */
if (ret < 0) return ret;
@@ -259,15 +251,15 @@ static int r_other_suffix(struct SN_env * z) {
}
break;
}
- z->lb = mlimit;
+ z->lb = mlimit1;
}
return 1;
}
-extern int swedish_UTF_8_stem(struct SN_env * z) {
+extern int swedish_UTF_8_stem(struct SN_env * z) { /* forwardmode */
{ int c1 = z->c; /* do, line 66 */
- { int ret = r_mark_regions(z);
- if (ret == 0) goto lab0; /* call mark_regions, line 66 */
+ { int ret = r_mark_regions(z); /* call mark_regions, line 66 */
+ if (ret == 0) goto lab0;
if (ret < 0) return ret;
}
lab0:
@@ -276,24 +268,24 @@ extern int swedish_UTF_8_stem(struct SN_env * z) {
z->lb = z->c; z->c = z->l; /* backwards, line 67 */
{ int m2 = z->l - z->c; (void)m2; /* do, line 68 */
- { int ret = r_main_suffix(z);
- if (ret == 0) goto lab1; /* call main_suffix, line 68 */
+ { int ret = r_main_suffix(z); /* call main_suffix, line 68 */
+ if (ret == 0) goto lab1;
if (ret < 0) return ret;
}
lab1:
z->c = z->l - m2;
}
{ int m3 = z->l - z->c; (void)m3; /* do, line 69 */
- { int ret = r_consonant_pair(z);
- if (ret == 0) goto lab2; /* call consonant_pair, line 69 */
+ { int ret = r_consonant_pair(z); /* call consonant_pair, line 69 */
+ if (ret == 0) goto lab2;
if (ret < 0) return ret;
}
lab2:
z->c = z->l - m3;
}
{ int m4 = z->l - z->c; (void)m4; /* do, line 70 */
- { int ret = r_other_suffix(z);
- if (ret == 0) goto lab3; /* call other_suffix, line 70 */
+ { int ret = r_other_suffix(z); /* call other_suffix, line 70 */
+ if (ret == 0) goto lab3;
if (ret < 0) return ret;
}
lab3: