| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# This code is part of Perl distribution OODoc version 3.05. |
|
2
|
|
|
|
|
|
|
# The POD got stripped from this file by OODoc version 3.05. |
|
3
|
|
|
|
|
|
|
# For contributors see file ChangeLog. |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This software is copyright (c) 2003-2025 by Mark Overmeer. |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
|
8
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
|
9
|
|
|
|
|
|
|
# SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package OODoc::Parser;{ |
|
13
|
|
|
|
|
|
|
our $VERSION = '3.05'; |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
|
|
16
|
1
|
|
|
1
|
|
1804
|
use parent 'OODoc::Object'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
9
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
83
|
use strict; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
21
|
|
|
19
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
58
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
3
|
use Log::Report 'oodoc'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
10
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
1
|
|
|
1
|
|
336
|
use List::Util qw/first/; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
97
|
|
|
24
|
1
|
|
|
1
|
|
7
|
use Scalar::Util qw/reftype/; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
469
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
our %syntax_implementation = ( |
|
27
|
|
|
|
|
|
|
markov => 'OODoc::Parser::Markov', |
|
28
|
|
|
|
|
|
|
); |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
#-------------------- |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#-------------------- |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub new(%) |
|
35
|
0
|
|
|
0
|
1
|
|
{ my ($class, %args) = @_; |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
0
|
|
|
|
|
$class eq __PACKAGE__ |
|
38
|
|
|
|
|
|
|
or return $class->SUPER::new(%args); |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
|
0
|
|
|
|
my $syntax = delete $args{syntax} || 'markov'; |
|
41
|
0
|
|
0
|
|
|
|
my $pkg = $syntax_implementation{$syntax} || $syntax; |
|
42
|
0
|
0
|
|
|
|
|
eval "require $pkg" or die $@; |
|
43
|
0
|
|
|
|
|
|
$pkg->new(%args); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub init($) |
|
47
|
0
|
|
|
0
|
0
|
|
{ my ($self, $args) = @_; |
|
48
|
0
|
0
|
|
|
|
|
$self->SUPER::init($args) or return; |
|
49
|
|
|
|
|
|
|
|
|
50
|
0
|
|
0
|
|
|
|
my $skip = delete $args->{skip_links} || []; |
|
51
|
0
|
0
|
|
|
|
|
my @skip = map { ref $_ eq 'REGEXP' ? $_ : qr/^\Q$_\E(?:\:\:|$)/ } |
|
|
0
|
0
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
ref $skip eq 'ARRAY' ? @$skip : $skip; |
|
53
|
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
$self->{skip_links} = \@skip; |
|
55
|
0
|
|
|
|
|
|
$self; |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
#-------------------- |
|
59
|
|
|
|
|
|
|
|
|
60
|
0
|
|
|
0
|
1
|
|
sub parse(@) {panic} |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
#-------------------- |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub skipManualLink($) |
|
65
|
0
|
|
|
0
|
1
|
|
{ my ($self, $package) = @_; |
|
66
|
0
|
0
|
|
0
|
|
|
(first { $package =~ $_ } @{$self->{skip_links}}) ? 1 : 0; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
} |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
|
|
70
|
0
|
|
|
0
|
1
|
|
sub cleanupPod($$%) { ... } |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
|
73
|
0
|
|
|
0
|
1
|
|
sub cleanupHtml($$%) { ... } |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
|
76
|
0
|
|
|
0
|
1
|
|
sub formatReferTo($$) { ... } |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub finalizeManual($) |
|
80
|
0
|
|
|
0
|
1
|
|
{ my ($self, $manual, %args) = @_; |
|
81
|
0
|
|
|
|
|
|
$self; |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |