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