gherkin 2.4.18 → 2.4.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +6 -7
- data/History.md +9 -0
- data/README.md +2 -2
- data/ext/gherkin_lexer_ar/extconf.rb +6 -0
- data/ext/gherkin_lexer_ar/gherkin_lexer_ar.c +1428 -0
- data/ext/gherkin_lexer_bg/extconf.rb +6 -0
- data/ext/gherkin_lexer_bg/gherkin_lexer_bg.c +1654 -0
- data/ext/gherkin_lexer_ca/extconf.rb +6 -0
- data/ext/gherkin_lexer_ca/gherkin_lexer_ca.c +1580 -0
- data/ext/gherkin_lexer_cs/extconf.rb +6 -0
- data/ext/gherkin_lexer_cs/gherkin_lexer_cs.c +1426 -0
- data/ext/gherkin_lexer_cy_gb/extconf.rb +6 -0
- data/ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c +1281 -0
- data/ext/gherkin_lexer_da/extconf.rb +6 -0
- data/ext/gherkin_lexer_da/gherkin_lexer_da.c +1297 -0
- data/ext/gherkin_lexer_de/extconf.rb +6 -0
- data/ext/gherkin_lexer_de/gherkin_lexer_de.c +1414 -0
- data/ext/gherkin_lexer_en/extconf.rb +6 -0
- data/ext/gherkin_lexer_en/gherkin_lexer_en.c +1264 -0
- data/ext/gherkin_lexer_en_au/extconf.rb +6 -0
- data/ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c +1225 -0
- data/ext/gherkin_lexer_en_lol/extconf.rb +6 -0
- data/ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c +1174 -0
- data/ext/gherkin_lexer_en_pirate/extconf.rb +6 -0
- data/ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c +1470 -0
- data/ext/gherkin_lexer_en_scouse/extconf.rb +6 -0
- data/ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c +1631 -0
- data/ext/gherkin_lexer_en_tx/extconf.rb +6 -0
- data/ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c +1264 -0
- data/ext/gherkin_lexer_eo/extconf.rb +6 -0
- data/ext/gherkin_lexer_eo/gherkin_lexer_eo.c +1240 -0
- data/ext/gherkin_lexer_es/extconf.rb +6 -0
- data/ext/gherkin_lexer_es/gherkin_lexer_es.c +1379 -0
- data/ext/gherkin_lexer_et/extconf.rb +6 -0
- data/ext/gherkin_lexer_et/gherkin_lexer_et.c +1235 -0
- data/ext/gherkin_lexer_fi/extconf.rb +6 -0
- data/ext/gherkin_lexer_fi/gherkin_lexer_fi.c +1214 -0
- data/ext/gherkin_lexer_fr/extconf.rb +6 -0
- data/ext/gherkin_lexer_fr/gherkin_lexer_fr.c +1450 -0
- data/ext/gherkin_lexer_he/extconf.rb +6 -0
- data/ext/gherkin_lexer_he/gherkin_lexer_he.c +1373 -0
- data/ext/gherkin_lexer_hr/extconf.rb +6 -0
- data/ext/gherkin_lexer_hr/gherkin_lexer_hr.c +1322 -0
- data/ext/gherkin_lexer_hu/extconf.rb +6 -0
- data/ext/gherkin_lexer_hu/gherkin_lexer_hu.c +1373 -0
- data/ext/gherkin_lexer_id/extconf.rb +6 -0
- data/ext/gherkin_lexer_id/gherkin_lexer_id.c +1207 -0
- data/ext/gherkin_lexer_is/extconf.rb +6 -0
- data/ext/gherkin_lexer_is/gherkin_lexer_is.c +1375 -0
- data/ext/gherkin_lexer_it/extconf.rb +6 -0
- data/ext/gherkin_lexer_it/gherkin_lexer_it.c +1331 -0
- data/ext/gherkin_lexer_ja/extconf.rb +6 -0
- data/ext/gherkin_lexer_ja/gherkin_lexer_ja.c +1698 -0
- data/ext/gherkin_lexer_ko/extconf.rb +6 -0
- data/ext/gherkin_lexer_ko/gherkin_lexer_ko.c +1359 -0
- data/ext/gherkin_lexer_lt/extconf.rb +6 -0
- data/ext/gherkin_lexer_lt/gherkin_lexer_lt.c +1294 -0
- data/ext/gherkin_lexer_lu/extconf.rb +6 -0
- data/ext/gherkin_lexer_lu/gherkin_lexer_lu.c +1388 -0
- data/ext/gherkin_lexer_lv/extconf.rb +6 -0
- data/ext/gherkin_lexer_lv/gherkin_lexer_lv.c +1424 -0
- data/ext/gherkin_lexer_nl/extconf.rb +6 -0
- data/ext/gherkin_lexer_nl/gherkin_lexer_nl.c +1367 -0
- data/ext/gherkin_lexer_no/extconf.rb +6 -0
- data/ext/gherkin_lexer_no/gherkin_lexer_no.c +1310 -0
- data/ext/gherkin_lexer_pl/extconf.rb +6 -0
- data/ext/gherkin_lexer_pl/gherkin_lexer_pl.c +1476 -0
- data/ext/gherkin_lexer_pt/extconf.rb +6 -0
- data/ext/gherkin_lexer_pt/gherkin_lexer_pt.c +1326 -0
- data/ext/gherkin_lexer_ro/extconf.rb +6 -0
- data/ext/gherkin_lexer_ro/gherkin_lexer_ro.c +1424 -0
- data/ext/gherkin_lexer_ru/extconf.rb +6 -0
- data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +2056 -0
- data/ext/gherkin_lexer_sk/extconf.rb +6 -0
- data/ext/gherkin_lexer_sk/gherkin_lexer_sk.c +1297 -0
- data/ext/gherkin_lexer_sr_cyrl/extconf.rb +6 -0
- data/ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c +2111 -0
- data/ext/gherkin_lexer_sr_latn/extconf.rb +6 -0
- data/ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c +1566 -0
- data/ext/gherkin_lexer_sv/extconf.rb +6 -0
- data/ext/gherkin_lexer_sv/gherkin_lexer_sv.c +1323 -0
- data/ext/gherkin_lexer_tr/extconf.rb +6 -0
- data/ext/gherkin_lexer_tr/gherkin_lexer_tr.c +1346 -0
- data/ext/gherkin_lexer_uk/extconf.rb +6 -0
- data/ext/gherkin_lexer_uk/gherkin_lexer_uk.c +1940 -0
- data/ext/gherkin_lexer_uz/extconf.rb +6 -0
- data/ext/gherkin_lexer_uz/gherkin_lexer_uz.c +1650 -0
- data/ext/gherkin_lexer_vi/extconf.rb +6 -0
- data/ext/gherkin_lexer_vi/gherkin_lexer_vi.c +1457 -0
- data/ext/gherkin_lexer_zh_cn/extconf.rb +6 -0
- data/ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c +1222 -0
- data/ext/gherkin_lexer_zh_tw/extconf.rb +6 -0
- data/ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c +1264 -0
- data/gherkin.gemspec +9 -3
- data/lib/gherkin/formatter/filter_formatter.rb +6 -1
- data/lib/gherkin/rb_lexer/ar.rb +1162 -0
- data/lib/gherkin/rb_lexer/bg.rb +1374 -0
- data/lib/gherkin/rb_lexer/ca.rb +1304 -0
- data/lib/gherkin/rb_lexer/cs.rb +1156 -0
- data/lib/gherkin/rb_lexer/cy_gb.rb +1026 -0
- data/lib/gherkin/rb_lexer/da.rb +1040 -0
- data/lib/gherkin/rb_lexer/de.rb +1150 -0
- data/lib/gherkin/rb_lexer/en.rb +1008 -0
- data/lib/gherkin/rb_lexer/en_au.rb +972 -0
- data/lib/gherkin/rb_lexer/en_lol.rb +927 -0
- data/lib/gherkin/rb_lexer/en_pirate.rb +1204 -0
- data/lib/gherkin/rb_lexer/en_scouse.rb +1355 -0
- data/lib/gherkin/rb_lexer/en_tx.rb +1010 -0
- data/lib/gherkin/rb_lexer/eo.rb +989 -0
- data/lib/gherkin/rb_lexer/es.rb +1116 -0
- data/lib/gherkin/rb_lexer/et.rb +982 -0
- data/lib/gherkin/rb_lexer/fi.rb +963 -0
- data/lib/gherkin/rb_lexer/fr.rb +1184 -0
- data/lib/gherkin/rb_lexer/he.rb +1110 -0
- data/lib/gherkin/rb_lexer/hr.rb +1060 -0
- data/lib/gherkin/rb_lexer/hu.rb +1111 -0
- data/lib/gherkin/rb_lexer/id.rb +957 -0
- data/lib/gherkin/rb_lexer/is.rb +1114 -0
- data/lib/gherkin/rb_lexer/it.rb +1075 -0
- data/lib/gherkin/rb_lexer/ja.rb +1412 -0
- data/lib/gherkin/rb_lexer/ko.rb +1096 -0
- data/lib/gherkin/rb_lexer/lt.rb +1038 -0
- data/lib/gherkin/rb_lexer/lu.rb +1126 -0
- data/lib/gherkin/rb_lexer/lv.rb +1158 -0
- data/lib/gherkin/rb_lexer/nl.rb +1109 -0
- data/lib/gherkin/rb_lexer/no.rb +1052 -0
- data/lib/gherkin/rb_lexer/pl.rb +1208 -0
- data/lib/gherkin/rb_lexer/pt.rb +1066 -0
- data/lib/gherkin/rb_lexer/ro.rb +1155 -0
- data/lib/gherkin/rb_lexer/ru.rb +1747 -0
- data/lib/gherkin/rb_lexer/sk.rb +1040 -0
- data/lib/gherkin/rb_lexer/sr_cyrl.rb +1797 -0
- data/lib/gherkin/rb_lexer/sr_latn.rb +1288 -0
- data/lib/gherkin/rb_lexer/sv.rb +1064 -0
- data/lib/gherkin/rb_lexer/tr.rb +1086 -0
- data/lib/gherkin/rb_lexer/uk.rb +1640 -0
- data/lib/gherkin/rb_lexer/uz.rb +1370 -0
- data/lib/gherkin/rb_lexer/vi.rb +1190 -0
- data/lib/gherkin/rb_lexer/zh_cn.rb +968 -0
- data/lib/gherkin/rb_lexer/zh_tw.rb +1006 -0
- data/spec/gherkin/fixtures/examples_with_only_header.feature +14 -0
- data/spec/gherkin/formatter/filter_formatter_spec.rb +21 -0
- data/tasks/gems.rake +9 -1
- metadata +30 -39
- data/.gitignore +0 -13
- data/ikvm/.gitignore +0 -3
- data/java/.gitignore +0 -5
- data/java/src/main/java/gherkin/lexer/i18n/.gitignore +0 -1
- data/java/src/main/resources/gherkin/.gitignore +0 -1
- data/js/.gitignore +0 -1
- data/js/lib/gherkin/lexer/.gitignore +0 -1
- data/lib/.gitignore +0 -4
- data/lib/gherkin/rb_lexer/.gitignore +0 -1
- data/ragel/i18n/.gitignore +0 -1
- data/tasks/bench/generated/.gitignore +0 -1
@@ -0,0 +1,1264 @@
|
|
1
|
+
|
2
|
+
#line 1 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
3
|
+
#include <assert.h>
|
4
|
+
#include <ruby.h>
|
5
|
+
|
6
|
+
#if defined(_WIN32)
|
7
|
+
#include <stddef.h>
|
8
|
+
#endif
|
9
|
+
|
10
|
+
#ifdef HAVE_RUBY_RE_H
|
11
|
+
#include <ruby/re.h>
|
12
|
+
#else
|
13
|
+
#include <re.h>
|
14
|
+
#endif
|
15
|
+
|
16
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
17
|
+
#include <ruby/encoding.h>
|
18
|
+
#define ENCODED_STR_NEW(ptr, len) \
|
19
|
+
rb_enc_str_new(ptr, len, rb_utf8_encoding())
|
20
|
+
#else
|
21
|
+
#define ENCODED_STR_NEW(ptr, len) \
|
22
|
+
rb_str_new(ptr, len)
|
23
|
+
#endif
|
24
|
+
|
25
|
+
#ifndef RSTRING_PTR
|
26
|
+
#define RSTRING_PTR(s) (RSTRING(s)->ptr)
|
27
|
+
#endif
|
28
|
+
|
29
|
+
#ifndef RSTRING_LEN
|
30
|
+
#define RSTRING_LEN(s) (RSTRING(s)->len)
|
31
|
+
#endif
|
32
|
+
|
33
|
+
#define DATA_GET(FROM, TYPE, NAME) \
|
34
|
+
Data_Get_Struct(FROM, TYPE, NAME); \
|
35
|
+
if (NAME == NULL) { \
|
36
|
+
rb_raise(rb_eArgError, "NULL found for " # NAME " when it shouldn't be."); \
|
37
|
+
}
|
38
|
+
|
39
|
+
typedef struct lexer_state {
|
40
|
+
int content_len;
|
41
|
+
int line_number;
|
42
|
+
int current_line;
|
43
|
+
int start_col;
|
44
|
+
size_t mark;
|
45
|
+
size_t keyword_start;
|
46
|
+
size_t keyword_end;
|
47
|
+
size_t next_keyword_start;
|
48
|
+
size_t content_start;
|
49
|
+
size_t content_end;
|
50
|
+
size_t docstring_content_type_start;
|
51
|
+
size_t docstring_content_type_end;
|
52
|
+
size_t query_start;
|
53
|
+
size_t last_newline;
|
54
|
+
size_t final_newline;
|
55
|
+
} lexer_state;
|
56
|
+
|
57
|
+
static VALUE mGherkin;
|
58
|
+
static VALUE mGherkinLexer;
|
59
|
+
static VALUE mCLexer;
|
60
|
+
static VALUE cI18nLexer;
|
61
|
+
static VALUE rb_eGherkinLexingError;
|
62
|
+
|
63
|
+
#define LEN(AT, P) (P - data - lexer->AT)
|
64
|
+
#define MARK(M, P) (lexer->M = (P) - data)
|
65
|
+
#define PTR_TO(P) (data + lexer->P)
|
66
|
+
|
67
|
+
#define STORE_KW_END_CON(EVENT) \
|
68
|
+
store_multiline_kw_con(listener, # EVENT, \
|
69
|
+
PTR_TO(keyword_start), LEN(keyword_start, PTR_TO(keyword_end - 1)), \
|
70
|
+
PTR_TO(content_start), LEN(content_start, PTR_TO(content_end)), \
|
71
|
+
lexer->current_line, lexer->start_col); \
|
72
|
+
if (lexer->content_end != 0) { \
|
73
|
+
p = PTR_TO(content_end - 1); \
|
74
|
+
} \
|
75
|
+
lexer->content_end = 0
|
76
|
+
|
77
|
+
#define STORE_ATTR(ATTR) \
|
78
|
+
store_attr(listener, # ATTR, \
|
79
|
+
PTR_TO(content_start), LEN(content_start, p), \
|
80
|
+
lexer->line_number)
|
81
|
+
|
82
|
+
|
83
|
+
#line 254 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
84
|
+
|
85
|
+
|
86
|
+
/** Data **/
|
87
|
+
|
88
|
+
#line 89 "ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c"
|
89
|
+
static const char _lexer_actions[] = {
|
90
|
+
0, 1, 0, 1, 1, 1, 2, 1,
|
91
|
+
3, 1, 4, 1, 5, 1, 6, 1,
|
92
|
+
7, 1, 8, 1, 9, 1, 10, 1,
|
93
|
+
11, 1, 12, 1, 13, 1, 16, 1,
|
94
|
+
17, 1, 18, 1, 19, 1, 20, 1,
|
95
|
+
21, 1, 22, 1, 23, 2, 1, 18,
|
96
|
+
2, 4, 5, 2, 13, 0, 2, 14,
|
97
|
+
15, 2, 17, 0, 2, 17, 2, 2,
|
98
|
+
17, 16, 2, 17, 19, 2, 18, 6,
|
99
|
+
2, 18, 7, 2, 18, 8, 2, 18,
|
100
|
+
9, 2, 18, 10, 2, 18, 16, 2,
|
101
|
+
20, 21, 2, 22, 0, 2, 22, 2,
|
102
|
+
2, 22, 16, 2, 22, 19, 3, 3,
|
103
|
+
14, 15, 3, 5, 14, 15, 3, 11,
|
104
|
+
14, 15, 3, 12, 14, 15, 3, 13,
|
105
|
+
14, 15, 3, 14, 15, 18, 3, 17,
|
106
|
+
14, 15, 4, 1, 14, 15, 18, 4,
|
107
|
+
4, 5, 14, 15, 4, 17, 0, 14,
|
108
|
+
15
|
109
|
+
};
|
110
|
+
|
111
|
+
static const short _lexer_key_offsets[] = {
|
112
|
+
0, 0, 16, 19, 20, 21, 22, 23,
|
113
|
+
24, 26, 41, 44, 45, 46, 47, 48,
|
114
|
+
50, 51, 52, 53, 55, 56, 57, 58,
|
115
|
+
59, 60, 61, 62, 63, 76, 79, 81,
|
116
|
+
83, 85, 87, 102, 103, 104, 106, 107,
|
117
|
+
108, 109, 110, 111, 112, 113, 114, 127,
|
118
|
+
130, 132, 134, 136, 138, 140, 142, 144,
|
119
|
+
146, 150, 152, 154, 156, 158, 161, 163,
|
120
|
+
165, 167, 170, 172, 174, 176, 178, 180,
|
121
|
+
182, 184, 186, 188, 190, 192, 194, 196,
|
122
|
+
198, 200, 202, 204, 206, 208, 210, 212,
|
123
|
+
214, 216, 218, 220, 222, 224, 226, 228,
|
124
|
+
230, 232, 234, 236, 238, 240, 242, 244,
|
125
|
+
245, 246, 247, 248, 249, 250, 251, 253,
|
126
|
+
255, 260, 265, 270, 275, 279, 283, 285,
|
127
|
+
286, 287, 288, 289, 290, 291, 292, 293,
|
128
|
+
294, 295, 296, 297, 298, 299, 300, 301,
|
129
|
+
306, 313, 318, 322, 328, 331, 333, 339,
|
130
|
+
354, 356, 358, 360, 362, 366, 368, 370,
|
131
|
+
372, 374, 377, 379, 381, 383, 385, 387,
|
132
|
+
389, 391, 393, 395, 397, 399, 401, 403,
|
133
|
+
405, 407, 409, 411, 413, 415, 417, 419,
|
134
|
+
421, 423, 425, 427, 429, 431, 433, 435,
|
135
|
+
437, 439, 441, 443, 445, 447, 448, 449,
|
136
|
+
462, 465, 467, 469, 471, 473, 475, 477,
|
137
|
+
479, 481, 485, 487, 489, 491, 493, 496,
|
138
|
+
498, 500, 502, 505, 507, 509, 511, 513,
|
139
|
+
515, 517, 519, 521, 523, 525, 527, 529,
|
140
|
+
531, 533, 535, 538, 540, 542, 544, 546,
|
141
|
+
548, 550, 552, 554, 556, 558, 560, 562,
|
142
|
+
564, 566, 568, 570, 572, 574, 576, 578,
|
143
|
+
580, 582, 584, 586, 588, 589, 590, 591,
|
144
|
+
592, 593, 594, 604, 606, 608, 610, 612,
|
145
|
+
614, 616, 619, 622, 624, 626, 628, 631,
|
146
|
+
633, 635, 637, 639, 641, 643, 645, 647,
|
147
|
+
649, 651, 653, 655, 657, 659, 661, 663,
|
148
|
+
665, 667, 669, 671, 673, 675, 677, 679,
|
149
|
+
681, 683, 685, 687, 689, 691, 693, 694,
|
150
|
+
695, 696, 697, 698, 699, 700, 701, 702,
|
151
|
+
703, 704, 705, 706, 707, 708, 715, 717,
|
152
|
+
719, 721, 723, 725, 727, 728, 729
|
153
|
+
};
|
154
|
+
|
155
|
+
static const char _lexer_trans_keys[] = {
|
156
|
+
-28, -27, -25, -24, -23, -17, 10, 32,
|
157
|
+
34, 35, 37, 42, 64, 124, 9, 13,
|
158
|
+
-72, -67, -66, -90, -28, -72, -108, 10,
|
159
|
+
10, 13, -28, -27, -25, -24, -23, 10,
|
160
|
+
32, 34, 35, 37, 42, 64, 124, 9,
|
161
|
+
13, -127, -118, -96, -121, -24, -88, -83,
|
162
|
+
-121, -97, -26, -100, -84, -27, 58, -92,
|
163
|
+
-89, -25, -74, -79, 58, 10, 10, -28,
|
164
|
+
-27, -25, -24, -23, 10, 32, 35, 37,
|
165
|
+
42, 64, 9, 13, -72, -67, 10, -90,
|
166
|
+
10, -28, 10, -72, 10, -108, 10, -28,
|
167
|
+
-27, -25, -24, -23, 10, 32, 34, 35,
|
168
|
+
37, 42, 64, 124, 9, 13, -107, -74,
|
169
|
+
-128, -125, -116, -116, -26, -103, -81, 58,
|
170
|
+
10, 10, -28, -27, -25, -24, -23, 10,
|
171
|
+
32, 35, 37, 42, 64, 9, 13, -72,
|
172
|
+
-67, 10, -90, 10, -28, 10, -72, 10,
|
173
|
+
-108, 10, -122, 10, -26, 10, -104, 10,
|
174
|
+
-81, 10, -127, -118, -96, 10, -121, 10,
|
175
|
+
-24, 10, -88, 10, -83, 10, -121, -97,
|
176
|
+
10, -26, 10, -100, 10, -84, 10, -27,
|
177
|
+
10, 58, -92, 10, -89, 10, -25, 10,
|
178
|
+
-74, 10, -79, 10, 10, 58, -24, 10,
|
179
|
+
-125, 10, -67, 10, -76, 10, -26, 10,
|
180
|
+
-103, 10, -81, 10, -107, 10, -74, 10,
|
181
|
+
-128, 10, -116, 10, -126, 10, -93, 10,
|
182
|
+
-23, 10, -70, 10, -68, 10, 10, 95,
|
183
|
+
10, 70, 10, 69, 10, 65, 10, 84,
|
184
|
+
10, 85, 10, 82, 10, 69, 10, 95,
|
185
|
+
10, 69, 10, 78, 10, 68, 10, 95,
|
186
|
+
10, 37, 10, 32, -126, -93, -23, -70,
|
187
|
+
-68, 34, 34, 10, 13, 10, 13, 10,
|
188
|
+
32, 34, 9, 13, 10, 32, 34, 9,
|
189
|
+
13, 10, 32, 34, 9, 13, 10, 32,
|
190
|
+
34, 9, 13, 10, 32, 9, 13, 10,
|
191
|
+
32, 9, 13, 10, 13, 10, 95, 70,
|
192
|
+
69, 65, 84, 85, 82, 69, 95, 69,
|
193
|
+
78, 68, 95, 37, 32, 13, 32, 64,
|
194
|
+
9, 10, 9, 10, 13, 32, 64, 11,
|
195
|
+
12, 10, 32, 64, 9, 13, 32, 124,
|
196
|
+
9, 13, 10, 32, 92, 124, 9, 13,
|
197
|
+
10, 92, 124, 10, 92, 10, 32, 92,
|
198
|
+
124, 9, 13, -28, -27, -25, -24, -23,
|
199
|
+
10, 32, 34, 35, 37, 42, 64, 124,
|
200
|
+
9, 13, -122, 10, -26, 10, -104, 10,
|
201
|
+
-81, 10, -127, -118, -96, 10, -121, 10,
|
202
|
+
-24, 10, -88, 10, -83, 10, -121, -97,
|
203
|
+
10, -26, 10, -100, 10, -84, 10, 10,
|
204
|
+
58, -24, 10, -125, 10, -67, 10, -76,
|
205
|
+
10, -26, 10, -103, 10, -81, 10, -107,
|
206
|
+
10, -74, 10, -128, 10, -116, 10, -126,
|
207
|
+
10, -93, 10, -23, 10, -70, 10, -68,
|
208
|
+
10, 10, 95, 10, 70, 10, 69, 10,
|
209
|
+
65, 10, 84, 10, 85, 10, 82, 10,
|
210
|
+
69, 10, 95, 10, 69, 10, 78, 10,
|
211
|
+
68, 10, 95, 10, 37, 10, 32, 10,
|
212
|
+
10, -28, -27, -25, -24, -23, 10, 32,
|
213
|
+
35, 37, 42, 64, 9, 13, -72, -67,
|
214
|
+
10, -90, 10, -28, 10, -72, 10, -108,
|
215
|
+
10, -122, 10, -26, 10, -104, 10, -81,
|
216
|
+
10, -127, -118, -96, 10, -121, 10, -24,
|
217
|
+
10, -88, 10, -83, 10, -121, -97, 10,
|
218
|
+
-26, 10, -100, 10, -84, 10, -27, 10,
|
219
|
+
58, -92, 10, -89, 10, -25, 10, -74,
|
220
|
+
10, -79, 10, 10, 58, -24, 10, -125,
|
221
|
+
10, -67, 10, -76, 10, -26, 10, -103,
|
222
|
+
10, -81, 10, -107, 10, -74, 10, -128,
|
223
|
+
-125, 10, -116, 10, -116, 10, -26, 10,
|
224
|
+
-103, 10, -81, 10, -126, 10, -93, 10,
|
225
|
+
-23, 10, -70, 10, -68, 10, 10, 95,
|
226
|
+
10, 70, 10, 69, 10, 65, 10, 84,
|
227
|
+
10, 85, 10, 82, 10, 69, 10, 95,
|
228
|
+
10, 69, 10, 78, 10, 68, 10, 95,
|
229
|
+
10, 37, 10, 32, -24, -125, -67, 58,
|
230
|
+
10, 10, -28, -27, -24, 10, 32, 35,
|
231
|
+
37, 64, 9, 13, -66, 10, -117, 10,
|
232
|
+
-27, 10, -83, 10, -112, 10, 10, 58,
|
233
|
+
-118, -96, 10, -121, -97, 10, -26, 10,
|
234
|
+
-100, 10, -84, 10, -27, 10, 58, -92,
|
235
|
+
10, -89, 10, -25, 10, -74, 10, -79,
|
236
|
+
10, -24, 10, -125, 10, -67, 10, -76,
|
237
|
+
10, -26, 10, -103, 10, -81, 10, -125,
|
238
|
+
10, -116, 10, -26, 10, -103, 10, -81,
|
239
|
+
10, 10, 95, 10, 70, 10, 69, 10,
|
240
|
+
65, 10, 84, 10, 85, 10, 82, 10,
|
241
|
+
69, 10, 95, 10, 69, 10, 78, 10,
|
242
|
+
68, 10, 95, 10, 37, -76, -26, -103,
|
243
|
+
-81, -122, -26, -104, -81, -117, -27, -83,
|
244
|
+
-112, 58, 10, 10, -27, 10, 32, 35,
|
245
|
+
124, 9, 13, -118, 10, -97, 10, -24,
|
246
|
+
10, -125, 10, -67, 10, 10, 58, -69,
|
247
|
+
-65, 0
|
248
|
+
};
|
249
|
+
|
250
|
+
static const char _lexer_single_lengths[] = {
|
251
|
+
0, 14, 3, 1, 1, 1, 1, 1,
|
252
|
+
2, 13, 3, 1, 1, 1, 1, 2,
|
253
|
+
1, 1, 1, 2, 1, 1, 1, 1,
|
254
|
+
1, 1, 1, 1, 11, 3, 2, 2,
|
255
|
+
2, 2, 13, 1, 1, 2, 1, 1,
|
256
|
+
1, 1, 1, 1, 1, 1, 11, 3,
|
257
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
258
|
+
4, 2, 2, 2, 2, 3, 2, 2,
|
259
|
+
2, 3, 2, 2, 2, 2, 2, 2,
|
260
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
261
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
262
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
263
|
+
2, 2, 2, 2, 2, 2, 2, 1,
|
264
|
+
1, 1, 1, 1, 1, 1, 2, 2,
|
265
|
+
3, 3, 3, 3, 2, 2, 2, 1,
|
266
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
267
|
+
1, 1, 1, 1, 1, 1, 1, 3,
|
268
|
+
5, 3, 2, 4, 3, 2, 4, 13,
|
269
|
+
2, 2, 2, 2, 4, 2, 2, 2,
|
270
|
+
2, 3, 2, 2, 2, 2, 2, 2,
|
271
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
272
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
273
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
274
|
+
2, 2, 2, 2, 2, 1, 1, 11,
|
275
|
+
3, 2, 2, 2, 2, 2, 2, 2,
|
276
|
+
2, 4, 2, 2, 2, 2, 3, 2,
|
277
|
+
2, 2, 3, 2, 2, 2, 2, 2,
|
278
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
279
|
+
2, 2, 3, 2, 2, 2, 2, 2,
|
280
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
281
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
282
|
+
2, 2, 2, 2, 1, 1, 1, 1,
|
283
|
+
1, 1, 8, 2, 2, 2, 2, 2,
|
284
|
+
2, 3, 3, 2, 2, 2, 3, 2,
|
285
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
286
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
287
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
288
|
+
2, 2, 2, 2, 2, 2, 1, 1,
|
289
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
290
|
+
1, 1, 1, 1, 1, 5, 2, 2,
|
291
|
+
2, 2, 2, 2, 1, 1, 0
|
292
|
+
};
|
293
|
+
|
294
|
+
static const char _lexer_range_lengths[] = {
|
295
|
+
0, 1, 0, 0, 0, 0, 0, 0,
|
296
|
+
0, 1, 0, 0, 0, 0, 0, 0,
|
297
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
298
|
+
0, 0, 0, 0, 1, 0, 0, 0,
|
299
|
+
0, 0, 1, 0, 0, 0, 0, 0,
|
300
|
+
0, 0, 0, 0, 0, 0, 1, 0,
|
301
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
302
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
303
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
304
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
305
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
306
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
307
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
308
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
309
|
+
1, 1, 1, 1, 1, 1, 0, 0,
|
310
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
311
|
+
0, 0, 0, 0, 0, 0, 0, 1,
|
312
|
+
1, 1, 1, 1, 0, 0, 1, 1,
|
313
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
314
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
315
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
316
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
317
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
318
|
+
0, 0, 0, 0, 0, 0, 0, 1,
|
319
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
320
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
321
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
322
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
323
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
324
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
325
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
326
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
327
|
+
0, 0, 1, 0, 0, 0, 0, 0,
|
328
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
329
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
330
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
331
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
332
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
333
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
334
|
+
0, 0, 0, 0, 0, 1, 0, 0,
|
335
|
+
0, 0, 0, 0, 0, 0, 0
|
336
|
+
};
|
337
|
+
|
338
|
+
static const short _lexer_index_offsets[] = {
|
339
|
+
0, 0, 16, 20, 22, 24, 26, 28,
|
340
|
+
30, 33, 48, 52, 54, 56, 58, 60,
|
341
|
+
63, 65, 67, 69, 72, 74, 76, 78,
|
342
|
+
80, 82, 84, 86, 88, 101, 105, 108,
|
343
|
+
111, 114, 117, 132, 134, 136, 139, 141,
|
344
|
+
143, 145, 147, 149, 151, 153, 155, 168,
|
345
|
+
172, 175, 178, 181, 184, 187, 190, 193,
|
346
|
+
196, 201, 204, 207, 210, 213, 217, 220,
|
347
|
+
223, 226, 230, 233, 236, 239, 242, 245,
|
348
|
+
248, 251, 254, 257, 260, 263, 266, 269,
|
349
|
+
272, 275, 278, 281, 284, 287, 290, 293,
|
350
|
+
296, 299, 302, 305, 308, 311, 314, 317,
|
351
|
+
320, 323, 326, 329, 332, 335, 338, 341,
|
352
|
+
343, 345, 347, 349, 351, 353, 355, 358,
|
353
|
+
361, 366, 371, 376, 381, 385, 389, 392,
|
354
|
+
394, 396, 398, 400, 402, 404, 406, 408,
|
355
|
+
410, 412, 414, 416, 418, 420, 422, 424,
|
356
|
+
429, 436, 441, 445, 451, 455, 458, 464,
|
357
|
+
479, 482, 485, 488, 491, 496, 499, 502,
|
358
|
+
505, 508, 512, 515, 518, 521, 524, 527,
|
359
|
+
530, 533, 536, 539, 542, 545, 548, 551,
|
360
|
+
554, 557, 560, 563, 566, 569, 572, 575,
|
361
|
+
578, 581, 584, 587, 590, 593, 596, 599,
|
362
|
+
602, 605, 608, 611, 614, 617, 619, 621,
|
363
|
+
634, 638, 641, 644, 647, 650, 653, 656,
|
364
|
+
659, 662, 667, 670, 673, 676, 679, 683,
|
365
|
+
686, 689, 692, 696, 699, 702, 705, 708,
|
366
|
+
711, 714, 717, 720, 723, 726, 729, 732,
|
367
|
+
735, 738, 741, 745, 748, 751, 754, 757,
|
368
|
+
760, 763, 766, 769, 772, 775, 778, 781,
|
369
|
+
784, 787, 790, 793, 796, 799, 802, 805,
|
370
|
+
808, 811, 814, 817, 820, 822, 824, 826,
|
371
|
+
828, 830, 832, 842, 845, 848, 851, 854,
|
372
|
+
857, 860, 864, 868, 871, 874, 877, 881,
|
373
|
+
884, 887, 890, 893, 896, 899, 902, 905,
|
374
|
+
908, 911, 914, 917, 920, 923, 926, 929,
|
375
|
+
932, 935, 938, 941, 944, 947, 950, 953,
|
376
|
+
956, 959, 962, 965, 968, 971, 974, 976,
|
377
|
+
978, 980, 982, 984, 986, 988, 990, 992,
|
378
|
+
994, 996, 998, 1000, 1002, 1004, 1011, 1014,
|
379
|
+
1017, 1020, 1023, 1026, 1029, 1031, 1033
|
380
|
+
};
|
381
|
+
|
382
|
+
static const short _lexer_trans_targs[] = {
|
383
|
+
2, 10, 35, 37, 103, 324, 9, 9,
|
384
|
+
108, 118, 120, 134, 135, 138, 9, 0,
|
385
|
+
3, 306, 310, 0, 4, 0, 5, 0,
|
386
|
+
6, 0, 7, 0, 0, 8, 9, 119,
|
387
|
+
8, 2, 10, 35, 37, 103, 9, 9,
|
388
|
+
108, 118, 120, 134, 135, 138, 9, 0,
|
389
|
+
11, 15, 302, 0, 12, 0, 13, 0,
|
390
|
+
14, 0, 7, 0, 16, 252, 0, 17,
|
391
|
+
0, 18, 0, 19, 0, 20, 189, 0,
|
392
|
+
21, 0, 22, 0, 23, 0, 24, 0,
|
393
|
+
25, 0, 26, 0, 28, 27, 28, 27,
|
394
|
+
29, 148, 165, 167, 169, 28, 28, 9,
|
395
|
+
174, 188, 9, 28, 27, 30, 144, 28,
|
396
|
+
27, 31, 28, 27, 32, 28, 27, 33,
|
397
|
+
28, 27, 34, 28, 27, 2, 10, 35,
|
398
|
+
37, 103, 9, 9, 108, 118, 120, 134,
|
399
|
+
135, 138, 9, 0, 36, 0, 7, 0,
|
400
|
+
38, 39, 0, 4, 0, 40, 0, 41,
|
401
|
+
0, 42, 0, 43, 0, 44, 0, 46,
|
402
|
+
45, 46, 45, 47, 56, 79, 81, 83,
|
403
|
+
46, 46, 9, 88, 102, 9, 46, 45,
|
404
|
+
48, 52, 46, 45, 49, 46, 45, 50,
|
405
|
+
46, 45, 51, 46, 45, 34, 46, 45,
|
406
|
+
53, 46, 45, 54, 46, 45, 55, 46,
|
407
|
+
45, 34, 46, 45, 57, 61, 75, 46,
|
408
|
+
45, 58, 46, 45, 59, 46, 45, 60,
|
409
|
+
46, 45, 34, 46, 45, 62, 72, 46,
|
410
|
+
45, 63, 46, 45, 64, 46, 45, 65,
|
411
|
+
46, 45, 66, 46, 34, 45, 67, 46,
|
412
|
+
45, 68, 46, 45, 69, 46, 45, 70,
|
413
|
+
46, 45, 71, 46, 45, 46, 34, 45,
|
414
|
+
73, 46, 45, 74, 46, 45, 71, 46,
|
415
|
+
45, 76, 46, 45, 77, 46, 45, 78,
|
416
|
+
46, 45, 65, 46, 45, 80, 46, 45,
|
417
|
+
34, 46, 45, 82, 46, 45, 49, 46,
|
418
|
+
45, 84, 46, 45, 85, 46, 45, 86,
|
419
|
+
46, 45, 87, 46, 45, 34, 46, 45,
|
420
|
+
46, 89, 45, 46, 90, 45, 46, 91,
|
421
|
+
45, 46, 92, 45, 46, 93, 45, 46,
|
422
|
+
94, 45, 46, 95, 45, 46, 96, 45,
|
423
|
+
46, 97, 45, 46, 98, 45, 46, 99,
|
424
|
+
45, 46, 100, 45, 46, 101, 45, 46,
|
425
|
+
9, 45, 46, 34, 45, 104, 0, 105,
|
426
|
+
0, 106, 0, 107, 0, 7, 0, 109,
|
427
|
+
0, 110, 0, 112, 111, 111, 112, 111,
|
428
|
+
111, 113, 113, 114, 113, 113, 113, 113,
|
429
|
+
114, 113, 113, 113, 113, 115, 113, 113,
|
430
|
+
113, 113, 116, 113, 113, 9, 117, 117,
|
431
|
+
0, 9, 117, 117, 0, 9, 119, 118,
|
432
|
+
9, 0, 121, 0, 122, 0, 123, 0,
|
433
|
+
124, 0, 125, 0, 126, 0, 127, 0,
|
434
|
+
128, 0, 129, 0, 130, 0, 131, 0,
|
435
|
+
132, 0, 133, 0, 326, 0, 7, 0,
|
436
|
+
0, 0, 0, 0, 136, 137, 9, 137,
|
437
|
+
137, 135, 136, 136, 9, 137, 135, 137,
|
438
|
+
0, 138, 139, 138, 0, 143, 142, 141,
|
439
|
+
139, 142, 140, 0, 141, 139, 140, 0,
|
440
|
+
141, 140, 143, 142, 141, 139, 142, 140,
|
441
|
+
2, 10, 35, 37, 103, 143, 143, 108,
|
442
|
+
118, 120, 134, 135, 138, 143, 0, 145,
|
443
|
+
28, 27, 146, 28, 27, 147, 28, 27,
|
444
|
+
34, 28, 27, 149, 153, 161, 28, 27,
|
445
|
+
150, 28, 27, 151, 28, 27, 152, 28,
|
446
|
+
27, 34, 28, 27, 154, 158, 28, 27,
|
447
|
+
155, 28, 27, 156, 28, 27, 157, 28,
|
448
|
+
27, 28, 34, 27, 159, 28, 27, 160,
|
449
|
+
28, 27, 157, 28, 27, 162, 28, 27,
|
450
|
+
163, 28, 27, 164, 28, 27, 157, 28,
|
451
|
+
27, 166, 28, 27, 34, 28, 27, 168,
|
452
|
+
28, 27, 31, 28, 27, 170, 28, 27,
|
453
|
+
171, 28, 27, 172, 28, 27, 173, 28,
|
454
|
+
27, 34, 28, 27, 28, 175, 27, 28,
|
455
|
+
176, 27, 28, 177, 27, 28, 178, 27,
|
456
|
+
28, 179, 27, 28, 180, 27, 28, 181,
|
457
|
+
27, 28, 182, 27, 28, 183, 27, 28,
|
458
|
+
184, 27, 28, 185, 27, 28, 186, 27,
|
459
|
+
28, 187, 27, 28, 9, 27, 28, 34,
|
460
|
+
27, 191, 190, 191, 190, 192, 201, 224,
|
461
|
+
226, 232, 191, 191, 9, 237, 251, 9,
|
462
|
+
191, 190, 193, 197, 191, 190, 194, 191,
|
463
|
+
190, 195, 191, 190, 196, 191, 190, 34,
|
464
|
+
191, 190, 198, 191, 190, 199, 191, 190,
|
465
|
+
200, 191, 190, 34, 191, 190, 202, 206,
|
466
|
+
220, 191, 190, 203, 191, 190, 204, 191,
|
467
|
+
190, 205, 191, 190, 34, 191, 190, 207,
|
468
|
+
217, 191, 190, 208, 191, 190, 209, 191,
|
469
|
+
190, 210, 191, 190, 211, 191, 34, 190,
|
470
|
+
212, 191, 190, 213, 191, 190, 214, 191,
|
471
|
+
190, 215, 191, 190, 216, 191, 190, 191,
|
472
|
+
34, 190, 218, 191, 190, 219, 191, 190,
|
473
|
+
216, 191, 190, 221, 191, 190, 222, 191,
|
474
|
+
190, 223, 191, 190, 210, 191, 190, 225,
|
475
|
+
191, 190, 34, 191, 190, 227, 228, 191,
|
476
|
+
190, 194, 191, 190, 229, 191, 190, 230,
|
477
|
+
191, 190, 231, 191, 190, 216, 191, 190,
|
478
|
+
233, 191, 190, 234, 191, 190, 235, 191,
|
479
|
+
190, 236, 191, 190, 34, 191, 190, 191,
|
480
|
+
238, 190, 191, 239, 190, 191, 240, 190,
|
481
|
+
191, 241, 190, 191, 242, 190, 191, 243,
|
482
|
+
190, 191, 244, 190, 191, 245, 190, 191,
|
483
|
+
246, 190, 191, 247, 190, 191, 248, 190,
|
484
|
+
191, 249, 190, 191, 250, 190, 191, 9,
|
485
|
+
190, 191, 34, 190, 253, 0, 254, 0,
|
486
|
+
255, 0, 256, 0, 258, 257, 258, 257,
|
487
|
+
259, 265, 283, 258, 258, 9, 288, 9,
|
488
|
+
258, 257, 260, 258, 257, 261, 258, 257,
|
489
|
+
262, 258, 257, 263, 258, 257, 264, 258,
|
490
|
+
257, 258, 34, 257, 266, 279, 258, 257,
|
491
|
+
267, 276, 258, 257, 268, 258, 257, 269,
|
492
|
+
258, 257, 270, 258, 257, 271, 258, 34,
|
493
|
+
257, 272, 258, 257, 273, 258, 257, 274,
|
494
|
+
258, 257, 275, 258, 257, 264, 258, 257,
|
495
|
+
277, 258, 257, 278, 258, 257, 264, 258,
|
496
|
+
257, 280, 258, 257, 281, 258, 257, 282,
|
497
|
+
258, 257, 270, 258, 257, 284, 258, 257,
|
498
|
+
285, 258, 257, 286, 258, 257, 287, 258,
|
499
|
+
257, 264, 258, 257, 258, 289, 257, 258,
|
500
|
+
290, 257, 258, 291, 257, 258, 292, 257,
|
501
|
+
258, 293, 257, 258, 294, 257, 258, 295,
|
502
|
+
257, 258, 296, 257, 258, 297, 257, 258,
|
503
|
+
298, 257, 258, 299, 257, 258, 300, 257,
|
504
|
+
258, 301, 257, 258, 9, 257, 303, 0,
|
505
|
+
304, 0, 305, 0, 19, 0, 307, 0,
|
506
|
+
308, 0, 309, 0, 7, 0, 311, 0,
|
507
|
+
312, 0, 313, 0, 314, 0, 315, 0,
|
508
|
+
317, 316, 317, 316, 318, 317, 317, 9,
|
509
|
+
9, 317, 316, 319, 317, 316, 320, 317,
|
510
|
+
316, 321, 317, 316, 322, 317, 316, 323,
|
511
|
+
317, 316, 317, 34, 316, 325, 0, 9,
|
512
|
+
0, 0, 0
|
513
|
+
};
|
514
|
+
|
515
|
+
static const unsigned char _lexer_trans_actions[] = {
|
516
|
+
29, 29, 29, 29, 29, 0, 54, 0,
|
517
|
+
5, 1, 0, 29, 1, 35, 0, 43,
|
518
|
+
0, 0, 0, 43, 0, 43, 0, 43,
|
519
|
+
0, 43, 0, 43, 43, 57, 110, 23,
|
520
|
+
0, 29, 29, 29, 29, 29, 54, 0,
|
521
|
+
5, 1, 0, 29, 1, 35, 0, 43,
|
522
|
+
0, 0, 0, 43, 0, 43, 0, 43,
|
523
|
+
0, 43, 0, 43, 0, 0, 43, 0,
|
524
|
+
43, 0, 43, 0, 43, 0, 0, 43,
|
525
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
526
|
+
0, 43, 0, 43, 140, 57, 54, 0,
|
527
|
+
84, 84, 84, 84, 84, 54, 0, 78,
|
528
|
+
33, 84, 78, 0, 0, 0, 0, 54,
|
529
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
530
|
+
54, 0, 19, 54, 0, 63, 63, 63,
|
531
|
+
63, 63, 126, 31, 60, 57, 31, 63,
|
532
|
+
57, 66, 31, 43, 0, 43, 0, 43,
|
533
|
+
0, 0, 43, 0, 43, 0, 43, 0,
|
534
|
+
43, 0, 43, 0, 43, 0, 43, 140,
|
535
|
+
57, 54, 0, 84, 84, 84, 84, 84,
|
536
|
+
54, 0, 72, 33, 84, 72, 0, 0,
|
537
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
538
|
+
54, 0, 0, 54, 0, 15, 54, 0,
|
539
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
540
|
+
0, 15, 54, 0, 0, 0, 0, 54,
|
541
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
542
|
+
54, 0, 15, 54, 0, 0, 0, 54,
|
543
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
544
|
+
54, 0, 0, 54, 15, 0, 0, 54,
|
545
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
546
|
+
54, 0, 0, 54, 0, 54, 15, 0,
|
547
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
548
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
549
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
550
|
+
15, 54, 0, 0, 54, 0, 0, 54,
|
551
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
552
|
+
54, 0, 0, 54, 0, 15, 54, 0,
|
553
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
554
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
555
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
556
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
557
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
558
|
+
15, 0, 54, 15, 0, 0, 43, 0,
|
559
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
560
|
+
43, 0, 43, 135, 48, 9, 106, 11,
|
561
|
+
0, 130, 45, 45, 45, 3, 122, 33,
|
562
|
+
33, 33, 0, 122, 33, 33, 33, 0,
|
563
|
+
122, 33, 0, 33, 0, 102, 7, 7,
|
564
|
+
43, 54, 0, 0, 43, 114, 25, 0,
|
565
|
+
54, 43, 0, 43, 0, 43, 0, 43,
|
566
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
567
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
568
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
569
|
+
43, 43, 43, 43, 0, 27, 118, 27,
|
570
|
+
27, 51, 27, 0, 54, 0, 1, 0,
|
571
|
+
43, 0, 0, 0, 43, 54, 37, 37,
|
572
|
+
87, 37, 37, 43, 0, 39, 0, 43,
|
573
|
+
0, 0, 54, 0, 0, 39, 0, 0,
|
574
|
+
96, 96, 96, 96, 96, 54, 0, 93,
|
575
|
+
90, 41, 96, 90, 99, 0, 43, 0,
|
576
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
577
|
+
19, 54, 0, 0, 0, 0, 54, 0,
|
578
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
579
|
+
0, 19, 54, 0, 0, 0, 54, 0,
|
580
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
581
|
+
0, 54, 19, 0, 0, 54, 0, 0,
|
582
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
583
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
584
|
+
0, 0, 54, 0, 19, 54, 0, 0,
|
585
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
586
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
587
|
+
0, 19, 54, 0, 54, 0, 0, 54,
|
588
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
589
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
590
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
591
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
592
|
+
54, 0, 0, 54, 19, 0, 54, 19,
|
593
|
+
0, 140, 57, 54, 0, 84, 84, 84,
|
594
|
+
84, 84, 54, 0, 75, 33, 84, 75,
|
595
|
+
0, 0, 0, 0, 54, 0, 0, 54,
|
596
|
+
0, 0, 54, 0, 0, 54, 0, 17,
|
597
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
598
|
+
0, 54, 0, 17, 54, 0, 0, 0,
|
599
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
600
|
+
0, 0, 54, 0, 17, 54, 0, 0,
|
601
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
602
|
+
0, 0, 54, 0, 0, 54, 17, 0,
|
603
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
604
|
+
0, 0, 54, 0, 0, 54, 0, 54,
|
605
|
+
17, 0, 0, 54, 0, 0, 54, 0,
|
606
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
607
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
608
|
+
54, 0, 17, 54, 0, 0, 0, 54,
|
609
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
610
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
611
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
612
|
+
0, 0, 54, 0, 17, 54, 0, 54,
|
613
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
614
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
615
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
616
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
617
|
+
54, 0, 0, 54, 0, 0, 54, 17,
|
618
|
+
0, 54, 17, 0, 0, 43, 0, 43,
|
619
|
+
0, 43, 0, 43, 140, 57, 54, 0,
|
620
|
+
84, 84, 84, 54, 0, 69, 33, 69,
|
621
|
+
0, 0, 0, 54, 0, 0, 54, 0,
|
622
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
623
|
+
0, 54, 13, 0, 0, 0, 54, 0,
|
624
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
625
|
+
54, 0, 0, 54, 0, 0, 54, 13,
|
626
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
627
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
628
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
629
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
630
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
631
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
632
|
+
0, 0, 54, 0, 54, 0, 0, 54,
|
633
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
634
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
635
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
636
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
637
|
+
54, 0, 0, 54, 13, 0, 0, 43,
|
638
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
639
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
640
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
641
|
+
140, 57, 54, 0, 84, 54, 0, 81,
|
642
|
+
81, 0, 0, 0, 54, 0, 0, 54,
|
643
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
644
|
+
54, 0, 54, 21, 0, 0, 43, 0,
|
645
|
+
43, 0, 0
|
646
|
+
};
|
647
|
+
|
648
|
+
static const unsigned char _lexer_eof_actions[] = {
|
649
|
+
0, 43, 43, 43, 43, 43, 43, 43,
|
650
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
651
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
652
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
653
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
654
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
655
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
656
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
657
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
658
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
659
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
660
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
661
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
662
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
663
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
664
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
665
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
666
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
667
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
668
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
669
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
670
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
671
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
672
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
673
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
674
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
675
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
676
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
677
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
678
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
679
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
680
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
681
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
682
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
683
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
684
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
685
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
686
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
687
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
688
|
+
43, 43, 43, 43, 43, 43, 43, 43,
|
689
|
+
43, 43, 43, 43, 43, 43, 43
|
690
|
+
};
|
691
|
+
|
692
|
+
static const int lexer_start = 1;
|
693
|
+
static const int lexer_first_final = 326;
|
694
|
+
static const int lexer_error = 0;
|
695
|
+
|
696
|
+
static const int lexer_en_main = 1;
|
697
|
+
|
698
|
+
|
699
|
+
#line 258 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
700
|
+
|
701
|
+
static VALUE
|
702
|
+
unindent(VALUE con, int start_col)
|
703
|
+
{
|
704
|
+
VALUE re;
|
705
|
+
// Gherkin will crash gracefully if the string representation of start_col pushes the pattern past 32 characters
|
706
|
+
char pat[32];
|
707
|
+
snprintf(pat, 32, "^[\t ]{0,%d}", start_col);
|
708
|
+
re = rb_reg_regcomp(rb_str_new2(pat));
|
709
|
+
rb_funcall(con, rb_intern("gsub!"), 2, re, rb_str_new2(""));
|
710
|
+
|
711
|
+
return Qnil;
|
712
|
+
|
713
|
+
}
|
714
|
+
|
715
|
+
static void
|
716
|
+
store_kw_con(VALUE listener, const char * event_name,
|
717
|
+
const char * keyword_at, size_t keyword_length,
|
718
|
+
const char * at, size_t length,
|
719
|
+
int current_line)
|
720
|
+
{
|
721
|
+
VALUE con = Qnil, kw = Qnil;
|
722
|
+
kw = ENCODED_STR_NEW(keyword_at, keyword_length);
|
723
|
+
con = ENCODED_STR_NEW(at, length);
|
724
|
+
rb_funcall(con, rb_intern("strip!"), 0);
|
725
|
+
rb_funcall(listener, rb_intern(event_name), 3, kw, con, INT2FIX(current_line));
|
726
|
+
}
|
727
|
+
|
728
|
+
static void
|
729
|
+
store_multiline_kw_con(VALUE listener, const char * event_name,
|
730
|
+
const char * keyword_at, size_t keyword_length,
|
731
|
+
const char * at, size_t length,
|
732
|
+
int current_line, int start_col)
|
733
|
+
{
|
734
|
+
VALUE split;
|
735
|
+
VALUE con = Qnil, kw = Qnil, name = Qnil, desc = Qnil;
|
736
|
+
|
737
|
+
kw = ENCODED_STR_NEW(keyword_at, keyword_length);
|
738
|
+
con = ENCODED_STR_NEW(at, length);
|
739
|
+
|
740
|
+
unindent(con, start_col);
|
741
|
+
|
742
|
+
split = rb_str_split(con, "\n");
|
743
|
+
|
744
|
+
name = rb_funcall(split, rb_intern("shift"), 0);
|
745
|
+
desc = rb_ary_join(split, rb_str_new2( "\n" ));
|
746
|
+
|
747
|
+
if( name == Qnil )
|
748
|
+
{
|
749
|
+
name = rb_str_new2("");
|
750
|
+
}
|
751
|
+
if( rb_funcall(desc, rb_intern("size"), 0) == 0)
|
752
|
+
{
|
753
|
+
desc = rb_str_new2("");
|
754
|
+
}
|
755
|
+
rb_funcall(name, rb_intern("strip!"), 0);
|
756
|
+
rb_funcall(desc, rb_intern("rstrip!"), 0);
|
757
|
+
rb_funcall(listener, rb_intern(event_name), 4, kw, name, desc, INT2FIX(current_line));
|
758
|
+
}
|
759
|
+
|
760
|
+
static void
|
761
|
+
store_attr(VALUE listener, const char * attr_type,
|
762
|
+
const char * at, size_t length,
|
763
|
+
int line)
|
764
|
+
{
|
765
|
+
VALUE val = ENCODED_STR_NEW(at, length);
|
766
|
+
rb_funcall(listener, rb_intern(attr_type), 2, val, INT2FIX(line));
|
767
|
+
}
|
768
|
+
static void
|
769
|
+
store_docstring_content(VALUE listener,
|
770
|
+
int start_col,
|
771
|
+
const char *type_at, size_t type_length,
|
772
|
+
const char *at, size_t length,
|
773
|
+
int current_line)
|
774
|
+
{
|
775
|
+
VALUE re2;
|
776
|
+
VALUE unescape_escaped_quotes;
|
777
|
+
VALUE con = ENCODED_STR_NEW(at, length);
|
778
|
+
VALUE con_type = ENCODED_STR_NEW(type_at, type_length);
|
779
|
+
|
780
|
+
unindent(con, start_col);
|
781
|
+
|
782
|
+
re2 = rb_reg_regcomp(rb_str_new2("\r\\Z"));
|
783
|
+
unescape_escaped_quotes = rb_reg_regcomp(rb_str_new2("\\\\\"\\\\\"\\\\\""));
|
784
|
+
rb_funcall(con, rb_intern("sub!"), 2, re2, rb_str_new2(""));
|
785
|
+
rb_funcall(con_type, rb_intern("strip!"), 0);
|
786
|
+
rb_funcall(con, rb_intern("gsub!"), 2, unescape_escaped_quotes, rb_str_new2("\"\"\""));
|
787
|
+
rb_funcall(listener, rb_intern("doc_string"), 3, con_type, con, INT2FIX(current_line));
|
788
|
+
}
|
789
|
+
static void
|
790
|
+
raise_lexer_error(const char * at, int line)
|
791
|
+
{
|
792
|
+
rb_raise(rb_eGherkinLexingError, "Lexing error on line %d: '%s'. See http://wiki.github.com/cucumber/gherkin/lexingerror for more information.", line, at);
|
793
|
+
}
|
794
|
+
|
795
|
+
static void lexer_init(lexer_state *lexer) {
|
796
|
+
lexer->content_start = 0;
|
797
|
+
lexer->content_end = 0;
|
798
|
+
lexer->content_len = 0;
|
799
|
+
lexer->docstring_content_type_start = 0;
|
800
|
+
lexer->docstring_content_type_end = 0;
|
801
|
+
lexer->mark = 0;
|
802
|
+
lexer->keyword_start = 0;
|
803
|
+
lexer->keyword_end = 0;
|
804
|
+
lexer->next_keyword_start = 0;
|
805
|
+
lexer->line_number = 1;
|
806
|
+
lexer->last_newline = 0;
|
807
|
+
lexer->final_newline = 0;
|
808
|
+
lexer->start_col = 0;
|
809
|
+
}
|
810
|
+
|
811
|
+
static VALUE CLexer_alloc(VALUE klass)
|
812
|
+
{
|
813
|
+
VALUE obj;
|
814
|
+
lexer_state *lxr = ALLOC(lexer_state);
|
815
|
+
lexer_init(lxr);
|
816
|
+
|
817
|
+
obj = Data_Wrap_Struct(klass, NULL, -1, lxr);
|
818
|
+
|
819
|
+
return obj;
|
820
|
+
}
|
821
|
+
|
822
|
+
static VALUE CLexer_init(VALUE self, VALUE listener)
|
823
|
+
{
|
824
|
+
lexer_state *lxr;
|
825
|
+
rb_iv_set(self, "@listener", listener);
|
826
|
+
|
827
|
+
lxr = NULL;
|
828
|
+
DATA_GET(self, lexer_state, lxr);
|
829
|
+
lexer_init(lxr);
|
830
|
+
|
831
|
+
return self;
|
832
|
+
}
|
833
|
+
|
834
|
+
static VALUE CLexer_scan(VALUE self, VALUE input)
|
835
|
+
{
|
836
|
+
VALUE input_copy;
|
837
|
+
char *data;
|
838
|
+
size_t len;
|
839
|
+
VALUE listener = rb_iv_get(self, "@listener");
|
840
|
+
|
841
|
+
lexer_state *lexer;
|
842
|
+
lexer = NULL;
|
843
|
+
DATA_GET(self, lexer_state, lexer);
|
844
|
+
|
845
|
+
input_copy = rb_str_dup(input);
|
846
|
+
|
847
|
+
rb_str_append(input_copy, rb_str_new2("\n%_FEATURE_END_%"));
|
848
|
+
data = RSTRING_PTR(input_copy);
|
849
|
+
len = RSTRING_LEN(input_copy);
|
850
|
+
|
851
|
+
if (len == 0) {
|
852
|
+
rb_raise(rb_eGherkinLexingError, "No content to lex.");
|
853
|
+
} else {
|
854
|
+
|
855
|
+
const char *p, *pe, *eof;
|
856
|
+
int cs = 0;
|
857
|
+
|
858
|
+
VALUE current_row = Qnil;
|
859
|
+
|
860
|
+
p = data;
|
861
|
+
pe = data + len;
|
862
|
+
eof = pe;
|
863
|
+
|
864
|
+
assert(*pe == '\0' && "pointer does not end on NULL");
|
865
|
+
|
866
|
+
|
867
|
+
#line 868 "ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c"
|
868
|
+
{
|
869
|
+
cs = lexer_start;
|
870
|
+
}
|
871
|
+
|
872
|
+
#line 425 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
873
|
+
|
874
|
+
#line 875 "ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c"
|
875
|
+
{
|
876
|
+
int _klen;
|
877
|
+
unsigned int _trans;
|
878
|
+
const char *_acts;
|
879
|
+
unsigned int _nacts;
|
880
|
+
const char *_keys;
|
881
|
+
|
882
|
+
if ( p == pe )
|
883
|
+
goto _test_eof;
|
884
|
+
if ( cs == 0 )
|
885
|
+
goto _out;
|
886
|
+
_resume:
|
887
|
+
_keys = _lexer_trans_keys + _lexer_key_offsets[cs];
|
888
|
+
_trans = _lexer_index_offsets[cs];
|
889
|
+
|
890
|
+
_klen = _lexer_single_lengths[cs];
|
891
|
+
if ( _klen > 0 ) {
|
892
|
+
const char *_lower = _keys;
|
893
|
+
const char *_mid;
|
894
|
+
const char *_upper = _keys + _klen - 1;
|
895
|
+
while (1) {
|
896
|
+
if ( _upper < _lower )
|
897
|
+
break;
|
898
|
+
|
899
|
+
_mid = _lower + ((_upper-_lower) >> 1);
|
900
|
+
if ( (*p) < *_mid )
|
901
|
+
_upper = _mid - 1;
|
902
|
+
else if ( (*p) > *_mid )
|
903
|
+
_lower = _mid + 1;
|
904
|
+
else {
|
905
|
+
_trans += (_mid - _keys);
|
906
|
+
goto _match;
|
907
|
+
}
|
908
|
+
}
|
909
|
+
_keys += _klen;
|
910
|
+
_trans += _klen;
|
911
|
+
}
|
912
|
+
|
913
|
+
_klen = _lexer_range_lengths[cs];
|
914
|
+
if ( _klen > 0 ) {
|
915
|
+
const char *_lower = _keys;
|
916
|
+
const char *_mid;
|
917
|
+
const char *_upper = _keys + (_klen<<1) - 2;
|
918
|
+
while (1) {
|
919
|
+
if ( _upper < _lower )
|
920
|
+
break;
|
921
|
+
|
922
|
+
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
923
|
+
if ( (*p) < _mid[0] )
|
924
|
+
_upper = _mid - 2;
|
925
|
+
else if ( (*p) > _mid[1] )
|
926
|
+
_lower = _mid + 2;
|
927
|
+
else {
|
928
|
+
_trans += ((_mid - _keys)>>1);
|
929
|
+
goto _match;
|
930
|
+
}
|
931
|
+
}
|
932
|
+
_trans += _klen;
|
933
|
+
}
|
934
|
+
|
935
|
+
_match:
|
936
|
+
cs = _lexer_trans_targs[_trans];
|
937
|
+
|
938
|
+
if ( _lexer_trans_actions[_trans] == 0 )
|
939
|
+
goto _again;
|
940
|
+
|
941
|
+
_acts = _lexer_actions + _lexer_trans_actions[_trans];
|
942
|
+
_nacts = (unsigned int) *_acts++;
|
943
|
+
while ( _nacts-- > 0 )
|
944
|
+
{
|
945
|
+
switch ( *_acts++ )
|
946
|
+
{
|
947
|
+
case 0:
|
948
|
+
#line 83 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
949
|
+
{
|
950
|
+
MARK(content_start, p);
|
951
|
+
lexer->current_line = lexer->line_number;
|
952
|
+
lexer->start_col = lexer->content_start - lexer->last_newline - (lexer->keyword_end - lexer->keyword_start) + 2;
|
953
|
+
}
|
954
|
+
break;
|
955
|
+
case 1:
|
956
|
+
#line 89 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
957
|
+
{
|
958
|
+
MARK(content_start, p);
|
959
|
+
}
|
960
|
+
break;
|
961
|
+
case 2:
|
962
|
+
#line 93 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
963
|
+
{
|
964
|
+
lexer->current_line = lexer->line_number;
|
965
|
+
lexer->start_col = p - data - lexer->last_newline;
|
966
|
+
}
|
967
|
+
break;
|
968
|
+
case 3:
|
969
|
+
#line 98 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
970
|
+
{
|
971
|
+
int len = LEN(content_start, PTR_TO(final_newline));
|
972
|
+
int type_len = LEN(docstring_content_type_start, PTR_TO(docstring_content_type_end));
|
973
|
+
|
974
|
+
if (len < 0) len = 0;
|
975
|
+
if (type_len < 0) len = 0;
|
976
|
+
|
977
|
+
store_docstring_content(listener, lexer->start_col, PTR_TO(docstring_content_type_start), type_len, PTR_TO(content_start), len, lexer->current_line);
|
978
|
+
}
|
979
|
+
break;
|
980
|
+
case 4:
|
981
|
+
#line 108 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
982
|
+
{
|
983
|
+
MARK(docstring_content_type_start, p);
|
984
|
+
}
|
985
|
+
break;
|
986
|
+
case 5:
|
987
|
+
#line 112 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
988
|
+
{
|
989
|
+
MARK(docstring_content_type_end, p);
|
990
|
+
}
|
991
|
+
break;
|
992
|
+
case 6:
|
993
|
+
#line 116 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
994
|
+
{
|
995
|
+
STORE_KW_END_CON(feature);
|
996
|
+
}
|
997
|
+
break;
|
998
|
+
case 7:
|
999
|
+
#line 120 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1000
|
+
{
|
1001
|
+
STORE_KW_END_CON(background);
|
1002
|
+
}
|
1003
|
+
break;
|
1004
|
+
case 8:
|
1005
|
+
#line 124 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1006
|
+
{
|
1007
|
+
STORE_KW_END_CON(scenario);
|
1008
|
+
}
|
1009
|
+
break;
|
1010
|
+
case 9:
|
1011
|
+
#line 128 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1012
|
+
{
|
1013
|
+
STORE_KW_END_CON(scenario_outline);
|
1014
|
+
}
|
1015
|
+
break;
|
1016
|
+
case 10:
|
1017
|
+
#line 132 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1018
|
+
{
|
1019
|
+
STORE_KW_END_CON(examples);
|
1020
|
+
}
|
1021
|
+
break;
|
1022
|
+
case 11:
|
1023
|
+
#line 136 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1024
|
+
{
|
1025
|
+
store_kw_con(listener, "step",
|
1026
|
+
PTR_TO(keyword_start), LEN(keyword_start, PTR_TO(keyword_end)),
|
1027
|
+
PTR_TO(content_start), LEN(content_start, p),
|
1028
|
+
lexer->current_line);
|
1029
|
+
}
|
1030
|
+
break;
|
1031
|
+
case 12:
|
1032
|
+
#line 143 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1033
|
+
{
|
1034
|
+
STORE_ATTR(comment);
|
1035
|
+
lexer->mark = 0;
|
1036
|
+
}
|
1037
|
+
break;
|
1038
|
+
case 13:
|
1039
|
+
#line 148 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1040
|
+
{
|
1041
|
+
STORE_ATTR(tag);
|
1042
|
+
lexer->mark = 0;
|
1043
|
+
}
|
1044
|
+
break;
|
1045
|
+
case 14:
|
1046
|
+
#line 153 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1047
|
+
{
|
1048
|
+
lexer->line_number += 1;
|
1049
|
+
MARK(final_newline, p);
|
1050
|
+
}
|
1051
|
+
break;
|
1052
|
+
case 15:
|
1053
|
+
#line 158 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1054
|
+
{
|
1055
|
+
MARK(last_newline, p + 1);
|
1056
|
+
}
|
1057
|
+
break;
|
1058
|
+
case 16:
|
1059
|
+
#line 162 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1060
|
+
{
|
1061
|
+
if (lexer->mark == 0) {
|
1062
|
+
MARK(mark, p);
|
1063
|
+
}
|
1064
|
+
}
|
1065
|
+
break;
|
1066
|
+
case 17:
|
1067
|
+
#line 168 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1068
|
+
{
|
1069
|
+
MARK(keyword_end, p);
|
1070
|
+
MARK(keyword_start, PTR_TO(mark));
|
1071
|
+
MARK(content_start, p + 1);
|
1072
|
+
lexer->mark = 0;
|
1073
|
+
}
|
1074
|
+
break;
|
1075
|
+
case 18:
|
1076
|
+
#line 175 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1077
|
+
{
|
1078
|
+
MARK(content_end, p);
|
1079
|
+
}
|
1080
|
+
break;
|
1081
|
+
case 19:
|
1082
|
+
#line 179 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1083
|
+
{
|
1084
|
+
p = p - 1;
|
1085
|
+
lexer->current_line = lexer->line_number;
|
1086
|
+
current_row = rb_ary_new();
|
1087
|
+
}
|
1088
|
+
break;
|
1089
|
+
case 20:
|
1090
|
+
#line 185 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1091
|
+
{
|
1092
|
+
MARK(content_start, p);
|
1093
|
+
}
|
1094
|
+
break;
|
1095
|
+
case 21:
|
1096
|
+
#line 189 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1097
|
+
{
|
1098
|
+
VALUE re_pipe, re_newline, re_backslash;
|
1099
|
+
VALUE con = ENCODED_STR_NEW(PTR_TO(content_start), LEN(content_start, p));
|
1100
|
+
rb_funcall(con, rb_intern("strip!"), 0);
|
1101
|
+
re_pipe = rb_reg_regcomp(rb_str_new2("\\\\\\|"));
|
1102
|
+
re_newline = rb_reg_regcomp(rb_str_new2("\\\\n"));
|
1103
|
+
re_backslash = rb_reg_regcomp(rb_str_new2("\\\\\\\\"));
|
1104
|
+
rb_funcall(con, rb_intern("gsub!"), 2, re_pipe, rb_str_new2("|"));
|
1105
|
+
rb_funcall(con, rb_intern("gsub!"), 2, re_newline, rb_str_new2("\n"));
|
1106
|
+
rb_funcall(con, rb_intern("gsub!"), 2, re_backslash, rb_str_new2("\\"));
|
1107
|
+
|
1108
|
+
rb_ary_push(current_row, con);
|
1109
|
+
}
|
1110
|
+
break;
|
1111
|
+
case 22:
|
1112
|
+
#line 203 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1113
|
+
{
|
1114
|
+
rb_funcall(listener, rb_intern("row"), 2, current_row, INT2FIX(lexer->current_line));
|
1115
|
+
}
|
1116
|
+
break;
|
1117
|
+
case 23:
|
1118
|
+
#line 207 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1119
|
+
{
|
1120
|
+
int line;
|
1121
|
+
if (cs < lexer_first_final) {
|
1122
|
+
size_t count = 0;
|
1123
|
+
VALUE newstr_val;
|
1124
|
+
char *newstr;
|
1125
|
+
int newstr_count = 0;
|
1126
|
+
size_t len;
|
1127
|
+
const char *buff;
|
1128
|
+
if (lexer->last_newline != 0) {
|
1129
|
+
len = LEN(last_newline, eof);
|
1130
|
+
buff = PTR_TO(last_newline);
|
1131
|
+
} else {
|
1132
|
+
len = strlen(data);
|
1133
|
+
buff = data;
|
1134
|
+
}
|
1135
|
+
|
1136
|
+
// Allocate as a ruby string so that it gets cleaned up by GC
|
1137
|
+
newstr_val = rb_str_new(buff, len);
|
1138
|
+
newstr = RSTRING_PTR(newstr_val);
|
1139
|
+
|
1140
|
+
|
1141
|
+
for (count = 0; count < len; count++) {
|
1142
|
+
if(buff[count] == 10) {
|
1143
|
+
newstr[newstr_count] = '\0'; // terminate new string at first newline found
|
1144
|
+
break;
|
1145
|
+
} else {
|
1146
|
+
if (buff[count] == '%') {
|
1147
|
+
newstr[newstr_count++] = buff[count];
|
1148
|
+
newstr[newstr_count] = buff[count];
|
1149
|
+
} else {
|
1150
|
+
newstr[newstr_count] = buff[count];
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
newstr_count++;
|
1154
|
+
}
|
1155
|
+
|
1156
|
+
line = lexer->line_number;
|
1157
|
+
lexer_init(lexer); // Re-initialize so we can scan again with the same lexer
|
1158
|
+
raise_lexer_error(newstr, line);
|
1159
|
+
} else {
|
1160
|
+
rb_funcall(listener, rb_intern("eof"), 0);
|
1161
|
+
}
|
1162
|
+
}
|
1163
|
+
break;
|
1164
|
+
#line 1165 "ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c"
|
1165
|
+
}
|
1166
|
+
}
|
1167
|
+
|
1168
|
+
_again:
|
1169
|
+
if ( cs == 0 )
|
1170
|
+
goto _out;
|
1171
|
+
if ( ++p != pe )
|
1172
|
+
goto _resume;
|
1173
|
+
_test_eof: {}
|
1174
|
+
if ( p == eof )
|
1175
|
+
{
|
1176
|
+
const char *__acts = _lexer_actions + _lexer_eof_actions[cs];
|
1177
|
+
unsigned int __nacts = (unsigned int) *__acts++;
|
1178
|
+
while ( __nacts-- > 0 ) {
|
1179
|
+
switch ( *__acts++ ) {
|
1180
|
+
case 23:
|
1181
|
+
#line 207 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1182
|
+
{
|
1183
|
+
int line;
|
1184
|
+
if (cs < lexer_first_final) {
|
1185
|
+
size_t count = 0;
|
1186
|
+
VALUE newstr_val;
|
1187
|
+
char *newstr;
|
1188
|
+
int newstr_count = 0;
|
1189
|
+
size_t len;
|
1190
|
+
const char *buff;
|
1191
|
+
if (lexer->last_newline != 0) {
|
1192
|
+
len = LEN(last_newline, eof);
|
1193
|
+
buff = PTR_TO(last_newline);
|
1194
|
+
} else {
|
1195
|
+
len = strlen(data);
|
1196
|
+
buff = data;
|
1197
|
+
}
|
1198
|
+
|
1199
|
+
// Allocate as a ruby string so that it gets cleaned up by GC
|
1200
|
+
newstr_val = rb_str_new(buff, len);
|
1201
|
+
newstr = RSTRING_PTR(newstr_val);
|
1202
|
+
|
1203
|
+
|
1204
|
+
for (count = 0; count < len; count++) {
|
1205
|
+
if(buff[count] == 10) {
|
1206
|
+
newstr[newstr_count] = '\0'; // terminate new string at first newline found
|
1207
|
+
break;
|
1208
|
+
} else {
|
1209
|
+
if (buff[count] == '%') {
|
1210
|
+
newstr[newstr_count++] = buff[count];
|
1211
|
+
newstr[newstr_count] = buff[count];
|
1212
|
+
} else {
|
1213
|
+
newstr[newstr_count] = buff[count];
|
1214
|
+
}
|
1215
|
+
}
|
1216
|
+
newstr_count++;
|
1217
|
+
}
|
1218
|
+
|
1219
|
+
line = lexer->line_number;
|
1220
|
+
lexer_init(lexer); // Re-initialize so we can scan again with the same lexer
|
1221
|
+
raise_lexer_error(newstr, line);
|
1222
|
+
} else {
|
1223
|
+
rb_funcall(listener, rb_intern("eof"), 0);
|
1224
|
+
}
|
1225
|
+
}
|
1226
|
+
break;
|
1227
|
+
#line 1228 "ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c"
|
1228
|
+
}
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
_out: {}
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
#line 426 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/zh_tw.c.rl"
|
1236
|
+
|
1237
|
+
assert(p <= pe && "data overflow after parsing execute");
|
1238
|
+
assert(lexer->content_start <= len && "content starts after data end");
|
1239
|
+
assert(lexer->mark < len && "mark is after data end");
|
1240
|
+
|
1241
|
+
// Reset lexer by re-initializing the whole thing
|
1242
|
+
lexer_init(lexer);
|
1243
|
+
|
1244
|
+
if (cs == lexer_error) {
|
1245
|
+
rb_raise(rb_eGherkinLexingError, "Invalid format, lexing fails.");
|
1246
|
+
} else {
|
1247
|
+
return Qtrue;
|
1248
|
+
}
|
1249
|
+
}
|
1250
|
+
}
|
1251
|
+
|
1252
|
+
void Init_gherkin_lexer_zh_tw()
|
1253
|
+
{
|
1254
|
+
mGherkin = rb_define_module("Gherkin");
|
1255
|
+
mGherkinLexer = rb_define_module_under(mGherkin, "Lexer");
|
1256
|
+
rb_eGherkinLexingError = rb_const_get(mGherkinLexer, rb_intern("LexingError"));
|
1257
|
+
|
1258
|
+
mCLexer = rb_define_module_under(mGherkin, "CLexer");
|
1259
|
+
cI18nLexer = rb_define_class_under(mCLexer, "Zh_tw", rb_cObject);
|
1260
|
+
rb_define_alloc_func(cI18nLexer, CLexer_alloc);
|
1261
|
+
rb_define_method(cI18nLexer, "initialize", CLexer_init, 1);
|
1262
|
+
rb_define_method(cI18nLexer, "scan", CLexer_scan, 1);
|
1263
|
+
}
|
1264
|
+
|