jk-ferret 0.11.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (228) hide show
  1. data/CHANGELOG +24 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README +90 -0
  4. data/RELEASE_CHANGES +137 -0
  5. data/RELEASE_NOTES +60 -0
  6. data/Rakefile +443 -0
  7. data/TODO +109 -0
  8. data/TUTORIAL +231 -0
  9. data/bin/ferret-browser +79 -0
  10. data/ext/BZLIB_blocksort.c +1094 -0
  11. data/ext/BZLIB_bzlib.c +1578 -0
  12. data/ext/BZLIB_compress.c +672 -0
  13. data/ext/BZLIB_crctable.c +104 -0
  14. data/ext/BZLIB_decompress.c +626 -0
  15. data/ext/BZLIB_huffman.c +205 -0
  16. data/ext/BZLIB_randtable.c +84 -0
  17. data/ext/STEMMER_api.c +66 -0
  18. data/ext/STEMMER_libstemmer.c +93 -0
  19. data/ext/STEMMER_stem_ISO_8859_1_danish.c +337 -0
  20. data/ext/STEMMER_stem_ISO_8859_1_dutch.c +624 -0
  21. data/ext/STEMMER_stem_ISO_8859_1_english.c +1117 -0
  22. data/ext/STEMMER_stem_ISO_8859_1_finnish.c +762 -0
  23. data/ext/STEMMER_stem_ISO_8859_1_french.c +1246 -0
  24. data/ext/STEMMER_stem_ISO_8859_1_german.c +503 -0
  25. data/ext/STEMMER_stem_ISO_8859_1_hungarian.c +1230 -0
  26. data/ext/STEMMER_stem_ISO_8859_1_italian.c +1065 -0
  27. data/ext/STEMMER_stem_ISO_8859_1_norwegian.c +297 -0
  28. data/ext/STEMMER_stem_ISO_8859_1_porter.c +749 -0
  29. data/ext/STEMMER_stem_ISO_8859_1_portuguese.c +1017 -0
  30. data/ext/STEMMER_stem_ISO_8859_1_spanish.c +1093 -0
  31. data/ext/STEMMER_stem_ISO_8859_1_swedish.c +307 -0
  32. data/ext/STEMMER_stem_ISO_8859_2_romanian.c +998 -0
  33. data/ext/STEMMER_stem_KOI8_R_russian.c +700 -0
  34. data/ext/STEMMER_stem_UTF_8_danish.c +339 -0
  35. data/ext/STEMMER_stem_UTF_8_dutch.c +634 -0
  36. data/ext/STEMMER_stem_UTF_8_english.c +1125 -0
  37. data/ext/STEMMER_stem_UTF_8_finnish.c +768 -0
  38. data/ext/STEMMER_stem_UTF_8_french.c +1256 -0
  39. data/ext/STEMMER_stem_UTF_8_german.c +509 -0
  40. data/ext/STEMMER_stem_UTF_8_hungarian.c +1234 -0
  41. data/ext/STEMMER_stem_UTF_8_italian.c +1073 -0
  42. data/ext/STEMMER_stem_UTF_8_norwegian.c +299 -0
  43. data/ext/STEMMER_stem_UTF_8_porter.c +755 -0
  44. data/ext/STEMMER_stem_UTF_8_portuguese.c +1023 -0
  45. data/ext/STEMMER_stem_UTF_8_romanian.c +1004 -0
  46. data/ext/STEMMER_stem_UTF_8_russian.c +694 -0
  47. data/ext/STEMMER_stem_UTF_8_spanish.c +1097 -0
  48. data/ext/STEMMER_stem_UTF_8_swedish.c +309 -0
  49. data/ext/STEMMER_stem_UTF_8_turkish.c +2205 -0
  50. data/ext/STEMMER_utilities.c +478 -0
  51. data/ext/analysis.c +1710 -0
  52. data/ext/analysis.h +266 -0
  53. data/ext/api.h +26 -0
  54. data/ext/array.c +125 -0
  55. data/ext/array.h +62 -0
  56. data/ext/bitvector.c +96 -0
  57. data/ext/bitvector.h +594 -0
  58. data/ext/bzlib.h +282 -0
  59. data/ext/bzlib_private.h +503 -0
  60. data/ext/compound_io.c +384 -0
  61. data/ext/config.h +52 -0
  62. data/ext/document.c +159 -0
  63. data/ext/document.h +63 -0
  64. data/ext/except.c +102 -0
  65. data/ext/except.h +176 -0
  66. data/ext/extconf.rb +15 -0
  67. data/ext/ferret.c +416 -0
  68. data/ext/ferret.h +94 -0
  69. data/ext/field_index.c +262 -0
  70. data/ext/field_index.h +52 -0
  71. data/ext/filter.c +157 -0
  72. data/ext/fs_store.c +493 -0
  73. data/ext/global.c +458 -0
  74. data/ext/global.h +302 -0
  75. data/ext/hash.c +524 -0
  76. data/ext/hash.h +515 -0
  77. data/ext/hashset.c +192 -0
  78. data/ext/hashset.h +215 -0
  79. data/ext/header.h +58 -0
  80. data/ext/helper.c +63 -0
  81. data/ext/helper.h +21 -0
  82. data/ext/index.c +6804 -0
  83. data/ext/index.h +935 -0
  84. data/ext/internal.h +1019 -0
  85. data/ext/lang.c +10 -0
  86. data/ext/lang.h +68 -0
  87. data/ext/libstemmer.h +79 -0
  88. data/ext/mempool.c +88 -0
  89. data/ext/mempool.h +43 -0
  90. data/ext/modules.h +190 -0
  91. data/ext/multimapper.c +351 -0
  92. data/ext/multimapper.h +60 -0
  93. data/ext/posh.c +1006 -0
  94. data/ext/posh.h +973 -0
  95. data/ext/priorityqueue.c +149 -0
  96. data/ext/priorityqueue.h +155 -0
  97. data/ext/q_boolean.c +1621 -0
  98. data/ext/q_const_score.c +162 -0
  99. data/ext/q_filtered_query.c +212 -0
  100. data/ext/q_fuzzy.c +280 -0
  101. data/ext/q_match_all.c +149 -0
  102. data/ext/q_multi_term.c +673 -0
  103. data/ext/q_parser.c +3103 -0
  104. data/ext/q_phrase.c +1206 -0
  105. data/ext/q_prefix.c +98 -0
  106. data/ext/q_range.c +682 -0
  107. data/ext/q_span.c +2390 -0
  108. data/ext/q_term.c +337 -0
  109. data/ext/q_wildcard.c +167 -0
  110. data/ext/r_analysis.c +2626 -0
  111. data/ext/r_index.c +3468 -0
  112. data/ext/r_qparser.c +635 -0
  113. data/ext/r_search.c +4490 -0
  114. data/ext/r_store.c +513 -0
  115. data/ext/r_utils.c +1131 -0
  116. data/ext/ram_store.c +476 -0
  117. data/ext/scanner.c +895 -0
  118. data/ext/scanner.h +36 -0
  119. data/ext/scanner_mb.c +6701 -0
  120. data/ext/scanner_utf8.c +4415 -0
  121. data/ext/search.c +1864 -0
  122. data/ext/search.h +953 -0
  123. data/ext/similarity.c +151 -0
  124. data/ext/similarity.h +89 -0
  125. data/ext/sort.c +786 -0
  126. data/ext/stem_ISO_8859_1_danish.h +16 -0
  127. data/ext/stem_ISO_8859_1_dutch.h +16 -0
  128. data/ext/stem_ISO_8859_1_english.h +16 -0
  129. data/ext/stem_ISO_8859_1_finnish.h +16 -0
  130. data/ext/stem_ISO_8859_1_french.h +16 -0
  131. data/ext/stem_ISO_8859_1_german.h +16 -0
  132. data/ext/stem_ISO_8859_1_hungarian.h +16 -0
  133. data/ext/stem_ISO_8859_1_italian.h +16 -0
  134. data/ext/stem_ISO_8859_1_norwegian.h +16 -0
  135. data/ext/stem_ISO_8859_1_porter.h +16 -0
  136. data/ext/stem_ISO_8859_1_portuguese.h +16 -0
  137. data/ext/stem_ISO_8859_1_spanish.h +16 -0
  138. data/ext/stem_ISO_8859_1_swedish.h +16 -0
  139. data/ext/stem_ISO_8859_2_romanian.h +16 -0
  140. data/ext/stem_KOI8_R_russian.h +16 -0
  141. data/ext/stem_UTF_8_danish.h +16 -0
  142. data/ext/stem_UTF_8_dutch.h +16 -0
  143. data/ext/stem_UTF_8_english.h +16 -0
  144. data/ext/stem_UTF_8_finnish.h +16 -0
  145. data/ext/stem_UTF_8_french.h +16 -0
  146. data/ext/stem_UTF_8_german.h +16 -0
  147. data/ext/stem_UTF_8_hungarian.h +16 -0
  148. data/ext/stem_UTF_8_italian.h +16 -0
  149. data/ext/stem_UTF_8_norwegian.h +16 -0
  150. data/ext/stem_UTF_8_porter.h +16 -0
  151. data/ext/stem_UTF_8_portuguese.h +16 -0
  152. data/ext/stem_UTF_8_romanian.h +16 -0
  153. data/ext/stem_UTF_8_russian.h +16 -0
  154. data/ext/stem_UTF_8_spanish.h +16 -0
  155. data/ext/stem_UTF_8_swedish.h +16 -0
  156. data/ext/stem_UTF_8_turkish.h +16 -0
  157. data/ext/stopwords.c +410 -0
  158. data/ext/store.c +698 -0
  159. data/ext/store.h +799 -0
  160. data/ext/symbol.c +10 -0
  161. data/ext/symbol.h +23 -0
  162. data/ext/term_vectors.c +73 -0
  163. data/ext/threading.h +31 -0
  164. data/ext/win32.h +62 -0
  165. data/lib/ferret.rb +30 -0
  166. data/lib/ferret/browser.rb +246 -0
  167. data/lib/ferret/browser/s/global.js +192 -0
  168. data/lib/ferret/browser/s/style.css +148 -0
  169. data/lib/ferret/browser/views/document/list.rhtml +49 -0
  170. data/lib/ferret/browser/views/document/show.rhtml +27 -0
  171. data/lib/ferret/browser/views/error/index.rhtml +7 -0
  172. data/lib/ferret/browser/views/help/index.rhtml +8 -0
  173. data/lib/ferret/browser/views/home/index.rhtml +29 -0
  174. data/lib/ferret/browser/views/layout.rhtml +22 -0
  175. data/lib/ferret/browser/views/term-vector/index.rhtml +4 -0
  176. data/lib/ferret/browser/views/term/index.rhtml +199 -0
  177. data/lib/ferret/browser/views/term/termdocs.rhtml +1 -0
  178. data/lib/ferret/browser/webrick.rb +14 -0
  179. data/lib/ferret/document.rb +130 -0
  180. data/lib/ferret/field_infos.rb +44 -0
  181. data/lib/ferret/field_symbol.rb +87 -0
  182. data/lib/ferret/index.rb +973 -0
  183. data/lib/ferret/number_tools.rb +157 -0
  184. data/lib/ferret/version.rb +3 -0
  185. data/setup.rb +1555 -0
  186. data/test/long_running/largefile/tc_largefile.rb +46 -0
  187. data/test/test_all.rb +5 -0
  188. data/test/test_helper.rb +29 -0
  189. data/test/test_installed.rb +1 -0
  190. data/test/threading/number_to_spoken.rb +132 -0
  191. data/test/threading/thread_safety_index_test.rb +88 -0
  192. data/test/threading/thread_safety_read_write_test.rb +73 -0
  193. data/test/threading/thread_safety_test.rb +133 -0
  194. data/test/unit/analysis/tc_analyzer.rb +550 -0
  195. data/test/unit/analysis/tc_token_stream.rb +653 -0
  196. data/test/unit/index/tc_index.rb +867 -0
  197. data/test/unit/index/tc_index_reader.rb +699 -0
  198. data/test/unit/index/tc_index_writer.rb +447 -0
  199. data/test/unit/index/th_doc.rb +332 -0
  200. data/test/unit/query_parser/tc_query_parser.rb +238 -0
  201. data/test/unit/search/tc_filter.rb +156 -0
  202. data/test/unit/search/tc_fuzzy_query.rb +147 -0
  203. data/test/unit/search/tc_index_searcher.rb +67 -0
  204. data/test/unit/search/tc_multi_searcher.rb +128 -0
  205. data/test/unit/search/tc_multiple_search_requests.rb +58 -0
  206. data/test/unit/search/tc_search_and_sort.rb +179 -0
  207. data/test/unit/search/tc_sort.rb +49 -0
  208. data/test/unit/search/tc_sort_field.rb +27 -0
  209. data/test/unit/search/tc_spans.rb +190 -0
  210. data/test/unit/search/tm_searcher.rb +436 -0
  211. data/test/unit/store/tc_fs_store.rb +115 -0
  212. data/test/unit/store/tc_ram_store.rb +35 -0
  213. data/test/unit/store/tm_store.rb +34 -0
  214. data/test/unit/store/tm_store_lock.rb +68 -0
  215. data/test/unit/tc_document.rb +81 -0
  216. data/test/unit/tc_field_symbol.rb +26 -0
  217. data/test/unit/ts_analysis.rb +2 -0
  218. data/test/unit/ts_index.rb +2 -0
  219. data/test/unit/ts_largefile.rb +4 -0
  220. data/test/unit/ts_query_parser.rb +2 -0
  221. data/test/unit/ts_search.rb +2 -0
  222. data/test/unit/ts_store.rb +2 -0
  223. data/test/unit/ts_utils.rb +2 -0
  224. data/test/unit/utils/tc_bit_vector.rb +295 -0
  225. data/test/unit/utils/tc_number_tools.rb +117 -0
  226. data/test/unit/utils/tc_priority_queue.rb +106 -0
  227. data/test/utils/content_generator.rb +226 -0
  228. metadata +319 -0
