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