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.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +612 -612
  3. data/README.md +80 -44
  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_search.c +14 -2
  7. data/ext/isomorfeus_ferret_ext/frb_store.c +34 -5
  8. data/ext/isomorfeus_ferret_ext/frt_posh.h +11 -19
  9. data/ext/isomorfeus_ferret_ext/frt_q_parser.c +1844 -1911
  10. data/ext/isomorfeus_ferret_ext/frt_q_phrase.c +12 -15
  11. data/ext/isomorfeus_ferret_ext/frt_scanner.c +1 -0
  12. data/ext/isomorfeus_ferret_ext/frt_scanner_mb.c +1 -0
  13. data/ext/isomorfeus_ferret_ext/frt_scanner_utf8.c +1 -0
  14. data/ext/isomorfeus_ferret_ext/frt_search.h +1 -1
  15. data/ext/isomorfeus_ferret_ext/libstemmer.c +14 -11
  16. data/ext/isomorfeus_ferret_ext/libstemmer.h +4 -9
  17. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.c +1167 -0
  18. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_basque.h +6 -0
  19. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.c +1433 -0
  20. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_catalan.h +6 -0
  21. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.c +120 -143
  22. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_danish.h +1 -2
  23. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.c +217 -237
  24. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_dutch.h +1 -1
  25. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.c +377 -432
  26. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_english.h +1 -1
  27. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.c +298 -342
  28. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_finnish.h +1 -2
  29. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.c +530 -524
  30. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_french.h +1 -1
  31. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.c +201 -214
  32. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_german.h +1 -1
  33. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_hungarian.c +1 -1
  34. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.c +394 -0
  35. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_indonesian.h +6 -0
  36. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.c +457 -0
  37. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_irish.h +6 -0
  38. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.c +396 -439
  39. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_italian.h +1 -1
  40. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.c +104 -128
  41. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_norwegian.h +1 -1
  42. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.c +242 -273
  43. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_porter.h +1 -1
  44. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.c +406 -461
  45. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_portuguese.h +1 -2
  46. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.c +405 -456
  47. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_spanish.h +1 -1
  48. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.c +108 -126
  49. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_1_swedish.h +1 -1
  50. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.c +849 -0
  51. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_hungarian.h +6 -0
  52. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.c +373 -405
  53. data/ext/isomorfeus_ferret_ext/stem_ISO_8859_2_romanian.h +1 -1
  54. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.c +288 -305
  55. data/ext/isomorfeus_ferret_ext/stem_KOI8_R_russian.h +1 -1
  56. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.c +1651 -0
  57. data/ext/isomorfeus_ferret_ext/stem_UTF_8_arabic.h +6 -0
  58. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.c +546 -0
  59. data/ext/isomorfeus_ferret_ext/stem_UTF_8_armenian.h +6 -0
  60. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.c +1171 -0
  61. data/ext/isomorfeus_ferret_ext/stem_UTF_8_basque.h +6 -0
  62. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.c +1436 -0
  63. data/ext/isomorfeus_ferret_ext/stem_UTF_8_catalan.h +6 -0
  64. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.c +121 -141
  65. data/ext/isomorfeus_ferret_ext/stem_UTF_8_danish.h +1 -1
  66. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.c +221 -241
  67. data/ext/isomorfeus_ferret_ext/stem_UTF_8_dutch.h +1 -1
  68. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.c +381 -431
  69. data/ext/isomorfeus_ferret_ext/stem_UTF_8_english.h +1 -1
  70. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.c +300 -345
  71. data/ext/isomorfeus_ferret_ext/stem_UTF_8_finnish.h +1 -1
  72. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.c +518 -511
  73. data/ext/isomorfeus_ferret_ext/stem_UTF_8_french.h +1 -1
  74. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.c +201 -209
  75. data/ext/isomorfeus_ferret_ext/stem_UTF_8_german.h +1 -1
  76. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.c +3660 -0
  77. data/ext/isomorfeus_ferret_ext/stem_UTF_8_greek.h +6 -0
  78. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.c +309 -0
  79. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hindi.h +6 -0
  80. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.c +306 -671
  81. data/ext/isomorfeus_ferret_ext/stem_UTF_8_hungarian.h +1 -1
  82. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.c +394 -0
  83. data/ext/isomorfeus_ferret_ext/stem_UTF_8_indonesian.h +6 -0
  84. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.c +457 -0
  85. data/ext/isomorfeus_ferret_ext/stem_UTF_8_irish.h +6 -0
  86. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.c +400 -442
  87. data/ext/isomorfeus_ferret_ext/stem_UTF_8_italian.h +1 -1
  88. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.c +824 -0
  89. data/ext/isomorfeus_ferret_ext/stem_UTF_8_lithuanian.h +6 -0
  90. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.c +408 -0
  91. data/ext/isomorfeus_ferret_ext/stem_UTF_8_nepali.h +6 -0
  92. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.c +105 -127
  93. data/ext/isomorfeus_ferret_ext/stem_UTF_8_norwegian.h +1 -1
  94. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.c +245 -276
  95. data/ext/isomorfeus_ferret_ext/stem_UTF_8_porter.h +1 -1
  96. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.c +409 -464
  97. data/ext/isomorfeus_ferret_ext/stem_UTF_8_portuguese.h +1 -1
  98. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.c +376 -408
  99. data/ext/isomorfeus_ferret_ext/stem_UTF_8_romanian.h +1 -1
  100. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.c +272 -287
  101. data/ext/isomorfeus_ferret_ext/stem_UTF_8_russian.h +1 -1
  102. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.c +6530 -0
  103. data/ext/isomorfeus_ferret_ext/stem_UTF_8_serbian.h +6 -0
  104. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.c +407 -458
  105. data/ext/isomorfeus_ferret_ext/stem_UTF_8_spanish.h +1 -1
  106. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.c +110 -125
  107. data/ext/isomorfeus_ferret_ext/stem_UTF_8_swedish.h +1 -1
  108. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.c +1865 -0
  109. data/ext/isomorfeus_ferret_ext/stem_UTF_8_tamil.h +6 -0
  110. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.c +698 -806
  111. data/ext/isomorfeus_ferret_ext/stem_UTF_8_turkish.h +1 -1
  112. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.c +1220 -0
  113. data/ext/isomorfeus_ferret_ext/stem_UTF_8_yiddish.h +6 -0
  114. data/ext/isomorfeus_ferret_ext/stem_api.c +1 -9
  115. data/ext/isomorfeus_ferret_ext/stem_api.h +1 -3
  116. data/ext/isomorfeus_ferret_ext/stem_header.h +30 -26
  117. data/ext/isomorfeus_ferret_ext/stem_modules.h +113 -26
  118. data/ext/isomorfeus_ferret_ext/stem_modules.txt +18 -5
  119. data/ext/isomorfeus_ferret_ext/stem_utilities.c +167 -132
  120. data/ext/isomorfeus_ferret_ext/test.c +7 -1
  121. data/ext/isomorfeus_ferret_ext/test_search.c +0 -1
  122. data/lib/isomorfeus/ferret/index/index.rb +1 -1
  123. data/lib/isomorfeus/ferret/version.rb +1 -1
  124. metadata +43 -7
  125. 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
  extern struct SN_env * french_UTF_8_create_env(void);
