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.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +612 -612
  3. data/README.md +80 -48
  4. data/ext/isomorfeus_ferret_ext/bm_hash.c +9 -6
  5. data/ext/isomorfeus_ferret_ext/bm_micro_string.c +4 -2
  6. data/ext/isomorfeus_ferret_ext/frb_store.c +34 -5
  7. data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
  8. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
  9. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +7 -7
  10. data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
  11. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
  12. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
  13. data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
  14. data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
  15. data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
  16. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
  17. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
  18. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
  19. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
  20. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
  21. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
  22. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
  23. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
  24. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
  25. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
  26. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
  27. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
  28. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
  29. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
  30. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
  31. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
  32. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
  33. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
  34. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
  35. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
  36. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
  37. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
  38. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
  39. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
  40. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
  41. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
  42. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
  43. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
  44. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
  45. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
  46. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
  47. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
  48. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
  49. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
  50. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
  51. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
  52. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
  53. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
  54. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
  55. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
  56. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
  57. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
  58. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
  59. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
  60. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
  61. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
  62. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
  63. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
  64. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
  65. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
  66. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
  67. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
  68. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
  69. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
  70. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
  71. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
  72. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
  73. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
  74. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
  75. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
  76. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
  77. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
  78. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
  79. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
  80. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
  81. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
  82. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
  83. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
  84. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
  85. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
  86. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
  87. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
  88. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
  89. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
  90. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
  91. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
  92. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
  93. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
  94. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
  95. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
  96. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
  97. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
  98. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
  99. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
  100. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
  101. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
  102. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
  103. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
  104. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
  105. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
  106. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
  107. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
  108. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
  109. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
  110. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
  111. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
  112. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
  113. data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
  114. data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
  115. data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
  116. data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
  117. data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
  118. data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
  119. data/ext/isomorfeus_ferret_ext/test.c +7 -1
  120. data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
  121. data/lib/isomorfeus/ferret/version.rb +1 -1
  122. metadata +39 -4
  123. data/ext/isomorfeus_ferret_ext/q_parser.y +0 -1366
@@ -1,4 +1,4 @@
1
- /* This file was generated automatically by the Snowball to ANSI C compiler */
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
- /* 0 */ { 0, 0, -1, 6, 0},
34
- /* 1 */ { 2, s_0_1, 0, 1, 0},
35
- /* 2 */ { 2, s_0_2, 0, 1, 0},
36
- /* 3 */ { 2, s_0_3, 0, 2, 0},
37
- /* 4 */ { 2, s_0_4, 0, 2, 0},
38
- /* 5 */ { 2, s_0_5, 0, 3, 0},
39
- /* 6 */ { 2, s_0_6, 0, 3, 0},
40
- /* 7 */ { 2, s_0_7, 0, 4, 0},
41
- /* 8 */ { 2, s_0_8, 0, 4, 0},
42
- /* 9 */ { 2, s_0_9, 0, 5, 0},
43
- /* 10 */ { 2, s_0_10, 0, 5, 0}
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
- /* 0 */ { 0, 0, -1, 3, 0},
52
- /* 1 */ { 1, s_1_1, 0, 2, 0},
53
- /* 2 */ { 1, s_1_2, 0, 1, 0}
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
- /* 0 */ { 2, s_2_0, -1, -1, 0},
63
- /* 1 */ { 2, s_2_1, -1, -1, 0},
64
- /* 2 */ { 2, s_2_2, -1, -1, 0}
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
- /* 0 */ { 3, s_3_0, -1, 2, 0},
76
- /* 1 */ { 2, s_3_1, -1, 3, 0},
77
- /* 2 */ { 2, s_3_2, -1, 2, 0},
78
- /* 3 */ { 5, s_3_3, 2, 1, 0},
79
- /* 4 */ { 1, s_3_4, -1, 3, 0}
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
- /* 0 */ { 3, s_4_0, -1, 1, 0},
92
- /* 1 */ { 2, s_4_1, -1, 2, 0},
93
- /* 2 */ { 3, s_4_2, -1, 1, 0},
94
- /* 3 */ { 4, s_4_3, -1, 3, 0},
95
- /* 4 */ { 4, s_4_4, -1, 4, 0},
96
- /* 5 */ { 3, s_4_5, -1, 5, 0}
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
- /* 0 */ { 2, s_5_0, -1, -1, 0},
107
- /* 1 */ { 2, s_5_1, -1, -1, 0},
108
- /* 2 */ { 2, s_5_2, -1, -1, 0},
109
- /* 3 */ { 2, s_5_3, -1, -1, 0}
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[] = { 'y' };
124
- static const symbol s_6[] = { 'Y' };
125
- static const symbol s_7[] = { 'i' };
126
- static const symbol s_8[] = { 'I' };
127
- static const symbol s_9[] = { 'y' };
128
- static const symbol s_10[] = { 'Y' };
129
- static const symbol s_11[] = { 'y' };
130
- static const symbol s_12[] = { 'i' };
131
- static const symbol s_13[] = { 'e' };
132
- static const symbol s_14[] = { 'g', 'e', 'm' };
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 c_test = z->c; /* test, line 42 */
144
- while(1) { /* repeat, line 42 */
145
- int c1 = z->c;
146
- z->bra = z->c; /* [, line 43 */
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); /* substring, line 43 */
141
+ among_var = find_among(z, a_0, 11);
149
142
  if (!(among_var)) goto lab0;
