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 * dutch_UTF_8_create_env(void);
9
+ extern void dutch_UTF_8_close_env(struct SN_env * z);
10
+
11
+ extern int dutch_UTF_8_stem(struct SN_env * z);
12
+
13
+ #ifdef __cplusplus
14
+ }
15
+ #endif
16
+
@@ -0,0 +1,1176 @@
1
+
2
+ /* This file was generated automatically by the Snowball to ANSI C compiler */
3
+
4
+ #include "header.h"
5
+
6
+ extern int english_UTF_8_stem(struct SN_env * z);
7
+ static int r_exception2(struct SN_env * z);
8
+ static int r_exception1(struct SN_env * z);
9
+ static int r_Step_5(struct SN_env * z);
10
+ static int r_Step_4(struct SN_env * z);
11
+ static int r_Step_3(struct SN_env * z);
12
+ static int r_Step_2(struct SN_env * z);
13
+ static int r_Step_1c(struct SN_env * z);
14
+ static int r_Step_1b(struct SN_env * z);
15
+ static int r_Step_1a(struct SN_env * z);
16
+ static int r_R2(struct SN_env * z);
17
+ static int r_R1(struct SN_env * z);
18
+ static int r_shortv(struct SN_env * z);
19
+ static int r_mark_regions(struct SN_env * z);
20
+ static int r_postlude(struct SN_env * z);
21
+ static int r_prelude(struct SN_env * z);
22
+
23
+ extern struct SN_env * english_UTF_8_create_env(void);
24
+ extern void english_UTF_8_close_env(struct SN_env * z);
25
+
26
+ static symbol s_0_0[6] = { 'c', 'o', 'm', 'm', 'u', 'n' };
27
+ static symbol s_0_1[5] = { 'g', 'e', 'n', 'e', 'r' };
28
+
29
+ static struct among a_0[2] =
30
+ {
31
+ /* 0 */ { 6, s_0_0, -1, -1, 0},
32
+ /* 1 */ { 5, s_0_1, -1, -1, 0}
33
+ };
34
+
35
+ static symbol s_1_0[1] = { '\'' };
36
+ static symbol s_1_1[3] = { '\'', 's', '\'' };
37
+ static symbol s_1_2[2] = { '\'', 's' };
38
+
39
+ static struct among a_1[3] =
40
+ {
41
+ /* 0 */ { 1, s_1_0, -1, 1, 0},
42
+ /* 1 */ { 3, s_1_1, 0, 1, 0},
43
+ /* 2 */ { 2, s_1_2, -1, 1, 0}
44
+ };
45
+
46
+ static symbol s_2_0[3] = { 'i', 'e', 'd' };
47
+ static symbol s_2_1[1] = { 's' };
48
+ static symbol s_2_2[3] = { 'i', 'e', 's' };
49
+ static symbol s_2_3[4] = { 's', 's', 'e', 's' };
50
+ static symbol s_2_4[2] = { 's', 's' };
51
+ static symbol s_2_5[2] = { 'u', 's' };
52
+
53
+ static struct among a_2[6] =
54
+ {
55
+ /* 0 */ { 3, s_2_0, -1, 2, 0},
56
+ /* 1 */ { 1, s_2_1, -1, 3, 0},
57
+ /* 2 */ { 3, s_2_2, 1, 2, 0},
58
+ /* 3 */ { 4, s_2_3, 1, 1, 0},
59
+ /* 4 */ { 2, s_2_4, 1, -1, 0},
60
+ /* 5 */ { 2, s_2_5, 1, -1, 0}
61
+ };
62
+
63
+ static symbol s_3_1[2] = { 'b', 'b' };
64
+ static symbol s_3_2[2] = { 'd', 'd' };
65
+ static symbol s_3_3[2] = { 'f', 'f' };
66
+ static symbol s_3_4[2] = { 'g', 'g' };
67
+ static symbol s_3_5[2] = { 'b', 'l' };
68
+ static symbol s_3_6[2] = { 'm', 'm' };
69
+ static symbol s_3_7[2] = { 'n', 'n' };
70
+ static symbol s_3_8[2] = { 'p', 'p' };
71
+ static symbol s_3_9[2] = { 'r', 'r' };
72
+ static symbol s_3_10[2] = { 'a', 't' };
73
+ static symbol s_3_11[2] = { 't', 't' };
74
+ static symbol s_3_12[2] = { 'i', 'z' };
75
+
76
+ static struct among a_3[13] =
77
+ {
78
+ /* 0 */ { 0, 0, -1, 3, 0},
79
+ /* 1 */ { 2, s_3_1, 0, 2, 0},
80
+ /* 2 */ { 2, s_3_2, 0, 2, 0},
81
+ /* 3 */ { 2, s_3_3, 0, 2, 0},
82
+ /* 4 */ { 2, s_3_4, 0, 2, 0},
83
+ /* 5 */ { 2, s_3_5, 0, 1, 0},
84
+ /* 6 */ { 2, s_3_6, 0, 2, 0},
85
+ /* 7 */ { 2, s_3_7, 0, 2, 0},
86
+ /* 8 */ { 2, s_3_8, 0, 2, 0},
87
+ /* 9 */ { 2, s_3_9, 0, 2, 0},
88
+ /* 10 */ { 2, s_3_10, 0, 1, 0},
89
+ /* 11 */ { 2, s_3_11, 0, 2, 0},
90
+ /* 12 */ { 2, s_3_12, 0, 1, 0}
91
+ };
92
+
93
+ static symbol s_4_0[2] = { 'e', 'd' };
94
+ static symbol s_4_1[3] = { 'e', 'e', 'd' };
95
+ static symbol s_4_2[3] = { 'i', 'n', 'g' };
96
+ static symbol s_4_3[4] = { 'e', 'd', 'l', 'y' };
97
+ static symbol s_4_4[5] = { 'e', 'e', 'd', 'l', 'y' };
98
+ static symbol s_4_5[5] = { 'i', 'n', 'g', 'l', 'y' };
99
+
100
+ static struct among a_4[6] =
101
+ {
102
+ /* 0 */ { 2, s_4_0, -1, 2, 0},
103
+ /* 1 */ { 3, s_4_1, 0, 1, 0},
104
+ /* 2 */ { 3, s_4_2, -1, 2, 0},
105
+ /* 3 */ { 4, s_4_3, -1, 2, 0},
106
+ /* 4 */ { 5, s_4_4, 3, 1, 0},
107
+ /* 5 */ { 5, s_4_5, -1, 2, 0}
108
+ };
109
+
110
+ static symbol s_5_0[4] = { 'a', 'n', 'c', 'i' };
111
+ static symbol s_5_1[4] = { 'e', 'n', 'c', 'i' };
112
+ static symbol s_5_2[3] = { 'o', 'g', 'i' };
113
+ static symbol s_5_3[2] = { 'l', 'i' };
114
+ static symbol s_5_4[3] = { 'b', 'l', 'i' };
115
+ static symbol s_5_5[4] = { 'a', 'b', 'l', 'i' };
116
+ static symbol s_5_6[4] = { 'a', 'l', 'l', 'i' };
117
+ static symbol s_5_7[5] = { 'f', 'u', 'l', 'l', 'i' };
118
+ static symbol s_5_8[6] = { 'l', 'e', 's', 's', 'l', 'i' };
119
+ static symbol s_5_9[5] = { 'o', 'u', 's', 'l', 'i' };
120
+ static symbol s_5_10[5] = { 'e', 'n', 't', 'l', 'i' };
121
+ static symbol s_5_11[5] = { 'a', 'l', 'i', 't', 'i' };
122
+ static symbol s_5_12[6] = { 'b', 'i', 'l', 'i', 't', 'i' };
123
+ static symbol s_5_13[5] = { 'i', 'v', 'i', 't', 'i' };
124
+ static symbol s_5_14[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
125
+ static symbol s_5_15[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
126
+ static symbol s_5_16[5] = { 'a', 'l', 'i', 's', 'm' };
127
+ static symbol s_5_17[5] = { 'a', 't', 'i', 'o', 'n' };
128
+ static symbol s_5_18[7] = { 'i', 'z', 'a', 't', 'i', 'o', 'n' };
129
+ static symbol s_5_19[4] = { 'i', 'z', 'e', 'r' };
130
+ static symbol s_5_20[4] = { 'a', 't', 'o', 'r' };
131
+ static symbol s_5_21[7] = { 'i', 'v', 'e', 'n', 'e', 's', 's' };
132
+ static symbol s_5_22[7] = { 'f', 'u', 'l', 'n', 'e', 's', 's' };
133
+ static symbol s_5_23[7] = { 'o', 'u', 's', 'n', 'e', 's', 's' };
134
+
135
+ static struct among a_5[24] =
136
+ {
137
+ /* 0 */ { 4, s_5_0, -1, 3, 0},
138
+ /* 1 */ { 4, s_5_1, -1, 2, 0},
139
+ /* 2 */ { 3, s_5_2, -1, 13, 0},
140
+ /* 3 */ { 2, s_5_3, -1, 16, 0},
141
+ /* 4 */ { 3, s_5_4, 3, 12, 0},
142
+ /* 5 */ { 4, s_5_5, 4, 4, 0},
143
+ /* 6 */ { 4, s_5_6, 3, 8, 0},
144
+ /* 7 */ { 5, s_5_7, 3, 14, 0},
145
+ /* 8 */ { 6, s_5_8, 3, 15, 0},
146
+ /* 9 */ { 5, s_5_9, 3, 10, 0},
147
+ /* 10 */ { 5, s_5_10, 3, 5, 0},
148
+ /* 11 */ { 5, s_5_11, -1, 8, 0},
149
+ /* 12 */ { 6, s_5_12, -1, 12, 0},
150
+ /* 13 */ { 5, s_5_13, -1, 11, 0},
151
+ /* 14 */ { 6, s_5_14, -1, 1, 0},
152
+ /* 15 */ { 7, s_5_15, 14, 7, 0},
153
+ /* 16 */ { 5, s_5_16, -1, 8, 0},
154
+ /* 17 */ { 5, s_5_17, -1, 7, 0},
155
+ /* 18 */ { 7, s_5_18, 17, 6, 0},
156
+ /* 19 */ { 4, s_5_19, -1, 6, 0},
157
+ /* 20 */ { 4, s_5_20, -1, 7, 0},
158
+ /* 21 */ { 7, s_5_21, -1, 11, 0},
159
+ /* 22 */ { 7, s_5_22, -1, 9, 0},
160
+ /* 23 */ { 7, s_5_23, -1, 10, 0}
161
+ };
162
+
163
+ static symbol s_6_0[5] = { 'i', 'c', 'a', 't', 'e' };
164
+ static symbol s_6_1[5] = { 'a', 't', 'i', 'v', 'e' };
165
+ static symbol s_6_2[5] = { 'a', 'l', 'i', 'z', 'e' };
166
+ static symbol s_6_3[5] = { 'i', 'c', 'i', 't', 'i' };
167
+ static symbol s_6_4[4] = { 'i', 'c', 'a', 'l' };
168
+ static symbol s_6_5[6] = { 't', 'i', 'o', 'n', 'a', 'l' };
169
+ static symbol s_6_6[7] = { 'a', 't', 'i', 'o', 'n', 'a', 'l' };
170
+ static symbol s_6_7[3] = { 'f', 'u', 'l' };
171
+ static symbol s_6_8[4] = { 'n', 'e', 's', 's' };
172
+
173
+ static struct among a_6[9] =
174
+ {
175
+ /* 0 */ { 5, s_6_0, -1, 4, 0},
176
+ /* 1 */ { 5, s_6_1, -1, 6, 0},
177
+ /* 2 */ { 5, s_6_2, -1, 3, 0},
178
+ /* 3 */ { 5, s_6_3, -1, 4, 0},
179
+ /* 4 */ { 4, s_6_4, -1, 4, 0},
180
+ /* 5 */ { 6, s_6_5, -1, 1, 0},
181
+ /* 6 */ { 7, s_6_6, 5, 2, 0},
182
+ /* 7 */ { 3, s_6_7, -1, 5, 0},
183
+ /* 8 */ { 4, s_6_8, -1, 5, 0}
184
+ };
185
+
186
+ static symbol s_7_0[2] = { 'i', 'c' };
187
+ static symbol s_7_1[4] = { 'a', 'n', 'c', 'e' };
188
+ static symbol s_7_2[4] = { 'e', 'n', 'c', 'e' };
189
+ static symbol s_7_3[4] = { 'a', 'b', 'l', 'e' };
190
+ static symbol s_7_4[4] = { 'i', 'b', 'l', 'e' };
191
+ static symbol s_7_5[3] = { 'a', 't', 'e' };
192
+ static symbol s_7_6[3] = { 'i', 'v', 'e' };
193
+ static symbol s_7_7[3] = { 'i', 'z', 'e' };
194
+ static symbol s_7_8[3] = { 'i', 't', 'i' };
195
+ static symbol s_7_9[2] = { 'a', 'l' };
196
+ static symbol s_7_10[3] = { 'i', 's', 'm' };
197
+ static symbol s_7_11[3] = { 'i', 'o', 'n' };
198
+ static symbol s_7_12[2] = { 'e', 'r' };
199
+ static symbol s_7_13[3] = { 'o', 'u', 's' };
200
+ static symbol s_7_14[3] = { 'a', 'n', 't' };
201
+ static symbol s_7_15[3] = { 'e', 'n', 't' };
202
+ static symbol s_7_16[4] = { 'm', 'e', 'n', 't' };
203
+ static symbol s_7_17[5] = { 'e', 'm', 'e', 'n', 't' };
204
+
205
+ static struct among a_7[18] =
206
+ {
207
+ /* 0 */ { 2, s_7_0, -1, 1, 0},
208
+ /* 1 */ { 4, s_7_1, -1, 1, 0},
209
+ /* 2 */ { 4, s_7_2, -1, 1, 0},
210
+ /* 3 */ { 4, s_7_3, -1, 1, 0},
211
+ /* 4 */ { 4, s_7_4, -1, 1, 0},
212
+ /* 5 */ { 3, s_7_5, -1, 1, 0},
213
+ /* 6 */ { 3, s_7_6, -1, 1, 0},
214
+ /* 7 */ { 3, s_7_7, -1, 1, 0},
215
+ /* 8 */ { 3, s_7_8, -1, 1, 0},
216
+ /* 9 */ { 2, s_7_9, -1, 1, 0},
217
+ /* 10 */ { 3, s_7_10, -1, 1, 0},
218
+ /* 11 */ { 3, s_7_11, -1, 2, 0},
219
+ /* 12 */ { 2, s_7_12, -1, 1, 0},
220
+ /* 13 */ { 3, s_7_13, -1, 1, 0},
221
+ /* 14 */ { 3, s_7_14, -1, 1, 0},
222
+ /* 15 */ { 3, s_7_15, -1, 1, 0},
223
+ /* 16 */ { 4, s_7_16, 15, 1, 0},
224
+ /* 17 */ { 5, s_7_17, 16, 1, 0}
225
+ };
226
+
227
+ static symbol s_8_0[1] = { 'e' };
228
+ static symbol s_8_1[1] = { 'l' };
229
+
230
+ static struct among a_8[2] =
231
+ {
232
+ /* 0 */ { 1, s_8_0, -1, 1, 0},
233
+ /* 1 */ { 1, s_8_1, -1, 2, 0}
234
+ };
235
+
236
+ static symbol s_9_0[7] = { 's', 'u', 'c', 'c', 'e', 'e', 'd' };
237
+ static symbol s_9_1[7] = { 'p', 'r', 'o', 'c', 'e', 'e', 'd' };
238
+ static symbol s_9_2[6] = { 'e', 'x', 'c', 'e', 'e', 'd' };
239
+ static symbol s_9_3[7] = { 'c', 'a', 'n', 'n', 'i', 'n', 'g' };
240
+ static symbol s_9_4[6] = { 'i', 'n', 'n', 'i', 'n', 'g' };
241
+ static symbol s_9_5[7] = { 'e', 'a', 'r', 'r', 'i', 'n', 'g' };
242
+ static symbol s_9_6[7] = { 'h', 'e', 'r', 'r', 'i', 'n', 'g' };
243
+ static symbol s_9_7[6] = { 'o', 'u', 't', 'i', 'n', 'g' };
244
+
245
+ static struct among a_9[8] =
246
+ {
247
+ /* 0 */ { 7, s_9_0, -1, -1, 0},
248
+ /* 1 */ { 7, s_9_1, -1, -1, 0},
249
+ /* 2 */ { 6, s_9_2, -1, -1, 0},
250
+ /* 3 */ { 7, s_9_3, -1, -1, 0},
251
+ /* 4 */ { 6, s_9_4, -1, -1, 0},
252
+ /* 5 */ { 7, s_9_5, -1, -1, 0},
253
+ /* 6 */ { 7, s_9_6, -1, -1, 0},
254
+ /* 7 */ { 6, s_9_7, -1, -1, 0}
255
+ };
256
+
257
+ static symbol s_10_0[5] = { 'a', 'n', 'd', 'e', 's' };
258
+ static symbol s_10_1[5] = { 'a', 't', 'l', 'a', 's' };
259
+ static symbol s_10_2[4] = { 'b', 'i', 'a', 's' };
260
+ static symbol s_10_3[6] = { 'c', 'o', 's', 'm', 'o', 's' };
261
+ static symbol s_10_4[5] = { 'd', 'y', 'i', 'n', 'g' };
262
+ static symbol s_10_5[5] = { 'e', 'a', 'r', 'l', 'y' };
263
+ static symbol s_10_6[6] = { 'g', 'e', 'n', 't', 'l', 'y' };
264
+ static symbol s_10_7[4] = { 'h', 'o', 'w', 'e' };
265
+ static symbol s_10_8[4] = { 'i', 'd', 'l', 'y' };
266
+ static symbol s_10_9[5] = { 'l', 'y', 'i', 'n', 'g' };
267
+ static symbol s_10_10[4] = { 'n', 'e', 'w', 's' };
268
+ static symbol s_10_11[4] = { 'o', 'n', 'l', 'y' };
269
+ static symbol s_10_12[6] = { 's', 'i', 'n', 'g', 'l', 'y' };
270
+ static symbol s_10_13[5] = { 's', 'k', 'i', 'e', 's' };
271
+ static symbol s_10_14[4] = { 's', 'k', 'i', 's' };
272
+ static symbol s_10_15[3] = { 's', 'k', 'y' };
273
+ static symbol s_10_16[5] = { 't', 'y', 'i', 'n', 'g' };
274
+ static symbol s_10_17[4] = { 'u', 'g', 'l', 'y' };
275
+
276
+ static struct among a_10[18] =
277
+ {
278
+ /* 0 */ { 5, s_10_0, -1, -1, 0},
279
+ /* 1 */ { 5, s_10_1, -1, -1, 0},
280
+ /* 2 */ { 4, s_10_2, -1, -1, 0},
281
+ /* 3 */ { 6, s_10_3, -1, -1, 0},
282
+ /* 4 */ { 5, s_10_4, -1, 3, 0},
283
+ /* 5 */ { 5, s_10_5, -1, 9, 0},
284
+ /* 6 */ { 6, s_10_6, -1, 7, 0},
285
+ /* 7 */ { 4, s_10_7, -1, -1, 0},
286
+ /* 8 */ { 4, s_10_8, -1, 6, 0},
287
+ /* 9 */ { 5, s_10_9, -1, 4, 0},
288
+ /* 10 */ { 4, s_10_10, -1, -1, 0},
289
+ /* 11 */ { 4, s_10_11, -1, 10, 0},
290
+ /* 12 */ { 6, s_10_12, -1, 11, 0},
291
+ /* 13 */ { 5, s_10_13, -1, 2, 0},
292
+ /* 14 */ { 4, s_10_14, -1, 1, 0},
293
+ /* 15 */ { 3, s_10_15, -1, -1, 0},
294
+ /* 16 */ { 5, s_10_16, -1, 5, 0},
295
+ /* 17 */ { 4, s_10_17, -1, 8, 0}
296
+ };
297
+
298
+ static unsigned char g_v[] = { 17, 65, 16, 1 };
299
+
300
+ static unsigned char g_v_WXY[] = { 1, 17, 65, 208, 1 };
301
+
302
+ static unsigned char g_valid_LI[] = { 55, 141, 2 };
303
+
304
+ static symbol s_0[] = { '\'' };
305
+ static symbol s_1[] = { 'y' };
306
+ static symbol s_2[] = { 'Y' };
307
+ static symbol s_3[] = { 'y' };
308
+ static symbol s_4[] = { 'Y' };
309
+ static symbol s_5[] = { 's', 's' };
310
+ static symbol s_6[] = { 'i' };
311
+ static symbol s_7[] = { 'i', 'e' };
312
+ static symbol s_8[] = { 'e', 'e' };
313
+ static symbol s_9[] = { 'e' };
314
+ static symbol s_10[] = { 'e' };
315
+ static symbol s_11[] = { 'y' };
316
+ static symbol s_12[] = { 'Y' };
317
+ static symbol s_13[] = { 'i' };
318
+ static symbol s_14[] = { 't', 'i', 'o', 'n' };
319
+ static symbol s_15[] = { 'e', 'n', 'c', 'e' };
320
+ static symbol s_16[] = { 'a', 'n', 'c', 'e' };
321
+ static symbol s_17[] = { 'a', 'b', 'l', 'e' };
322
+ static symbol s_18[] = { 'e', 'n', 't' };
323
+ static symbol s_19[] = { 'i', 'z', 'e' };
324
+ static symbol s_20[] = { 'a', 't', 'e' };
325
+ static symbol s_21[] = { 'a', 'l' };
326
+ static symbol s_22[] = { 'f', 'u', 'l' };
327
+ static symbol s_23[] = { 'o', 'u', 's' };
328
+ static symbol s_24[] = { 'i', 'v', 'e' };
329
+ static symbol s_25[] = { 'b', 'l', 'e' };
330
+ static symbol s_26[] = { 'l' };
331
+ static symbol s_27[] = { 'o', 'g' };
332
+ static symbol s_28[] = { 'f', 'u', 'l' };
333
+ static symbol s_29[] = { 'l', 'e', 's', 's' };
334
+ static symbol s_30[] = { 't', 'i', 'o', 'n' };
335
+ static symbol s_31[] = { 'a', 't', 'e' };
336
+ static symbol s_32[] = { 'a', 'l' };
337
+ static symbol s_33[] = { 'i', 'c' };
338
+ static symbol s_34[] = { 's' };
339
+ static symbol s_35[] = { 't' };
340
+ static symbol s_36[] = { 'l' };
341
+ static symbol s_37[] = { 's', 'k', 'i' };
342
+ static symbol s_38[] = { 's', 'k', 'y' };
343
+ static symbol s_39[] = { 'd', 'i', 'e' };
344
+ static symbol s_40[] = { 'l', 'i', 'e' };
345
+ static symbol s_41[] = { 't', 'i', 'e' };
346
+ static symbol s_42[] = { 'i', 'd', 'l' };
347
+ static symbol s_43[] = { 'g', 'e', 'n', 't', 'l' };
348
+ static symbol s_44[] = { 'u', 'g', 'l', 'i' };
349
+ static symbol s_45[] = { 'e', 'a', 'r', 'l', 'i' };
350
+ static symbol s_46[] = { 'o', 'n', 'l', 'i' };
351
+ static symbol s_47[] = { 's', 'i', 'n', 'g', 'l' };
352
+ static symbol s_48[] = { 'Y' };
353
+ static symbol s_49[] = { 'y' };
354
+
355
+ static int r_prelude(struct SN_env * z) {
356
+ z->B[0] = 0; /* unset Y_found, line 26 */
357
+ { int c = z->c; /* do, line 27 */
358
+ z->bra = z->c; /* [, line 27 */
359
+ if (!(eq_s(z, 1, s_0))) goto lab0;
360
+ z->ket = z->c; /* ], line 27 */
361
+ { int ret;
362
+ ret = slice_del(z); /* delete, line 27 */
363
+ if (ret < 0) return ret;
364
+ }
365
+ lab0:
366
+ z->c = c;
367
+ }
368
+ { int c = z->c; /* do, line 28 */
369
+ z->bra = z->c; /* [, line 28 */
370
+ if (!(eq_s(z, 1, s_1))) goto lab1;
371
+ z->ket = z->c; /* ], line 28 */
372
+ { int ret;
373
+ ret = slice_from_s(z, 1, s_2); /* <-, line 28 */
374
+ if (ret < 0) return ret;
375
+ }
376
+ z->B[0] = 1; /* set Y_found, line 28 */
377
+ lab1:
378
+ z->c = c;
379
+ }
380
+ { int c = z->c; /* do, line 29 */
381
+ while(1) { /* repeat, line 29 */
382
+ int c = z->c;
383
+ while(1) { /* goto, line 29 */
384
+ int c = z->c;
385
+ if (!(in_grouping_U(z, g_v, 97, 121))) goto lab4;
386
+ z->bra = z->c; /* [, line 29 */
387
+ if (!(eq_s(z, 1, s_3))) goto lab4;
388
+ z->ket = z->c; /* ], line 29 */
389
+ z->c = c;
390
+ break;
391
+ lab4:
392
+ z->c = c;
393
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
394
+ if (c < 0) goto lab3;
395
+ z->c = c; /* goto, line 29 */
396
+ }
397
+ }
398
+ { int ret;
399
+ ret = slice_from_s(z, 1, s_4); /* <-, line 29 */
400
+ if (ret < 0) return ret;
401
+ }
402
+ z->B[0] = 1; /* set Y_found, line 29 */
403
+ continue;
404
+ lab3:
405
+ z->c = c;
406
+ break;
407
+ }
408
+ z->c = c;
409
+ }
410
+ return 1;
411
+ }
412
+
413
+ static int r_mark_regions(struct SN_env * z) {
414
+ z->I[0] = z->l;
415
+ z->I[1] = z->l;
416
+ { int c = z->c; /* do, line 35 */
417
+ { int c = z->c; /* or, line 40 */
418
+ if (!(find_among(z, a_0, 2))) goto lab2; /* among, line 36 */
419
+ goto lab1;
420
+ lab2:
421
+ z->c = c;
422
+ while(1) { /* gopast, line 40 */
423
+ if (!(in_grouping_U(z, g_v, 97, 121))) goto lab3;
424
+ break;
425
+ lab3:
426
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
427
+ if (c < 0) goto lab0;
428
+ z->c = c; /* gopast, line 40 */
429
+ }
430
+ }
431
+ while(1) { /* gopast, line 40 */
432
+ if (!(out_grouping_U(z, g_v, 97, 121))) goto lab4;
433
+ break;
434
+ lab4:
435
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
436
+ if (c < 0) goto lab0;
437
+ z->c = c; /* gopast, line 40 */
438
+ }
439
+ }
440
+ }
441
+ lab1:
442
+ z->I[0] = z->c; /* setmark p1, line 41 */
443
+ while(1) { /* gopast, line 42 */
444
+ if (!(in_grouping_U(z, g_v, 97, 121))) goto lab5;
445
+ break;
446
+ lab5:
447
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
448
+ if (c < 0) goto lab0;
449
+ z->c = c; /* gopast, line 42 */
450
+ }
451
+ }
452
+ while(1) { /* gopast, line 42 */
453
+ if (!(out_grouping_U(z, g_v, 97, 121))) goto lab6;
454
+ break;
455
+ lab6:
456
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
457
+ if (c < 0) goto lab0;
458
+ z->c = c; /* gopast, line 42 */
459
+ }
460
+ }
461
+ z->I[1] = z->c; /* setmark p2, line 42 */
462
+ lab0:
463
+ z->c = c;
464
+ }
465
+ return 1;
466
+ }
467
+
468
+ static int r_shortv(struct SN_env * z) {
469
+ { int m = z->l - z->c; (void) m; /* or, line 50 */
470
+ if (!(out_grouping_b_U(z, g_v_WXY, 89, 121))) goto lab1;
471
+ if (!(in_grouping_b_U(z, g_v, 97, 121))) goto lab1;
472
+ if (!(out_grouping_b_U(z, g_v, 97, 121))) goto lab1;
473
+ goto lab0;
474
+ lab1:
475
+ z->c = z->l - m;
476
+ if (!(out_grouping_b_U(z, g_v, 97, 121))) return 0;
477
+ if (!(in_grouping_b_U(z, g_v, 97, 121))) return 0;
478
+ if (z->c > z->lb) return 0; /* atlimit, line 51 */
479
+ }
480
+ lab0:
481
+ return 1;
482
+ }
483
+
484
+ static int r_R1(struct SN_env * z) {
485
+ if (!(z->I[0] <= z->c)) return 0;
486
+ return 1;
487
+ }
488
+
489
+ static int r_R2(struct SN_env * z) {
490
+ if (!(z->I[1] <= z->c)) return 0;
491
+ return 1;
492
+ }
493
+
494
+ static int r_Step_1a(struct SN_env * z) {
495
+ int among_var;
496
+ { int m = z->l - z->c; (void) m; /* try, line 58 */
497
+ z->ket = z->c; /* [, line 59 */
498
+ among_var = find_among_b(z, a_1, 3); /* substring, line 59 */
499
+ if (!(among_var)) { z->c = z->l - m; goto lab0; }
500
+ z->bra = z->c; /* ], line 59 */
501
+ switch(among_var) {
502
+ case 0: { z->c = z->l - m; goto lab0; }
503
+ case 1:
504
+ { int ret;
505
+ ret = slice_del(z); /* delete, line 61 */
506
+ if (ret < 0) return ret;
507
+ }
508
+ break;
509
+ }
510
+ lab0:
511
+ ;
512
+ }
513
+ z->ket = z->c; /* [, line 64 */
514
+ among_var = find_among_b(z, a_2, 6); /* substring, line 64 */
515
+ if (!(among_var)) return 0;
516
+ z->bra = z->c; /* ], line 64 */
517
+ switch(among_var) {
518
+ case 0: return 0;
519
+ case 1:
520
+ { int ret;
521
+ ret = slice_from_s(z, 2, s_5); /* <-, line 65 */
522
+ if (ret < 0) return ret;
523
+ }
524
+ break;
525
+ case 2:
526
+ { int m = z->l - z->c; (void) m; /* or, line 67 */
527
+ { int c = skip_utf8(z->p, z->c, z->lb, z->l, - 2);
528
+ if (c < 0) goto lab2;
529
+ z->c = c; /* hop, line 67 */
530
+ }
531
+ { int ret;
532
+ ret = slice_from_s(z, 1, s_6); /* <-, line 67 */
533
+ if (ret < 0) return ret;
534
+ }
535
+ goto lab1;
536
+ lab2:
537
+ z->c = z->l - m;
538
+ { int ret;
539
+ ret = slice_from_s(z, 2, s_7); /* <-, line 67 */
540
+ if (ret < 0) return ret;
541
+ }
542
+ }
543
+ lab1:
544
+ break;
545
+ case 3:
546
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
547
+ if (c < 0) return 0;
548
+ z->c = c; /* next, line 68 */
549
+ }
550
+ while(1) { /* gopast, line 68 */
551
+ if (!(in_grouping_b_U(z, g_v, 97, 121))) goto lab3;
552
+ break;
553
+ lab3:
554
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
555
+ if (c < 0) return 0;
556
+ z->c = c; /* gopast, line 68 */
557
+ }
558
+ }
559
+ { int ret;
560
+ ret = slice_del(z); /* delete, line 68 */
561
+ if (ret < 0) return ret;
562
+ }
563
+ break;
564
+ }
565
+ return 1;
566
+ }
567
+
568
+ static int r_Step_1b(struct SN_env * z) {
569
+ int among_var;
570
+ z->ket = z->c; /* [, line 74 */
571
+ among_var = find_among_b(z, a_4, 6); /* substring, line 74 */
572
+ if (!(among_var)) return 0;
573
+ z->bra = z->c; /* ], line 74 */
574
+ switch(among_var) {
575
+ case 0: return 0;
576
+ case 1:
577
+ { int ret = r_R1(z);
578
+ if (ret == 0) return 0; /* call R1, line 76 */
579
+ if (ret < 0) return ret;
580
+ }
581
+ { int ret;
582
+ ret = slice_from_s(z, 2, s_8); /* <-, line 76 */
583
+ if (ret < 0) return ret;
584
+ }
585
+ break;
586
+ case 2:
587
+ { int m_test = z->l - z->c; /* test, line 79 */
588
+ while(1) { /* gopast, line 79 */
589
+ if (!(in_grouping_b_U(z, g_v, 97, 121))) goto lab0;
590
+ break;
591
+ lab0:
592
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
593
+ if (c < 0) return 0;
594
+ z->c = c; /* gopast, line 79 */
595
+ }
596
+ }
597
+ z->c = z->l - m_test;
598
+ }
599
+ { int ret;
600
+ ret = slice_del(z); /* delete, line 79 */
601
+ if (ret < 0) return ret;
602
+ }
603
+ { int m_test = z->l - z->c; /* test, line 80 */
604
+ among_var = find_among_b(z, a_3, 13); /* substring, line 80 */
605
+ if (!(among_var)) return 0;
606
+ z->c = z->l - m_test;
607
+ }
608
+ switch(among_var) {
609
+ case 0: return 0;
610
+ case 1:
611
+ { int ret;
612
+ { int c = z->c;
613
+ ret = insert_s(z, z->c, z->c, 1, s_9); /* <+, line 82 */
614
+ z->c = c;
615
+ }
616
+ if (ret < 0) return ret;
617
+ }
618
+ break;
619
+ case 2:
620
+ z->ket = z->c; /* [, line 85 */
621
+ { int c = skip_utf8(z->p, z->c, z->lb, 0, -1);
622
+ if (c < 0) return 0;
623
+ z->c = c; /* next, line 85 */
624
+ }
625
+ z->bra = z->c; /* ], line 85 */
626
+ { int ret;
627
+ ret = slice_del(z); /* delete, line 85 */
628
+ if (ret < 0) return ret;
629
+ }
630
+ break;
631
+ case 3:
632
+ if (z->c != z->I[0]) return 0; /* atmark, line 86 */
633
+ { int m_test = z->l - z->c; /* test, line 86 */
634
+ { int ret = r_shortv(z);
635
+ if (ret == 0) return 0; /* call shortv, line 86 */
636
+ if (ret < 0) return ret;
637
+ }
638
+ z->c = z->l - m_test;
639
+ }
640
+ { int ret;
641
+ { int c = z->c;
642
+ ret = insert_s(z, z->c, z->c, 1, s_10); /* <+, line 86 */
643
+ z->c = c;
644
+ }
645
+ if (ret < 0) return ret;
646
+ }
647
+ break;
648
+ }
649
+ break;
650
+ }
651
+ return 1;
652
+ }
653
+
654
+ static int r_Step_1c(struct SN_env * z) {
655
+ z->ket = z->c; /* [, line 93 */
656
+ { int m = z->l - z->c; (void) m; /* or, line 93 */
657
+ if (!(eq_s_b(z, 1, s_11))) goto lab1;
658
+ goto lab0;
659
+ lab1:
660
+ z->c = z->l - m;
661
+ if (!(eq_s_b(z, 1, s_12))) return 0;
662
+ }
663
+ lab0:
664
+ z->bra = z->c; /* ], line 93 */
665
+ if (!(out_grouping_b_U(z, g_v, 97, 121))) return 0;
666
+ { int m = z->l - z->c; (void) m; /* not, line 94 */
667
+ if (z->c > z->lb) goto lab2; /* atlimit, line 94 */
668
+ return 0;
669
+ lab2:
670
+ z->c = z->l - m;
671
+ }
672
+ { int ret;
673
+ ret = slice_from_s(z, 1, s_13); /* <-, line 95 */
674
+ if (ret < 0) return ret;
675
+ }
676
+ return 1;
677
+ }
678
+
679
+ static int r_Step_2(struct SN_env * z) {
680
+ int among_var;
681
+ z->ket = z->c; /* [, line 99 */
682
+ among_var = find_among_b(z, a_5, 24); /* substring, line 99 */
683
+ if (!(among_var)) return 0;
684
+ z->bra = z->c; /* ], line 99 */
685
+ { int ret = r_R1(z);
686
+ if (ret == 0) return 0; /* call R1, line 99 */
687
+ if (ret < 0) return ret;
688
+ }
689
+ switch(among_var) {
690
+ case 0: return 0;
691
+ case 1:
692
+ { int ret;
693
+ ret = slice_from_s(z, 4, s_14); /* <-, line 100 */
694
+ if (ret < 0) return ret;
695
+ }
696
+ break;
697
+ case 2:
698
+ { int ret;
699
+ ret = slice_from_s(z, 4, s_15); /* <-, line 101 */
700
+ if (ret < 0) return ret;
701
+ }
702
+ break;
703
+ case 3:
704
+ { int ret;
705
+ ret = slice_from_s(z, 4, s_16); /* <-, line 102 */
706
+ if (ret < 0) return ret;
707
+ }
708
+ break;
709
+ case 4:
710
+ { int ret;
711
+ ret = slice_from_s(z, 4, s_17); /* <-, line 103 */
712
+ if (ret < 0) return ret;
713
+ }
714
+ break;
715
+ case 5:
716
+ { int ret;
717
+ ret = slice_from_s(z, 3, s_18); /* <-, line 104 */
718
+ if (ret < 0) return ret;
719
+ }
720
+ break;
721
+ case 6:
722
+ { int ret;
723
+ ret = slice_from_s(z, 3, s_19); /* <-, line 106 */
724
+ if (ret < 0) return ret;
725
+ }
726
+ break;
727
+ case 7:
728
+ { int ret;
729
+ ret = slice_from_s(z, 3, s_20); /* <-, line 108 */
730
+ if (ret < 0) return ret;
731
+ }
732
+ break;
733
+ case 8:
734
+ { int ret;
735
+ ret = slice_from_s(z, 2, s_21); /* <-, line 110 */
736
+ if (ret < 0) return ret;
737
+ }
738
+ break;
739
+ case 9:
740
+ { int ret;
741
+ ret = slice_from_s(z, 3, s_22); /* <-, line 111 */
742
+ if (ret < 0) return ret;
743
+ }
744
+ break;
745
+ case 10:
746
+ { int ret;
747
+ ret = slice_from_s(z, 3, s_23); /* <-, line 113 */
748
+ if (ret < 0) return ret;
749
+ }
750
+ break;
751
+ case 11:
752
+ { int ret;
753
+ ret = slice_from_s(z, 3, s_24); /* <-, line 115 */
754
+ if (ret < 0) return ret;
755
+ }
756
+ break;
757
+ case 12:
758
+ { int ret;
759
+ ret = slice_from_s(z, 3, s_25); /* <-, line 117 */
760
+ if (ret < 0) return ret;
761
+ }
762
+ break;
763
+ case 13:
764
+ if (!(eq_s_b(z, 1, s_26))) return 0;
765
+ { int ret;
766
+ ret = slice_from_s(z, 2, s_27); /* <-, line 118 */
767
+ if (ret < 0) return ret;
768
+ }
769
+ break;
770
+ case 14:
771
+ { int ret;
772
+ ret = slice_from_s(z, 3, s_28); /* <-, line 119 */
773
+ if (ret < 0) return ret;
774
+ }
775
+ break;
776
+ case 15:
777
+ { int ret;
778
+ ret = slice_from_s(z, 4, s_29); /* <-, line 120 */
779
+ if (ret < 0) return ret;
780
+ }
781
+ break;
782
+ case 16:
783
+ if (!(in_grouping_b_U(z, g_valid_LI, 99, 116))) return 0;
784
+ { int ret;
785
+ ret = slice_del(z); /* delete, line 121 */
786
+ if (ret < 0) return ret;
787
+ }
788
+ break;
789
+ }
790
+ return 1;
791
+ }
792
+
793
+ static int r_Step_3(struct SN_env * z) {
794
+ int among_var;
795
+ z->ket = z->c; /* [, line 126 */
796
+ among_var = find_among_b(z, a_6, 9); /* substring, line 126 */
797
+ if (!(among_var)) return 0;
798
+ z->bra = z->c; /* ], line 126 */
799
+ { int ret = r_R1(z);
800
+ if (ret == 0) return 0; /* call R1, line 126 */
801
+ if (ret < 0) return ret;
802
+ }
803
+ switch(among_var) {
804
+ case 0: return 0;
805
+ case 1:
806
+ { int ret;
807
+ ret = slice_from_s(z, 4, s_30); /* <-, line 127 */
808
+ if (ret < 0) return ret;
809
+ }
810
+ break;
811
+ case 2:
812
+ { int ret;
813
+ ret = slice_from_s(z, 3, s_31); /* <-, line 128 */
814
+ if (ret < 0) return ret;
815
+ }
816
+ break;
817
+ case 3:
818
+ { int ret;
819
+ ret = slice_from_s(z, 2, s_32); /* <-, line 129 */
820
+ if (ret < 0) return ret;
821
+ }
822
+ break;
823
+ case 4:
824
+ { int ret;
825
+ ret = slice_from_s(z, 2, s_33); /* <-, line 131 */
826
+ if (ret < 0) return ret;
827
+ }
828
+ break;
829
+ case 5:
830
+ { int ret;
831
+ ret = slice_del(z); /* delete, line 133 */
832
+ if (ret < 0) return ret;
833
+ }
834
+ break;
835
+ case 6:
836
+ { int ret = r_R2(z);
837
+ if (ret == 0) return 0; /* call R2, line 135 */
838
+ if (ret < 0) return ret;
839
+ }
840
+ { int ret;
841
+ ret = slice_del(z); /* delete, line 135 */
842
+ if (ret < 0) return ret;
843
+ }
844
+ break;
845
+ }
846
+ return 1;
847
+ }
848
+
849
+ static int r_Step_4(struct SN_env * z) {
850
+ int among_var;
851
+ z->ket = z->c; /* [, line 140 */
852
+ among_var = find_among_b(z, a_7, 18); /* substring, line 140 */
853
+ if (!(among_var)) return 0;
854
+ z->bra = z->c; /* ], line 140 */
855
+ { int ret = r_R2(z);
856
+ if (ret == 0) return 0; /* call R2, line 140 */
857
+ if (ret < 0) return ret;
858
+ }
859
+ switch(among_var) {
860
+ case 0: return 0;
861
+ case 1:
862
+ { int ret;
863
+ ret = slice_del(z); /* delete, line 143 */
864
+ if (ret < 0) return ret;
865
+ }
866
+ break;
867
+ case 2:
868
+ { int m = z->l - z->c; (void) m; /* or, line 144 */
869
+ if (!(eq_s_b(z, 1, s_34))) goto lab1;
870
+ goto lab0;
871
+ lab1:
872
+ z->c = z->l - m;
873
+ if (!(eq_s_b(z, 1, s_35))) return 0;
874
+ }
875
+ lab0:
876
+ { int ret;
877
+ ret = slice_del(z); /* delete, line 144 */
878
+ if (ret < 0) return ret;
879
+ }
880
+ break;
881
+ }
882
+ return 1;
883
+ }
884
+
885
+ static int r_Step_5(struct SN_env * z) {
886
+ int among_var;
887
+ z->ket = z->c; /* [, line 149 */
888
+ among_var = find_among_b(z, a_8, 2); /* substring, line 149 */
889
+ if (!(among_var)) return 0;
890
+ z->bra = z->c; /* ], line 149 */
891
+ switch(among_var) {
892
+ case 0: return 0;
893
+ case 1:
894
+ { int m = z->l - z->c; (void) m; /* or, line 150 */
895
+ { int ret = r_R2(z);
896
+ if (ret == 0) goto lab1; /* call R2, line 150 */
897
+ if (ret < 0) return ret;
898
+ }
899
+ goto lab0;
900
+ lab1:
901
+ z->c = z->l - m;
902
+ { int ret = r_R1(z);
903
+ if (ret == 0) return 0; /* call R1, line 150 */
904
+ if (ret < 0) return ret;
905
+ }
906
+ { int m = z->l - z->c; (void) m; /* not, line 150 */
907
+ { int ret = r_shortv(z);
908
+ if (ret == 0) goto lab2; /* call shortv, line 150 */
909
+ if (ret < 0) return ret;
910
+ }
911
+ return 0;
912
+ lab2:
913
+ z->c = z->l - m;
914
+ }
915
+ }
916
+ lab0:
917
+ { int ret;
918
+ ret = slice_del(z); /* delete, line 150 */
919
+ if (ret < 0) return ret;
920
+ }
921
+ break;
922
+ case 2:
923
+ { int ret = r_R2(z);
924
+ if (ret == 0) return 0; /* call R2, line 151 */
925
+ if (ret < 0) return ret;
926
+ }
927
+ if (!(eq_s_b(z, 1, s_36))) return 0;
928
+ { int ret;
929
+ ret = slice_del(z); /* delete, line 151 */
930
+ if (ret < 0) return ret;
931
+ }
932
+ break;
933
+ }
934
+ return 1;
935
+ }
936
+
937
+ static int r_exception2(struct SN_env * z) {
938
+ z->ket = z->c; /* [, line 157 */
939
+ if (!(find_among_b(z, a_9, 8))) return 0; /* substring, line 157 */
940
+ z->bra = z->c; /* ], line 157 */
941
+ if (z->c > z->lb) return 0; /* atlimit, line 157 */
942
+ return 1;
943
+ }
944
+
945
+ static int r_exception1(struct SN_env * z) {
946
+ int among_var;
947
+ z->bra = z->c; /* [, line 169 */
948
+ among_var = find_among(z, a_10, 18); /* substring, line 169 */
949
+ if (!(among_var)) return 0;
950
+ z->ket = z->c; /* ], line 169 */
951
+ if (z->c < z->l) return 0; /* atlimit, line 169 */
952
+ switch(among_var) {
953
+ case 0: return 0;
954
+ case 1:
955
+ { int ret;
956
+ ret = slice_from_s(z, 3, s_37); /* <-, line 173 */
957
+ if (ret < 0) return ret;
958
+ }
959
+ break;
960
+ case 2:
961
+ { int ret;
962
+ ret = slice_from_s(z, 3, s_38); /* <-, line 174 */
963
+ if (ret < 0) return ret;
964
+ }
965
+ break;
966
+ case 3:
967
+ { int ret;
968
+ ret = slice_from_s(z, 3, s_39); /* <-, line 175 */
969
+ if (ret < 0) return ret;
970
+ }
971
+ break;
972
+ case 4:
973
+ { int ret;
974
+ ret = slice_from_s(z, 3, s_40); /* <-, line 176 */
975
+ if (ret < 0) return ret;
976
+ }
977
+ break;
978
+ case 5:
979
+ { int ret;
980
+ ret = slice_from_s(z, 3, s_41); /* <-, line 177 */
981
+ if (ret < 0) return ret;
982
+ }
983
+ break;
984
+ case 6:
985
+ { int ret;
986
+ ret = slice_from_s(z, 3, s_42); /* <-, line 181 */
987
+ if (ret < 0) return ret;
988
+ }
989
+ break;
990
+ case 7:
991
+ { int ret;
992
+ ret = slice_from_s(z, 5, s_43); /* <-, line 182 */
993
+ if (ret < 0) return ret;
994
+ }
995
+ break;
996
+ case 8:
997
+ { int ret;
998
+ ret = slice_from_s(z, 4, s_44); /* <-, line 183 */
999
+ if (ret < 0) return ret;
1000
+ }
1001
+ break;
1002
+ case 9:
1003
+ { int ret;
1004
+ ret = slice_from_s(z, 5, s_45); /* <-, line 184 */
1005
+ if (ret < 0) return ret;
1006
+ }
1007
+ break;
1008
+ case 10:
1009
+ { int ret;
1010
+ ret = slice_from_s(z, 4, s_46); /* <-, line 185 */
1011
+ if (ret < 0) return ret;
1012
+ }
1013
+ break;
1014
+ case 11:
1015
+ { int ret;
1016
+ ret = slice_from_s(z, 5, s_47); /* <-, line 186 */
1017
+ if (ret < 0) return ret;
1018
+ }
1019
+ break;
1020
+ }
1021
+ return 1;
1022
+ }
1023
+
1024
+ static int r_postlude(struct SN_env * z) {
1025
+ if (!(z->B[0])) return 0; /* Boolean test Y_found, line 202 */
1026
+ while(1) { /* repeat, line 202 */
1027
+ int c = z->c;
1028
+ while(1) { /* goto, line 202 */
1029
+ int c = z->c;
1030
+ z->bra = z->c; /* [, line 202 */
1031
+ if (!(eq_s(z, 1, s_48))) goto lab1;
1032
+ z->ket = z->c; /* ], line 202 */
1033
+ z->c = c;
1034
+ break;
1035
+ lab1:
1036
+ z->c = c;
1037
+ { int c = skip_utf8(z->p, z->c, 0, z->l, 1);
1038
+ if (c < 0) goto lab0;
1039
+ z->c = c; /* goto, line 202 */
1040
+ }
1041
+ }
1042
+ { int ret;
1043
+ ret = slice_from_s(z, 1, s_49); /* <-, line 202 */
1044
+ if (ret < 0) return ret;
1045
+ }
1046
+ continue;
1047
+ lab0:
1048
+ z->c = c;
1049
+ break;
1050
+ }
1051
+ return 1;
1052
+ }
1053
+
1054
+ extern int english_UTF_8_stem(struct SN_env * z) {
1055
+ { int c = z->c; /* or, line 206 */
1056
+ { int ret = r_exception1(z);
1057
+ if (ret == 0) goto lab1; /* call exception1, line 206 */
1058
+ if (ret < 0) return ret;
1059
+ }
1060
+ goto lab0;
1061
+ lab1:
1062
+ z->c = c;
1063
+ { int c = z->c; /* not, line 207 */
1064
+ { int c = skip_utf8(z->p, z->c, 0, z->l, + 3);
1065
+ if (c < 0) goto lab3;
1066
+ z->c = c; /* hop, line 207 */
1067
+ }
1068
+ goto lab2;
1069
+ lab3:
1070
+ z->c = c;
1071
+ }
1072
+ goto lab0;
1073
+ lab2:
1074
+ z->c = c;
1075
+ { int c = z->c; /* do, line 208 */
1076
+ { int ret = r_prelude(z);
1077
+ if (ret == 0) goto lab4; /* call prelude, line 208 */
1078
+ if (ret < 0) return ret;
1079
+ }
1080
+ lab4:
1081
+ z->c = c;
1082
+ }
1083
+ { int c = z->c; /* do, line 209 */
1084
+ { int ret = r_mark_regions(z);
1085
+ if (ret == 0) goto lab5; /* call mark_regions, line 209 */
1086
+ if (ret < 0) return ret;
1087
+ }
1088
+ lab5:
1089
+ z->c = c;
1090
+ }
1091
+ z->lb = z->c; z->c = z->l; /* backwards, line 210 */
1092
+
1093
+ { int m = z->l - z->c; (void) m; /* do, line 212 */
1094
+ { int ret = r_Step_1a(z);
1095
+ if (ret == 0) goto lab6; /* call Step_1a, line 212 */
1096
+ if (ret < 0) return ret;
1097
+ }
1098
+ lab6:
1099
+ z->c = z->l - m;
1100
+ }
1101
+ { int m = z->l - z->c; (void) m; /* or, line 214 */
1102
+ { int ret = r_exception2(z);
1103
+ if (ret == 0) goto lab8; /* call exception2, line 214 */
1104
+ if (ret < 0) return ret;
1105
+ }
1106
+ goto lab7;
1107
+ lab8:
1108
+ z->c = z->l - m;
1109
+ { int m = z->l - z->c; (void) m; /* do, line 216 */
1110
+ { int ret = r_Step_1b(z);
1111
+ if (ret == 0) goto lab9; /* call Step_1b, line 216 */
1112
+ if (ret < 0) return ret;
1113
+ }
1114
+ lab9:
1115
+ z->c = z->l - m;
1116
+ }
1117
+ { int m = z->l - z->c; (void) m; /* do, line 217 */
1118
+ { int ret = r_Step_1c(z);
1119
+ if (ret == 0) goto lab10; /* call Step_1c, line 217 */
1120
+ if (ret < 0) return ret;
1121
+ }
1122
+ lab10:
1123
+ z->c = z->l - m;
1124
+ }
1125
+ { int m = z->l - z->c; (void) m; /* do, line 219 */
1126
+ { int ret = r_Step_2(z);
1127
+ if (ret == 0) goto lab11; /* call Step_2, line 219 */
1128
+ if (ret < 0) return ret;
1129
+ }
1130
+ lab11:
1131
+ z->c = z->l - m;
1132
+ }
1133
+ { int m = z->l - z->c; (void) m; /* do, line 220 */
1134
+ { int ret = r_Step_3(z);
1135
+ if (ret == 0) goto lab12; /* call Step_3, line 220 */
1136
+ if (ret < 0) return ret;
1137
+ }
1138
+ lab12:
1139
+ z->c = z->l - m;
1140
+ }
1141
+ { int m = z->l - z->c; (void) m; /* do, line 221 */
1142
+ { int ret = r_Step_4(z);
1143
+ if (ret == 0) goto lab13; /* call Step_4, line 221 */
1144
+ if (ret < 0) return ret;
1145
+ }
1146
+ lab13:
1147
+ z->c = z->l - m;
1148
+ }
1149
+ { int m = z->l - z->c; (void) m; /* do, line 223 */
1150
+ { int ret = r_Step_5(z);
1151
+ if (ret == 0) goto lab14; /* call Step_5, line 223 */
1152
+ if (ret < 0) return ret;
1153
+ }
1154
+ lab14:
1155
+ z->c = z->l - m;
1156
+ }
1157
+ }
1158
+ lab7:
1159
+ z->c = z->lb;
1160
+ { int c = z->c; /* do, line 226 */
1161
+ { int ret = r_postlude(z);
1162
+ if (ret == 0) goto lab15; /* call postlude, line 226 */
1163
+ if (ret < 0) return ret;
1164
+ }
1165
+ lab15:
1166
+ z->c = c;
1167
+ }
1168
+ }
1169
+ lab0:
1170
+ return 1;
1171
+ }
1172
+
1173
+ extern struct SN_env * english_UTF_8_create_env(void) { return SN_create_env(0, 2, 1); }
1174
+
1175
+ extern void english_UTF_8_close_env(struct SN_env * z) { SN_close_env(z); }
1176
+