breakout_parser 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/breakout_parser/lex.yy.c +478 -443
- data/ext/breakout_parser/parser.l +3 -0
- data/ext/breakout_parser/parser.tab.c +203 -180
- data/ext/breakout_parser/parser.tab.h +14 -13
- data/ext/breakout_parser/parser.y +17 -1
- data/ext/breakout_parser/ruby_ext.c +14 -1
- data/spec/parser_spec.rb +59 -2
- metadata +2 -2
@@ -178,18 +178,19 @@ void yyerror(const char *msg)
|
|
178
178
|
H3 = 276,
|
179
179
|
H4 = 277,
|
180
180
|
H5 = 278,
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
181
|
+
INLINE_CODE = 279,
|
182
|
+
SPACE = 280,
|
183
|
+
BR = 281,
|
184
|
+
OLI = 282,
|
185
|
+
ULI = 283,
|
186
|
+
PRE_CODE_START = 284,
|
187
|
+
PRE_CODE_END = 285,
|
188
|
+
PRE_START = 286,
|
189
|
+
PRE_END = 287,
|
190
|
+
CODE_START = 288,
|
191
|
+
CODE_END = 289,
|
192
|
+
BOLD_END = 290,
|
193
|
+
ITALIC_END = 291
|
193
194
|
};
|
194
195
|
#endif
|
195
196
|
|
@@ -209,7 +210,7 @@ typedef union YYSTYPE
|
|
209
210
|
|
210
211
|
|
211
212
|
/* Line 214 of yacc.c */
|
212
|
-
#line
|
213
|
+
#line 214 "parser.tab.c"
|
213
214
|
} YYSTYPE;
|
214
215
|
# define YYSTYPE_IS_TRIVIAL 1
|
215
216
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
@@ -221,7 +222,7 @@ typedef union YYSTYPE
|
|
221
222
|
|
222
223
|
|
223
224
|
/* Line 264 of yacc.c */
|
224
|
-
#line
|
225
|
+
#line 226 "parser.tab.c"
|
225
226
|
|
226
227
|
#ifdef short
|
227
228
|
# undef short
|
@@ -434,22 +435,22 @@ union yyalloc
|
|
434
435
|
#endif
|
435
436
|
|
436
437
|
/* YYFINAL -- State number of the termination state. */
|
437
|
-
#define YYFINAL
|
438
|
+
#define YYFINAL 46
|
438
439
|
/* YYLAST -- Last index in YYTABLE. */
|
439
|
-
#define YYLAST
|
440
|
+
#define YYLAST 104
|
440
441
|
|
441
442
|
/* YYNTOKENS -- Number of terminals. */
|
442
|
-
#define YYNTOKENS
|
443
|
+
#define YYNTOKENS 37
|
443
444
|
/* YYNNTS -- Number of nonterminals. */
|
444
445
|
#define YYNNTS 28
|
445
446
|
/* YYNRULES -- Number of rules. */
|
446
|
-
#define YYNRULES
|
447
|
+
#define YYNRULES 62
|
447
448
|
/* YYNRULES -- Number of states. */
|
448
|
-
#define YYNSTATES
|
449
|
+
#define YYNSTATES 74
|
449
450
|
|
450
451
|
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
|
451
452
|
#define YYUNDEFTOK 2
|
452
|
-
#define YYMAXUTOK
|
453
|
+
#define YYMAXUTOK 291
|
453
454
|
|
454
455
|
#define YYTRANSLATE(YYX) \
|
455
456
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
|
@@ -486,7 +487,7 @@ static const yytype_uint8 yytranslate[] =
|
|
486
487
|
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
487
488
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
|
488
489
|
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
|
489
|
-
35
|
490
|
+
35, 36
|
490
491
|
};
|
491
492
|
|
492
493
|
#if YYDEBUG
|
@@ -498,40 +499,41 @@ static const yytype_uint8 yyprhs[] =
|
|
498
499
|
19, 21, 22, 23, 28, 29, 30, 35, 37, 39,
|
499
500
|
42, 45, 49, 51, 54, 57, 61, 63, 66, 68,
|
500
501
|
70, 72, 74, 76, 78, 80, 82, 84, 86, 88,
|
501
|
-
90, 92, 94, 96, 98, 100,
|
502
|
-
110, 112, 114, 116, 118, 120, 122,
|
503
|
-
|
502
|
+
90, 92, 94, 96, 98, 100, 102, 103, 106, 108,
|
503
|
+
110, 112, 114, 116, 118, 120, 122, 124, 125, 130,
|
504
|
+
131, 136, 137
|
504
505
|
};
|
505
506
|
|
506
507
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
|
507
508
|
static const yytype_int8 yyrhs[] =
|
508
509
|
{
|
509
|
-
|
510
|
-
-1,
|
511
|
-
-1, -1, -1,
|
512
|
-
|
513
|
-
|
514
|
-
-1,
|
515
|
-
-1,
|
516
|
-
6, -1, 17, -1, 4, -1,
|
517
|
-
|
518
|
-
|
519
|
-
-1,
|
520
|
-
|
521
|
-
|
522
|
-
|
510
|
+
38, 0, -1, -1, 39, 38, -1, 60, -1, 48,
|
511
|
+
-1, 53, -1, 54, -1, 55, -1, 56, -1, 57,
|
512
|
+
-1, -1, -1, 40, 44, 41, 39, -1, -1, -1,
|
513
|
+
42, 46, 43, 39, -1, 61, -1, 45, -1, 44,
|
514
|
+
45, -1, 59, 48, -1, 59, 48, 26, -1, 47,
|
515
|
+
-1, 46, 47, -1, 58, 48, -1, 58, 48, 26,
|
516
|
+
-1, 49, -1, 49, 48, -1, 51, -1, 50, -1,
|
517
|
+
6, -1, 17, -1, 4, -1, 35, -1, 5, -1,
|
518
|
+
36, -1, 24, -1, 7, -1, 9, -1, 10, -1,
|
519
|
+
13, -1, 14, -1, 11, -1, 12, -1, 15, -1,
|
520
|
+
16, -1, -1, 52, 51, -1, 3, -1, 19, -1,
|
521
|
+
20, -1, 21, -1, 22, -1, 23, -1, 27, -1,
|
522
|
+
28, -1, 26, -1, -1, 29, 62, 51, 30, -1,
|
523
|
+
-1, 31, 63, 51, 32, -1, -1, 33, 64, 51,
|
524
|
+
34, -1
|
523
525
|
};
|
524
526
|
|
525
527
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
|
526
528
|
static const yytype_uint8 yyrline[] =
|
527
529
|
{
|
528
|
-
0,
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
530
|
+
0, 84, 84, 85, 88, 89, 90, 91, 92, 93,
|
531
|
+
94, 95, 95, 95, 96, 96, 96, 97, 99, 100,
|
532
|
+
102, 103, 105, 106, 108, 109, 111, 112, 114, 115,
|
533
|
+
116, 117, 118, 119, 120, 121, 122, 124, 125, 126,
|
534
|
+
127, 128, 129, 130, 131, 132, 134, 135, 137, 144,
|
535
|
+
145, 146, 147, 148, 150, 151, 152, 155, 155, 156,
|
536
|
+
156, 157, 157
|
535
537
|
};
|
536
538
|
#endif
|
537
539
|
|
@@ -544,12 +546,12 @@ static const char *const yytname[] =
|
|
544
546
|
"T_WORD", "TICKET_LINK", "LINK", "SVN_REVISION_LINK",
|
545
547
|
"GIT_REVISION_LINK", "WIKI_LINK", "ANCHOR_LINK", "URL_WITH_PROTO_LINK",
|
546
548
|
"URL_WITHOUT_PROTO_LINK", "FILE_LINK", "IMAGE_LINK", "URL", "UL", "H1",
|
547
|
-
"H2", "H3", "H4", "H5", "SPACE", "BR", "OLI", "ULI",
|
548
|
-
"PRE_CODE_END", "PRE_START", "PRE_END", "CODE_START",
|
549
|
-
"BOLD_END", "ITALIC_END", "$accept", "text", "textitem",
|
550
|
-
"$@
|
551
|
-
"link", "chars", "char", "h1", "h2", "h3", "h4", "h5",
|
552
|
-
"br", "code", "$@5", "$@6", "$@7", 0
|
549
|
+
"H2", "H3", "H4", "H5", "INLINE_CODE", "SPACE", "BR", "OLI", "ULI",
|
550
|
+
"PRE_CODE_START", "PRE_CODE_END", "PRE_START", "PRE_END", "CODE_START",
|
551
|
+
"CODE_END", "BOLD_END", "ITALIC_END", "$accept", "text", "textitem",
|
552
|
+
"$@1", "$@2", "$@3", "$@4", "ulist", "ulitem", "olist", "olitem",
|
553
|
+
"words", "word", "link", "chars", "char", "h1", "h2", "h3", "h4", "h5",
|
554
|
+
"oli", "uli", "br", "code", "$@5", "$@6", "$@7", 0
|
553
555
|
};
|
554
556
|
#endif
|
555
557
|
|
@@ -561,20 +563,20 @@ static const yytype_uint16 yytoknum[] =
|
|
561
563
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
|
562
564
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
|
563
565
|
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
|
564
|
-
285, 286, 287, 288, 289, 290
|
566
|
+
285, 286, 287, 288, 289, 290, 291
|
565
567
|
};
|
566
568
|
# endif
|
567
569
|
|
568
570
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
|
569
571
|
static const yytype_uint8 yyr1[] =
|
570
572
|
{
|
571
|
-
0,
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
54, 55, 56, 57, 58, 59,
|
577
|
-
|
573
|
+
0, 37, 38, 38, 39, 39, 39, 39, 39, 39,
|
574
|
+
39, 40, 41, 39, 42, 43, 39, 39, 44, 44,
|
575
|
+
45, 45, 46, 46, 47, 47, 48, 48, 49, 49,
|
576
|
+
49, 49, 49, 49, 49, 49, 49, 50, 50, 50,
|
577
|
+
50, 50, 50, 50, 50, 50, 51, 51, 52, 53,
|
578
|
+
54, 55, 56, 57, 58, 59, 60, 62, 61, 63,
|
579
|
+
61, 64, 61
|
578
580
|
};
|
579
581
|
|
580
582
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
|
@@ -584,9 +586,9 @@ static const yytype_uint8 yyr2[] =
|
|
584
586
|
1, 0, 0, 4, 0, 0, 4, 1, 1, 2,
|
585
587
|
2, 3, 1, 2, 2, 3, 1, 2, 1, 1,
|
586
588
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
587
|
-
1, 1, 1, 1, 1, 0, 2, 1, 1,
|
588
|
-
1, 1, 1, 1, 1, 1, 0, 4, 0,
|
589
|
-
0, 4
|
589
|
+
1, 1, 1, 1, 1, 1, 0, 2, 1, 1,
|
590
|
+
1, 1, 1, 1, 1, 1, 1, 0, 4, 0,
|
591
|
+
4, 0, 4
|
590
592
|
};
|
591
593
|
|
592
594
|
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
@@ -594,80 +596,80 @@ static const yytype_uint8 yyr2[] =
|
|
594
596
|
means the default is an error. */
|
595
597
|
static const yytype_uint8 yydefact[] =
|
596
598
|
{
|
597
|
-
2,
|
598
|
-
|
599
|
-
|
600
|
-
5, 26, 29, 28,
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
21, 16, 25
|
599
|
+
2, 48, 32, 34, 30, 37, 38, 39, 42, 43,
|
600
|
+
40, 41, 44, 45, 31, 49, 50, 51, 52, 53,
|
601
|
+
36, 56, 57, 59, 61, 33, 35, 0, 2, 0,
|
602
|
+
0, 5, 26, 29, 28, 46, 6, 7, 8, 9,
|
603
|
+
10, 4, 17, 46, 46, 46, 1, 3, 55, 12,
|
604
|
+
18, 46, 54, 15, 22, 46, 27, 47, 0, 0,
|
605
|
+
0, 11, 19, 20, 11, 23, 24, 58, 60, 62,
|
606
|
+
13, 21, 16, 25
|
605
607
|
};
|
606
608
|
|
607
609
|
/* YYDEFGOTO[NTERM-NUM]. */
|
608
610
|
static const yytype_int8 yydefgoto[] =
|
609
611
|
{
|
610
|
-
-1,
|
611
|
-
|
612
|
-
|
612
|
+
-1, 27, 28, 29, 61, 30, 64, 49, 50, 53,
|
613
|
+
54, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
614
|
+
40, 55, 51, 41, 42, 43, 44, 45
|
613
615
|
};
|
614
616
|
|
615
617
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
|
616
618
|
STATE-NUM. */
|
617
|
-
#define YYPACT_NINF -
|
619
|
+
#define YYPACT_NINF -37
|
618
620
|
static const yytype_int8 yypact[] =
|
619
621
|
{
|
620
|
-
|
621
|
-
-
|
622
|
-
-
|
623
|
-
-
|
624
|
-
-
|
625
|
-
|
626
|
-
0, -
|
627
|
-
-
|
622
|
+
34, -37, -37, -37, -37, -37, -37, -37, -37, -37,
|
623
|
+
-37, -37, -37, -37, -37, -37, -37, -37, -37, -37,
|
624
|
+
-37, -37, -37, -37, -37, -37, -37, 1, 34, -26,
|
625
|
+
-19, -37, 68, -37, -37, 15, -37, -37, -37, -37,
|
626
|
+
-37, -37, -37, 15, 15, 15, -37, -37, -37, -26,
|
627
|
+
-37, 68, -37, -19, -37, 68, -37, -37, 2, -2,
|
628
|
+
8, 0, -37, 26, 0, -37, 33, -37, -37, -37,
|
629
|
+
-37, -37, -37, -37
|
628
630
|
};
|
629
631
|
|
630
632
|
/* YYPGOTO[NTERM-NUM]. */
|
631
633
|
static const yytype_int8 yypgoto[] =
|
632
634
|
{
|
633
|
-
-
|
634
|
-
|
635
|
-
-
|
635
|
+
-37, 6, -36, -37, -37, -37, -37, -37, 17, -37,
|
636
|
+
11, 36, -37, -37, 51, -37, -37, -37, -37, -37,
|
637
|
+
-37, -37, -37, -37, -37, -37, -37, -37
|
636
638
|
};
|
637
639
|
|
638
640
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
|
639
641
|
positive, shift that token. If negative, reduce the rule which
|
640
642
|
number is the opposite. If zero, do what YYDEFACT says.
|
641
643
|
If YYTABLE_NINF, syntax error. */
|
642
|
-
#define YYTABLE_NINF -
|
644
|
+
#define YYTABLE_NINF -47
|
643
645
|
static const yytype_int8 yytable[] =
|
644
646
|
{
|
645
|
-
-
|
646
|
-
7, 8, 9, 10, 11, 12, 13, 14,
|
647
|
-
16, 17, 18, 19,
|
648
|
-
|
649
|
-
5,
|
650
|
-
14,
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
0, 0,
|
655
|
-
|
647
|
+
-46, 46, 48, 1, 2, 3, 4, 5, 52, 6,
|
648
|
+
7, 8, 9, 10, 11, 12, 13, 14, 1, 15,
|
649
|
+
16, 17, 18, 19, 20, 70, 21, -14, 72, 22,
|
650
|
+
68, 23, 67, 24, 47, 25, 26, 1, 2, 3,
|
651
|
+
4, 5, 69, 6, 7, 8, 9, 10, 11, 12,
|
652
|
+
13, 14, 71, 15, 16, 17, 18, 19, 20, 73,
|
653
|
+
21, -14, -11, 22, 65, 23, 62, 24, 56, 25,
|
654
|
+
26, 1, 2, 3, 4, 5, 0, 6, 7, 8,
|
655
|
+
9, 10, 11, 12, 13, 14, 57, 63, 0, 0,
|
656
|
+
0, 66, 20, 0, 58, 59, 60, 0, 0, 0,
|
657
|
+
0, 0, 0, 25, 26
|
656
658
|
};
|
657
659
|
|
658
660
|
static const yytype_int8 yycheck[] =
|
659
661
|
{
|
660
|
-
0, 0,
|
661
|
-
10, 11, 12, 13, 14, 15, 16, 17,
|
662
|
-
20, 21, 22, 23,
|
663
|
-
|
664
|
-
7,
|
665
|
-
17,
|
666
|
-
27, 28,
|
667
|
-
|
668
|
-
14, 15, 16, 17,
|
669
|
-
-1, -1,
|
670
|
-
|
662
|
+
0, 0, 28, 3, 4, 5, 6, 7, 27, 9,
|
663
|
+
10, 11, 12, 13, 14, 15, 16, 17, 3, 19,
|
664
|
+
20, 21, 22, 23, 24, 61, 26, 27, 64, 29,
|
665
|
+
32, 31, 30, 33, 28, 35, 36, 3, 4, 5,
|
666
|
+
6, 7, 34, 9, 10, 11, 12, 13, 14, 15,
|
667
|
+
16, 17, 26, 19, 20, 21, 22, 23, 24, 26,
|
668
|
+
26, 27, 28, 29, 53, 31, 49, 33, 32, 35,
|
669
|
+
36, 3, 4, 5, 6, 7, -1, 9, 10, 11,
|
670
|
+
12, 13, 14, 15, 16, 17, 35, 51, -1, -1,
|
671
|
+
-1, 55, 24, -1, 43, 44, 45, -1, -1, -1,
|
672
|
+
-1, -1, -1, 35, 36
|
671
673
|
};
|
672
674
|
|
673
675
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
|
@@ -676,12 +678,12 @@ static const yytype_uint8 yystos[] =
|
|
676
678
|
{
|
677
679
|
0, 3, 4, 5, 6, 7, 9, 10, 11, 12,
|
678
680
|
13, 14, 15, 16, 17, 19, 20, 21, 22, 23,
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
681
|
+
24, 26, 29, 31, 33, 35, 36, 38, 39, 40,
|
682
|
+
42, 48, 49, 50, 51, 52, 53, 54, 55, 56,
|
683
|
+
57, 60, 61, 62, 63, 64, 0, 38, 28, 44,
|
684
|
+
45, 59, 27, 46, 47, 58, 48, 51, 51, 51,
|
685
|
+
51, 41, 45, 48, 43, 47, 48, 30, 32, 34,
|
686
|
+
39, 26, 39, 26
|
685
687
|
};
|
686
688
|
|
687
689
|
#define yyerrok (yyerrstatus = 0)
|
@@ -1495,133 +1497,133 @@ yyreduce:
|
|
1495
1497
|
case 6:
|
1496
1498
|
|
1497
1499
|
/* Line 1455 of yacc.c */
|
1498
|
-
#line
|
1500
|
+
#line 90 "parser.y"
|
1499
1501
|
{concat("</h1>",5);}
|
1500
1502
|
break;
|
1501
1503
|
|
1502
1504
|
case 7:
|
1503
1505
|
|
1504
1506
|
/* Line 1455 of yacc.c */
|
1505
|
-
#line
|
1507
|
+
#line 91 "parser.y"
|
1506
1508
|
{concat("</h2>",5);}
|
1507
1509
|
break;
|
1508
1510
|
|
1509
1511
|
case 8:
|
1510
1512
|
|
1511
1513
|
/* Line 1455 of yacc.c */
|
1512
|
-
#line
|
1514
|
+
#line 92 "parser.y"
|
1513
1515
|
{concat("</h3>",5);}
|
1514
1516
|
break;
|
1515
1517
|
|
1516
1518
|
case 9:
|
1517
1519
|
|
1518
1520
|
/* Line 1455 of yacc.c */
|
1519
|
-
#line
|
1521
|
+
#line 93 "parser.y"
|
1520
1522
|
{concat("</h4>",5);}
|
1521
1523
|
break;
|
1522
1524
|
|
1523
1525
|
case 10:
|
1524
1526
|
|
1525
1527
|
/* Line 1455 of yacc.c */
|
1526
|
-
#line
|
1528
|
+
#line 94 "parser.y"
|
1527
1529
|
{concat("</h5>",5);}
|
1528
1530
|
break;
|
1529
1531
|
|
1530
1532
|
case 11:
|
1531
1533
|
|
1532
1534
|
/* Line 1455 of yacc.c */
|
1533
|
-
#line
|
1535
|
+
#line 95 "parser.y"
|
1534
1536
|
{concat("<ul>",4);}
|
1535
1537
|
break;
|
1536
1538
|
|
1537
1539
|
case 12:
|
1538
1540
|
|
1539
1541
|
/* Line 1455 of yacc.c */
|
1540
|
-
#line
|
1542
|
+
#line 95 "parser.y"
|
1541
1543
|
{concat("</ul>",5);}
|
1542
1544
|
break;
|
1543
1545
|
|
1544
1546
|
case 14:
|
1545
1547
|
|
1546
1548
|
/* Line 1455 of yacc.c */
|
1547
|
-
#line
|
1549
|
+
#line 96 "parser.y"
|
1548
1550
|
{concat("<ol>",4);}
|
1549
1551
|
break;
|
1550
1552
|
|
1551
1553
|
case 15:
|
1552
1554
|
|
1553
1555
|
/* Line 1455 of yacc.c */
|
1554
|
-
#line
|
1556
|
+
#line 96 "parser.y"
|
1555
1557
|
{concat("</ol>",5);}
|
1556
1558
|
break;
|
1557
1559
|
|
1558
1560
|
case 18:
|
1559
1561
|
|
1560
1562
|
/* Line 1455 of yacc.c */
|
1561
|
-
#line
|
1563
|
+
#line 99 "parser.y"
|
1562
1564
|
{concat("</li>",5);}
|
1563
1565
|
break;
|
1564
1566
|
|
1565
1567
|
case 19:
|
1566
1568
|
|
1567
1569
|
/* Line 1455 of yacc.c */
|
1568
|
-
#line
|
1570
|
+
#line 100 "parser.y"
|
1569
1571
|
{concat("</li>",5);}
|
1570
1572
|
break;
|
1571
1573
|
|
1572
1574
|
case 22:
|
1573
1575
|
|
1574
1576
|
/* Line 1455 of yacc.c */
|
1575
|
-
#line
|
1577
|
+
#line 105 "parser.y"
|
1576
1578
|
{concat("</li>",5);}
|
1577
1579
|
break;
|
1578
1580
|
|
1579
1581
|
case 23:
|
1580
1582
|
|
1581
1583
|
/* Line 1455 of yacc.c */
|
1582
|
-
#line
|
1584
|
+
#line 106 "parser.y"
|
1583
1585
|
{concat("</li>",5);}
|
1584
1586
|
break;
|
1585
1587
|
|
1586
1588
|
case 30:
|
1587
1589
|
|
1588
1590
|
/* Line 1455 of yacc.c */
|
1589
|
-
#line
|
1591
|
+
#line 116 "parser.y"
|
1590
1592
|
{concat2((yyvsp[(1) - (1)].svalue));}
|
1591
1593
|
break;
|
1592
1594
|
|
1593
1595
|
case 31:
|
1594
1596
|
|
1595
1597
|
/* Line 1455 of yacc.c */
|
1596
|
-
#line
|
1598
|
+
#line 117 "parser.y"
|
1597
1599
|
{process_url((yyvsp[(1) - (1)].svalue));}
|
1598
1600
|
break;
|
1599
1601
|
|
1600
1602
|
case 32:
|
1601
1603
|
|
1602
1604
|
/* Line 1455 of yacc.c */
|
1603
|
-
#line
|
1605
|
+
#line 118 "parser.y"
|
1604
1606
|
{(yyvsp[(1) - (1)].ivalue) ? concat(" <strong>",9) : concat("<strong>",8);}
|
1605
1607
|
break;
|
1606
1608
|
|
1607
1609
|
case 33:
|
1608
1610
|
|
1609
1611
|
/* Line 1455 of yacc.c */
|
1610
|
-
#line
|
1612
|
+
#line 119 "parser.y"
|
1611
1613
|
{concat("</strong>",9);}
|
1612
1614
|
break;
|
1613
1615
|
|
1614
1616
|
case 34:
|
1615
1617
|
|
1616
1618
|
/* Line 1455 of yacc.c */
|
1617
|
-
#line
|
1619
|
+
#line 120 "parser.y"
|
1618
1620
|
{(yyvsp[(1) - (1)].ivalue) ? concat(" <em>",5) : concat("<em>",4);}
|
1619
1621
|
break;
|
1620
1622
|
|
1621
1623
|
case 35:
|
1622
1624
|
|
1623
1625
|
/* Line 1455 of yacc.c */
|
1624
|
-
#line
|
1626
|
+
#line 121 "parser.y"
|
1625
1627
|
{concat("</em>",5);}
|
1626
1628
|
break;
|
1627
1629
|
|
@@ -1629,174 +1631,181 @@ yyreduce:
|
|
1629
1631
|
|
1630
1632
|
/* Line 1455 of yacc.c */
|
1631
1633
|
#line 122 "parser.y"
|
1632
|
-
{
|
1634
|
+
{process_inline_code((yyvsp[(1) - (1)].svalue));}
|
1633
1635
|
break;
|
1634
1636
|
|
1635
1637
|
case 37:
|
1636
1638
|
|
1637
1639
|
/* Line 1455 of yacc.c */
|
1638
|
-
#line
|
1639
|
-
{
|
1640
|
+
#line 124 "parser.y"
|
1641
|
+
{process_ticket_link((yyvsp[(1) - (1)].svalue));}
|
1640
1642
|
break;
|
1641
1643
|
|
1642
1644
|
case 38:
|
1643
1645
|
|
1644
1646
|
/* Line 1455 of yacc.c */
|
1645
|
-
#line
|
1646
|
-
{
|
1647
|
+
#line 125 "parser.y"
|
1648
|
+
{process_svn_link((yyvsp[(1) - (1)].svalue));}
|
1647
1649
|
break;
|
1648
1650
|
|
1649
1651
|
case 39:
|
1650
1652
|
|
1651
1653
|
/* Line 1455 of yacc.c */
|
1652
|
-
#line
|
1653
|
-
{
|
1654
|
+
#line 126 "parser.y"
|
1655
|
+
{process_git_link((yyvsp[(1) - (1)].svalue));}
|
1654
1656
|
break;
|
1655
1657
|
|
1656
1658
|
case 40:
|
1657
1659
|
|
1658
1660
|
/* Line 1455 of yacc.c */
|
1659
|
-
#line
|
1660
|
-
{process_url_link((yyvsp[(1) - (1)].svalue),
|
1661
|
+
#line 127 "parser.y"
|
1662
|
+
{process_url_link((yyvsp[(1) - (1)].svalue),NULL);}
|
1661
1663
|
break;
|
1662
1664
|
|
1663
1665
|
case 41:
|
1664
1666
|
|
1665
1667
|
/* Line 1455 of yacc.c */
|
1666
|
-
#line
|
1667
|
-
{
|
1668
|
+
#line 128 "parser.y"
|
1669
|
+
{process_url_link((yyvsp[(1) - (1)].svalue),"http://");}
|
1668
1670
|
break;
|
1669
1671
|
|
1670
1672
|
case 42:
|
1671
1673
|
|
1672
1674
|
/* Line 1455 of yacc.c */
|
1673
|
-
#line
|
1674
|
-
{
|
1675
|
+
#line 129 "parser.y"
|
1676
|
+
{process_wiki_link((yyvsp[(1) - (1)].svalue));}
|
1675
1677
|
break;
|
1676
1678
|
|
1677
1679
|
case 43:
|
1678
1680
|
|
1679
1681
|
/* Line 1455 of yacc.c */
|
1680
|
-
#line
|
1681
|
-
{
|
1682
|
+
#line 130 "parser.y"
|
1683
|
+
{process_anchor_link((yyvsp[(1) - (1)].svalue));}
|
1682
1684
|
break;
|
1683
1685
|
|
1684
1686
|
case 44:
|
1685
1687
|
|
1686
1688
|
/* Line 1455 of yacc.c */
|
1687
|
-
#line
|
1688
|
-
{
|
1689
|
+
#line 131 "parser.y"
|
1690
|
+
{process_file_link((yyvsp[(1) - (1)].svalue));}
|
1689
1691
|
break;
|
1690
1692
|
|
1691
|
-
case
|
1693
|
+
case 45:
|
1692
1694
|
|
1693
1695
|
/* Line 1455 of yacc.c */
|
1694
|
-
#line
|
1695
|
-
{
|
1696
|
+
#line 132 "parser.y"
|
1697
|
+
{process_image_link((yyvsp[(1) - (1)].svalue));}
|
1696
1698
|
break;
|
1697
1699
|
|
1698
1700
|
case 48:
|
1699
1701
|
|
1700
1702
|
/* Line 1455 of yacc.c */
|
1701
|
-
#line
|
1702
|
-
{
|
1703
|
+
#line 137 "parser.y"
|
1704
|
+
{concat_escaped_char((yyvsp[(1) - (1)].ivalue));}
|
1703
1705
|
break;
|
1704
1706
|
|
1705
1707
|
case 49:
|
1706
1708
|
|
1707
1709
|
/* Line 1455 of yacc.c */
|
1708
|
-
#line
|
1709
|
-
{concat("<
|
1710
|
+
#line 144 "parser.y"
|
1711
|
+
{concat("<h1 id=\"",8); process_header((yyvsp[(1) - (1)].svalue));}
|
1710
1712
|
break;
|
1711
1713
|
|
1712
1714
|
case 50:
|
1713
1715
|
|
1714
1716
|
/* Line 1455 of yacc.c */
|
1715
|
-
#line
|
1716
|
-
{concat("<
|
1717
|
+
#line 145 "parser.y"
|
1718
|
+
{concat("<h2 id=\"",8); process_header((yyvsp[(1) - (1)].svalue));}
|
1717
1719
|
break;
|
1718
1720
|
|
1719
1721
|
case 51:
|
1720
1722
|
|
1721
1723
|
/* Line 1455 of yacc.c */
|
1722
|
-
#line
|
1723
|
-
{concat("<
|
1724
|
+
#line 146 "parser.y"
|
1725
|
+
{concat("<h3 id=\"",8); process_header((yyvsp[(1) - (1)].svalue));}
|
1724
1726
|
break;
|
1725
1727
|
|
1726
1728
|
case 52:
|
1727
1729
|
|
1728
1730
|
/* Line 1455 of yacc.c */
|
1729
|
-
#line
|
1730
|
-
{concat("<
|
1731
|
+
#line 147 "parser.y"
|
1732
|
+
{concat("<h4 id=\"",8); process_header((yyvsp[(1) - (1)].svalue));}
|
1731
1733
|
break;
|
1732
1734
|
|
1733
1735
|
case 53:
|
1734
1736
|
|
1735
1737
|
/* Line 1455 of yacc.c */
|
1736
1738
|
#line 148 "parser.y"
|
1737
|
-
{concat("<
|
1739
|
+
{concat("<h5 id=\"",8); process_header((yyvsp[(1) - (1)].svalue));}
|
1738
1740
|
break;
|
1739
1741
|
|
1740
1742
|
case 54:
|
1741
1743
|
|
1742
1744
|
/* Line 1455 of yacc.c */
|
1743
|
-
#line
|
1745
|
+
#line 150 "parser.y"
|
1744
1746
|
{concat("<li>",4);}
|
1745
1747
|
break;
|
1746
1748
|
|
1747
1749
|
case 55:
|
1748
1750
|
|
1749
1751
|
/* Line 1455 of yacc.c */
|
1750
|
-
#line
|
1751
|
-
{concat("<
|
1752
|
+
#line 151 "parser.y"
|
1753
|
+
{concat("<li>",4);}
|
1752
1754
|
break;
|
1753
1755
|
|
1754
1756
|
case 56:
|
1755
1757
|
|
1756
1758
|
/* Line 1455 of yacc.c */
|
1757
|
-
#line
|
1758
|
-
{concat("<
|
1759
|
+
#line 152 "parser.y"
|
1760
|
+
{concat("<br />",6);}
|
1759
1761
|
break;
|
1760
1762
|
|
1761
1763
|
case 57:
|
1762
1764
|
|
1763
1765
|
/* Line 1455 of yacc.c */
|
1764
|
-
#line
|
1765
|
-
{concat("
|
1766
|
+
#line 155 "parser.y"
|
1767
|
+
{concat("<pre><code>",11);}
|
1766
1768
|
break;
|
1767
1769
|
|
1768
1770
|
case 58:
|
1769
1771
|
|
1770
1772
|
/* Line 1455 of yacc.c */
|
1771
|
-
#line
|
1772
|
-
{concat("
|
1773
|
+
#line 155 "parser.y"
|
1774
|
+
{concat("</code></pre>",13);}
|
1773
1775
|
break;
|
1774
1776
|
|
1775
1777
|
case 59:
|
1776
1778
|
|
1777
1779
|
/* Line 1455 of yacc.c */
|
1778
|
-
#line
|
1779
|
-
{concat("
|
1780
|
+
#line 156 "parser.y"
|
1781
|
+
{concat("<pre>",5);}
|
1780
1782
|
break;
|
1781
1783
|
|
1782
1784
|
case 60:
|
1783
1785
|
|
1784
1786
|
/* Line 1455 of yacc.c */
|
1785
|
-
#line
|
1786
|
-
{concat("
|
1787
|
+
#line 156 "parser.y"
|
1788
|
+
{concat("</pre>",6);}
|
1787
1789
|
break;
|
1788
1790
|
|
1789
1791
|
case 61:
|
1790
1792
|
|
1791
1793
|
/* Line 1455 of yacc.c */
|
1792
|
-
#line
|
1794
|
+
#line 157 "parser.y"
|
1795
|
+
{concat("<code>",6);}
|
1796
|
+
break;
|
1797
|
+
|
1798
|
+
case 62:
|
1799
|
+
|
1800
|
+
/* Line 1455 of yacc.c */
|
1801
|
+
#line 157 "parser.y"
|
1793
1802
|
{concat("</code>",7);}
|
1794
1803
|
break;
|
1795
1804
|
|
1796
1805
|
|
1797
1806
|
|
1798
1807
|
/* Line 1455 of yacc.c */
|
1799
|
-
#line
|
1808
|
+
#line 1809 "parser.tab.c"
|
1800
1809
|
default: break;
|
1801
1810
|
}
|
1802
1811
|
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
|
@@ -2008,7 +2017,7 @@ yyreturn:
|
|
2008
2017
|
|
2009
2018
|
|
2010
2019
|
/* Line 1675 of yacc.c */
|
2011
|
-
#line
|
2020
|
+
#line 161 "parser.y"
|
2012
2021
|
|
2013
2022
|
|
2014
2023
|
concat_hex_char(char c){
|
@@ -2039,6 +2048,20 @@ need_hex_convert(const char*p, const char*pend){
|
|
2039
2048
|
return 0;
|
2040
2049
|
}
|
2041
2050
|
|
2051
|
+
process_inline_code(const char*p){
|
2052
|
+
if( *p == ' ' || *p == 9 ){
|
2053
|
+
concat_raw_char(' ');
|
2054
|
+
while( *p == ' ' || *p == 9 ) p++;
|
2055
|
+
}
|
2056
|
+
if( *p == '@' ) p++;
|
2057
|
+
concat("<code>",6);
|
2058
|
+
for(; *p ; p++){
|
2059
|
+
if( *p == '@' && *(p+1) == 0 ) break;
|
2060
|
+
concat_escaped_char( *p );
|
2061
|
+
}
|
2062
|
+
concat("</code>",7);
|
2063
|
+
}
|
2064
|
+
|
2042
2065
|
process_header(const char*title){
|
2043
2066
|
const char*p,*pend;
|
2044
2067
|
|