ferret 0.11.6 → 0.11.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. data/README +10 -22
  2. data/RELEASE_CHANGES +137 -0
  3. data/RELEASE_NOTES +60 -0
  4. data/Rakefile +379 -274
  5. data/TODO +100 -8
  6. data/bin/ferret-browser +0 -0
  7. data/ext/BZLIB_blocksort.c +1094 -0
  8. data/ext/BZLIB_bzlib.c +1578 -0
  9. data/ext/BZLIB_compress.c +672 -0
  10. data/ext/BZLIB_crctable.c +104 -0
  11. data/ext/BZLIB_decompress.c +626 -0
  12. data/ext/BZLIB_huffman.c +205 -0
  13. data/ext/BZLIB_randtable.c +84 -0
  14. data/ext/{api.c → STEMMER_api.c} +7 -10
  15. data/ext/{libstemmer.c → STEMMER_libstemmer.c} +3 -2
  16. data/ext/{stem_ISO_8859_1_danish.c → STEMMER_stem_ISO_8859_1_danish.c} +123 -124
  17. data/ext/{stem_ISO_8859_1_dutch.c → STEMMER_stem_ISO_8859_1_dutch.c} +177 -188
  18. data/ext/STEMMER_stem_ISO_8859_1_english.c +1117 -0
  19. data/ext/{stem_ISO_8859_1_finnish.c → STEMMER_stem_ISO_8859_1_finnish.c} +276 -306
  20. data/ext/STEMMER_stem_ISO_8859_1_french.c +1246 -0
  21. data/ext/{stem_ISO_8859_1_german.c → STEMMER_stem_ISO_8859_1_german.c} +161 -170
  22. data/ext/STEMMER_stem_ISO_8859_1_hungarian.c +1230 -0
  23. data/ext/STEMMER_stem_ISO_8859_1_italian.c +1065 -0
  24. data/ext/STEMMER_stem_ISO_8859_1_norwegian.c +297 -0
  25. data/ext/{stem_ISO_8859_1_porter.c → STEMMER_stem_ISO_8859_1_porter.c} +263 -290
  26. data/ext/{stem_ISO_8859_1_portuguese.c → STEMMER_stem_ISO_8859_1_portuguese.c} +362 -380
  27. data/ext/STEMMER_stem_ISO_8859_1_spanish.c +1093 -0
  28. data/ext/STEMMER_stem_ISO_8859_1_swedish.c +307 -0
  29. data/ext/STEMMER_stem_ISO_8859_2_romanian.c +998 -0
  30. data/ext/{stem_KOI8_R_russian.c → STEMMER_stem_KOI8_R_russian.c} +244 -245
  31. data/ext/STEMMER_stem_UTF_8_danish.c +339 -0
  32. data/ext/{stem_UTF_8_dutch.c → STEMMER_stem_UTF_8_dutch.c} +192 -211
  33. data/ext/STEMMER_stem_UTF_8_english.c +1125 -0
  34. data/ext/{stem_UTF_8_finnish.c → STEMMER_stem_UTF_8_finnish.c} +284 -324
  35. data/ext/STEMMER_stem_UTF_8_french.c +1256 -0
  36. data/ext/{stem_UTF_8_german.c → STEMMER_stem_UTF_8_german.c} +170 -187
  37. data/ext/STEMMER_stem_UTF_8_hungarian.c +1234 -0
  38. data/ext/STEMMER_stem_UTF_8_italian.c +1073 -0
  39. data/ext/STEMMER_stem_UTF_8_norwegian.c +299 -0
  40. data/ext/{stem_UTF_8_porter.c → STEMMER_stem_UTF_8_porter.c} +271 -310
  41. data/ext/STEMMER_stem_UTF_8_portuguese.c +1023 -0
  42. data/ext/STEMMER_stem_UTF_8_romanian.c +1004 -0
  43. data/ext/STEMMER_stem_UTF_8_russian.c +694 -0
  44. data/ext/STEMMER_stem_UTF_8_spanish.c +1097 -0
  45. data/ext/STEMMER_stem_UTF_8_swedish.c +309 -0
  46. data/ext/STEMMER_stem_UTF_8_turkish.c +2205 -0
  47. data/ext/{utilities.c → STEMMER_utilities.c} +100 -68
  48. data/ext/analysis.c +276 -121
  49. data/ext/analysis.h +190 -143
  50. data/ext/api.h +3 -4
  51. data/ext/array.c +5 -3
  52. data/ext/array.h +52 -43
  53. data/ext/bitvector.c +38 -482
  54. data/ext/bitvector.h +446 -124
  55. data/ext/bzlib.h +282 -0
  56. data/ext/bzlib_private.h +503 -0
  57. data/ext/compound_io.c +23 -22
  58. data/ext/config.h +21 -11
  59. data/ext/document.c +43 -40
  60. data/ext/document.h +31 -21
  61. data/ext/except.c +20 -38
  62. data/ext/except.h +89 -76
  63. data/ext/extconf.rb +3 -2
  64. data/ext/ferret.c +49 -35
  65. data/ext/ferret.h +14 -11
  66. data/ext/field_index.c +262 -0
  67. data/ext/field_index.h +52 -0
  68. data/ext/filter.c +11 -10
  69. data/ext/fs_store.c +65 -47
  70. data/ext/global.c +245 -165
  71. data/ext/global.h +252 -54
  72. data/ext/hash.c +200 -243
  73. data/ext/hash.h +205 -163
  74. data/ext/hashset.c +118 -96
  75. data/ext/hashset.h +110 -82
  76. data/ext/header.h +19 -19
  77. data/ext/helper.c +11 -10
  78. data/ext/helper.h +14 -6
  79. data/ext/index.c +745 -366
  80. data/ext/index.h +503 -529
  81. data/ext/internal.h +1020 -0
  82. data/ext/lang.c +10 -0
  83. data/ext/lang.h +35 -15
  84. data/ext/mempool.c +5 -4
  85. data/ext/mempool.h +30 -22
  86. data/ext/modules.h +35 -7
  87. data/ext/multimapper.c +43 -2
  88. data/ext/multimapper.h +32 -23
  89. data/ext/posh.c +0 -0
  90. data/ext/posh.h +4 -38
  91. data/ext/priorityqueue.c +10 -12
  92. data/ext/priorityqueue.h +33 -21
  93. data/ext/q_boolean.c +22 -9
  94. data/ext/q_const_score.c +3 -2
  95. data/ext/q_filtered_query.c +15 -12
  96. data/ext/q_fuzzy.c +147 -135
  97. data/ext/q_match_all.c +3 -2
  98. data/ext/q_multi_term.c +28 -32
  99. data/ext/q_parser.c +451 -173
  100. data/ext/q_phrase.c +158 -79
  101. data/ext/q_prefix.c +16 -18
  102. data/ext/q_range.c +363 -31
  103. data/ext/q_span.c +130 -141
  104. data/ext/q_term.c +21 -21
  105. data/ext/q_wildcard.c +19 -23
  106. data/ext/r_analysis.c +369 -242
  107. data/ext/r_index.c +421 -434
  108. data/ext/r_qparser.c +142 -92
  109. data/ext/r_search.c +790 -407
  110. data/ext/r_store.c +44 -44
  111. data/ext/r_utils.c +264 -96
  112. data/ext/ram_store.c +29 -23
  113. data/ext/scanner.c +895 -0
  114. data/ext/scanner.h +36 -0
  115. data/ext/scanner_mb.c +6701 -0
  116. data/ext/scanner_utf8.c +4415 -0
  117. data/ext/search.c +210 -87
  118. data/ext/search.h +556 -488
  119. data/ext/similarity.c +17 -16
  120. data/ext/similarity.h +51 -44
  121. data/ext/sort.c +157 -354
  122. data/ext/stem_ISO_8859_1_hungarian.h +16 -0
  123. data/ext/stem_ISO_8859_2_romanian.h +16 -0
  124. data/ext/stem_UTF_8_hungarian.h +16 -0
  125. data/ext/stem_UTF_8_romanian.h +16 -0
  126. data/ext/stem_UTF_8_turkish.h +16 -0
  127. data/ext/stopwords.c +287 -278
  128. data/ext/store.c +57 -51
  129. data/ext/store.h +308 -286
  130. data/ext/symbol.c +10 -0
  131. data/ext/symbol.h +23 -0
  132. data/ext/term_vectors.c +14 -293
  133. data/ext/threading.h +22 -22
  134. data/ext/win32.h +12 -4
  135. data/lib/ferret.rb +2 -1
  136. data/lib/ferret/browser.rb +1 -1
  137. data/lib/ferret/field_symbol.rb +94 -0
  138. data/lib/ferret/index.rb +221 -34
  139. data/lib/ferret/number_tools.rb +6 -6
  140. data/lib/ferret/version.rb +3 -0
  141. data/test/{unit → long_running}/largefile/tc_largefile.rb +1 -1
  142. data/test/test_helper.rb +7 -2
  143. data/test/test_installed.rb +1 -0
  144. data/test/threading/thread_safety_index_test.rb +10 -1
  145. data/test/threading/thread_safety_read_write_test.rb +4 -7
  146. data/test/threading/thread_safety_test.rb +0 -0
  147. data/test/unit/analysis/tc_analyzer.rb +29 -27
  148. data/test/unit/analysis/tc_token_stream.rb +23 -16
  149. data/test/unit/index/tc_index.rb +116 -11
  150. data/test/unit/index/tc_index_reader.rb +27 -27
  151. data/test/unit/index/tc_index_writer.rb +10 -0
  152. data/test/unit/index/th_doc.rb +38 -21
  153. data/test/unit/search/tc_filter.rb +31 -10
  154. data/test/unit/search/tc_index_searcher.rb +6 -0
  155. data/test/unit/search/tm_searcher.rb +53 -1
  156. data/test/unit/store/tc_fs_store.rb +40 -2
  157. data/test/unit/store/tc_ram_store.rb +0 -0
  158. data/test/unit/store/tm_store.rb +0 -0
  159. data/test/unit/store/tm_store_lock.rb +7 -6
  160. data/test/unit/tc_field_symbol.rb +26 -0
  161. data/test/unit/ts_analysis.rb +0 -0
  162. data/test/unit/ts_index.rb +0 -0
  163. data/test/unit/ts_store.rb +0 -0
  164. data/test/unit/ts_utils.rb +0 -0
  165. data/test/unit/utils/tc_number_tools.rb +0 -0
  166. data/test/utils/content_generator.rb +226 -0
  167. metadata +262 -221
  168. data/ext/inc/lang.h +0 -48
  169. data/ext/inc/threading.h +0 -31
  170. data/ext/stem_ISO_8859_1_english.c +0 -1156
  171. data/ext/stem_ISO_8859_1_french.c +0 -1276
  172. data/ext/stem_ISO_8859_1_italian.c +0 -1091
  173. data/ext/stem_ISO_8859_1_norwegian.c +0 -296
  174. data/ext/stem_ISO_8859_1_spanish.c +0 -1119
  175. data/ext/stem_ISO_8859_1_swedish.c +0 -307
  176. data/ext/stem_UTF_8_danish.c +0 -344
  177. data/ext/stem_UTF_8_english.c +0 -1176
  178. data/ext/stem_UTF_8_french.c +0 -1296
  179. data/ext/stem_UTF_8_italian.c +0 -1113
  180. data/ext/stem_UTF_8_norwegian.c +0 -302
  181. data/ext/stem_UTF_8_portuguese.c +0 -1055
  182. data/ext/stem_UTF_8_russian.c +0 -709
  183. data/ext/stem_UTF_8_spanish.c +0 -1137
  184. data/ext/stem_UTF_8_swedish.c +0 -313
  185. data/lib/ferret_version.rb +0 -3
