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