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