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