line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Proc::Construct_output; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
24602
|
use 5.008; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
44
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
755
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw() ] ); |
11
|
|
|
|
|
|
|
our @EXPORT_OK = (qw(run)); |
12
|
|
|
|
|
|
|
our @EXPORT = qw(); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub run{ |
18
|
0
|
|
|
0
|
0
|
|
my($code,$debug)=@_; |
19
|
0
|
|
|
|
|
|
local $_=$code; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
0
|
|
|
|
while( |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
################# |
24
|
|
|
|
|
|
|
# if, else, elsif |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
s/ |
27
|
|
|
|
|
|
|
(\W) |
28
|
|
|
|
|
|
|
( |
29
|
|
|
|
|
|
|
if\s* |
30
|
|
|
|
|
|
|
\([^)(}{]*?\)\s* |
31
|
|
|
|
|
|
|
\{[^}{]*?\}\s* |
32
|
|
|
|
|
|
|
(?: |
33
|
|
|
|
|
|
|
( |
34
|
|
|
|
|
|
|
else| |
35
|
|
|
|
|
|
|
elsif\s*\([^)(}{]*?\) |
36
|
|
|
|
|
|
|
)\s* |
37
|
|
|
|
|
|
|
{[^}{]*?}\s* |
38
|
|
|
|
|
|
|
)* |
39
|
|
|
|
|
|
|
) |
40
|
|
|
|
|
|
|
/ |
41
|
0
|
|
|
|
|
|
my $temp=$1."do___SB___$2"."___FB___"; |
42
|
0
|
|
|
|
|
|
$temp =~ s#([{])#___SB___#g; |
43
|
0
|
|
|
|
|
|
$temp =~ s#([}])#___FB___#g; |
44
|
0
|
|
|
|
|
|
$temp =~ s#([(])#___SP___#g; |
45
|
0
|
|
|
|
|
|
$temp =~ s#([)])#___FP___#g; |
46
|
0
|
|
|
|
|
|
$temp |
47
|
|
|
|
|
|
|
/sgxe |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|| |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
############ |
52
|
|
|
|
|
|
|
#output_last |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
s/ |
55
|
|
|
|
|
|
|
(\W) |
56
|
|
|
|
|
|
|
output_last\s |
57
|
|
|
|
|
|
|
(.*?); |
58
|
|
|
|
|
|
|
/$1 |
59
|
|
|
|
|
|
|
push \@temp,$2; |
60
|
|
|
|
|
|
|
last; |
61
|
|
|
|
|
|
|
/sgx |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|| |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
######## |
66
|
|
|
|
|
|
|
#output |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
s/ |
69
|
|
|
|
|
|
|
(\W) |
70
|
|
|
|
|
|
|
output\s |
71
|
|
|
|
|
|
|
(.*?); |
72
|
|
|
|
|
|
|
/$1 push \@temp,$2;/sgx |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|| |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
##################### |
77
|
|
|
|
|
|
|
# foreach, while |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
s/ |
80
|
|
|
|
|
|
|
(\W) |
81
|
|
|
|
|
|
|
( |
82
|
|
|
|
|
|
|
(?: |
83
|
|
|
|
|
|
|
(foreach|while) |
84
|
|
|
|
|
|
|
)\s* |
85
|
|
|
|
|
|
|
\( |
86
|
|
|
|
|
|
|
[^)(}{]*? |
87
|
|
|
|
|
|
|
\)\s* |
88
|
|
|
|
|
|
|
\{ |
89
|
|
|
|
|
|
|
[^}{]*? |
90
|
|
|
|
|
|
|
\} |
91
|
|
|
|
|
|
|
) |
92
|
|
|
|
|
|
|
/ |
93
|
0
|
|
|
|
|
|
my $temp=$1."do___SB___my \@temp=();$2;\@temp"."___FB___"; |
94
|
0
|
|
|
|
|
|
$temp =~ s#([{])#___SB___#g; |
95
|
0
|
|
|
|
|
|
$temp =~ s#([}])#___FB___#g; |
96
|
0
|
|
|
|
|
|
$temp =~ s#([(])#___SP___#g; |
97
|
0
|
|
|
|
|
|
$temp =~ s#([)])#___FP___#g; |
98
|
0
|
|
|
|
|
|
$temp; |
99
|
|
|
|
|
|
|
/sxeg |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
){ |
102
|
0
|
0
|
|
|
|
|
if($debug){ |
103
|
0
|
|
|
|
|
|
print; |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
|
107
|
0
|
|
|
|
|
|
s/___SB___/\{/g; |
108
|
0
|
|
|
|
|
|
s/___FB___/\}/g; |
109
|
0
|
|
|
|
|
|
s/___SP___/\(/g; |
110
|
0
|
|
|
|
|
|
s/___FP___/\)/g; |
111
|
|
|
|
|
|
|
|
112
|
0
|
0
|
|
|
|
|
if($debug){ |
113
|
0
|
|
|
|
|
|
print; |
114
|
|
|
|
|
|
|
} |
115
|
0
|
|
|
|
|
|
my(@error)=eval $_; |
116
|
0
|
0
|
|
|
|
|
print @error if $error[0] != 1; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
1; |
120
|
|
|
|
|
|
|
__END__ |