isomorfeus-ferret 0.12.4 → 0.12.5
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 -48
- 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_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 +7 -7
- 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/version.rb +1 -1
- metadata +39 -4
- 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
|
|
@@ -30,17 +30,17 @@ static const symbol s_0_10[2] = { 0xC3, 0xBC };
|
|
30
30
|
|
31
31
|
static const struct among a_0[11] =
|
32
32
|
{
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
33
|
+
{ 0, 0, -1, 6, 0},
|
34
|
+
{ 2, s_0_1, 0, 1, 0},
|
35
|
+
{ 2, s_0_2, 0, 1, 0},
|
36
|
+
{ 2, s_0_3, 0, 2, 0},
|
37
|
+
{ 2, s_0_4, 0, 2, 0},
|
38
|
+
{ 2, s_0_5, 0, 3, 0},
|
39
|
+
{ 2, s_0_6, 0, 3, 0},
|
40
|
+
{ 2, s_0_7, 0, 4, 0},
|
41
|
+
{ 2, s_0_8, 0, 4, 0},
|
42
|
+
{ 2, s_0_9, 0, 5, 0},
|
43
|
+
{ 2, s_0_10, 0, 5, 0}
|
44
44
|
};
|
45
45
|
|
46
46
|
static const symbol s_1_1[1] = { 'I' };
|
@@ -48,9 +48,9 @@ static const symbol s_1_2[1] = { 'Y' };
|
|
48
48
|
|
49
49
|
static const struct among a_1[3] =
|
50
50
|
{
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
{ 0, 0, -1, 3, 0},
|
52
|
+
{ 1, s_1_1, 0, 2, 0},
|
53
|
+
{ 1, s_1_2, 0, 1, 0}
|
54
54
|
};
|
55
55
|
|
56
56
|
static const symbol s_2_0[2] = { 'd', 'd' };
|
@@ -59,9 +59,9 @@ static const symbol s_2_2[2] = { 't', 't' };
|
|
59
59
|
|
60
60
|
static const struct among a_2[3] =
|
61
61
|
{
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
{ 2, s_2_0, -1, -1, 0},
|
63
|
+
{ 2, s_2_1, -1, -1, 0},
|
64
|
+
{ 2, s_2_2, -1, -1, 0}
|
65
65
|
};
|
66
66
|
|
67
67
|
static const symbol s_3_0[3] = { 'e', 'n', 'e' };
|
@@ -72,11 +72,11 @@ static const symbol s_3_4[1] = { 's' };
|
|
72
72
|
|
73
73
|
static const struct among a_3[5] =
|
74
74
|
{
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
{ 3, s_3_0, -1, 2, 0},
|
76
|
+
{ 2, s_3_1, -1, 3, 0},
|
77
|
+
{ 2, s_3_2, -1, 2, 0},
|
78
|
+
{ 5, s_3_3, 2, 1, 0},
|
79
|
+
{ 1, s_3_4, -1, 3, 0}
|
80
80
|
};
|
81
81
|
|
82
82
|
static const symbol s_4_0[3] = { 'e', 'n', 'd' };
|
@@ -88,12 +88,12 @@ static const symbol s_4_5[3] = { 'b', 'a', 'r' };
|
|
88
88
|
|
89
89
|
static const struct among a_4[6] =
|
90
90
|
{
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
91
|
+
{ 3, s_4_0, -1, 1, 0},
|
92
|
+
{ 2, s_4_1, -1, 2, 0},
|
93
|
+
{ 3, s_4_2, -1, 1, 0},
|
94
|
+
{ 4, s_4_3, -1, 3, 0},
|
95
|
+
{ 4, s_4_4, -1, 4, 0},
|
96
|
+
{ 3, s_4_5, -1, 5, 0}
|
97
97
|
};
|
98
98
|
|
99
99
|
static const symbol s_5_0[2] = { 'a', 'a' };
|
@@ -103,10 +103,10 @@ static const symbol s_5_3[2] = { 'u', 'u' };
|
|
103
103
|
|
104
104
|
static const struct among a_5[4] =
|
105
105
|
{
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
106
|
+
{ 2, s_5_0, -1, -1, 0},
|
107
|
+
{ 2, s_5_1, -1, -1, 0},
|
108
|
+
{ 2, s_5_2, -1, -1, 0},
|
109
|
+
{ 2, s_5_3, -1, -1, 0}
|
110
110
|
};
|
111
111
|
|
112
112
|
static const unsigned char g_v[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128 };
|
@@ -120,182 +120,176 @@ static const symbol s_1[] = { 'e' };
|
|
120
120
|
static const symbol s_2[] = { 'i' };
|
121
121
|
static const symbol s_3[] = { 'o' };
|
122
122
|
static const symbol s_4[] = { 'u' };
|
123
|
-
static const symbol s_5[] = { '
|
124
|
-
static const symbol s_6[] = { '
|
125
|
-
static const symbol s_7[] = { '
|
126
|
-
static const symbol s_8[] = { '
|
127
|
-
static const symbol s_9[] = { '
|
128
|
-
static const symbol s_10[] = { '
|
129
|
-
static const symbol s_11[] = { '
|
130
|
-
static const symbol s_12[] = { 'i' };
|
131
|
-
static const symbol s_13[] = { 'e' };
|
132
|
-
static const symbol s_14[] = { '
|
133
|
-
static const symbol s_15[] = { 'h', 'e', 'i', 'd' };
|
134
|
-
static const symbol s_16[] = { 'h', 'e', 'i', 'd' };
|
135
|
-
static const symbol s_17[] = { 'c' };
|
136
|
-
static const symbol s_18[] = { 'e', 'n' };
|
137
|
-
static const symbol s_19[] = { 'i', 'g' };
|
138
|
-
static const symbol s_20[] = { 'e' };
|
139
|
-
static const symbol s_21[] = { 'e' };
|
123
|
+
static const symbol s_5[] = { 'Y' };
|
124
|
+
static const symbol s_6[] = { 'I' };
|
125
|
+
static const symbol s_7[] = { 'Y' };
|
126
|
+
static const symbol s_8[] = { 'y' };
|
127
|
+
static const symbol s_9[] = { 'i' };
|
128
|
+
static const symbol s_10[] = { 'g', 'e', 'm' };
|
129
|
+
static const symbol s_11[] = { 'h', 'e', 'i', 'd' };
|
130
|
+
static const symbol s_12[] = { 'h', 'e', 'i', 'd' };
|
131
|
+
static const symbol s_13[] = { 'e', 'n' };
|
132
|
+
static const symbol s_14[] = { 'i', 'g' };
|
140
133
|
|
141
134
|
static int r_prelude(struct SN_env * z) {
|
142
135
|
int among_var;
|
143
|
-
{ int
|
144
|
-
while(1) {
|
145
|
-
int
|
146
|
-
z->bra = z->c;
|
136
|
+
{ int c_test1 = z->c;
|
137
|
+
while(1) {
|
138
|
+
int c2 = z->c;
|
139
|
+
z->bra = z->c;
|
147
140
|
if (z->c + 1 >= z->l || z->p[z->c + 1] >> 5 != 5 || !((340306450 >> (z->p[z->c + 1] & 0x1f)) & 1)) among_var = 6; else
|
148
|
-
among_var = find_among(z, a_0, 11);
|
141
|
+
among_var = find_among(z, a_0, 11);
|
149
142
|
if (!(among_var)) goto lab0;
|
150
|
-
z->ket = z->c;
|
151
|
-
switch(among_var) {
|
152
|
-
case 0: goto lab0;
|
143
|
+
z->ket = z->c;
|
144
|
+
switch (among_var) {
|
153
145
|
case 1:
|
154
|
-
{ int ret = slice_from_s(z, 1, s_0);
|
146
|
+
{ int ret = slice_from_s(z, 1, s_0);
|
155
147
|
if (ret < 0) return ret;
|
156
148
|
}
|
157
149
|
break;
|
158
150
|
case 2:
|
159
|
-
{ int ret = slice_from_s(z, 1, s_1);
|
151
|
+
{ int ret = slice_from_s(z, 1, s_1);
|
160
152
|
if (ret < 0) return ret;
|
161
153
|
}
|
162
154
|
break;
|
163
155
|
case 3:
|
164
|
-
{ int ret = slice_from_s(z, 1, s_2);
|
156
|
+
{ int ret = slice_from_s(z, 1, s_2);
|
165
157
|
if (ret < 0) return ret;
|
166
158
|
}
|
167
159
|
break;
|
168
160
|
case 4:
|
169
|
-
{ int ret = slice_from_s(z, 1, s_3);
|
161
|
+
{ int ret = slice_from_s(z, 1, s_3);
|
170
162
|
if (ret < 0) return ret;
|
171
163
|
}
|
172
164
|
break;
|
173
165
|
case 5:
|
174
|
-
{ int ret = slice_from_s(z, 1, s_4);
|
166
|
+
{ int ret = slice_from_s(z, 1, s_4);
|
175
167
|
if (ret < 0) return ret;
|
176
168
|
}
|
177
169
|
break;
|
178
170
|
case 6:
|
179
|
-
{ int ret = skip_utf8(z->p, z->c,
|
171
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
|
180
172
|
if (ret < 0) goto lab0;
|
181
|
-
z->c = ret;
|
173
|
+
z->c = ret;
|
182
174
|
}
|
183
175
|
break;
|
184
176
|
}
|
185
177
|
continue;
|
186
178
|
lab0:
|
187
|
-
z->c =
|
179
|
+
z->c = c2;
|
188
180
|
break;
|
189
181
|
}
|
190
|
-
z->c =
|
182
|
+
z->c = c_test1;
|
191
183
|
}
|
192
|
-
{ int
|
193
|
-
z->bra = z->c;
|
194
|
-
if (
|
195
|
-
z->
|
196
|
-
|
184
|
+
{ int c3 = z->c;
|
185
|
+
z->bra = z->c;
|
186
|
+
if (z->c == z->l || z->p[z->c] != 'y') { z->c = c3; goto lab1; }
|
187
|
+
z->c++;
|
188
|
+
z->ket = z->c;
|
189
|
+
{ int ret = slice_from_s(z, 1, s_5);
|
197
190
|
if (ret < 0) return ret;
|
198
191
|
}
|
199
192
|
lab1:
|
200
193
|
;
|
201
194
|
}
|
202
|
-
while(1) {
|
203
|
-
int
|
204
|
-
while(1) {
|
205
|
-
int
|
195
|
+
while(1) {
|
196
|
+
int c4 = z->c;
|
197
|
+
while(1) {
|
198
|
+
int c5 = z->c;
|
206
199
|
if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab3;
|
207
|
-
z->bra = z->c;
|
208
|
-
{ int
|
209
|
-
if (
|
210
|
-
z->
|
200
|
+
z->bra = z->c;
|
201
|
+
{ int c6 = z->c;
|
202
|
+
if (z->c == z->l || z->p[z->c] != 'i') goto lab5;
|
203
|
+
z->c++;
|
204
|
+
z->ket = z->c;
|
211
205
|
if (in_grouping_U(z, g_v, 97, 232, 0)) goto lab5;
|
212
|
-
{ int ret = slice_from_s(z, 1,
|
206
|
+
{ int ret = slice_from_s(z, 1, s_6);
|
213
207
|
if (ret < 0) return ret;
|
214
208
|
}
|
215
209
|
goto lab4;
|
216
210
|
lab5:
|
217
|
-
z->c =
|
218
|
-
if (
|
219
|
-
z->
|
220
|
-
|
211
|
+
z->c = c6;
|
212
|
+
if (z->c == z->l || z->p[z->c] != 'y') goto lab3;
|
213
|
+
z->c++;
|
214
|
+
z->ket = z->c;
|
215
|
+
{ int ret = slice_from_s(z, 1, s_7);
|
221
216
|
if (ret < 0) return ret;
|
222
217
|
}
|
223
218
|
}
|
224
219
|
lab4:
|
225
|
-
z->c =
|
220
|
+
z->c = c5;
|
226
221
|
break;
|
227
222
|
lab3:
|
228
|
-
z->c =
|
229
|
-
{ int ret = skip_utf8(z->p, z->c,
|
223
|
+
z->c = c5;
|
224
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
|
230
225
|
if (ret < 0) goto lab2;
|
231
|
-
z->c = ret;
|
226
|
+
z->c = ret;
|
232
227
|
}
|
233
228
|
}
|
234
229
|
continue;
|
235
230
|
lab2:
|
236
|
-
z->c =
|
231
|
+
z->c = c4;
|
237
232
|
break;
|
238
233
|
}
|
239
234
|
return 1;
|
240
235
|
}
|
241
236
|
|
242
237
|
static int r_mark_regions(struct SN_env * z) {
|
243
|
-
z->I[0] = z->l;
|
244
238
|
z->I[1] = z->l;
|
245
|
-
|
239
|
+
z->I[0] = z->l;
|
240
|
+
{
|
246
241
|
int ret = out_grouping_U(z, g_v, 97, 232, 1);
|
247
242
|
if (ret < 0) return 0;
|
248
243
|
z->c += ret;
|
249
244
|
}
|
250
|
-
{
|
245
|
+
{
|
251
246
|
int ret = in_grouping_U(z, g_v, 97, 232, 1);
|
252
247
|
if (ret < 0) return 0;
|
253
248
|
z->c += ret;
|
254
249
|
}
|
255
|
-
z->I[
|
256
|
-
|
257
|
-
if (!(z->I[
|
258
|
-
z->I[
|
250
|
+
z->I[1] = z->c;
|
251
|
+
|
252
|
+
if (!(z->I[1] < 3)) goto lab0;
|
253
|
+
z->I[1] = 3;
|
259
254
|
lab0:
|
260
|
-
{
|
255
|
+
{
|
261
256
|
int ret = out_grouping_U(z, g_v, 97, 232, 1);
|
262
257
|
if (ret < 0) return 0;
|
263
258
|
z->c += ret;
|
264
259
|
}
|
265
|
-
{
|
260
|
+
{
|
266
261
|
int ret = in_grouping_U(z, g_v, 97, 232, 1);
|
267
262
|
if (ret < 0) return 0;
|
268
263
|
z->c += ret;
|
269
264
|
}
|
270
|
-
z->I[
|
265
|
+
z->I[0] = z->c;
|
271
266
|
return 1;
|
272
267
|
}
|
273
268
|
|
274
269
|
static int r_postlude(struct SN_env * z) {
|
275
270
|
int among_var;
|
276
|
-
while(1) {
|
271
|
+
while(1) {
|
277
272
|
int c1 = z->c;
|
278
|
-
z->bra = z->c;
|
273
|
+
z->bra = z->c;
|
279
274
|
if (z->c >= z->l || (z->p[z->c + 0] != 73 && z->p[z->c + 0] != 89)) among_var = 3; else
|
280
|
-
among_var = find_among(z, a_1, 3);
|
275
|
+
among_var = find_among(z, a_1, 3);
|
281
276
|
if (!(among_var)) goto lab0;
|
282
|
-
z->ket = z->c;
|
283
|
-
switch(among_var) {
|
284
|
-
case 0: goto lab0;
|
277
|
+
z->ket = z->c;
|
278
|
+
switch (among_var) {
|
285
279
|
case 1:
|
286
|
-
{ int ret = slice_from_s(z, 1,
|
280
|
+
{ int ret = slice_from_s(z, 1, s_8);
|
287
281
|
if (ret < 0) return ret;
|
288
282
|
}
|
289
283
|
break;
|
290
284
|
case 2:
|
291
|
-
{ int ret = slice_from_s(z, 1,
|
285
|
+
{ int ret = slice_from_s(z, 1, s_9);
|
292
286
|
if (ret < 0) return ret;
|
293
287
|
}
|
294
288
|
break;
|
295
289
|
case 3:
|
296
|
-
{ int ret = skip_utf8(z->p, z->c,
|
290
|
+
{ int ret = skip_utf8(z->p, z->c, z->l, 1);
|
297
291
|
if (ret < 0) goto lab0;
|
298
|
-
z->c = ret;
|
292
|
+
z->c = ret;
|
299
293
|
}
|
300
294
|
break;
|
301
295
|
}
|
@@ -308,114 +302,110 @@ static int r_postlude(struct SN_env * z) {
|
|
308
302
|
}
|
309
303
|
|
310
304
|
static int r_R1(struct SN_env * z) {
|
311
|
-
if (!(z->I[
|
305
|
+
if (!(z->I[1] <= z->c)) return 0;
|
312
306
|
return 1;
|
313
307
|
}
|
314
308
|
|
315
309
|
static int r_R2(struct SN_env * z) {
|
316
|
-
if (!(z->I[
|
310
|
+
if (!(z->I[0] <= z->c)) return 0;
|
317
311
|
return 1;
|
318
312
|
}
|
319
313
|
|
320
314
|
static int r_undouble(struct SN_env * z) {
|
321
|
-
{ int
|
315
|
+
{ int m_test1 = z->l - z->c;
|
322
316
|
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1050640 >> (z->p[z->c - 1] & 0x1f)) & 1)) return 0;
|
323
|
-
if (!(find_among_b(z, a_2, 3))) return 0;
|
324
|
-
z->c = z->l -
|
317
|
+
if (!(find_among_b(z, a_2, 3))) return 0;
|
318
|
+
z->c = z->l - m_test1;
|
325
319
|
}
|
326
|
-
z->ket = z->c;
|
327
|
-
{ int ret =
|
320
|
+
z->ket = z->c;
|
321
|
+
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
|
328
322
|
if (ret < 0) return 0;
|
329
|
-
z->c = ret;
|
323
|
+
z->c = ret;
|
330
324
|
}
|
331
|
-
z->bra = z->c;
|
332
|
-
{ int ret = slice_del(z);
|
325
|
+
z->bra = z->c;
|
326
|
+
{ int ret = slice_del(z);
|
333
327
|
if (ret < 0) return ret;
|
334
328
|
}
|
335
329
|
return 1;
|
336
330
|
}
|
337
331
|
|
338
332
|
static int r_e_ending(struct SN_env * z) {
|
339
|
-
z->
|
340
|
-
z->ket = z->c;
|
341
|
-
if (
|
342
|
-
z->
|
333
|
+
z->I[2] = 0;
|
334
|
+
z->ket = z->c;
|
335
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 'e') return 0;
|
336
|
+
z->c--;
|
337
|
+
z->bra = z->c;
|
343
338
|
{ int ret = r_R1(z);
|
344
|
-
if (ret
|
345
|
-
if (ret < 0) return ret;
|
339
|
+
if (ret <= 0) return ret;
|
346
340
|
}
|
347
|
-
{ int
|
341
|
+
{ int m_test1 = z->l - z->c;
|
348
342
|
if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
|
349
|
-
z->c = z->l -
|
343
|
+
z->c = z->l - m_test1;
|
350
344
|
}
|
351
|
-
{ int ret = slice_del(z);
|
345
|
+
{ int ret = slice_del(z);
|
352
346
|
if (ret < 0) return ret;
|
353
347
|
}
|
354
|
-
z->
|
348
|
+
z->I[2] = 1;
|
355
349
|
{ int ret = r_undouble(z);
|
356
|
-
if (ret
|
357
|
-
if (ret < 0) return ret;
|
350
|
+
if (ret <= 0) return ret;
|
358
351
|
}
|
359
352
|
return 1;
|
360
353
|
}
|
361
354
|
|
362
355
|
static int r_en_ending(struct SN_env * z) {
|
363
356
|
{ int ret = r_R1(z);
|
364
|
-
if (ret
|
365
|
-
if (ret < 0) return ret;
|
357
|
+
if (ret <= 0) return ret;
|
366
358
|
}
|
367
|
-
{ int m1 = z->l - z->c; (void)m1;
|
359
|
+
{ int m1 = z->l - z->c; (void)m1;
|
368
360
|
if (out_grouping_b_U(z, g_v, 97, 232, 0)) return 0;
|
369
361
|
z->c = z->l - m1;
|
370
|
-
{ int m2 = z->l - z->c; (void)m2;
|
371
|
-
if (!(eq_s_b(z, 3,
|
362
|
+
{ int m2 = z->l - z->c; (void)m2;
|
363
|
+
if (!(eq_s_b(z, 3, s_10))) goto lab0;
|
372
364
|
return 0;
|
373
365
|
lab0:
|
374
366
|
z->c = z->l - m2;
|
375
367
|
}
|
376
368
|
}
|
377
|
-
{ int ret = slice_del(z);
|
369
|
+
{ int ret = slice_del(z);
|
378
370
|
if (ret < 0) return ret;
|
379
371
|
}
|
380
372
|
{ int ret = r_undouble(z);
|
381
|
-
if (ret
|
382
|
-
if (ret < 0) return ret;
|
373
|
+
if (ret <= 0) return ret;
|
383
374
|
}
|
384
375
|
return 1;
|
385
376
|
}
|
386
377
|
|
387
378
|
static int r_standard_suffix(struct SN_env * z) {
|
388
379
|
int among_var;
|
389
|
-
{ int m1 = z->l - z->c; (void)m1;
|
390
|
-
z->ket = z->c;
|
380
|
+
{ int m1 = z->l - z->c; (void)m1;
|
381
|
+
z->ket = z->c;
|
391
382
|
if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((540704 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
|
392
|
-
among_var = find_among_b(z, a_3, 5);
|
383
|
+
among_var = find_among_b(z, a_3, 5);
|
393
384
|
if (!(among_var)) goto lab0;
|
394
|
-
z->bra = z->c;
|
395
|
-
switch(among_var) {
|
396
|
-
case 0: goto lab0;
|
385
|
+
z->bra = z->c;
|
386
|
+
switch (among_var) {
|
397
387
|
case 1:
|
398
388
|
{ int ret = r_R1(z);
|
399
|
-
if (ret == 0) goto lab0;
|
389
|
+
if (ret == 0) goto lab0;
|
400
390
|
if (ret < 0) return ret;
|
401
391
|
}
|
402
|
-
{ int ret = slice_from_s(z, 4,
|
392
|
+
{ int ret = slice_from_s(z, 4, s_11);
|
403
393
|
if (ret < 0) return ret;
|
404
394
|
}
|
405
395
|
break;
|
406
396
|
case 2:
|
407
397
|
{ int ret = r_en_ending(z);
|
408
|
-
if (ret == 0) goto lab0;
|
398
|
+
if (ret == 0) goto lab0;
|
409
399
|
if (ret < 0) return ret;
|
410
400
|
}
|
411
401
|
break;
|
412
402
|
case 3:
|
413
403
|
{ int ret = r_R1(z);
|
414
|
-
if (ret == 0) goto lab0;
|
404
|
+
if (ret == 0) goto lab0;
|
415
405
|
if (ret < 0) return ret;
|
416
406
|
}
|
417
407
|
if (out_grouping_b_U(z, g_v_j, 97, 232, 0)) goto lab0;
|
418
|
-
{ int ret = slice_del(z);
|
408
|
+
{ int ret = slice_del(z);
|
419
409
|
if (ret < 0) return ret;
|
420
410
|
}
|
421
411
|
break;
|
@@ -423,198 +413,188 @@ static int r_standard_suffix(struct SN_env * z) {
|
|
423
413
|
lab0:
|
424
414
|
z->c = z->l - m1;
|
425
415
|
}
|
426
|
-
{ int m2 = z->l - z->c; (void)m2;
|
416
|
+
{ int m2 = z->l - z->c; (void)m2;
|
427
417
|
{ int ret = r_e_ending(z);
|
428
|
-
if (ret == 0) goto lab1; /* call e_ending, line 120 */
|
429
418
|
if (ret < 0) return ret;
|
430
419
|
}
|
431
|
-
lab1:
|
432
420
|
z->c = z->l - m2;
|
433
421
|
}
|
434
|
-
{ int m3 = z->l - z->c; (void)m3;
|
435
|
-
z->ket = z->c;
|
436
|
-
if (!(eq_s_b(z, 4,
|
437
|
-
z->bra = z->c;
|
422
|
+
{ int m3 = z->l - z->c; (void)m3;
|
423
|
+
z->ket = z->c;
|
424
|
+
if (!(eq_s_b(z, 4, s_12))) goto lab1;
|
425
|
+
z->bra = z->c;
|
438
426
|
{ int ret = r_R2(z);
|
439
|
-
if (ret == 0) goto
|
427
|
+
if (ret == 0) goto lab1;
|
440
428
|
if (ret < 0) return ret;
|
441
429
|
}
|
442
|
-
{ int m4 = z->l - z->c; (void)m4;
|
443
|
-
if (
|
444
|
-
|
445
|
-
|
430
|
+
{ int m4 = z->l - z->c; (void)m4;
|
431
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 'c') goto lab2;
|
432
|
+
z->c--;
|
433
|
+
goto lab1;
|
434
|
+
lab2:
|
446
435
|
z->c = z->l - m4;
|
447
436
|
}
|
448
|
-
{ int ret = slice_del(z);
|
437
|
+
{ int ret = slice_del(z);
|
449
438
|
if (ret < 0) return ret;
|
450
439
|
}
|
451
|
-
z->ket = z->c;
|
452
|
-
if (!(eq_s_b(z, 2,
|
453
|
-
z->bra = z->c;
|
440
|
+
z->ket = z->c;
|
441
|
+
if (!(eq_s_b(z, 2, s_13))) goto lab1;
|
442
|
+
z->bra = z->c;
|
454
443
|
{ int ret = r_en_ending(z);
|
455
|
-
if (ret == 0) goto
|
444
|
+
if (ret == 0) goto lab1;
|
456
445
|
if (ret < 0) return ret;
|
457
446
|
}
|
458
|
-
|
447
|
+
lab1:
|
459
448
|
z->c = z->l - m3;
|
460
449
|
}
|
461
|
-
{ int m5 = z->l - z->c; (void)m5;
|
462
|
-
z->ket = z->c;
|
463
|
-
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto
|
464
|
-
among_var = find_among_b(z, a_4, 6);
|
465
|
-
if (!(among_var)) goto
|
466
|
-
z->bra = z->c;
|
467
|
-
switch(among_var) {
|
468
|
-
case 0: goto lab4;
|
450
|
+
{ int m5 = z->l - z->c; (void)m5;
|
451
|
+
z->ket = z->c;
|
452
|
+
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
|
453
|
+
among_var = find_among_b(z, a_4, 6);
|
454
|
+
if (!(among_var)) goto lab3;
|
455
|
+
z->bra = z->c;
|
456
|
+
switch (among_var) {
|
469
457
|
case 1:
|
470
458
|
{ int ret = r_R2(z);
|
471
|
-
if (ret == 0) goto
|
459
|
+
if (ret == 0) goto lab3;
|
472
460
|
if (ret < 0) return ret;
|
473
461
|
}
|
474
|
-
{ int ret = slice_del(z);
|
462
|
+
{ int ret = slice_del(z);
|
475
463
|
if (ret < 0) return ret;
|
476
464
|
}
|
477
|
-
{ int m6 = z->l - z->c; (void)m6;
|
478
|
-
z->ket = z->c;
|
479
|
-
if (!(eq_s_b(z, 2,
|
480
|
-
z->bra = z->c;
|
465
|
+
{ int m6 = z->l - z->c; (void)m6;
|
466
|
+
z->ket = z->c;
|
467
|
+
if (!(eq_s_b(z, 2, s_14))) goto lab5;
|
468
|
+
z->bra = z->c;
|
481
469
|
{ int ret = r_R2(z);
|
482
|
-
if (ret == 0) goto
|
470
|
+
if (ret == 0) goto lab5;
|
483
471
|
if (ret < 0) return ret;
|
484
472
|
}
|
485
|
-
{ int m7 = z->l - z->c; (void)m7;
|
486
|
-
if (
|
487
|
-
|
488
|
-
|
473
|
+
{ int m7 = z->l - z->c; (void)m7;
|
474
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
|
475
|
+
z->c--;
|
476
|
+
goto lab5;
|
477
|
+
lab6:
|
489
478
|
z->c = z->l - m7;
|
490
479
|
}
|
491
|
-
{ int ret = slice_del(z);
|
480
|
+
{ int ret = slice_del(z);
|
492
481
|
if (ret < 0) return ret;
|
493
482
|
}
|
494
|
-
goto
|
495
|
-
|
483
|
+
goto lab4;
|
484
|
+
lab5:
|
496
485
|
z->c = z->l - m6;
|
497
486
|
{ int ret = r_undouble(z);
|
498
|
-
if (ret == 0) goto
|
487
|
+
if (ret == 0) goto lab3;
|
499
488
|
if (ret < 0) return ret;
|
500
489
|
}
|
501
490
|
}
|
502
|
-
|
491
|
+
lab4:
|
503
492
|
break;
|
504
493
|
case 2:
|
505
494
|
{ int ret = r_R2(z);
|
506
|
-
if (ret == 0) goto
|
495
|
+
if (ret == 0) goto lab3;
|
507
496
|
if (ret < 0) return ret;
|
508
497
|
}
|
509
|
-
{ int m8 = z->l - z->c; (void)m8;
|
510
|
-
if (
|
511
|
-
|
512
|
-
|
498
|
+
{ int m8 = z->l - z->c; (void)m8;
|
499
|
+
if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab7;
|
500
|
+
z->c--;
|
501
|
+
goto lab3;
|
502
|
+
lab7:
|
513
503
|
z->c = z->l - m8;
|
514
504
|
}
|
515
|
-
{ int ret = slice_del(z);
|
505
|
+
{ int ret = slice_del(z);
|
516
506
|
if (ret < 0) return ret;
|
517
507
|
}
|
518
508
|
break;
|
519
509
|
case 3:
|
520
510
|
{ int ret = r_R2(z);
|
521
|
-
if (ret == 0) goto
|
511
|
+
if (ret == 0) goto lab3;
|
522
512
|
if (ret < 0) return ret;
|
523
513
|
}
|
524
|
-
{ int ret = slice_del(z);
|
514
|
+
{ int ret = slice_del(z);
|
525
515
|
if (ret < 0) return ret;
|
526
516
|
}
|
527
517
|
{ int ret = r_e_ending(z);
|
528
|
-
if (ret == 0) goto
|
518
|
+
if (ret == 0) goto lab3;
|
529
519
|
if (ret < 0) return ret;
|
530
520
|
}
|
531
521
|
break;
|
532
522
|
case 4:
|
533
523
|
{ int ret = r_R2(z);
|
534
|
-
if (ret == 0) goto
|
524
|
+
if (ret == 0) goto lab3;
|
535
525
|
if (ret < 0) return ret;
|
536
526
|
}
|
537
|
-
{ int ret = slice_del(z);
|
527
|
+
{ int ret = slice_del(z);
|
538
528
|
if (ret < 0) return ret;
|
539
529
|
}
|
540
530
|
break;
|
541
531
|
case 5:
|
542
532
|
{ int ret = r_R2(z);
|
543
|
-
if (ret == 0) goto
|
533
|
+
if (ret == 0) goto lab3;
|
544
534
|
if (ret < 0) return ret;
|
545
535
|
}
|
546
|
-
if (!(z->
|
547
|
-
{ int ret = slice_del(z);
|
536
|
+
if (!(z->I[2])) goto lab3;
|
537
|
+
{ int ret = slice_del(z);
|
548
538
|
if (ret < 0) return ret;
|
549
539
|
}
|
550
540
|
break;
|
551
541
|
}
|
552
|
-
|
542
|
+
lab3:
|
553
543
|
z->c = z->l - m5;
|
554
544
|
}
|
555
|
-
{ int m9 = z->l - z->c; (void)m9;
|
556
|
-
if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto
|
557
|
-
{ int
|
558
|
-
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto
|
559
|
-
if (!(find_among_b(z, a_5, 4))) goto
|
560
|
-
if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto
|
561
|
-
z->c = z->l -
|
545
|
+
{ int m9 = z->l - z->c; (void)m9;
|
546
|
+
if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab8;
|
547
|
+
{ int m_test10 = z->l - z->c;
|
548
|
+
if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab8;
|
549
|
+
if (!(find_among_b(z, a_5, 4))) goto lab8;
|
550
|
+
if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab8;
|
551
|
+
z->c = z->l - m_test10;
|
562
552
|
}
|
563
|
-
z->ket = z->c;
|
564
|
-
{ int ret =
|
565
|
-
if (ret < 0) goto
|
566
|
-
z->c = ret;
|
553
|
+
z->ket = z->c;
|
554
|
+
{ int ret = skip_b_utf8(z->p, z->c, z->lb, 1);
|
555
|
+
if (ret < 0) goto lab8;
|
556
|
+
z->c = ret;
|
567
557
|
}
|
568
|
-
z->bra = z->c;
|
569
|
-
{ int ret = slice_del(z);
|
558
|
+
z->bra = z->c;
|
559
|
+
{ int ret = slice_del(z);
|
570
560
|
if (ret < 0) return ret;
|
571
561
|
}
|
572
|
-
|
562
|
+
lab8:
|
573
563
|
z->c = z->l - m9;
|
574
564
|
}
|
575
565
|
return 1;
|
576
566
|
}
|
577
567
|
|
578
568
|
extern int dutch_UTF_8_stem(struct SN_env * z) {
|
579
|
-
{ int c1 = z->c;
|
569
|
+
{ int c1 = z->c;
|
580
570
|
{ int ret = r_prelude(z);
|
581
|
-
if (ret == 0) goto lab0; /* call prelude, line 159 */
|
582
571
|
if (ret < 0) return ret;
|
583
572
|
}
|
584
|
-
lab0:
|
585
573
|
z->c = c1;
|
586
574
|
}
|
587
|
-
{ int c2 = z->c;
|
575
|
+
{ int c2 = z->c;
|
588
576
|
{ int ret = r_mark_regions(z);
|
589
|
-
if (ret == 0) goto lab1; /* call mark_regions, line 160 */
|
590
577
|
if (ret < 0) return ret;
|
591
578
|
}
|
592
|
-
lab1:
|
593
579
|
z->c = c2;
|
594
580
|
}
|
595
|
-
z->lb = z->c; z->c = z->l;
|
581
|
+
z->lb = z->c; z->c = z->l;
|
596
582
|
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
if (ret < 0) return ret;
|
601
|
-
}
|
602
|
-
lab2:
|
603
|
-
z->c = z->l - m3;
|
583
|
+
|
584
|
+
{ int ret = r_standard_suffix(z);
|
585
|
+
if (ret < 0) return ret;
|
604
586
|
}
|
605
587
|
z->c = z->lb;
|
606
|
-
{ int
|
588
|
+
{ int c3 = z->c;
|
607
589
|
{ int ret = r_postlude(z);
|
608
|
-
if (ret == 0) goto lab3; /* call postlude, line 163 */
|
609
590
|
if (ret < 0) return ret;
|
610
591
|
}
|
611
|
-
|
612
|
-
z->c = c4;
|
592
|
+
z->c = c3;
|
613
593
|
}
|
614
594
|
return 1;
|
615
595
|
}
|
616
596
|
|
617
|
-
extern struct SN_env * dutch_UTF_8_create_env(void) { return SN_create_env(0,
|
597
|
+
extern struct SN_env * dutch_UTF_8_create_env(void) { return SN_create_env(0, 3); }
|
618
598
|
|
619
599
|
extern void dutch_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
|
620
600
|
|