@@ -3,7 +3,13 @@
3
3
 
4
4
  #include "header.h"
5
5
 
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
6
9
  extern int finnish_UTF_8_stem(struct SN_env * z);
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
7
13
  static int r_tidy(struct SN_env * z);
8
14
  static int r_other_endings(struct SN_env * z);
9
15
  static int r_t_plural(struct SN_env * z);
@@ -15,22 +21,30 @@ static int r_possessive(struct SN_env * z);
15
21
  static int r_particle_etc(struct SN_env * z);
16
22
  static int r_R2(struct SN_env * z);
17
23
  static int r_mark_regions(struct SN_env * z);
24
+ #ifdef __cplusplus
25
+ extern "C" {
26
+ #endif
27
+
18
28
 
19
29
  extern struct SN_env * finnish_UTF_8_create_env(void);
20
30
  extern void finnish_UTF_8_close_env(struct SN_env * z);
21
31
 
22
- static symbol s_0_0[2] = { 'p', 'a' };
23
- static symbol s_0_1[3] = { 's', 't', 'i' };
24
- static symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
25
- static symbol s_0_3[3] = { 'h', 'a', 'n' };
26
- static symbol s_0_4[3] = { 'k', 'i', 'n' };
27
- static symbol s_0_5[4] = { 'h', 0xC3, 0xA4, 'n' };
28
- static symbol s_0_6[6] = { 'k', 0xC3, 0xA4, 0xC3, 0xA4, 'n' };
29
- static symbol s_0_7[2] = { 'k', 'o' };
30
- static symbol s_0_8[3] = { 'p', 0xC3, 0xA4 };
31
- static symbol s_0_9[3] = { 'k', 0xC3, 0xB6 };
32
-
33
- static struct among a_0[10] =
32
+
33
+ #ifdef __cplusplus
34
+ }
35
+ #endif
36
+ static const symbol s_0_0[2] = { 'p', 'a' };
37
+ static const symbol s_0_1[3] = { 's', 't', 'i' };
38
+ static const symbol s_0_2[4] = { 'k', 'a', 'a', 'n' };
39
+ static const symbol s_0_3[3] = { 'h', 'a', 'n' };
40
+ static const symbol s_0_4[3] = { 'k', 'i', 'n' };
41
+ static const symbol s_0_5[4] = { 'h', 0xC3, 0xA4, 'n' };
42
+ static const symbol s_0_6[6] = { 'k', 0xC3, 0xA4, 0xC3, 0xA4, 'n' };
43
+ static const symbol s_0_7[2] = { 'k', 'o' };
44
+ static const symbol s_0_8[3] = { 'p', 0xC3, 0xA4 };
45
+ static const symbol s_0_9[3] = { 'k', 0xC3, 0xB6 };
46
+
47
+ static const struct among a_0[10] =
34
48
  {
35
49
  /* 0 */ { 2, s_0_0, -1, 1, 0},
36
50
  /* 1 */ { 3, s_0_1, -1, 2, 0},
@@ -44,14 +58,14 @@ static struct among a_0[10] =
44
58
  /* 9 */ { 3, s_0_9, -1, 1, 0}
45
59
  };
46
60
 
47
- static symbol s_1_0[3] = { 'l', 'l', 'a' };
48
- static symbol s_1_1[2] = { 'n', 'a' };
49
- static symbol s_1_2[3] = { 's', 's', 'a' };
50
- static symbol s_1_3[2] = { 't', 'a' };
51
- static symbol s_1_4[3] = { 'l', 't', 'a' };
52
- static symbol s_1_5[3] = { 's', 't', 'a' };
61
+ static const symbol s_1_0[3] = { 'l', 'l', 'a' };
62
+ static const symbol s_1_1[2] = { 'n', 'a' };
63
+ static const symbol s_1_2[3] = { 's', 's', 'a' };
64
+ static const symbol s_1_3[2] = { 't', 'a' };
65
+ static const symbol s_1_4[3] = { 'l', 't', 'a' };
66
+ static const symbol s_1_5[3] = { 's', 't', 'a' };
53
67
 
