sdsykes-ferret 0.11.6.19

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