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