line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MarpaX::Languages::PowerBuilder::PBW; |
2
|
1
|
|
|
1
|
|
686
|
use base qw(MarpaX::Languages::PowerBuilder::base); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
278
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
#a PBW parser by Sébastien Kirche |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub syntax { |
7
|
0
|
|
|
0
|
0
|
|
my $ppa = shift; |
8
|
0
|
|
|
|
|
|
my ($fmt, $uncheck, $targets, $deftrg, $defrmt); |
9
|
0
|
0
|
|
|
|
|
($fmt, $uncheck, $targets, $deftrg, $defrmt) = @_ if (scalar @_ == 5); |
10
|
0
|
0
|
|
|
|
|
($fmt, $targets, $deftrg, $defrmt, $uncheck) = (@_, []) if (scalar @_ == 4); #no uncheck |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my %attrs = ( format => $fmt, unchecked => $uncheck, targets => $targets, defaulttarget => $deftrg, defaultremotetarget => $defrmt); |
13
|
0
|
|
|
|
|
|
return \%attrs; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub format { |
17
|
0
|
|
|
0
|
0
|
|
my ($ppa, $vers, $date) = @_; |
18
|
0
|
|
|
|
|
|
my %attrs = ( version => $vers, |
19
|
|
|
|
|
|
|
date => $date); |
20
|
0
|
|
|
|
|
|
return \%attrs; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub indexedItems { |
24
|
0
|
|
|
0
|
0
|
|
my ($ppa, @list) = @_; |
25
|
0
|
|
|
|
|
|
my @items = map {$_->[1]} @list; |
|
0
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
#~ map{$items{$_->[0]} = $_->[1]} @list; |
27
|
0
|
|
|
|
|
|
return \@items; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub string { |
31
|
0
|
|
|
0
|
0
|
|
my ($ppa, $str) = @_; |
32
|
0
|
|
|
|
|
|
$str =~ s/^"|"$//g; |
33
|
0
|
|
|
|
|
|
return $str; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|