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_ISO_8859_1_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_ISO_8859_1_create_env(void);
20
30
  extern void finnish_ISO_8859_1_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[3] = { 'h', 0xE4, 'n' };
28
- static symbol s_0_6[4] = { 'k', 0xE4, 0xE4, 'n' };
29
- static symbol s_0_7[2] = { 'k', 'o' };
30
- static symbol s_0_8[2] = { 'p', 0xE4 };
31
- static symbol s_0_9[2] = { 'k', 0xF6 };
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[3] = { 'h', 0xE4, 'n' };
42
+ static const symbol s_0_6[4] = { 'k', 0xE4, 0xE4, 'n' };
43
+ static const symbol s_0_7[2] = { 'k', 'o' };
44
+ static const symbol s_0_8[2] = { 'p', 0xE4 };
45
+ static const symbol s_0_9[2] = { 'k', 0xF6 };
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 */ { 2, 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[3] = { 'l', 'l', 0xE4 };
65
- static symbol s_2_1[2] = { 'n', 0xE4 };
66
- static symbol s_2_2[3] = { 's', 's', 0xE4 };
67
- static symbol s_2_3[2] = { 't', 0xE4 };
68
- static symbol s_2_4[3] = { 'l', 't', 0xE4 };
69
- static symbol s_2_5[3] = { 's', 't', 0xE4 };
78
+ static const symbol s_2_0[3] = { 'l', 'l', 0xE4 };
79
+ static const symbol s_2_1[2] = { 'n', 0xE4 };
80
+ static const symbol s_2_2[3] = { 's', 's', 0xE4 };
81
+ static const symbol s_2_3[2] = { 't', 0xE4 };
82
+ static const symbol s_2_4[3] = { 'l', 't', 0xE4 };
83
+ static const symbol s_2_5[3] = { 's', 't', 0xE4 };
70
84
 
71
- static struct among a_2[6] =
85
+ static const struct among a_2[6] =
72
86
  {
73
87
  /* 0 */ { 3, s_2_0, -1, -1, 0},
74
88
  /* 1 */ { 2, s_2_1, -1, -1, 0},
@@ -78,26 +92,26 @@ static struct among a_2[6] =
78
92
  /* 5 */ { 3, 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[2] = { 0xE4, 'n' };
98
- static symbol s_4_8[3] = { 'n', 's', 0xE4 };
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[2] = { 0xE4, 'n' };
112
+ static const symbol s_4_8[3] = { 'n', 's', 0xE4 };
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 */ { 3, 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[2] = { 0xE4, 0xE4 };
119
- static symbol s_5_6[2] = { 0xF6, 0xF6 };
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[2] = { 0xE4, 0xE4 };
133
+ static const symbol s_5_6[2] = { 0xF6, 0xF6 };
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 */ { 2, 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[3] = { 'h', 0xE4, 'n' };
153
- static symbol s_6_21[3] = { 'h', 0xF6, 'n' };
154
- static symbol s_6_22[1] = { 0xE4 };
155
- static symbol s_6_23[3] = { 'l', 'l', 0xE4 };
156
- static symbol s_6_24[2] = { 'n', 0xE4 };
157
- static symbol s_6_25[3] = { 's', 's', 0xE4 };
158
- static symbol s_6_26[2] = { 't', 0xE4 };
159
- static symbol s_6_27[3] = { 'l', 't', 0xE4 };
160
- static symbol s_6_28[3] = { 's', 't', 0xE4 };
161
- static symbol s_6_29[3] = { 't', 't', 0xE4 };
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[3] = { 'h', 0xE4, 'n' };
167
+ static const symbol s_6_21[3] = { 'h', 0xF6, 'n' };
168
+ static const symbol s_6_22[1] = { 0xE4 };
169
+ static const symbol s_6_23[3] = { 'l', 'l', 0xE4 };
170
+ static const symbol s_6_24[2] = { 'n', 0xE4 };
171
+ static const symbol s_6_25[3] = { 's', 's', 0xE4 };
172
+ static const symbol s_6_26[2] = { 't', 0xE4 };
173
+ static const symbol s_6_27[3] = { 'l', 't', 0xE4 };
174
+ static const symbol s_6_28[3] = { 's', 't', 0xE4 };
175
+ static const symbol s_6_29[3] = { 't', 't', 0xE4 };
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 */ { 3, 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[3] = { 'e', 'j', 0xE4 };
207
- static symbol s_7_10[3] = { 'm', 'm', 0xE4 };
208
- static symbol s_7_11[4] = { 'i', 'm', 'm', 0xE4 };
209
- static symbol s_7_12[3] = { 'm', 'p', 0xE4 };
210
- static symbol s_7_13[4] = { 'i', 'm', 'p', 0xE4 };
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[3] = { 'e', 'j', 0xE4 };
221
+ static const symbol s_7_10[3] = { 'm', 'm', 0xE4 };
222
+ static const symbol s_7_11[4] = { 'i', 'm', 'm', 0xE4 };
223
+ static const symbol s_7_12[3] = { 'm', 'p', 0xE4 };
224
+ static const symbol s_7_13[4] = { 'i', 'm', 'p', 0xE4 };
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,90 +241,68 @@ static struct among a_7[14] =
227
241
  /* 13 */ { 4, 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[] = { 0xE4 };
265
- static symbol s_9[] = { 0xF6 };
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[] = { 0xE4 };
279
+ static const symbol s_9[] = { 0xF6 };
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(z, g_V1, 97, 246))) goto lab0;
283
- z->c = c;
284
- break;
285
- lab0:
286
- z->c = c;
287
- if (z->c >= z->l) return 0;
288
- z->c++; /* goto, line 46 */
289
- }
290
- while(1) { /* gopast, line 46 */
291
- if (!(out_grouping(z, g_V1, 97, 246))) goto lab1;
292
- break;
293
- lab1:
294
- if (z->c >= z->l) return 0;
295
- z->c++; /* gopast, line 46 */
294
+ if (out_grouping(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(z, g_V1, 97, 246, 1);
297
+ if (ret < 0) return 0;
298
+ z->c += ret;
296
299
  }
297
300
  z->I[0] = z->c; /* setmark p1, line 46 */
298
- while(1) { /* goto, line 47 */
299
- int c = z->c;
300
- if (!(in_grouping(z, g_V1, 97, 246))) goto lab2;
301
- z->c = c;
302
- break;
303
- lab2:
304
- z->c = c;
305
- if (z->c >= z->l) return 0;
306
- z->c++; /* goto, line 47 */
307
- }
308
- while(1) { /* gopast, line 47 */
309
- if (!(out_grouping(z, g_V1, 97, 246))) goto lab3;
310
- break;
311
- lab3:
312
- if (z->c >= z->l) return 0;
313
- z->c++; /* gopast, line 47 */
301
+ if (out_grouping(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(z, g_V1, 97, 246, 1);
304
+ if (ret < 0) return 0;
305
+ z->c += ret;
314
306
  }
315
307
  z->I[1] = z->c; /* setmark p2, line 47 */
316
308
  return 1;
@@ -323,22 +315,22 @@ static int r_R2(struct SN_env * z) {
323
315
 
324
316
  static int r_particle_etc(struct SN_env * z) {
325
317
  int among_var;
326
- { int m3; /* setlimit, line 55 */
327
- int m = z->l - z->c; (void) m;
318
+ { int mlimit; /* setlimit, line 55 */
319
+ int m1 = z->l - z->c; (void)m1;
328
320
  if (z->c < z->I[0]) return 0;
329
321
  z->c = z->I[0]; /* tomark, line 55 */
330
- m3 = z->lb; z->lb = z->c;
331
- z->c = z->l - m;
322
+ mlimit = z->lb; z->lb = z->c;
323
+ z->c = z->l - m1;
332
324
  z->ket = z->c; /* [, line 55 */
333
325
  among_var = find_among_b(z, a_0, 10); /* substring, line 55 */
334
- if (!(among_var)) { z->lb = m3; return 0; }
326
+ if (!(among_var)) { z->lb = mlimit; return 0; }
335
327
  z->bra = z->c; /* ], line 55 */
336
- z->lb = m3;
328
+ z->lb = mlimit;
337
329
  }
338
330
  switch(among_var) {
339
331
  case 0: return 0;
340
332
  case 1:
341
- if (!(in_grouping_b(z, g_particle_end, 97, 246))) return 0;
333
+ if (in_grouping_b(z, g_particle_end, 97, 246, 0)) return 0;
342
334
  break;
343
335
  case 2:
344
336
  { int ret = r_R2(z);
@@ -347,8 +339,7 @@ static int r_particle_etc(struct SN_env * z) {
347
339
  }
348
340
  break;
349
341
  }
350
- { int ret;
351
- ret = slice_del(z); /* delete, line 66 */
342
+ { int ret = slice_del(z); /* delete, line 66 */
352
343
  if (ret < 0) return ret;
353
344
  }
354
345
  return 1;
@@ -356,69 +347,65 @@ static int r_particle_etc(struct SN_env * z) {
356
347
 
357
348
  static int r_possessive(struct SN_env * z) {
358
349
  int among_var;
359
- { int m3; /* setlimit, line 69 */
360
- int m = z->l - z->c; (void) m;
350
+ { int mlimit; /* setlimit, line 69 */
351
+ int m1 = z->l - z->c; (void)m1;
361
352
  if (z->c < z->I[0]) return 0;
362
353
  z->c = z->I[0]; /* tomark, line 69 */
363
- m3 = z->lb; z->lb = z->c;
364
- z->c = z->l - m;
354
+ mlimit = z->lb; z->lb = z->c;
355
+ z->c = z->l - m1;
365
356
  z->ket = z->c; /* [, line 69 */
366
357
  among_var = find_among_b(z, a_4, 9); /* substring, line 69 */
367
- if (!(among_var)) { z->lb = m3; return 0; }
358
+ if (!(among_var)) { z->lb = mlimit; return 0; }
368
359
  z->bra = z->c; /* ], line 69 */
369
- z->lb = m3;
360
+ z->lb = mlimit;
370
361
  }
371
362
  switch(among_var) {
372
363
  case 0: return 0;
373
364
  case 1:
374
- { int m = z->l - z->c; (void) m; /* not, line 72 */
365
+ { int m2 = z->l - z->c; (void)m2; /* not, line 72 */
375
366
  if (!(eq_s_b(z, 1, s_0))) goto lab0;
376
367
  return 0;
377
368
  lab0:
378
- z->c = z->l - m;
369
+ z->c = z->l - m2;
379
370
  }
380
- { int ret;
381
- ret = slice_del(z); /* delete, line 72 */
371
+ { int ret = slice_del(z); /* delete, line 72 */
382
372
  if (ret < 0) return ret;
383
373
  }
384
374
  break;
385
375
  case 2:
386
- { int ret;
387
- ret = slice_del(z); /* delete, line 74 */
376
+ { int ret = slice_del(z); /* delete, line 74 */
388
377
  if (ret < 0) return ret;
389
378
  }
390
379
  z->ket = z->c; /* [, line 74 */
391
380
  if (!(eq_s_b(z, 3, s_1))) return 0;
392
381
  z->bra = z->c; /* ], line 74 */
393
- { int ret;
394
- ret = slice_from_s(z, 3, s_2); /* <-, line 74 */
382
+ { int ret = slice_from_s(z, 3, s_2); /* <-, line 74 */
395
383
  if (ret < 0) return ret;
396
384
  }
397
385
  break;
398
386
  case 3:
399
- { int ret;
400
- ret = slice_del(z); /* delete, line 78 */
387
+ { int ret = slice_del(z); /* delete, line 78 */
401
388
  if (ret < 0) return ret;
402
389
  }
403
390
  break;
404
391
  case 4:
392
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] != 97) return 0;
405
393
  if (!(find_among_b(z, a_1, 6))) return 0; /* among, line 81 */
406
- { int ret;
407
- ret = slice_del(z); /* delete, line 81 */
394
+ { int ret = slice_del(z); /* delete, line 81 */
408
395
  if (ret < 0) return ret;
409
396
  }
410
397
  break;
411
398
  case 5:
399
+ if (z->c - 1 <= z->lb || z->p[z->c - 1] != 228) return 0;
412
400
  if (!(find_among_b(z, a_2, 6))) return 0; /* among, line 83 */
413
- { int ret;
414
- ret = slice_del(z); /* delete, line 84 */
401
+ { int ret = slice_del(z); /* delete, line 84 */
415
402
  if (ret < 0) return ret;
416
403
  }
417
404
  break;
418
405
  case 6:
406
+ if (z->c - 2 <= z->lb || z->p[z->c - 1] != 101) return 0;
419
407
  if (!(find_among_b(z, a_3, 2))) return 0; /* among, line 86 */
420
- { int ret;
421
- ret = slice_del(z); /* delete, line 86 */
408
+ { int ret = slice_del(z); /* delete, line 86 */
422
409
  if (ret < 0) return ret;
423
410
  }
424
411
  break;
@@ -433,23 +420,23 @@ static int r_LONG(struct SN_env * z) {
433
420
 
434
421
  static int r_VI(struct SN_env * z) {
435
422
  if (!(eq_s_b(z, 1, s_3))) return 0;
436
- if (!(in_grouping_b(z, g_V2, 97, 246))) return 0;
423
+ if (in_grouping_b(z, g_V2, 97, 246, 0)) return 0;
437
424
  return 1;
438
425
  }
439
426
 
440
427
  static int r_case_ending(struct SN_env * z) {
441
428
  int among_var;
442
- { int m3; /* setlimit, line 96 */
443
- int m = z->l - z->c; (void) m;
429
+ { int mlimit; /* setlimit, line 96 */
430
+ int m1 = z->l - z->c; (void)m1;
444
431
  if (z->c < z->I[0]) return 0;
445
432
  z->c = z->I[0]; /* tomark, line 96 */
446
- m3 = z->lb; z->lb = z->c;
447
- z->c = z->l - m;
433
+ mlimit = z->lb; z->lb = z->c;
434
+ z->c = z->l - m1;
448
435
  z->ket = z->c; /* [, line 96 */
449
436
  among_var = find_among_b(z, a_6, 30); /* substring, line 96 */
450
- if (!(among_var)) { z->lb = m3; return 0; }
437
+ if (!(among_var)) { z->lb = mlimit; return 0; }
451
438
  z->bra = z->c; /* ], line 96 */
452
- z->lb = m3;
439
+ z->lb = mlimit;
453
440
  }
454
441
  switch(among_var) {
455
442
  case 0: return 0;
@@ -472,21 +459,21 @@ static int r_case_ending(struct SN_env * z) {
472
459
  if (!(eq_s_b(z, 1, s_9))) return 0;
473
460
  break;
474
461
  case 7:
475
- { int m = z->l - z->c; (void) m; /* try, line 111 */
476
- { int m = z->l - z->c; (void) m; /* and, line 113 */
477
- { 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 */
478
465
  { int ret = r_LONG(z);
479
466
  if (ret == 0) goto lab2; /* call LONG, line 111 */
480
467
  if (ret < 0) return ret;
481
468
  }
482
469
  goto lab1;
483
470
  lab2:
484
- z->c = z->l - m;
485
- 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; }
486
473
  }
487
474
  lab1:
488
- z->c = z->l - m;
489
- if (z->c <= z->lb) { z->c = z->l - m; goto lab0; }
475
+ z->c = z->l - m2;
476
+ if (z->c <= z->lb) { z->c = z->l - m_keep; goto lab0; }
490
477
  z->c--; /* next, line 113 */
491
478
  }
492
479
  z->bra = z->c; /* ], line 113 */
@@ -495,15 +482,14 @@ static int r_case_ending(struct SN_env * z) {
495
482
  }
496
483
  break;
497
484
  case 8:
498
- if (!(in_grouping_b(z, g_V1, 97, 246))) return 0;
499
- if (!(out_grouping_b(z, g_V1, 97, 246))) return 0;
485
+ if (in_grouping_b(z, g_V1, 97, 246, 0)) return 0;
486
+ if (out_grouping_b(z, g_V1, 97, 246, 0)) return 0;
500
487
  break;
501
488
  case 9:
502
489
  if (!(eq_s_b(z, 1, s_11))) return 0;
503
490
  break;
504
491
  }
505
- { int ret;
506
- ret = slice_del(z); /* delete, line 138 */
492
+ { int ret = slice_del(z); /* delete, line 138 */
507
493
  if (ret < 0) return ret;
508
494
  }
509
495
  z->B[0] = 1; /* set ending_removed, line 139 */
@@ -512,50 +498,49 @@ static int r_case_ending(struct SN_env * z) {
512
498
 
513
499
  static int r_other_endings(struct SN_env * z) {
514
500
  int among_var;
515
- { int m3; /* setlimit, line 142 */
516
- int m = z->l - z->c; (void) m;
501
+ { int mlimit; /* setlimit, line 142 */
502
+ int m1 = z->l - z->c; (void)m1;
517
503
  if (z->c < z->I[1]) return 0;
518
504
  z->c = z->I[1]; /* tomark, line 142 */
519
- m3 = z->lb; z->lb = z->c;
520
- z->c = z->l - m;
505
+ mlimit = z->lb; z->lb = z->c;
506
+ z->c = z->l - m1;
521
507
  z->ket = z->c; /* [, line 142 */
522
508
  among_var = find_among_b(z, a_7, 14); /* substring, line 142 */
523
- if (!(among_var)) { z->lb = m3; return 0; }
509
+ if (!(among_var)) { z->lb = mlimit; return 0; }
524
510
  z->bra = z->c; /* ], line 142 */
525
- z->lb = m3;
511
+ z->lb = mlimit;
526
512
  }
527
513
  switch(among_var) {
528
514
  case 0: return 0;
529
515
  case 1:
530
- { int m = z->l - z->c; (void) m; /* not, line 146 */
516
+ { int m2 = z->l - z->c; (void)m2; /* not, line 146 */
531
517
  if (!(eq_s_b(z, 2, s_12))) goto lab0;
532
518
  return 0;
533
519
  lab0:
534
- z->c = z->l - m;
520
+ z->c = z->l - m2;
535
521
  }
536
522
  break;
537
523
  }
538
- { int ret;
539
- ret = slice_del(z); /* delete, line 151 */
524
+ { int ret = slice_del(z); /* delete, line 151 */
540
525
  if (ret < 0) return ret;
541
526
  }
542
527
  return 1;
543
528
  }
544
529
 
545
530
  static int r_i_plural(struct SN_env * z) {
546
- { int m3; /* setlimit, line 154 */
547
- int m = z->l - z->c; (void) m;
531
+ { int mlimit; /* setlimit, line 154 */
532
+ int m1 = z->l - z->c; (void)m1;
548
533
  if (z->c < z->I[0]) return 0;
549
534
  z->c = z->I[0]; /* tomark, line 154 */
550
- m3 = z->lb; z->lb = z->c;
551
- z->c = z->l - m;
535
+ mlimit = z->lb; z->lb = z->c;
536
+ z->c = z->l - m1;
552
537
  z->ket = z->c; /* [, line 154 */
553
- if (!(find_among_b(z, a_8, 2))) { z->lb = m3; return 0; } /* substring, line 154 */
538
+ if (z->c <= z->lb || (z->p[z->c - 1] != 105 && z->p[z->c - 1] != 106)) { z->lb = mlimit; return 0; }
539
+ if (!(find_among_b(z, a_8, 2))) { z->lb = mlimit; return 0; } /* substring, line 154 */
554
540
  z->bra = z->c; /* ], line 154 */
555
- z->lb = m3;
541
+ z->lb = mlimit;
556
542
  }
557
- { int ret;
558
- ret = slice_del(z); /* delete, line 158 */
543
+ { int ret = slice_del(z); /* delete, line 158 */
559
544
  if (ret < 0) return ret;
560
545
  }
561
546
  return 1;
@@ -563,136 +548,122 @@ static int r_i_plural(struct SN_env * z) {
563
548
 
564
549
  static int r_t_plural(struct SN_env * z) {
565
550
  int among_var;
566
- { int m3; /* setlimit, line 161 */
567
- int m = z->l - z->c; (void) m;
551
+ { int mlimit; /* setlimit, line 161 */
552
+ int m1 = z->l - z->c; (void)m1;
568
553
  if (z->c < z->I[0]) return 0;
569
554
  z->c = z->I[0]; /* tomark, line 161 */
570
- m3 = z->lb; z->lb = z->c;
571
- z->c = z->l - m;
555
+ mlimit = z->lb; z->lb = z->c;
556
+ z->c = z->l - m1;
572
557
  z->ket = z->c; /* [, line 162 */
573
- if (!(eq_s_b(z, 1, s_13))) { z->lb = m3; return 0; }
558
+ if (!(eq_s_b(z, 1, s_13))) { z->lb = mlimit; return 0; }
574
559
  z->bra = z->c; /* ], line 162 */
575
560
  { int m_test = z->l - z->c; /* test, line 162 */
576
- if (!(in_grouping_b(z, g_V1, 97, 246))) { z->lb = m3; return 0; }
561
+ if (in_grouping_b(z, g_V1, 97, 246, 0)) { z->lb = mlimit; return 0; }
577
562
  z->c = z->l - m_test;
578
563
  }
579
- { int ret;
580
- ret = slice_del(z); /* delete, line 163 */
564
+ { int ret = slice_del(z); /* delete, line 163 */
581
565
  if (ret < 0) return ret;
582
566
  }
583
- z->lb = m3;
567
+ z->lb = mlimit;
584
568
  }
585
- { int m3; /* setlimit, line 165 */
586
- int m = z->l - z->c; (void) m;
569
+ { int mlimit; /* setlimit, line 165 */
570
+ int m2 = z->l - z->c; (void)m2;
587
571
  if (z->c < z->I[1]) return 0;
588
572
  z->c = z->I[1]; /* tomark, line 165 */
589
- m3 = z->lb; z->lb = z->c;
590
- z->c = z->l - m;
573
+ mlimit = z->lb; z->lb = z->c;
574
+ z->c = z->l - m2;
591
575
  z->ket = z->c; /* [, line 165 */
576
+ if (z->c - 2 <= z->lb || z->p[z->c - 1] != 97) { z->lb = mlimit; return 0; }
592
577
  among_var = find_among_b(z, a_9, 2); /* substring, line 165 */
593
- if (!(among_var)) { z->lb = m3; return 0; }
578
+ if (!(among_var)) { z->lb = mlimit; return 0; }
594
579
  z->bra = z->c; /* ], line 165 */
595
- z->lb = m3;
580
+ z->lb = mlimit;
596
581
  }
597
582
  switch(among_var) {
598
583
  case 0: return 0;
599
584
  case 1:
600
- { int m = z->l - z->c; (void) m; /* not, line 167 */
585
+ { int m3 = z->l - z->c; (void)m3; /* not, line 167 */
601
586
  if (!(eq_s_b(z, 2, s_14))) goto lab0;
602
587
  return 0;
603
588
  lab0:
604
- z->c = z->l - m;
589
+ z->c = z->l - m3;
605
590
  }
606
591
  break;
607
592
  }
608
- { int ret;
609
- ret = slice_del(z); /* delete, line 170 */
593
+ { int ret = slice_del(z); /* delete, line 170 */
610
594
  if (ret < 0) return ret;
611
595
  }
612
596
  return 1;
613
597
  }
614
598
 
615
599
  static int r_tidy(struct SN_env * z) {
616
- { int m3; /* setlimit, line 173 */
617
- int m = z->l - z->c; (void) m;
600
+ { int mlimit; /* setlimit, line 173 */
601
+ int m1 = z->l - z->c; (void)m1;
618
602
  if (z->c < z->I[0]) return 0;
619
603
  z->c = z->I[0]; /* tomark, line 173 */
620
- m3 = z->lb; z->lb = z->c;
621
- z->c = z->l - m;
622
- { int m = z->l - z->c; (void) m; /* do, line 174 */
623
- { int m = z->l - z->c; (void) m; /* and, line 174 */
604
+ mlimit = z->lb; z->lb = z->c;
605
+ z->c = z->l - m1;
606
+ { int m2 = z->l - z->c; (void)m2; /* do, line 174 */
607
+ { int m3 = z->l - z->c; (void)m3; /* and, line 174 */
624
608
  { int ret = r_LONG(z);
625
609
  if (ret == 0) goto lab0; /* call LONG, line 174 */
626
610
  if (ret < 0) return ret;
627
611
  }
628
- z->c = z->l - m;
612
+ z->c = z->l - m3;
629
613
  z->ket = z->c; /* [, line 174 */
630
614
  if (z->c <= z->lb) goto lab0;
631
615
  z->c--; /* next, line 174 */
632
616
  z->bra = z->c; /* ], line 174 */
633
- { int ret;
634
- ret = slice_del(z); /* delete, line 174 */
617
+ { int ret = slice_del(z); /* delete, line 174 */
635
618
  if (ret < 0) return ret;
636
619
  }
637
620
  }
638
621
  lab0:
639
- z->c = z->l - m;
622
+ z->c = z->l - m2;
640
623
  }
641
- { int m = z->l - z->c; (void) m; /* do, line 175 */
624
+ { int m4 = z->l - z->c; (void)m4; /* do, line 175 */
642
625
  z->ket = z->c; /* [, line 175 */
643
- if (!(in_grouping_b(z, g_AEI, 97, 228))) goto lab1;
626
+ if (in_grouping_b(z, g_AEI, 97, 228, 0)) goto lab1;
644
627
  z->bra = z->c; /* ], line 175 */
645
- if (!(out_grouping_b(z, g_V1, 97, 246))) goto lab1;
646
- { int ret;
647
- ret = slice_del(z); /* delete, line 175 */
628
+ if (out_grouping_b(z, g_V1, 97, 246, 0)) goto lab1;
629
+ { int ret = slice_del(z); /* delete, line 175 */
648
630
  if (ret < 0) return ret;
649
631
  }
650
632
  lab1:
651
- z->c = z->l - m;
633
+ z->c = z->l - m4;
652
634
  }
653
- { int m = z->l - z->c; (void) m; /* do, line 176 */
635
+ { int m5 = z->l - z->c; (void)m5; /* do, line 176 */
654
636
  z->ket = z->c; /* [, line 176 */
655
637
  if (!(eq_s_b(z, 1, s_15))) goto lab2;
656
638
  z->bra = z->c; /* ], line 176 */
657
- { int m = z->l - z->c; (void) m; /* or, line 176 */
639
+ { int m6 = z->l - z->c; (void)m6; /* or, line 176 */
658
640
  if (!(eq_s_b(z, 1, s_16))) goto lab4;
659
641
  goto lab3;
660
642
  lab4:
661
- z->c = z->l - m;
643
+ z->c = z->l - m6;
662
644
  if (!(eq_s_b(z, 1, s_17))) goto lab2;
663
645
  }
664
646
  lab3:
665
- { int ret;
666
- ret = slice_del(z); /* delete, line 176 */
647
+ { int ret = slice_del(z); /* delete, line 176 */
667
648
  if (ret < 0) return ret;
668
649
  }
669
650
  lab2:
670
- z->c = z->l - m;
651
+ z->c = z->l - m5;
671
652
  }
672
- { int m = z->l - z->c; (void) m; /* do, line 177 */
653
+ { int m7 = z->l - z->c; (void)m7; /* do, line 177 */
673
654
  z->ket = z->c; /* [, line 177 */
674
655
  if (!(eq_s_b(z, 1, s_18))) goto lab5;
675
656
  z->bra = z->c; /* ], line 177 */
676
657
  if (!(eq_s_b(z, 1, s_19))) goto lab5;
677
- { int ret;
678
- ret = slice_del(z); /* delete, line 177 */
658
+ { int ret = slice_del(z); /* delete, line 177 */
679
659
  if (ret < 0) return ret;
680
660
  }
681
661
  lab5:
682
- z->c = z->l - m;
662
+ z->c = z->l - m7;
683
663
  }
684
- z->lb = m3;
685
- }
686
- while(1) { /* goto, line 179 */
687
- int m = z->l - z->c; (void) m;
688
- if (!(out_grouping_b(z, g_V1, 97, 246))) goto lab6;
689
- z->c = z->l - m;
690
- break;
691
- lab6:
692
- z->c = z->l - m;
693
- if (z->c <= z->lb) return 0;
694
- z->c--; /* goto, line 179 */
664
+ z->lb = mlimit;
695
665
  }
666
+ if (in_grouping_b(z, g_V1, 97, 246, 1) < 0) return 0; /* goto */ /* non V1, line 179 */
696
667
  z->ket = z->c; /* [, line 179 */
697
668
  if (z->c <= z->lb) return 0;
698
669
  z->c--; /* next, line 179 */
@@ -700,87 +671,86 @@ static int r_tidy(struct SN_env * z) {
700
671
  z->S[0] = slice_to(z, z->S[0]); /* -> x, line 179 */
701
672
  if (z->S[0] == 0) return -1; /* -> x, line 179 */
702
673
  if (!(eq_v_b(z, z->S[0]))) return 0; /* name x, line 179 */
703
- { int ret;
704
- ret = slice_del(z); /* delete, line 179 */
674
+ { int ret = slice_del(z); /* delete, line 179 */
705
675
  if (ret < 0) return ret;
706
676
  }
707
677
  return 1;
708
678
  }
709
679
 
710
680
  extern int finnish_ISO_8859_1_stem(struct SN_env * z) {
711
- { int c = z->c; /* do, line 185 */
681
+ { int c1 = z->c; /* do, line 185 */
712
682
  { int ret = r_mark_regions(z);
713
683
  if (ret == 0) goto lab0; /* call mark_regions, line 185 */
714
684
  if (ret < 0) return ret;
715
685
  }
716
686
  lab0:
717
- z->c = c;
687
+ z->c = c1;
718
688
  }
719
689
  z->B[0] = 0; /* unset ending_removed, line 186 */
720
690
  z->lb = z->c; z->c = z->l; /* backwards, line 187 */
721
691
 
722
- { int m = z->l - z->c; (void) m; /* do, line 188 */
692
+ { int m2 = z->l - z->c; (void)m2; /* do, line 188 */
723
693
  { int ret = r_particle_etc(z);
724
694
  if (ret == 0) goto lab1; /* call particle_etc, line 188 */
725
695
  if (ret < 0) return ret;
726
696
  }
727
697
  lab1:
728
- z->c = z->l - m;
698
+ z->c = z->l - m2;
729
699
  }
730
- { int m = z->l - z->c; (void) m; /* do, line 189 */
700
+ { int m3 = z->l - z->c; (void)m3; /* do, line 189 */
731
701
  { int ret = r_possessive(z);
732
702
  if (ret == 0) goto lab2; /* call possessive, line 189 */
733
703
  if (ret < 0) return ret;
734
704
  }
735
705
  lab2:
736
- z->c = z->l - m;
706
+ z->c = z->l - m3;
737
707
  }
738
- { int m = z->l - z->c; (void) m; /* do, line 190 */
708
+ { int m4 = z->l - z->c; (void)m4; /* do, line 190 */
739
709
  { int ret = r_case_ending(z);
740
710
  if (ret == 0) goto lab3; /* call case_ending, line 190 */
741
711
  if (ret < 0) return ret;
742
712
  }
743
713
  lab3:
744
- z->c = z->l - m;
714
+ z->c = z->l - m4;
745
715
  }
746
- { int m = z->l - z->c; (void) m; /* do, line 191 */
716
+ { int m5 = z->l - z->c; (void)m5; /* do, line 191 */
747
717
  { int ret = r_other_endings(z);
748
718
  if (ret == 0) goto lab4; /* call other_endings, line 191 */
749
719
  if (ret < 0) return ret;
750
720
  }
751
721
  lab4:
752
- z->c = z->l - m;
722
+ z->c = z->l - m5;
753
723
  }
754
- { int m = z->l - z->c; (void) m; /* or, line 192 */
724
+ { int m6 = z->l - z->c; (void)m6; /* or, line 192 */
755
725
  if (!(z->B[0])) goto lab6; /* Boolean test ending_removed, line 192 */
756
- { int m = z->l - z->c; (void) m; /* do, line 192 */
726
+ { int m7 = z->l - z->c; (void)m7; /* do, line 192 */
757
727
  { int ret = r_i_plural(z);
758
728
  if (ret == 0) goto lab7; /* call i_plural, line 192 */
759
729
  if (ret < 0) return ret;
760
730
  }
761
731
  lab7:
762
- z->c = z->l - m;
732
+ z->c = z->l - m7;
763
733
  }
764
734
  goto lab5;
765
735
  lab6:
766
- z->c = z->l - m;
767
- { int m = z->l - z->c; (void) m; /* do, line 192 */
736
+ z->c = z->l - m6;
737
+ { int m8 = z->l - z->c; (void)m8; /* do, line 192 */
768
738
  { int ret = r_t_plural(z);
769
739
  if (ret == 0) goto lab8; /* call t_plural, line 192 */
770
740
  if (ret < 0) return ret;
771
741
  }
772
742
  lab8:
773
- z->c = z->l - m;
743
+ z->c = z->l - m8;
774
744
  }
775
745
  }
776
746
  lab5:
777
- { int m = z->l - z->c; (void) m; /* do, line 193 */
747
+ { int m9 = z->l - z->c; (void)m9; /* do, line 193 */
778
748
  { int ret = r_tidy(z);
779
749
  if (ret == 0) goto lab9; /* call tidy, line 193 */
780
750
  if (ret < 0) return ret;
781
751
  }
782
752
  lab9:
783
- z->c = z->l - m;
753
+ z->c = z->l - m9;
784
754
  }
785
755
  z->c = z->lb;
786
756
  return 1;
@@ -788,5 +758,5 @@ lab5:
788
758
 
789
759
  extern struct SN_env * finnish_ISO_8859_1_create_env(void) { return SN_create_env(1, 2, 1); }
790
760
 
791
- extern void finnish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z); }
761
+ extern void finnish_ISO_8859_1_close_env(struct SN_env * z) { SN_close_env(z, 1); }
792
762