line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FLAT::Symbol::Regex; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
41
|
use parent 'FLAT::Symbol'; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
31
|
|
4
|
6
|
|
|
6
|
|
2346
|
use FLAT::Regex::WithExtraOps; |
|
6
|
|
|
|
|
209798
|
|
|
6
|
|
|
|
|
216
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
46
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1470
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
2881
|
|
|
2881
|
0
|
6019
|
my ($pkg, $label) = @_; |
10
|
2881
|
100
|
|
|
|
19979
|
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; |