54
- static struct among a_1[6] =
68
+ static const struct among a_1[6] =
55
69
  {
56
70
  /* 0 */ { 3, s_1_0, -1, -1, 0},
57
71
  /* 1 */ { 2, s_1_1, -1, -1, 0},
@@ -61,14 +75,14 @@ static struct among a_1[6] =
61
75
  /* 5 */ { 3, s_1_5, 3, -1, 0}
62
76
  };
63
77
 
64
- static symbol s_2_0[4] = { 'l', 'l', 0xC3, 0xA4 };
65
- static symbol s_2_1[3] = { 'n', 0xC3, 0xA4 };
66
- static symbol s_2_2[4] = { 's', 's', 0xC3, 0xA4 };
67
- static symbol s_2_3[3] = { 't', 0xC3, 0xA4 };
68
- static symbol s_2_4[4] = { 'l', 't', 0xC3, 0xA4 };
69
- static symbol s_2_5[4] = { 's', 't', 0xC3, 0xA4 };
78
+ static const symbol s_2_0[4] = { 'l', 'l', 0xC3, 0xA4 };
79
+ static const symbol s_2_1[3] = { 'n', 0xC3, 0xA4 };
80
+ static const symbol s_2_2[4] = { 's', 's', 0xC3, 0xA4 };
81
+ static const symbol s_2_3[3] = { 't', 0xC3, 0xA4 };
82
+ static const symbol s_2_4[4] = { 'l', 't', 0xC3, 0xA4 };
83
+ static const symbol s_2_5[4] = { 's', 't', 0xC3, 0xA4 };
70
84
 
71
- static struct among a_2[6] =
85
+ static const struct among a_2[6] =
72
86
  {
73
87
  /* 0 */ { 4, s_2_0, -1, -1, 0},
74
88
  /* 1 */ { 3, s_2_1, -1, -1, 0},
@@ -78,26 +92,26 @@ static struct among a_2[6] =
78
92
  /* 5 */ { 4, s_2_5, 3, -1, 0}
79
93
  };
80
94
 
81
- static symbol s_3_0[3] = { 'l', 'l', 'e' };
82
- static symbol s_3_1[3] = { 'i', 'n', 'e' };
95
+ static const symbol s_3_0[3] = { 'l', 'l', 'e' };
96
+ static const symbol s_3_1[3] = { 'i', 'n', 'e' };
83
97
 
84
- static struct among a_3[2] =
98
+ static const struct among a_3[2] =
85
99
  {
86
100
  /* 0 */ { 3, s_3_0, -1, -1, 0},
87
101
  /* 1 */ { 3, s_3_1, -1, -1, 0}
88
102
  };
89
103
 
90
- static symbol s_4_0[3] = { 'n', 's', 'a' };
91
- static symbol s_4_1[3] = { 'm', 'm', 'e' };
92
- static symbol s_4_2[3] = { 'n', 'n', 'e' };
93
- static symbol s_4_3[2] = { 'n', 'i' };
94
- static symbol s_4_4[2] = { 's', 'i' };
95
- static symbol s_4_5[2] = { 'a', 'n' };
96
- static symbol s_4_6[2] = { 'e', 'n' };
97
- static symbol s_4_7[3] = { 0xC3, 0xA4, 'n' };
98
- static symbol s_4_8[4] = { 'n', 's', 0xC3, 0xA4 };
99
-
100
- static struct among a_4[9] =
104
+ static const symbol s_4_0[3] = { 'n', 's', 'a' };
105
+ static const symbol s_4_1[3] = { 'm', 'm', 'e' };
106
+ static const symbol s_4_2[3] = { 'n', 'n', 'e' };
107
+ static const symbol s_4_3[2] = { 'n', 'i' };
108
+ static const symbol s_4_4[2] = { 's', 'i' };
109
+ static const symbol s_4_5[2] = { 'a', 'n' };
110
+ static const symbol s_4_6[2] = { 'e', 'n' };
111
+ static const symbol s_4_7[3] = { 0xC3, 0xA4, 'n' };
112
+ static const symbol s_4_8[4] = { 'n', 's', 0xC3, 0xA4 };
113
+
114
+ static const struct among a_4[9] =
101
115
  {
102
116
  /* 0 */ { 3, s_4_0, -1, 3, 0},
103
117
  /* 1 */ { 3, s_4_1, -1, 3, 0},
@@ -110,15 +124,15 @@ static struct among a_4[9] =
110
124
  /* 8 */ { 4, s_4_8, -1, 3, 0}
111
125
  };
112
126
 
113
- static symbol s_5_0[2] = { 'a', 'a' };
114
- static symbol s_5_1[2] = { 'e', 'e' };
115
- static symbol s_5_2[2] = { 'i', 'i' };
116
- static symbol s_5_3[2] = { 'o', 'o' };
117
- static symbol s_5_4[2] = { 'u', 'u' };
118
- static symbol s_5_5[4] = { 0xC3, 0xA4, 0xC3, 0xA4 };
119
- static symbol s_5_6[4] = { 0xC3, 0xB6, 0xC3, 0xB6 };
127
+ static const symbol s_5_0[2] = { 'a', 'a' };
128
+ static const symbol s_5_1[2] = { 'e', 'e' };
129
+ static const symbol s_5_2[2] = { 'i', 'i' };
130
+ static const symbol s_5_3[2] = { 'o', 'o' };
131
+ static const symbol s_5_4[2] = { 'u', 'u' };
132
+ static const symbol s_5_5[4] = { 0xC3, 0xA4, 0xC3, 0xA4 };
133
+ static const symbol s_5_6[4] = { 0xC3, 0xB6, 0xC3, 0xB6 };
120
134
 
121
- static struct among a_5[7] =
135
+ static const struct among a_5[7] =
122
136
  {
123
137
  /* 0 */ { 2, s_5_0, -1, -1, 0},
124
138
  /* 1 */ { 2, s_5_1, -1, -1, 0},
@@ -129,38 +143,38 @@ static struct among a_5[7] =
129
143
  /* 6 */ { 4, s_5_6, -1, -1, 0}
130
144
  };
131
145
 
