line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# [[[ HEADER ]]] |
2
|
|
|
|
|
|
|
package RPerl::Operation::Statement::OperatorVoid; |
3
|
5
|
|
|
5
|
|
1875
|
use strict; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
125
|
|
4
|
5
|
|
|
5
|
|
26
|
use warnings; |
|
5
|
|
|
|
|
13
|
|
|
5
|
|
|
|
|
104
|
|
5
|
5
|
|
|
5
|
|
25
|
use RPerl::AfterSubclass; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
591
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.002_000; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# [[[ OO INHERITANCE ]]] |
9
|
5
|
|
|
5
|
|
33
|
use parent qw(RPerl::Operation::Statement); |
|
5
|
|
|
|
|
14
|
|
|
5
|
|
|
|
|
41
|
|
10
|
5
|
|
|
5
|
|
279
|
use RPerl::Operation::Statement; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
1731
|
|
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
|
|
|
|
|
|
|
# [[[ INCLUDES ]]] |
17
|
|
|
|
|
|
|
#use RPerl::Test::Foo; # NEED ANSWER: why are these here? old debugging code to be deleted? |
18
|
|
|
|
|
|
|
#use RPerl::Test::Bar; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# [[[ OO PROPERTIES ]]] |
21
|
|
|
|
|
|
|
our hashref $properties = {}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
# [[[ SUBROUTINES & OO METHODS ]]] |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
our string_hashref::method $ast_to_rperl__generate = sub { |
26
|
|
|
|
|
|
|
( my object $self, my string_hashref $modes) = @_; |
27
|
|
|
|
|
|
|
my string_hashref $rperl_source_group = { PMC => q{} }; |
28
|
|
|
|
|
|
|
my string_hashref $rperl_source_subgroup; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# RPerl::diag( 'in OperatorVoid->ast_to_rperl__generate(), received $self = ' . "\n" . RPerl::Parser::rperl_ast__dump($self) . "\n" ); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Print, OperatorNamedVoid, OperatorNamed, LoopControl |
33
|
|
|
|
|
|
|
my string $child0_class = ref $self->{children}->[0]; |
34
|
|
|
|
|
|
|
if ( ( $child0_class eq 'OperatorVoid_117' ) |
35
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_118' ) |
36
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_119' ) |
37
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_120' ) |
38
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_121' ) |
39
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_122' ) |
40
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_123' ) |
41
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_124' ) ) |
42
|
|
|
|
|
|
|
{ |
43
|
|
|
|
|
|
|
$rperl_source_subgroup |
44
|
|
|
|
|
|
|
= $self->{children}->[0]->ast_to_rperl__generate($modes); |
45
|
|
|
|
|
|
|
RPerl::Generator::source_group_append( $rperl_source_group, |
46
|
|
|
|
|
|
|
$rperl_source_subgroup ); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
else { |
49
|
|
|
|
|
|
|
die RPerl::Parser::rperl_rule__replace( |
50
|
|
|
|
|
|
|
'ERROR ECOGEASRP00, CODE GENERATOR, ABSTRACT SYNTAX TO RPERL: Grammar rule ' |
51
|
|
|
|
|
|
|
. $child0_class |
52
|
|
|
|
|
|
|
. ' found where OperatorVoid_117, OperatorVoid_118, OperatorVoid_119, OperatorVoid_120, OperatorVoid_121, OperatorVoid_122, OperatorVoid_123, or OperatorVoid_124 expected, dying' |
53
|
|
|
|
|
|
|
) . "\n"; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
return $rperl_source_group; |
57
|
|
|
|
|
|
|
}; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
our string_hashref::method $ast_to_cpp__generate__CPPOPS_PERLTYPES = sub { |
60
|
|
|
|
|
|
|
( my object $self, my string_hashref $modes) = @_; |
61
|
|
|
|
|
|
|
my string_hashref $cpp_source_group |
62
|
|
|
|
|
|
|
= { |
63
|
|
|
|
|
|
|
CPP => q{// <<< RP::O::S::OV __DUMMY_SOURCE_CODE CPPOPS_PERLTYPES >>>} |
64
|
|
|
|
|
|
|
. "\n" |
65
|
|
|
|
|
|
|
}; |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
#... |
68
|
|
|
|
|
|
|
return $cpp_source_group; |
69
|
|
|
|
|
|
|
}; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
our string_hashref::method $ast_to_cpp__generate__CPPOPS_CPPTYPES = sub { |
72
|
|
|
|
|
|
|
( my object $self, my string_hashref $modes) = @_; |
73
|
|
|
|
|
|
|
my string_hashref $cpp_source_group = { CPP => q{} }; |
74
|
|
|
|
|
|
|
my string_hashref $cpp_source_subgroup; |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
# RPerl::diag( 'in OperatorVoid->ast_to_cpp__generate__CPPOPS_CPPTYPES(), received $self = ' . "\n" . RPerl::Parser::rperl_ast__dump($self) . "\n" ); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
# Print, OperatorNamedVoid, OperatorNamed, LoopControl |
79
|
|
|
|
|
|
|
my string $child0_class = ref $self->{children}->[0]; |
80
|
|
|
|
|
|
|
if ( ( $child0_class eq 'OperatorVoid_117' ) |
81
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_118' ) |
82
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_119' ) |
83
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_120' ) |
84
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_121' ) |
85
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_122' ) |
86
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_123' ) |
87
|
|
|
|
|
|
|
or ( $child0_class eq 'OperatorVoid_124' ) ) |
88
|
|
|
|
|
|
|
{ |
89
|
|
|
|
|
|
|
$cpp_source_subgroup |
90
|
|
|
|
|
|
|
= $self->{children}->[0]->ast_to_cpp__generate__CPPOPS_CPPTYPES($modes); |
91
|
|
|
|
|
|
|
# RPerl::diag( 'in OperatorVoid->ast_to_cpp__generate__CPPOPS_CPPTYPES(), have $cpp_source_subgroup = ' . "\n" . RPerl::Parser::rperl_ast__dump($cpp_source_subgroup) . "\n" ); |
92
|
|
|
|
|
|
|
RPerl::Generator::source_group_append( $cpp_source_group, |
93
|
|
|
|
|
|
|
$cpp_source_subgroup ); |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
else { |
96
|
|
|
|
|
|
|
die RPerl::Parser::rperl_rule__replace( |
97
|
|
|
|
|
|
|
'ERROR ECOGEASCP00, CODE GENERATOR, ABSTRACT SYNTAX TO C++: Grammar rule ' |
98
|
|
|
|
|
|
|
. $child0_class |
99
|
|
|
|
|
|
|
. ' found where OperatorVoid_117, OperatorVoid_118, OperatorVoid_119, OperatorVoid_120, OperatorVoid_121, OperatorVoid_122, OperatorVoid_123, or OperatorVoid_124 expected, dying' |
100
|
|
|
|
|
|
|
) . "\n"; |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
return $cpp_source_group; |
104
|
|
|
|
|
|
|
}; |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
1; # end of class |