@@ -0,0 +1,694 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+ extern int russian_UTF_8_stem(struct SN_env * z);
10
+ #ifdef __cplusplus
11
+ }
12
+ #endif
13
+ static int r_tidy_up(struct SN_env * z);
14
+ static int r_derivational(struct SN_env * z);
15
+ static int r_noun(struct SN_env * z);
16
+ static int r_verb(struct SN_env * z);
17
+ static int r_reflexive(struct SN_env * z);
18
+ static int r_adjectival(struct SN_env * z);
19
+ static int r_adjective(struct SN_env * z);
20
+ static int r_perfective_gerund(struct SN_env * z);
21
+ static int r_R2(struct SN_env * z);
22
+ static int r_mark_regions(struct SN_env * z);
23
+ #ifdef __cplusplus
24
+ extern "C" {
25
+ #endif
26
+
27
+
28
+ extern struct SN_env * russian_UTF_8_create_env(void);
29
+ extern void russian_UTF_8_close_env(struct SN_env * z);
30
+
31
+
32
+ #ifdef __cplusplus
33
+ }
34
+ #endif
35
+ static const symbol s_0_0[10] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
36
+ static const symbol s_0_1[12] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
37
+ static const symbol s_0_2[12] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8, 0xD1, 0x81, 0xD1, 0x8C };
38
+ static const symbol s_0_3[2] = { 0xD0, 0xB2 };
39
+ static const symbol s_0_4[4] = { 0xD1, 0x8B, 0xD0, 0xB2 };
40
+ static const symbol s_0_5[4] = { 0xD0, 0xB8, 0xD0, 0xB2 };
41
+ static const symbol s_0_6[6] = { 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
42
+ static const symbol s_0_7[8] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
43
+ static const symbol s_0_8[8] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88, 0xD0, 0xB8 };
44
+
45
+ static const struct among a_0[9] =
46
+ {
47
+ /* 0 */ { 10, s_0_0, -1, 1, 0},
48
+ /* 1 */ { 12, s_0_1, 0, 2, 0},
49
+ /* 2 */ { 12, s_0_2, 0, 2, 0},
50
+ /* 3 */ { 2, s_0_3, -1, 1, 0},
51
+ /* 4 */ { 4, s_0_4, 3, 2, 0},
52
+ /* 5 */ { 4, s_0_5, 3, 2, 0},
53
+ /* 6 */ { 6, s_0_6, -1, 1, 0},
54
+ /* 7 */ { 8, s_0_7, 6, 2, 0},
55
+ /* 8 */ { 8, s_0_8, 6, 2, 0}
56
+ };
57
+
58
+ static const symbol s_1_0[6] = { 0xD0, 0xB5, 0xD0, 0xBC, 0xD1, 0x83 };
59
+ static const symbol s_1_1[6] = { 0xD0, 0xBE, 0xD0, 0xBC, 0xD1, 0x83 };
60
+ static const symbol s_1_2[4] = { 0xD1, 0x8B, 0xD1, 0x85 };
61
+ static const symbol s_1_3[4] = { 0xD0, 0xB8, 0xD1, 0x85 };
62
+ static const symbol s_1_4[4] = { 0xD1, 0x83, 0xD1, 0x8E };
63
+ static const symbol s_1_5[4] = { 0xD1, 0x8E, 0xD1, 0x8E };
64
+ static const symbol s_1_6[4] = { 0xD0, 0xB5, 0xD1, 0x8E };
65
+ static const symbol s_1_7[4] = { 0xD0, 0xBE, 0xD1, 0x8E };
66
+ static const symbol s_1_8[4] = { 0xD1, 0x8F, 0xD1, 0x8F };
67
+ static const symbol s_1_9[4] = { 0xD0, 0xB0, 0xD1, 0x8F };
68
+ static const symbol s_1_10[4] = { 0xD1, 0x8B, 0xD0, 0xB5 };
69
+ static const symbol s_1_11[4] = { 0xD0, 0xB5, 0xD0, 0xB5 };
70
+ static const symbol s_1_12[4] = { 0xD0, 0xB8, 0xD0, 0xB5 };
71
+ static const symbol s_1_13[4] = { 0xD0, 0xBE, 0xD0, 0xB5 };
72
+ static const symbol s_1_14[6] = { 0xD1, 0x8B, 0xD0, 0xBC, 0xD0, 0xB8 };
73
+ static const symbol s_1_15[6] = { 0xD0, 0xB8, 0xD0, 0xBC, 0xD0, 0xB8 };
74
+ static const symbol s_1_16[4] = { 0xD1, 0x8B, 0xD0, 0xB9 };
75
+ static const symbol s_1_17[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
76
+ static const symbol s_1_18[4] = { 0xD0, 0xB8, 0xD0, 0xB9 };
77
+ static const symbol s_1_19[4] = { 0xD0, 0xBE, 0xD0, 0xB9 };
78
+ static const symbol s_1_20[4] = { 0xD1, 0x8B, 0xD0, 0xBC };
79
+ static const symbol s_1_21[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
80
+ static const symbol s_1_22[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
81
+ static const symbol s_1_23[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
82
+ static const symbol s_1_24[6] = { 0xD0, 0xB5, 0xD0, 0xB3, 0xD0, 0xBE };
83
+ static const symbol s_1_25[6] = { 0xD0, 0xBE, 0xD0, 0xB3, 0xD0, 0xBE };
84
+
85
+ static const struct among a_1[26] =
86
+ {
87
+ /* 0 */ { 6, s_1_0, -1, 1, 0},
88
+ /* 1 */ { 6, s_1_1, -1, 1, 0},
89
+ /* 2 */ { 4, s_1_2, -1, 1, 0},
90
+ /* 3 */ { 4, s_1_3, -1, 1, 0},
91
+ /* 4 */ { 4, s_1_4, -1, 1, 0},
92
+ /* 5 */ { 4, s_1_5, -1, 1, 0},
93
+ /* 6 */ { 4, s_1_6, -1, 1, 0},
94
+ /* 7 */ { 4, s_1_7, -1, 1, 0},
95
+ /* 8 */ { 4, s_1_8, -1, 1, 0},
96
+ /* 9 */ { 4, s_1_9, -1, 1, 0},
97
+ /* 10 */ { 4, s_1_10, -1, 1, 0},
98
+ /* 11 */ { 4, s_1_11, -1, 1, 0},
99
+ /* 12 */ { 4, s_1_12, -1, 1, 0},
100
+ /* 13 */ { 4, s_1_13, -1, 1, 0},
101
+ /* 14 */ { 6, s_1_14, -1, 1, 0},
102
+ /* 15 */ { 6, s_1_15, -1, 1, 0},
103
+ /* 16 */ { 4, s_1_16, -1, 1, 0},
104
+ /* 17 */ { 4, s_1_17, -1, 1, 0},
105
+ /* 18 */ { 4, s_1_18, -1, 1, 0},
106
+ /* 19 */ { 4, s_1_19, -1, 1, 0},
107
+ /* 20 */ { 4, s_1_20, -1, 1, 0},
108
+ /* 21 */ { 4, s_1_21, -1, 1, 0},
109
+ /* 22 */ { 4, s_1_22, -1, 1, 0},
110
+ /* 23 */ { 4, s_1_23, -1, 1, 0},
111
+ /* 24 */ { 6, s_1_24, -1, 1, 0},
112
+ /* 25 */ { 6, s_1_25, -1, 1, 0}
113
+ };
114
+
115
+ static const symbol s_2_0[4] = { 0xD0, 0xB2, 0xD1, 0x88 };
116
+ static const symbol s_2_1[6] = { 0xD1, 0x8B, 0xD0, 0xB2, 0xD1, 0x88 };
117
+ static const symbol s_2_2[6] = { 0xD0, 0xB8, 0xD0, 0xB2, 0xD1, 0x88 };
118
+ static const symbol s_2_3[2] = { 0xD1, 0x89 };
119
+ static const symbol s_2_4[4] = { 0xD1, 0x8E, 0xD1, 0x89 };
120
+ static const symbol s_2_5[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x89 };
121
+ static const symbol s_2_6[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
122
+ static const symbol s_2_7[4] = { 0xD0, 0xBD, 0xD0, 0xBD };
123
+
124
+ static const struct among a_2[8] =
125
+ {
126
+ /* 0 */ { 4, s_2_0, -1, 1, 0},
127
+ /* 1 */ { 6, s_2_1, 0, 2, 0},
128
+ /* 2 */ { 6, s_2_2, 0, 2, 0},
129
+ /* 3 */ { 2, s_2_3, -1, 1, 0},
130
+ /* 4 */ { 4, s_2_4, 3, 1, 0},
131
+ /* 5 */ { 6, s_2_5, 4, 2, 0},
132
+ /* 6 */ { 4, s_2_6, -1, 1, 0},
133
+ /* 7 */ { 4, s_2_7, -1, 1, 0}
134
+ };
135
+
136
+ static const symbol s_3_0[4] = { 0xD1, 0x81, 0xD1, 0x8C };
137
+ static const symbol s_3_1[4] = { 0xD1, 0x81, 0xD1, 0x8F };
138
+
139
+ static const struct among a_3[2] =
140
+ {
141
+ /* 0 */ { 4, s_3_0, -1, 1, 0},
142
+ /* 1 */ { 4, s_3_1, -1, 1, 0}
143
+ };
144
+
145
+ static const symbol s_4_0[4] = { 0xD1, 0x8B, 0xD1, 0x82 };
146
+ static const symbol s_4_1[4] = { 0xD1, 0x8E, 0xD1, 0x82 };
147
+ static const symbol s_4_2[6] = { 0xD1, 0x83, 0xD1, 0x8E, 0xD1, 0x82 };
148
+ static const symbol s_4_3[4] = { 0xD1, 0x8F, 0xD1, 0x82 };
149
+ static const symbol s_4_4[4] = { 0xD0, 0xB5, 0xD1, 0x82 };
150
+ static const symbol s_4_5[6] = { 0xD1, 0x83, 0xD0, 0xB5, 0xD1, 0x82 };
151
+ static const symbol s_4_6[4] = { 0xD0, 0xB8, 0xD1, 0x82 };
152
+ static const symbol s_4_7[4] = { 0xD0, 0xBD, 0xD1, 0x8B };
153
+ static const symbol s_4_8[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD1, 0x8B };
154
+ static const symbol s_4_9[4] = { 0xD1, 0x82, 0xD1, 0x8C };
155
+ static const symbol s_4_10[6] = { 0xD1, 0x8B, 0xD1, 0x82, 0xD1, 0x8C };
156
+ static const symbol s_4_11[6] = { 0xD0, 0xB8, 0xD1, 0x82, 0xD1, 0x8C };
157
+ static const symbol s_4_12[6] = { 0xD0, 0xB5, 0xD1, 0x88, 0xD1, 0x8C };
158
+ static const symbol s_4_13[6] = { 0xD0, 0xB8, 0xD1, 0x88, 0xD1, 0x8C };
159
+ static const symbol s_4_14[2] = { 0xD1, 0x8E };
160
+ static const symbol s_4_15[4] = { 0xD1, 0x83, 0xD1, 0x8E };
161
+ static const symbol s_4_16[4] = { 0xD0, 0xBB, 0xD0, 0xB0 };
162
+ static const symbol s_4_17[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xB0 };
163
+ static const symbol s_4_18[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xB0 };
164
+ static const symbol s_4_19[4] = { 0xD0, 0xBD, 0xD0, 0xB0 };
165
+ static const symbol s_4_20[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xB0 };
166
+ static const symbol s_4_21[6] = { 0xD0, 0xB5, 0xD1, 0x82, 0xD0, 0xB5 };
167
+ static const symbol s_4_22[6] = { 0xD0, 0xB8, 0xD1, 0x82, 0xD0, 0xB5 };
168
+ static const symbol s_4_23[6] = { 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
169
+ static const symbol s_4_24[8] = { 0xD1, 0x83, 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
170
+ static const symbol s_4_25[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x82, 0xD0, 0xB5 };
171
+ static const symbol s_4_26[4] = { 0xD0, 0xBB, 0xD0, 0xB8 };
172
+ static const symbol s_4_27[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xB8 };
173
+ static const symbol s_4_28[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xB8 };
174
+ static const symbol s_4_29[2] = { 0xD0, 0xB9 };
175
+ static const symbol s_4_30[4] = { 0xD1, 0x83, 0xD0, 0xB9 };
176
+ static const symbol s_4_31[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
177
+ static const symbol s_4_32[2] = { 0xD0, 0xBB };
178
+ static const symbol s_4_33[4] = { 0xD1, 0x8B, 0xD0, 0xBB };
179
+ static const symbol s_4_34[4] = { 0xD0, 0xB8, 0xD0, 0xBB };
180
+ static const symbol s_4_35[4] = { 0xD1, 0x8B, 0xD0, 0xBC };
181
+ static const symbol s_4_36[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
182
+ static const symbol s_4_37[4] = { 0xD0, 0xB8, 0xD0, 0xBC };
183
+ static const symbol s_4_38[2] = { 0xD0, 0xBD };
184
+ static const symbol s_4_39[4] = { 0xD0, 0xB5, 0xD0, 0xBD };
185
+ static const symbol s_4_40[4] = { 0xD0, 0xBB, 0xD0, 0xBE };
186
+ static const symbol s_4_41[6] = { 0xD1, 0x8B, 0xD0, 0xBB, 0xD0, 0xBE };
187
+ static const symbol s_4_42[6] = { 0xD0, 0xB8, 0xD0, 0xBB, 0xD0, 0xBE };
188
+ static const symbol s_4_43[4] = { 0xD0, 0xBD, 0xD0, 0xBE };
189
+ static const symbol s_4_44[6] = { 0xD0, 0xB5, 0xD0, 0xBD, 0xD0, 0xBE };
190
+ static const symbol s_4_45[6] = { 0xD0, 0xBD, 0xD0, 0xBD, 0xD0, 0xBE };
191
+
192
+ static const struct among a_4[46] =
193
+ {
194
+ /* 0 */ { 4, s_4_0, -1, 2, 0},
195
+ /* 1 */ { 4, s_4_1, -1, 1, 0},
196
+ /* 2 */ { 6, s_4_2, 1, 2, 0},
197
+ /* 3 */ { 4, s_4_3, -1, 2, 0},
198
+ /* 4 */ { 4, s_4_4, -1, 1, 0},
199
+ /* 5 */ { 6, s_4_5, 4, 2, 0},
200
+ /* 6 */ { 4, s_4_6, -1, 2, 0},
201
+ /* 7 */ { 4, s_4_7, -1, 1, 0},
202
+ /* 8 */ { 6, s_4_8, 7, 2, 0},
203
+ /* 9 */ { 4, s_4_9, -1, 1, 0},
204
+ /* 10 */ { 6, s_4_10, 9, 2, 0},
205
+ /* 11 */ { 6, s_4_11, 9, 2, 0},
206
+ /* 12 */ { 6, s_4_12, -1, 1, 0},
207
+ /* 13 */ { 6, s_4_13, -1, 2, 0},
208
+ /* 14 */ { 2, s_4_14, -1, 2, 0},
209
+ /* 15 */ { 4, s_4_15, 14, 2, 0},
210
+ /* 16 */ { 4, s_4_16, -1, 1, 0},
211
+ /* 17 */ { 6, s_4_17, 16, 2, 0},
212
+ /* 18 */ { 6, s_4_18, 16, 2, 0},
213
+ /* 19 */ { 4, s_4_19, -1, 1, 0},
214
+ /* 20 */ { 6, s_4_20, 19, 2, 0},
215
+ /* 21 */ { 6, s_4_21, -1, 1, 0},
216
+ /* 22 */ { 6, s_4_22, -1, 2, 0},
217
+ /* 23 */ { 6, s_4_23, -1, 1, 0},
218
+ /* 24 */ { 8, s_4_24, 23, 2, 0},
219
+ /* 25 */ { 8, s_4_25, 23, 2, 0},
220
+ /* 26 */ { 4, s_4_26, -1, 1, 0},
221
+ /* 27 */ { 6, s_4_27, 26, 2, 0},
222
+ /* 28 */ { 6, s_4_28, 26, 2, 0},
223
+ /* 29 */ { 2, s_4_29, -1, 1, 0},
224
+ /* 30 */ { 4, s_4_30, 29, 2, 0},
225
+ /* 31 */ { 4, s_4_31, 29, 2, 0},
226
+ /* 32 */ { 2, s_4_32, -1, 1, 0},
227
+ /* 33 */ { 4, s_4_33, 32, 2, 0},
228
+ /* 34 */ { 4, s_4_34, 32, 2, 0},
229
+ /* 35 */ { 4, s_4_35, -1, 2, 0},
230
+ /* 36 */ { 4, s_4_36, -1, 1, 0},
231
+ /* 37 */ { 4, s_4_37, -1, 2, 0},
232
+ /* 38 */ { 2, s_4_38, -1, 1, 0},
233
+ /* 39 */ { 4, s_4_39, 38, 2, 0},
234
+ /* 40 */ { 4, s_4_40, -1, 1, 0},
235
+ /* 41 */ { 6, s_4_41, 40, 2, 0},
236
+ /* 42 */ { 6, s_4_42, 40, 2, 0},
237
+ /* 43 */ { 4, s_4_43, -1, 1, 0},
238
+ /* 44 */ { 6, s_4_44, 43, 2, 0},
239
+ /* 45 */ { 6, s_4_45, 43, 1, 0}
240
+ };
241
+
242
+ static const symbol s_5_0[2] = { 0xD1, 0x83 };
243
+ static const symbol s_5_1[4] = { 0xD1, 0x8F, 0xD1, 0x85 };
244
+ static const symbol s_5_2[6] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD1, 0x85 };
245
+ static const symbol s_5_3[4] = { 0xD0, 0xB0, 0xD1, 0x85 };
246
+ static const symbol s_5_4[2] = { 0xD1, 0x8B };
247
+ static const symbol s_5_5[2] = { 0xD1, 0x8C };
248
+ static const symbol s_5_6[2] = { 0xD1, 0x8E };
249
+ static const symbol s_5_7[4] = { 0xD1, 0x8C, 0xD1, 0x8E };
250
+ static const symbol s_5_8[4] = { 0xD0, 0xB8, 0xD1, 0x8E };
251
+ static const symbol s_5_9[2] = { 0xD1, 0x8F };
252
+ static const symbol s_5_10[4] = { 0xD1, 0x8C, 0xD1, 0x8F };
253
+ static const symbol s_5_11[4] = { 0xD0, 0xB8, 0xD1, 0x8F };
254
+ static const symbol s_5_12[2] = { 0xD0, 0xB0 };
255
+ static const symbol s_5_13[4] = { 0xD0, 0xB5, 0xD0, 0xB2 };
256
+ static const symbol s_5_14[4] = { 0xD0, 0xBE, 0xD0, 0xB2 };
257
+ static const symbol s_5_15[2] = { 0xD0, 0xB5 };
258
+ static const symbol s_5_16[4] = { 0xD1, 0x8C, 0xD0, 0xB5 };
259
+ static const symbol s_5_17[4] = { 0xD0, 0xB8, 0xD0, 0xB5 };
260
+ static const symbol s_5_18[2] = { 0xD0, 0xB8 };
261
+ static const symbol s_5_19[4] = { 0xD0, 0xB5, 0xD0, 0xB8 };
262
+ static const symbol s_5_20[4] = { 0xD0, 0xB8, 0xD0, 0xB8 };
263
+ static const symbol s_5_21[6] = { 0xD1, 0x8F, 0xD0, 0xBC, 0xD0, 0xB8 };
264
+ static const symbol s_5_22[8] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD0, 0xBC, 0xD0, 0xB8 };
265
+ static const symbol s_5_23[6] = { 0xD0, 0xB0, 0xD0, 0xBC, 0xD0, 0xB8 };
266
+ static const symbol s_5_24[2] = { 0xD0, 0xB9 };
267
+ static const symbol s_5_25[4] = { 0xD0, 0xB5, 0xD0, 0xB9 };
268
+ static const symbol s_5_26[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xB9 };
269
+ static const symbol s_5_27[4] = { 0xD0, 0xB8, 0xD0, 0xB9 };
270
+ static const symbol s_5_28[4] = { 0xD0, 0xBE, 0xD0, 0xB9 };
271
+ static const symbol s_5_29[4] = { 0xD1, 0x8F, 0xD0, 0xBC };
272
+ static const symbol s_5_30[6] = { 0xD0, 0xB8, 0xD1, 0x8F, 0xD0, 0xBC };
273
+ static const symbol s_5_31[4] = { 0xD0, 0xB0, 0xD0, 0xBC };
274
+ static const symbol s_5_32[4] = { 0xD0, 0xB5, 0xD0, 0xBC };
275
+ static const symbol s_5_33[6] = { 0xD0, 0xB8, 0xD0, 0xB5, 0xD0, 0xBC };
276
+ static const symbol s_5_34[4] = { 0xD0, 0xBE, 0xD0, 0xBC };
277
+ static const symbol s_5_35[2] = { 0xD0, 0xBE };
278
+
279
+ static const struct among a_5[36] =
280
+ {
281
+ /* 0 */ { 2, s_5_0, -1, 1, 0},
282
+ /* 1 */ { 4, s_5_1, -1, 1, 0},
283
+ /* 2 */ { 6, s_5_2, 1, 1, 0},
284
+ /* 3 */ { 4, s_5_3, -1, 1, 0},
285
+ /* 4 */ { 2, s_5_4, -1, 1, 0},
286
+ /* 5 */ { 2, s_5_5, -1, 1, 0},
287
+ /* 6 */ { 2, s_5_6, -1, 1, 0},
288
+ /* 7 */ { 4, s_5_7, 6, 1, 0},
289
+ /* 8 */ { 4, s_5_8, 6, 1, 0},
290
+ /* 9 */ { 2, s_5_9, -1, 1, 0},
291
+ /* 10 */ { 4, s_5_10, 9, 1, 0},
292
+ /* 11 */ { 4, s_5_11, 9, 1, 0},
293
+ /* 12 */ { 2, s_5_12, -1, 1, 0},
294
+ /* 13 */ { 4, s_5_13, -1, 1, 0},
295
+ /* 14 */ { 4, s_5_14, -1, 1, 0},
296
+ /* 15 */ { 2, s_5_15, -1, 1, 0},
297
+ /* 16 */ { 4, s_5_16, 15, 1, 0},
298
+ /* 17 */ { 4, s_5_17, 15, 1, 0},
299
+ /* 18 */ { 2, s_5_18, -1, 1, 0},
300
+ /* 19 */ { 4, s_5_19, 18, 1, 0},
301
+ /* 20 */ { 4, s_5_20, 18, 1, 0},
302
+ /* 21 */ { 6, s_5_21, 18, 1, 0},
303
+ /* 22 */ { 8, s_5_22, 21, 1, 0},
304
+ /* 23 */ { 6, s_5_23, 18, 1, 0},
305
+ /* 24 */ { 2, s_5_24, -1, 1, 0},
306
+ /* 25 */ { 4, s_5_25, 24, 1, 0},
307
+ /* 26 */ { 6, s_5_26, 25, 1, 0},
308
+ /* 27 */ { 4, s_5_27, 24, 1, 0},
309
+ /* 28 */ { 4, s_5_28, 24, 1, 0},
310
+ /* 29 */ { 4, s_5_29, -1, 1, 0},
311
+ /* 30 */ { 6, s_5_30, 29, 1, 0},
312
+ /* 31 */ { 4, s_5_31, -1, 1, 0},
313
+ /* 32 */ { 4, s_5_32, -1, 1, 0},
314
+ /* 33 */ { 6, s_5_33, 32, 1, 0},
315
+ /* 34 */ { 4, s_5_34, -1, 1, 0},
316
+ /* 35 */ { 2, s_5_35, -1, 1, 0}
317
+ };
318
+
319
+ static const symbol s_6_0[6] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82 };
320
+ static const symbol s_6_1[8] = { 0xD0, 0xBE, 0xD1, 0x81, 0xD1, 0x82, 0xD1, 0x8C };
321
+
322
+ static const struct among a_6[2] =
323
+ {
324
+ /* 0 */ { 6, s_6_0, -1, 1, 0},
325
+ /* 1 */ { 8, s_6_1, -1, 1, 0}
326
+ };
327
+
328
+ static const symbol s_7_0[6] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88 };
329
+ static const symbol s_7_1[2] = { 0xD1, 0x8C };
330
+ static const symbol s_7_2[8] = { 0xD0, 0xB5, 0xD0, 0xB9, 0xD1, 0x88, 0xD0, 0xB5 };
331
+ static const symbol s_7_3[2] = { 0xD0, 0xBD };
332
+
333
+ static const struct among a_7[4] =
334
+ {
335
+ /* 0 */ { 6, s_7_0, -1, 1, 0},
336
+ /* 1 */ { 2, s_7_1, -1, 3, 0},
337
+ /* 2 */ { 8, s_7_2, -1, 1, 0},
338
+ /* 3 */ { 2, s_7_3, -1, 2, 0}
339
+ };
340
+
341
+ static const unsigned char g_v[] = { 33, 65, 8, 232 };
342
+
343
+ static const symbol s_0[] = { 0xD0, 0xB0 };
344
+ static const symbol s_1[] = { 0xD1, 0x8F };
345
+ static const symbol s_2[] = { 0xD0, 0xB0 };
346
+ static const symbol s_3[] = { 0xD1, 0x8F };
347
+ static const symbol s_4[] = { 0xD0, 0xB0 };
348
+ static const symbol s_5[] = { 0xD1, 0x8F };
349
+ static const symbol s_6[] = { 0xD0, 0xBD };
350
+ static const symbol s_7[] = { 0xD0, 0xBD };
351
+ static const symbol s_8[] = { 0xD0, 0xBD };
352
+ static const symbol s_9[] = { 0xD0, 0xB8 };
353
+
354
+ static int r_mark_regions(struct SN_env * z) {
355
+ z->I[0] = z->l;
356
+ z->I[1] = z->l;
357
+ { int c1 = z->c; /* do, line 61 */
358
+ { /* gopast */ /* grouping v, line 62 */
359
+ int ret = out_grouping_U(z, g_v, 1072, 1103, 1);
360
+ if (ret < 0) goto lab0;
361
+ z->c += ret;
362
+ }
363
+ z->I[0] = z->c; /* setmark pV, line 62 */
364
+ { /* gopast */ /* non v, line 62 */
365
+ int ret = in_grouping_U(z, g_v, 1072, 1103, 1);
366
+ if (ret < 0) goto lab0;
367
+ z->c += ret;
368
+ }
369
+ { /* gopast */ /* grouping v, line 63 */
370
+ int ret = out_grouping_U(z, g_v, 1072, 1103, 1);
371
+ if (ret < 0) goto lab0;
372
+ z->c += ret;
373
+ }
374
+ { /* gopast */ /* non v, line 63 */
375
+ int ret = in_grouping_U(z, g_v, 1072, 1103, 1);
376
+ if (ret < 0) goto lab0;
377
+ z->c += ret;
378
+ }
379
+ z->I[1] = z->c; /* setmark p2, line 63 */
380
+ lab0:
381
+ z->c = c1;
382
+ }
383
+ return 1;
384
+ }
385
+
386
+ static int r_R2(struct SN_env * z) {
387
+ if (!(z->I[1] <= z->c)) return 0;
388
+ return 1;
389
+ }
390
+
391
+ static int r_perfective_gerund(struct SN_env * z) {
392
+ int among_var;
393
+ z->ket = z->c; /* [, line 72 */
394
+ among_var = find_among_b(z, a_0, 9); /* substring, line 72 */
395
+ if (!(among_var)) return 0;
396
+ z->bra = z->c; /* ], line 72 */
397
+ switch(among_var) {
398
+ case 0: return 0;
399
+ case 1:
400
+ { int m1 = z->l - z->c; (void)m1; /* or, line 76 */
401
+ if (!(eq_s_b(z, 2, s_0))) goto lab1;
402
+ goto lab0;
403
+ lab1:
404
+ z->c = z->l - m1;
405
+ if (!(eq_s_b(z, 2, s_1))) return 0;
406
+ }
407
+ lab0:
408
+ { int ret = slice_del(z); /* delete, line 76 */
409
+ if (ret < 0) return ret;
410
+ }
411
+ break;
412
+ case 2:
413
+ { int ret = slice_del(z); /* delete, line 83 */
414
+ if (ret < 0) return ret;
415
+ }
416
+ break;
417
+ }
418
+ return 1;
419
+ }
420
+
421
+ static int r_adjective(struct SN_env * z) {
422
+ int among_var;
423
+ z->ket = z->c; /* [, line 88 */
424
+ among_var = find_among_b(z, a_1, 26); /* substring, line 88 */
425
+ if (!(among_var)) return 0;
426
+ z->bra = z->c; /* ], line 88 */
427
+ switch(among_var) {
428
+ case 0: return 0;
429
+ case 1:
430
+ { int ret = slice_del(z); /* delete, line 97 */
431
+ if (ret < 0) return ret;
432
+ }
433
+ break;
434
+ }
435
+ return 1;
436
+ }
437
+
438
+ static int r_adjectival(struct SN_env * z) {
439
+ int among_var;
440
+ { int ret = r_adjective(z);
441
+ if (ret == 0) return 0; /* call adjective, line 102 */
442
+ if (ret < 0) return ret;
443
+ }
444
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 109 */
445
+ z->ket = z->c; /* [, line 110 */
446
+ among_var = find_among_b(z, a_2, 8); /* substring, line 110 */
447
+ if (!(among_var)) { z->c = z->l - m_keep; goto lab0; }
448
+ z->bra = z->c; /* ], line 110 */
449
+ switch(among_var) {
450
+ case 0: { z->c = z->l - m_keep; goto lab0; }
451
+ case 1:
452
+ { int m1 = z->l - z->c; (void)m1; /* or, line 115 */
453
+ if (!(eq_s_b(z, 2, s_2))) goto lab2;
454
+ goto lab1;
455
+ lab2:
456
+ z->c = z->l - m1;
457
+ if (!(eq_s_b(z, 2, s_3))) { z->c = z->l - m_keep; goto lab0; }
458
+ }
459
+ lab1:
460
+ { int ret = slice_del(z); /* delete, line 115 */
461
+ if (ret < 0) return ret;
462
+ }
463
+ break;
464
+ case 2:
465
+ { int ret = slice_del(z); /* delete, line 122 */
466
+ if (ret < 0) return ret;
467
+ }
468
+ break;
469
+ }
470
+ lab0:
471
+ ;
472
+ }
473
+ return 1;
474
+ }
475
+
476
+ static int r_reflexive(struct SN_env * z) {
477
+ int among_var;
478
+ z->ket = z->c; /* [, line 129 */
479
+ if (z->c - 3 <= z->lb || (z->p[z->c - 1] != 140 && z->p[z->c - 1] != 143)) return 0;
480
+ among_var = find_among_b(z, a_3, 2); /* substring, line 129 */
481
+ if (!(among_var)) return 0;
482
+ z->bra = z->c; /* ], line 129 */
483
+ switch(among_var) {
484
+ case 0: return 0;
485
+ case 1:
486
+ { int ret = slice_del(z); /* delete, line 132 */
487
+ if (ret < 0) return ret;
488
+ }
489
+ break;
490
+ }
491
+ return 1;
492
+ }
493
+
494
+ static int r_verb(struct SN_env * z) {
495
+ int among_var;
496
+ z->ket = z->c; /* [, line 137 */
497
+ among_var = find_among_b(z, a_4, 46); /* substring, line 137 */
498
+ if (!(among_var)) return 0;
499
+ z->bra = z->c; /* ], line 137 */
500
+ switch(among_var) {
501
+ case 0: return 0;
502
+ case 1:
503
+ { int m1 = z->l - z->c; (void)m1; /* or, line 143 */
504
+ if (!(eq_s_b(z, 2, s_4))) goto lab1;
505
+ goto lab0;
506
+ lab1:
507
+ z->c = z->l - m1;
508
+ if (!(eq_s_b(z, 2, s_5))) return 0;
509
+ }
510
+ lab0:
511
+ { int ret = slice_del(z); /* delete, line 143 */
512
+ if (ret < 0) return ret;
513
+ }
514
+ break;
515
+ case 2:
516
+ { int ret = slice_del(z); /* delete, line 151 */
517
+ if (ret < 0) return ret;
518
+ }
519
+ break;
520
+ }
521
+ return 1;
522
+ }
523
+
524
+ static int r_noun(struct SN_env * z) {
525
+ int among_var;
526
+ z->ket = z->c; /* [, line 160 */
527
+ among_var = find_among_b(z, a_5, 36); /* substring, line 160 */
528
+ if (!(among_var)) return 0;
529
+ z->bra = z->c; /* ], line 160 */
530
+ switch(among_var) {
531
+ case 0: return 0;
532
+ case 1:
533
+ { int ret = slice_del(z); /* delete, line 167 */
534
+ if (ret < 0) return ret;
535
+ }
536
+ break;
537
+ }
538
+ return 1;
539
+ }
540
+
541
+ static int r_derivational(struct SN_env * z) {
542
+ int among_var;
543
+ z->ket = z->c; /* [, line 176 */
544
+ if (z->c - 5 <= z->lb || (z->p[z->c - 1] != 130 && z->p[z->c - 1] != 140)) return 0;
545
+ among_var = find_among_b(z, a_6, 2); /* substring, line 176 */
546
+ if (!(among_var)) return 0;
547
+ z->bra = z->c; /* ], line 176 */
548
+ { int ret = r_R2(z);
549
+ if (ret == 0) return 0; /* call R2, line 176 */
550
+ if (ret < 0) return ret;
551
+ }
552
+ switch(among_var) {
553
+ case 0: return 0;
554
+ case 1:
555
+ { int ret = slice_del(z); /* delete, line 179 */
556
+ if (ret < 0) return ret;
557
+ }
558
+ break;
559
+ }
560
+ return 1;
561
+ }
562
+
563
+ static int r_tidy_up(struct SN_env * z) {
564
+ int among_var;
565
+ z->ket = z->c; /* [, line 184 */
566
+ among_var = find_among_b(z, a_7, 4); /* substring, line 184 */
567
+ if (!(among_var)) return 0;
568
+ z->bra = z->c; /* ], line 184 */
569
+ switch(among_var) {
570
+ case 0: return 0;
571
+ case 1:
572
+ { int ret = slice_del(z); /* delete, line 188 */
573
+ if (ret < 0) return ret;
574
+ }
575
+ z->ket = z->c; /* [, line 189 */
576
+ if (!(eq_s_b(z, 2, s_6))) return 0;
577
+ z->bra = z->c; /* ], line 189 */
578
+ if (!(eq_s_b(z, 2, s_7))) return 0;
579
+ { int ret = slice_del(z); /* delete, line 189 */
580
+ if (ret < 0) return ret;
581
+ }
582
+ break;
583
+ case 2:
584
+ if (!(eq_s_b(z, 2, s_8))) return 0;
585
+ { int ret = slice_del(z); /* delete, line 192 */
586
+ if (ret < 0) return ret;
587
+ }
588
+ break;
589
+ case 3:
590
+ { int ret = slice_del(z); /* delete, line 194 */
591
+ if (ret < 0) return ret;
592
+ }
593
+ break;
594
+ }
595
+ return 1;
596
+ }
597
+
598
+ extern int russian_UTF_8_stem(struct SN_env * z) {
599
+ { int c1 = z->c; /* do, line 201 */
600
+ { int ret = r_mark_regions(z);
601
+ if (ret == 0) goto lab0; /* call mark_regions, line 201 */
602
+ if (ret < 0) return ret;
603
+ }
604
+ lab0:
605
+ z->c = c1;
606
+ }
607
+ z->lb = z->c; z->c = z->l; /* backwards, line 202 */
608
+
609
+ { int mlimit; /* setlimit, line 202 */
610
+ int m2 = z->l - z->c; (void)m2;
611
+ if (z->c < z->I[0]) return 0;
612
+ z->c = z->I[0]; /* tomark, line 202 */
613
+ mlimit = z->lb; z->lb = z->c;
614
+ z->c = z->l - m2;
615
+ { int m3 = z->l - z->c; (void)m3; /* do, line 203 */
616
+ { int m4 = z->l - z->c; (void)m4; /* or, line 204 */
617
+ { int ret = r_perfective_gerund(z);
618
+ if (ret == 0) goto lab3; /* call perfective_gerund, line 204 */
619
+ if (ret < 0) return ret;
620
+ }
621
+ goto lab2;
622
+ lab3:
623
+ z->c = z->l - m4;
624
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 205 */
625
+ { int ret = r_reflexive(z);
626
+ if (ret == 0) { z->c = z->l - m_keep; goto lab4; } /* call reflexive, line 205 */
627
+ if (ret < 0) return ret;
628
+ }
629
+ lab4:
630
+ ;
631
+ }
632
+ { int m5 = z->l - z->c; (void)m5; /* or, line 206 */
633
+ { int ret = r_adjectival(z);
634
+ if (ret == 0) goto lab6; /* call adjectival, line 206 */
635
+ if (ret < 0) return ret;
636
+ }
637
+ goto lab5;
638
+ lab6:
639
+ z->c = z->l - m5;
640
+ { int ret = r_verb(z);
641
+ if (ret == 0) goto lab7; /* call verb, line 206 */
642
+ if (ret < 0) return ret;
643
+ }
644
+ goto lab5;
645
+ lab7:
646
+ z->c = z->l - m5;
647
+ { int ret = r_noun(z);
648
+ if (ret == 0) goto lab1; /* call noun, line 206 */
649
+ if (ret < 0) return ret;
650
+ }
651
+ }
652
+ lab5:
653
+ ;
654
+ }
655
+ lab2:
656
+ lab1:
657
+ z->c = z->l - m3;
658
+ }
659
+ { int m_keep = z->l - z->c;/* (void) m_keep;*/ /* try, line 209 */
660
+ z->ket = z->c; /* [, line 209 */
661
+ if (!(eq_s_b(z, 2, s_9))) { z->c = z->l - m_keep; goto lab8; }
662
+ z->bra = z->c; /* ], line 209 */
663
+ { int ret = slice_del(z); /* delete, line 209 */
664
+ if (ret < 0) return ret;
665
+ }
666
+ lab8:
667
+ ;
668
+ }
669
+ { int m6 = z->l - z->c; (void)m6; /* do, line 212 */
670
+ { int ret = r_derivational(z);
671
+ if (ret == 0) goto lab9; /* call derivational, line 212 */
672
+ if (ret < 0) return ret;
673
+ }
674
+ lab9:
675
+ z->c = z->l - m6;
676
+ }
677
+ { int m7 = z->l - z->c; (void)m7; /* do, line 213 */
678
+ { int ret = r_tidy_up(z);
679
+ if (ret == 0) goto lab10; /* call tidy_up, line 213 */
680
+ if (ret < 0) return ret;
681
+ }
682
+ lab10:
683
+ z->c = z->l - m7;
684
+ }
685
+ z->lb = mlimit;
686
+ }
687
+ z->c = z->lb;
688
+ return 1;
689
+ }
690
+
691
+ extern struct SN_env * russian_UTF_8_create_env(void) { return SN_create_env(0, 2, 0); }
692
+
693
+ extern void russian_UTF_8_close_env(struct SN_env * z) { SN_close_env(z, 0); }
694
+