breakout_parser 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/breakout_parser/lex.yy.c +204 -202
- data/ext/breakout_parser/parser.l +1 -1
- data/spec/parser_spec.rb +12 -0
- metadata +2 -2
@@ -426,17 +426,17 @@ static yyconst flex_int32_t yy_ec[256] =
|
|
426
426
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
427
427
|
1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
|
428
428
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
429
|
-
1, 5,
|
430
|
-
|
431
|
-
|
432
|
-
1, 20,
|
429
|
+
1, 5, 6, 7, 8, 1, 1, 1, 9, 10,
|
430
|
+
10, 11, 1, 12, 13, 14, 15, 16, 17, 17,
|
431
|
+
17, 17, 17, 16, 16, 16, 16, 18, 6, 19,
|
432
|
+
1, 20, 6, 1, 21, 21, 21, 21, 21, 21,
|
433
433
|
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
434
434
|
21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
|
435
435
|
22, 1, 23, 1, 24, 1, 25, 26, 27, 28,
|
436
436
|
|
437
437
|
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
|
438
438
|
39, 40, 34, 41, 42, 43, 44, 45, 46, 34,
|
439
|
-
34, 34,
|
439
|
+
34, 34, 7, 47, 7, 1, 1, 1, 1, 1,
|
440
440
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
441
441
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
442
442
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
@@ -455,8 +455,8 @@ static yyconst flex_int32_t yy_ec[256] =
|
|
455
455
|
|
456
456
|
static yyconst flex_int32_t yy_meta[49] =
|
457
457
|
{ 0,
|
458
|
-
1, 2, 3, 3, 4, 5, 6,
|
459
|
-
9, 10, 11, 1, 12, 12,
|
458
|
+
1, 2, 3, 3, 4, 5, 6, 7, 1, 8,
|
459
|
+
9, 5, 10, 11, 1, 12, 12, 5, 6, 6,
|
460
460
|
13, 14, 15, 16, 17, 17, 17, 17, 17, 17,
|
461
461
|
13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
|
462
462
|
13, 13, 13, 13, 13, 13, 1, 1
|
@@ -464,37 +464,37 @@ static yyconst flex_int32_t yy_meta[49] =
|
|
464
464
|
|
465
465
|
static yyconst flex_int16_t yy_base[283] =
|
466
466
|
{ 0,
|
467
|
-
0, 47,
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
527,
|
480
|
-
|
481
|
-
539,
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
0,
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
467
|
+
0, 47, 57, 61, 65, 70, 83, 88, 92, 93,
|
468
|
+
76, 118, 693, 1028, 130, 135, 141, 34, 0, 56,
|
469
|
+
670, 648, 1028, 188, 94, 678, 0, 39, 1028, 153,
|
470
|
+
666, 1028, 1028, 157, 661, 1028, 1028, 161, 660, 1028,
|
471
|
+
183, 165, 110, 211, 224, 235, 125, 248, 262, 266,
|
472
|
+
272, 0, 0, 1028, 276, 37, 0, 635, 630, 255,
|
473
|
+
616, 0, 653, 652, 644, 1028, 642, 1028, 627, 287,
|
474
|
+
625, 1028, 610, 300, 621, 1028, 595, 313, 565, 1028,
|
475
|
+
551, 323, 114, 1028, 0, 146, 572, 1028, 334, 179,
|
476
|
+
1028, 0, 1028, 1028, 1028, 1028, 548, 546, 0, 0,
|
477
|
+
|
478
|
+
541, 536, 153, 539, 530, 537, 529, 193, 529, 526,
|
479
|
+
527, 195, 201, 206, 536, 544, 540, 105, 194, 196,
|
480
|
+
216, 211, 195, 261, 260, 269, 307, 534, 532, 532,
|
481
|
+
539, 338, 533, 531, 0, 321, 299, 336, 308, 331,
|
482
|
+
328, 342, 333, 537, 507, 366, 494, 502, 492, 382,
|
483
|
+
371, 242, 485, 1028, 1028, 487, 344, 365, 483, 0,
|
484
|
+
477, 0, 351, 372, 419, 395, 479, 465, 1028, 467,
|
485
|
+
473, 1028, 470, 400, 447, 0, 454, 1028, 388, 1028,
|
486
|
+
386, 450, 349, 501, 374, 392, 0, 0, 473, 1028,
|
487
|
+
353, 451, 0, 456, 458, 356, 354, 334, 310, 394,
|
488
|
+
|
489
|
+
480, 314, 294, 298, 0, 457, 464, 238, 1028, 290,
|
490
|
+
285, 259, 495, 221, 239, 1028, 201, 187, 0, 473,
|
491
|
+
532, 1028, 181, 1028, 161, 290, 1028, 152, 383, 150,
|
492
|
+
0, 130, 118, 485, 534, 461, 1028, 101, 99, 94,
|
493
|
+
85, 0, 83, 0, 1028, 1028, 1028, 54, 1028, 34,
|
494
|
+
1028, 581, 598, 615, 621, 638, 655, 672, 689, 705,
|
495
|
+
711, 728, 739, 502, 756, 773, 790, 807, 824, 832,
|
496
|
+
849, 866, 883, 891, 908, 925, 942, 959, 541, 976,
|
497
|
+
993, 1010
|
498
498
|
} ;
|
499
499
|
|
500
500
|
static yyconst flex_int16_t yy_def[283] =
|
@@ -532,96 +532,97 @@ static yyconst flex_int16_t yy_def[283] =
|
|
532
532
|
251, 251
|
533
533
|
} ;
|
534
534
|
|
535
|
-
static yyconst flex_int16_t yy_nxt[
|
535
|
+
static yyconst flex_int16_t yy_nxt[1077] =
|
536
536
|
{ 0,
|
537
|
-
14, 15, 16, 17, 15, 14,
|
538
|
-
14, 14, 14, 14,
|
537
|
+
14, 15, 16, 17, 15, 14, 14, 18, 14, 14,
|
538
|
+
14, 14, 14, 14, 14, 19, 19, 14, 20, 14,
|
539
539
|
19, 21, 14, 14, 19, 19, 19, 19, 19, 19,
|
540
540
|
19, 22, 19, 19, 19, 19, 19, 19, 19, 19,
|
541
|
-
19, 19, 19, 19, 19, 19, 14, 23, 24,
|
542
|
-
|
543
|
-
30,
|
544
|
-
27,
|
545
|
-
|
546
|
-
38, 38, 38,
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
184, 184, 184, 184, 184, 184, 184,
|
584
|
-
|
541
|
+
19, 19, 19, 19, 19, 19, 14, 23, 24, 56,
|
542
|
+
56, 24, 56, 56, 25, 69, 243, 26, 30, 30,
|
543
|
+
30, 30, 30, 30, 30, 30, 34, 34, 34, 34,
|
544
|
+
27, 34, 34, 34, 34, 31, 241, 45, 28, 31,
|
545
|
+
45, 61, 58, 35, 38, 38, 38, 38, 35, 38,
|
546
|
+
38, 38, 38, 41, 43, 59, 41, 43, 65, 46,
|
547
|
+
|
548
|
+
25, 39, 42, 44, 32, 249, 39, 247, 32, 56,
|
549
|
+
56, 85, 36, 246, 85, 112, 27, 36, 112, 47,
|
550
|
+
86, 245, 47, 230, 28, 25, 92, 134, 26, 92,
|
551
|
+
40, 49, 50, 51, 49, 40, 55, 55, 55, 55,
|
552
|
+
52, 48, 55, 50, 55, 55, 240, 112, 90, 28,
|
553
|
+
113, 135, 239, 53, 70, 70, 70, 70, 74, 74,
|
554
|
+
74, 74, 78, 78, 78, 78, 84, 84, 84, 84,
|
555
|
+
121, 71, 237, 84, 218, 75, 84, 54, 84, 79,
|
556
|
+
114, 122, 54, 114, 82, 50, 51, 82, 54, 62,
|
557
|
+
50, 51, 62, 83, 127, 63, 112, 127, 64, 112,
|
558
|
+
|
559
|
+
72, 233, 112, 196, 76, 113, 53, 114, 80, 227,
|
560
|
+
114, 53, 84, 84, 84, 87, 134, 134, 134, 88,
|
561
|
+
137, 141, 88, 204, 84, 89, 50, 51, 89, 136,
|
562
|
+
54, 138, 138, 134, 52, 54, 91, 91, 91, 91,
|
563
|
+
135, 135, 135, 91, 152, 152, 91, 90, 91, 91,
|
564
|
+
91, 91, 91, 221, 221, 140, 93, 135, 226, 93,
|
565
|
+
225, 93, 99, 49, 50, 51, 49, 55, 55, 55,
|
566
|
+
55, 54, 52, 55, 50, 55, 55, 55, 55, 55,
|
567
|
+
55, 224, 134, 134, 101, 53, 144, 102, 70, 70,
|
568
|
+
70, 70, 234, 234, 143, 103, 142, 104, 105, 223,
|
569
|
+
|
570
|
+
106, 74, 74, 74, 74, 71, 135, 135, 127, 54,
|
571
|
+
145, 127, 222, 54, 78, 78, 78, 78, 75, 54,
|
572
|
+
216, 134, 215, 54, 82, 50, 51, 82, 214, 158,
|
573
|
+
161, 79, 212, 83, 72, 89, 50, 51, 89, 151,
|
574
|
+
152, 152, 151, 134, 52, 135, 53, 76, 211, 157,
|
575
|
+
134, 138, 138, 134, 162, 134, 153, 90, 159, 165,
|
576
|
+
80, 176, 164, 163, 134, 166, 134, 135, 169, 169,
|
577
|
+
54, 134, 151, 134, 135, 151, 210, 135, 209, 135,
|
578
|
+
203, 54, 160, 174, 174, 174, 174, 134, 135, 153,
|
579
|
+
135, 195, 182, 177, 134, 135, 196, 135, 235, 235,
|
580
|
+
|
581
|
+
183, 174, 174, 174, 174, 200, 184, 200, 161, 198,
|
582
|
+
159, 135, 187, 170, 196, 200, 200, 134, 135, 184,
|
583
|
+
184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
|
584
|
+
184, 184, 184, 185, 184, 184, 184, 184, 184, 184,
|
585
|
+
184, 135, 184, 186, 186, 186, 186, 186, 186, 186,
|
585
586
|
186, 186, 186, 186, 186, 186, 186, 186, 186, 186,
|
586
|
-
186,
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
587
|
+
186, 186, 186, 186, 186, 184, 184, 169, 169, 169,
|
588
|
+
169, 193, 134, 204, 201, 208, 134, 201, 134, 218,
|
589
|
+
134, 201, 194, 243, 201, 191, 134, 234, 234, 190,
|
590
|
+
229, 202, 189, 188, 207, 134, 135, 205, 202, 180,
|
591
|
+
|
592
|
+
135, 220, 135, 219, 135, 178, 200, 244, 200, 134,
|
593
|
+
135, 175, 170, 139, 170, 184, 200, 200, 139, 135,
|
594
|
+
173, 172, 171, 196, 144, 184, 184, 184, 184, 184,
|
594
595
|
184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
|
595
|
-
184, 184, 184, 184,
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
29, 29, 29, 29, 29, 29,
|
601
|
-
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
|
596
|
+
184, 184, 184, 184, 184, 184, 184, 221, 221, 235,
|
597
|
+
235, 167, 236, 155, 230, 154, 241, 236, 150, 149,
|
598
|
+
148, 147, 133, 132, 131, 130, 129, 128, 126, 125,
|
599
|
+
124, 123, 120, 119, 116, 115, 67, 111, 231, 81,
|
600
|
+
242, 29, 29, 29, 29, 29, 29, 29, 29, 29,
|
601
|
+
29, 29, 29, 29, 29, 29, 29, 29, 33, 33,
|
602
602
|
|
603
|
-
33, 33, 33,
|
603
|
+
33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
|
604
|
+
33, 33, 33, 33, 33, 37, 37, 37, 37, 37,
|
604
605
|
37, 37, 37, 37, 37, 37, 37, 37, 37, 37,
|
605
|
-
57, 57,
|
606
|
-
|
607
|
-
66, 66, 66,
|
608
|
-
68, 68, 68, 68, 68, 68, 68, 68,
|
609
|
-
94, 81,
|
610
|
-
73, 94, 94, 94, 94, 94, 94,
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
251, 251, 117, 117, 118, 251, 251,
|
606
|
+
37, 37, 57, 57, 110, 77, 109, 57, 66, 73,
|
607
|
+
108, 66, 66, 66, 66, 66, 67, 66, 65, 66,
|
608
|
+
66, 66, 66, 66, 66, 68, 67, 65, 107, 68,
|
609
|
+
68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
|
610
|
+
98, 68, 94, 97, 81, 77, 94, 94, 94, 94,
|
611
|
+
73, 94, 67, 94, 94, 94, 94, 94, 94, 95,
|
612
|
+
61, 60, 251, 95, 95, 95, 95, 95, 95, 95,
|
613
|
+
|
614
|
+
95, 95, 95, 95, 251, 95, 96, 96, 96, 96,
|
615
|
+
251, 251, 96, 251, 96, 96, 96, 100, 251, 251,
|
616
|
+
100, 251, 100, 100, 251, 251, 100, 100, 117, 117,
|
617
|
+
251, 117, 117, 117, 117, 117, 117, 117, 117, 117,
|
618
|
+
117, 251, 251, 117, 117, 118, 251, 251, 118, 251,
|
618
619
|
118, 118, 251, 251, 118, 118, 146, 146, 251, 146,
|
619
620
|
146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
|
620
621
|
146, 146, 146, 156, 156, 156, 156, 156, 156, 156,
|
621
622
|
156, 156, 156, 156, 156, 156, 251, 251, 156, 156,
|
622
623
|
168, 168, 168, 168, 168, 168, 168, 168, 168, 168,
|
623
|
-
168, 168, 168, 168, 168, 168, 168, 179, 179, 179,
|
624
624
|
|
625
|
+
168, 168, 168, 168, 168, 168, 168, 179, 179, 179,
|
625
626
|
179, 179, 179, 179, 179, 179, 179, 179, 179, 179,
|
626
627
|
251, 251, 179, 179, 181, 181, 181, 181, 181, 181,
|
627
628
|
181, 181, 181, 181, 181, 181, 181, 251, 251, 181,
|
@@ -629,11 +630,11 @@ static yyconst flex_int16_t yy_nxt[1067] =
|
|
629
630
|
197, 197, 197, 197, 197, 197, 197, 197, 197, 197,
|
630
631
|
197, 197, 197, 197, 197, 197, 199, 199, 199, 199,
|
631
632
|
199, 199, 199, 199, 199, 199, 199, 199, 199, 199,
|
632
|
-
251, 199, 199, 200, 200, 251, 251, 251, 200,
|
633
|
-
251,
|
634
|
-
206, 206, 206, 206, 251, 251, 206, 206, 213, 213,
|
633
|
+
251, 199, 199, 200, 200, 251, 251, 200, 251, 200,
|
634
|
+
251, 251, 200, 200, 200, 200, 200, 200, 200, 200,
|
635
635
|
|
636
|
-
|
636
|
+
206, 206, 206, 206, 251, 251, 206, 206, 213, 213,
|
637
|
+
251, 251, 213, 251, 213, 251, 251, 213, 213, 213,
|
637
638
|
213, 213, 213, 213, 213, 217, 217, 217, 217, 217,
|
638
639
|
217, 217, 217, 217, 217, 217, 217, 217, 251, 251,
|
639
640
|
217, 217, 228, 228, 228, 228, 228, 228, 228, 228,
|
@@ -642,8 +643,8 @@ static yyconst flex_int16_t yy_nxt[1067] =
|
|
642
643
|
232, 232, 232, 232, 232, 232, 238, 238, 238, 238,
|
643
644
|
238, 238, 238, 238, 238, 238, 238, 238, 238, 251,
|
644
645
|
251, 238, 238, 248, 248, 248, 248, 248, 248, 248,
|
645
|
-
248, 248, 248, 248, 248, 248, 251, 251, 248, 248,
|
646
646
|
|
647
|
+
248, 248, 248, 248, 248, 248, 251, 251, 248, 248,
|
647
648
|
250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
|
648
649
|
250, 250, 250, 251, 251, 250, 250, 13, 251, 251,
|
649
650
|
251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
|
@@ -653,96 +654,97 @@ static yyconst flex_int16_t yy_nxt[1067] =
|
|
653
654
|
251, 251, 251, 251, 251, 251
|
654
655
|
} ;
|
655
656
|
|
656
|
-
static yyconst flex_int16_t yy_chk[
|
657
|
+
static yyconst flex_int16_t yy_chk[1077] =
|
657
658
|
{ 0,
|
658
659
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
659
660
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
660
661
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
661
662
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
662
|
-
1, 1, 1, 1, 1, 1, 1, 1, 2,
|
663
|
-
|
664
|
-
3,
|
665
|
-
2,
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
132, 132, 132,
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
663
|
+
1, 1, 1, 1, 1, 1, 1, 1, 2, 18,
|
664
|
+
18, 2, 56, 56, 2, 28, 250, 2, 3, 3,
|
665
|
+
3, 3, 4, 4, 4, 4, 5, 5, 5, 5,
|
666
|
+
2, 6, 6, 6, 6, 3, 248, 11, 2, 4,
|
667
|
+
11, 28, 20, 5, 7, 7, 7, 7, 6, 8,
|
668
|
+
8, 8, 8, 9, 10, 20, 9, 10, 25, 11,
|
669
|
+
|
670
|
+
10, 7, 9, 10, 3, 243, 8, 241, 4, 25,
|
671
|
+
25, 43, 5, 240, 43, 83, 10, 6, 83, 12,
|
672
|
+
43, 239, 12, 238, 10, 12, 47, 118, 12, 47,
|
673
|
+
7, 15, 15, 15, 15, 8, 16, 16, 16, 16,
|
674
|
+
15, 12, 17, 17, 17, 17, 233, 86, 47, 12,
|
675
|
+
86, 118, 232, 15, 30, 30, 30, 30, 34, 34,
|
676
|
+
34, 34, 38, 38, 38, 38, 42, 42, 42, 42,
|
677
|
+
103, 30, 230, 42, 228, 34, 42, 15, 42, 38,
|
678
|
+
90, 103, 16, 90, 41, 41, 41, 41, 17, 24,
|
679
|
+
24, 24, 24, 41, 108, 24, 112, 108, 24, 112,
|
680
|
+
|
681
|
+
30, 225, 113, 223, 34, 113, 41, 114, 38, 218,
|
682
|
+
114, 24, 44, 44, 44, 44, 119, 123, 120, 44,
|
683
|
+
120, 123, 44, 217, 44, 45, 45, 45, 45, 119,
|
684
|
+
41, 121, 121, 122, 45, 24, 46, 46, 46, 46,
|
685
|
+
119, 123, 120, 46, 152, 152, 46, 45, 46, 48,
|
686
|
+
48, 48, 48, 208, 208, 122, 48, 122, 215, 48,
|
687
|
+
214, 48, 60, 49, 49, 49, 49, 50, 50, 50,
|
688
|
+
50, 45, 49, 51, 51, 51, 51, 55, 55, 55,
|
689
|
+
55, 212, 125, 124, 60, 49, 126, 60, 70, 70,
|
690
|
+
70, 70, 226, 226, 125, 60, 124, 60, 60, 211,
|
691
|
+
|
692
|
+
60, 74, 74, 74, 74, 70, 125, 124, 127, 49,
|
693
|
+
126, 127, 210, 50, 78, 78, 78, 78, 74, 51,
|
694
|
+
204, 137, 203, 55, 82, 82, 82, 82, 202, 137,
|
695
|
+
139, 78, 199, 82, 70, 89, 89, 89, 89, 132,
|
696
|
+
132, 132, 132, 136, 89, 137, 82, 74, 198, 136,
|
697
|
+
141, 138, 138, 140, 139, 143, 132, 89, 138, 142,
|
698
|
+
78, 157, 141, 140, 142, 143, 157, 136, 146, 146,
|
699
|
+
82, 183, 151, 163, 141, 151, 197, 140, 196, 143,
|
700
|
+
191, 89, 138, 150, 150, 150, 150, 158, 142, 151,
|
701
|
+
157, 183, 163, 158, 164, 183, 185, 163, 229, 229,
|
702
|
+
|
703
|
+
164, 174, 174, 174, 174, 200, 186, 200, 181, 186,
|
704
|
+
179, 158, 166, 146, 186, 200, 200, 166, 164, 165,
|
703
705
|
165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
|
704
|
-
165, 165, 165, 165, 165, 165, 165, 166, 165, 165,
|
705
706
|
165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
|
707
|
+
165, 166, 165, 165, 165, 165, 165, 165, 165, 165,
|
706
708
|
165, 165, 165, 165, 165, 165, 165, 165, 165, 165,
|
707
|
-
165, 165, 165,
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
709
|
+
165, 165, 165, 165, 165, 165, 165, 168, 168, 170,
|
710
|
+
170, 177, 182, 192, 189, 195, 177, 189, 194, 206,
|
711
|
+
195, 201, 182, 236, 201, 175, 207, 234, 234, 173,
|
712
|
+
220, 189, 171, 167, 194, 220, 182, 192, 201, 161,
|
713
|
+
|
714
|
+
177, 207, 194, 206, 195, 159, 213, 236, 213, 156,
|
715
|
+
207, 153, 168, 264, 170, 184, 213, 213, 264, 220,
|
716
|
+
149, 148, 147, 184, 145, 184, 184, 184, 184, 184,
|
715
717
|
184, 184, 184, 184, 184, 184, 184, 184, 184, 184,
|
716
|
-
184, 184, 184, 184,
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
252, 252, 252, 252, 252, 252,
|
722
|
-
253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
|
718
|
+
184, 184, 184, 184, 184, 184, 184, 221, 221, 235,
|
719
|
+
235, 144, 279, 134, 221, 133, 235, 279, 131, 130,
|
720
|
+
129, 128, 117, 116, 115, 111, 110, 109, 107, 106,
|
721
|
+
105, 104, 102, 101, 98, 97, 87, 81, 221, 79,
|
722
|
+
235, 252, 252, 252, 252, 252, 252, 252, 252, 252,
|
723
|
+
252, 252, 252, 252, 252, 252, 252, 252, 253, 253,
|
723
724
|
|
724
|
-
253, 253, 253,
|
725
|
+
253, 253, 253, 253, 253, 253, 253, 253, 253, 253,
|
726
|
+
253, 253, 253, 253, 253, 254, 254, 254, 254, 254,
|
725
727
|
254, 254, 254, 254, 254, 254, 254, 254, 254, 254,
|
726
|
-
|
727
|
-
|
728
|
-
256, 256, 256, 257,
|
729
|
-
257, 257, 257, 257, 257, 257, 257, 257,
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
728
|
+
254, 254, 255, 255, 77, 75, 73, 255, 256, 71,
|
729
|
+
69, 256, 256, 256, 256, 256, 67, 256, 65, 256,
|
730
|
+
256, 256, 256, 256, 256, 257, 64, 63, 61, 257,
|
731
|
+
257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
|
732
|
+
59, 257, 258, 58, 39, 35, 258, 258, 258, 258,
|
733
|
+
31, 258, 26, 258, 258, 258, 258, 258, 258, 259,
|
734
|
+
22, 21, 13, 259, 259, 259, 259, 259, 259, 259,
|
735
|
+
|
736
|
+
259, 259, 259, 259, 0, 259, 260, 260, 260, 260,
|
737
|
+
0, 0, 260, 0, 260, 260, 260, 261, 0, 0,
|
738
|
+
261, 0, 261, 261, 0, 0, 261, 261, 262, 262,
|
739
|
+
0, 262, 262, 262, 262, 262, 262, 262, 262, 262,
|
740
|
+
262, 0, 0, 262, 262, 263, 0, 0, 263, 0,
|
739
741
|
263, 263, 0, 0, 263, 263, 265, 265, 0, 265,
|
740
742
|
265, 265, 265, 265, 265, 265, 265, 265, 265, 265,
|
741
743
|
265, 265, 265, 266, 266, 266, 266, 266, 266, 266,
|
742
744
|
266, 266, 266, 266, 266, 266, 0, 0, 266, 266,
|
743
745
|
267, 267, 267, 267, 267, 267, 267, 267, 267, 267,
|
744
|
-
267, 267, 267, 267, 267, 267, 267, 268, 268, 268,
|
745
746
|
|
747
|
+
267, 267, 267, 267, 267, 267, 267, 268, 268, 268,
|
746
748
|
268, 268, 268, 268, 268, 268, 268, 268, 268, 268,
|
747
749
|
0, 0, 268, 268, 269, 269, 269, 269, 269, 269,
|
748
750
|
269, 269, 269, 269, 269, 269, 269, 0, 0, 269,
|
@@ -750,11 +752,11 @@ static yyconst flex_int16_t yy_chk[1067] =
|
|
750
752
|
271, 271, 271, 271, 271, 271, 271, 271, 271, 271,
|
751
753
|
271, 271, 271, 271, 271, 271, 272, 272, 272, 272,
|
752
754
|
272, 272, 272, 272, 272, 272, 272, 272, 272, 272,
|
753
|
-
0, 272, 272, 273, 273, 0, 0, 0, 273,
|
754
|
-
0,
|
755
|
-
274, 274, 274, 274, 0, 0, 274, 274, 275, 275,
|
755
|
+
0, 272, 272, 273, 273, 0, 0, 273, 0, 273,
|
756
|
+
0, 0, 273, 273, 273, 273, 273, 273, 273, 273,
|
756
757
|
|
757
|
-
|
758
|
+
274, 274, 274, 274, 0, 0, 274, 274, 275, 275,
|
759
|
+
0, 0, 275, 0, 275, 0, 0, 275, 275, 275,
|
758
760
|
275, 275, 275, 275, 275, 276, 276, 276, 276, 276,
|
759
761
|
276, 276, 276, 276, 276, 276, 276, 276, 0, 0,
|
760
762
|
276, 276, 277, 277, 277, 277, 277, 277, 277, 277,
|
@@ -763,8 +765,8 @@ static yyconst flex_int16_t yy_chk[1067] =
|
|
763
765
|
278, 278, 278, 278, 278, 278, 280, 280, 280, 280,
|
764
766
|
280, 280, 280, 280, 280, 280, 280, 280, 280, 0,
|
765
767
|
0, 280, 280, 281, 281, 281, 281, 281, 281, 281,
|
766
|
-
281, 281, 281, 281, 281, 281, 0, 0, 281, 281,
|
767
768
|
|
769
|
+
281, 281, 281, 281, 281, 281, 0, 0, 281, 281,
|
768
770
|
282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
|
769
771
|
282, 282, 282, 0, 0, 282, 282, 251, 251, 251,
|
770
772
|
251, 251, 251, 251, 251, 251, 251, 251, 251, 251,
|
@@ -879,7 +881,7 @@ extern size_t in_buf_len;
|
|
879
881
|
|
880
882
|
|
881
883
|
|
882
|
-
#line
|
884
|
+
#line 885 "lex.yy.c"
|
883
885
|
|
884
886
|
#define INITIAL 0
|
885
887
|
#define _PRE_CODE 1
|
@@ -1082,7 +1084,7 @@ YY_DECL
|
|
1082
1084
|
#line 85 "parser.l"
|
1083
1085
|
|
1084
1086
|
|
1085
|
-
#line
|
1087
|
+
#line 1088 "lex.yy.c"
|
1086
1088
|
|
1087
1089
|
if ( !(yy_init) )
|
1088
1090
|
{
|
@@ -1148,7 +1150,7 @@ yy_match:
|
|
1148
1150
|
*(yy_state_ptr)++ = yy_current_state;
|
1149
1151
|
++yy_cp;
|
1150
1152
|
}
|
1151
|
-
while ( yy_base[yy_current_state] !=
|
1153
|
+
while ( yy_base[yy_current_state] != 1028 );
|
1152
1154
|
|
1153
1155
|
yy_find_action:
|
1154
1156
|
yy_current_state = *--(yy_state_ptr);
|
@@ -1511,7 +1513,7 @@ YY_RULE_SETUP
|
|
1511
1513
|
#line 177 "parser.l"
|
1512
1514
|
ECHO;
|
1513
1515
|
YY_BREAK
|
1514
|
-
#line
|
1516
|
+
#line 1517 "lex.yy.c"
|
1515
1517
|
case YY_STATE_EOF(INITIAL):
|
1516
1518
|
yyterminate();
|
1517
1519
|
|
@@ -122,7 +122,7 @@ extern size_t in_buf_len;
|
|
122
122
|
|
123
123
|
https?:\/\/[^ \r\n<>"(){}*]+[^ \r\n<>"(){}*,.\[\]] { yylval.svalue = yytext; return URL; }
|
124
124
|
|
125
|
-
#[0-9]+/[ \t\r\n,.;()] { yylval.svalue = yytext; return TICKET_LINK; }
|
125
|
+
#[0-9]+/[ \t\r\n,.;()?!:-] { yylval.svalue = yytext; return TICKET_LINK; }
|
126
126
|
\[\[ticket:[0-9]+(\|[^\[\]]+)?\]\] { yylval.svalue = yytext; return TICKET_LINK; }
|
127
127
|
|
128
128
|
\[\[revision:[0-9]+(\|[^\[\]]+)?\]\] { yylval.svalue = yytext+11; return SVN_REVISION_LINK; }
|
data/spec/parser_spec.rb
CHANGED
@@ -354,6 +354,18 @@ describe 'BreakoutParser' do
|
|
354
354
|
parse("#1234d").should == '#1234d'
|
355
355
|
parse("#xxx").should == '#xxx'
|
356
356
|
end
|
357
|
+
|
358
|
+
".,;!?:-".each_char do |c|
|
359
|
+
it "uses '#{c}' as separator" do
|
360
|
+
l = '<a href="/spaces/test_space/tickets/1234">#1234</a>'
|
361
|
+
t = "L#{c}L"
|
362
|
+
parse(t.gsub('L','#1234')).should == t.gsub('L',l)
|
363
|
+
t = "L#{c}#{c}L"
|
364
|
+
parse(t.gsub('L','#1234')).should == t.gsub('L',l)
|
365
|
+
t = "#{c}L#{c}L#{c}"
|
366
|
+
parse(t.gsub('L','#1234')).should == t.gsub('L',l)
|
367
|
+
end
|
368
|
+
end
|
357
369
|
end
|
358
370
|
|
359
371
|
###############################################################################
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breakout_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey "Zed" Zaikin
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-05 00:00:00 +05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|