132
- static symbol s_6_0[1] = { 'a' };
133
- static symbol s_6_1[3] = { 'l', 'l', 'a' };
134
- static symbol s_6_2[2] = { 'n', 'a' };
135
- static symbol s_6_3[3] = { 's', 's', 'a' };
136
- static symbol s_6_4[2] = { 't', 'a' };
137
- static symbol s_6_5[3] = { 'l', 't', 'a' };
138
- static symbol s_6_6[3] = { 's', 't', 'a' };
139
- static symbol s_6_7[3] = { 't', 't', 'a' };
140
- static symbol s_6_8[3] = { 'l', 'l', 'e' };
141
- static symbol s_6_9[3] = { 'i', 'n', 'e' };
142
- static symbol s_6_10[3] = { 'k', 's', 'i' };
143
- static symbol s_6_11[1] = { 'n' };
144
- static symbol s_6_12[3] = { 'h', 'a', 'n' };
145
- static symbol s_6_13[3] = { 'd', 'e', 'n' };
146
- static symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
147
- static symbol s_6_15[3] = { 'h', 'e', 'n' };
148
- static symbol s_6_16[4] = { 't', 't', 'e', 'n' };
149
- static symbol s_6_17[3] = { 'h', 'i', 'n' };
150
- static symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
151
- static symbol s_6_19[3] = { 'h', 'o', 'n' };
152
- static symbol s_6_20[4] = { 'h', 0xC3, 0xA4, 'n' };
153
- static symbol s_6_21[4] = { 'h', 0xC3, 0xB6, 'n' };
154
- static symbol s_6_22[2] = { 0xC3, 0xA4 };
155
- static symbol s_6_23[4] = { 'l', 'l', 0xC3, 0xA4 };
156
- static symbol s_6_24[3] = { 'n', 0xC3, 0xA4 };
157
- static symbol s_6_25[4] = { 's', 's', 0xC3, 0xA4 };
158
- static symbol s_6_26[3] = { 't', 0xC3, 0xA4 };
159
- static symbol s_6_27[4] = { 'l', 't', 0xC3, 0xA4 };
160
- static symbol s_6_28[4] = { 's', 't', 0xC3, 0xA4 };
161
- static symbol s_6_29[4] = { 't', 't', 0xC3, 0xA4 };
162
-
163
- static struct among a_6[30] =
146
+ static const symbol s_6_0[1] = { 'a' };
147
+ static const symbol s_6_1[3] = { 'l', 'l', 'a' };
148
+ static const symbol s_6_2[2] = { 'n', 'a' };
149
+ static const symbol s_6_3[3] = { 's', 's', 'a' };
150
+ static const symbol s_6_4[2] = { 't', 'a' };
151
+ static const symbol s_6_5[3] = { 'l', 't', 'a' };
152
+ static const symbol s_6_6[3] = { 's', 't', 'a' };
153
+ static const symbol s_6_7[3] = { 't', 't', 'a' };
154
+ static const symbol s_6_8[3] = { 'l', 'l', 'e' };
155
+ static const symbol s_6_9[3] = { 'i', 'n', 'e' };
156
+ static const symbol s_6_10[3] = { 'k', 's', 'i' };
157
+ static const symbol s_6_11[1] = { 'n' };
158
+ static const symbol s_6_12[3] = { 'h', 'a', 'n' };
159
+ static const symbol s_6_13[3] = { 'd', 'e', 'n' };
160
+ static const symbol s_6_14[4] = { 's', 'e', 'e', 'n' };
161
+ static const symbol s_6_15[3] = { 'h', 'e', 'n' };
162
+ static const symbol s_6_16[4] = { 't', 't', 'e', 'n' };
163
+ static const symbol s_6_17[3] = { 'h', 'i', 'n' };
164
+ static const symbol s_6_18[4] = { 's', 'i', 'i', 'n' };
165
+ static const symbol s_6_19[3] = { 'h', 'o', 'n' };
166
+ static const symbol s_6_20[4] = { 'h', 0xC3, 0xA4, 'n' };
167
+ static const symbol s_6_21[4] = { 'h', 0xC3, 0xB6, 'n' };
168
+ static const symbol s_6_22[2] = { 0xC3, 0xA4 };
169
+ static const symbol s_6_23[4] = { 'l', 'l', 0xC3, 0xA4 };
170
+ static const symbol s_6_24[3] = { 'n', 0xC3, 0xA4 };
171
+ static const symbol s_6_25[4] = { 's', 's', 0xC3, 0xA4 };
172
+ static const symbol s_6_26[3] = { 't', 0xC3, 0xA4 };
173
+ static const symbol s_6_27[4] = { 'l', 't', 0xC3, 0xA4 };
174
+ static const symbol s_6_28[4] = { 's', 't', 0xC3, 0xA4 };
175
+ static const symbol s_6_29[4] = { 't', 't', 0xC3, 0xA4 };
176
+
177
+ static const struct among a_6[30] =
164
178
  {
165
179
  /* 0 */ { 1, s_6_0, -1, 8, 0},
166
180
  /* 1 */ { 3, s_6_1, 0, -1, 0},
@@ -194,22 +208,22 @@ static struct among a_6[30] =
194
208
  /* 29 */ { 4, s_6_29, 26, 9, 0}
195
209
  };
196
210
 
197
- static symbol s_7_0[3] = { 'e', 'j', 'a' };
198
- static symbol s_7_1[3] = { 'm', 'm', 'a' };
199
- static symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
200
- static symbol s_7_3[3] = { 'm', 'p', 'a' };
201
- static symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
202
- static symbol s_7_5[3] = { 'm', 'm', 'i' };
203
- static symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
204
- static symbol s_7_7[3] = { 'm', 'p', 'i' };
205
- static symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
206
- static symbol s_7_9[4] = { 'e', 'j', 0xC3, 0xA4 };
207
- static symbol s_7_10[4] = { 'm', 'm', 0xC3, 0xA4 };
208
- static symbol s_7_11[5] = { 'i', 'm', 'm', 0xC3, 0xA4 };
209
- static symbol s_7_12[4] = { 'm', 'p', 0xC3, 0xA4 };
210
- static symbol s_7_13[5] = { 'i', 'm', 'p', 0xC3, 0xA4 };
211
-
212
- static struct among a_7[14] =
211
+ static const symbol s_7_0[3] = { 'e', 'j', 'a' };
212
+ static const symbol s_7_1[3] = { 'm', 'm', 'a' };
213
+ static const symbol s_7_2[4] = { 'i', 'm', 'm', 'a' };
214
+ static const symbol s_7_3[3] = { 'm', 'p', 'a' };
215
+ static const symbol s_7_4[4] = { 'i', 'm', 'p', 'a' };
216
+ static const symbol s_7_5[3] = { 'm', 'm', 'i' };
217
+ static const symbol s_7_6[4] = { 'i', 'm', 'm', 'i' };
218
+ static const symbol s_7_7[3] = { 'm', 'p', 'i' };
219
+ static const symbol s_7_8[4] = { 'i', 'm', 'p', 'i' };
220
+ static const symbol s_7_9[4] = { 'e', 'j', 0xC3, 0xA4 };
221
+ static const symbol s_7_10[4] = { 'm', 'm', 0xC3, 0xA4 };
222
+ static const symbol s_7_11[5] = { 'i', 'm', 'm', 0xC3, 0xA4 };
223
+ static const symbol s_7_12[4] = { 'm', 'p', 0xC3, 0xA4 };
224
+ static const symbol s_7_13[5] = { 'i', 'm', 'p', 0xC3, 0xA4 };
225
+
226
+ static const struct among a_7[14] =
213
227
  {
214
228
  /* 0 */ { 3, s_7_0, -1, -1, 0},
215
229
  /* 1 */ { 3, s_7_1, -1, 1, 0},
@@ -227,98 +241,68 @@ static struct among a_7[14] =
227
241
  /* 13 */ { 5, s_7_13, 12, -1, 0}
228
242
  };
229
243
 
230
- static symbol s_8_0[1] = { 'i' };
231
- static symbol s_8_1[1] = { 'j' };
244
+ static const symbol s_8_0[1] = { 'i' };
245
+ static const symbol s_8_1[1] = { 'j' };
232
246
 
233
- static struct among a_8[2] =
247
+ static const struct among a_8[2] =
234
248
  {
235
249
  /* 0 */ { 1, s_8_0, -1, -1, 0},
236
250
  /* 1 */ { 1, s_8_1, -1, -1, 0}
237
251
  };
238
252
 
239
- static symbol s_9_0[3] = { 'm', 'm', 'a' };
240
- static symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
253
+ static const symbol s_9_0[3] = { 'm', 'm', 'a' };
254
+ static const symbol s_9_1[4] = { 'i', 'm', 'm', 'a' };
241
255
 
242
- static struct among a_9[2] =
256
+ static const struct among a_9[2] =
243
257
  {
244
258
  /* 0 */ { 3, s_9_0, -1, 1, 0},
245
259
  /* 1 */ { 4, s_9_1, 0, -1, 0}
246
260
  };
247
261
 
