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