150
- z->ket = z->c; /* ], line 43 */
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); /* <-, line 45 */
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); /* <-, line 47 */
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); /* <-, line 49 */
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); /* <-, line 51 */
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); /* <-, line 53 */
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, 0, z->l, 1);
171
+ { int ret = skip_utf8(z->p, z->c, z->l, 1);
180
172
  if (ret < 0) goto lab0;
181
- z->c = ret; /* next, line 54 */
173
+ z->c = ret;
182
174
  }
183
175
  break;
184
176
  }
185
177
  continue;
186
178
  lab0:
187
- z->c = c1;
179
+ z->c = c2;
188
180
  break;
189
181
  }
190
- z->c = c_test;
182
+ z->c = c_test1;
191
183
  }
192
- { int c_keep = z->c; /* try, line 57 */
193
- z->bra = z->c; /* [, line 57 */
194
- if (!(eq_s(z, 1, s_5))) { z->c = c_keep; goto lab1; }
195
- z->ket = z->c; /* ], line 57 */
196
- { int ret = slice_from_s(z, 1, s_6); /* <-, line 57 */
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) { /* repeat, line 58 */
203
- int c2 = z->c;
204
- while(1) { /* goto, line 58 */
205
- int c3 = z->c;
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; /* [, line 59 */
208
- { int c4 = z->c; /* or, line 59 */
209
- if (!(eq_s(z, 1, s_7))) goto lab5;
210
- z->ket = z->c; /* ], line 59 */
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, s_8); /* <-, line 59 */
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 = c4;
218
- if (!(eq_s(z, 1, s_9))) goto lab3;
219
- z->ket = z->c; /* ], line 60 */
220
- { int ret = slice_from_s(z, 1, s_10); /* <-, line 60 */
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 = c3;
220
+ z->c = c5;
226
221
  break;
227
222
  lab3:
228
- z->c = c3;
229
- { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
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; /* goto, line 58 */
226
+ z->c = ret;
232
227
  }
233
228
  }
234
229
  continue;
235
230
  lab2:
236
- z->c = c2;
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
- { /* gopast */ /* grouping v, line 69 */
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
- { /* gopast */ /* non v, line 69 */
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[0] = z->c; /* setmark p1, line 69 */
256
- /* try, line 70 */
257
- if (!(z->I[0] < 3)) goto lab0;
258
- z->I[0] = 3;
250
+ z->I[1] = z->c;
251
+
252
+ if (!(z->I[1] < 3)) goto lab0;
253
+ z->I[1] = 3;
259
254
  lab0:
260
- { /* gopast */ /* grouping v, line 71 */
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
- { /* gopast */ /* non v, line 71 */
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[1] = z->c; /* setmark p2, line 71 */
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) { /* repeat, line 75 */
271
+ while(1) {
277
272
  int c1 = z->c;
278
- z->bra = z->c; /* [, line 77 */
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); /* substring, line 77 */
275
+ among_var = find_among(z, a_1, 3);
281
276
  if (!(among_var)) goto lab0;
282
- z->ket = z->c; /* ], line 77 */
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, s_11); /* <-, line 78 */
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, s_12); /* <-, line 79 */
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, 0, z->l, 1);
290
+ { int ret = skip_utf8(z->p, z->c, z->l, 1);
297
291
  if (ret < 0) goto lab0;
298
- z->c = ret; /* next, line 80 */
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[0] <= z->c)) return 0;
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[1] <= z->c)) return 0;
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 m_test = z->l - z->c; /* test, line 91 */
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; /* among, line 91 */
324
- z->c = z->l - m_test;
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; /* [, line 91 */
327
- { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
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; /* next, line 91 */
323
+ z->c = ret;
330
324
  }
331
- z->bra = z->c; /* ], line 91 */
332
- { int ret = slice_del(z); /* delete, line 91 */
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->B[0] = 0; /* unset e_found, line 95 */
340
- z->ket = z->c; /* [, line 96 */
341
- if (!(eq_s_b(z, 1, s_13))) return 0;
342
- z->bra = z->c; /* ], line 96 */
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 == 0) return 0; /* call R1, line 96 */
345
- if (ret < 0) return ret;
339
+ if (ret <= 0) return ret;
346
340
  }
