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