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