gherkin 2.4.18 → 2.4.20

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