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