isomorfeus-ferret 0.12.2 → 0.12.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +612 -612
- data/README.md +80 -44
- data/ext/isomorfeus_ferret_ext/bm_hash.c +9 -6
- data/ext/isomorfeus_ferret_ext/bm_micro_string.c +4 -2
- data/ext/isomorfeus_ferret_ext/frb_search.c +14 -2
- data/ext/isomorfeus_ferret_ext/frb_store.c +34 -5
- data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
- data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
- data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +12 -15
- data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
- data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
- data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
- data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
- data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
- data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
- data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
- data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
- data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
- data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
- data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
- data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
- data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
- data/ext/isomorfeus_ferret_ext/test.c +7 -1
- data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
- data/lib/isomorfeus/ferret/index/index.rb +1 -1
- data/lib/isomorfeus/ferret/version.rb +1 -1
- metadata +43 -7
- data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -1,4 +1,4 @@
|
|
1
|
-
/*
|
1
|
+
/* Generated by Snowball 2.2.0 - https://snowballstem.org/ */
|
2
2
|
|
3
3
|
#include "stem_header.h"
|
4
4
|
|
@@ -22,12 +22,12 @@ static const symbol s_0_5[2] = { 0xC3, 0xBC };
|
|
22
22
|
|
23
23
|
static const struct among a_0[6] =
|
24
24
|
{
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
{ 0, 0, -1, 5, 0},
|
26
|
+
{ 1, s_0_1, 0, 2, 0},
|
27
|
+
{ 1, s_0_2, 0, 1, 0},
|
28
|
+
{ 2, s_0_3, 0, 3, 0},
|
29
|
+
{ 2, s_0_4, 0, 4, 0},
|
30
|
+
{ 2, s_0_5, 0, 2, 0}
|
31
31
|
};
|
32
32
|
|
33
33
|
static const symbol s_1_0[1] = { 'e' };
|
@@ -40,13 +40,13 @@ static const symbol s_1_6[2] = { 'e', 's' };
|
|
40
40
|
|
41
41
|
static const struct among a_1[7] =
|
42
42
|
{
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
{ 1, s_1_0, -1, 2, 0},
|
44
|
+
{ 2, s_1_1, -1, 1, 0},
|
45
|
+
{ 2, s_1_2, -1, 2, 0},
|
46
|
+
{ 3, s_1_3, -1, 1, 0},
|
47
|
+
{ 2, s_1_4, -1, 1, 0},
|
48
|
+
{ 1, s_1_5, -1, 3, 0},
|
49
|
+
{ 2, s_1_6, 5, 2, 0}
|
50
50
|
};
|
51
51
|
|
52
52
|
static const symbol s_2_0[2] = { 'e', 'n' };
|
@@ -56,10 +56,10 @@ static const symbol s_2_3[3] = { 'e', 's', 't' };
|
|
56
56
|
|
57
57
|
static const struct among a_2[4] =
|
58
58
|
{
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
{ 2, s_2_0, -1, 1, 0},
|
60
|
+
{ 2, s_2_1, -1, 1, 0},
|
61
|
+
{ 2, s_2_2, -1, 2, 0},
|
62
|
+
{ 3, s_2_3, 2, 1, 0}
|
63
63
|
};
|
64
64
|
|
65
65
|
static const symbol s_3_0[2] = { 'i', 'g' };
|
@@ -67,8 +67,8 @@ static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
|
|
67
67
|
|
68
68
|
static const struct among a_3[2] =
|
69
69
|
{
|
70
|
-
|
71
|
-
|
70
|
+
{ 2, s_3_0, -1, 1, 0},
|
71
|
+
{ 4, s_3_1, -1, 1, 0}
|
72
72
|
};
|
73
73
|
|
74
74
|
static const symbol s_4_0[3] = { 'e', 'n', 'd' };
|
@@ -82,14 +82,14 @@ static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
|
|
82
82
|
|
83
83
|
static const struct among a_4[8] =
|
84
84
|
{
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
85
|
+
{ 3, s_4_0, -1, 1, 0},
|
86
|
+
{ 2, s_4_1, -1, 2, 0},
|
87
|
+
{ 3, s_4_2, -1, 1, 0},
|
88
|
+
{ 4, s_4_3, -1, 3, 0},
|
89
|
+
{ 4, s_4_4, -1, 2, 0},
|
90
|
+
{ 2, s_4_5, -1, 2, 0},
|
91
|
+
{ 4, s_4_6, -1, 3, 0},
|
92
|
+
{ 4, s_4_7, -1, 4, 0}
|
93
93
|
};
|
94
94
|
|
95
95
|
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
|
@@ -100,168 +100,160 @@ static const unsigned char g_st_ending[] = { 117, 30, 4 };
|
|
100
100
|
|
101
101
|
static const symbol s_0[] = { 0xC3, 0x9F };
|
102
102
|
static const symbol s_1[] = { 's', 's' };
|
103
|
-
static const symbol s_2[] = { '
|
104
|
-
static const symbol s_3[] = { '
|
103
|
+
static const symbol s_2[] = { 'U' };
|
104
|
+
static const symbol s_3[] = { 'Y' };
|
105
105
|
static const symbol s_4[] = { 'y' };
|
106
|
-
static const symbol s_5[] = { '
|
107
|
-
static const symbol s_6[] = { '
|
108
|
-
static const symbol s_7[] = { '
|
109
|
-
static const symbol s_8[] = { '
|
110
|
-
static const symbol s_9[] = { '
|
111
|
-
static const symbol s_10[] = { '
|
112
|
-
static const symbol s_11[] = { '
|
113
|
-
static const symbol s_12[] = { 'e' };
|
114
|
-
static const symbol s_13[] = { 'e' };
|
115
|
-
static const symbol s_14[] = { 'e', 'r' };
|
116
|
-
static const symbol s_15[] = { 'e', 'n' };
|
106
|
+
static const symbol s_5[] = { 'u' };
|
107
|
+
static const symbol s_6[] = { 'a' };
|
108
|
+
static const symbol s_7[] = { 'o' };
|
109
|
+
static const symbol s_8[] = { 'n', 'i', 's' };
|
110
|
+
static const symbol s_9[] = { 'i', 'g' };
|
111
|
+
static const symbol s_10[] = { 'e', 'r' };
|
112
|
+
static const symbol s_11[] = { 'e', 'n' };
|
117
113
|
|
118
114
|
static int r_prelude(struct SN_env * z) {
|
119
|
-
{ int
|
120
|
-
while(1) {
|
121
|
-
int
|
122
|
-
{ int
|
123
|
-
z->bra = z->c;
|
115
|
+
{ int c_test1 = z->c;
|
116
|
+
while(1) {
|
117
|
+
int c2 = z->c;
|
118
|
+
{ int c3 = z->c;
|
119
|
+
z->bra = z->c;
|
124
120
|
if (!(eq_s(z, 2, s_0))) goto lab2;
|
125
|
-
z->ket = z->c;
|
126
|
-
{ int ret = slice_from_s(z, 2, s_1);
|
121
|
+
z->ket = z->c;
|
122
|
+
{ int ret = slice_from_s(z, 2, s_1);
|
127
123
|
if (ret < 0) return ret;
|
128
124
|
}
|
129
125
|
goto lab1;
|
130
126
|
lab2:
|
131
|
-
z->c =
|
132
|
-
{ int ret = skip_utf8(z->p, z->c,
|
127
|
+
z->c = c3;
|
128
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
|
133
129
|
if (ret < 0) goto lab0;
|
134
|
-
z->c = ret;
|
130
|
+
z->c = ret;
|
135
131
|
}
|
136
132
|
}
|
137
133
|
lab1:
|
138
134
|
continue;
|
139
135
|
lab0:
|
140
|
-
z->c =
|
136
|
+
z->c = c2;
|
141
137
|
break;
|
142
138
|
}
|
143
|
-
z->c =
|
139
|
+
z->c = c_test1;
|
144
140
|
}
|
145
|
-
while(1) {
|
146
|
-
int
|
147
|
-
while(1) {
|
148
|
-
int
|
141
|
+
while(1) {
|
142
|
+
int c4 = z->c;
|
143
|
+
while(1) {
|
144
|
+
int c5 = z->c;
|
149
145
|
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
|
150
|
-
z->bra = z->c;
|
151
|
-
{ int
|
152
|
-
if (
|
153
|
-
z->
|
146
|
+
z->bra = z->c;
|
147
|
+
{ int c6 = z->c;
|
148
|
+
if (z->c == z->l || z->p[z->c] != 'u') goto lab6;
|
149
|
+
z->c++;
|
150
|
+
z->ket = z->c;
|
154
151
|
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab6;
|
155
|
-
{ int ret = slice_from_s(z, 1,
|
152
|
+
{ int ret = slice_from_s(z, 1, s_2);
|
156
153
|
if (ret < 0) return ret;
|
157
154
|
}
|
158
155
|
goto lab5;
|
159
156
|
lab6:
|
160
|
-
z->c =
|
161
|
-
if (
|
162
|
-
z->
|
157
|
+
z->c = c6;
|
158
|
+
if (z->c == z->l || z->p[z->c] != 'y') goto lab4;
|
159
|
+
z->c++;
|
160
|
+
z->ket = z->c;
|
163
161
|
if (in_grouping_U(z, g_v, 97, 252, 0)) goto lab4;
|
164
|
-
{ int ret = slice_from_s(z, 1,
|
162
|
+
{ int ret = slice_from_s(z, 1, s_3);
|
165
163
|
if (ret < 0) return ret;
|
166
164
|
}
|
167
165
|
}
|
168
166
|
lab5:
|
169
|
-
z->c =
|
167
|
+
z->c = c5;
|
170
168
|
break;
|
171
169
|
lab4:
|
172
|
-
z->c =
|
173
|
-
{ int ret = skip_utf8(z->p, z->c,
|
170
|
+
z->c = c5;
|
171
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
|
174
172
|
if (ret < 0) goto lab3;
|
175
|
-
z->c = ret;
|
173
|
+
z->c = ret;
|
176
174
|
}
|
177
175
|
}
|
178
176
|
continue;
|
179
177
|
lab3:
|
180
|
-
z->c =
|
178
|
+
z->c = c4;
|
181
179
|
break;
|
182
180
|
}
|
183
181
|
return 1;
|
184
182
|
}
|
185
183
|
|
186
184
|
static int r_mark_regions(struct SN_env * z) {
|
187
|
-
z->I[
|
185
|
+
z->I[2] = z->l;
|
188
186
|
z->I[1] = z->l;
|
189
|
-
{ int
|
190
|
-
{ int ret = skip_utf8(z->p, z->c,
|
187
|
+
{ int c_test1 = z->c;
|
188
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 3);
|
191
189
|
if (ret < 0) return 0;
|
192
|
-
z->c = ret;
|
190
|
+
z->c = ret;
|
193
191
|
}
|
194
|
-
z->I[
|
195
|
-
z->c =
|
192
|
+
z->I[0] = z->c;
|
193
|
+
z->c = c_test1;
|
196
194
|
}
|
197
|
-
{
|
195
|
+
{
|
198
196
|
int ret = out_grouping_U(z, g_v, 97, 252, 1);
|
199
197
|
if (ret < 0) return 0;
|
200
198
|
z->c += ret;
|
201
199
|
}
|
202
|
-
{
|
200
|
+
{
|
203
201
|
int ret = in_grouping_U(z, g_v, 97, 252, 1);
|
204
202
|
if (ret < 0) return 0;
|
205
203
|
z->c += ret;
|
206
204
|
}
|
207
|
-
z->I[
|
208
|
-
|
209
|
-
if (!(z->I[
|
210
|
-
z->I[
|
205
|
+
z->I[2] = z->c;
|
206
|
+
|
207
|
+
if (!(z->I[2] < z->I[0])) goto lab0;
|
208
|
+
z->I[2] = z->I[0];
|
211
209
|
lab0:
|
212
|
-
{
|
210
|
+
{
|
213
211
|
int ret = out_grouping_U(z, g_v, 97, 252, 1);
|
214
212
|
if (ret < 0) return 0;
|
215
213
|
z->c += ret;
|
216
214
|
}
|
217
|
-
{
|
215
|
+
{
|
218
216
|
int ret = in_grouping_U(z, g_v, 97, 252, 1);
|
219
217
|
if (ret < 0) return 0;
|
220
218
|
z->c += ret;
|
221
219
|
}
|
222
|
-
z->I[1] = z->c;
|
220
|
+
z->I[1] = z->c;
|
223
221
|
return 1;
|
224
222
|
}
|
225
223
|
|
226
224
|
static int r_postlude(struct SN_env * z) {
|
227
225
|
int among_var;
|
228
|
-
while(1) {
|
226
|
+
while(1) {
|
229
227
|
int c1 = z->c;
|
230
|
-
z->bra = z->c;
|
231
|
-
among_var = find_among(z, a_0, 6);
|
228
|
+
z->bra = z->c;
|
229
|
+
among_var = find_among(z, a_0, 6);
|
232
230
|
if (!(among_var)) goto lab0;
|
233
|
-
z->ket = z->c;
|
234
|
-
switch(among_var) {
|
235
|
-
case 0: goto lab0;
|
231
|
+
z->ket = z->c;
|
232
|
+
switch (among_var) {
|
236
233
|
case 1:
|
237
|
-
{ int ret = slice_from_s(z, 1,
|
234
|
+
{ int ret = slice_from_s(z, 1, s_4);
|
238
235
|
if (ret < 0) return ret;
|
239
236
|
}
|
240
237
|
break;
|
241
238
|
case 2:
|
242
|
-
{ int ret = slice_from_s(z, 1,
|
239
|
+
{ int ret = slice_from_s(z, 1, s_5);
|
243
240
|
if (ret < 0) return ret;
|
244
241
|
}
|
245
242
|
break;
|
246
243
|
case 3:
|
247
|
-
{ int ret = slice_from_s(z, 1,
|
244
|
+
{ int ret = slice_from_s(z, 1, s_6);
|
248
245
|
if (ret < 0) return ret;
|
249
246
|
}
|
250
247
|
break;
|
251
248
|
case 4:
|
252
|
-
{ int ret = slice_from_s(z, 1,
|
249
|
+
{ int ret = slice_from_s(z, 1, s_7);
|
253
250
|
if (ret < 0) return ret;
|
254
251
|
}
|
255
252
|
break;
|
256
253
|
case 5:
|
257
|
-
{ int ret =
|
258
|
-
if (ret < 0) return ret;
|
259
|
-
}
|
260
|
-
break;
|
261
|
-
case 6:
|
262
|
-
{ int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
|
254
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
|
263
255
|
if (ret < 0) goto lab0;
|
264
|
-
z->c = ret;
|
256
|
+
z->c = ret;
|
265
257
|
}
|
266
258
|
break;
|
267
259
|
}
|
@@ -274,7 +266,7 @@ static int r_postlude(struct SN_env * z) {
|
|
274
266
|
}
|
275
267
|
|
276
268
|
static int r_R1(struct SN_env * z) {
|
277
|
-
if (!(z->I[
|
269
|
+
if (!(z->I[2] <= z->c)) return 0;
|
278
270
|
return 1;
|
279
271
|
}
|
280
272
|
|
@@ -285,26 +277,42 @@ static int r_R2(struct SN_env * z) {
|
|
285
277
|
|
286
278
|
static int r_standard_suffix(struct SN_env * z) {
|
287
279
|
int among_var;
|
288
|
-
{ int m1 = z->l - z->c; (void)m1;
|
289
|
-
z->ket = z->c;
|
280
|
+
{ int m1 = z->l - z->c; (void)m1;
|
281
|
+
z->ket = z->c;
|
290
282
|
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
|
291
|
-
among_var = find_among_b(z, a_1, 7);
|
283
|
+
among_var = find_among_b(z, a_1, 7);
|
292
284
|
if (!(among_var)) goto lab0;
|
293
|
-
z->bra = z->c;
|
285
|
+
z->bra = z->c;
|
294
286
|
{ int ret = r_R1(z);
|
295
|
-
if (ret == 0) goto lab0;
|
287
|
+
if (ret == 0) goto lab0;
|
296
288
|
if (ret < 0) return ret;
|
297
289
|
}
|
298
|
-
switch(among_var) {
|
299
|
-
case 0: goto lab0;
|
290
|
+
switch (among_var) {
|
300
291
|
case 1:
|
301
|
-
{ int ret = slice_del(z);
|
292
|
+
{ int ret = slice_del(z);
|
302
293
|
if (ret < 0) return ret;
|
303
294
|
}
|
304
295
|
break;
|
305
296
|
case 2:
|
297
|
+
{ int ret = slice_del(z);
|
298
|
+
if (ret < 0) return ret;
|
299
|
+
}
|
300
|
+
{ int m2 = z->l - z->c; (void)m2;
|
301
|
+
z->ket = z->c;
|
302
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - m2; goto lab1; }
|
303
|
+
z->c--;
|
304
|
+
z->bra = z->c;
|
305
|
+
if (!(eq_s_b(z, 3, s_8))) { z->c = z->l - m2; goto lab1; }
|
306
|
+
{ int ret = slice_del(z);
|
307
|
+
if (ret < 0) return ret;
|
308
|
+
}
|
309
|
+
lab1:
|
310
|
+
;
|
311
|
+
}
|
312
|
+
break;
|
313
|
+
case 3:
|
306
314
|
if (in_grouping_b_U(z, g_s_ending, 98, 116, 0)) goto lab0;
|
307
|
-
{ int ret = slice_del(z);
|
315
|
+
{ int ret = slice_del(z);
|
308
316
|
if (ret < 0) return ret;
|
309
317
|
}
|
310
318
|
break;
|
@@ -312,184 +320,168 @@ static int r_standard_suffix(struct SN_env * z) {
|
|
312
320
|
lab0:
|
313
321
|
z->c = z->l - m1;
|
314
322
|
}
|
315
|
-
{ int
|
316
|
-
z->ket = z->c;
|
317
|
-
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto
|
318
|
-
among_var = find_among_b(z, a_2, 4);
|
319
|
-
if (!(among_var)) goto
|
320
|
-
z->bra = z->c;
|
323
|
+
{ int m3 = z->l - z->c; (void)m3;
|
324
|
+
z->ket = z->c;
|
325
|
+
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
|
326
|
+
among_var = find_among_b(z, a_2, 4);
|
327
|
+
if (!(among_var)) goto lab2;
|
328
|
+
z->bra = z->c;
|
321
329
|
{ int ret = r_R1(z);
|
322
|
-
if (ret == 0) goto
|
330
|
+
if (ret == 0) goto lab2;
|
323
331
|
if (ret < 0) return ret;
|
324
332
|
}
|
325
|
-
switch(among_var) {
|
326
|
-
case 0: goto lab1;
|
333
|
+
switch (among_var) {
|
327
334
|
case 1:
|
328
|
-
{ int ret = slice_del(z);
|
335
|
+
{ int ret = slice_del(z);
|
329
336
|
if (ret < 0) return ret;
|
330
337
|
}
|
331
338
|
break;
|
332
339
|
case 2:
|
333
|
-
if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto
|
334
|
-
{ int ret =
|
335
|
-
if (ret < 0) goto
|
336
|
-
z->c = ret;
|
340
|
+
if (in_grouping_b_U(z, g_st_ending, 98, 116, 0)) goto lab2;
|
341
|
+
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 3);
|
342
|
+
if (ret < 0) goto lab2;
|
343
|
+
z->c = ret;
|
337
344
|
}
|
338
|
-
{ int ret = slice_del(z);
|
345
|
+
{ int ret = slice_del(z);
|
339
346
|
if (ret < 0) return ret;
|
340
347
|
}
|
341
348
|
break;
|
342
349
|
}
|
343
|
-
|
344
|
-
z->c = z->l -
|
350
|
+
lab2:
|
351
|
+
z->c = z->l - m3;
|
345
352
|
}
|
346
|
-
{ int
|
347
|
-
z->ket = z->c;
|
348
|
-
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto
|
349
|
-
among_var = find_among_b(z, a_4, 8);
|
350
|
-
if (!(among_var)) goto
|
351
|
-
z->bra = z->c;
|
353
|
+
{ int m4 = z->l - z->c; (void)m4;
|
354
|
+
z->ket = z->c;
|
355
|
+
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
|
356
|
+
among_var = find_among_b(z, a_4, 8);
|
357
|
+
if (!(among_var)) goto lab3;
|
358
|
+
z->bra = z->c;
|
352
359
|
{ int ret = r_R2(z);
|
353
|
-
if (ret == 0) goto
|
360
|
+
if (ret == 0) goto lab3;
|
354
361
|
if (ret < 0) return ret;
|
355
362
|
}
|
356
|
-
switch(among_var) {
|
357
|
-
case 0: goto lab2;
|
363
|
+
switch (among_var) {
|
358
364
|
case 1:
|
359
|
-
{ int ret = slice_del(z);
|
365
|
+
{ int ret = slice_del(z);
|
360
366
|
if (ret < 0) return ret;
|
361
367
|
}
|
362
|
-
{ int
|
363
|
-
z->ket = z->c;
|
364
|
-
if (!(eq_s_b(z, 2,
|
365
|
-
z->bra = z->c;
|
366
|
-
{ int
|
367
|
-
if (
|
368
|
-
|
369
|
-
|
370
|
-
|
368
|
+
{ int m5 = z->l - z->c; (void)m5;
|
369
|
+
z->ket = z->c;
|
370
|
+
if (!(eq_s_b(z, 2, s_9))) { z->c = z->l - m5; goto lab4; }
|
371
|
+
z->bra = z->c;
|
372
|
+
{ int m6 = z->l - z->c; (void)m6;
|
373
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab5;
|
374
|
+
z->c--;
|
375
|
+
{ z->c = z->l - m5; goto lab4; }
|
376
|
+
lab5:
|
377
|
+
z->c = z->l - m6;
|
371
378
|
}
|
372
379
|
{ int ret = r_R2(z);
|
373
|
-
if (ret == 0) { z->c = z->l -
|
380
|
+
if (ret == 0) { z->c = z->l - m5; goto lab4; }
|
374
381
|
if (ret < 0) return ret;
|
375
382
|
}
|
376
|
-
{ int ret = slice_del(z);
|
383
|
+
{ int ret = slice_del(z);
|
377
384
|
if (ret < 0) return ret;
|
378
385
|
}
|
379
|
-
|
386
|
+
lab4:
|
380
387
|
;
|
381
388
|
}
|
382
389
|
break;
|
383
390
|
case 2:
|
384
|
-
{ int
|
385
|
-
if (
|
386
|
-
|
387
|
-
|
388
|
-
|
391
|
+
{ int m7 = z->l - z->c; (void)m7;
|
392
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
|
393
|
+
z->c--;
|
394
|
+
goto lab3;
|
395
|
+
lab6:
|
396
|
+
z->c = z->l - m7;
|
389
397
|
}
|
390
|
-
{ int ret = slice_del(z);
|
398
|
+
{ int ret = slice_del(z);
|
391
399
|
if (ret < 0) return ret;
|
392
400
|
}
|
393
401
|
break;
|
394
402
|
case 3:
|
395
|
-
{ int ret = slice_del(z);
|
403
|
+
{ int ret = slice_del(z);
|
396
404
|
if (ret < 0) return ret;
|
397
405
|
}
|
398
|
-
{ int
|
399
|
-
z->ket = z->c;
|
400
|
-
{ int
|
401
|
-
if (!(eq_s_b(z, 2,
|
402
|
-
goto
|
403
|
-
|
404
|
-
z->c = z->l -
|
405
|
-
if (!(eq_s_b(z, 2,
|
406
|
+
{ int m8 = z->l - z->c; (void)m8;
|
407
|
+
z->ket = z->c;
|
408
|
+
{ int m9 = z->l - z->c; (void)m9;
|
409
|
+
if (!(eq_s_b(z, 2, s_10))) goto lab9;
|
410
|
+
goto lab8;
|
411
|
+
lab9:
|
412
|
+
z->c = z->l - m9;
|
413
|
+
if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m8; goto lab7; }
|
406
414
|
}
|
407
|
-
|
408
|
-
z->bra = z->c;
|
415
|
+
lab8:
|
416
|
+
z->bra = z->c;
|
409
417
|
{ int ret = r_R1(z);
|
410
|
-
if (ret == 0) { z->c = z->l -
|
418
|
+
if (ret == 0) { z->c = z->l - m8; goto lab7; }
|
411
419
|
if (ret < 0) return ret;
|
412
420
|
}
|
413
|
-
{ int ret = slice_del(z);
|
421
|
+
{ int ret = slice_del(z);
|
414
422
|
if (ret < 0) return ret;
|
415
423
|
}
|
416
|
-
|
424
|
+
lab7:
|
417
425
|
;
|
418
426
|
}
|
419
427
|
break;
|
420
428
|
case 4:
|
421
|
-
{ int ret = slice_del(z);
|
429
|
+
{ int ret = slice_del(z);
|
422
430
|
if (ret < 0) return ret;
|
423
431
|
}
|
424
|
-
{ int
|
425
|
-
z->ket = z->c;
|
426
|
-
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l -
|
427
|
-
|
428
|
-
|
429
|
-
z->bra = z->c; /* ], line 112 */
|
432
|
+
{ int m10 = z->l - z->c; (void)m10;
|
433
|
+
z->ket = z->c;
|
434
|
+
if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m10; goto lab10; }
|
435
|
+
if (!(find_among_b(z, a_3, 2))) { z->c = z->l - m10; goto lab10; }
|
436
|
+
z->bra = z->c;
|
430
437
|
{ int ret = r_R2(z);
|
431
|
-
if (ret == 0) { z->c = z->l -
|
438
|
+
if (ret == 0) { z->c = z->l - m10; goto lab10; }
|
432
439
|
if (ret < 0) return ret;
|
433
440
|
}
|
434
|
-
|
435
|
-
|
436
|
-
case 1:
|
437
|
-
{ int ret = slice_del(z); /* delete, line 114 */
|
438
|
-
if (ret < 0) return ret;
|
439
|
-
}
|
440
|
-
break;
|
441
|
+
{ int ret = slice_del(z);
|
442
|
+
if (ret < 0) return ret;
|
441
443
|
}
|
442
|
-
|
444
|
+
lab10:
|
443
445
|
;
|
444
446
|
}
|
445
447
|
break;
|
446
448
|
}
|
447
|
-
|
448
|
-
z->c = z->l -
|
449
|
+
lab3:
|
450
|
+
z->c = z->l - m4;
|
449
451
|
}
|
450
452
|
return 1;
|
451
453
|
}
|
452
454
|
|
453
455
|
extern int german_UTF_8_stem(struct SN_env * z) {
|
454
|
-
{ int c1 = z->c;
|
456
|
+
{ int c1 = z->c;
|
455
457
|
{ int ret = r_prelude(z);
|
456
|
-
if (ret == 0) goto lab0; /* call prelude, line 125 */
|
457
458
|
if (ret < 0) return ret;
|
458
459
|
}
|
459
|
-
lab0:
|
460
460
|
z->c = c1;
|
461
461
|
}
|
462
|
-
{ int c2 = z->c;
|
462
|
+
{ int c2 = z->c;
|
463
463
|
{ int ret = r_mark_regions(z);
|
464
|
-
if (ret == 0) goto lab1; /* call mark_regions, line 126 */
|
465
464
|
if (ret < 0) return ret;
|
466
465
|
}
|
467
|
-
lab1:
|
468
466
|
z->c = c2;
|
469
467
|
}
|
470
|
-
z->lb = z->c; z->c = z->l;
|
468
|
+
z->lb = z->c; z->c = z->l;
|
471
469
|
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
if (ret < 0) return ret;
|
476
|
-
}
|
477
|
-
lab2:
|
478
|
-
z->c = z->l - m3;
|
470
|
+
|
471
|
+
{ int ret = r_standard_suffix(z);
|
472
|
+
if (ret < 0) return ret;
|
479
473
|
}
|
480
474
|
z->c = z->lb;
|
481
|
-
{ int
|
475
|
+
{ int c3 = z->c;
|
482
476
|
{ int ret = r_postlude(z);
|
483
|
-
if (ret == 0) goto lab3; /* call postlude, line 129 */
|
484
477
|
if (ret < 0) return ret;
|
485
478
|
}
|
486
|
-
|
487
|
-
z->c = c4;
|
479
|
+
z->c = c3;
|
488
480
|
}
|
489
481
|
return 1;
|
490
482
|
}
|
491
483
|
|
492
|
-
extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3
|
484
|
+
extern struct SN_env * german_UTF_8_create_env(void) { return SN_create_env(0, 3); }
|
493
485
|
|
494
486
|
extern void german_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
|
495
487
|
|