347
- { int m_test = z->l - z->c; /* test, line 96 */
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 - m_test;
343
+ z->c = z->l - m_test1;
350
344
  }
351
- { int ret = slice_del(z); /* delete, line 96 */
345
+ { int ret = slice_del(z);
352
346
  if (ret < 0) return ret;
353
347
  }
354
- z->B[0] = 1; /* set e_found, line 97 */
348
+ z->I[2] = 1;
355
349
  { int ret = r_undouble(z);
356
- if (ret == 0) return 0; /* call undouble, line 98 */
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 == 0) return 0; /* call R1, line 102 */
365
- if (ret < 0) return ret;
357
+ if (ret <= 0) return ret;
366
358
  }
367
- { int m1 = z->l - z->c; (void)m1; /* and, line 102 */
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; /* not, line 102 */
371
- if (!(eq_s_b(z, 3, s_14))) goto lab0;
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); /* delete, line 102 */
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 == 0) return 0; /* call undouble, line 103 */
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; /* do, line 107 */
390
- z->ket = z->c; /* [, line 108 */
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); /* substring, line 108 */
383
+ among_var = find_among_b(z, a_3, 5);
393
384
  if (!(among_var)) goto lab0;
394
- z->bra = z->c; /* ], line 108 */
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; /* call R1, line 110 */
389
+ if (ret == 0) goto lab0;
400
390
  if (ret < 0) return ret;
401
391
  }
402
- { int ret = slice_from_s(z, 4, s_15); /* <-, line 110 */
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; /* call en_ending, line 113 */
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; /* call R1, line 116 */
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); /* delete, line 116 */
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; /* do, line 120 */
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; /* do, line 122 */
435
- z->ket = z->c; /* [, line 122 */
436
- if (!(eq_s_b(z, 4, s_16))) goto lab2;
437
- z->bra = z->c; /* ], line 122 */
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 lab2; /* call R2, line 122 */
427
+ if (ret == 0) goto lab1;
440
428
  if (ret < 0) return ret;
441
429
  }
442
- { int m4 = z->l - z->c; (void)m4; /* not, line 122 */
443
- if (!(eq_s_b(z, 1, s_17))) goto lab3;
444
- goto lab2;
445
- lab3:
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); /* delete, line 122 */
437
+ { int ret = slice_del(z);
449
438
  if (ret < 0) return ret;
450
439
  }
451
- z->ket = z->c; /* [, line 123 */
452
- if (!(eq_s_b(z, 2, s_18))) goto lab2;
453
- z->bra = z->c; /* ], line 123 */
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 lab2; /* call en_ending, line 123 */
444
+ if (ret == 0) goto lab1;
456
445
  if (ret < 0) return ret;
457
446
  }
458
- lab2:
447
+ lab1:
459
448
  z->c = z->l - m3;
460
449
  }
