line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FLAT::Symbol::Regex; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
37
|
use parent 'FLAT::Symbol'; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
35
|
|
4
|
6
|
|
|
6
|
|
2645
|
use FLAT::Regex::WithExtraOps; |
|
6
|
|
|
|
|
230020
|
|
|
6
|
|
|
|
|
243
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
54
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
1712
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
2891
|
|
|
2891
|
0
|
6963
|
my ($pkg, $label) = @_; |
10
|
2891
|
100
|
|
|
|
22192
|
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; |