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