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_ISO_8859_1_create_env(void);
4
4
  extern void french_ISO_8859_1_close_env(struct SN_env * z);
@@ -1,8 +1,7 @@
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
 
5
-
6
5
  extern int german_ISO_8859_1_stem(struct SN_env * z);
7
6
 
8
7
  static int r_standard_suffix(struct SN_env * z);
@@ -23,12 +22,12 @@ static const symbol s_0_5[1] = { 0xFC };
23
22
 
24
23
  static const struct among a_0[6] =
25
24
  {
26
- /* 0 */ { 0, 0, -1, 6, 0},
27
- /* 1 */ { 1, s_0_1, 0, 2, 0},
28
- /* 2 */ { 1, s_0_2, 0, 1, 0},
29
- /* 3 */ { 1, s_0_3, 0, 3, 0},
30
- /* 4 */ { 1, s_0_4, 0, 4, 0},
31
- /* 5 */ { 1, 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
+ { 1, s_0_3, 0, 3, 0},
29
+ { 1, s_0_4, 0, 4, 0},
30
+ { 1, s_0_5, 0, 2, 0}
32
31
  };
33
32
 
34
33
  static const symbol s_1_0[1] = { 'e' };
@@ -41,13 +40,13 @@ static const symbol s_1_6[2] = { 'e', 's' };
41
40
 
42
41
  static const struct among a_1[7] =
43
42
  {
44
- /* 0 */ { 1, s_1_0, -1, 1, 0},
45
- /* 1 */ { 2, s_1_1, -1, 1, 0},
46
- /* 2 */ { 2, s_1_2, -1, 1, 0},
47
- /* 3 */ { 3, s_1_3, -1, 1, 0},
48
- /* 4 */ { 2, s_1_4, -1, 1, 0},
49
- /* 5 */ { 1, s_1_5, -1, 2, 0},
50
- /* 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}
51
50
  };
52
51
 
53
52
  static const symbol s_2_0[2] = { 'e', 'n' };
@@ -57,10 +56,10 @@ static const symbol s_2_3[3] = { 'e', 's', 't' };
57
56
 
58
57
  static const struct among a_2[4] =
59
58
  {
60
- /* 0 */ { 2, s_2_0, -1, 1, 0},
61
- /* 1 */ { 2, s_2_1, -1, 1, 0},
62
- /* 2 */ { 2, s_2_2, -1, 2, 0},
63
- /* 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}
64
63
  };
65
64
 
66
65
  static const symbol s_3_0[2] = { 'i', 'g' };
@@ -68,8 +67,8 @@ static const symbol s_3_1[4] = { 'l', 'i', 'c', 'h' };
68
67
 
69
68
  static const struct among a_3[2] =
70
69
  {
71
- /* 0 */ { 2, s_3_0, -1, 1, 0},
72
- /* 1 */ { 4, s_3_1, -1, 1, 0}
70
+ { 2, s_3_0, -1, 1, 0},
71
+ { 4, s_3_1, -1, 1, 0}
73
72
  };
74
73
 
75
74
  static const symbol s_4_0[3] = { 'e', 'n', 'd' };
@@ -83,14 +82,14 @@ static const symbol s_4_7[4] = { 'k', 'e', 'i', 't' };
83
82
 
84
83
  static const struct among a_4[8] =
85
84
  {
86
- /* 0 */ { 3, s_4_0, -1, 1, 0},
87
- /* 1 */ { 2, s_4_1, -1, 2, 0},
88
- /* 2 */ { 3, s_4_2, -1, 1, 0},
89
- /* 3 */ { 4, s_4_3, -1, 3, 0},
90
- /* 4 */ { 4, s_4_4, -1, 2, 0},
91
- /* 5 */ { 2, s_4_5, -1, 2, 0},
92
- /* 6 */ { 4, s_4_6, -1, 3, 0},
93
- /* 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}
94
93
  };
95
94
 
96
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 };
@@ -99,165 +98,155 @@ static const unsigned char g_s_ending[] = { 117, 30, 5 };
99
98
 
100
99
  static const unsigned char g_st_ending[] = { 117, 30, 4 };
101
100
 
102
- static const symbol s_0[] = { 0xDF };
103
- static const symbol s_1[] = { 's', 's' };
104
- static const symbol s_2[] = { 'u' };
105
- static const symbol s_3[] = { 'U' };
106
- static const symbol s_4[] = { 'y' };
107
- static const symbol s_5[] = { 'Y' };
108
- static const symbol s_6[] = { 'y' };
109
- static const symbol s_7[] = { 'u' };
110
- static const symbol s_8[] = { 'a' };
111
- static const symbol s_9[] = { 'o' };
112
- static const symbol s_10[] = { 'u' };
113
- static const symbol s_11[] = { 'i', 'g' };
114
- static const symbol s_12[] = { 'e' };
115
- static const symbol s_13[] = { 'e' };
116
- static const symbol s_14[] = { 'e', 'r' };
117
- static const symbol s_15[] = { 'e', 'n' };
101
+ static const symbol s_0[] = { 's', 's' };
102
+ static const symbol s_1[] = { 'U' };
103
+ static const symbol s_2[] = { 'Y' };
104
+ static const symbol s_3[] = { 'y' };
105
+ static const symbol s_4[] = { 'u' };
106
+ static const symbol s_5[] = { 'a' };
107
+ static const symbol s_6[] = { 'o' };
108
+ static const symbol s_7[] = { 'n', 'i', 's' };
109
+ static const symbol s_8[] = { 'i', 'g' };
110
+ static const symbol s_9[] = { 'e', 'r' };
111
+ static const symbol s_10[] = { 'e', 'n' };
118
112
 
119
113
  static int r_prelude(struct SN_env * z) {
120
- { int c_test = z->c; /* test, line 30 */
121
- while(1) { /* repeat, line 30 */
122
- int c1 = z->c;
123
- { int c2 = z->c; /* or, line 33 */
124
- z->bra = z->c; /* [, line 32 */
125
- if (!(eq_s(z, 1, s_0))) goto lab2;
126
- z->ket = z->c; /* ], line 32 */
127
- { int ret = slice_from_s(z, 2, s_1); /* <-, line 32 */
114
+ { int c_test1 = z->c;
115
+ while(1) {
116
+ int c2 = z->c;
117
+ { int c3 = z->c;
118
+ z->bra = z->c;
119
+ if (z->c == z->l || z->p[z->c] != 0xDF) goto lab2;
120
+ z->c++;
121
+ z->ket = z->c;
122
+ { int ret = slice_from_s(z, 2, s_0);
128
123
  if (ret < 0) return ret;
129
124
  }
130
125
  goto lab1;
131
126
  lab2:
132
- z->c = c2;
127
+ z->c = c3;
133
128
  if (z->c >= z->l) goto lab0;
134
- z->c++; /* next, line 33 */
129
+ z->c++;
135
130
  }
136
131
  lab1:
137
132
  continue;
138
133
  lab0:
139
- z->c = c1;
134
+ z->c = c2;
140
135
  break;
141
136
  }
142
- z->c = c_test;
137
+ z->c = c_test1;
143
138
  }
144
- while(1) { /* repeat, line 36 */
145
- int c3 = z->c;
146
- while(1) { /* goto, line 36 */
147
- int c4 = z->c;
139
+ while(1) {
140
+ int c4 = z->c;
141
+ while(1) {
142
+ int c5 = z->c;
148
143
  if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
149
- z->bra = z->c; /* [, line 37 */
150
- { int c5 = z->c; /* or, line 37 */
151
- if (!(eq_s(z, 1, s_2))) goto lab6;
152
- z->ket = z->c; /* ], line 37 */
144
+ z->bra = z->c;
145
+ { int c6 = z->c;
146
+ if (z->c == z->l || z->p[z->c] != 'u') goto lab6;
147
+ z->c++;
148
+ z->ket = z->c;
153
149
  if (in_grouping(z, g_v, 97, 252, 0)) goto lab6;
154
- { int ret = slice_from_s(z, 1, s_3); /* <-, line 37 */
150
+ { int ret = slice_from_s(z, 1, s_1);
155
151
  if (ret < 0) return ret;
156
152
  }
157
153
  goto lab5;
158
154
  lab6:
159
- z->c = c5;
160
- if (!(eq_s(z, 1, s_4))) goto lab4;
161
- z->ket = z->c; /* ], line 38 */
155
+ z->c = c6;
156
+ if (z->c == z->l || z->p[z->c] != 'y') goto lab4;
157
+ z->c++;
158
+ z->ket = z->c;
162
159
  if (in_grouping(z, g_v, 97, 252, 0)) goto lab4;
163
- { int ret = slice_from_s(z, 1, s_5); /* <-, line 38 */
160
+ { int ret = slice_from_s(z, 1, s_2);
164
161
  if (ret < 0) return ret;
165
162
  }
166
163
  }
167
164
  lab5:
168
- z->c = c4;
165
+ z->c = c5;
169
166
  break;
170
167
  lab4:
171
- z->c = c4;
168
+ z->c = c5;
172
169
  if (z->c >= z->l) goto lab3;
173
- z->c++; /* goto, line 36 */
170
+ z->c++;
174
171
  }
175
172
  continue;
176
173
  lab3:
177
- z->c = c3;
174
+ z->c = c4;
178
175
  break;
179
176
  }
180
177
  return 1;
181
178
  }
182
179
 
183
180
  static int r_mark_regions(struct SN_env * z) {
184
- z->I[0] = z->l;
181
+ z->I[2] = z->l;
185
182
  z->I[1] = z->l;
186
- { int c_test = z->c; /* test, line 47 */
187
- { int ret = z->c + 3;
188
- if (0 > ret || ret > z->l) return 0;
189
- z->c = ret; /* hop, line 47 */
190
- }
191
- z->I[2] = z->c; /* setmark x, line 47 */
192
- z->c = c_test;
183
+ { int c_test1 = z->c;
184
+ z->c = z->c + 3;
185
+ if (z->c > z->l) return 0;
186
+ z->I[0] = z->c;
187
+ z->c = c_test1;
193
188
  }
194
- { /* gopast */ /* grouping v, line 49 */
189
+ {
195
190
  int ret = out_grouping(z, g_v, 97, 252, 1);
196
191
  if (ret < 0) return 0;
197
192
  z->c += ret;
198
193
  }
199
- { /* gopast */ /* non v, line 49 */
194
+ {
200
195
  int ret = in_grouping(z, g_v, 97, 252, 1);
201
196
  if (ret < 0) return 0;
202
197
  z->c += ret;
203
198
  }
204
- z->I[0] = z->c; /* setmark p1, line 49 */
205
- /* try, line 50 */
206
- if (!(z->I[0] < z->I[2])) goto lab0;
207
- z->I[0] = z->I[2];
199
+ z->I[2] = z->c;
200
+
201
+ if (!(z->I[2] < z->I[0])) goto lab0;
202
+ z->I[2] = z->I[0];
208
203
  lab0:
209
- { /* gopast */ /* grouping v, line 51 */
204
+ {
210
205
  int ret = out_grouping(z, g_v, 97, 252, 1);
211
206
  if (ret < 0) return 0;
212
207
  z->c += ret;
213
208
  }
214
- { /* gopast */ /* non v, line 51 */
209
+ {
215
210
  int ret = in_grouping(z, g_v, 97, 252, 1);
216
211
  if (ret < 0) return 0;
217
212
  z->c += ret;
218
213
  }
219
- z->I[1] = z->c; /* setmark p2, line 51 */
214
+ z->I[1] = z->c;
220
215
  return 1;
221
216
  }
222
217
 
223
218
  static int r_postlude(struct SN_env * z) {
224
219
  int among_var;
225
- while(1) { /* repeat, line 55 */
220
+ while(1) {
226
221
  int c1 = z->c;
227
- z->bra = z->c; /* [, line 57 */
228
- among_var = find_among(z, a_0, 6); /* substring, line 57 */
222
+ z->bra = z->c;
223
+ among_var = find_among(z, a_0, 6);
229
224
  if (!(among_var)) goto lab0;
230
- z->ket = z->c; /* ], line 57 */
231
- switch(among_var) {
232
- case 0: goto lab0;
225
+ z->ket = z->c;
226
+ switch (among_var) {
233
227
  case 1:
234
- { int ret = slice_from_s(z, 1, s_6); /* <-, line 58 */
228
+ { int ret = slice_from_s(z, 1, s_3);
235
229
  if (ret < 0) return ret;
236
230
  }
237
231
  break;
238
232
  case 2:
239
- { int ret = slice_from_s(z, 1, s_7); /* <-, line 59 */
233
+ { int ret = slice_from_s(z, 1, s_4);
240
234
  if (ret < 0) return ret;
241
235
  }
242
236
  break;
243
237
  case 3:
244
- { int ret = slice_from_s(z, 1, s_8); /* <-, line 60 */
238
+ { int ret = slice_from_s(z, 1, s_5);
245
239
  if (ret < 0) return ret;
246
240
  }
247
241
  break;
248
242
  case 4:
249
- { int ret = slice_from_s(z, 1, s_9); /* <-, line 61 */
243
+ { int ret = slice_from_s(z, 1, s_6);
250
244
  if (ret < 0) return ret;
251
245
  }
252
246
  break;
253
247
  case 5:
254
- { int ret = slice_from_s(z, 1, s_10); /* <-, line 62 */
255
- if (ret < 0) return ret;
256
- }
257
- break;
258
- case 6:
259
248
  if (z->c >= z->l) goto lab0;
260
- z->c++; /* next, line 63 */
249
+ z->c++;
261
250
  break;
262
251
  }
263
252
  continue;
@@ -269,7 +258,7 @@ static int r_postlude(struct SN_env * z) {
269
258
  }
270
259
 
271
260
  static int r_R1(struct SN_env * z) {
272
- if (!(z->I[0] <= z->c)) return 0;
261
+ if (!(z->I[2] <= z->c)) return 0;
273
262
  return 1;
274
263
  }
275
264
 
@@ -280,26 +269,42 @@ static int r_R2(struct SN_env * z) {
280
269
 
281
270
  static int r_standard_suffix(struct SN_env * z) {
282
271
  int among_var;
283
- { int m1 = z->l - z->c; (void)m1; /* do, line 74 */
284
- z->ket = z->c; /* [, line 75 */
272
+ { int m1 = z->l - z->c; (void)m1;
273
+ z->ket = z->c;
285
274
  if (z->c <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((811040 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab0;
286
- among_var = find_among_b(z, a_1, 7); /* substring, line 75 */
275
+ among_var = find_among_b(z, a_1, 7);
287
276
  if (!(among_var)) goto lab0;
288
- z->bra = z->c; /* ], line 75 */
277
+ z->bra = z->c;
289
278
  { int ret = r_R1(z);
290
- if (ret == 0) goto lab0; /* call R1, line 75 */
279
+ if (ret == 0) goto lab0;
291
280
  if (ret < 0) return ret;
292
281
  }
293
- switch(among_var) {
294
- case 0: goto lab0;
282
+ switch (among_var) {
295
283
  case 1:
296
- { int ret = slice_del(z); /* delete, line 77 */
284
+ { int ret = slice_del(z);
297
285
  if (ret < 0) return ret;
298
286
  }
299
287
  break;
300
288
  case 2:
289
+ { int ret = slice_del(z);
290
+ if (ret < 0) return ret;
291
+ }
292
+ { int m2 = z->l - z->c; (void)m2;
293
+ z->ket = z->c;
294
+ if (z->c <= z->lb || z->p[z->c - 1] != 's') { z->c = z->l - m2; goto lab1; }
295
+ z->c--;
296
+ z->bra = z->c;
297
+ if (!(eq_s_b(z, 3, s_7))) { z->c = z->l - m2; goto lab1; }
298
+ { int ret = slice_del(z);
299
+ if (ret < 0) return ret;
300
+ }
301
+ lab1:
302
+ ;
303
+ }
304
+ break;
305
+ case 3:
301
306
  if (in_grouping_b(z, g_s_ending, 98, 116, 0)) goto lab0;
302
- { int ret = slice_del(z); /* delete, line 80 */
307
+ { int ret = slice_del(z);
303
308
  if (ret < 0) return ret;
304
309
  }
305
310
  break;
@@ -307,184 +312,166 @@ static int r_standard_suffix(struct SN_env * z) {
307
312
  lab0:
308
313
  z->c = z->l - m1;
309
314
  }
310
- { int m2 = z->l - z->c; (void)m2; /* do, line 84 */
311
- z->ket = z->c; /* [, line 85 */
312
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab1;
313
- among_var = find_among_b(z, a_2, 4); /* substring, line 85 */
314
- if (!(among_var)) goto lab1;
315
- z->bra = z->c; /* ], line 85 */
315
+ { int m3 = z->l - z->c; (void)m3;
316
+ z->ket = z->c;
317
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1327104 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
318
+ among_var = find_among_b(z, a_2, 4);
319
+ if (!(among_var)) goto lab2;
320
+ z->bra = z->c;
316
321
  { int ret = r_R1(z);
317
- if (ret == 0) goto lab1; /* call R1, line 85 */
322
+ if (ret == 0) goto lab2;
318
323
  if (ret < 0) return ret;
319
324
  }
320
- switch(among_var) {
321
- case 0: goto lab1;
325
+ switch (among_var) {
322
326
  case 1:
323
- { int ret = slice_del(z); /* delete, line 87 */
327
+ { int ret = slice_del(z);
324
328
  if (ret < 0) return ret;
325
329
  }
326
330
  break;
327
331
  case 2:
328
- if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab1;
329
- { int ret = z->c - 3;
330
- if (z->lb > ret || ret > z->l) goto lab1;
331
- z->c = ret; /* hop, line 90 */
332
- }
333
- { int ret = slice_del(z); /* delete, line 90 */
332
+ if (in_grouping_b(z, g_st_ending, 98, 116, 0)) goto lab2;
333
+ z->c = z->c - 3;
334
+ if (z->c < z->lb) goto lab2;
335
+ { int ret = slice_del(z);
334
336
  if (ret < 0) return ret;
335
337
  }
336
338
  break;
337
339
  }
338
- lab1:
339
- z->c = z->l - m2;
340
+ lab2:
341
+ z->c = z->l - m3;
340
342
  }
341
- { int m3 = z->l - z->c; (void)m3; /* do, line 94 */
342
- z->ket = z->c; /* [, line 95 */
343
- if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab2;
344
- among_var = find_among_b(z, a_4, 8); /* substring, line 95 */
345
- if (!(among_var)) goto lab2;
346
- z->bra = z->c; /* ], line 95 */
343
+ { int m4 = z->l - z->c; (void)m4;
344
+ z->ket = z->c;
345
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] >> 5 != 3 || !((1051024 >> (z->p[z->c - 1] & 0x1f)) & 1)) goto lab3;
346
+ among_var = find_among_b(z, a_4, 8);
347
+ if (!(among_var)) goto lab3;
348
+ z->bra = z->c;
347
349
  { int ret = r_R2(z);
348
- if (ret == 0) goto lab2; /* call R2, line 95 */
350
+ if (ret == 0) goto lab3;
349
351
  if (ret < 0) return ret;
350
352
  }
351
- switch(among_var) {
352
- case 0: goto lab2;
353
+ switch (among_var) {
353
354
  case 1:
354
- { int ret = slice_del(z); /* delete, line 97 */
355
+ { int ret = slice_del(z);
355
356
  if (ret < 0) return ret;
356
357
  }
357
- { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 98 */
358
- z->ket = z->c; /* [, line 98 */
359
- if (!(eq_s_b(z, 2, s_11))) { z->c = z->l - m_keep; goto lab3; }
360
- z->bra = z->c; /* ], line 98 */
361
- { int m4 = z->l - z->c; (void)m4; /* not, line 98 */
362
- if (!(eq_s_b(z, 1, s_12))) goto lab4;
363
- { z->c = z->l - m_keep; goto lab3; }
364
- lab4:
365
- z->c = z->l - m4;
358
+ { int m5 = z->l - z->c; (void)m5;
359
+ z->ket = z->c;
360
+ if (!(eq_s_b(z, 2, s_8))) { z->c = z->l - m5; goto lab4; }
361
+ z->bra = z->c;
362
+ { int m6 = z->l - z->c; (void)m6;
363
+ if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab5;
364
+ z->c--;
365
+ { z->c = z->l - m5; goto lab4; }
366
+ lab5:
367
+ z->c = z->l - m6;
366
368
  }
367
369
  { int ret = r_R2(z);
368
- if (ret == 0) { z->c = z->l - m_keep; goto lab3; } /* call R2, line 98 */
370
+ if (ret == 0) { z->c = z->l - m5; goto lab4; }
369
371
  if (ret < 0) return ret;
370
372
  }
371
- { int ret = slice_del(z); /* delete, line 98 */
373
+ { int ret = slice_del(z);
372
374
  if (ret < 0) return ret;
373
375
  }
374
- lab3:
376
+ lab4:
375
377
  ;
376
378
  }
377
379
  break;
378
380
  case 2:
379
- { int m5 = z->l - z->c; (void)m5; /* not, line 101 */
380
- if (!(eq_s_b(z, 1, s_13))) goto lab5;
381
- goto lab2;
382
- lab5:
383
- z->c = z->l - m5;
381
+ { int m7 = z->l - z->c; (void)m7;
382
+ if (z->c <= z->lb || z->p[z->c - 1] != 'e') goto lab6;
383
+ z->c--;
384
+ goto lab3;
385
+ lab6:
386
+ z->c = z->l - m7;
384
387
  }
385
- { int ret = slice_del(z); /* delete, line 101 */
388
+ { int ret = slice_del(z);
386
389
  if (ret < 0) return ret;
387
390
  }
388
391
  break;
389
392
  case 3:
390
- { int ret = slice_del(z); /* delete, line 104 */
393
+ { int ret = slice_del(z);
391
394
  if (ret < 0) return ret;
392
395
  }
393
- { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 105 */
394
- z->ket = z->c; /* [, line 106 */
395
- { int m6 = z->l - z->c; (void)m6; /* or, line 106 */
396
- if (!(eq_s_b(z, 2, s_14))) goto lab8;
397
- goto lab7;
398
- lab8:
399
- z->c = z->l - m6;
400
- if (!(eq_s_b(z, 2, s_15))) { z->c = z->l - m_keep; goto lab6; }
396
+ { int m8 = z->l - z->c; (void)m8;
397
+ z->ket = z->c;
398
+ { int m9 = z->l - z->c; (void)m9;
399
+ if (!(eq_s_b(z, 2, s_9))) goto lab9;
400
+ goto lab8;
401
+ lab9:
402
+ z->c = z->l - m9;
403
+ if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m8; goto lab7; }
401
404
  }
402
- lab7:
403
- z->bra = z->c; /* ], line 106 */
405
+ lab8:
406
+ z->bra = z->c;
404
407
  { int ret = r_R1(z);
405
- if (ret == 0) { z->c = z->l - m_keep; goto lab6; } /* call R1, line 106 */
408
+ if (ret == 0) { z->c = z->l - m8; goto lab7; }
406
409
  if (ret < 0) return ret;
407
410
  }
408
- { int ret = slice_del(z); /* delete, line 106 */
411
+ { int ret = slice_del(z);
409
412
  if (ret < 0) return ret;
410
413
  }
411
- lab6:
414
+ lab7:
412
415
  ;
413
416
  }
414
417
  break;
415
418
  case 4:
416
- { int ret = slice_del(z); /* delete, line 110 */
419
+ { int ret = slice_del(z);
417
420
  if (ret < 0) return ret;
418
421
  }
419
- { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
420
- z->ket = z->c; /* [, line 112 */
421
- 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; }
422
- among_var = find_among_b(z, a_3, 2); /* substring, line 112 */
423
- if (!(among_var)) { z->c = z->l - m_keep; goto lab9; }
424
- z->bra = z->c; /* ], line 112 */
422
+ { int m10 = z->l - z->c; (void)m10;
423
+ z->ket = z->c;
424
+ 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; }
425
+ if (!(find_among_b(z, a_3, 2))) { z->c = z->l - m10; goto lab10; }
426
+ z->bra = z->c;
425
427
  { int ret = r_R2(z);
426
- if (ret == 0) { z->c = z->l - m_keep; goto lab9; } /* call R2, line 112 */
428
+ if (ret == 0) { z->c = z->l - m10; goto lab10; }
427
429
  if (ret < 0) return ret;
428
430
  }
429
- switch(among_var) {
430
- case 0: { z->c = z->l - m_keep; goto lab9; }
431
- case 1:
432
- { int ret = slice_del(z); /* delete, line 114 */
433
- if (ret < 0) return ret;
434
- }
435
- break;
431
+ { int ret = slice_del(z);
432
+ if (ret < 0) return ret;
436
433
  }
437
- lab9:
434
+ lab10:
438
435
  ;
439
436
  }
440
437
  break;
441
438
  }
442
- lab2:
443
- z->c = z->l - m3;
439
+ lab3:
440
+ z->c = z->l - m4;
444
441
  }
445
442
  return 1;
446
443
  }
447
444
 
448
445
  extern int german_ISO_8859_1_stem(struct SN_env * z) {
449
- { int c1 = z->c; /* do, line 125 */
446
+ { int c1 = z->c;
450
447
  { int ret = r_prelude(z);
451
- if (ret == 0) goto lab0; /* call prelude, line 125 */
452
448
  if (ret < 0) return ret;
453
449
  }
454
- lab0:
455
450
  z->c = c1;
456
451
  }
457
- { int c2 = z->c; /* do, line 126 */
452
+ { int c2 = z->c;
458
453
  { int ret = r_mark_regions(z);
459
- if (ret == 0) goto lab1; /* call mark_regions, line 126 */
460
454
  if (ret < 0) return ret;
461
455
  }
462
- lab1:
463
456
  z->c = c2;
464
457
  }
465
- z->lb = z->c; z->c = z->l; /* backwards, line 127 */
458
+ z->lb = z->c; z->c = z->l;
466
459
 
467
- { int m3 = z->l - z->c; (void)m3; /* do, line 128 */
468
- { int ret = r_standard_suffix(z);
469
- if (ret == 0) goto lab2; /* call standard_suffix, line 128 */
470
- if (ret < 0) return ret;
471
- }
472
- lab2:
473
- z->c = z->l - m3;
460
+
461
+ { int ret = r_standard_suffix(z);
462
+ if (ret < 0) return ret;
474
463
  }
475
464
  z->c = z->lb;
476
- { int c4 = z->c; /* do, line 129 */
465
+ { int c3 = z->c;
477
466
  { int ret = r_postlude(z);
478
- if (ret == 0) goto lab3; /* call postlude, line 129 */
479
467
  if (ret < 0) return ret;
480
468
  }
481
- lab3:
482
- z->c = c4;
469
+ z->c = c3;
483
470
  }
484
471
  return 1;
485
472
  }
486
473
 
487
- extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3, 0); }
474
+ extern struct SN_env * german_ISO_8859_1_create_env(void) { return SN_create_env(0, 3); }
488
475
 
489
476
  extern void german_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 0); }
490
477