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/en_tx.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/en_tx.c.rl"
|
84
|
+
|
85
|
+
|
86
|
+
/** Data **/
|
87
|
+
|
88
|
+
#line 89 "ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.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, 19, 20, 21, 39, 40, 41,
|
113
|
+
43, 45, 50, 55, 60, 65, 69, 73,
|
114
|
+
75, 76, 77, 78, 79, 80, 81, 82,
|
115
|
+
83, 84, 85, 86, 87, 88, 89, 90,
|
116
|
+
91, 92, 94, 99, 106, 111, 113, 114,
|
117
|
+
115, 116, 117, 118, 119, 120, 121, 122,
|
118
|
+
123, 138, 140, 142, 144, 146, 148, 150,
|
119
|
+
152, 154, 156, 158, 160, 162, 164, 166,
|
120
|
+
168, 186, 188, 189, 190, 191, 192, 193,
|
121
|
+
194, 195, 196, 197, 198, 199, 214, 216,
|
122
|
+
218, 220, 222, 224, 226, 228, 230, 232,
|
123
|
+
234, 236, 238, 240, 242, 244, 247, 249,
|
124
|
+
251, 253, 255, 257, 259, 261, 263, 265,
|
125
|
+
267, 269, 271, 273, 275, 277, 279, 281,
|
126
|
+
283, 285, 287, 289, 291, 293, 295, 297,
|
127
|
+
299, 301, 303, 305, 307, 309, 311, 313,
|
128
|
+
315, 317, 318, 319, 320, 321, 322, 323,
|
129
|
+
324, 325, 326, 327, 328, 329, 330, 331,
|
130
|
+
332, 333, 334, 341, 343, 345, 347, 349,
|
131
|
+
351, 353, 355, 356, 357, 358, 359, 360,
|
132
|
+
361, 362, 363, 364, 376, 378, 380, 382,
|
133
|
+
384, 386, 388, 390, 392, 394, 396, 398,
|
134
|
+
400, 402, 404, 406, 408, 410, 412, 414,
|
135
|
+
416, 418, 420, 422, 424, 426, 428, 430,
|
136
|
+
432, 434, 436, 438, 440, 442, 444, 446,
|
137
|
+
448, 450, 452, 454, 456, 458, 460, 462,
|
138
|
+
464, 466, 468, 470, 472, 474, 476, 478,
|
139
|
+
480, 481, 482, 483, 484, 485, 486, 487,
|
140
|
+
488, 489, 490, 491, 492, 493, 494, 509,
|
141
|
+
511, 513, 515, 517, 519, 521, 523, 525,
|
142
|
+
527, 529, 531, 533, 535, 537, 539, 542,
|
143
|
+
544, 546, 548, 550, 552, 554, 556, 558,
|
144
|
+
560, 562, 564, 566, 568, 570, 572, 575,
|
145
|
+
577, 579, 581, 583, 585, 587, 589, 591,
|
146
|
+
593, 595, 597, 599, 601, 603, 605, 607,
|
147
|
+
609, 611, 613, 615, 617, 619, 621, 623,
|
148
|
+
625, 627, 629, 630, 634, 640, 643, 645,
|
149
|
+
651, 669, 671, 673, 675, 677, 679, 681,
|
150
|
+
683, 685, 687, 689, 691, 693, 695, 697,
|
151
|
+
699, 701, 703, 705, 707, 709, 711, 713,
|
152
|
+
715, 717, 719, 721, 723, 725, 727, 728
|
153
|
+
};
|
154
|
+
|
155
|
+
static const char _lexer_trans_keys[] = {
|
156
|
+
-17, 10, 32, 34, 35, 37, 42, 64,
|
157
|
+
65, 66, 69, 70, 71, 83, 84, 87,
|
158
|
+
124, 9, 13, -69, -65, 10, 32, 34,
|
159
|
+
35, 37, 42, 64, 65, 66, 69, 70,
|
160
|
+
71, 83, 84, 87, 124, 9, 13, 34,
|
161
|
+
34, 10, 13, 10, 13, 10, 32, 34,
|
162
|
+
9, 13, 10, 32, 34, 9, 13, 10,
|
163
|
+
32, 34, 9, 13, 10, 32, 34, 9,
|
164
|
+
13, 10, 32, 9, 13, 10, 32, 9,
|
165
|
+
13, 10, 13, 10, 95, 70, 69, 65,
|
166
|
+
84, 85, 82, 69, 95, 69, 78, 68,
|
167
|
+
95, 37, 32, 10, 10, 13, 13, 32,
|
168
|
+
64, 9, 10, 9, 10, 13, 32, 64,
|
169
|
+
11, 12, 10, 32, 64, 9, 13, 108,
|
170
|
+
110, 108, 32, 121, 39, 97, 108, 108,
|
171
|
+
58, 10, 10, 10, 32, 35, 37, 42,
|
172
|
+
64, 65, 66, 70, 71, 83, 84, 87,
|
173
|
+
9, 13, 10, 95, 10, 70, 10, 69,
|
174
|
+
10, 65, 10, 84, 10, 85, 10, 82,
|
175
|
+
10, 69, 10, 95, 10, 69, 10, 78,
|
176
|
+
10, 68, 10, 95, 10, 37, 10, 32,
|
177
|
+
10, 32, 34, 35, 37, 42, 64, 65,
|
178
|
+
66, 69, 70, 71, 83, 84, 87, 124,
|
179
|
+
9, 13, 97, 117, 99, 107, 103, 114,
|
180
|
+
111, 117, 110, 100, 58, 10, 10, 10,
|
181
|
+
32, 35, 37, 42, 64, 65, 66, 70,
|
182
|
+
71, 83, 84, 87, 9, 13, 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, 10, 108, 110, 10,
|
187
|
+
108, 10, 32, 10, 121, 10, 39, 10,
|
188
|
+
97, 10, 108, 10, 108, 10, 58, 10,
|
189
|
+
100, 10, 32, 10, 121, 10, 39, 10,
|
190
|
+
97, 10, 108, 10, 108, 10, 117, 10,
|
191
|
+
116, 10, 101, 10, 97, 10, 116, 10,
|
192
|
+
117, 10, 114, 10, 101, 10, 105, 10,
|
193
|
+
118, 10, 101, 10, 110, 10, 99, 10,
|
194
|
+
101, 10, 110, 10, 97, 10, 114, 10,
|
195
|
+
105, 10, 111, 10, 104, 116, 32, 121,
|
196
|
+
39, 97, 108, 108, 120, 97, 109, 112,
|
197
|
+
108, 101, 115, 58, 10, 10, 10, 32,
|
198
|
+
35, 70, 124, 9, 13, 10, 101, 10,
|
199
|
+
97, 10, 116, 10, 117, 10, 114, 10,
|
200
|
+
101, 10, 58, 101, 97, 116, 117, 114,
|
201
|
+
101, 58, 10, 10, 10, 32, 35, 37,
|
202
|
+
64, 65, 66, 69, 70, 83, 9, 13,
|
203
|
+
10, 95, 10, 70, 10, 69, 10, 65,
|
204
|
+
10, 84, 10, 85, 10, 82, 10, 69,
|
205
|
+
10, 95, 10, 69, 10, 78, 10, 68,
|
206
|
+
10, 95, 10, 37, 10, 108, 10, 108,
|
207
|
+
10, 32, 10, 121, 10, 39, 10, 97,
|
208
|
+
10, 108, 10, 108, 10, 58, 10, 97,
|
209
|
+
10, 99, 10, 107, 10, 103, 10, 114,
|
210
|
+
10, 111, 10, 117, 10, 110, 10, 100,
|
211
|
+
10, 120, 10, 97, 10, 109, 10, 112,
|
212
|
+
10, 108, 10, 101, 10, 115, 10, 101,
|
213
|
+
10, 97, 10, 116, 10, 117, 10, 114,
|
214
|
+
10, 101, 10, 99, 10, 101, 10, 110,
|
215
|
+
10, 97, 10, 114, 10, 105, 10, 111,
|
216
|
+
105, 118, 101, 110, 99, 101, 110, 97,
|
217
|
+
114, 105, 111, 58, 10, 10, 10, 32,
|
218
|
+
35, 37, 42, 64, 65, 66, 70, 71,
|
219
|
+
83, 84, 87, 9, 13, 10, 95, 10,
|
220
|
+
70, 10, 69, 10, 65, 10, 84, 10,
|
221
|
+
85, 10, 82, 10, 69, 10, 95, 10,
|
222
|
+
69, 10, 78, 10, 68, 10, 95, 10,
|
223
|
+
37, 10, 32, 10, 108, 110, 10, 108,
|
224
|
+
10, 32, 10, 121, 10, 39, 10, 97,
|
225
|
+
10, 108, 10, 108, 10, 58, 10, 100,
|
226
|
+
10, 32, 10, 121, 10, 39, 10, 97,
|
227
|
+
10, 108, 10, 108, 10, 97, 117, 10,
|
228
|
+
99, 10, 107, 10, 103, 10, 114, 10,
|
229
|
+
111, 10, 117, 10, 110, 10, 100, 10,
|
230
|
+
116, 10, 101, 10, 97, 10, 116, 10,
|
231
|
+
117, 10, 114, 10, 101, 10, 105, 10,
|
232
|
+
118, 10, 101, 10, 110, 10, 99, 10,
|
233
|
+
101, 10, 110, 10, 97, 10, 114, 10,
|
234
|
+
105, 10, 111, 10, 104, 104, 32, 124,
|
235
|
+
9, 13, 10, 32, 92, 124, 9, 13,
|
236
|
+
10, 92, 124, 10, 92, 10, 32, 92,
|
237
|
+
124, 9, 13, 10, 32, 34, 35, 37,
|
238
|
+
42, 64, 65, 66, 69, 70, 71, 83,
|
239
|
+
84, 87, 124, 9, 13, 10, 110, 10,
|
240
|
+
100, 10, 32, 10, 121, 10, 39, 10,
|
241
|
+
97, 10, 108, 10, 108, 10, 117, 10,
|
242
|
+
116, 10, 101, 10, 97, 10, 116, 10,
|
243
|
+
117, 10, 114, 10, 101, 10, 58, 10,
|
244
|
+
105, 10, 118, 10, 101, 10, 110, 10,
|
245
|
+
99, 10, 101, 10, 110, 10, 97, 10,
|
246
|
+
114, 10, 105, 10, 111, 10, 104, 100,
|
247
|
+
0
|
248
|
+
};
|
249
|
+
|
250
|
+
static const char _lexer_single_lengths[] = {
|
251
|
+
0, 17, 1, 1, 16, 1, 1, 2,
|
252
|
+
2, 3, 3, 3, 3, 2, 2, 2,
|
253
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
254
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
255
|
+
1, 2, 3, 5, 3, 2, 1, 1,
|
256
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
257
|
+
13, 2, 2, 2, 2, 2, 2, 2,
|
258
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
259
|
+
16, 2, 1, 1, 1, 1, 1, 1,
|
260
|
+
1, 1, 1, 1, 1, 13, 2, 2,
|
261
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
262
|
+
2, 2, 2, 2, 2, 3, 2, 2,
|
263
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
264
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
265
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
266
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
267
|
+
2, 1, 1, 1, 1, 1, 1, 1,
|
268
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
269
|
+
1, 1, 5, 2, 2, 2, 2, 2,
|
270
|
+
2, 2, 1, 1, 1, 1, 1, 1,
|
271
|
+
1, 1, 1, 10, 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, 2, 2, 2,
|
275
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
276
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
277
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
278
|
+
1, 1, 1, 1, 1, 1, 1, 1,
|
279
|
+
1, 1, 1, 1, 1, 1, 13, 2,
|
280
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
281
|
+
2, 2, 2, 2, 2, 2, 3, 2,
|
282
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
283
|
+
2, 2, 2, 2, 2, 2, 3, 2,
|
284
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
285
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
286
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
287
|
+
2, 2, 1, 2, 4, 3, 2, 4,
|
288
|
+
16, 2, 2, 2, 2, 2, 2, 2,
|
289
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
290
|
+
2, 2, 2, 2, 2, 2, 2, 2,
|
291
|
+
2, 2, 2, 2, 2, 2, 1, 0
|
292
|
+
};
|
293
|
+
|
294
|
+
static const char _lexer_range_lengths[] = {
|
295
|
+
0, 1, 0, 0, 1, 0, 0, 0,
|
296
|
+
0, 1, 1, 1, 1, 1, 1, 0,
|
297
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
298
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
299
|
+
0, 0, 1, 1, 1, 0, 0, 0,
|
300
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
301
|
+
1, 0, 0, 0, 0, 0, 0, 0,
|
302
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
303
|
+
1, 0, 0, 0, 0, 0, 0, 0,
|
304
|
+
0, 0, 0, 0, 0, 1, 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
|
+
0, 0, 0, 0, 0, 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, 0, 0, 0, 0,
|
313
|
+
0, 0, 1, 0, 0, 0, 0, 0,
|
314
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
315
|
+
0, 0, 0, 1, 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, 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, 1, 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, 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, 1, 1, 0, 0, 1,
|
332
|
+
1, 0, 0, 0, 0, 0, 0, 0,
|
333
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
334
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
335
|
+
0, 0, 0, 0, 0, 0, 0, 0
|
336
|
+
};
|
337
|
+
|
338
|
+
static const short _lexer_index_offsets[] = {
|
339
|
+
0, 0, 19, 21, 23, 41, 43, 45,
|
340
|
+
48, 51, 56, 61, 66, 71, 75, 79,
|
341
|
+
82, 84, 86, 88, 90, 92, 94, 96,
|
342
|
+
98, 100, 102, 104, 106, 108, 110, 112,
|
343
|
+
114, 116, 119, 124, 131, 136, 139, 141,
|
344
|
+
143, 145, 147, 149, 151, 153, 155, 157,
|
345
|
+
159, 174, 177, 180, 183, 186, 189, 192,
|
346
|
+
195, 198, 201, 204, 207, 210, 213, 216,
|
347
|
+
219, 237, 240, 242, 244, 246, 248, 250,
|
348
|
+
252, 254, 256, 258, 260, 262, 277, 280,
|
349
|
+
283, 286, 289, 292, 295, 298, 301, 304,
|
350
|
+
307, 310, 313, 316, 319, 322, 326, 329,
|
351
|
+
332, 335, 338, 341, 344, 347, 350, 353,
|
352
|
+
356, 359, 362, 365, 368, 371, 374, 377,
|
353
|
+
380, 383, 386, 389, 392, 395, 398, 401,
|
354
|
+
404, 407, 410, 413, 416, 419, 422, 425,
|
355
|
+
428, 431, 433, 435, 437, 439, 441, 443,
|
356
|
+
445, 447, 449, 451, 453, 455, 457, 459,
|
357
|
+
461, 463, 465, 472, 475, 478, 481, 484,
|
358
|
+
487, 490, 493, 495, 497, 499, 501, 503,
|
359
|
+
505, 507, 509, 511, 523, 526, 529, 532,
|
360
|
+
535, 538, 541, 544, 547, 550, 553, 556,
|
361
|
+
559, 562, 565, 568, 571, 574, 577, 580,
|
362
|
+
583, 586, 589, 592, 595, 598, 601, 604,
|
363
|
+
607, 610, 613, 616, 619, 622, 625, 628,
|
364
|
+
631, 634, 637, 640, 643, 646, 649, 652,
|
365
|
+
655, 658, 661, 664, 667, 670, 673, 676,
|
366
|
+
679, 681, 683, 685, 687, 689, 691, 693,
|
367
|
+
695, 697, 699, 701, 703, 705, 707, 722,
|
368
|
+
725, 728, 731, 734, 737, 740, 743, 746,
|
369
|
+
749, 752, 755, 758, 761, 764, 767, 771,
|
370
|
+
774, 777, 780, 783, 786, 789, 792, 795,
|
371
|
+
798, 801, 804, 807, 810, 813, 816, 820,
|
372
|
+
823, 826, 829, 832, 835, 838, 841, 844,
|
373
|
+
847, 850, 853, 856, 859, 862, 865, 868,
|
374
|
+
871, 874, 877, 880, 883, 886, 889, 892,
|
375
|
+
895, 898, 901, 903, 907, 913, 917, 920,
|
376
|
+
926, 944, 947, 950, 953, 956, 959, 962,
|
377
|
+
965, 968, 971, 974, 977, 980, 983, 986,
|
378
|
+
989, 992, 995, 998, 1001, 1004, 1007, 1010,
|
379
|
+
1013, 1016, 1019, 1022, 1025, 1028, 1031, 1033
|
380
|
+
};
|
381
|
+
|
382
|
+
static const short _lexer_trans_targs[] = {
|
383
|
+
2, 4, 4, 5, 15, 17, 31, 34,
|
384
|
+
37, 65, 136, 154, 216, 220, 290, 290,
|
385
|
+
291, 4, 0, 3, 0, 4, 0, 4,
|
386
|
+
4, 5, 15, 17, 31, 34, 37, 65,
|
387
|
+
136, 154, 216, 220, 290, 290, 291, 4,
|
388
|
+
0, 6, 0, 7, 0, 9, 8, 8,
|
389
|
+
9, 8, 8, 10, 10, 11, 10, 10,
|
390
|
+
10, 10, 11, 10, 10, 10, 10, 12,
|
391
|
+
10, 10, 10, 10, 13, 10, 10, 4,
|
392
|
+
14, 14, 0, 4, 14, 14, 0, 4,
|
393
|
+
16, 15, 4, 0, 18, 0, 19, 0,
|
394
|
+
20, 0, 21, 0, 22, 0, 23, 0,
|
395
|
+
24, 0, 25, 0, 26, 0, 27, 0,
|
396
|
+
28, 0, 29, 0, 30, 0, 327, 0,
|
397
|
+
32, 0, 0, 33, 4, 16, 33, 0,
|
398
|
+
0, 0, 0, 35, 36, 4, 36, 36,
|
399
|
+
34, 35, 35, 4, 36, 34, 36, 0,
|
400
|
+
38, 326, 0, 39, 0, 40, 0, 41,
|
401
|
+
0, 42, 0, 43, 0, 44, 0, 45,
|
402
|
+
0, 46, 0, 48, 47, 48, 47, 48,
|
403
|
+
48, 4, 49, 63, 4, 297, 305, 307,
|
404
|
+
314, 318, 325, 325, 48, 47, 48, 50,
|
405
|
+
47, 48, 51, 47, 48, 52, 47, 48,
|
406
|
+
53, 47, 48, 54, 47, 48, 55, 47,
|
407
|
+
48, 56, 47, 48, 57, 47, 48, 58,
|
408
|
+
47, 48, 59, 47, 48, 60, 47, 48,
|
409
|
+
61, 47, 48, 62, 47, 48, 4, 47,
|
410
|
+
48, 64, 47, 4, 4, 5, 15, 17,
|
411
|
+
31, 34, 37, 65, 136, 154, 216, 220,
|
412
|
+
290, 290, 291, 4, 0, 66, 129, 0,
|
413
|
+
67, 0, 68, 0, 69, 0, 70, 0,
|
414
|
+
71, 0, 72, 0, 73, 0, 74, 0,
|
415
|
+
75, 0, 77, 76, 77, 76, 77, 77,
|
416
|
+
4, 78, 92, 4, 93, 109, 111, 117,
|
417
|
+
121, 128, 128, 77, 76, 77, 79, 76,
|
418
|
+
77, 80, 76, 77, 81, 76, 77, 82,
|
419
|
+
76, 77, 83, 76, 77, 84, 76, 77,
|
420
|
+
85, 76, 77, 86, 76, 77, 87, 76,
|
421
|
+
77, 88, 76, 77, 89, 76, 77, 90,
|
422
|
+
76, 77, 91, 76, 77, 4, 76, 77,
|
423
|
+
64, 76, 77, 94, 102, 76, 77, 95,
|
424
|
+
76, 77, 96, 76, 77, 97, 76, 77,
|
425
|
+
98, 76, 77, 99, 76, 77, 100, 76,
|
426
|
+
77, 101, 76, 77, 64, 76, 77, 103,
|
427
|
+
76, 77, 104, 76, 77, 105, 76, 77,
|
428
|
+
106, 76, 77, 107, 76, 77, 108, 76,
|
429
|
+
77, 92, 76, 77, 110, 76, 77, 103,
|
430
|
+
76, 77, 112, 76, 77, 113, 76, 77,
|
431
|
+
114, 76, 77, 115, 76, 77, 116, 76,
|
432
|
+
77, 101, 76, 77, 118, 76, 77, 119,
|
433
|
+
76, 77, 120, 76, 77, 103, 76, 77,
|
434
|
+
122, 76, 77, 123, 76, 77, 124, 76,
|
435
|
+
77, 125, 76, 77, 126, 76, 77, 127,
|
436
|
+
76, 77, 101, 76, 77, 119, 76, 130,
|
437
|
+
0, 131, 0, 132, 0, 133, 0, 134,
|
438
|
+
0, 135, 0, 31, 0, 137, 0, 138,
|
439
|
+
0, 139, 0, 140, 0, 141, 0, 142,
|
440
|
+
0, 143, 0, 144, 0, 146, 145, 146,
|
441
|
+
145, 146, 146, 4, 147, 4, 146, 145,
|
442
|
+
146, 148, 145, 146, 149, 145, 146, 150,
|
443
|
+
145, 146, 151, 145, 146, 152, 145, 146,
|
444
|
+
153, 145, 146, 64, 145, 155, 0, 156,
|
445
|
+
0, 157, 0, 158, 0, 159, 0, 160,
|
446
|
+
0, 161, 0, 163, 162, 163, 162, 163,
|
447
|
+
163, 4, 164, 4, 178, 187, 196, 203,
|
448
|
+
209, 163, 162, 163, 165, 162, 163, 166,
|
449
|
+
162, 163, 167, 162, 163, 168, 162, 163,
|
450
|
+
169, 162, 163, 170, 162, 163, 171, 162,
|
451
|
+
163, 172, 162, 163, 173, 162, 163, 174,
|
452
|
+
162, 163, 175, 162, 163, 176, 162, 163,
|
453
|
+
177, 162, 163, 4, 162, 163, 179, 162,
|
454
|
+
163, 180, 162, 163, 181, 162, 163, 182,
|
455
|
+
162, 163, 183, 162, 163, 184, 162, 163,
|
456
|
+
185, 162, 163, 186, 162, 163, 64, 162,
|
457
|
+
163, 188, 162, 163, 189, 162, 163, 190,
|
458
|
+
162, 163, 191, 162, 163, 192, 162, 163,
|
459
|
+
193, 162, 163, 194, 162, 163, 195, 162,
|
460
|
+
163, 186, 162, 163, 197, 162, 163, 198,
|
461
|
+
162, 163, 199, 162, 163, 200, 162, 163,
|
462
|
+
201, 162, 163, 202, 162, 163, 186, 162,
|
463
|
+
163, 204, 162, 163, 205, 162, 163, 206,
|
464
|
+
162, 163, 207, 162, 163, 208, 162, 163,
|
465
|
+
186, 162, 163, 210, 162, 163, 211, 162,
|
466
|
+
163, 212, 162, 163, 213, 162, 163, 214,
|
467
|
+
162, 163, 215, 162, 163, 186, 162, 217,
|
468
|
+
0, 218, 0, 219, 0, 130, 0, 221,
|
469
|
+
0, 222, 0, 223, 0, 224, 0, 225,
|
470
|
+
0, 226, 0, 227, 0, 228, 0, 230,
|
471
|
+
229, 230, 229, 230, 230, 4, 231, 245,
|
472
|
+
4, 246, 262, 272, 278, 282, 289, 289,
|
473
|
+
230, 229, 230, 232, 229, 230, 233, 229,
|
474
|
+
230, 234, 229, 230, 235, 229, 230, 236,
|
475
|
+
229, 230, 237, 229, 230, 238, 229, 230,
|
476
|
+
239, 229, 230, 240, 229, 230, 241, 229,
|
477
|
+
230, 242, 229, 230, 243, 229, 230, 244,
|
478
|
+
229, 230, 4, 229, 230, 64, 229, 230,
|
479
|
+
247, 255, 229, 230, 248, 229, 230, 249,
|
480
|
+
229, 230, 250, 229, 230, 251, 229, 230,
|
481
|
+
252, 229, 230, 253, 229, 230, 254, 229,
|
482
|
+
230, 64, 229, 230, 256, 229, 230, 257,
|
483
|
+
229, 230, 258, 229, 230, 259, 229, 230,
|
484
|
+
260, 229, 230, 261, 229, 230, 245, 229,
|
485
|
+
230, 263, 271, 229, 230, 264, 229, 230,
|
486
|
+
265, 229, 230, 266, 229, 230, 267, 229,
|
487
|
+
230, 268, 229, 230, 269, 229, 230, 270,
|
488
|
+
229, 230, 254, 229, 230, 256, 229, 230,
|
489
|
+
273, 229, 230, 274, 229, 230, 275, 229,
|
490
|
+
230, 276, 229, 230, 277, 229, 230, 254,
|
491
|
+
229, 230, 279, 229, 230, 280, 229, 230,
|
492
|
+
281, 229, 230, 256, 229, 230, 283, 229,
|
493
|
+
230, 284, 229, 230, 285, 229, 230, 286,
|
494
|
+
229, 230, 287, 229, 230, 288, 229, 230,
|
495
|
+
254, 229, 230, 280, 229, 218, 0, 291,
|
496
|
+
292, 291, 0, 296, 295, 294, 292, 295,
|
497
|
+
293, 0, 294, 292, 293, 0, 294, 293,
|
498
|
+
296, 295, 294, 292, 295, 293, 296, 296,
|
499
|
+
5, 15, 17, 31, 34, 37, 65, 136,
|
500
|
+
154, 216, 220, 290, 290, 291, 296, 0,
|
501
|
+
48, 298, 47, 48, 299, 47, 48, 300,
|
502
|
+
47, 48, 301, 47, 48, 302, 47, 48,
|
503
|
+
303, 47, 48, 304, 47, 48, 63, 47,
|
504
|
+
48, 306, 47, 48, 299, 47, 48, 308,
|
505
|
+
47, 48, 309, 47, 48, 310, 47, 48,
|
506
|
+
311, 47, 48, 312, 47, 48, 313, 47,
|
507
|
+
48, 64, 47, 48, 315, 47, 48, 316,
|
508
|
+
47, 48, 317, 47, 48, 299, 47, 48,
|
509
|
+
319, 47, 48, 320, 47, 48, 321, 47,
|
510
|
+
48, 322, 47, 48, 323, 47, 48, 324,
|
511
|
+
47, 48, 313, 47, 48, 316, 47, 130,
|
512
|
+
0, 0, 0
|
513
|
+
};
|
514
|
+
|
515
|
+
static const unsigned char _lexer_trans_actions[] = {
|
516
|
+
0, 54, 0, 5, 1, 0, 29, 1,
|
517
|
+
29, 29, 29, 29, 29, 29, 29, 29,
|
518
|
+
35, 0, 43, 0, 43, 0, 43, 54,
|
519
|
+
0, 5, 1, 0, 29, 1, 29, 29,
|
520
|
+
29, 29, 29, 29, 29, 29, 35, 0,
|
521
|
+
43, 0, 43, 0, 43, 135, 48, 9,
|
522
|
+
106, 11, 0, 130, 45, 45, 45, 3,
|
523
|
+
122, 33, 33, 33, 0, 122, 33, 33,
|
524
|
+
33, 0, 122, 33, 0, 33, 0, 102,
|
525
|
+
7, 7, 43, 54, 0, 0, 43, 114,
|
526
|
+
25, 0, 54, 43, 0, 43, 0, 43,
|
527
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
528
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
529
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
530
|
+
0, 43, 43, 57, 110, 23, 0, 43,
|
531
|
+
43, 43, 43, 0, 27, 118, 27, 27,
|
532
|
+
51, 27, 0, 54, 0, 1, 0, 43,
|
533
|
+
0, 0, 43, 0, 43, 0, 43, 0,
|
534
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
535
|
+
43, 0, 43, 140, 57, 54, 0, 54,
|
536
|
+
0, 78, 33, 84, 78, 84, 84, 84,
|
537
|
+
84, 84, 84, 84, 0, 0, 54, 0,
|
538
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
539
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
540
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
541
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
542
|
+
0, 0, 54, 0, 0, 54, 19, 0,
|
543
|
+
54, 19, 0, 126, 31, 60, 57, 31,
|
544
|
+
63, 57, 63, 63, 63, 63, 63, 63,
|
545
|
+
63, 63, 66, 31, 43, 0, 0, 43,
|
546
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
547
|
+
0, 43, 0, 43, 0, 43, 0, 43,
|
548
|
+
0, 43, 140, 57, 54, 0, 54, 0,
|
549
|
+
72, 33, 84, 72, 84, 84, 84, 84,
|
550
|
+
84, 84, 84, 0, 0, 54, 0, 0,
|
551
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
552
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
553
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
554
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
555
|
+
0, 54, 0, 0, 54, 15, 0, 54,
|
556
|
+
15, 0, 54, 0, 0, 0, 54, 0,
|
557
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
558
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
559
|
+
54, 0, 0, 54, 15, 0, 54, 0,
|
560
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
561
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
562
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
563
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
564
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
565
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
566
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
567
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
568
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
569
|
+
0, 54, 0, 0, 54, 0, 0, 0,
|
570
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
571
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
572
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
573
|
+
43, 0, 43, 0, 43, 140, 57, 54,
|
574
|
+
0, 54, 0, 81, 84, 81, 0, 0,
|
575
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
576
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
577
|
+
0, 0, 54, 21, 0, 0, 43, 0,
|
578
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
579
|
+
43, 0, 43, 140, 57, 54, 0, 54,
|
580
|
+
0, 69, 33, 69, 84, 84, 84, 84,
|
581
|
+
84, 0, 0, 54, 0, 0, 54, 0,
|
582
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
583
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
584
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
585
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
586
|
+
0, 0, 54, 13, 0, 54, 0, 0,
|
587
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
588
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
589
|
+
0, 0, 54, 0, 0, 54, 13, 0,
|
590
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
591
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
592
|
+
0, 0, 54, 0, 0, 54, 0, 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
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
597
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
598
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
599
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
600
|
+
0, 54, 0, 0, 54, 0, 0, 0,
|
601
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
602
|
+
43, 0, 43, 0, 43, 0, 43, 0,
|
603
|
+
43, 0, 43, 0, 43, 0, 43, 140,
|
604
|
+
57, 54, 0, 54, 0, 75, 33, 84,
|
605
|
+
75, 84, 84, 84, 84, 84, 84, 84,
|
606
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
607
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
608
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
609
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
610
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
611
|
+
0, 54, 17, 0, 54, 17, 0, 54,
|
612
|
+
0, 0, 0, 54, 0, 0, 54, 0,
|
613
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
614
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
615
|
+
54, 17, 0, 54, 0, 0, 54, 0,
|
616
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
617
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
618
|
+
54, 0, 0, 0, 54, 0, 0, 54,
|
619
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
620
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
621
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
622
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
623
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
624
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
625
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
626
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
627
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
628
|
+
0, 0, 54, 0, 0, 0, 43, 0,
|
629
|
+
0, 0, 43, 54, 37, 37, 87, 37,
|
630
|
+
37, 43, 0, 39, 0, 43, 0, 0,
|
631
|
+
54, 0, 0, 39, 0, 0, 54, 0,
|
632
|
+
93, 90, 41, 96, 90, 96, 96, 96,
|
633
|
+
96, 96, 96, 96, 96, 99, 0, 43,
|
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, 0, 0, 54, 0,
|
638
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
639
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
640
|
+
54, 19, 0, 54, 0, 0, 54, 0,
|
641
|
+
0, 54, 0, 0, 54, 0, 0, 54,
|
642
|
+
0, 0, 54, 0, 0, 54, 0, 0,
|
643
|
+
54, 0, 0, 54, 0, 0, 54, 0,
|
644
|
+
0, 54, 0, 0, 54, 0, 0, 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, 43
|
690
|
+
};
|
691
|
+
|
692
|
+
static const int lexer_start = 1;
|
693
|
+
static const int lexer_first_final = 327;
|
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/en_tx.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_en_tx/gherkin_lexer_en_tx.c"
|
868
|
+
{
|
869
|
+
cs = lexer_start;
|
870
|
+
}
|
871
|
+
|
872
|
+
#line 425 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_tx.c.rl"
|
873
|
+
|
874
|
+
#line 875 "ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.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/en_tx.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/en_tx.c.rl"
|
957
|
+
{
|
958
|
+
MARK(content_start, p);
|
959
|
+
}
|
960
|
+
break;
|
961
|
+
case 2:
|
962
|
+
#line 93 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.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/en_tx.c.rl"
|
1077
|
+
{
|
1078
|
+
MARK(content_end, p);
|
1079
|
+
}
|
1080
|
+
break;
|
1081
|
+
case 19:
|
1082
|
+
#line 179 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_tx.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/en_tx.c.rl"
|
1091
|
+
{
|
1092
|
+
MARK(content_start, p);
|
1093
|
+
}
|
1094
|
+
break;
|
1095
|
+
case 21:
|
1096
|
+
#line 189 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_tx.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/en_tx.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/en_tx.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_en_tx/gherkin_lexer_en_tx.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/en_tx.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_en_tx/gherkin_lexer_en_tx.c"
|
1228
|
+
}
|
1229
|
+
}
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
_out: {}
|
1233
|
+
}
|
1234
|
+
|
1235
|
+
#line 426 "/Users/ahellesoy/scm/gherkin/tasks/../ragel/i18n/en_tx.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_en_tx()
|
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, "En_tx", 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
|
+
|