line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# [[[ HEADER ]]] |
2
|
|
|
|
|
|
|
package RPerl::Operation::Expression::Operator; |
3
|
4
|
|
|
4
|
|
1165
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
108
|
|
4
|
4
|
|
|
4
|
|
20
|
use warnings; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
79
|
|
5
|
4
|
|
|
4
|
|
17
|
use RPerl::AfterSubclass; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
537
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.002_000; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# [[[ OO INHERITANCE ]]] |
9
|
4
|
|
|
4
|
|
25
|
use parent qw(RPerl::Operation::Expression); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
21
|
|
10
|
4
|
|
|
4
|
|
638
|
use RPerl::Operation::Expression; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
1092
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# [[[ CRITICS ]]] |
13
|
|
|
|
|
|
|
## no critic qw(ProhibitUselessNoCritic ProhibitMagicNumbers RequireCheckedSyscalls) # USER DEFAULT 1: allow numeric values & print operator |
14
|
|
|
|
|
|
|
## no critic qw(RequireInterpolationOfMetachars) # USER DEFAULT 2: allow single-quoted control characters & sigils |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# [[[ OO PROPERTIES ]]] |
17
|
|
|
|
|
|
|
our hashref $properties = {}; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
# [[[ SUBROUTINES & OO METHODS ]]] |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub ast_to_rperl__generate { |
22
|
788
|
|
|
788
|
|
1545
|
{ my string_hashref::method $RETURN_TYPE }; |
|
788
|
|
|
|
|
1532
|
|
23
|
788
|
|
|
|
|
1859
|
( my object $self, my string_hashref $modes) = @ARG; |
24
|
788
|
|
|
|
|
2710
|
my string_hashref $rperl_source_group = { PMC => q{} }; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# RPerl::diag( 'in Operator->ast_to_rperl__generate(), received $self = ' . "\n" . RPerl::Parser::rperl_ast__dump($self) . "\n" ); |
27
|
|
|
|
|
|
|
|
28
|
788
|
|
|
|
|
2480
|
my string $self_class = ref $self; |
29
|
788
|
50
|
|
|
|
2369
|
if ( $self_class eq 'Expression_143' ) { |
30
|
788
|
|
|
|
|
18232
|
my string_hashref $rperl_source_subgroup = $self->{children}->[0]->ast_to_rperl__generate($modes); |
31
|
788
|
|
|
|
|
15624
|
RPerl::Generator::source_group_append( $rperl_source_group, $rperl_source_subgroup ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
else { |
34
|
0
|
|
|
|
|
0
|
die RPerl::Parser::rperl_rule__replace( |
35
|
|
|
|
|
|
|
'ERROR ECOGEASRP00, CODE GENERATOR, ABSTRACT SYNTAX TO RPERL: Grammar rule ' |
36
|
|
|
|
|
|
|
. $self_class |
37
|
|
|
|
|
|
|
. ' found where Expression_143 expected, dying' ) |
38
|
|
|
|
|
|
|
. "\n"; |
39
|
|
|
|
|
|
|
} |
40
|
788
|
|
|
|
|
33948
|
return $rperl_source_group; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub ast_to_cpp__generate__CPPOPS_PERLTYPES { |
44
|
0
|
|
|
0
|
|
0
|
{ my string_hashref::method $RETURN_TYPE }; |
|
0
|
|
|
|
|
0
|
|
45
|
0
|
|
|
|
|
0
|
( my object $self, my string_hashref $modes) = @ARG; |
46
|
0
|
|
|
|
|
0
|
my string_hashref $cpp_source_group |
47
|
|
|
|
|
|
|
= { |
48
|
|
|
|
|
|
|
CPP => q{// <<< RP::O::E::O __DUMMY_SOURCE_CODE CPPOPS_PERLTYPES >>>} |
49
|
|
|
|
|
|
|
. "\n" |
50
|
|
|
|
|
|
|
}; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
#... |
53
|
0
|
|
|
|
|
0
|
return $cpp_source_group; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub ast_to_cpp__generate__CPPOPS_CPPTYPES { |
57
|
72
|
|
|
72
|
|
117
|
{ my string_hashref::method $RETURN_TYPE }; |
|
72
|
|
|
|
|
115
|
|
58
|
72
|
|
|
|
|
204
|
( my object $self, my string_hashref $modes) = @ARG; |
59
|
72
|
|
|
|
|
266
|
my string_hashref $cpp_source_group = { CPP => q{} }; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# RPerl::diag( 'in Operator->ast_to_cpp__generate__CPPOPS_CPPTYPES(), received $self = ' . "\n" . RPerl::Parser::rperl_ast__dump($self) . "\n" ); |
62
|
|
|
|
|
|
|
|
63
|
72
|
|
|
|
|
168
|
my string $self_class = ref $self; |
64
|
72
|
50
|
|
|
|
176
|
if ( $self_class eq 'Expression_143' ) { |
65
|
72
|
|
|
|
|
1648
|
my string_hashref $cpp_source_subgroup = $self->{children}->[0]->ast_to_cpp__generate__CPPOPS_CPPTYPES($modes); |
66
|
|
|
|
|
|
|
# RPerl::diag( 'in Operator->ast_to_cpp__generate__CPPOPS_CPPTYPES(), have $cpp_source_subgroup = ' . "\n" . RPerl::Parser::rperl_ast__dump($cpp_source_subgroup) . "\n" ); |
67
|
72
|
|
|
|
|
1464
|
RPerl::Generator::source_group_append( $cpp_source_group, $cpp_source_subgroup ); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
else { |
70
|
0
|
|
|
|
|
0
|
die RPerl::Parser::rperl_rule__replace( |
71
|
|
|
|
|
|
|
'ERROR ECOGEASCP00, CODE GENERATOR, ABSTRACT SYNTAX TO C++: Grammar rule ' |
72
|
|
|
|
|
|
|
. $self_class |
73
|
|
|
|
|
|
|
. ' found where Expression_143 expected, dying' ) |
74
|
|
|
|
|
|
|
. "\n"; |
75
|
|
|
|
|
|
|
} |
76
|
72
|
|
|
|
|
2977
|
return $cpp_source_group; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; # end of class |