line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FLAT::Symbol::Regex; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
42
|
use parent 'FLAT::Symbol'; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
36
|
|
4
|
6
|
|
|
6
|
|
2558
|
use FLAT::Regex::WithExtraOps; |
|
6
|
|
|
|
|
227518
|
|
|
6
|
|
|
|
|
265
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
59
|
use strict; |
|
6
|
|
|
|
|
15
|
|
|
6
|
|
|
|
|
1637
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
2899
|
|
|
2899
|
0
|
6785
|
my ($pkg, $label) = @_; |
10
|
2899
|
100
|
|
|
|
20253
|
bless { |
11
|
|
|
|
|
|
|
COUNT => 1, |
12
|
|
|
|
|
|
|
OBJECT => $label !~ m/^\s*$/g ? FLAT::Regex::WithExtraOps->new($label) : FLAT::Regex::WithExtraOps->new('[epsilon]'), |
13
|
|
|
|
|
|
|
LABEL => $label, |
14
|
|
|
|
|
|
|
}, $pkg; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub as_string { |
18
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
19
|
0
|
|
|
|
|
|
return $self->{OBJECT}->as_string; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# provided interface to merging labels |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub union { |
25
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
26
|
0
|
|
|
|
|
|
$self->{OBJECT} = $self->{OBJECT}->union($_[0]->{OBJECT}); |
27
|
|
|
|
|
|
|
# update label |
28
|
0
|
|
|
|
|
|
$self->{LABEL} = $self->{OBJECT}->as_string; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub concat { |
32
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
33
|
0
|
|
|
|
|
|
$self->{OBJECT} = $self->{OBJECT}->concat($_[0]->{OBJECT}); |
34
|
|
|
|
|
|
|
# update label |
35
|
0
|
|
|
|
|
|
$self->{LABEL} = $self->{OBJECT}->as_string; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub kleene { |
39
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
40
|
0
|
|
|
|
|
|
$self->{OBJECT} = $self->{OBJECT}->kleene(); |
41
|
|
|
|
|
|
|
# update label |
42
|
0
|
|
|
|
|
|
$self->{LABEL} = $self->{OBJECT}->as_string; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub shuffle { |
46
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
47
|
0
|
|
|
|
|
|
$self->{OBJECT} = $self->{OBJECT}->shuffle($_[0]->{OBJECT}); |
48
|
|
|
|
|
|
|
# update label |
49
|
0
|
|
|
|
|
|
$self->{LABEL} = $self->{OBJECT}->as_string; |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |