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