2 #line 1 "wikitext_ragel.rl"
3 // Copyright 2008-2009 Wincent Colaiuta. All rights reserved.
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
8 // 1. Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer.
10 // 2. Redistributions in binary form must reproduce the above copyright notice,
11 // this list of conditions and the following disclaimer in the documentation
12 // and/or other materials provided with the distribution.
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
18 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 // POSSIBILITY OF SUCH DAMAGE.
26 //----------------------------------------------------------------------//
27 // NOTE: wikitext_ragel.c is generated from wikitext_ragel.rl, so //
28 // if you make changes to the former they will be overwritten. //
29 // You should perform all your edits in wikitext_ragel.rl. //
30 //----------------------------------------------------------------------//
32 #include "wikitext_ragel.h"
36 #define EMIT(t) do { out->type = t; out->stop = p + 1; out->column_stop += (out->stop - out->start); } while (0)
37 #define MARK() do { mark = p; } while (0)
38 #define REWIND() do { p = mark; } while (0)
39 #define AT_END() (p + 1 == pe)
40 #define DISTANCE() (p + 1 - ts)
41 #define NEXT_CHAR() (*(p + 1))
44 #line 45 "wikitext_ragel.c"
45 static const int wikitext_start = 106;
46 static const int wikitext_first_final = 106;
47 static const int wikitext_error = 0;
49 static const int wikitext_en_main = 106;
52 #line 483 "wikitext_ragel.rl"
55 // for now we use the scanner as a tokenizer that returns one token at a time, just like ANTLR
56 // ultimately we could look at embedding all of the transformation inside the scanner itself (combined scanner/parser)
57 // pass in the last token because that's useful for the scanner to know
58 // p data pointer (required by Ragel machine); overriden with contents of last_token if supplied
59 // pe data end pointer (required by Ragel machine)
60 void next_token(token_t *out, token_t *last_token, char *p, char *pe)
62 int last_token_type = NO_TOKEN;
65 last_token_type = last_token->type;
67 out->line_start = out->line_stop = last_token->line_stop;
68 out->column_start = out->column_stop = last_token->column_stop;
73 out->column_start = 1;
82 // all done, have reached end of input
84 out->type = END_OF_FILE;
88 char *mark; // for manual backtracking
89 char *eof = pe; // required for backtracking (longest match determination)
90 int cs; // current state (standard Ragel)
91 char *ts; // token start (scanner)
92 char *te; // token end (scanner)
93 int act; // identity of last patterned matched (scanner)
95 #line 96 "wikitext_ragel.c"
103 #line 525 "wikitext_ragel.rl"
105 #line 106 "wikitext_ragel.c"
112 #line 55 "wikitext_ragel.rl"
114 out->code_point = ((uint32_t)(*(p - 1)) & 0x1f) << 6 |
117 #line 474 "wikitext_ragel.rl"
120 out->column_stop = out->column_start + 1;
121 {p++; cs = 106; goto _out;}
125 #line 61 "wikitext_ragel.rl"
127 out->code_point = ((uint32_t)(*(p - 2)) & 0x0f) << 12 |
128 ((uint32_t)(*(p - 1)) & 0x3f) << 6 |
131 #line 474 "wikitext_ragel.rl"
134 out->column_stop = out->column_start + 1;
135 {p++; cs = 106; goto _out;}
139 #line 68 "wikitext_ragel.rl"
141 out->code_point = ((uint32_t)(*(p - 3)) & 0x07) << 18 |
142 ((uint32_t)(*(p - 2)) & 0x3f) << 12 |
143 ((uint32_t)(*(p - 1)) & 0x3f) << 6 |
146 #line 474 "wikitext_ragel.rl"
149 out->column_stop = out->column_start + 1;
150 {p++; cs = 106; goto _out;}
154 #line 381 "wikitext_ragel.rl"
157 {p++; cs = 106; goto _out;}
161 #line 369 "wikitext_ragel.rl"
163 EMIT(DECIMAL_ENTITY);
164 {p++; cs = 106; goto _out;}
168 #line 363 "wikitext_ragel.rl"
171 {p++; cs = 106; goto _out;}
175 #line 357 "wikitext_ragel.rl"
178 {p++; cs = 106; goto _out;}
182 #line 351 "wikitext_ragel.rl"
185 {p++; cs = 106; goto _out;}
189 #line 345 "wikitext_ragel.rl"
192 {p++; cs = 106; goto _out;}
201 {p++; cs = 106; goto _out;}
207 {p++; cs = 106; goto _out;}
212 EMIT(SPECIAL_URI_CHARS);
213 {p++; cs = 106; goto _out;}
219 {p++; cs = 106; goto _out;}
225 {p++; cs = 106; goto _out;}
232 #line 387 "wikitext_ragel.rl"
235 {p++; cs = 106; goto _out;}
239 #line 126 "wikitext_ragel.rl"
241 EMIT(BLOCKQUOTE_END);
242 {p++; cs = 106; goto _out;}
246 #line 168 "wikitext_ragel.rl"
249 {p++; cs = 106; goto _out;}
253 #line 96 "wikitext_ragel.rl"
256 {p++; cs = 106; goto _out;}
260 #line 114 "wikitext_ragel.rl"
263 {p++; cs = 106; goto _out;}
267 #line 156 "wikitext_ragel.rl"
270 {p++; cs = 106; goto _out;}
274 #line 186 "wikitext_ragel.rl"
277 {p++; cs = 106; goto _out;}
281 #line 120 "wikitext_ragel.rl"
283 EMIT(BLOCKQUOTE_START);
284 {p++; cs = 106; goto _out;}
288 #line 162 "wikitext_ragel.rl"
291 {p++; cs = 106; goto _out;}
295 #line 90 "wikitext_ragel.rl"
298 {p++; cs = 106; goto _out;}
302 #line 102 "wikitext_ragel.rl"
305 {p++; cs = 106; goto _out;}
309 #line 150 "wikitext_ragel.rl"
312 {p++; cs = 106; goto _out;}
316 #line 180 "wikitext_ragel.rl"
319 {p++; cs = 106; goto _out;}
323 #line 108 "wikitext_ragel.rl"
326 {p++; cs = 106; goto _out;}
330 #line 442 "wikitext_ragel.rl"
333 {p++; cs = 106; goto _out;}
337 #line 297 "wikitext_ragel.rl"
340 {p++; cs = 106; goto _out;}
344 #line 50 "wikitext_ragel.rl"
346 out->code_point = *p & 0x7f;
348 #line 474 "wikitext_ragel.rl"
351 out->column_stop = out->column_start + 1;
352 {p++; cs = 106; goto _out;}
356 #line 423 "wikitext_ragel.rl"
359 out->column_stop = 1;
361 {p++; cs = 106; goto _out;}
363 #line 50 "wikitext_ragel.rl"
365 out->code_point = *p & 0x7f;
369 #line 375 "wikitext_ragel.rl"
372 {p++; cs = 106; goto _out;}
376 #line 218 "wikitext_ragel.rl"
378 if (out->column_start == 1 ||
379 last_token_type == OL ||
380 last_token_type == UL ||
381 last_token_type == BLOCKQUOTE ||
382 last_token_type == BLOCKQUOTE_START)
386 {p++; cs = 106; goto _out;}
390 #line 231 "wikitext_ragel.rl"
392 if (out->column_start == 1 ||
393 last_token_type == OL ||
394 last_token_type == UL ||
395 last_token_type == BLOCKQUOTE ||
396 last_token_type == BLOCKQUOTE_START)
400 {p++; cs = 106; goto _out;}
404 #line 174 "wikitext_ragel.rl"
407 {p++; cs = 106; goto _out;}
411 #line 327 "wikitext_ragel.rl"
414 {p++; cs = 106; goto _out;}
418 #line 423 "wikitext_ragel.rl"
421 out->column_stop = 1;
423 {p++; cs = 106; goto _out;}
427 #line 423 "wikitext_ragel.rl"
430 out->column_stop = 1;
432 {p++; cs = 106; goto _out;}
436 #line 206 "wikitext_ragel.rl"
438 if (out->column_start == 1 || last_token_type == BLOCKQUOTE)
445 {p++; cs = 106; goto _out;}
449 #line 436 "wikitext_ragel.rl"
451 EMIT(SPECIAL_URI_CHARS);
452 {p++; cs = 106; goto _out;}
456 #line 454 "wikitext_ragel.rl"
459 {p++; cs = 106; goto _out;}
463 #line 381 "wikitext_ragel.rl"
466 {p++; cs = 106; goto _out;}
470 #line 132 "wikitext_ragel.rl"
474 else if (DISTANCE() == 4)
479 else if (DISTANCE() == 3)
481 else if (DISTANCE() == 2)
485 {p++; cs = 106; goto _out;}
489 #line 132 "wikitext_ragel.rl"
493 else if (DISTANCE() == 4)
498 else if (DISTANCE() == 3)
500 else if (DISTANCE() == 2)
504 {p++; cs = 106; goto _out;}
508 #line 303 "wikitext_ragel.rl"
511 {p++; cs = 106; goto _out;}
515 #line 309 "wikitext_ragel.rl"
518 {p++; cs = 106; goto _out;}
522 #line 442 "wikitext_ragel.rl"
525 {p++; cs = 106; goto _out;}
529 #line 387 "wikitext_ragel.rl"
532 {p++; cs = 106; goto _out;}
536 #line 244 "wikitext_ragel.rl"
538 if (out->column_start == 1 || last_token_type == BLOCKQUOTE || last_token_type == BLOCKQUOTE_START)
543 else if (DISTANCE() == 2)
545 else if (DISTANCE() == 3)
547 else if (DISTANCE() == 4)
549 else if (DISTANCE() == 5)
551 else if (DISTANCE() == 6)
553 else if (DISTANCE() > 6)
559 else if (AT_END() || NEXT_CHAR() == '\n' || NEXT_CHAR() == '\r')
564 else if (DISTANCE() == 2)
566 else if (DISTANCE() == 3)
568 else if (DISTANCE() == 4)
570 else if (DISTANCE() == 5)
572 else if (DISTANCE() == 6)
574 else if (DISTANCE() > 6)
576 p -= 6; // will scan the H6 on the next scan
582 // note that a H*_END token will never match before a BLOCKQUOTE_END
586 {p++; cs = 106; goto _out;}
590 #line 193 "wikitext_ragel.rl"
592 if (out->column_start == 1 || last_token_type == BLOCKQUOTE)
599 {p++; cs = 106; goto _out;}
603 #line 193 "wikitext_ragel.rl"
605 if (out->column_start == 1 || last_token_type == BLOCKQUOTE)
612 {p++; cs = 106; goto _out;}
616 #line 297 "wikitext_ragel.rl"
619 {p++; cs = 106; goto _out;}
623 #line 333 "wikitext_ragel.rl"
625 EMIT(EXT_LINK_START);
626 {p++; cs = 106; goto _out;}
630 #line 315 "wikitext_ragel.rl"
633 {p++; cs = 106; goto _out;}
637 #line 339 "wikitext_ragel.rl"
640 {p++; cs = 106; goto _out;}
644 #line 321 "wikitext_ragel.rl"
647 {p++; cs = 106; goto _out;}
651 #line 411 "wikitext_ragel.rl"
654 {p++; cs = 106; goto _out;}
658 #line 399 "wikitext_ragel.rl"
661 {p++; cs = 106; goto _out;}
665 #line 417 "wikitext_ragel.rl"
668 {p++; cs = 106; goto _out;}
672 #line 405 "wikitext_ragel.rl"
675 {p++; cs = 106; goto _out;}
686 #line 687 "wikitext_ragel.c"
715 case 102: goto tr140;
716 case 104: goto tr141;
717 case 109: goto tr142;
718 case 115: goto tr143;
719 case 123: goto st154;
720 case 124: goto tr148;
721 case 125: goto st155;
722 case 126: goto st110;
723 case 127: goto tr122;
727 if ( -62 <= (*p) && (*p) <= -33 )
729 } else if ( (*p) > -17 ) {
731 if ( 1 <= (*p) && (*p) <= 31 )
733 } else if ( (*p) >= -16 )
737 } else if ( (*p) > 37 ) {
739 if ( 40 <= (*p) && (*p) <= 44 )
741 } else if ( (*p) > 57 ) {
743 if ( 65 <= (*p) && (*p) <= 122 )
745 } else if ( (*p) >= 58 )
798 #line 50 "wikitext_ragel.rl"
800 out->code_point = *p & 0x7f;
807 #line 808 "wikitext_ragel.c"
812 #line 45 "wikitext_ragel.rl"
821 #line 822 "wikitext_ragel.c"
836 if ( 58 <= (*p) && (*p) <= 59 )
838 } else if ( (*p) >= 40 )
851 case 126: goto st110;
854 if ( 94 <= (*p) && (*p) <= 95 )
856 } else if ( (*p) >= 36 )
867 #line 868 "wikitext_ragel.c"
874 if ( 98 <= (*p) && (*p) <= 122 )
876 } else if ( (*p) >= 65 )
887 if ( 48 <= (*p) && (*p) <= 57 )
896 if ( 48 <= (*p) && (*p) <= 57 )
904 if ( 48 <= (*p) && (*p) <= 57 )
906 } else if ( (*p) > 70 ) {
907 if ( 97 <= (*p) && (*p) <= 102 )
919 if ( 48 <= (*p) && (*p) <= 57 )
921 } else if ( (*p) > 70 ) {
922 if ( 97 <= (*p) && (*p) <= 102 )
934 if ( 48 <= (*p) && (*p) <= 57 )
936 } else if ( (*p) > 90 ) {
937 if ( 97 <= (*p) && (*p) <= 122 )
948 if ( 48 <= (*p) && (*p) <= 57 )
960 if ( 48 <= (*p) && (*p) <= 57 )
962 } else if ( (*p) > 90 ) {
963 if ( 97 <= (*p) && (*p) <= 122 )
977 if ( 48 <= (*p) && (*p) <= 57 )
979 } else if ( (*p) > 90 ) {
980 if ( 97 <= (*p) && (*p) <= 122 )
992 if ( 48 <= (*p) && (*p) <= 57 )
994 } else if ( (*p) > 90 ) {
995 if ( 97 <= (*p) && (*p) <= 122 )
1006 case 117: goto st17;
1009 if ( 48 <= (*p) && (*p) <= 57 )
1011 } else if ( (*p) > 90 ) {
1012 if ( 97 <= (*p) && (*p) <= 122 )
1023 case 111: goto st18;
1026 if ( 48 <= (*p) && (*p) <= 57 )
1028 } else if ( (*p) > 90 ) {
1029 if ( 97 <= (*p) && (*p) <= 122 )
1040 case 116: goto st19;
1043 if ( 48 <= (*p) && (*p) <= 57 )
1045 } else if ( (*p) > 90 ) {
1046 if ( 97 <= (*p) && (*p) <= 122 )
1058 if ( 48 <= (*p) && (*p) <= 57 )
1060 } else if ( (*p) > 90 ) {
1061 if ( 97 <= (*p) && (*p) <= 122 )
1097 #line 454 "wikitext_ragel.rl"
1104 #line 1105 "wikitext_ragel.c"
1106 case 43: goto st110;
1107 case 45: goto tr133;
1108 case 47: goto st110;
1109 case 64: goto tr165;
1110 case 92: goto st110;
1111 case 94: goto st110;
1112 case 95: goto tr133;
1113 case 126: goto st110;
1116 if ( 36 <= (*p) && (*p) <= 37 )
1118 } else if ( (*p) > 57 ) {
1120 if ( 97 <= (*p) && (*p) <= 122 )
1122 } else if ( (*p) >= 65 )
1136 if ( 45 <= (*p) && (*p) <= 46 )
1138 } else if ( (*p) > 57 ) {
1140 if ( 97 <= (*p) && (*p) <= 122 )
1142 } else if ( (*p) >= 65 )
1152 if ( 48 <= (*p) && (*p) <= 57 )
1154 } else if ( (*p) > 90 ) {
1155 if ( 97 <= (*p) && (*p) <= 122 )
1167 if ( 48 <= (*p) && (*p) <= 57 )
1169 } else if ( (*p) > 90 ) {
1170 if ( 97 <= (*p) && (*p) <= 122 )
1180 if ( 48 <= (*p) && (*p) <= 57 )
1182 } else if ( (*p) > 90 ) {
1183 if ( 97 <= (*p) && (*p) <= 122 )
1195 if ( 48 <= (*p) && (*p) <= 57 )
1197 } else if ( (*p) > 90 ) {
1198 if ( 97 <= (*p) && (*p) <= 122 )
1206 #line 303 "wikitext_ragel.rl"
1213 #line 1214 "wikitext_ragel.c"
1217 if ( 48 <= (*p) && (*p) <= 57 )
1219 } else if ( (*p) > 90 ) {
1220 if ( 97 <= (*p) && (*p) <= 122 )
1228 #line 303 "wikitext_ragel.rl"
1235 #line 1236 "wikitext_ragel.c"
1239 if ( 48 <= (*p) && (*p) <= 57 )
1241 } else if ( (*p) > 90 ) {
1242 if ( 97 <= (*p) && (*p) <= 122 )
1250 #line 303 "wikitext_ragel.rl"
1257 #line 1258 "wikitext_ragel.c"
1261 if ( 48 <= (*p) && (*p) <= 57 )
1263 } else if ( (*p) > 90 ) {
1264 if ( 97 <= (*p) && (*p) <= 122 )
1272 #line 303 "wikitext_ragel.rl"
1279 #line 1280 "wikitext_ragel.c"
1283 if ( 48 <= (*p) && (*p) <= 57 )
1285 } else if ( (*p) > 90 ) {
1286 if ( 97 <= (*p) && (*p) <= 122 )
1294 #line 454 "wikitext_ragel.rl"
1301 #line 1302 "wikitext_ragel.c"
1303 case 43: goto st110;
1304 case 45: goto st110;
1305 case 47: goto st110;
1306 case 64: goto st110;
1307 case 92: goto st110;
1308 case 126: goto st110;
1312 if ( 48 <= (*p) && (*p) <= 57 )
1314 } else if ( (*p) >= 36 )
1316 } else if ( (*p) > 90 ) {
1318 if ( 97 <= (*p) && (*p) <= 122 )
1320 } else if ( (*p) >= 94 )
1328 #line 436 "wikitext_ragel.rl"
1335 #line 1336 "wikitext_ragel.c"
1337 case 33: goto st109;
1338 case 44: goto st109;
1340 case 46: goto tr134;
1341 case 63: goto st109;
1347 if ( 48 <= (*p) && (*p) <= 57 )
1349 } else if ( (*p) >= 40 )
1351 } else if ( (*p) > 59 ) {
1353 if ( 97 <= (*p) && (*p) <= 122 )
1355 } else if ( (*p) >= 65 )
1365 case 43: goto st110;
1366 case 45: goto st124;
1367 case 47: goto st110;
1368 case 64: goto st110;
1369 case 92: goto st110;
1370 case 94: goto st110;
1371 case 95: goto st124;
1372 case 126: goto st110;
1375 if ( 36 <= (*p) && (*p) <= 37 )
1377 } else if ( (*p) > 57 ) {
1379 if ( 97 <= (*p) && (*p) <= 122 )
1381 } else if ( (*p) >= 65 )
1391 case 43: goto st110;
1392 case 45: goto st124;
1393 case 47: goto st123;
1394 case 64: goto st110;
1395 case 92: goto st110;
1396 case 94: goto st110;
1397 case 95: goto st124;
1398 case 126: goto st110;
1401 if ( 36 <= (*p) && (*p) <= 37 )
1403 } else if ( (*p) > 57 ) {
1405 if ( 97 <= (*p) && (*p) <= 122 )
1407 } else if ( (*p) >= 65 )
1417 case 47: goto st126;
1418 case 95: goto st125;
1421 if ( 45 <= (*p) && (*p) <= 57 )
1423 } else if ( (*p) > 90 ) {
1424 if ( 97 <= (*p) && (*p) <= 122 )
1436 if ( 45 <= (*p) && (*p) <= 46 )
1438 } else if ( (*p) > 57 ) {
1440 if ( 97 <= (*p) && (*p) <= 122 )
1442 } else if ( (*p) >= 65 )
1450 #line 442 "wikitext_ragel.rl"
1457 #line 1458 "wikitext_ragel.c"
1463 if ( 45 <= (*p) && (*p) <= 46 )
1465 } else if ( (*p) > 57 ) {
1467 if ( 97 <= (*p) && (*p) <= 122 )
1469 } else if ( (*p) >= 65 )
1482 #line 1483 "wikitext_ragel.c"
1492 case 101: goto st65;
1493 case 110: goto st67;
1494 case 112: goto st84;
1495 case 115: goto st76;
1496 case 116: goto st82;
1511 case 101: goto st36;
1512 case 110: goto st38;
1513 case 112: goto st44;
1514 case 115: goto st47;
1515 case 116: goto st53;
1524 case 108: goto st27;
1533 case 111: goto st28;
1551 case 107: goto st30;
1560 case 113: goto st31;
1569 case 117: goto st32;
1578 case 111: goto st33;
1587 case 116: goto st34;
1596 case 101: goto st35;
1612 case 109: goto st37;
1628 case 111: goto st39;
1637 case 119: goto st40;
1646 case 105: goto st41;
1655 case 107: goto st42;
1664 case 105: goto st43;
1680 case 114: goto st45;
1689 case 101: goto st46;
1705 case 116: goto st48;
1714 case 114: goto st49;
1723 case 111: goto st50;
1732 case 110: goto st51;
1741 case 103: goto st52;
1757 case 116: goto st54;
1773 case 108: goto st56;
1782 case 111: goto st57;
1800 case 107: goto st59;
1809 case 113: goto st60;
1818 case 117: goto st61;
1827 case 111: goto st62;
1836 case 116: goto st63;
1845 case 101: goto st64;
1861 case 109: goto st66;
1877 case 111: goto st68;
1886 case 119: goto st69;
1895 case 105: goto st70;
1904 case 107: goto st71;
1913 case 105: goto st72;
1929 case 114: goto st74;
1938 case 101: goto st75;
1954 case 116: goto st77;
1963 case 114: goto st78;
1972 case 111: goto st79;
1981 case 110: goto st80;
1990 case 103: goto st81;
2006 case 116: goto st83;
2022 case 114: goto st85;
2031 case 101: goto st86;
2090 if ( 97 <= (*p) && (*p) <= 122 )
2092 } else if ( (*p) >= 65 )
2102 if ( 97 <= (*p) && (*p) <= 122 )
2104 } else if ( (*p) >= 65 )
2115 #line 45 "wikitext_ragel.rl"
2124 #line 2125 "wikitext_ragel.c"
2126 case 32: goto st130;
2127 case 61: goto tr138;
2138 #line 45 "wikitext_ragel.rl"
2147 #line 2148 "wikitext_ragel.c"
2154 #line 442 "wikitext_ragel.rl"
2161 #line 2162 "wikitext_ragel.c"
2164 case 84: goto tr188;
2166 case 116: goto tr188;
2169 if ( 45 <= (*p) && (*p) <= 46 )
2171 } else if ( (*p) > 57 ) {
2173 if ( 97 <= (*p) && (*p) <= 122 )
2175 } else if ( (*p) >= 65 )
2183 #line 442 "wikitext_ragel.rl"
2190 #line 2191 "wikitext_ragel.c"
2193 case 80: goto tr189;
2195 case 112: goto tr189;
2198 if ( 45 <= (*p) && (*p) <= 46 )
2200 } else if ( (*p) > 57 ) {
2202 if ( 97 <= (*p) && (*p) <= 122 )
2204 } else if ( (*p) >= 65 )
2212 #line 442 "wikitext_ragel.rl"
2219 #line 2220 "wikitext_ragel.c"
2226 if ( 45 <= (*p) && (*p) <= 46 )
2228 } else if ( (*p) > 57 ) {
2230 if ( 97 <= (*p) && (*p) <= 122 )
2232 } else if ( (*p) >= 65 )
2256 case 45: goto tr110;
2257 case 61: goto tr110;
2258 case 95: goto tr110;
2259 case 126: goto tr110;
2263 if ( 42 <= (*p) && (*p) <= 43 )
2265 } else if ( (*p) >= 35 )
2267 } else if ( (*p) > 57 ) {
2269 if ( 97 <= (*p) && (*p) <= 122 )
2271 } else if ( (*p) >= 64 )
2284 #line 2285 "wikitext_ragel.c"
2290 case 61: goto tr110;
2292 case 95: goto tr110;
2293 case 126: goto tr110;
2296 if ( 35 <= (*p) && (*p) <= 57 )
2298 } else if ( (*p) > 59 ) {
2300 if ( 97 <= (*p) && (*p) <= 122 )
2302 } else if ( (*p) >= 64 )
2316 case 61: goto tr110;
2318 case 95: goto tr110;
2319 case 126: goto tr110;
2322 if ( 35 <= (*p) && (*p) <= 57 )
2324 } else if ( (*p) > 59 ) {
2326 if ( 97 <= (*p) && (*p) <= 122 )
2328 } else if ( (*p) >= 64 )
2336 #line 442 "wikitext_ragel.rl"
2343 #line 2344 "wikitext_ragel.c"
2346 case 84: goto tr192;
2348 case 116: goto tr192;
2351 if ( 45 <= (*p) && (*p) <= 46 )
2353 } else if ( (*p) > 57 ) {
2355 if ( 97 <= (*p) && (*p) <= 122 )
2357 } else if ( (*p) >= 65 )
2365 #line 442 "wikitext_ragel.rl"
2372 #line 2373 "wikitext_ragel.c"
2375 case 84: goto tr193;
2377 case 116: goto tr193;
2380 if ( 45 <= (*p) && (*p) <= 46 )
2382 } else if ( (*p) > 57 ) {
2384 if ( 97 <= (*p) && (*p) <= 122 )
2386 } else if ( (*p) >= 65 )
2394 #line 442 "wikitext_ragel.rl"
2401 #line 2402 "wikitext_ragel.c"
2404 case 80: goto tr194;
2406 case 112: goto tr194;
2409 if ( 45 <= (*p) && (*p) <= 46 )
2411 } else if ( (*p) > 57 ) {
2413 if ( 97 <= (*p) && (*p) <= 122 )
2415 } else if ( (*p) >= 65 )
2423 #line 442 "wikitext_ragel.rl"
2430 #line 2431 "wikitext_ragel.c"
2434 case 83: goto tr189;
2436 case 115: goto tr189;
2439 if ( 45 <= (*p) && (*p) <= 46 )
2441 } else if ( (*p) > 57 ) {
2443 if ( 97 <= (*p) && (*p) <= 122 )
2445 } else if ( (*p) >= 65 )
2453 #line 442 "wikitext_ragel.rl"
2460 #line 2461 "wikitext_ragel.c"
2463 case 65: goto tr195;
2465 case 97: goto tr195;
2468 if ( 45 <= (*p) && (*p) <= 46 )
2470 } else if ( (*p) > 57 ) {
2472 if ( 98 <= (*p) && (*p) <= 122 )
2474 } else if ( (*p) >= 66 )
2482 #line 442 "wikitext_ragel.rl"
2489 #line 2490 "wikitext_ragel.c"
2492 case 73: goto tr196;
2494 case 105: goto tr196;
2497 if ( 45 <= (*p) && (*p) <= 46 )
2499 } else if ( (*p) > 57 ) {
2501 if ( 97 <= (*p) && (*p) <= 122 )
2503 } else if ( (*p) >= 65 )
2511 #line 442 "wikitext_ragel.rl"
2518 #line 2519 "wikitext_ragel.c"
2521 case 76: goto tr197;
2523 case 108: goto tr197;
2526 if ( 45 <= (*p) && (*p) <= 46 )
2528 } else if ( (*p) > 57 ) {
2530 if ( 97 <= (*p) && (*p) <= 122 )
2532 } else if ( (*p) >= 65 )
2540 #line 442 "wikitext_ragel.rl"
2547 #line 2548 "wikitext_ragel.c"
2550 case 84: goto tr198;
2552 case 116: goto tr198;
2555 if ( 45 <= (*p) && (*p) <= 46 )
2557 } else if ( (*p) > 57 ) {
2559 if ( 97 <= (*p) && (*p) <= 122 )
2561 } else if ( (*p) >= 65 )
2569 #line 442 "wikitext_ragel.rl"
2576 #line 2577 "wikitext_ragel.c"
2579 case 79: goto tr199;
2581 case 111: goto tr199;
2584 if ( 45 <= (*p) && (*p) <= 46 )
2586 } else if ( (*p) > 57 ) {
2588 if ( 97 <= (*p) && (*p) <= 122 )
2590 } else if ( (*p) >= 65 )
2598 #line 442 "wikitext_ragel.rl"
2605 #line 2606 "wikitext_ragel.c"
2607 case 58: goto st100;
2612 if ( 45 <= (*p) && (*p) <= 46 )
2614 } else if ( (*p) > 57 ) {
2616 if ( 97 <= (*p) && (*p) <= 122 )
2618 } else if ( (*p) >= 65 )
2630 if ( 45 <= (*p) && (*p) <= 46 )
2632 } else if ( (*p) > 57 ) {
2634 if ( 97 <= (*p) && (*p) <= 122 )
2636 } else if ( (*p) >= 65 )
2646 case 64: goto st102;
2647 case 95: goto st101;
2650 if ( 45 <= (*p) && (*p) <= 46 )
2652 } else if ( (*p) > 57 ) {
2654 if ( 97 <= (*p) && (*p) <= 122 )
2656 } else if ( (*p) >= 65 )
2666 if ( 48 <= (*p) && (*p) <= 57 )
2668 } else if ( (*p) > 90 ) {
2669 if ( 97 <= (*p) && (*p) <= 122 )
2681 if ( 48 <= (*p) && (*p) <= 57 )
2683 } else if ( (*p) > 90 ) {
2684 if ( 97 <= (*p) && (*p) <= 122 )
2694 if ( 48 <= (*p) && (*p) <= 57 )
2696 } else if ( (*p) > 90 ) {
2697 if ( 97 <= (*p) && (*p) <= 122 )
2709 if ( 48 <= (*p) && (*p) <= 57 )
2711 } else if ( (*p) > 90 ) {
2712 if ( 97 <= (*p) && (*p) <= 122 )
2720 #line 297 "wikitext_ragel.rl"
2727 #line 2728 "wikitext_ragel.c"
2731 if ( 48 <= (*p) && (*p) <= 57 )
2733 } else if ( (*p) > 90 ) {
2734 if ( 97 <= (*p) && (*p) <= 122 )
2742 #line 297 "wikitext_ragel.rl"
2749 #line 2750 "wikitext_ragel.c"
2753 if ( 48 <= (*p) && (*p) <= 57 )
2755 } else if ( (*p) > 90 ) {
2756 if ( 97 <= (*p) && (*p) <= 122 )
2764 #line 297 "wikitext_ragel.rl"
2771 #line 2772 "wikitext_ragel.c"
2775 if ( 48 <= (*p) && (*p) <= 57 )
2777 } else if ( (*p) > 90 ) {
2778 if ( 97 <= (*p) && (*p) <= 122 )
2786 #line 297 "wikitext_ragel.rl"
2793 #line 2794 "wikitext_ragel.c"
2797 if ( 48 <= (*p) && (*p) <= 57 )
2799 } else if ( (*p) > 90 ) {
2800 if ( 97 <= (*p) && (*p) <= 122 )
2808 #line 442 "wikitext_ragel.rl"
2815 #line 2816 "wikitext_ragel.c"
2818 case 86: goto tr204;
2820 case 118: goto tr204;
2823 if ( 45 <= (*p) && (*p) <= 46 )
2825 } else if ( (*p) > 57 ) {
2827 if ( 97 <= (*p) && (*p) <= 122 )
2829 } else if ( (*p) >= 65 )
2837 #line 442 "wikitext_ragel.rl"
2844 #line 2845 "wikitext_ragel.c"
2847 case 78: goto tr189;
2849 case 110: goto tr189;
2852 if ( 45 <= (*p) && (*p) <= 46 )
2854 } else if ( (*p) > 57 ) {
2856 if ( 97 <= (*p) && (*p) <= 122 )
2858 } else if ( (*p) >= 65 )
2892 _test_eof106: cs = 106; goto _test_eof;
2893 _test_eof1: cs = 1; goto _test_eof;
2894 _test_eof2: cs = 2; goto _test_eof;
2895 _test_eof3: cs = 3; goto _test_eof;
2896 _test_eof4: cs = 4; goto _test_eof;
2897 _test_eof5: cs = 5; goto _test_eof;
2898 _test_eof6: cs = 6; goto _test_eof;
2899 _test_eof107: cs = 107; goto _test_eof;
2900 _test_eof108: cs = 108; goto _test_eof;
2901 _test_eof109: cs = 109; goto _test_eof;
2902 _test_eof110: cs = 110; goto _test_eof;
2903 _test_eof111: cs = 111; goto _test_eof;
2904 _test_eof7: cs = 7; goto _test_eof;
2905 _test_eof8: cs = 8; goto _test_eof;
2906 _test_eof9: cs = 9; goto _test_eof;
2907 _test_eof10: cs = 10; goto _test_eof;
2908 _test_eof11: cs = 11; goto _test_eof;
2909 _test_eof12: cs = 12; goto _test_eof;
2910 _test_eof13: cs = 13; goto _test_eof;
2911 _test_eof14: cs = 14; goto _test_eof;
2912 _test_eof15: cs = 15; goto _test_eof;
2913 _test_eof16: cs = 16; goto _test_eof;
2914 _test_eof17: cs = 17; goto _test_eof;
2915 _test_eof18: cs = 18; goto _test_eof;
2916 _test_eof19: cs = 19; goto _test_eof;
2917 _test_eof112: cs = 112; goto _test_eof;
2918 _test_eof113: cs = 113; goto _test_eof;
2919 _test_eof114: cs = 114; goto _test_eof;
2920 _test_eof115: cs = 115; goto _test_eof;
2921 _test_eof116: cs = 116; goto _test_eof;
2922 _test_eof20: cs = 20; goto _test_eof;
2923 _test_eof21: cs = 21; goto _test_eof;
2924 _test_eof22: cs = 22; goto _test_eof;
2925 _test_eof23: cs = 23; goto _test_eof;
2926 _test_eof24: cs = 24; goto _test_eof;
2927 _test_eof117: cs = 117; goto _test_eof;
2928 _test_eof118: cs = 118; goto _test_eof;
2929 _test_eof119: cs = 119; goto _test_eof;
2930 _test_eof120: cs = 120; goto _test_eof;
2931 _test_eof121: cs = 121; goto _test_eof;
2932 _test_eof122: cs = 122; goto _test_eof;
2933 _test_eof123: cs = 123; goto _test_eof;
2934 _test_eof124: cs = 124; goto _test_eof;
2935 _test_eof125: cs = 125; goto _test_eof;
2936 _test_eof126: cs = 126; goto _test_eof;
2937 _test_eof127: cs = 127; goto _test_eof;
2938 _test_eof128: cs = 128; goto _test_eof;
2939 _test_eof25: cs = 25; goto _test_eof;
2940 _test_eof26: cs = 26; goto _test_eof;
2941 _test_eof27: cs = 27; goto _test_eof;
2942 _test_eof28: cs = 28; goto _test_eof;
2943 _test_eof29: cs = 29; goto _test_eof;
2944 _test_eof30: cs = 30; goto _test_eof;
2945 _test_eof31: cs = 31; goto _test_eof;
2946 _test_eof32: cs = 32; goto _test_eof;
2947 _test_eof33: cs = 33; goto _test_eof;
2948 _test_eof34: cs = 34; goto _test_eof;
2949 _test_eof35: cs = 35; goto _test_eof;
2950 _test_eof36: cs = 36; goto _test_eof;
2951 _test_eof37: cs = 37; goto _test_eof;
2952 _test_eof38: cs = 38; goto _test_eof;
2953 _test_eof39: cs = 39; goto _test_eof;
2954 _test_eof40: cs = 40; goto _test_eof;
2955 _test_eof41: cs = 41; goto _test_eof;
2956 _test_eof42: cs = 42; goto _test_eof;
2957 _test_eof43: cs = 43; goto _test_eof;
2958 _test_eof44: cs = 44; goto _test_eof;
2959 _test_eof45: cs = 45; goto _test_eof;
2960 _test_eof46: cs = 46; goto _test_eof;
2961 _test_eof47: cs = 47; goto _test_eof;
2962 _test_eof48: cs = 48; goto _test_eof;
2963 _test_eof49: cs = 49; goto _test_eof;
2964 _test_eof50: cs = 50; goto _test_eof;
2965 _test_eof51: cs = 51; goto _test_eof;
2966 _test_eof52: cs = 52; goto _test_eof;
2967 _test_eof53: cs = 53; goto _test_eof;
2968 _test_eof54: cs = 54; goto _test_eof;
2969 _test_eof55: cs = 55; goto _test_eof;
2970 _test_eof56: cs = 56; goto _test_eof;
2971 _test_eof57: cs = 57; goto _test_eof;
2972 _test_eof58: cs = 58; goto _test_eof;
2973 _test_eof59: cs = 59; goto _test_eof;
2974 _test_eof60: cs = 60; goto _test_eof;
2975 _test_eof61: cs = 61; goto _test_eof;
2976 _test_eof62: cs = 62; goto _test_eof;
2977 _test_eof63: cs = 63; goto _test_eof;
2978 _test_eof64: cs = 64; goto _test_eof;
2979 _test_eof65: cs = 65; goto _test_eof;
2980 _test_eof66: cs = 66; goto _test_eof;
2981 _test_eof67: cs = 67; goto _test_eof;
2982 _test_eof68: cs = 68; goto _test_eof;
2983 _test_eof69: cs = 69; goto _test_eof;
2984 _test_eof70: cs = 70; goto _test_eof;
2985 _test_eof71: cs = 71; goto _test_eof;
2986 _test_eof72: cs = 72; goto _test_eof;
2987 _test_eof73: cs = 73; goto _test_eof;
2988 _test_eof74: cs = 74; goto _test_eof;
2989 _test_eof75: cs = 75; goto _test_eof;
2990 _test_eof76: cs = 76; goto _test_eof;
2991 _test_eof77: cs = 77; goto _test_eof;
2992 _test_eof78: cs = 78; goto _test_eof;
2993 _test_eof79: cs = 79; goto _test_eof;
2994 _test_eof80: cs = 80; goto _test_eof;
2995 _test_eof81: cs = 81; goto _test_eof;
2996 _test_eof82: cs = 82; goto _test_eof;
2997 _test_eof83: cs = 83; goto _test_eof;
2998 _test_eof84: cs = 84; goto _test_eof;
2999 _test_eof85: cs = 85; goto _test_eof;
3000 _test_eof86: cs = 86; goto _test_eof;
3001 _test_eof87: cs = 87; goto _test_eof;
3002 _test_eof88: cs = 88; goto _test_eof;
3003 _test_eof89: cs = 89; goto _test_eof;
3004 _test_eof90: cs = 90; goto _test_eof;
3005 _test_eof91: cs = 91; goto _test_eof;
3006 _test_eof92: cs = 92; goto _test_eof;
3007 _test_eof93: cs = 93; goto _test_eof;
3008 _test_eof94: cs = 94; goto _test_eof;
3009 _test_eof95: cs = 95; goto _test_eof;
3010 _test_eof129: cs = 129; goto _test_eof;
3011 _test_eof130: cs = 130; goto _test_eof;
3012 _test_eof131: cs = 131; goto _test_eof;
3013 _test_eof132: cs = 132; goto _test_eof;
3014 _test_eof133: cs = 133; goto _test_eof;
3015 _test_eof134: cs = 134; goto _test_eof;
3016 _test_eof96: cs = 96; goto _test_eof;
3017 _test_eof97: cs = 97; goto _test_eof;
3018 _test_eof98: cs = 98; goto _test_eof;
3019 _test_eof135: cs = 135; goto _test_eof;
3020 _test_eof99: cs = 99; goto _test_eof;
3021 _test_eof136: cs = 136; goto _test_eof;
3022 _test_eof137: cs = 137; goto _test_eof;
3023 _test_eof138: cs = 138; goto _test_eof;
3024 _test_eof139: cs = 139; goto _test_eof;
3025 _test_eof140: cs = 140; goto _test_eof;
3026 _test_eof141: cs = 141; goto _test_eof;
3027 _test_eof142: cs = 142; goto _test_eof;
3028 _test_eof143: cs = 143; goto _test_eof;
3029 _test_eof144: cs = 144; goto _test_eof;
3030 _test_eof145: cs = 145; goto _test_eof;
3031 _test_eof100: cs = 100; goto _test_eof;
3032 _test_eof101: cs = 101; goto _test_eof;
3033 _test_eof102: cs = 102; goto _test_eof;
3034 _test_eof103: cs = 103; goto _test_eof;
3035 _test_eof104: cs = 104; goto _test_eof;
3036 _test_eof105: cs = 105; goto _test_eof;
3037 _test_eof146: cs = 146; goto _test_eof;
3038 _test_eof147: cs = 147; goto _test_eof;
3039 _test_eof148: cs = 148; goto _test_eof;
3040 _test_eof149: cs = 149; goto _test_eof;
3041 _test_eof150: cs = 150; goto _test_eof;
3042 _test_eof151: cs = 151; goto _test_eof;
3043 _test_eof152: cs = 152; goto _test_eof;
3044 _test_eof153: cs = 153; goto _test_eof;
3045 _test_eof154: cs = 154; goto _test_eof;
3046 _test_eof155: cs = 155; goto _test_eof;
3052 case 107: goto tr150;
3053 case 108: goto tr152;
3054 case 109: goto tr154;
3055 case 110: goto tr155;
3056 case 111: goto tr156;
3070 case 112: goto tr160;
3071 case 113: goto tr160;
3072 case 114: goto tr160;
3073 case 115: goto tr160;
3074 case 116: goto tr155;
3080 case 117: goto tr166;
3081 case 118: goto tr166;
3082 case 119: goto tr166;
3083 case 120: goto tr166;
3084 case 121: goto tr155;
3085 case 122: goto tr154;
3086 case 123: goto tr170;
3087 case 124: goto tr170;
3088 case 125: goto tr170;
3089 case 126: goto tr170;
3090 case 127: goto tr174;
3091 case 128: goto tr175;
3163 case 129: goto tr184;
3164 case 130: goto tr184;
3165 case 131: goto tr186;
3166 case 132: goto tr174;
3167 case 133: goto tr174;
3168 case 134: goto tr174;
3169 case 96: goto tr107;
3170 case 97: goto tr107;
3171 case 98: goto tr107;
3172 case 135: goto tr191;
3173 case 99: goto tr111;
3174 case 136: goto tr174;
3175 case 137: goto tr174;
3176 case 138: goto tr174;
3177 case 139: goto tr174;
3178 case 140: goto tr174;
3179 case 141: goto tr174;
3180 case 142: goto tr174;
3181 case 143: goto tr174;
3182 case 144: goto tr174;
3183 case 145: goto tr174;
3184 case 100: goto tr107;
3185 case 101: goto tr107;
3186 case 102: goto tr107;
3187 case 103: goto tr23;
3188 case 104: goto tr23;
3189 case 105: goto tr23;
3190 case 146: goto tr191;
3191 case 147: goto tr191;
3192 case 148: goto tr191;
3193 case 149: goto tr191;
3194 case 150: goto tr174;
3195 case 151: goto tr174;
3196 case 152: goto tr205;
3197 case 153: goto tr207;
3198 case 154: goto tr209;
3199 case 155: goto tr211;
3206 #line 526 "wikitext_ragel.rl"
3207 if (cs == wikitext_error)
3208 rb_raise(eWikitextParserError, "failed before finding a token");
3209 else if (out->type == NO_TOKEN)
3210 rb_raise(eWikitextParserError, "failed to produce a token");