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