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