ferret 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. data/Rakefile +23 -5
  2. data/TODO +2 -1
  3. data/ext/analysis.c +838 -177
  4. data/ext/analysis.h +55 -7
  5. data/ext/api.c +69 -0
  6. data/ext/api.h +27 -0
  7. data/ext/array.c +8 -5
  8. data/ext/compound_io.c +132 -96
  9. data/ext/document.c +58 -28
  10. data/ext/except.c +59 -0
  11. data/ext/except.h +88 -0
  12. data/ext/ferret.c +47 -3
  13. data/ext/ferret.h +3 -0
  14. data/ext/field.c +15 -9
  15. data/ext/filter.c +1 -1
  16. data/ext/fs_store.c +215 -34
  17. data/ext/global.c +72 -3
  18. data/ext/global.h +4 -3
  19. data/ext/hash.c +44 -3
  20. data/ext/hash.h +9 -0
  21. data/ext/header.h +58 -0
  22. data/ext/inc/except.h +88 -0
  23. data/ext/inc/lang.h +23 -13
  24. data/ext/ind.c +16 -10
  25. data/ext/index.h +2 -22
  26. data/ext/index_io.c +3 -11
  27. data/ext/index_rw.c +245 -193
  28. data/ext/lang.h +23 -13
  29. data/ext/libstemmer.c +92 -0
  30. data/ext/libstemmer.h +79 -0
  31. data/ext/modules.h +162 -0
  32. data/ext/q_boolean.c +34 -21
  33. data/ext/q_const_score.c +6 -12
  34. data/ext/q_filtered_query.c +206 -0
  35. data/ext/q_fuzzy.c +18 -15
  36. data/ext/q_match_all.c +3 -7
  37. data/ext/q_multi_phrase.c +10 -14
  38. data/ext/q_parser.c +29 -2
  39. data/ext/q_phrase.c +14 -21
  40. data/ext/q_prefix.c +15 -12
  41. data/ext/q_range.c +30 -28
  42. data/ext/q_span.c +13 -21
  43. data/ext/q_term.c +17 -26
  44. data/ext/r_analysis.c +693 -21
  45. data/ext/r_doc.c +11 -12
  46. data/ext/r_index_io.c +4 -1
  47. data/ext/r_qparser.c +21 -2
  48. data/ext/r_search.c +285 -18
  49. data/ext/ram_store.c +5 -2
  50. data/ext/search.c +11 -17
  51. data/ext/search.h +21 -45
  52. data/ext/similarity.h +67 -0
  53. data/ext/sort.c +30 -25
  54. data/ext/stem_ISO_8859_1_danish.c +338 -0
  55. data/ext/stem_ISO_8859_1_danish.h +16 -0
  56. data/ext/stem_ISO_8859_1_dutch.c +635 -0
  57. data/ext/stem_ISO_8859_1_dutch.h +16 -0
  58. data/ext/stem_ISO_8859_1_english.c +1156 -0
  59. data/ext/stem_ISO_8859_1_english.h +16 -0
  60. data/ext/stem_ISO_8859_1_finnish.c +792 -0
  61. data/ext/stem_ISO_8859_1_finnish.h +16 -0
  62. data/ext/stem_ISO_8859_1_french.c +1276 -0
  63. data/ext/stem_ISO_8859_1_french.h +16 -0
  64. data/ext/stem_ISO_8859_1_german.c +512 -0
  65. data/ext/stem_ISO_8859_1_german.h +16 -0
  66. data/ext/stem_ISO_8859_1_italian.c +1091 -0
  67. data/ext/stem_ISO_8859_1_italian.h +16 -0
  68. data/ext/stem_ISO_8859_1_norwegian.c +296 -0
  69. data/ext/stem_ISO_8859_1_norwegian.h +16 -0
  70. data/ext/stem_ISO_8859_1_porter.c +776 -0
  71. data/ext/stem_ISO_8859_1_porter.h +16 -0
  72. data/ext/stem_ISO_8859_1_portuguese.c +1035 -0
  73. data/ext/stem_ISO_8859_1_portuguese.h +16 -0
  74. data/ext/stem_ISO_8859_1_spanish.c +1119 -0
  75. data/ext/stem_ISO_8859_1_spanish.h +16 -0
  76. data/ext/stem_ISO_8859_1_swedish.c +307 -0
  77. data/ext/stem_ISO_8859_1_swedish.h +16 -0
  78. data/ext/stem_KOI8_R_russian.c +701 -0
  79. data/ext/stem_KOI8_R_russian.h +16 -0
  80. data/ext/stem_UTF_8_danish.c +344 -0
  81. data/ext/stem_UTF_8_danish.h +16 -0
  82. data/ext/stem_UTF_8_dutch.c +653 -0
  83. data/ext/stem_UTF_8_dutch.h +16 -0
  84. data/ext/stem_UTF_8_english.c +1176 -0
  85. data/ext/stem_UTF_8_english.h +16 -0
  86. data/ext/stem_UTF_8_finnish.c +808 -0
  87. data/ext/stem_UTF_8_finnish.h +16 -0
  88. data/ext/stem_UTF_8_french.c +1296 -0
  89. data/ext/stem_UTF_8_french.h +16 -0
  90. data/ext/stem_UTF_8_german.c +526 -0
  91. data/ext/stem_UTF_8_german.h +16 -0
  92. data/ext/stem_UTF_8_italian.c +1113 -0
  93. data/ext/stem_UTF_8_italian.h +16 -0
  94. data/ext/stem_UTF_8_norwegian.c +302 -0
  95. data/ext/stem_UTF_8_norwegian.h +16 -0
  96. data/ext/stem_UTF_8_porter.c +794 -0
  97. data/ext/stem_UTF_8_porter.h +16 -0
  98. data/ext/stem_UTF_8_portuguese.c +1055 -0
  99. data/ext/stem_UTF_8_portuguese.h +16 -0
  100. data/ext/stem_UTF_8_russian.c +709 -0
  101. data/ext/stem_UTF_8_russian.h +16 -0
  102. data/ext/stem_UTF_8_spanish.c +1137 -0
  103. data/ext/stem_UTF_8_spanish.h +16 -0
  104. data/ext/stem_UTF_8_swedish.c +313 -0
  105. data/ext/stem_UTF_8_swedish.h +16 -0
  106. data/ext/stopwords.c +325 -0
  107. data/ext/store.c +34 -2
  108. data/ext/tags +2953 -0
  109. data/ext/term.c +21 -15
  110. data/ext/termdocs.c +5 -3
  111. data/ext/utilities.c +446 -0
  112. data/ext/vector.c +27 -13
  113. data/lib/ferret/document/document.rb +1 -1
  114. data/lib/ferret/index/index.rb +44 -6
  115. data/lib/ferret/query_parser/query_parser.tab.rb +7 -3
  116. data/lib/rferret.rb +2 -1
  117. data/test/test_helper.rb +2 -2
  118. data/test/unit/analysis/ctc_analyzer.rb +401 -0
  119. data/test/unit/analysis/ctc_tokenstream.rb +423 -0
  120. data/test/unit/analysis/{tc_letter_tokenizer.rb → rtc_letter_tokenizer.rb} +0 -0
  121. data/test/unit/analysis/{tc_lower_case_filter.rb → rtc_lower_case_filter.rb} +0 -0
  122. data/test/unit/analysis/{tc_lower_case_tokenizer.rb → rtc_lower_case_tokenizer.rb} +0 -0
  123. data/test/unit/analysis/{tc_per_field_analyzer_wrapper.rb → rtc_per_field_analyzer_wrapper.rb} +0 -0
  124. data/test/unit/analysis/{tc_porter_stem_filter.rb → rtc_porter_stem_filter.rb} +0 -0
  125. data/test/unit/analysis/{tc_standard_analyzer.rb → rtc_standard_analyzer.rb} +0 -0
  126. data/test/unit/analysis/{tc_standard_tokenizer.rb → rtc_standard_tokenizer.rb} +0 -0
  127. data/test/unit/analysis/{tc_stop_analyzer.rb → rtc_stop_analyzer.rb} +0 -0
  128. data/test/unit/analysis/{tc_stop_filter.rb → rtc_stop_filter.rb} +0 -0
  129. data/test/unit/analysis/{tc_white_space_analyzer.rb → rtc_white_space_analyzer.rb} +0 -0
  130. data/test/unit/analysis/{tc_white_space_tokenizer.rb → rtc_white_space_tokenizer.rb} +0 -0
  131. data/test/unit/analysis/{tc_word_list_loader.rb → rtc_word_list_loader.rb} +0 -0
  132. data/test/unit/analysis/tc_analyzer.rb +1 -2
  133. data/test/unit/analysis/{c_token.rb → tc_token.rb} +0 -0
  134. data/test/unit/document/rtc_field.rb +28 -0
  135. data/test/unit/document/{c_document.rb → tc_document.rb} +0 -0
  136. data/test/unit/document/tc_field.rb +82 -12
  137. data/test/unit/index/{tc_compound_file_io.rb → rtc_compound_file_io.rb} +0 -0
  138. data/test/unit/index/{tc_field_infos.rb → rtc_field_infos.rb} +0 -0
  139. data/test/unit/index/{tc_fields_io.rb → rtc_fields_io.rb} +0 -0
  140. data/test/unit/index/{tc_multiple_term_doc_pos_enum.rb → rtc_multiple_term_doc_pos_enum.rb} +0 -0
  141. data/test/unit/index/{tc_segment_infos.rb → rtc_segment_infos.rb} +0 -0
  142. data/test/unit/index/{tc_segment_term_docs.rb → rtc_segment_term_docs.rb} +0 -0
  143. data/test/unit/index/{tc_segment_term_enum.rb → rtc_segment_term_enum.rb} +0 -0
  144. data/test/unit/index/{tc_segment_term_vector.rb → rtc_segment_term_vector.rb} +0 -0
  145. data/test/unit/index/{tc_term_buffer.rb → rtc_term_buffer.rb} +0 -0
  146. data/test/unit/index/{tc_term_info.rb → rtc_term_info.rb} +0 -0
  147. data/test/unit/index/{tc_term_infos_io.rb → rtc_term_infos_io.rb} +0 -0
  148. data/test/unit/index/{tc_term_vectors_io.rb → rtc_term_vectors_io.rb} +0 -0
  149. data/test/unit/index/{c_index.rb → tc_index.rb} +26 -6
  150. data/test/unit/index/{c_index_reader.rb → tc_index_reader.rb} +0 -0
  151. data/test/unit/index/{c_index_writer.rb → tc_index_writer.rb} +0 -0
  152. data/test/unit/index/{c_term.rb → tc_term.rb} +0 -0
  153. data/test/unit/index/{c_term_voi.rb → tc_term_voi.rb} +0 -0
  154. data/test/unit/query_parser/{c_query_parser.rb → rtc_query_parser.rb} +14 -14
  155. data/test/unit/query_parser/tc_query_parser.rb +24 -16
  156. data/test/unit/search/{tc_similarity.rb → rtc_similarity.rb} +0 -0
  157. data/test/unit/search/rtc_sort_field.rb +14 -0
  158. data/test/unit/search/{c_filter.rb → tc_filter.rb} +11 -11
  159. data/test/unit/search/{c_fuzzy_query.rb → tc_fuzzy_query.rb} +0 -0
  160. data/test/unit/search/{c_index_searcher.rb → tc_index_searcher.rb} +0 -0
  161. data/test/unit/search/{c_search_and_sort.rb → tc_search_and_sort.rb} +0 -0
  162. data/test/unit/search/{c_sort.rb → tc_sort.rb} +0 -0
  163. data/test/unit/search/tc_sort_field.rb +20 -7
  164. data/test/unit/search/{c_spans.rb → tc_spans.rb} +0 -0
  165. data/test/unit/store/rtc_fs_store.rb +62 -0
  166. data/test/unit/store/rtc_ram_store.rb +15 -0
  167. data/test/unit/store/rtm_store.rb +150 -0
  168. data/test/unit/store/rtm_store_lock.rb +2 -0
  169. data/test/unit/store/tc_fs_store.rb +54 -40
  170. data/test/unit/store/tc_ram_store.rb +20 -0
  171. data/test/unit/store/tm_store.rb +30 -146
  172. data/test/unit/store/tm_store_lock.rb +66 -0
  173. data/test/unit/utils/{tc_bit_vector.rb → rtc_bit_vector.rb} +0 -0
  174. data/test/unit/utils/{tc_date_tools.rb → rtc_date_tools.rb} +0 -0
  175. data/test/unit/utils/{tc_number_tools.rb → rtc_number_tools.rb} +0 -0
  176. data/test/unit/utils/{tc_parameter.rb → rtc_parameter.rb} +0 -0
  177. data/test/unit/utils/{tc_priority_queue.rb → rtc_priority_queue.rb} +0 -0
  178. data/test/unit/utils/{tc_string_helper.rb → rtc_string_helper.rb} +0 -0
  179. data/test/unit/utils/{tc_thread.rb → rtc_thread.rb} +0 -0
  180. data/test/unit/utils/{tc_weak_key_hash.rb → rtc_weak_key_hash.rb} +0 -0
  181. metadata +360 -289
  182. data/test/unit/document/c_field.rb +0 -98
  183. data/test/unit/search/c_sort_field.rb +0 -27
  184. data/test/unit/store/c_fs_store.rb +0 -76
  185. data/test/unit/store/c_ram_store.rb +0 -35
  186. data/test/unit/store/m_store.rb +0 -34
  187. data/test/unit/store/m_store_lock.rb +0 -68
@@ -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
+