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