248
- static unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
249
-
250
- static unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
251
-
252
- static unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
253
-
254
- static unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
255
-
256
- static symbol s_0[] = { 'k' };
257
- static symbol s_1[] = { 'k', 's', 'e' };
258
- static symbol s_2[] = { 'k', 's', 'i' };
259
- static symbol s_3[] = { 'i' };
260
- static symbol s_4[] = { 'a' };
261
- static symbol s_5[] = { 'e' };
262
- static symbol s_6[] = { 'i' };
263
- static symbol s_7[] = { 'o' };
264
- static symbol s_8[] = { 0xC3, 0xA4 };
265
- static symbol s_9[] = { 0xC3, 0xB6 };
266
- static symbol s_10[] = { 'i', 'e' };
267
- static symbol s_11[] = { 'e' };
268
- static symbol s_12[] = { 'p', 'o' };
269
- static symbol s_13[] = { 't' };
270
- static symbol s_14[] = { 'p', 'o' };
271
- static symbol s_15[] = { 'j' };
272
- static symbol s_16[] = { 'o' };
273
- static symbol s_17[] = { 'u' };
274
- static symbol s_18[] = { 'o' };
275
- static symbol s_19[] = { 'j' };
262
+ static const unsigned char g_AEI[] = { 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8 };
263
+
264
+ static const unsigned char g_V1[] = { 17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
265
+
266
+ static const unsigned char g_V2[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
267
+
268
+ static const unsigned char g_particle_end[] = { 17, 97, 24, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32 };
269
+
270
+ static const symbol s_0[] = { 'k' };
271
+ static const symbol s_1[] = { 'k', 's', 'e' };
272
+ static const symbol s_2[] = { 'k', 's', 'i' };
273
+ static const symbol s_3[] = { 'i' };
274
+ static const symbol s_4[] = { 'a' };
275
+ static const symbol s_5[] = { 'e' };
276
+ static const symbol s_6[] = { 'i' };
277
+ static const symbol s_7[] = { 'o' };
278
+ static const symbol s_8[] = { 0xC3, 0xA4 };
279
+ static const symbol s_9[] = { 0xC3, 0xB6 };
280
+ static const symbol s_10[] = { 'i', 'e' };
281
+ static const symbol s_11[] = { 'e' };
282
+ static const symbol s_12[] = { 'p', 'o' };
283
+ static const symbol s_13[] = { 't' };
284
+ static const symbol s_14[] = { 'p', 'o' };
285
+ static const symbol s_15[] = { 'j' };
286
+ static const symbol s_16[] = { 'o' };
287
+ static const symbol s_17[] = { 'u' };
288
+ static const symbol s_18[] = { 'o' };
289
+ static const symbol s_19[] = { 'j' };
276
290
 
277
291
  static int r_mark_regions(struct SN_env * z) {
278
292
  z->I[0] = z->l;
279
293
  z->I[1] = z->l;
280
- while(1) { /* goto, line 46 */
281
- int c = z->c;
282
- if (!(in_grouping_U(z, g_V1, 97, 246))) goto lab0;
283
- z->c = c;
284
- break;
285
- lab0:
286
- z->c = c;
287
- { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
288
- if (c < 0) return 0;
289
- z->c = c; /* goto, line 46 */
290
- }
291
- }
292
- while(1) { /* gopast, line 46 */
293
- if (!(out_grouping_U(z, g_V1, 97, 246))) goto lab1;
294
- break;
295
- lab1:
296
- { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
297
- if (c < 0) return 0;
298
- z->c = c; /* gopast, line 46 */
299
- }
294
+ if (out_grouping_U(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 46 */
295
+ { /* gopast */ /* non V1, line 46 */
296
+ int ret = in_grouping_U(z, g_V1, 97, 246, 1);
297
+ if (ret < 0) return 0;
298
+ z->c += ret;
300
299
  }
301
300
  z->I[0] = z->c; /* setmark p1, line 46 */
302
- while(1) { /* goto, line 47 */
303
- int c = z->c;
304
- if (!(in_grouping_U(z, g_V1, 97, 246))) goto lab2;
305
- z->c = c;
306
- break;
307
- lab2:
308
- z->c = c;
309
- { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
310
- if (c < 0) return 0;
311
- z->c = c; /* goto, line 47 */
312
- }
313
- }
314
- while(1) { /* gopast, line 47 */
315
- if (!(out_grouping_U(z, g_V1, 97, 246))) goto lab3;
316
- break;
317
- lab3:
318
- { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
319
- if (c < 0) return 0;
320
- z->c = c; /* gopast, line 47 */
321
- }
301
+ if (out_grouping_U(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* grouping V1, line 47 */
302
+ { /* gopast */ /* non V1, line 47 */
303
+ int ret = in_grouping_U(z, g_V1, 97, 246, 1);
304
+ if (ret < 0) return 0;
305
+ z->c += ret;
322
306
  }
323
307
  z->I[1] = z->c; /* setmark p2, line 47 */
324
308
  return 1;
@@ -331,22 +315,22 @@ static int r_R2(struct SN_env * z) {
331
315
 
332
316
  static int r_particle_etc(struct SN_env * z) {
333
317
  int among_var;
334
- { int m3; /* setlimit, line 55 */
335
- int m = z->l - z->c; (void) m;
318
+ { int mlimit; /* setlimit, line 55 */
319
+ int m1 = z->l - z->c; (void)m1;
336
320
  if (z->c < z->I[0]) return 0;
337
321
  z->c = z->I[0]; /* tomark, line 55 */
338
- m3 = z->lb; z->lb = z->c;
339
- z->c = z->l - m;
322
+ mlimit = z->lb; z->lb = z->c;
323
+ z->c = z->l - m1;
340
324
  z->ket = z->c; /* [, line 55 */
341
325
  among_var = find_among_b(z, a_0, 10); /* substring, line 55 */
342
- if (!(among_var)) { z->lb = m3; return 0; }
326
+ if (!(among_var)) { z->lb = mlimit; return 0; }
343
327
  z->bra = z->c; /* ], line 55 */
344
- z->lb = m3;
328
+ z->lb = mlimit;
345
329
  }
346
330
  switch(among_var) {
347
331
  case 0: return 0;
348
332
  case 1:
349
- if (!(in_grouping_b_U(z, g_particle_end, 97, 246))) return 0;
333
+ if (in_grouping_b_U(z, g_particle_end, 97, 246, 0)) return 0;
350
334
  break;
351
335
  case 2:
352
336
  { int ret = r_R2(z);
@@ -355,8 +339,7 @@ static int r_particle_etc(struct SN_env * z) {
355
339
  }
356
340
  break;
357
341
  }
358
- { int ret;
359
- ret = slice_del(z); /* delete, line 66 */
342
+ { int ret = slice_del(z); /* delete, line 66 */
360
343
  if (ret < 0) return ret;
361
344
  }
362
345
  return 1;
@@ -364,69 +347,65 @@ static int r_particle_etc(struct SN_env * z) {
364
347
 
365
348
  static int r_possessive(struct SN_env * z) {
366
349
  int among_var;
367
- { int m3; /* setlimit, line 69 */
368
- int m = z->l - z->c; (void) m;
350
+ { int mlimit; /* setlimit, line 69 */
351
+ int m1 = z->l - z->c; (void)m1;
369
352
  if (z->c < z->I[0]) return 0;
370
353
  z->c = z->I[0]; /* tomark, line 69 */
371
- m3 = z->lb; z->lb = z->c;
372
- z->c = z->l - m;
354
+ mlimit = z->lb; z->lb = z->c;
355
+ z->c = z->l - m1;
373
356
  z->ket = z->c; /* [, line 69 */
374
357
  among_var = find_among_b(z, a_4, 9); /* substring, line 69 */
375
- if (!(among_var)) { z->lb = m3; return 0; }
358
+ if (!(among_var)) { z->lb = mlimit; return 0; }
376
359
  z->bra = z->c; /* ], line 69 */
377
- z->lb = m3;
360
+ z->lb = mlimit;
378
361
  }
379
362
  switch(among_var) {
380
363
  case 0: return 0;
381
364
  case 1:
382
- { int m = z->l - z->c; (void) m; /* not, line 72 */
365
+ { int m2 = z->l - z->c; (void)m2; /* not, line 72 */
383
366
  if (!(eq_s_b(z, 1, s_0))) goto lab0;
384
367
  return 0;
385
368
  lab0:
386
- z->c = z->l - m;
369
+ z->c = z->l - m2;
387
370
  }
388
- { int ret;
389
- ret = slice_del(z); /* delete, line 72 */
371
+ { int ret = slice_del(z); /* delete, line 72 */
390
372
  if (ret < 0) return ret;
391
373
  }
392
374
  break;
393
375
  case 2:
394
- { int ret;
395
- ret = slice_del(z); /* delete, line 74 */
376
+ { int ret = slice_del(z); /* delete, line 74 */
396
377
  if (ret < 0) return ret;
397
378
  }
398
379
  z->ket = z->c; /* [, line 74 */
399
380
  if (!(eq_s_b(z, 3, s_1))) return 0;
400
381
  z->bra = z->c; /* ], line 74 */
401
- { int ret;
402
- ret = slice_from_s(z, 3, s_2); /* <-, line 74 */
382
+ { int ret = slice_from_s(z, 3, s_2); /* <-, line 74 */
403
383
  if (ret < 0) return ret;
404
384
  }
405
385
  break;
406
386
  case 3:
407
- { int ret;
408
- ret = slice_del(z); /* delete, line 78 */
387
+ { int ret = slice_del(z); /* delete, line 78 */
409
388
  if (ret < 0) return ret;
410
389
  }
411
390
  break;
412
391
  case 4:
392
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
413
393
  if (!(find_among_b(z, a_1, 6))) return 0; /* among, line 81 */
414
- { int ret;
415
- ret = slice_del(z); /* delete, line 81 */
394
+ { int ret = slice_del(z); /* delete, line 81 */
416
395
  if (ret < 0) return ret;
417
396
  }
418
397
  break;
419
398
  case 5:
399
+ if (z->c - 2 <= z->lb || z->p[z->c - 1] != 164) return 0;
420
400
  if (!(find_among_b(z, a_2, 6))) return 0; /* among, line 83 */
421
- { int ret;
422
- ret = slice_del(z); /* delete, line 84 */
401
+ { int ret = slice_del(z); /* delete, line 84 */
423
402
  if (ret < 0) return ret;
424
403
  }
425
404
  break;
426
405
  case 6:
406
+ if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
427
407
  if (!(find_among_b(z, a_3, 2))) return 0; /* among, line 86 */
428
- { int ret;
429
- ret = slice_del(z); /* delete, line 86 */
408
+ { int ret = slice_del(z); /* delete, line 86 */
430
409
  if (ret < 0) return ret;
431
410
  }
432
411
  break;
@@ -441,23 +420,23 @@ static int r_LONG(struct SN_env * z) {
441
420
 
442
421
  static int r_VI(struct SN_env * z) {
443
422
  if (!(eq_s_b(z, 1, s_3))) return 0;
444
- if (!(in_grouping_b_U(z, g_V2, 97, 246))) return 0;
423
+ if (in_grouping_b_U(z, g_V2, 97, 246, 0)) return 0;
445
424
  return 1;
446
425
  }
447
426
 
448
427
  static int r_case_ending(struct SN_env * z) {
449
428
  int among_var;
450
- { int m3; /* setlimit, line 96 */
451
- int m = z->l - z->c; (void) m;
429
+ { int mlimit; /* setlimit, line 96 */
430
+ int m1 = z->l - z->c; (void)m1;
452
431
  if (z->c < z->I[0]) return 0;
453
432
  z->c = z->I[0]; /* tomark, line 96 */
454
- m3 = z->lb; z->lb = z->c;
455
- z->c = z->l - m;
433
+ mlimit = z->lb; z->lb = z->c;
434
+ z->c = z->l - m1;
456
435
  z->ket = z->c; /* [, line 96 */
457
436
  among_var = find_among_b(z, a_6, 30); /* substring, line 96 */
458
- if (!(among_var)) { z->lb = m3; return 0; }
437
+ if (!(among_var)) { z->lb = mlimit; return 0; }
459
438
  z->bra = z->c; /* ], line 96 */
460
- z->lb = m3;
439
+ z->lb = mlimit;
461
440
  }
462
441
  switch(among_var) {
463
442
  case 0: return 0;
@@ -480,23 +459,23 @@ static int r_case_ending(struct SN_env * z) {
480
459
  if (!(eq_s_b(z, 2, s_9))) return 0;
481
460
  break;
482
461
  case 7:
483
- { int m = z->l - z->c; (void) m; /* try, line 111 */
484
- { int m = z->l - z->c; (void) m; /* and, line 113 */
485
- { int m = z->l - z->c; (void) m; /* or, line 112 */
462
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 111 */
463
+ { int m2 = z->l - z->c; (void)m2; /* and, line 113 */
464
+ { int m3 = z->l - z->c; (void)m3; /* or, line 112 */
486
465
  { int ret = r_LONG(z);
487
466
  if (ret == 0) goto lab2; /* call LONG, line 111 */
488
467
  if (ret < 0) return ret;
489
468
  }
490
469
  goto lab1;
491
470
  lab2:
492
- z->c = z->l - m;
493
- if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m; goto lab0; }
471
+ z->c = z->l - m3;
472
+ if (!(eq_s_b(z, 2, s_10))) { z->c = z->l - m_keep; goto lab0; }
494
473
  }
495
474
  lab1:
496
- z->c = z->l - m;
497
- { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
498
- if (c < 0) { z->c = z->l - m; goto lab0; }
499
- z->c = c; /* next, line 113 */
475
+ z->c = z->l - m2;
476
+ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
477
+ if (ret < 0) { z->c = z->l - m_keep; goto lab0; }
478
+ z->c = ret; /* next, line 113 */
500
479
  }
501
480
  }
502
481
  z->bra = z->c; /* ], line 113 */
@@ -505,15 +484,14 @@ static int r_case_ending(struct SN_env * z) {
505
484
  }
506
485
  break;
507
486
  case 8:
508
- if (!(in_grouping_b_U(z, g_V1, 97, 246))) return 0;
509
- if (!(out_grouping_b_U(z, g_V1, 97, 246))) return 0;
487
+ if (in_grouping_b_U(z, g_V1, 97, 246, 0)) return 0;
488
+ if (out_grouping_b_U(z, g_V1, 97, 246, 0)) return 0;
510
489
  break;
511
490
  case 9:
512
491
  if (!(eq_s_b(z, 1, s_11))) return 0;
513
492
  break;
514
493
  }
515
- { int ret;
516
- ret = slice_del(z); /* delete, line 138 */
494
+ { int ret = slice_del(z); /* delete, line 138 */
517
495
  if (ret < 0) return ret;
518
496
  }
519
497
  z->B[0] = 1; /* set ending_removed, line 139 */
@@ -522,50 +500,49 @@ static int r_case_ending(struct SN_env * z) {
522
500
 
523
501
  static int r_other_endings(struct SN_env * z) {
524
502
  int among_var;
525
- { int m3; /* setlimit, line 142 */
526
- int m = z->l - z->c; (void) m;
503
+ { int mlimit; /* setlimit, line 142 */
504
+ int m1 = z->l - z->c; (void)m1;
527
505
  if (z->c < z->I[1]) return 0;
528
506
  z->c = z->I[1]; /* tomark, line 142 */
529
- m3 = z->lb; z->lb = z->c;
530
- z->c = z->l - m;
507
+ mlimit = z->lb; z->lb = z->c;
508
+ z->c = z->l - m1;
531
509
  z->ket = z->c; /* [, line 142 */
532
510
  among_var = find_among_b(z, a_7, 14); /* substring, line 142 */
533
- if (!(among_var)) { z->lb = m3; return 0; }
511
+ if (!(among_var)) { z->lb = mlimit; return 0; }
534
512
  z->bra = z->c; /* ], line 142 */
535
- z->lb = m3;
513
+ z->lb = mlimit;
536
514
  }
537
515
  switch(among_var) {
538
516
  case 0: return 0;
539
517
  case 1:
540
- { int m = z->l - z->c; (void) m; /* not, line 146 */
518
+ { int m2 = z->l - z->c; (void)m2; /* not, line 146 */
541
519
  if (!(eq_s_b(z, 2, s_12))) goto lab0;
542
520
  return 0;
543
521
  lab0:
544
- z->c = z->l - m;
522
+ z->c = z->l - m2;
545
523
  }
546
524
  break;
547
525
  }
548
- { int ret;
549
- ret = slice_del(z); /* delete, line 151 */
526
+ { int ret = slice_del(z); /* delete, line 151 */
550
527
  if (ret < 0) return ret;
551
528
  }
552
529
  return 1;
553
530
  }
554
531
 
555
532
  static int r_i_plural(struct SN_env * z) {
556
- { int m3; /* setlimit, line 154 */
557
- int m = z->l - z->c; (void) m;
533
+ { int mlimit; /* setlimit, line 154 */
534
+ int m1 = z->l - z->c; (void)m1;
558
535
  if (z->c < z->I[0]) return 0;
559
536
  z->c = z->I[0]; /* tomark, line 154 */
560
- m3 = z->lb; z->lb = z->c;
561
- z->c = z->l - m;
537
+ mlimit = z->lb; z->lb = z->c;
538
+ z->c = z->l - m1;
562
539
  z->ket = z->c; /* [, line 154 */
563
- if (!(find_among_b(z, a_8, 2))) { z->lb = m3; return 0; } /* substring, line 154 */
540
+ if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit; return 0; }
541
+ if (!(find_among_b(z, a_8, 2))) { z->lb = mlimit; return 0; } /* substring, line 154 */
564
542
  z->bra = z->c; /* ], line 154 */
565
- z->lb = m3;
543
+ z->lb = mlimit;
566
544
  }
567
- { int ret;
568
- ret = slice_del(z); /* delete, line 158 */
545
+ { int ret = slice_del(z); /* delete, line 158 */
569
546
  if (ret < 0) return ret;
570
547
  }
571
548
  return 1;
@@ -573,230 +550,213 @@ static int r_i_plural(struct SN_env * z) {
573
550
 
574
551
  static int r_t_plural(struct SN_env * z) {
575
552
  int among_var;
576
- { int m3; /* setlimit, line 161 */
577
- int m = z->l - z->c; (void) m;
553
+ { int mlimit; /* setlimit, line 161 */
554
+ int m1 = z->l - z->c; (void)m1;
578
555
  if (z->c < z->I[0]) return 0;
579
556
  z->c = z->I[0]; /* tomark, line 161 */
580
- m3 = z->lb; z->lb = z->c;
581
- z->c = z->l - m;
557
+ mlimit = z->lb; z->lb = z->c;
558
+ z->c = z->l - m1;
582
559
  z->ket = z->c; /* [, line 162 */
583
- if (!(eq_s_b(z, 1, s_13))) { z->lb = m3; return 0; }
560
+ if (!(eq_s_b(z, 1, s_13))) { z->lb = mlimit; return 0; }
584
561
  z->bra = z->c; /* ], line 162 */
585
562
  { int m_test = z->l - z->c; /* test, line 162 */
586
- if (!(in_grouping_b_U(z, g_V1, 97, 246))) { z->lb = m3; return 0; }
563
+ if (in_grouping_b_U(z, g_V1, 97, 246, 0)) { z->lb = mlimit; return 0; }
587
564
  z->c = z->l - m_test;
588
565
  }
589
- { int ret;
590
- ret = slice_del(z); /* delete, line 163 */
566
+ { int ret = slice_del(z); /* delete, line 163 */
591
567
  if (ret < 0) return ret;
592
568
  }
593
- z->lb = m3;
569
+ z->lb = mlimit;
594
570
  }
595
- { int m3; /* setlimit, line 165 */
596
- int m = z->l - z->c; (void) m;
571
+ { int mlimit; /* setlimit, line 165 */
572
+ int m2 = z->l - z->c; (void)m2;
597
573
  if (z->c < z->I[1]) return 0;
598
574
  z->c = z->I[1]; /* tomark, line 165 */
599
- m3 = z->lb; z->lb = z->c;
600
- z->c = z->l - m;
575
+ mlimit = z->lb; z->lb = z->c;
576
+ z->c = z->l - m2;
601
577
  z->ket = z->c; /* [, line 165 */
578
+ if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit; return 0; }
602
579
  among_var = find_among_b(z, a_9, 2); /* substring, line 165 */
603
- if (!(among_var)) { z->lb = m3; return 0; }
580
+ if (!(among_var)) { z->lb = mlimit; return 0; }
604
581
  z->bra = z->c; /* ], line 165 */
605
- z->lb = m3;
582
+ z->lb = mlimit;
606
583
  }
607
584
  switch(among_var) {
608
585
  case 0: return 0;
609
586
  case 1:
610
- { int m = z->l - z->c; (void) m; /* not, line 167 */
587
+ { int m3 = z->l - z->c; (void)m3; /* not, line 167 */
611
588
  if (!(eq_s_b(z, 2, s_14))) goto lab0;
612
589
  return 0;
613
590
  lab0:
614
- z->c = z->l - m;
591
+ z->c = z->l - m3;
615
592
  }
616
593
  break;
617
594
  }
618
- { int ret;
619
- ret = slice_del(z); /* delete, line 170 */
595
+ { int ret = slice_del(z); /* delete, line 170 */
620
596
  if (ret < 0) return ret;
621
597
  }
622
598
  return 1;
623
599
  }
624
600
 
625
601
  static int r_tidy(struct SN_env * z) {
626
- { int m3; /* setlimit, line 173 */
627
- int m = z->l - z->c; (void) m;
602
+ { int mlimit; /* setlimit, line 173 */
603
+ int m1 = z->l - z->c; (void)m1;
628
604
  if (z->c < z->I[0]) return 0;
629
605
  z->c = z->I[0]; /* tomark, line 173 */
630
- m3 = z->lb; z->lb = z->c;
631
- z->c = z->l - m;
632
- { int m = z->l - z->c; (void) m; /* do, line 174 */
633
- { int m = z->l - z->c; (void) m; /* and, line 174 */
606
+ mlimit = z->lb; z->lb = z->c;
607
+ z->c = z->l - m1;
608
+ { int m2 = z->l - z->c; (void)m2; /* do, line 174 */
609
+ { int m3 = z->l - z->c; (void)m3; /* and, line 174 */
634
610
  { int ret = r_LONG(z);
635
611
  if (ret == 0) goto lab0; /* call LONG, line 174 */
636
612
  if (ret < 0) return ret;
637
613
  }
638
- z->c = z->l - m;
614
+ z->c = z->l - m3;
639
615
  z->ket = z->c; /* [, line 174 */
640
- { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
641
- if (c < 0) goto lab0;
642
- z->c = c; /* next, line 174 */
616
+ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
617
+ if (ret < 0) goto lab0;
618
+ z->c = ret; /* next, line 174 */
643
619
  }
644
620
  z->bra = z->c; /* ], line 174 */
645
- { int ret;
646
- ret = slice_del(z); /* delete, line 174 */
621
+ { int ret = slice_del(z); /* delete, line 174 */
647
622
  if (ret < 0) return ret;
648
623
  }
649
624
  }
650
625
  lab0:
651
- z->c = z->l - m;
626
+ z->c = z->l - m2;
652
627
  }
653
- { int m = z->l - z->c; (void) m; /* do, line 175 */
628
+ { int m4 = z->l - z->c; (void)m4; /* do, line 175 */
654
629
  z->ket = z->c; /* [, line 175 */
655
- if (!(in_grouping_b_U(z, g_AEI, 97, 228))) goto lab1;
630
+ if (in_grouping_b_U(z, g_AEI, 97, 228, 0)) goto lab1;
656
631
  z->bra = z->c; /* ], line 175 */
657
- if (!(out_grouping_b_U(z, g_V1, 97, 246))) goto lab1;
658
- { int ret;
659
- ret = slice_del(z); /* delete, line 175 */
632
+ if (out_grouping_b_U(z, g_V1, 97, 246, 0)) goto lab1;
633
+ { int ret = slice_del(z); /* delete, line 175 */
660
634
  if (ret < 0) return ret;
661
635
  }
662
636
  lab1:
663
- z->c = z->l - m;
637
+ z->c = z->l - m4;
664
638
  }
665
- { int m = z->l - z->c; (void) m; /* do, line 176 */
639
+ { int m5 = z->l - z->c; (void)m5; /* do, line 176 */
666
640
  z->ket = z->c; /* [, line 176 */
667
641
  if (!(eq_s_b(z, 1, s_15))) goto lab2;
668
642
  z->bra = z->c; /* ], line 176 */
669
- { int m = z->l - z->c; (void) m; /* or, line 176 */
643
+ { int m6 = z->l - z->c; (void)m6; /* or, line 176 */
670
644
  if (!(eq_s_b(z, 1, s_16))) goto lab4;
671
645
  goto lab3;
672
646
  lab4:
673
- z->c = z->l - m;
647
+ z->c = z->l - m6;
674
648
  if (!(eq_s_b(z, 1, s_17))) goto lab2;
675
649
  }
676
650
  lab3:
677
- { int ret;
678
- ret = slice_del(z); /* delete, line 176 */
651
+ { int ret = slice_del(z); /* delete, line 176 */
679
652
  if (ret < 0) return ret;
680
653
  }
681
654
  lab2:
682
- z->c = z->l - m;
655
+ z->c = z->l - m5;
683
656
  }
684
- { int m = z->l - z->c; (void) m; /* do, line 177 */
657
+ { int m7 = z->l - z->c; (void)m7; /* do, line 177 */
685
658
  z->ket = z->c; /* [, line 177 */
686
659
  if (!(eq_s_b(z, 1, s_18))) goto lab5;
687
660
  z->bra = z->c; /* ], line 177 */
688
661
  if (!(eq_s_b(z, 1, s_19))) goto lab5;
689
- { int ret;
690
- ret = slice_del(z); /* delete, line 177 */
662
+ { int ret = slice_del(z); /* delete, line 177 */
691
663
  if (ret < 0) return ret;
692
664
  }
693
665
  lab5:
694
- z->c = z->l - m;
695
- }
696
- z->lb = m3;
697
- }
698
- while(1) { /* goto, line 179 */
699
- int m = z->l - z->c; (void) m;
700
- if (!(out_grouping_b_U(z, g_V1, 97, 246))) goto lab6;
701
- z->c = z->l - m;
702
- break;
703
- lab6:
704
- z->c = z->l - m;
705
- { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
706
- if (c < 0) return 0;
707
- z->c = c; /* goto, line 179 */
666
+ z->c = z->l - m7;
708
667
  }
668
+ z->lb = mlimit;
709
669
  }
670
+ if (in_grouping_b_U(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* non V1, line 179 */
710
671
  z->ket = z->c; /* [, line 179 */
711
- { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
712
- if (c < 0) return 0;
713
- z->c = c; /* next, line 179 */
672
+ { int ret = skip_utf8(z->p, z->c, z->lb, 0, -1);
673
+ if (ret < 0) return 0;
674
+ z->c = ret; /* next, line 179 */
714
675
  }
715
676
  z->bra = z->c; /* ], line 179 */
716
677
  z->S[0] = slice_to(z, z->S[0]); /* -> x, line 179 */
717
678
  if (z->S[0] == 0) return -1; /* -> x, line 179 */
718
679
  if (!(eq_v_b(z, z->S[0]))) return 0; /* name x, line 179 */
719
- { int ret;
720
- ret = slice_del(z); /* delete, line 179 */
680
+ { int ret = slice_del(z); /* delete, line 179 */
721
681
  if (ret < 0) return ret;
722
682
  }
723
683
  return 1;
724
684
  }
725
685
 
726
686
  extern int finnish_UTF_8_stem(struct SN_env * z) {
727
- { int c = z->c; /* do, line 185 */
687
+ { int c1 = z->c; /* do, line 185 */
728
688
  { int ret = r_mark_regions(z);
729
689
  if (ret == 0) goto lab0; /* call mark_regions, line 185 */
730
690
  if (ret < 0) return ret;
731
691
  }
732
692
  lab0:
733
- z->c = c;
693
+ z->c = c1;
734
694
  }
735
695
  z->B[0] = 0; /* unset ending_removed, line 186 */
736
696
  z->lb = z->c; z->c = z->l; /* backwards, line 187 */
737
697
 
738
- { int m = z->l - z->c; (void) m; /* do, line 188 */
698
+ { int m2 = z->l - z->c; (void)m2; /* do, line 188 */
739
699
  { int ret = r_particle_etc(z);
740
700
  if (ret == 0) goto lab1; /* call particle_etc, line 188 */
741
701
  if (ret < 0) return ret;
742
702
  }
743
703
  lab1:
744
- z->c = z->l - m;
704
+ z->c = z->l - m2;
745
705
  }
746
- { int m = z->l - z->c; (void) m; /* do, line 189 */
706
+ { int m3 = z->l - z->c; (void)m3; /* do, line 189 */
747
707
  { int ret = r_possessive(z);
748
708
  if (ret == 0) goto lab2; /* call possessive, line 189 */
749
709
  if (ret < 0) return ret;
750
710
  }
751
711
  lab2:
752
- z->c = z->l - m;
712
+ z->c = z->l - m3;
753
713
  }
754
- { int m = z->l - z->c; (void) m; /* do, line 190 */
714
+ { int m4 = z->l - z->c; (void)m4; /* do, line 190 */
755
715
  { int ret = r_case_ending(z);
756
716
  if (ret == 0) goto lab3; /* call case_ending, line 190 */
757
717
  if (ret < 0) return ret;
758
718
  }
759
719
  lab3:
760
- z->c = z->l - m;
720
+ z->c = z->l - m4;
761
721
  }
762
- { int m = z->l - z->c; (void) m; /* do, line 191 */
722
+ { int m5 = z->l - z->c; (void)m5; /* do, line 191 */
763
723
  { int ret = r_other_endings(z);
764
724
  if (ret == 0) goto lab4; /* call other_endings, line 191 */
765
725
  if (ret < 0) return ret;
766
726
  }
767
727
  lab4:
768
- z->c = z->l - m;
728
+ z->c = z->l - m5;
769
729
  }
770
- { int m = z->l - z->c; (void) m; /* or, line 192 */
730
+ { int m6 = z->l - z->c; (void)m6; /* or, line 192 */
771
731
  if (!(z->B[0])) goto lab6; /* Boolean test ending_removed, line 192 */
772
- { int m = z->l - z->c; (void) m; /* do, line 192 */
732
+ { int m7 = z->l - z->c; (void)m7; /* do, line 192 */
773
733
  { int ret = r_i_plural(z);
774
734
  if (ret == 0) goto lab7; /* call i_plural, line 192 */
775
735
  if (ret < 0) return ret;
776
736
  }
777
737
  lab7:
778
- z->c = z->l - m;
738
+ z->c = z->l - m7;
779
739
  }
780
740
  goto lab5;
781
741
  lab6:
782
- z->c = z->l - m;
783
- { int m = z->l - z->c; (void) m; /* do, line 192 */
742
+ z->c = z->l - m6;
743
+ { int m8 = z->l - z->c; (void)m8; /* do, line 192 */
784
744
  { int ret = r_t_plural(z);
785
745
  if (ret == 0) goto lab8; /* call t_plural, line 192 */
786
746
  if (ret < 0) return ret;
787
747
  }
788
748
  lab8:
789
- z->c = z->l - m;
749
+ z->c = z->l - m8;
790
750
  }
791
751
  }
792
752
  lab5:
793
- { int m = z->l - z->c; (void) m; /* do, line 193 */
753
+ { int m9 = z->l - z->c; (void)m9; /* do, line 193 */
794
754
  { int ret = r_tidy(z);
795
755
  if (ret == 0) goto lab9; /* call tidy, line 193 */
796
756
  if (ret < 0) return ret;
797
757
  }
798
758
  lab9:
799
- z->c = z->l - m;
759
+ z->c = z->l - m9;
800
760
  }
801
761
  z->c = z->lb;
802
762
  return 1;
@@ -804,5 +764,5 @@ lab5:
804
764
 
805
765
  extern struct SN_env * finnish_UTF_8_create_env(void) { return SN_create_env(1, 2, 1); }
806
766
 
807
- extern void finnish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z); }
767
+ extern void finnish_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 1); }
808
768