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 * porter_UTF_8_create_env(void);
9
+ extern void porter_UTF_8_close_env(struct SN_env * z);
10
+
11
+ extern int porter_UTF_8_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,1055 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int portuguese_UTF_8_stem(struct SN_env * z);
7
+ static int r_residual_form(struct SN_env * z);
8
+ static int r_residual_suffix(struct SN_env * z);
9
+ static int r_verb_suffix(struct SN_env * z);
10
+ static int r_standard_suffix(struct SN_env * z);
11
+ static int r_R2(struct SN_env * z);
12
+ static int r_R1(struct SN_env * z);
13
+ static int r_RV(struct SN_env * z);
14
+ static int r_mark_regions(struct SN_env * z);
15
+ static int r_postlude(struct SN_env * z);
16
+ static int r_prelude(struct SN_env * z);
17
+
18
+ extern struct SN_env * portuguese_UTF_8_create_env(void);
19
+ extern void portuguese_UTF_8_close_env(struct SN_env * z);
20
+
21
+ static symbol s_0_1[2] = { 0xC3, 0xA3 };
22
+ static symbol s_0_2[2] = { 0xC3, 0xB5 };
23
+
24
+ static struct among a_0[3] =
25
+ {
26
+ /* 0 */ { 0, 0, -1, 3, 0},
27
+ /* 1 */ { 2, s_0_1, 0, 1, 0},
28
+ /* 2 */ { 2, s_0_2, 0, 2, 0}
29
+ };
30
+
31
+ static symbol s_1_1[2] = { 'a', '~' };
32
+ static symbol s_1_2[2] = { 'o', '~' };
33
+
34
+ static struct among a_1[3] =
35
+ {
36
+ /* 0 */ { 0, 0, -1, 3, 0},
37
+ /* 1 */ { 2, s_1_1, 0, 1, 0},
38
+ /* 2 */ { 2, s_1_2, 0, 2, 0}
39
+ };
40
+
41
+ static symbol s_2_0[2] = { 'i', 'c' };
42
+ static symbol s_2_1[2] = { 'a', 'd' };
43
+ static symbol s_2_2[2] = { 'o', 's' };
44
+ static symbol s_2_3[2] = { 'i', 'v' };
45
+
46
+ static struct among a_2[4] =
47
+ {
48
+ /* 0 */ { 2, s_2_0, -1, -1, 0},
49
+ /* 1 */ { 2, s_2_1, -1, -1, 0},
50
+ /* 2 */ { 2, s_2_2, -1, -1, 0},
51
+ /* 3 */ { 2, s_2_3, -1, 1, 0}
52
+ };
53
+
54
+ static symbol s_3_0[4] = { 'a', 'n', 't', 'e' };
55
+ static symbol s_3_1[4] = { 'a', 'v', 'e', 'l' };
56
+ static symbol s_3_2[5] = { 0xC3, 0xAD, 'v', 'e', 'l' };
57
+
58
+ static struct among a_3[3] =
59
+ {
60
+ /* 0 */ { 4, s_3_0, -1, 1, 0},
61
+ /* 1 */ { 4, s_3_1, -1, 1, 0},
62
+ /* 2 */ { 5, s_3_2, -1, 1, 0}
63
+ };
64
+
65
+ static symbol s_4_0[2] = { 'i', 'c' };
66
+ static symbol s_4_1[4] = { 'a', 'b', 'i', 'l' };
67
+ static symbol s_4_2[2] = { 'i', 'v' };
68
+
69
+ static struct among a_4[3] =
70
+ {
71
+ /* 0 */ { 2, s_4_0, -1, 1, 0},
72
+ /* 1 */ { 4, s_4_1, -1, 1, 0},
73
+ /* 2 */ { 2, s_4_2, -1, 1, 0}
74
+ };
75
+
76
+ static symbol s_5_0[3] = { 'i', 'c', 'a' };
77
+ static symbol s_5_1[6] = { 0xC3, 0xA2, 'n', 'c', 'i', 'a' };
78
+ static symbol s_5_2[6] = { 0xC3, 0xAA, 'n', 'c', 'i', 'a' };
79
+ static symbol s_5_3[3] = { 'i', 'r', 'a' };
80
+ static symbol s_5_4[5] = { 'a', 'd', 'o', 'r', 'a' };
81
+ static symbol s_5_5[3] = { 'o', 's', 'a' };
82
+ static symbol s_5_6[4] = { 'i', 's', 't', 'a' };
83
+ static symbol s_5_7[3] = { 'i', 'v', 'a' };
84
+ static symbol s_5_8[3] = { 'e', 'z', 'a' };
85
+ static symbol s_5_9[6] = { 'l', 'o', 'g', 0xC3, 0xAD, 'a' };
86
+ static symbol s_5_10[5] = { 'i', 'd', 'a', 'd', 'e' };
87
+ static symbol s_5_11[4] = { 'a', 'n', 't', 'e' };
88
+ static symbol s_5_12[5] = { 'm', 'e', 'n', 't', 'e' };
89
+ static symbol s_5_13[6] = { 'a', 'm', 'e', 'n', 't', 'e' };
90
+ static symbol s_5_14[5] = { 0xC3, 0xA1, 'v', 'e', 'l' };
91
+ static symbol s_5_15[5] = { 0xC3, 0xAD, 'v', 'e', 'l' };
92
+ static symbol s_5_16[6] = { 'u', 'c', 'i', 0xC3, 0xB3, 'n' };
93
+ static symbol s_5_17[3] = { 'i', 'c', 'o' };
94
+ static symbol s_5_18[4] = { 'i', 's', 'm', 'o' };
95
+ static symbol s_5_19[3] = { 'o', 's', 'o' };
96
+ static symbol s_5_20[6] = { 'a', 'm', 'e', 'n', 't', 'o' };
97
+ static symbol s_5_21[6] = { 'i', 'm', 'e', 'n', 't', 'o' };
98
+ static symbol s_5_22[3] = { 'i', 'v', 'o' };
99
+ static symbol s_5_23[6] = { 'a', 0xC3, 0xA7, 'a', '~', 'o' };
100
+ static symbol s_5_24[4] = { 'a', 'd', 'o', 'r' };
101
+ static symbol s_5_25[4] = { 'i', 'c', 'a', 's' };
102
+ static symbol s_5_26[7] = { 0xC3, 0xAA, 'n', 'c', 'i', 'a', 's' };
103
+ static symbol s_5_27[4] = { 'i', 'r', 'a', 's' };
104
+ static symbol s_5_28[6] = { 'a', 'd', 'o', 'r', 'a', 's' };
105
+ static symbol s_5_29[4] = { 'o', 's', 'a', 's' };
106
+ static symbol s_5_30[5] = { 'i', 's', 't', 'a', 's' };
107
+ static symbol s_5_31[4] = { 'i', 'v', 'a', 's' };
108
+ static symbol s_5_32[4] = { 'e', 'z', 'a', 's' };
109
+ static symbol s_5_33[7] = { 'l', 'o', 'g', 0xC3, 0xAD, 'a', 's' };
110
+ static symbol s_5_34[6] = { 'i', 'd', 'a', 'd', 'e', 's' };
111
+ static symbol s_5_35[7] = { 'u', 'c', 'i', 'o', 'n', 'e', 's' };
112
+ static symbol s_5_36[6] = { 'a', 'd', 'o', 'r', 'e', 's' };
113
+ static symbol s_5_37[5] = { 'a', 'n', 't', 'e', 's' };
114
+ static symbol s_5_38[7] = { 'a', 0xC3, 0xA7, 'o', '~', 'e', 's' };
115
+ static symbol s_5_39[4] = { 'i', 'c', 'o', 's' };
116
+ static symbol s_5_40[5] = { 'i', 's', 'm', 'o', 's' };
117
+ static symbol s_5_41[4] = { 'o', 's', 'o', 's' };
118
+ static symbol s_5_42[7] = { 'a', 'm', 'e', 'n', 't', 'o', 's' };
119
+ static symbol s_5_43[7] = { 'i', 'm', 'e', 'n', 't', 'o', 's' };
120
+ static symbol s_5_44[4] = { 'i', 'v', 'o', 's' };
121
+
122
+ static struct among a_5[45] =
123
+ {
124
+ /* 0 */ { 3, s_5_0, -1, 1, 0},
125
+ /* 1 */ { 6, s_5_1, -1, 1, 0},
126
+ /* 2 */ { 6, s_5_2, -1, 4, 0},
127
+ /* 3 */ { 3, s_5_3, -1, 9, 0},
128
+ /* 4 */ { 5, s_5_4, -1, 1, 0},
129
+ /* 5 */ { 3, s_5_5, -1, 1, 0},
130
+ /* 6 */ { 4, s_5_6, -1, 1, 0},
131
+ /* 7 */ { 3, s_5_7, -1, 8, 0},
132
+ /* 8 */ { 3, s_5_8, -1, 1, 0},
133
+ /* 9 */ { 6, s_5_9, -1, 2, 0},
134
+ /* 10 */ { 5, s_5_10, -1, 7, 0},
135
+ /* 11 */ { 4, s_5_11, -1, 1, 0},
136
+ /* 12 */ { 5, s_5_12, -1, 6, 0},
137
+ /* 13 */ { 6, s_5_13, 12, 5, 0},
138
+ /* 14 */ { 5, s_5_14, -1, 1, 0},
139
+ /* 15 */ { 5, s_5_15, -1, 1, 0},
140
+ /* 16 */ { 6, s_5_16, -1, 3, 0},
141
+ /* 17 */ { 3, s_5_17, -1, 1, 0},
142
+ /* 18 */ { 4, s_5_18, -1, 1, 0},
143
+ /* 19 */ { 3, s_5_19, -1, 1, 0},
144
+ /* 20 */ { 6, s_5_20, -1, 1, 0},
145
+ /* 21 */ { 6, s_5_21, -1, 1, 0},
146
+ /* 22 */ { 3, s_5_22, -1, 8, 0},
147
+ /* 23 */ { 6, s_5_23, -1, 1, 0},
148
+ /* 24 */ { 4, s_5_24, -1, 1, 0},
149
+ /* 25 */ { 4, s_5_25, -1, 1, 0},
150
+ /* 26 */ { 7, s_5_26, -1, 4, 0},
151
+ /* 27 */ { 4, s_5_27, -1, 9, 0},
152
+ /* 28 */ { 6, s_5_28, -1, 1, 0},
153
+ /* 29 */ { 4, s_5_29, -1, 1, 0},
154
+ /* 30 */ { 5, s_5_30, -1, 1, 0},
155
+ /* 31 */ { 4, s_5_31, -1, 8, 0},
156
+ /* 32 */ { 4, s_5_32, -1, 1, 0},
157
+ /* 33 */ { 7, s_5_33, -1, 2, 0},
158
+ /* 34 */ { 6, s_5_34, -1, 7, 0},
159
+ /* 35 */ { 7, s_5_35, -1, 3, 0},
160
+ /* 36 */ { 6, s_5_36, -1, 1, 0},
161
+ /* 37 */ { 5, s_5_37, -1, 1, 0},
162
+ /* 38 */ { 7, s_5_38, -1, 1, 0},
163
+ /* 39 */ { 4, s_5_39, -1, 1, 0},
164
+ /* 40 */ { 5, s_5_40, -1, 1, 0},
165
+ /* 41 */ { 4, s_5_41, -1, 1, 0},
166
+ /* 42 */ { 7, s_5_42, -1, 1, 0},
167
+ /* 43 */ { 7, s_5_43, -1, 1, 0},
168
+ /* 44 */ { 4, s_5_44, -1, 8, 0}
169
+ };
170
+
171
+ static symbol s_6_0[3] = { 'a', 'd', 'a' };
172
+ static symbol s_6_1[3] = { 'i', 'd', 'a' };
173
+ static symbol s_6_2[2] = { 'i', 'a' };
174
+ static symbol s_6_3[4] = { 'a', 'r', 'i', 'a' };
175
+ static symbol s_6_4[4] = { 'e', 'r', 'i', 'a' };
176
+ static symbol s_6_5[4] = { 'i', 'r', 'i', 'a' };
177
+ static symbol s_6_6[3] = { 'a', 'r', 'a' };
178
+ static symbol s_6_7[3] = { 'e', 'r', 'a' };
179
+ static symbol s_6_8[3] = { 'i', 'r', 'a' };
180
+ static symbol s_6_9[3] = { 'a', 'v', 'a' };
181
+ static symbol s_6_10[4] = { 'a', 's', 's', 'e' };
182
+ static symbol s_6_11[4] = { 'e', 's', 's', 'e' };
183
+ static symbol s_6_12[4] = { 'i', 's', 's', 'e' };
184
+ static symbol s_6_13[4] = { 'a', 's', 't', 'e' };
185
+ static symbol s_6_14[4] = { 'e', 's', 't', 'e' };
186
+ static symbol s_6_15[4] = { 'i', 's', 't', 'e' };
187
+ static symbol s_6_16[2] = { 'e', 'i' };
188
+ static symbol s_6_17[4] = { 'a', 'r', 'e', 'i' };
189
+ static symbol s_6_18[4] = { 'e', 'r', 'e', 'i' };
190
+ static symbol s_6_19[4] = { 'i', 'r', 'e', 'i' };
191
+ static symbol s_6_20[2] = { 'a', 'm' };
192
+ static symbol s_6_21[3] = { 'i', 'a', 'm' };
193
+ static symbol s_6_22[5] = { 'a', 'r', 'i', 'a', 'm' };
194
+ static symbol s_6_23[5] = { 'e', 'r', 'i', 'a', 'm' };
195
+ static symbol s_6_24[5] = { 'i', 'r', 'i', 'a', 'm' };
196
+ static symbol s_6_25[4] = { 'a', 'r', 'a', 'm' };
197
+ static symbol s_6_26[4] = { 'e', 'r', 'a', 'm' };
198
+ static symbol s_6_27[4] = { 'i', 'r', 'a', 'm' };
199
+ static symbol s_6_28[4] = { 'a', 'v', 'a', 'm' };
200
+ static symbol s_6_29[2] = { 'e', 'm' };
201
+ static symbol s_6_30[4] = { 'a', 'r', 'e', 'm' };
202
+ static symbol s_6_31[4] = { 'e', 'r', 'e', 'm' };
203
+ static symbol s_6_32[4] = { 'i', 'r', 'e', 'm' };
204
+ static symbol s_6_33[5] = { 'a', 's', 's', 'e', 'm' };
205
+ static symbol s_6_34[5] = { 'e', 's', 's', 'e', 'm' };
206
+ static symbol s_6_35[5] = { 'i', 's', 's', 'e', 'm' };
207
+ static symbol s_6_36[3] = { 'a', 'd', 'o' };
208
+ static symbol s_6_37[3] = { 'i', 'd', 'o' };
209
+ static symbol s_6_38[4] = { 'a', 'n', 'd', 'o' };
210
+ static symbol s_6_39[4] = { 'e', 'n', 'd', 'o' };
211
+ static symbol s_6_40[4] = { 'i', 'n', 'd', 'o' };
212
+ static symbol s_6_41[5] = { 'a', 'r', 'a', '~', 'o' };
213
+ static symbol s_6_42[5] = { 'e', 'r', 'a', '~', 'o' };
214
+ static symbol s_6_43[5] = { 'i', 'r', 'a', '~', 'o' };
215
+ static symbol s_6_44[2] = { 'a', 'r' };
216
+ static symbol s_6_45[2] = { 'e', 'r' };
217
+ static symbol s_6_46[2] = { 'i', 'r' };
218
+ static symbol s_6_47[2] = { 'a', 's' };
219
+ static symbol s_6_48[4] = { 'a', 'd', 'a', 's' };
220
+ static symbol s_6_49[4] = { 'i', 'd', 'a', 's' };
221
+ static symbol s_6_50[3] = { 'i', 'a', 's' };
222
+ static symbol s_6_51[5] = { 'a', 'r', 'i', 'a', 's' };
223
+ static symbol s_6_52[5] = { 'e', 'r', 'i', 'a', 's' };
224
+ static symbol s_6_53[5] = { 'i', 'r', 'i', 'a', 's' };
225
+ static symbol s_6_54[4] = { 'a', 'r', 'a', 's' };
226
+ static symbol s_6_55[4] = { 'e', 'r', 'a', 's' };
227
+ static symbol s_6_56[4] = { 'i', 'r', 'a', 's' };
228
+ static symbol s_6_57[4] = { 'a', 'v', 'a', 's' };
229
+ static symbol s_6_58[2] = { 'e', 's' };
230
+ static symbol s_6_59[5] = { 'a', 'r', 'd', 'e', 's' };
231
+ static symbol s_6_60[5] = { 'e', 'r', 'd', 'e', 's' };
232
+ static symbol s_6_61[5] = { 'i', 'r', 'd', 'e', 's' };
233
+ static symbol s_6_62[4] = { 'a', 'r', 'e', 's' };
234
+ static symbol s_6_63[4] = { 'e', 'r', 'e', 's' };
235
+ static symbol s_6_64[4] = { 'i', 'r', 'e', 's' };
236
+ static symbol s_6_65[5] = { 'a', 's', 's', 'e', 's' };
237
+ static symbol s_6_66[5] = { 'e', 's', 's', 'e', 's' };
238
+ static symbol s_6_67[5] = { 'i', 's', 's', 'e', 's' };
239
+ static symbol s_6_68[5] = { 'a', 's', 't', 'e', 's' };
240
+ static symbol s_6_69[5] = { 'e', 's', 't', 'e', 's' };
241
+ static symbol s_6_70[5] = { 'i', 's', 't', 'e', 's' };
242
+ static symbol s_6_71[2] = { 'i', 's' };
243
+ static symbol s_6_72[3] = { 'a', 'i', 's' };
244
+ static symbol s_6_73[3] = { 'e', 'i', 's' };
245
+ static symbol s_6_74[5] = { 'a', 'r', 'e', 'i', 's' };
246
+ static symbol s_6_75[5] = { 'e', 'r', 'e', 'i', 's' };
247
+ static symbol s_6_76[5] = { 'i', 'r', 'e', 'i', 's' };
248
+ static symbol s_6_77[6] = { 0xC3, 0xA1, 'r', 'e', 'i', 's' };
249
+ static symbol s_6_78[6] = { 0xC3, 0xA9, 'r', 'e', 'i', 's' };
250
+ static symbol s_6_79[6] = { 0xC3, 0xAD, 'r', 'e', 'i', 's' };
251
+ static symbol s_6_80[7] = { 0xC3, 0xA1, 's', 's', 'e', 'i', 's' };
252
+ static symbol s_6_81[7] = { 0xC3, 0xA9, 's', 's', 'e', 'i', 's' };
253
+ static symbol s_6_82[7] = { 0xC3, 0xAD, 's', 's', 'e', 'i', 's' };
254
+ static symbol s_6_83[6] = { 0xC3, 0xA1, 'v', 'e', 'i', 's' };
255
+ static symbol s_6_84[5] = { 0xC3, 0xAD, 'e', 'i', 's' };
256
+ static symbol s_6_85[7] = { 'a', 'r', 0xC3, 0xAD, 'e', 'i', 's' };
257
+ static symbol s_6_86[7] = { 'e', 'r', 0xC3, 0xAD, 'e', 'i', 's' };
258
+ static symbol s_6_87[7] = { 'i', 'r', 0xC3, 0xAD, 'e', 'i', 's' };
259
+ static symbol s_6_88[4] = { 'a', 'd', 'o', 's' };
260
+ static symbol s_6_89[4] = { 'i', 'd', 'o', 's' };
261
+ static symbol s_6_90[4] = { 'a', 'm', 'o', 's' };
262
+ static symbol s_6_91[7] = { 0xC3, 0xA1, 'r', 'a', 'm', 'o', 's' };
263
+ static symbol s_6_92[7] = { 0xC3, 0xA9, 'r', 'a', 'm', 'o', 's' };
264
+ static symbol s_6_93[7] = { 0xC3, 0xAD, 'r', 'a', 'm', 'o', 's' };
265
+ static symbol s_6_94[7] = { 0xC3, 0xA1, 'v', 'a', 'm', 'o', 's' };
266
+ static symbol s_6_95[6] = { 0xC3, 0xAD, 'a', 'm', 'o', 's' };
267
+ static symbol s_6_96[8] = { 'a', 'r', 0xC3, 0xAD, 'a', 'm', 'o', 's' };
268
+ static symbol s_6_97[8] = { 'e', 'r', 0xC3, 0xAD, 'a', 'm', 'o', 's' };
269
+ static symbol s_6_98[8] = { 'i', 'r', 0xC3, 0xAD, 'a', 'm', 'o', 's' };
270
+ static symbol s_6_99[4] = { 'e', 'm', 'o', 's' };
271
+ static symbol s_6_100[6] = { 'a', 'r', 'e', 'm', 'o', 's' };
272
+ static symbol s_6_101[6] = { 'e', 'r', 'e', 'm', 'o', 's' };
273
+ static symbol s_6_102[6] = { 'i', 'r', 'e', 'm', 'o', 's' };
274
+ static symbol s_6_103[8] = { 0xC3, 0xA1, 's', 's', 'e', 'm', 'o', 's' };
275
+ static symbol s_6_104[8] = { 0xC3, 0xAA, 's', 's', 'e', 'm', 'o', 's' };
276
+ static symbol s_6_105[8] = { 0xC3, 0xAD, 's', 's', 'e', 'm', 'o', 's' };
277
+ static symbol s_6_106[4] = { 'i', 'm', 'o', 's' };
278
+ static symbol s_6_107[5] = { 'a', 'r', 'm', 'o', 's' };
279
+ static symbol s_6_108[5] = { 'e', 'r', 'm', 'o', 's' };
280
+ static symbol s_6_109[5] = { 'i', 'r', 'm', 'o', 's' };
281
+ static symbol s_6_110[5] = { 0xC3, 0xA1, 'm', 'o', 's' };
282
+ static symbol s_6_111[5] = { 'a', 'r', 0xC3, 0xA1, 's' };
283
+ static symbol s_6_112[5] = { 'e', 'r', 0xC3, 0xA1, 's' };
284
+ static symbol s_6_113[5] = { 'i', 'r', 0xC3, 0xA1, 's' };
285
+ static symbol s_6_114[2] = { 'e', 'u' };
286
+ static symbol s_6_115[2] = { 'i', 'u' };
287
+ static symbol s_6_116[2] = { 'o', 'u' };
288
+ static symbol s_6_117[4] = { 'a', 'r', 0xC3, 0xA1 };
289
+ static symbol s_6_118[4] = { 'e', 'r', 0xC3, 0xA1 };
290
+ static symbol s_6_119[4] = { 'i', 'r', 0xC3, 0xA1 };
291
+
292
+ static struct among a_6[120] =
293
+ {
294
+ /* 0 */ { 3, s_6_0, -1, 1, 0},
295
+ /* 1 */ { 3, s_6_1, -1, 1, 0},
296
+ /* 2 */ { 2, s_6_2, -1, 1, 0},
297
+ /* 3 */ { 4, s_6_3, 2, 1, 0},
298
+ /* 4 */ { 4, s_6_4, 2, 1, 0},
299
+ /* 5 */ { 4, s_6_5, 2, 1, 0},
300
+ /* 6 */ { 3, s_6_6, -1, 1, 0},
301
+ /* 7 */ { 3, s_6_7, -1, 1, 0},
302
+ /* 8 */ { 3, s_6_8, -1, 1, 0},
303
+ /* 9 */ { 3, s_6_9, -1, 1, 0},
304
+ /* 10 */ { 4, s_6_10, -1, 1, 0},
305
+ /* 11 */ { 4, s_6_11, -1, 1, 0},
306
+ /* 12 */ { 4, s_6_12, -1, 1, 0},
307
+ /* 13 */ { 4, s_6_13, -1, 1, 0},
308
+ /* 14 */ { 4, s_6_14, -1, 1, 0},
309
+ /* 15 */ { 4, s_6_15, -1, 1, 0},
310
+ /* 16 */ { 2, s_6_16, -1, 1, 0},
311
+ /* 17 */ { 4, s_6_17, 16, 1, 0},
312
+ /* 18 */ { 4, s_6_18, 16, 1, 0},
313
+ /* 19 */ { 4, s_6_19, 16, 1, 0},
314
+ /* 20 */ { 2, s_6_20, -1, 1, 0},
315
+ /* 21 */ { 3, s_6_21, 20, 1, 0},
316
+ /* 22 */ { 5, s_6_22, 21, 1, 0},
317
+ /* 23 */ { 5, s_6_23, 21, 1, 0},
318
+ /* 24 */ { 5, s_6_24, 21, 1, 0},
319
+ /* 25 */ { 4, s_6_25, 20, 1, 0},
320
+ /* 26 */ { 4, s_6_26, 20, 1, 0},
321
+ /* 27 */ { 4, s_6_27, 20, 1, 0},
322
+ /* 28 */ { 4, s_6_28, 20, 1, 0},
323
+ /* 29 */ { 2, s_6_29, -1, 1, 0},
324
+ /* 30 */ { 4, s_6_30, 29, 1, 0},
325
+ /* 31 */ { 4, s_6_31, 29, 1, 0},
326
+ /* 32 */ { 4, s_6_32, 29, 1, 0},
327
+ /* 33 */ { 5, s_6_33, 29, 1, 0},
328
+ /* 34 */ { 5, s_6_34, 29, 1, 0},
329
+ /* 35 */ { 5, s_6_35, 29, 1, 0},
330
+ /* 36 */ { 3, s_6_36, -1, 1, 0},
331
+ /* 37 */ { 3, s_6_37, -1, 1, 0},
332
+ /* 38 */ { 4, s_6_38, -1, 1, 0},
333
+ /* 39 */ { 4, s_6_39, -1, 1, 0},
334
+ /* 40 */ { 4, s_6_40, -1, 1, 0},
335
+ /* 41 */ { 5, s_6_41, -1, 1, 0},
336
+ /* 42 */ { 5, s_6_42, -1, 1, 0},
337
+ /* 43 */ { 5, s_6_43, -1, 1, 0},
338
+ /* 44 */ { 2, s_6_44, -1, 1, 0},
339
+ /* 45 */ { 2, s_6_45, -1, 1, 0},
340
+ /* 46 */ { 2, s_6_46, -1, 1, 0},
341
+ /* 47 */ { 2, s_6_47, -1, 1, 0},
342
+ /* 48 */ { 4, s_6_48, 47, 1, 0},
343
+ /* 49 */ { 4, s_6_49, 47, 1, 0},
344
+ /* 50 */ { 3, s_6_50, 47, 1, 0},
345
+ /* 51 */ { 5, s_6_51, 50, 1, 0},
346
+ /* 52 */ { 5, s_6_52, 50, 1, 0},
347
+ /* 53 */ { 5, s_6_53, 50, 1, 0},
348
+ /* 54 */ { 4, s_6_54, 47, 1, 0},
349
+ /* 55 */ { 4, s_6_55, 47, 1, 0},
350
+ /* 56 */ { 4, s_6_56, 47, 1, 0},
351
+ /* 57 */ { 4, s_6_57, 47, 1, 0},
352
+ /* 58 */ { 2, s_6_58, -1, 1, 0},
353
+ /* 59 */ { 5, s_6_59, 58, 1, 0},
354
+ /* 60 */ { 5, s_6_60, 58, 1, 0},
355
+ /* 61 */ { 5, s_6_61, 58, 1, 0},
356
+ /* 62 */ { 4, s_6_62, 58, 1, 0},
357
+ /* 63 */ { 4, s_6_63, 58, 1, 0},
358
+ /* 64 */ { 4, s_6_64, 58, 1, 0},
359
+ /* 65 */ { 5, s_6_65, 58, 1, 0},
360
+ /* 66 */ { 5, s_6_66, 58, 1, 0},
361
+ /* 67 */ { 5, s_6_67, 58, 1, 0},
362
+ /* 68 */ { 5, s_6_68, 58, 1, 0},
363
+ /* 69 */ { 5, s_6_69, 58, 1, 0},
364
+ /* 70 */ { 5, s_6_70, 58, 1, 0},
365
+ /* 71 */ { 2, s_6_71, -1, 1, 0},
366
+ /* 72 */ { 3, s_6_72, 71, 1, 0},
367
+ /* 73 */ { 3, s_6_73, 71, 1, 0},
368
+ /* 74 */ { 5, s_6_74, 73, 1, 0},
369
+ /* 75 */ { 5, s_6_75, 73, 1, 0},
370
+ /* 76 */ { 5, s_6_76, 73, 1, 0},
371
+ /* 77 */ { 6, s_6_77, 73, 1, 0},
372
+ /* 78 */ { 6, s_6_78, 73, 1, 0},
373
+ /* 79 */ { 6, s_6_79, 73, 1, 0},
374
+ /* 80 */ { 7, s_6_80, 73, 1, 0},
375
+ /* 81 */ { 7, s_6_81, 73, 1, 0},
376
+ /* 82 */ { 7, s_6_82, 73, 1, 0},
377
+ /* 83 */ { 6, s_6_83, 73, 1, 0},
378
+ /* 84 */ { 5, s_6_84, 73, 1, 0},
379
+ /* 85 */ { 7, s_6_85, 84, 1, 0},
380
+ /* 86 */ { 7, s_6_86, 84, 1, 0},
381
+ /* 87 */ { 7, s_6_87, 84, 1, 0},
382
+ /* 88 */ { 4, s_6_88, -1, 1, 0},
383
+ /* 89 */ { 4, s_6_89, -1, 1, 0},
384
+ /* 90 */ { 4, s_6_90, -1, 1, 0},
385
+ /* 91 */ { 7, s_6_91, 90, 1, 0},
386
+ /* 92 */ { 7, s_6_92, 90, 1, 0},
387
+ /* 93 */ { 7, s_6_93, 90, 1, 0},
388
+ /* 94 */ { 7, s_6_94, 90, 1, 0},
389
+ /* 95 */ { 6, s_6_95, 90, 1, 0},
390
+ /* 96 */ { 8, s_6_96, 95, 1, 0},
391
+ /* 97 */ { 8, s_6_97, 95, 1, 0},
392
+ /* 98 */ { 8, s_6_98, 95, 1, 0},
393
+ /* 99 */ { 4, s_6_99, -1, 1, 0},
394
+ /*100 */ { 6, s_6_100, 99, 1, 0},
395
+ /*101 */ { 6, s_6_101, 99, 1, 0},
396
+ /*102 */ { 6, s_6_102, 99, 1, 0},
397
+ /*103 */ { 8, s_6_103, 99, 1, 0},
398
+ /*104 */ { 8, s_6_104, 99, 1, 0},
399
+ /*105 */ { 8, s_6_105, 99, 1, 0},
400
+ /*106 */ { 4, s_6_106, -1, 1, 0},
401
+ /*107 */ { 5, s_6_107, -1, 1, 0},
402
+ /*108 */ { 5, s_6_108, -1, 1, 0},
403
+ /*109 */ { 5, s_6_109, -1, 1, 0},
404
+ /*110 */ { 5, s_6_110, -1, 1, 0},
405
+ /*111 */ { 5, s_6_111, -1, 1, 0},
406
+ /*112 */ { 5, s_6_112, -1, 1, 0},
407
+ /*113 */ { 5, s_6_113, -1, 1, 0},
408
+ /*114 */ { 2, s_6_114, -1, 1, 0},
409
+ /*115 */ { 2, s_6_115, -1, 1, 0},
410
+ /*116 */ { 2, s_6_116, -1, 1, 0},
411
+ /*117 */ { 4, s_6_117, -1, 1, 0},
412
+ /*118 */ { 4, s_6_118, -1, 1, 0},
413
+ /*119 */ { 4, s_6_119, -1, 1, 0}
414
+ };
415
+
416
+ static symbol s_7_0[1] = { 'a' };
417
+ static symbol s_7_1[1] = { 'i' };
418
+ static symbol s_7_2[1] = { 'o' };
419
+ static symbol s_7_3[2] = { 'o', 's' };
420
+ static symbol s_7_4[2] = { 0xC3, 0xA1 };
421
+ static symbol s_7_5[2] = { 0xC3, 0xAD };
422
+ static symbol s_7_6[2] = { 0xC3, 0xB3 };
423
+
424
+ static struct among a_7[7] =
425
+ {
426
+ /* 0 */ { 1, s_7_0, -1, 1, 0},
427
+ /* 1 */ { 1, s_7_1, -1, 1, 0},
428
+ /* 2 */ { 1, s_7_2, -1, 1, 0},
429
+ /* 3 */ { 2, s_7_3, -1, 1, 0},
430
+ /* 4 */ { 2, s_7_4, -1, 1, 0},
431
+ /* 5 */ { 2, s_7_5, -1, 1, 0},
432
+ /* 6 */ { 2, s_7_6, -1, 1, 0}
433
+ };
434
+
435
+ static symbol s_8_0[1] = { 'e' };
436
+ static symbol s_8_1[2] = { 0xC3, 0xA7 };
437
+ static symbol s_8_2[2] = { 0xC3, 0xA9 };
438
+ static symbol s_8_3[2] = { 0xC3, 0xAA };
439
+
440
+ static struct among a_8[4] =
441
+ {
442
+ /* 0 */ { 1, s_8_0, -1, 1, 0},
443
+ /* 1 */ { 2, s_8_1, -1, 2, 0},
444
+ /* 2 */ { 2, s_8_2, -1, 1, 0},
445
+ /* 3 */ { 2, s_8_3, -1, 1, 0}
446
+ };
447
+
448
+ static unsigned char g_v[] = { 17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2 };
449
+
450
+ static symbol s_0[] = { 'a', '~' };
451
+ static symbol s_1[] = { 'o', '~' };
452
+ static symbol s_2[] = { 0xC3, 0xA3 };
453
+ static symbol s_3[] = { 0xC3, 0xB5 };
454
+ static symbol s_4[] = { 'l', 'o', 'g' };
455
+ static symbol s_5[] = { 'u' };
456
+ static symbol s_6[] = { 'e', 'n', 't', 'e' };
457
+ static symbol s_7[] = { 'a', 't' };
458
+ static symbol s_8[] = { 'a', 't' };
459
+ static symbol s_9[] = { 'e' };
460
+ static symbol s_10[] = { 'i', 'r' };
461
+ static symbol s_11[] = { 'u' };
462
+ static symbol s_12[] = { 'g' };
463
+ static symbol s_13[] = { 'i' };
464
+ static symbol s_14[] = { 'c' };
465
+ static symbol s_15[] = { 'c' };
466
+ static symbol s_16[] = { 'i' };
467
+ static symbol s_17[] = { 'c' };
468
+
469
+ static int r_prelude(struct SN_env * z) {
470
+ int among_var;
471
+ while(1) { /* repeat, line 36 */
472
+ int c = z->c;
473
+ z->bra = z->c; /* [, line 37 */
474
+ among_var = find_among(z, a_0, 3); /* substring, line 37 */
475
+ if (!(among_var)) goto lab0;
476
+ z->ket = z->c; /* ], line 37 */
477
+ switch(among_var) {
478
+ case 0: goto lab0;
479
+ case 1:
480
+ { int ret;
481
+ ret = slice_from_s(z, 2, s_0); /* <-, line 38 */
482
+ if (ret < 0) return ret;
483
+ }
484
+ break;
485
+ case 2:
486
+ { int ret;
487
+ ret = slice_from_s(z, 2, s_1); /* <-, line 39 */
488
+ if (ret < 0) return ret;
489
+ }
490
+ break;
491
+ case 3:
492
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
493
+ if (c < 0) goto lab0;
494
+ z->c = c; /* next, line 40 */
495
+ }
496
+ break;
497
+ }
498
+ continue;
499
+ lab0:
500
+ z->c = c;
501
+ break;
502
+ }
503
+ return 1;
504
+ }
505
+
506
+ static int r_mark_regions(struct SN_env * z) {
507
+ z->I[0] = z->l;
508
+ z->I[1] = z->l;
509
+ z->I[2] = z->l;
510
+ { int c = z->c; /* do, line 50 */
511
+ { int c = z->c; /* or, line 52 */
512
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab2;
513
+ { int c = z->c; /* or, line 51 */
514
+ if (!(out_grouping_U(z, g_v, 97, 250))) goto lab4;
515
+ while(1) { /* gopast, line 51 */
516
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab5;
517
+ break;
518
+ lab5:
519
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
520
+ if (c < 0) goto lab4;
521
+ z->c = c; /* gopast, line 51 */
522
+ }
523
+ }
524
+ goto lab3;
525
+ lab4:
526
+ z->c = c;
527
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab2;
528
+ while(1) { /* gopast, line 51 */
529
+ if (!(out_grouping_U(z, g_v, 97, 250))) goto lab6;
530
+ break;
531
+ lab6:
532
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
533
+ if (c < 0) goto lab2;
534
+ z->c = c; /* gopast, line 51 */
535
+ }
536
+ }
537
+ }
538
+ lab3:
539
+ goto lab1;
540
+ lab2:
541
+ z->c = c;
542
+ if (!(out_grouping_U(z, g_v, 97, 250))) goto lab0;
543
+ { int c = z->c; /* or, line 53 */
544
+ if (!(out_grouping_U(z, g_v, 97, 250))) goto lab8;
545
+ while(1) { /* gopast, line 53 */
546
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab9;
547
+ break;
548
+ lab9:
549
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
550
+ if (c < 0) goto lab8;
551
+ z->c = c; /* gopast, line 53 */
552
+ }
553
+ }
554
+ goto lab7;
555
+ lab8:
556
+ z->c = c;
557
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab0;
558
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
559
+ if (c < 0) goto lab0;
560
+ z->c = c; /* next, line 53 */
561
+ }
562
+ }
563
+ lab7:
564
+ ;
565
+ }
566
+ lab1:
567
+ z->I[0] = z->c; /* setmark pV, line 54 */
568
+ lab0:
569
+ z->c = c;
570
+ }
571
+ { int c = z->c; /* do, line 56 */
572
+ while(1) { /* gopast, line 57 */
573
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab11;
574
+ break;
575
+ lab11:
576
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
577
+ if (c < 0) goto lab10;
578
+ z->c = c; /* gopast, line 57 */
579
+ }
580
+ }
581
+ while(1) { /* gopast, line 57 */
582
+ if (!(out_grouping_U(z, g_v, 97, 250))) goto lab12;
583
+ break;
584
+ lab12:
585
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
586
+ if (c < 0) goto lab10;
587
+ z->c = c; /* gopast, line 57 */
588
+ }
589
+ }
590
+ z->I[1] = z->c; /* setmark p1, line 57 */
591
+ while(1) { /* gopast, line 58 */
592
+ if (!(in_grouping_U(z, g_v, 97, 250))) goto lab13;
593
+ break;
594
+ lab13:
595
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
596
+ if (c < 0) goto lab10;
597
+ z->c = c; /* gopast, line 58 */
598
+ }
599
+ }
600
+ while(1) { /* gopast, line 58 */
601
+ if (!(out_grouping_U(z, g_v, 97, 250))) goto lab14;
602
+ break;
603
+ lab14:
604
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
605
+ if (c < 0) goto lab10;
606
+ z->c = c; /* gopast, line 58 */
607
+ }
608
+ }
609
+ z->I[2] = z->c; /* setmark p2, line 58 */
610
+ lab10:
611
+ z->c = c;
612
+ }
613
+ return 1;
614
+ }
615
+
616
+ static int r_postlude(struct SN_env * z) {
617
+ int among_var;
618
+ while(1) { /* repeat, line 62 */
619
+ int c = z->c;
620
+ z->bra = z->c; /* [, line 63 */
621
+ among_var = find_among(z, a_1, 3); /* substring, line 63 */
622
+ if (!(among_var)) goto lab0;
623
+ z->ket = z->c; /* ], line 63 */
624
+ switch(among_var) {
625
+ case 0: goto lab0;
626
+ case 1:
627
+ { int ret;
628
+ ret = slice_from_s(z, 2, s_2); /* <-, line 64 */
629
+ if (ret < 0) return ret;
630
+ }
631
+ break;
632
+ case 2:
633
+ { int ret;
634
+ ret = slice_from_s(z, 2, s_3); /* <-, line 65 */
635
+ if (ret < 0) return ret;
636
+ }
637
+ break;
638
+ case 3:
639
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
640
+ if (c < 0) goto lab0;
641
+ z->c = c; /* next, line 66 */
642
+ }
643
+ break;
644
+ }
645
+ continue;
646
+ lab0:
647
+ z->c = c;
648
+ break;
649
+ }
650
+ return 1;
651
+ }
652
+
653
+ static int r_RV(struct SN_env * z) {
654
+ if (!(z->I[0] <= z->c)) return 0;
655
+ return 1;
656
+ }
657
+
658
+ static int r_R1(struct SN_env * z) {
659
+ if (!(z->I[1] <= z->c)) return 0;
660
+ return 1;
661
+ }
662
+
663
+ static int r_R2(struct SN_env * z) {
664
+ if (!(z->I[2] <= z->c)) return 0;
665
+ return 1;
666
+ }
667
+
668
+ static int r_standard_suffix(struct SN_env * z) {
669
+ int among_var;
670
+ z->ket = z->c; /* [, line 77 */
671
+ among_var = find_among_b(z, a_5, 45); /* substring, line 77 */
672
+ if (!(among_var)) return 0;
673
+ z->bra = z->c; /* ], line 77 */
674
+ switch(among_var) {
675
+ case 0: return 0;
676
+ case 1:
677
+ { int ret = r_R2(z);
678
+ if (ret == 0) return 0; /* call R2, line 93 */
679
+ if (ret < 0) return ret;
680
+ }
681
+ { int ret;
682
+ ret = slice_del(z); /* delete, line 93 */
683
+ if (ret < 0) return ret;
684
+ }
685
+ break;
686
+ case 2:
687
+ { int ret = r_R2(z);
688
+ if (ret == 0) return 0; /* call R2, line 98 */
689
+ if (ret < 0) return ret;
690
+ }
691
+ { int ret;
692
+ ret = slice_from_s(z, 3, s_4); /* <-, line 98 */
693
+ if (ret < 0) return ret;
694
+ }
695
+ break;
696
+ case 3:
697
+ { int ret = r_R2(z);
698
+ if (ret == 0) return 0; /* call R2, line 102 */
699
+ if (ret < 0) return ret;
700
+ }
701
+ { int ret;
702
+ ret = slice_from_s(z, 1, s_5); /* <-, line 102 */
703
+ if (ret < 0) return ret;
704
+ }
705
+ break;
706
+ case 4:
707
+ { int ret = r_R2(z);
708
+ if (ret == 0) return 0; /* call R2, line 106 */
709
+ if (ret < 0) return ret;
710
+ }
711
+ { int ret;
712
+ ret = slice_from_s(z, 4, s_6); /* <-, line 106 */
713
+ if (ret < 0) return ret;
714
+ }
715
+ break;
716
+ case 5:
717
+ { int ret = r_R1(z);
718
+ if (ret == 0) return 0; /* call R1, line 110 */
719
+ if (ret < 0) return ret;
720
+ }
721
+ { int ret;
722
+ ret = slice_del(z); /* delete, line 110 */
723
+ if (ret < 0) return ret;
724
+ }
725
+ { int m = z->l - z->c; (void) m; /* try, line 111 */
726
+ z->ket = z->c; /* [, line 112 */
727
+ among_var = find_among_b(z, a_2, 4); /* substring, line 112 */
728
+ if (!(among_var)) { z->c = z->l - m; goto lab0; }
729
+ z->bra = z->c; /* ], line 112 */
730
+ { int ret = r_R2(z);
731
+ if (ret == 0) { z->c = z->l - m; goto lab0; } /* call R2, line 112 */
732
+ if (ret < 0) return ret;
733
+ }
734
+ { int ret;
735
+ ret = slice_del(z); /* delete, line 112 */
736
+ if (ret < 0) return ret;
737
+ }
738
+ switch(among_var) {
739
+ case 0: { z->c = z->l - m; goto lab0; }
740
+ case 1:
741
+ z->ket = z->c; /* [, line 113 */
742
+ if (!(eq_s_b(z, 2, s_7))) { z->c = z->l - m; goto lab0; }
743
+ z->bra = z->c; /* ], line 113 */
744
+ { int ret = r_R2(z);
745
+ if (ret == 0) { z->c = z->l - m; goto lab0; } /* call R2, line 113 */
746
+ if (ret < 0) return ret;
747
+ }
748
+ { int ret;
749
+ ret = slice_del(z); /* delete, line 113 */
750
+ if (ret < 0) return ret;
751
+ }
752
+ break;
753
+ }
754
+ lab0:
755
+ ;
756
+ }
757
+ break;
758
+ case 6:
759
+ { int ret = r_R2(z);
760
+ if (ret == 0) return 0; /* call R2, line 122 */
761
+ if (ret < 0) return ret;
762
+ }
763
+ { int ret;
764
+ ret = slice_del(z); /* delete, line 122 */
765
+ if (ret < 0) return ret;
766
+ }
767
+ { int m = z->l - z->c; (void) m; /* try, line 123 */
768
+ z->ket = z->c; /* [, line 124 */
769
+ among_var = find_among_b(z, a_3, 3); /* substring, line 124 */
770
+ if (!(among_var)) { z->c = z->l - m; goto lab1; }
771
+ z->bra = z->c; /* ], line 124 */
772
+ switch(among_var) {
773
+ case 0: { z->c = z->l - m; goto lab1; }
774
+ case 1:
775
+ { int ret = r_R2(z);
776
+ if (ret == 0) { z->c = z->l - m; goto lab1; } /* call R2, line 127 */
777
+ if (ret < 0) return ret;
778
+ }
779
+ { int ret;
780
+ ret = slice_del(z); /* delete, line 127 */
781
+ if (ret < 0) return ret;
782
+ }
783
+ break;
784
+ }
785
+ lab1:
786
+ ;
787
+ }
788
+ break;
789
+ case 7:
790
+ { int ret = r_R2(z);
791
+ if (ret == 0) return 0; /* call R2, line 134 */
792
+ if (ret < 0) return ret;
793
+ }
794
+ { int ret;
795
+ ret = slice_del(z); /* delete, line 134 */
796
+ if (ret < 0) return ret;
797
+ }
798
+ { int m = z->l - z->c; (void) m; /* try, line 135 */
799
+ z->ket = z->c; /* [, line 136 */
800
+ among_var = find_among_b(z, a_4, 3); /* substring, line 136 */
801
+ if (!(among_var)) { z->c = z->l - m; goto lab2; }
802
+ z->bra = z->c; /* ], line 136 */
803
+ switch(among_var) {
804
+ case 0: { z->c = z->l - m; goto lab2; }
805
+ case 1:
806
+ { int ret = r_R2(z);
807
+ if (ret == 0) { z->c = z->l - m; goto lab2; } /* call R2, line 139 */
808
+ if (ret < 0) return ret;
809
+ }
810
+ { int ret;
811
+ ret = slice_del(z); /* delete, line 139 */
812
+ if (ret < 0) return ret;
813
+ }
814
+ break;
815
+ }
816
+ lab2:
817
+ ;
818
+ }
819
+ break;
820
+ case 8:
821
+ { int ret = r_R2(z);
822
+ if (ret == 0) return 0; /* call R2, line 146 */
823
+ if (ret < 0) return ret;
824
+ }
825
+ { int ret;
826
+ ret = slice_del(z); /* delete, line 146 */
827
+ if (ret < 0) return ret;
828
+ }
829
+ { int m = z->l - z->c; (void) m; /* try, line 147 */
830
+ z->ket = z->c; /* [, line 148 */
831
+ if (!(eq_s_b(z, 2, s_8))) { z->c = z->l - m; goto lab3; }
832
+ z->bra = z->c; /* ], line 148 */
833
+ { int ret = r_R2(z);
834
+ if (ret == 0) { z->c = z->l - m; goto lab3; } /* call R2, line 148 */
835
+ if (ret < 0) return ret;
836
+ }
837
+ { int ret;
838
+ ret = slice_del(z); /* delete, line 148 */
839
+ if (ret < 0) return ret;
840
+ }
841
+ lab3:
842
+ ;
843
+ }
844
+ break;
845
+ case 9:
846
+ { int ret = r_RV(z);
847
+ if (ret == 0) return 0; /* call RV, line 153 */
848
+ if (ret < 0) return ret;
849
+ }
850
+ if (!(eq_s_b(z, 1, s_9))) return 0;
851
+ { int ret;
852
+ ret = slice_from_s(z, 2, s_10); /* <-, line 154 */
853
+ if (ret < 0) return ret;
854
+ }
855
+ break;
856
+ }
857
+ return 1;
858
+ }
859
+
860
+ static int r_verb_suffix(struct SN_env * z) {
861
+ int among_var;
862
+ { int m3; /* setlimit, line 159 */
863
+ int m = z->l - z->c; (void) m;
864
+ if (z->c < z->I[0]) return 0;
865
+ z->c = z->I[0]; /* tomark, line 159 */
866
+ m3 = z->lb; z->lb = z->c;
867
+ z->c = z->l - m;
868
+ z->ket = z->c; /* [, line 160 */
869
+ among_var = find_among_b(z, a_6, 120); /* substring, line 160 */
870
+ if (!(among_var)) { z->lb = m3; return 0; }
871
+ z->bra = z->c; /* ], line 160 */
872
+ switch(among_var) {
873
+ case 0: { z->lb = m3; return 0; }
874
+ case 1:
875
+ { int ret;
876
+ ret = slice_del(z); /* delete, line 179 */
877
+ if (ret < 0) return ret;
878
+ }
879
+ break;
880
+ }
881
+ z->lb = m3;
882
+ }
883
+ return 1;
884
+ }
885
+
886
+ static int r_residual_suffix(struct SN_env * z) {
887
+ int among_var;
888
+ z->ket = z->c; /* [, line 184 */
889
+ among_var = find_among_b(z, a_7, 7); /* substring, line 184 */
890
+ if (!(among_var)) return 0;
891
+ z->bra = z->c; /* ], line 184 */
892
+ switch(among_var) {
893
+ case 0: return 0;
894
+ case 1:
895
+ { int ret = r_RV(z);
896
+ if (ret == 0) return 0; /* call RV, line 187 */
897
+ if (ret < 0) return ret;
898
+ }
899
+ { int ret;
900
+ ret = slice_del(z); /* delete, line 187 */
901
+ if (ret < 0) return ret;
902
+ }
903
+ break;
904
+ }
905
+ return 1;
906
+ }
907
+
908
+ static int r_residual_form(struct SN_env * z) {
909
+ int among_var;
910
+ z->ket = z->c; /* [, line 192 */
911
+ among_var = find_among_b(z, a_8, 4); /* substring, line 192 */
912
+ if (!(among_var)) return 0;
913
+ z->bra = z->c; /* ], line 192 */
914
+ switch(among_var) {
915
+ case 0: return 0;
916
+ case 1:
917
+ { int ret = r_RV(z);
918
+ if (ret == 0) return 0; /* call RV, line 194 */
919
+ if (ret < 0) return ret;
920
+ }
921
+ { int ret;
922
+ ret = slice_del(z); /* delete, line 194 */
923
+ if (ret < 0) return ret;
924
+ }
925
+ z->ket = z->c; /* [, line 194 */
926
+ { int m = z->l - z->c; (void) m; /* or, line 194 */
927
+ if (!(eq_s_b(z, 1, s_11))) goto lab1;
928
+ z->bra = z->c; /* ], line 194 */
929
+ { int m_test = z->l - z->c; /* test, line 194 */
930
+ if (!(eq_s_b(z, 1, s_12))) goto lab1;
931
+ z->c = z->l - m_test;
932
+ }
933
+ goto lab0;
934
+ lab1:
935
+ z->c = z->l - m;
936
+ if (!(eq_s_b(z, 1, s_13))) return 0;
937
+ z->bra = z->c; /* ], line 195 */
938
+ { int m_test = z->l - z->c; /* test, line 195 */
939
+ if (!(eq_s_b(z, 1, s_14))) return 0;
940
+ z->c = z->l - m_test;
941
+ }
942
+ }
943
+ lab0:
944
+ { int ret = r_RV(z);
945
+ if (ret == 0) return 0; /* call RV, line 195 */
946
+ if (ret < 0) return ret;
947
+ }
948
+ { int ret;
949
+ ret = slice_del(z); /* delete, line 195 */
950
+ if (ret < 0) return ret;
951
+ }
952
+ break;
953
+ case 2:
954
+ { int ret;
955
+ ret = slice_from_s(z, 1, s_15); /* <-, line 196 */
956
+ if (ret < 0) return ret;
957
+ }
958
+ break;
959
+ }
960
+ return 1;
961
+ }
962
+
963
+ extern int portuguese_UTF_8_stem(struct SN_env * z) {
964
+ { int c = z->c; /* do, line 202 */
965
+ { int ret = r_prelude(z);
966
+ if (ret == 0) goto lab0; /* call prelude, line 202 */
967
+ if (ret < 0) return ret;
968
+ }
969
+ lab0:
970
+ z->c = c;
971
+ }
972
+ { int c = z->c; /* do, line 203 */
973
+ { int ret = r_mark_regions(z);
974
+ if (ret == 0) goto lab1; /* call mark_regions, line 203 */
975
+ if (ret < 0) return ret;
976
+ }
977
+ lab1:
978
+ z->c = c;
979
+ }
980
+ z->lb = z->c; z->c = z->l; /* backwards, line 204 */
981
+
982
+ { int m = z->l - z->c; (void) m; /* do, line 205 */
983
+ { int m = z->l - z->c; (void) m; /* or, line 209 */
984
+ { int m = z->l - z->c; (void) m; /* and, line 207 */
985
+ { int m = z->l - z->c; (void) m; /* or, line 206 */
986
+ { int ret = r_standard_suffix(z);
987
+ if (ret == 0) goto lab6; /* call standard_suffix, line 206 */
988
+ if (ret < 0) return ret;
989
+ }
990
+ goto lab5;
991
+ lab6:
992
+ z->c = z->l - m;
993
+ { int ret = r_verb_suffix(z);
994
+ if (ret == 0) goto lab4; /* call verb_suffix, line 206 */
995
+ if (ret < 0) return ret;
996
+ }
997
+ }
998
+ lab5:
999
+ z->c = z->l - m;
1000
+ { int m = z->l - z->c; (void) m; /* do, line 207 */
1001
+ z->ket = z->c; /* [, line 207 */
1002
+ if (!(eq_s_b(z, 1, s_16))) goto lab7;
1003
+ z->bra = z->c; /* ], line 207 */
1004
+ { int m_test = z->l - z->c; /* test, line 207 */
1005
+ if (!(eq_s_b(z, 1, s_17))) goto lab7;
1006
+ z->c = z->l - m_test;
1007
+ }
1008
+ { int ret = r_RV(z);
1009
+ if (ret == 0) goto lab7; /* call RV, line 207 */
1010
+ if (ret < 0) return ret;
1011
+ }
1012
+ { int ret;
1013
+ ret = slice_del(z); /* delete, line 207 */
1014
+ if (ret < 0) return ret;
1015
+ }
1016
+ lab7:
1017
+ z->c = z->l - m;
1018
+ }
1019
+ }
1020
+ goto lab3;
1021
+ lab4:
1022
+ z->c = z->l - m;
1023
+ { int ret = r_residual_suffix(z);
1024
+ if (ret == 0) goto lab2; /* call residual_suffix, line 209 */
1025
+ if (ret < 0) return ret;
1026
+ }
1027
+ }
1028
+ lab3:
1029
+ lab2:
1030
+ z->c = z->l - m;
1031
+ }
1032
+ { int m = z->l - z->c; (void) m; /* do, line 211 */
1033
+ { int ret = r_residual_form(z);
1034
+ if (ret == 0) goto lab8; /* call residual_form, line 211 */
1035
+ if (ret < 0) return ret;
1036
+ }
1037
+ lab8:
1038
+ z->c = z->l - m;
1039
+ }
1040
+ z->c = z->lb;
1041
+ { int c = z->c; /* do, line 213 */
1042
+ { int ret = r_postlude(z);
1043
+ if (ret == 0) goto lab9; /* call postlude, line 213 */
1044
+ if (ret < 0) return ret;
1045
+ }
1046
+ lab9:
1047
+ z->c = c;
1048
+ }
1049
+ return 1;
1050
+ }
1051
+
1052
+ extern struct SN_env * portuguese_UTF_8_create_env(void) { return SN_create_env(0, 3, 0); }
1053
+
1054
+ extern void portuguese_UTF_8_close_env(struct SN_env * z) { SN_close_env(z); }
1055
+