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