line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::TestifiedTermMark; |
2
|
3
|
|
|
3
|
|
22
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
87
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
71
|
|
4
|
3
|
|
|
3
|
|
16
|
use Lingua::YaTeA::AnnotationMark; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
17
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @ISA = qw(Lingua::YaTeA::AnnotationMark); |
8
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new |
11
|
|
|
|
|
|
|
{ |
12
|
6
|
|
|
6
|
1
|
13
|
my ($class,$form) = @_; |
13
|
6
|
|
|
|
|
21
|
my ($frontier_id,$testified_id,$type) = $class->parse($form); |
14
|
6
|
|
|
|
|
39
|
my $this = $class->SUPER::new($form,$frontier_id,$type); |
15
|
6
|
|
|
|
|
10
|
bless ($this,$class); |
16
|
6
|
|
|
|
|
15
|
$this->{TESTIFIED_ID} = $testified_id; |
17
|
6
|
|
|
|
|
11
|
$this->{START} = (); # should be 0 |
18
|
6
|
|
|
|
|
12
|
$this->{END} = (); # should be 0 |
19
|
6
|
|
|
|
|
12
|
return $this; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub getTestifiedID |
24
|
|
|
|
|
|
|
{ |
25
|
3
|
|
|
3
|
1
|
7
|
my ($this) = @_; |
26
|
3
|
|
|
|
|
14
|
return $this->{TESTIFIED_ID}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub isOpener |
30
|
|
|
|
|
|
|
{ |
31
|
12
|
|
|
12
|
1
|
26
|
my ($this) = @_; |
32
|
12
|
100
|
|
|
|
32
|
if ($this->getType eq "opener") |
33
|
|
|
|
|
|
|
{ |
34
|
6
|
|
|
|
|
22
|
return 1; |
35
|
|
|
|
|
|
|
} |
36
|
6
|
|
|
|
|
15
|
return 0; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
sub isCloser |
40
|
|
|
|
|
|
|
{ |
41
|
6
|
|
|
6
|
1
|
12
|
my ($this) = @_; |
42
|
6
|
50
|
|
|
|
15
|
if ($this->getType eq "closer") |
43
|
|
|
|
|
|
|
{ |
44
|
6
|
|
|
|
|
27
|
return 1; |
45
|
|
|
|
|
|
|
} |
46
|
0
|
|
|
|
|
0
|
return 0; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub parse |
50
|
|
|
|
|
|
|
{ |
51
|
6
|
|
|
6
|
1
|
11
|
my ($class,$form) = @_; |
52
|
6
|
|
|
|
|
17
|
my $frontier_id; |
53
|
|
|
|
|
|
|
my $testified_id; |
54
|
6
|
|
|
|
|
0
|
my $type; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# opening testified term frontier |
57
|
6
|
100
|
|
|
|
25
|
if ($form =~ /^\
|
58
|
|
|
|
|
|
|
{ |
59
|
3
|
|
|
|
|
10
|
$frontier_id = $1; |
60
|
3
|
|
|
|
|
7
|
$testified_id = $2; |
61
|
3
|
|
|
|
|
7
|
$type = "opener"; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
# closing testified term frontier |
64
|
|
|
|
|
|
|
else |
65
|
|
|
|
|
|
|
{ |
66
|
3
|
50
|
|
|
|
25
|
if ($form =~ /^\<\/FRONTIER ID=([0-9]+) TT=([0-9]+)/) |
67
|
|
|
|
|
|
|
{ |
68
|
3
|
|
|
|
|
9
|
$frontier_id = $1; |
69
|
3
|
|
|
|
|
5
|
$testified_id = $2; |
70
|
3
|
|
|
|
|
6
|
$type = "closer"; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
else |
73
|
|
|
|
|
|
|
{ |
74
|
0
|
|
|
|
|
0
|
die "balise invalide :" . $form; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
} |
77
|
6
|
|
|
|
|
23
|
return ($frontier_id,$testified_id,$type); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub getStart |
81
|
|
|
|
|
|
|
{ |
82
|
3
|
|
|
3
|
1
|
9
|
my ($this) = @_; |
83
|
3
|
|
|
|
|
9
|
return $this->{START}; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub getEnd |
87
|
|
|
|
|
|
|
{ |
88
|
9
|
|
|
9
|
1
|
16
|
my ($this) = @_; |
89
|
9
|
|
|
|
|
23
|
return $this->{END}; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
1; |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
__END__ |