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