4
4
  extern void french_UTF_8_close_env(struct SN_env * z);
@@ -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
 
@@ -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
- /* 0 */ { 0, 0, -1, 6, 0},
26
- /* 1 */ { 1, s_0_1, 0, 2, 0},
27
- /* 2 */ { 1, s_0_2, 0, 1, 0},
28
- /* 3 */ { 2, s_0_3, 0, 3, 0},
29
- /* 4 */ { 2, s_0_4, 0, 4, 0},
30
- /* 5 */ { 2, s_0_5, 0, 5, 0}
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
- /* 0 */ { 1, s_1_0, -1, 1, 0},
44
- /* 1 */ { 2, s_1_1, -1, 1, 0},
45
- /* 2 */ { 2, s_1_2, -1, 1, 0},
46
- /* 3 */ { 3, s_1_3, -1, 1, 0},
47
- /* 4 */ { 2, s_1_4, -1, 1, 0},
48
- /* 5 */ { 1, s_1_5, -1, 2, 0},
49
- /* 6 */ { 2, s_1_6, 5, 1, 0}
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
- /* 0 */ { 2, s_2_0, -1, 1, 0},
60
- /* 1 */ { 2, s_2_1, -1, 1, 0},
61
- /* 2 */ { 2, s_2_2, -1, 2, 0},
62
- /* 3 */ { 3, s_2_3, 2, 1, 0}
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
- /* 0 */ { 2, s_3_0, -1, 1, 0},
71
- /* 1 */ { 4, s_3_1, -1, 1, 0}
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
- /* 0 */ { 3, s_4_0, -1, 1, 0},
86
- /* 1 */ { 2, s_4_1, -1, 2, 0},
87
- /* 2 */ { 3, s_4_2, -1, 1, 0},
88
- /* 3 */ { 4, s_4_3, -1, 3, 0},
89
- /* 4 */ { 4, s_4_4, -1, 2, 0},
90
- /* 5 */ { 2, s_4_5, -1, 2, 0},
91
- /* 6 */ { 4, s_4_6, -1, 3, 0},
92
- /* 7 */ { 4, s_4_7, -1, 4, 0}
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[] = { 'u' };
104
- static const symbol s_3[] = { 'U' };
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[] = { 'Y' };
107
- static const symbol s_6[] = { 'y' };
108
- static const symbol s_7[] = { 'u' };
109
- static const symbol s_8[] = { 'a' };
110
- static const symbol s_9[] = { 'o' };
111
- static const symbol s_10[] = { 'u' };
112
- static const symbol s_11[] = { 'i', 'g' };
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 c_test = z->c; /* test, line 30 */
120
- while(1) { /* repeat, line 30 */
121
- int c1 = z->c;
122
- { int c2 = z->c; /* or, line 33 */
123
- z->bra = z->c; /* [, line 32 */
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; /* ], line 32 */
126
- { int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
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 = c2;
132
- { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
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; /* next, line 33 */
130
+ z->c = ret;
135
131
  }
136
132
  }
137
133
  lab1:
138
134
  continue;
139
135
  lab0:
140
- z->c = c1;
136
+ z->c = c2;
141
137
  break;
142
138
  }
143
- z->c = c_test;
139
+ z->c = c_test1;
144
140
  }
