line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MarpaX::Languages::PowerBuilder::PBG; |
2
|
1
|
|
|
1
|
|
704
|
use base qw(MarpaX::Languages::PowerBuilder::base); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
258
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
#a PBG parser by Sébastien Kirche |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub syntax { |
7
|
0
|
|
|
0
|
0
|
|
my ($ppa, $fmt, $libs, $objs) = @_; |
8
|
0
|
|
|
|
|
|
my %attrs = ( format => $fmt, libraries => $libs, objects => $objs); |
9
|
0
|
|
|
|
|
|
return \%attrs; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub format { |
13
|
0
|
|
|
0
|
0
|
|
my ($ppa, $vers, $date) = @_; |
14
|
0
|
|
|
|
|
|
my %attrs = ( version => $vers, |
15
|
|
|
|
|
|
|
date => $date); |
16
|
0
|
|
|
|
|
|
return \%attrs; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub libraries { |
20
|
0
|
|
|
0
|
0
|
|
my ($ppa, @objs) = @_; |
21
|
0
|
|
|
|
|
|
my @libs = map{ $_->[0] } @{$objs[0]}; # LibraryList -> ObjectLocationList -> ObjectLocation+ |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
return \@libs; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub objects { |
26
|
0
|
|
|
0
|
0
|
|
my ($ppa, @objs) = @_; |
27
|
0
|
|
|
|
|
|
my %objects; |
28
|
0
|
|
|
|
|
|
map{$objects{$_->[0]} = $_->[1]} @{$objs[0]}; # ObjectList -> ObjectLocationList -> ObjectLocation+ |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return \%objects; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub string { |
33
|
0
|
|
|
0
|
0
|
|
my ($ppa, $str) = @_; |
34
|
0
|
|
|
|
|
|
$str =~ s/^"|"$//g; |
35
|
0
|
|
|
|
|
|
return $str; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|