gherkin 2.11.6 → 2.11.7

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