145
- while(1) { /* repeat, line 36 */
146
- int c3 = z->c;
147
- while(1) { /* goto, line 36 */
148
- int c4 = z->c;
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; /* [, line 37 */
151
- { int c5 = z->c; /* or, line 37 */
152
- if (!(eq_s(z, 1, s_2))) goto lab6;
153
- z->ket = z->c; /* ], line 37 */
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, s_3); /* <-, line 37 */
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 = c5;
161
- if (!(eq_s(z, 1, s_4))) goto lab4;
162
- z->ket = z->c; /* ], line 38 */
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, s_5); /* <-, line 38 */
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 = c4;
167
+ z->c = c5;
170
168
  break;
171
169
  lab4:
172
- z->c = c4;
173
- { int ret = skip_utf8(z->p, z->c, 0, z->l, 1);
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; /* goto, line 36 */
173
+ z->c = ret;
176
174
  }
177
175
  }
178
176
  continue;
179
177
  lab3:
180
- z->c = c3;
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[0] = z->l;
185
+ z->I[2] = z->l;
188
186
  z->I[1] = z->l;
189
- { int c_test = z->c; /* test, line 47 */
190
- { int ret = skip_utf8(z->p, z->c, 0, z->l, + 3);
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; /* hop, line 47 */
190
+ z->c = ret;
193
191
  }
194
- z->I[2] = z->c; /* setmark x, line 47 */
195
- z->c = c_test;
192
+ z->I[0] = z->c;
193
+ z->c = c_test1;
196
194
  }
197
- { /* gopast */ /* grouping v, line 49 */
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
- { /* gopast */ /* non v, line 49 */
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[0] = z->c; /* setmark p1, line 49 */
208
- /* try, line 50 */
209
- if (!(z->I[0] < z->I[2])) goto lab0;
210
- z->I[0] = z->I[2];
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
- { /* gopast */ /* grouping v, line 51 */
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
- { /* gopast */ /* non v, line 51 */
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; /* setmark p2, line 51 */
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) { /* repeat, line 55 */
226
+ while(1) {
229
227
  int c1 = z->c;
230
- z->bra = z->c; /* [, line 57 */
231
- among_var = find_among(z, a_0, 6); /* substring, line 57 */
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; /* ], line 57 */
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, s_6); /* <-, line 58 */
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, s_7); /* <-, line 59 */
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, s_8); /* <-, line 60 */
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, s_9); /* <-, line 61 */
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 = slice_from_s(z, 1, s_10); /* <-, line 62 */
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; /* next, line 63 */
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[0] <= z->c)) return 0;
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; /* do, line 74 */
289
- z->ket = z->c; /* [, line 75 */
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); /* substring, line 75 */
283
+ among_var = find_among_b(z, a_1, 7);
292
284
  if (!(among_var)) goto lab0;
