line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lingua::YaTeA::ForbiddenStructureAny; |
2
|
5
|
|
|
5
|
|
1863
|
use Lingua::YaTeA::ForbiddenStructure; |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
57
|
|
3
|
5
|
|
|
5
|
|
132
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
92
|
|
4
|
5
|
|
|
5
|
|
22
|
use warnings; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
2760
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ISA = qw(Lingua::YaTeA::ForbiddenStructure); |
7
|
|
|
|
|
|
|
our $VERSION=$Lingua::YaTeA::VERSION; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new |
10
|
|
|
|
|
|
|
{ |
11
|
172
|
|
|
172
|
1
|
303
|
my ($class,$infos_a) = @_; |
12
|
172
|
|
|
|
|
341
|
my ($form,$reg_exp) = $class->parse($infos_a->[0]); |
13
|
172
|
|
|
|
|
549
|
my $this = $class->SUPER::new($form); |
14
|
172
|
|
|
|
|
283
|
bless ($this,$class); |
15
|
172
|
|
|
|
|
315
|
$this->{ACTION} = $infos_a->[2]; |
16
|
172
|
|
|
|
|
324
|
$this->{SPLIT_AFTER} = $this->setSplitAfter($infos_a); |
17
|
172
|
|
|
|
|
331
|
$this->{REG_EXP} = $reg_exp; |
18
|
172
|
|
|
|
|
405
|
return $this; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# TODO |
23
|
|
|
|
|
|
|
sub setSplitAfter |
24
|
|
|
|
|
|
|
{ |
25
|
172
|
|
|
172
|
1
|
295
|
my ($this,$infos_a) = @_; |
26
|
172
|
100
|
|
|
|
371
|
if ($this->{ACTION} eq "split") |
27
|
|
|
|
|
|
|
{ |
28
|
56
|
|
|
|
|
163
|
return $infos_a->[3] - 1; |
29
|
|
|
|
|
|
|
} |
30
|
116
|
|
|
|
|
257
|
return ""; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub parse |
34
|
|
|
|
|
|
|
{ |
35
|
172
|
|
|
172
|
1
|
303
|
my ($class,$string) = @_; |
36
|
172
|
|
|
|
|
387
|
my @elements = split / /, $string; |
37
|
172
|
|
|
|
|
239
|
my $element; |
38
|
172
|
|
|
|
|
265
|
my $forbidden_tag = "\(\\n\\<\\/\?\(FORBIDDEN\|FRONTIER\)\[\^\>\]\+\>\)\*"; |
39
|
172
|
|
|
|
|
235
|
my $reg_exp = ""; |
40
|
172
|
|
|
|
|
224
|
my $form; |
41
|
|
|
|
|
|
|
|
42
|
172
|
|
|
|
|
282
|
foreach $element (@elements){ |
43
|
292
|
|
|
|
|
884
|
$element =~ /^([^\\]+)\\(.+)$/; |
44
|
292
|
50
|
|
|
|
732
|
if(!defined $2) |
45
|
|
|
|
|
|
|
{ |
46
|
0
|
|
|
|
|
0
|
warn "FS error:" . $string. "\n"; |
47
|
|
|
|
|
|
|
} |
48
|
292
|
100
|
|
|
|
583
|
if ($2 eq "IF"){ |
49
|
104
|
|
|
|
|
318
|
$reg_exp .= $forbidden_tag . "\?\\n" . quotemeta($1)."\\t\[\^\\t\]\+\\t\[\^\\t\]\+" . $forbidden_tag; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
else{ |
52
|
188
|
100
|
|
|
|
335
|
if ($2 eq "POS"){ |
53
|
96
|
|
|
|
|
277
|
$reg_exp .= $forbidden_tag . "\?\\n\[\^\\t\]\+\\t" . quotemeta($1)."\\t\[\^\\t\]\+". $forbidden_tag; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
else{ |
56
|
92
|
50
|
|
|
|
203
|
if ($2 eq "LF"){ |
57
|
92
|
|
|
|
|
256
|
$reg_exp .= $forbidden_tag . "\?\\n\[\^\\t\]\+\\t\[\^\\t\]\+\\t".quotemeta($1). $forbidden_tag; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
292
|
|
|
|
|
603
|
$form .= $1 . " "; |
62
|
|
|
|
|
|
|
} |
63
|
172
|
|
|
|
|
275
|
$reg_exp .= "\\n"; |
64
|
172
|
|
|
|
|
506
|
$form =~ s/ $//; |
65
|
172
|
|
|
|
|
555
|
return ($form,$reg_exp); |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub getAction |
69
|
|
|
|
|
|
|
{ |
70
|
860
|
|
|
860
|
1
|
1583
|
my ($this) = @_; |
71
|
860
|
|
|
|
|
2357
|
return $this->{ACTION}; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub getRegExp |
75
|
|
|
|
|
|
|
{ |
76
|
860
|
|
|
860
|
1
|
1462
|
my ($this) = @_; |
77
|
860
|
|
|
|
|
1771
|
return $this->{REG_EXP}; |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub getSplitAfter |
81
|
|
|
|
|
|
|
{ |
82
|
280
|
|
|
280
|
1
|
486
|
my ($this) = @_; |
83
|
280
|
|
|
|
|
585
|
return $this->{SPLIT_AFTER}; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
1; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
__END__ |