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