293
- z->bra = z->c; /* ], line 75 */
285
+ z->bra = z->c;
294
286
  { int ret = r_R1(z);
295
- if (ret == 0) goto lab0; /* call R1, line 75 */
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); /* delete, line 77 */
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); /* delete, line 80 */
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 m2 = z->l - z->c; (void)m2; /* do, line 84 */
316
- z->ket = z->c; /* [, line 85 */
317
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
318
- among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
319
- if (!(among_var)) goto lab1;
320
- z->bra = z->c; /* ], line 85 */
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 lab1; /* call R1, line 85 */
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); /* delete, line 87 */
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 lab1;
334
- { int ret = skip_utf8(z->p, z->c, z->lb, z->l, - 3);
335
- if (ret < 0) goto lab1;
336
- z->c = ret; /* hop, line 90 */
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); /* delete, line 90 */
345
+ { int ret = slice_del(z);
339
346
  if (ret < 0) return ret;
340
347
  }
341
348
  break;
342
349
  }
343
- lab1:
344
- z->c = z->l - m2;
350
+ lab2:
351
+ z->c = z->l - m3;
345
352
  }
346
- { int m3 = z->l - z->c; (void)m3; /* do, line 94 */
347
- z->ket = z->c; /* [, line 95 */
348
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
349
- among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
350
- if (!(among_var)) goto lab2;
351
- z->bra = z->c; /* ], line 95 */
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 lab2; /* call R2, line 95 */
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); /* delete, line 97 */
365
+ { int ret = slice_del(z);
360
366
  if (ret < 0) return ret;
361
367
  }
362
- { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
363
- z->ket = z->c; /* [, line 98 */
364
- if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
365
- z->bra = z->c; /* ], line 98 */
366
- { int m4 = z->l - z->c; (void)m4; /* not, line 98 */
367
- if (!(eq_s_b(z, 1, s_12))) goto lab4;
368
- { z->c = z->l - m_keep; goto lab3; }
369
- lab4:
370
- z->c = z->l - m4;
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 - m_keep; goto lab3; } /* call R2, line 98 */
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); /* delete, line 98 */
383
+ { int ret = slice_del(z);
377
384
  if (ret < 0) return ret;
378
385
  }
379
- lab3:
386
+ lab4:
380
387
  ;
381
388
  }
382
389
  break;
383
390
  case 2:
384
- { int m5 = z->l - z->c; (void)m5; /* not, line 101 */
385
- if (!(eq_s_b(z, 1, s_13))) goto lab5;
386
- goto lab2;
387
- lab5:
388
- z->c = z->l - m5;
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); /* delete, line 101 */
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); /* delete, line 104 */
403
+ { int ret = slice_del(z);
396
404
  if (ret < 0) return ret;
397
405
  }
398
- { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
399
- z->ket = z->c; /* [, line 106 */
400
- { int m6 = z->l - z->c; (void)m6; /* or, line 106 */
401
- if (!(eq_s_b(z, 2, s_14))) goto lab8;
402
- goto lab7;
403
- lab8:
404
- z->c = z->l - m6;
405
- if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
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
- lab7:
408
- z->bra = z->c; /* ], line 106 */
415
+ lab8:
416
+ z->bra = z->c;
409
417
  { int ret = r_R1(z);
410
- if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
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); /* delete, line 106 */
421
+ { int ret = slice_del(z);
414
422
  if (ret < 0) return ret;
415
423
  }
416
- lab6:
424
+ lab7:
417
425
  ;
418
426
  }
419
427
  break;
420
428
  case 4:
421
- { int ret = slice_del(z); /* delete, line 110 */
429
+ { int ret = slice_del(z);
422
430
  if (ret < 0) return ret;
423
431
  }
424
- { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
425
- z->ket = z->c; /* [, line 112 */
426
- if (z->c - 1 <= z->lb || (z->p[z->c - 1] != 103 && z->p[z->c - 1] != 104)) { z->c = z->l - m_keep; goto lab9; }
427
- among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
428
- if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
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 - m_keep; goto lab9; } /* call R2, line 112 */
438
+ if (ret == 0) { z->c = z->l - m10; goto lab10; }
432
439
  if (ret < 0) return ret;
433
440
  }
434
- switch(among_var) {
435
- case 0: { z->c = z->l - m_keep; goto lab9; }
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
- lab9:
444
+ lab10:
443
445
  ;
444
446
  }
445
447
  break;
446
448
  }
447
- lab2:
448
- z->c = z->l - m3;
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; /* do, line 125 */
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; /* do, line 126 */
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; /* backwards, line 127 */
468
+ z->lb = z->c; z->c = z->l;
471
469
 
472
- { int m3 = z->l - z->c; (void)m3; /* do, line 128 */
473
- { int ret = r_standard_suffix(z);
474
- if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
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 c4 = z->c; /* do, line 129 */
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
- lab3:
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, 0); }
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