461
- { int m5 = z->l - z->c; (void)m5; /* do, line 126 */
462
- z->ket = z->c; /* [, line 127 */
463
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((264336 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab4;
464
- among_var = find_among_b(z, a_4, 6); /* substring, line 127 */
465
- if (!(among_var)) goto lab4;
466
- z->bra = z->c; /* ], line 127 */
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 lab4; /* call R2, line 129 */
459
+ if (ret == 0) goto lab3;
472
460
  if (ret < 0) return ret;
473
461
  }
474
- { int ret = slice_del(z); /* delete, line 129 */
462
+ { int ret = slice_del(z);
475
463
  if (ret < 0) return ret;
476
464
  }
477
- { int m6 = z->l - z->c; (void)m6; /* or, line 130 */
478
- z->ket = z->c; /* [, line 130 */
479
- if (!(eq_s_b(z, 2, s_19))) goto lab6;
480
- z->bra = z->c; /* ], line 130 */
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 lab6; /* call R2, line 130 */
470
+ if (ret == 0) goto lab5;
483
471
  if (ret < 0) return ret;
484
472
  }
485
- { int m7 = z->l - z->c; (void)m7; /* not, line 130 */
486
- if (!(eq_s_b(z, 1, s_20))) goto lab7;
487
- goto lab6;
488
- lab7:
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); /* delete, line 130 */
480
+ { int ret = slice_del(z);
492
481
  if (ret < 0) return ret;
493
482
  }
494
- goto lab5;
495
- lab6:
483
+ goto lab4;
484
+ lab5:
496
485
  z->c = z->l - m6;
497
486
  { int ret = r_undouble(z);
498
- if (ret == 0) goto lab4; /* call undouble, line 130 */
487
+ if (ret == 0) goto lab3;
499
488
  if (ret < 0) return ret;
500
489
  }
501
490
  }
502
- lab5:
491
+ lab4:
503
492
  break;
504
493
  case 2:
505
494
  { int ret = r_R2(z);
506
- if (ret == 0) goto lab4; /* call R2, line 133 */
495
+ if (ret == 0) goto lab3;
507
496
  if (ret < 0) return ret;
508
497
  }
509
- { int m8 = z->l - z->c; (void)m8; /* not, line 133 */
510
- if (!(eq_s_b(z, 1, s_21))) goto lab8;
511
- goto lab4;
512
- lab8:
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); /* delete, line 133 */
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 lab4; /* call R2, line 136 */
511
+ if (ret == 0) goto lab3;
522
512
  if (ret < 0) return ret;
523
513
  }
524
- { int ret = slice_del(z); /* delete, line 136 */
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 lab4; /* call e_ending, line 136 */
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 lab4; /* call R2, line 139 */
524
+ if (ret == 0) goto lab3;
535
525
  if (ret < 0) return ret;
536
526
  }
537
- { int ret = slice_del(z); /* delete, line 139 */
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 lab4; /* call R2, line 142 */
533
+ if (ret == 0) goto lab3;
544
534
  if (ret < 0) return ret;
545
535
  }
546
- if (!(z->B[0])) goto lab4; /* Boolean test e_found, line 142 */
547
- { int ret = slice_del(z); /* delete, line 142 */
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
- lab4:
542
+ lab3:
553
543
  z->c = z->l - m5;
554
544
  }
555
- { int m9 = z->l - z->c; (void)m9; /* do, line 146 */
556
- if (out_grouping_b_U(z, g_v_I, 73, 232, 0)) goto lab9;
557
- { int m_test = z->l - z->c; /* test, line 148 */
558
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((2129954 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab9;
559
- if (!(find_among_b(z, a_5, 4))) goto lab9; /* among, line 149 */
560
- if (out_grouping_b_U(z, g_v, 97, 232, 0)) goto lab9;
561
- z->c = z->l - m_test;
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; /* [, line 152 */
564
- { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
565
- if (ret < 0) goto lab9;
566
- z->c = ret; /* next, line 152 */
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; /* ], line 152 */
569
- { int ret = slice_del(z); /* delete, line 152 */
558
+ z->bra = z->c;
559
+ { int ret = slice_del(z);
570
560
  if (ret < 0) return ret;
571
561
  }
572
- lab9:
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; /* do, line 159 */
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; /* do, line 160 */
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; /* backwards, line 161 */
581
+ z->lb = z->c; z->c = z->l;
596
582
 
597
- { int m3 = z->l - z->c; (void)m3; /* do, line 162 */
598
- { int ret = r_standard_suffix(z);
599
- if (ret == 0) goto lab2; /* call standard_suffix, line 162 */
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 c4 = z->c; /* do, line 163 */
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
- lab3:
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, 2, 1); }
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