IDL/Node.pm

filter: Statementstmt 23.4% 362 / 1545 Branchbran 0.0% 0 / 634 Conditioncond 0.0% 0 / 279 MC/DCmcdc 0.0% 0 / 145 Subroutinesub 55.5% 120 / 216 Podpod 0.0% 0 / 10 totaltotal 17.0% 482 / 2829 CC 459 SCAR 59.2
CC
459
Cov
15%
_EvalBinop
2070.0
_CheckRange
1640.0
_Eval
930.0
CRAP 370.9
« IDL/Parser23.pm ↑ Summary IDL/Symbtab.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3
4 #
5 # Interface Definition Language (OMG IDL CORBA v3.0)
6 #
7
8 package CORBA::IDL::Node;
9
10 1 our $VERSION = '2.63';
11
12 1 ▶use UNIVERSAL;
Subroutine BEGIN: called CC=1 SCAR=0.0
13
14 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod undocumented
15 0 my $proto = shift;
16 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
17 0 my $parser = shift;
18 0 my %attr = @_;
19 0 my $self = \%attr;
20 0 foreach (keys %attr) {
21 0 ▶ unless (defined $self->{$_}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $self->{$_}) 0 0 0
22 0 delete $self->{$_};
23 }
24 }
25 0 bless($self, $class);
26 0 $self->_Init($parser); # specialized or default
27 0 return $self;
28 }
29
30 0 ▶sub isa {
Subroutine isa: not called CC=1 SCAR=6.9
Pod undocumented
31 0 return UNIVERSAL::isa(shift, 'CORBA::IDL::' . shift);
32 }
33
34 0 ▶sub _Init {
Subroutine _Init: not called CC=1 SCAR=0.0
35 # default
36 }
37
38 0 ▶sub configure {
Subroutine configure: not called CC=3 SCAR=24.8
Pod undocumented
39 0 my $self = shift;
40 0 my %attr = @_;
41 0 ▶ while ( my ($key, $value) = each(%attr) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %attr) 0 0 0
42 0 ▶ if (defined $value) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $value) 0 0 0
43 0 $self->{$key} = $value;
44 }
45 }
46 0 return $self;
47 }
48
49 0 ▶sub line_stamp {
Subroutine line_stamp: not called CC=1 SCAR=6.9
Pod undocumented
50 0 my $self = shift;
51 0 my ($parser) = @_;
52 0 $self->{filename} = $parser->YYData->{filename};
53 0 $self->{lineno} = $parser->YYData->{lineno};
54 }
55
56 0 ▶sub getRef {
Subroutine getRef: not called CC=4 SCAR=30.0
Pod undocumented
57 0 my $self = shift;
58 0 my $class = ref $self;
59 0 $class = substr $class, rindex($class, ':') + 1;
60 0 ▶ if (exists $self->{full}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'full'}) { } 0 0 0
61 0 ▶ if ( $class eq 'Module'
Branch: 1 branch
BranchTrueFalseTotal
if ($class eq 'Module' or $class =~ /^Forward/) { } 0 0 0
Condition0%0/3
$class eq "Module" or $class =~ /^Forward/
l!l&&r!l&&!r
000
MC/DC0%0/2
$class eq "Module" or $class =~ /^Forward/
$class eq "Module" $class =~ /^Forward/
Truth table0%0/3
A or B
A= $class eq "Module"B= $class =~ /^Forward/
ABresult
1X1
011
000
62 or $class =~ /^Forward/ ) {
63 0 return $self;
64 }
65 else {
66 0 return $self->{full};
67 }
68 }
69 else {
70 0 return $self;
71 }
72 }
73
74 0 ▶sub getInheritance {
Subroutine getInheritance: not called CC=4 SCAR=30.0
Pod undocumented
75 0 my $self = shift;
76 0 my @list = ();
77 0 ▶ if (exists $self->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}) 0 0 0
78 0 ▶ if (exists $self->{inheritance}->{list_interface}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"list_interface"}) 0 0 0
79 0 push @list, @{$self->{inheritance}->{list_interface}};
80 }
81 0 ▶ if (exists $self->{inheritance}->{list_value}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"list_value"}) 0 0 0
82 0 push @list, @{$self->{inheritance}->{list_value}};
83 }
84 }
85 0 return @list;
86 }
87
88 0 ▶sub getProperty {
Subroutine getProperty: not called CC=3 SCAR=24.8
Pod undocumented
89 0 my $self = shift;
90 0 my ($key) = @_;
91 0 ▶ return undef unless (exists $self->{props});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"props"} 0 0 0
92 0 ▶ return undef unless (exists $self->{props}->{$key});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"props"}{$key} 0 0 0
93 0 return $self->{props}->{$key};
94 }
95
96 0 ▶sub hasProperty {
Subroutine hasProperty: not called CC=3 SCAR=24.8
Pod undocumented
97 0 my $self = shift;
98 0 my ($key) = @_;
99 0 ▶ return 0 unless (exists $self->{props});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"props"} 0 0 0
100 0 ▶ return 0 unless (exists $self->{props}->{$key});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"props"}{$key} 0 0 0
101 0 return 1;
102 }
103
104 0 ▶sub visit {
Subroutine visit: not called CC=3 SCAR=21.1
Pod undocumented
105 0 my $self = shift;
106 0 my $class = ref $self;
107 0 my $visitor = shift;
108 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
109 0 ▶ while ($class ne 'CORBA::IDL::Node') {
Branch: 1 branch
BranchTrueFalseTotal
if ($class ne "CORBA::IDL::Node") 0 0 0
110 0 my $func = 'visit' . substr($class, rindex($class, ':') + 1);
111 0 ▶ if ($visitor->can($func)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($visitor->can($func)) 0 0 0
112 0 return $visitor->$func($self, @_);
113 }
114 0 $class = ${"$class\::ISA"}[0];
115 }
116 0 warn "Please implement a function 'visit",ref $self,"' in '",ref $visitor,"'.\n";
117 0 return undef;
118 }
119
120 # deprecated in favor of 'visit'
121 0 ▶sub visitName {
Subroutine visitName: not called CC=3 SCAR=21.1
Pod undocumented
122 0 my $self = shift;
123 0 my $class = ref $self;
124 0 my $visitor = shift;
125 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
126 0 ▶ while ($class ne 'CORBA::IDL::Node') {
Branch: 1 branch
BranchTrueFalseTotal
if ($class ne "CORBA::IDL::Node") 0 0 0
127 0 my $func = 'visitName' . substr($class, rindex($class, ':') + 1);
128 0 ▶ if ($visitor->can($func)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($visitor->can($func)) 0 0 0
129 0 return $visitor->$func($self, @_);
130 }
131 0 $class = ${"$class\::ISA"}[0];
132 }
133 0 warn "Please implement a function 'visitName",ref $self,"' in '",ref $visitor,"'.\n";
134 0 return undef;
135 }
136
137 1 1;
138
139 #
140 # 3.5 OMG IDL Specification
141 #
142
143 package CORBA::IDL::Specification;
144
145 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
146
147 0 ▶sub _Init {
Subroutine _Init: not called CC=7 SCAR=40.3
148 0 my $self = shift;
149 0 my ($parser) = @_;
150 0 my %hash;
151 0 foreach my $export (@{$self->{list_decl}}) {
152 0 ▶ if (ref $export) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $export) { } 0 0 0
153 0 ▶ unless (ref($export) =~ /^CORBA::IDL::Forward/) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref($export) =~ /^CORBA::IDL::Forward/) 0 0 0
154 0 ▶ if ($export->isa('Module')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($export->isa('Module')) { } 0 0 0
155 0 $hash{$export->{full}} = 1;
156 }
157 else { # TypeDeclarators, StateMembers, Attributes
158 0 foreach (@{$export->{list_decl}}) {
159 0 ▶ $hash{$_} = 1 if (defined $_);
Branch: 1 branch
BranchTrueFalseTotal
if defined $_ 0 0 0
160 }
161 }
162 }
163 }
164 else {
165 0 $hash{$export} = 1;
166 }
167 }
168 0 $self->{list_export} = [keys %hash];
169 0 $parser->YYData->{symbtab}->Insert($self);
170 }
171
172 #
173 # 3.6 Import Declaration
174 #
175
176 package CORBA::IDL::Import;
177
178 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
179
180 0 ▶sub _Init {
Subroutine _Init: not called CC=1 SCAR=6.9
181 0 my $self = shift;
182 0 my ($parser) = @_;
183 0 $parser->YYData->{symbtab}->Import($self);
184 }
185
186 #
187 # 3.7 Module Declaration
188 #
189
190 package CORBA::IDL::Modules;
191
192 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
193
194 package CORBA::IDL::Module;
195
196 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
197
198 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
199 0 my $self = shift;
200 0 my ($parser) = @_;
201 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
202 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
203 0 $self->line_stamp($parser);
204 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
205 $self->{doc} = $parser->YYData->{doc}
206 0 ▶ unless (exists $self->{doc});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"doc"} 0 0 0
207 0 $parser->YYData->{doc} = q{};
208 }
209 0 $parser->YYData->{symbtab}->PushCurrentRoot($self);
210 0 $parser->YYData->{curr_node} = $self;
211 }
212
213 0 ▶sub Configure {
Subroutine Configure: not called CC=8 SCAR=42.8
214 0 my $self = shift;
215 0 my $parser = shift;
216 0 $self->configure(@_);
217 0 my $defn = $parser->YYData->{symbtab}->Lookup($self->{full}); # Modules
218 0 my %hash;
219 0 foreach my $module (@{$defn->{list_decl}}) {
220 0 foreach my $export (@{$module->{list_decl}}) {
221 0 ▶ if (ref $export) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $export) { } 0 0 0
222 0 ▶ unless (ref($export) =~ /^CORBA::IDL::Forward/) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref($export) =~ /^CORBA::IDL::Forward/) 0 0 0
223 0 ▶ if ($export->isa('Module')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($export->isa('Module')) { } 0 0 0
224 0 $hash{$export->{full}} = 1;
225 }
226 else { # TypeDeclarators, StateMembers, Attributes
227 0 foreach (@{$export->{list_decl}}) {
228 0 ▶ $hash{$_} = 1 if (defined $_);
Branch: 1 branch
BranchTrueFalseTotal
if defined $_ 0 0 0
229 }
230 }
231 }
232 }
233 else {
234 0 $hash{$export} = 1;
235 }
236 }
237 }
238 0 $defn->{list_export} = [keys %hash];
239 0 return $defn;
240 }
241
242 #
243 # 3.8 Interface Declaration
244 #
245
246 package CORBA::IDL::BaseInterface;
247
248 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
249
250 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
251 0 my $self = shift;
252 0 my ($parser) = @_;
253 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
254 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
255 0 $self->line_stamp($parser);
256 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
257 0 $self->{doc} = $parser->YYData->{doc};
258 0 $parser->YYData->{doc} = q{};
259 }
260 0 ▶ $self->{local_type} = 1 if ($self->isa('LocalInterface'));
Branch: 1 branch
BranchTrueFalseTotal
if $self->isa("LocalInterface") 0 0 0
261 0 $parser->YYData->{symbtab}->PushCurrentScope($self);
262 0 $parser->YYData->{curr_itf} = $self;
263 0 $self->_CheckInheritance($parser); # specialized
264 0 $self->_InsertInherited($parser);
265 0 $parser->YYData->{curr_node} = $self;
266 }
267
268 0 ▶sub _InsertInherited {
Subroutine _InsertInherited: not called CC=7 SCAR=40.3
269 0 my $self = shift;
270 0 my ($parser) = @_;
271 0 $self->{hash_attribute_operation} = {};
272 0 foreach ($self->getInheritance()) {
273 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
274 0 foreach (keys %{$base->{hash_attribute_operation}}) {
275 0 my $name = $base->{hash_attribute_operation}{$_};
276 0 my $defn = $parser->YYData->{symbtab}->Lookup($name);
277 0 ▶ next if ($defn->isa('Initializer'));
Branch: 1 branch
BranchTrueFalseTotal
if $defn->isa("Initializer") 0 0 0
278 0 ▶ next if ($defn->isa('StateMember'));
Branch: 1 branch
BranchTrueFalseTotal
if $defn->isa("StateMember") 0 0 0
279 # next if ($defn->isa('Factory'));
280 # next if ($defn->isa('Finder'));
281 0 ▶ if (exists $self->{hash_attribute_operation}{$_}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{'hash_attribute_operation'}{$_}) { } 0 0 0
282 0 ▶ if ($self->{hash_attribute_operation}{$_} ne $name) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"hash_attribute_operation"}{$_} ne $name) 0 0 0
283 0 $parser->Error("multi inheritance of '$_'.\n");
284 }
285 }
286 else {
287 0 $self->{hash_attribute_operation}{$_} = $name;
288 0 $parser->YYData->{symbtab}->InsertInherit($self, $_, $name);
289 }
290 }
291 }
292 }
293
294 0 ▶sub Configure {
Subroutine Configure: not called CC=6 SCAR=37.4
295 0 my $self = shift;
296 0 my $parser = shift;
297 0 $self->configure(@_);
298 0 my @list;
299 0 foreach my $export (@{$self->{list_decl}}) {
300 0 ▶ if (ref $export) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $export) { } 0 0 0
301 0 ▶ unless (ref($export) =~ /^CORBA::IDL::Forward/) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref($export) =~ /^CORBA::IDL::Forward/) 0 0 0
302 0 foreach (@{$export->{list_decl}}) {
303 0 ▶ push @list, $_ if (defined $_);
Branch: 1 branch
BranchTrueFalseTotal
if defined $_ 0 0 0
304 }
305 }
306 }
307 else {
308 0 push @list, $export;
309 }
310 }
311 0 $self->{list_export} = \@list;
312 0 $self->_CheckLocal($parser); # specialized
313 0 $self->_CheckNative($parser); # specialized
314 0 return $self;
315 }
316
317 0 ▶sub _CheckNative {
Subroutine _CheckNative: not called CC=1 SCAR=0.0
318 # If a native type is used as an exception for an operation, the
319 # operation must appear in either a local interface or a valuetype.
320 }
321
322 0 ▶sub Lookup {
Subroutine Lookup: not called CC=6 SCAR=37.4
323 0 my $proto = shift;
324 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
325 0 $class = substr $class, rindex($class, ':') + 1;
326 0 my ($parser, $name, $bypass) = @_;
327 0 my $defn = $parser->YYData->{symbtab}->Lookup($name);
328 0 ▶ if (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn) { } 0 0 0
329 0 ▶ if ($defn->isa('Forward' . $class)) {
Branch: 2 branches
BranchTrueFalseTotal
if ($defn->isa('Forward' . $class)) { } 0 0 0
elsif (not $defn->isa($class)) { } 0 0 0
330 0 ▶ $parser->Error("'$name' is declared, but not defined.\n")
Branch: 1 branch
BranchTrueFalseTotal
unless $bypass 0 0 0
331 unless ($bypass);
332 }
333 elsif (! $defn->isa($class)) {
334 0 $parser->Error("'$name' is not a $class.\n");
335 }
336 0 return $defn->{full};
337 }
338 else {
339 0 return q{};
340 }
341 }
342
343 #
344 # 3.8.2 Interface Inheritance Specification
345 #
346
347 package CORBA::IDL::InheritanceSpec;
348
349 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
350
351 0 ▶sub _Init {
Subroutine _Init: not called CC=11 SCAR=48.8
352 0 my $self = shift;
353 0 my ($parser) = @_;
354 0 $self->{hash_interface} = {};
355 0 my %hash;
356 # 3.8.5 Interface Inheritance
357 0 ▶ if (exists $self->{list_interface}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"list_interface"}) 0 0 0
358 0 foreach my $name (@{$self->{list_interface}}) {
359 0 ▶ if (exists $hash{$name}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $hash{$name}) { } 0 0 0
360 0 $parser->Warning("'$name' redeclares inheritance.\n");
361 }
362 else {
363 0 $hash{$name} = 1;
364 0 $self->{hash_interface}->{$name} = 1;
365 0 my $base = $parser->YYData->{symbtab}->Lookup($name);
366 0 ▶ if (exists $base->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $base->{"inheritance"}) 0 0 0
367 0 foreach (keys %{$base->{inheritance}->{hash_interface}}) {
368 0 $self->{hash_interface}->{$_} = 1;
369 }
370 }
371 }
372 }
373 }
374 # 3.9.5 Valuetype Inheritance
375 0 ▶ if (exists $self->{list_value}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"list_value"}) 0 0 0
376 0 foreach my $name (@{$self->{list_value}}) {
377 0 ▶ if (exists $hash{$name}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $hash{$name}) { } 0 0 0
378 0 $parser->Warning("'$name' redeclares inheritance.\n");
379 }
380 else {
381 0 $hash{$name} = 1;
382 0 $self->{hash_interface}->{$name} = 1;
383 0 my $base = $parser->YYData->{symbtab}->Lookup($name);
384 0 ▶ if (exists $base->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $base->{"inheritance"}) 0 0 0
385 0 foreach (keys %{$base->{inheritance}->{hash_interface}}) {
386 0 $self->{hash_interface}->{$_} = 1;
387 }
388 }
389 }
390 }
391 }
392 }
393
394 package CORBA::IDL::Interface;
395
396 1 ▶use base qw(CORBA::IDL::BaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
397
398 package CORBA::IDL::RegularInterface;
399
400 1 ▶use base qw(CORBA::IDL::Interface);
Subroutine BEGIN: called CC=1 SCAR=0.0
401
402 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=4 SCAR=30.0
403 0 my $self = shift;
404 0 my ($parser) = @_;
405 0 ▶ if (exists $self->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}) 0 0 0
406 0 foreach (@{$self->{inheritance}->{list_interface}}) {
407 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
408 # An unconstrained interface may not inherit from a local interface.
409 0 ▶ if ($base->isa('LocalInterface')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($base->isa("LocalInterface")) 0 0 0
410 0 $parser->Error("'$self->{idf}' is not local.\n");
411 }
412 }
413 }
414 }
415
416 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=8 SCAR=42.8
417 0 my $self = shift;
418 0 my ($parser) = @_;
419
420 # A local type may not appear as a parameter, attribute, return type, or exception
421 # declaration of an unconstrained interface or as a state member of a valuetype.
422 0 foreach (@{$self->{list_export}}) {
423 0 my $defn = $parser->YYData->{symbtab}->Lookup($_);
424 0 ▶ if ($defn->isa('Attribute')) {
Branch: 2 branches
BranchTrueFalseTotal
if ($defn->isa('Attribute')) { } 0 0 0
elsif ($defn->isa('Operation')) { } 0 0 0
425 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $defn->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $defn->{"type"})) 0 0 0
426 0 $parser->Error("'$self->{idf}' is not local.\n");
427 }
428 }
429 elsif ($defn->isa('Operation')) {
430 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $defn->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $defn->{"type"})) 0 0 0
431 0 $parser->Error("'$self->{idf}' is not local.\n");
432 }
433 0 foreach (@{$defn->{list_param}}) {
434 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $_->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $_->{"type"})) 0 0 0
435 0 $parser->Error("'$self->{idf}' is not local.\n");
436 }
437 }
438 }
439 }
440 }
441
442 0 ▶sub _CheckNative {
Subroutine _CheckNative: not called CC=5 SCAR=34.0
443 0 my $self = shift;
444 0 my ($parser) = @_;
445
446 # If a native type is used as an exception for an operation, the
447 # operation must appear in either a local interface or a valuetype.
448 0 foreach (@{$self->{list_export}}) {
449 0 my $defn = $parser->YYData->{symbtab}->Lookup($_);
450 0 ▶ if (exists $defn->{list_raise}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $defn->{"list_raise"}) 0 0 0
451 0 foreach (@{$defn->{list_raise}}) {
452 0 my $except = $parser->YYData->{symbtab}->Lookup($_);
453 0 ▶ if ($except->isa('NativeType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($except->isa("NativeType")) 0 0 0
454 0 $parser->Error("'$except->{idf}' used in a not local interface.\n");
455 }
456 }
457 }
458 }
459 }
460
461 #
462 # 3.8.4 Forward Declaration
463 #
464
465 package CORBA::IDL::ForwardBaseInterface;
466
467 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
468
469 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
470 0 my $self = shift;
471 0 my ($parser) = @_;
472 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
473 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
474 0 $self->line_stamp($parser);
475 0 ▶ $self->{local_type} = 1 if ($self->isa('ForwardLocalInterface'));
Branch: 1 branch
BranchTrueFalseTotal
if $self->isa("ForwardLocalInterface") 0 0 0
476 0 $parser->YYData->{symbtab}->InsertForward($self);
477 }
478
479 package CORBA::IDL::ForwardInterface;
480
481 1 ▶use base qw(CORBA::IDL::ForwardBaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
482
483 package CORBA::IDL::ForwardRegularInterface;
484
485 1 ▶use base qw(CORBA::IDL::ForwardInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
486
487 package CORBA::IDL::ForwardAbstractInterface;
488
489 1 ▶use base qw(CORBA::IDL::ForwardInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
490
491 package CORBA::IDL::ForwardLocalInterface;
492
493 1 ▶use base qw(CORBA::IDL::ForwardInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
494
495 #
496 # 3.8.6 Abstract Interface
497 #
498
499 package CORBA::IDL::AbstractInterface;
500
501 1 ▶use base qw(CORBA::IDL::Interface);
Subroutine BEGIN: called CC=1 SCAR=0.0
502
503 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=4 SCAR=30.0
504 0 my $self = shift;
505 0 my ($parser) = @_;
506 0 ▶ if (exists $self->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}) 0 0 0
507 0 foreach (@{$self->{inheritance}->{list_interface}}) {
508 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
509 # (An unconstrained interface may not inherit from a local interface.)
510 # An abstract interface may only inherit from other abstract interfaces.
511 0 ▶ unless ($base->isa('AbstractInterface')) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($base->isa("AbstractInterface")) 0 0 0
512 0 $parser->Error("'$_' is not abstract.\n");
513 }
514 }
515 }
516 }
517
518 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=8 SCAR=42.8
519 0 my $self = shift;
520 0 my ($parser) = @_;
521
522 # A local type may not appear as a parameter, attribute, return type, or exception
523 # declaration of an unconstrained interface or as a state member of a valuetype.
524 0 foreach (@{$self->{list_export}}) {
525 0 my $defn = $parser->YYData->{symbtab}->Lookup($_);
526 0 ▶ if ($defn->isa('Attribute')) {
Branch: 2 branches
BranchTrueFalseTotal
if ($defn->isa('Attribute')) { } 0 0 0
elsif ($defn->isa('Operation')) { } 0 0 0
527 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $defn->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $defn->{"type"})) 0 0 0
528 0 $parser->Error("'$self->{idf}' is not local.\n");
529 }
530 }
531 elsif ($defn->isa('Operation')) {
532 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $defn->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $defn->{"type"})) 0 0 0
533 0 $parser->Error("'$self->{idf}' is not local.\n");
534 }
535 0 foreach (@{$defn->{list_param}}) {
536 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $_->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $_->{"type"})) 0 0 0
537 0 $parser->Error("'$self->{idf}' is not local.\n");
538 }
539 }
540 }
541 }
542 }
543
544 0 ▶sub _CheckNative {
Subroutine _CheckNative: not called CC=5 SCAR=34.0
545 0 my $self = shift;
546 0 my ($parser) = @_;
547
548 # If a native type is used as an exception for an operation, the
549 # operation must appear in either a local interface or a valuetype.
550 0 foreach (@{$self->{list_export}}) {
551 0 my $defn = $parser->YYData->{symbtab}->Lookup($_);
552 0 ▶ if (exists $defn->{list_raise}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $defn->{"list_raise"}) 0 0 0
553 0 foreach (@{$defn->{list_raise}}) {
554 0 my $except = $parser->YYData->{symbtab}->Lookup($_);
555 0 ▶ if ($except->isa('NativeType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($except->isa("NativeType")) 0 0 0
556 0 $parser->Error("'$except->{idf}' used in a not local interface.\n");
557 }
558 }
559 }
560 }
561 }
562
563 #
564 # 3.8.7 Local Interface
565 #
566
567 package CORBA::IDL::LocalInterface;
568
569 1 ▶use base qw(CORBA::IDL::Interface);
Subroutine BEGIN: called CC=1 SCAR=0.0
570
571 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=1 SCAR=0.0
572 # A local interface may inherit from other local or unconstrained interfaces
573 }
574
575 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=1 SCAR=0.0
576 # Any IDL type, including an unconstrained interface, may appear as a parameter,
577 # attribute, return type, or exception declaration of a local interface.
578
579 # A local type may be used as a parameter, attribute, return type, or exception
580 # declaration of a local interface or of a valuetype.
581 }
582
583 #
584 # 3.9 Value Declaration
585 #
586
587 package CORBA::IDL::Value;
588
589 1 ▶use base qw(CORBA::IDL::BaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
590
591 # 3.9.1 Regular Value Type
592 #
593
594 package CORBA::IDL::RegularValue;
595
596 1 ▶use base qw(CORBA::IDL::Value);
Subroutine BEGIN: called CC=1 SCAR=0.0
597
598 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=13 SCAR=52.0
599 0 my $self = shift;
600 0 my ($parser) = @_;
601 0 ▶ if (exists $self->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}) 0 0 0
602 0 ▶ if ( exists $self->{inheritance}->{modifier} # truncatable
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"modifier"} and exists $self->{"modifier"}) 0 0 0
Condition0%0/3
exists $self->{"inheritance"}{"modifier"} and exists $self->{"modifier"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $self->{"inheritance"}{"modifier"} and exists $self->{"modifier"}
exists $self->{"inheritance"}{"modifier"} exists $self->{"modifier"}
Truth table0%0/3
A and B
A= exists $self->{"inheritance"}{"modifier"}B= exists $self->{"modifier"}
ABresult
0X0
100
111
603 and exists $self->{modifier} ) { # custom
604 0 $parser->Error("'truncatable' is used in a custom value.\n");
605 }
606 0 ▶ if (exists $self->{inheritance}->{list_interface}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"list_interface"}) 0 0 0
607 0 my $nb = 0;
608 0 foreach (@{$self->{inheritance}->{list_interface}}) {
609 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
610 0 ▶ if ($base->isa('RegularInterface')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($base->isa("RegularInterface")) 0 0 0
611 0 $nb ++;
612 }
613 }
614 0 ▶ $parser->Error("'$self->{idf}' inherits from more than once regular interface.\n")
Branch: 1 branch
BranchTrueFalseTotal
if $nb > 1 0 0 0
615 if ($nb > 1);
616 }
617 0 ▶ if (exists $self->{inheritance}->{list_value}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"list_value"}) 0 0 0
618 0 my $nb = 0;
619 0 foreach (@{$self->{inheritance}->{list_value}}) {
620 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
621 0 ▶ if ($base->isa('RegularValue')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($base->isa("RegularValue")) 0 0 0
622 0 $nb ++;
623 }
624 0 ▶ if ($base->isa('BoxedValue')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($base->isa("BoxedValue")) 0 0 0
625 0 $parser->Error("'$_' is a boxed value.\n")
626 }
627 }
628 0 ▶ $parser->Error("'$self->{idf}' inherits from more than once regular value.\n")
Branch: 1 branch
BranchTrueFalseTotal
if $nb > 1 0 0 0
629 if ($nb > 1);
630 }
631 }
632 }
633
634 0 ▶sub Configure {
Subroutine Configure: not called CC=5 SCAR=34.0
635 0 my $self = shift;
636 0 my $parser = shift;
637 0 $self->SUPER::Configure($parser, @_);
638 0 my @list;
639 0 foreach my $value_element (@{$self->{list_decl}}) {
640 0 ▶ next unless (ref $value_element eq 'CORBA::IDL::StateMembers');
Branch: 1 branch
BranchTrueFalseTotal
unless ref $value_element eq "CORBA::IDL::StateMembers" 0 0 0
641 0 foreach (@{$value_element->{list_decl}}) {
642 0 push @list, $_;
643 0 ▶ $self->{deprecated} = 1 if (CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $_));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsDeprecated($parser, $_) 0 0 0
644 }
645 }
646 0 $self->configure(list_member => \@list); # list of 'StateMember'
647 0 return $self;
648 }
649
650 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=1 SCAR=0.0
651 # A local type may be used as a parameter, attribute, return type, or exception
652 # declaration of a local interface or of a valuetype.
653 }
654
655 #
656 # 3.9.1.4 State Members
657 #
658
659 package CORBA::IDL::StateMembers;
660
661 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
662
663 0 ▶sub _Init {
Subroutine _Init: not called CC=7 SCAR=40.3
664 0 my $self = shift;
665 0 my ($parser) = @_;
666 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $self->{type});
667 0 CORBA::IDL::TypeDeclarator->CheckForward($parser, $self->{type});
668 0 my @list;
669 0 foreach (@{$self->{list_expr}}) {
670 0 my $member;
671 0 my @array_size = @{$_};
672 0 my $idf = shift @array_size;
673 0 ▶ if (@array_size) {
Branch: 1 branch
BranchTrueFalseTotal
if (@array_size) { } 0 0 0
674 $member = new CORBA::IDL::StateMember($parser,
675 declspec => $self->{declspec},
676 props => $self->{props},
677 modifier => $self->{modifier},
678 type => $self->{type},
679 0 idf => $idf,
680 array_size => \@array_size,
681 deprecated => 1,
682 );
683 0 ▶ $parser->Deprecated("Anonymous type (array).\n")
Branch: 1 branch
BranchTrueFalseTotal
if $CORBA::IDL::Parser::IDL_VERSION ge "2.4" 0 0 0
684 if ($CORBA::IDL::Parser::IDL_VERSION ge '2.4');
685 }
686 else {
687 $member = new CORBA::IDL::StateMember($parser,
688 declspec => $self->{declspec},
689 props => $self->{props},
690 modifier => $self->{modifier},
691 type => $self->{type},
692 idf => $idf,
693 0 deprecated => CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $self->{type}),
694 );
695 }
696 0 push @list, $member->{full};
697 }
698 0 $self->configure(list_decl => \@list);
699 # A local type may not appear as a parameter, attribute, return type, or exception
700 # declaration of an unconstrained interface or as a state member of a valuetype.
701 0 ▶ if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $self->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ("CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $self->{"type"})) 0 0 0
702 0 ▶ my $idf = $self->{type}->{idf} if (exists $self->{type}->{idf});
Branch: 1 branch
BranchTrueFalseTotal
if exists $self->{"type"}{"idf"} 0 0 0
703 0 ▶ $idf ||= $self->{type};
Condition0%0/3
$idf ||= $self->{"type"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$idf ||= $self->{"type"}
$idf $self->{"type"}
Truth table0%0/3
A ||= B
A= $idfB= $self->{"type"}
ABresult
1X1
011
000
704 0 $parser->Error("'$idf' is local.\n");
705 }
706 }
707
708 package CORBA::IDL::StateMember; # modifier, idf, type[, array_size]
709
710 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
711
712 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
713 0 my $self = shift;
714 0 my ($parser) = @_;
715 0 $parser->YYData->{symbtab}->Insert($self);
716 0 ▶ if (defined $parser->YYData->{curr_itf}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $parser->YYData->{'curr_itf'}) { } 0 0 0
717 $parser->YYData->{curr_itf}->{hash_attribute_operation}{$self->{idf}} = $self->{full}
718 0 }
719 else {
720 0 $parser->Error(__PACKAGE__ . "::new ERROR_INTERNAL.\n");
721 }
722 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
723 0 $self->{doc} = $parser->YYData->{doc};
724 0 $parser->YYData->{doc} = q{};
725 }
726 0 $parser->YYData->{curr_node} = $self;
727 }
728
729 #
730 # 3.9.1.5 Initializers
731 #
732
733 package CORBA::IDL::Initializer;
734
735 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
736
737 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
738 0 my $self = shift;
739 0 my ($parser) = @_;
740 0 $parser->YYData->{symbtab}->Insert($self);
741 0 $parser->YYData->{unnamed_symbtab} = new CORBA::IDL::UnnamedSymbtab($parser);
742 0 ▶ if (defined $parser->YYData->{curr_itf}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $parser->YYData->{'curr_itf'}) { } 0 0 0
743 0 $self->{itf} = $parser->YYData->{curr_itf}->{full};
744 $parser->YYData->{curr_itf}->{hash_attribute_operation}{$self->{idf}} = $self->{full}
745 0 }
746 else {
747 0 $parser->Error(__PACKAGE__ . "::new ERROR_INTERNAL.\n");
748 }
749 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
750 0 $self->{doc} = $parser->YYData->{doc};
751 0 $parser->YYData->{doc} = q{};
752 }
753 0 $parser->YYData->{curr_node} = $self;
754 }
755
756 0 ▶sub Configure {
Subroutine Configure: not called CC=3 SCAR=24.8
757 0 my $self = shift;
758 0 my $parser = shift;
759 0 $self->configure(@_);
760 0 my @list_in = ();
761 0 foreach ( @{$self->{list_param}} ) {
762 0 ▶ if ($_->{attr} eq 'in') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_->{"attr"} eq "in") 0 0 0
763 0 unshift @list_in, $_;
764 }
765 }
766 0 $self->{list_in} = \@list_in;
767 0 $self->{list_inout} = [];
768 0 $self->{list_out} = [];
769 0 return $self;
770 }
771
772 #
773 # 3.9.2 Boxed Value Type
774 #
775 package CORBA::IDL::BoxedValue;
776
777 1 ▶use base qw(CORBA::IDL::Value);
Subroutine BEGIN: called CC=1 SCAR=0.0
778
779 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
780 0 my $self = shift;
781 0 my ($parser) = @_;
782 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
783 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
784 0 $self->line_stamp($parser);
785 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
786 0 $self->{doc} = $parser->YYData->{doc};
787 0 $parser->YYData->{doc} = q{};
788 }
789 0 $parser->YYData->{symbtab}->PushCurrentScope($self);
790 0 $parser->YYData->{curr_itf} = $self;
791 0 $parser->YYData->{curr_node} = $self;
792 }
793
794 0 ▶sub Configure {
Subroutine Configure: not called CC=4 SCAR=30.0
795 0 my $self = shift;
796 0 my $parser = shift;
797 0 $self->configure(@_);
798 0 my $type = CORBA::IDL::TypeDeclarator->GetDefn($parser, $self->{type});
799 0 ▶ if ($type->isa('Value')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa("Value")) 0 0 0
800 0 ▶ if ($CORBA::IDL::Parser::IDL_VERSION ge '3.0') {
Branch: 1 branch
BranchTrueFalseTotal
if ($CORBA::IDL::Parser::IDL_VERSION ge '3.0') { } 0 0 0
801 0 $parser->Error("$self->{type}->{idf} is a value type.\n");
802 }
803 else {
804 0 $parser->Info("$self->{type}->{idf} is a value type.\n");
805 }
806 }
807 0 ▶ $self->{deprecated} = 1 if (CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $type));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsDeprecated($parser, $type) 0 0 0
808 0 return $self;
809 }
810
811 #
812 # 3.9.3 Abstract Value Type
813 #
814
815 package CORBA::IDL::AbstractValue;
816
817 1 ▶use base qw(CORBA::IDL::Value);
Subroutine BEGIN: called CC=1 SCAR=0.0
818
819 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=9 SCAR=45.0
820 0 my $self = shift;
821 0 my ($parser) = @_;
822 0 ▶ if (exists $self->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}) 0 0 0
823 0 ▶ if (exists $self->{inheritance}->{list_interface}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"list_interface"}) 0 0 0
824 0 my $nb = 0;
825 0 foreach (@{$self->{inheritance}->{list_interface}}) {
826 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
827 0 ▶ if ($base->isa('RegularInterface')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($base->isa("RegularInterface")) 0 0 0
828 0 $nb ++;
829 }
830 }
831 0 ▶ $parser->Error("'$self->{idf}' inherits from more than once regular interface.\n")
Branch: 1 branch
BranchTrueFalseTotal
if $nb > 1 0 0 0
832 if ($nb > 1);
833 }
834 0 ▶ if (exists $self->{inheritance}->{list_value}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"list_value"}) 0 0 0
835 0 foreach (@{$self->{inheritance}->{list_value}}) {
836 0 my $base = $parser->YYData->{symbtab}->Lookup($_);
837 0 ▶ unless ($base->isa('AbstractValue')) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($base->isa("AbstractValue")) 0 0 0
838 0 $parser->Error("'$_' is not abstract value.\n");
839 }
840 }
841 }
842 }
843 }
844
845 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=1 SCAR=0.0
846 # A local type may be used as a parameter, attribute, return type, or exception
847 # declaration of a local interface or of a valuetype.
848 }
849
850 #
851 # 3.9.4 Value Forward Declaration
852 #
853
854 package CORBA::IDL::ForwardValue;
855
856 1 ▶use base qw(CORBA::IDL::ForwardBaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
857
858 package CORBA::IDL::ForwardRegularValue;
859
860 1 ▶use base qw(CORBA::IDL::ForwardValue);
Subroutine BEGIN: called CC=1 SCAR=0.0
861
862 package CORBA::IDL::ForwardAbstractValue;
863
864 1 ▶use base qw(CORBA::IDL::ForwardValue);
Subroutine BEGIN: called CC=1 SCAR=0.0
865
866 #
867 # 3.10 Constant Declaration
868 #
869
870 package CORBA::IDL::Expression;
871
872 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
873
874 0 ▶sub _Init {
Subroutine _Init: not called CC=9 SCAR=45.0
875 0 my $self = shift;
876 0 my ($parser) = @_;
877 0 ▶ if ( ! exists $self->{type} ) {
Branch: 2 branches
BranchTrueFalseTotal
if (not exists $self->{'type'}) { } 0 0 0
elsif (@{$self->{'list_expr'};} == 1 and defined $self->{'list_expr'}[0]) { } 0 0 0
878 0 $self->configure(
879 type => new CORBA::IDL::IntegerType($parser,
880 value => 'unsigned long',
881 auto => 1
882 )
883 );
884 }
885 0 ▶ elsif ( @{$self->{list_expr}} == 1
Condition0%0/3
@{$self->{"list_expr"};} == 1 and defined $self->{"list_expr"}[0]
!ll&&!rl&&r
000
MC/DC0%0/2
@{$self->{"list_expr"};} == 1 and defined $self->{"list_expr"}[0]
@{$self->{"list_expr"};} == 1 defined $self->{"list_expr"}[0]
Truth table0%0/3
A and B
A= @{$self->{"list_expr"};} == 1B= defined $self->{"list_expr"}[0]
ABresult
0X0
100
111
886 and defined $self->{list_expr}[0] ) {
887 0 ▶ if (ref $self->{type}) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $self->{"type"}) 0 0 0
888 0 my $expr = $self->{list_expr}[0];
889 0 ▶ if ( $self->{type}->isa('WideCharType')
Branch: 2 branches
BranchTrueFalseTotal
if ($self->{'type'}->isa('WideCharType') and $expr->isa('CharacterLiteral')) { } 0 0 0
elsif ($self->{'type'}->isa('WideStringType') and $expr->isa('StringLiteral')) { } 0 0 0
Condition0%0/3
$self->{"type"}->isa("WideCharType") and $expr->isa("CharacterLiteral")
!ll&&!rl&&r
000
MC/DC0%0/2
$self->{"type"}->isa("WideCharType") and $expr->isa("CharacterLiteral")
$self->{"type"}->isa("WideCharType") $expr->isa("CharacterLiteral")
Truth table0%0/3
A and B
A= $self->{"type"}->isa("WideCharType")B= $expr->isa("CharacterLiteral")
ABresult
0X0
100
111
890 and $expr->isa('CharacterLiteral') ) {
891 $self->{list_expr} = [
892 new CORBA::IDL::WideCharacterLiteral($parser,
893 value => $expr->{value}
894 )
895 0 ];
896 }
897 ▶ elsif ( $self->{type}->isa('WideStringType')
Condition0%0/3
$self->{"type"}->isa("WideStringType") and $expr->isa("StringLiteral")
!ll&&!rl&&r
000
MC/DC0%0/2
$self->{"type"}->isa("WideStringType") and $expr->isa("StringLiteral")
$self->{"type"}->isa("WideStringType") $expr->isa("StringLiteral")
Truth table0%0/3
A and B
A= $self->{"type"}->isa("WideStringType")B= $expr->isa("StringLiteral")
ABresult
0X0
100
111
898 and $expr->isa('StringLiteral') ) {
899 $self->{list_expr} = [
900 new CORBA::IDL::WideStringLiteral($parser,
901 value => $expr->{value}
902 )
903 0 ];
904 }
905 }
906 }
907 $self->configure(
908 0 value => $self->Eval($parser)
909 );
910 }
911
912 1 ▶use Math::BigInt;
Subroutine BEGIN: called CC=1 SCAR=0.0
913 1 ▶use Math::BigFloat;
Subroutine BEGIN: called CC=1 SCAR=0.0
914
915 1 ▶use constant UCHAR_MAX => new Math::BigInt( '255');
Subroutine BEGIN: called CC=1 SCAR=0.0
916 1 ▶use constant SHRT_MIN => new Math::BigInt( '-32768');
Subroutine BEGIN: called CC=1 SCAR=0.0
917 1 ▶use constant SHRT_MAX => new Math::BigInt( '32767');
Subroutine BEGIN: called CC=1 SCAR=0.0
918 1 ▶use constant USHRT_MAX => new Math::BigInt( '65535');
Subroutine BEGIN: called CC=1 SCAR=0.0
919 1 ▶use constant LONG_MIN => new Math::BigInt( '-2147483648');
Subroutine BEGIN: called CC=1 SCAR=0.0
920 1 ▶use constant LONG_MAX => new Math::BigInt( '2147483647');
Subroutine BEGIN: called CC=1 SCAR=0.0
921 1 ▶use constant ULONG_MAX => new Math::BigInt( '4294967295');
Subroutine BEGIN: called CC=1 SCAR=0.0
922 1 ▶use constant LLONG_MIN => new Math::BigInt('-9223372036854775808');
Subroutine BEGIN: called CC=1 SCAR=0.0
923 1 ▶use constant LLONG_MAX => new Math::BigInt( '9223372036854775807');
Subroutine BEGIN: called CC=1 SCAR=0.0
924 1 ▶use constant ULLONG_MAX => new Math::BigInt('18446744073709551615');
Subroutine BEGIN: called CC=1 SCAR=0.0
925 1 ▶use constant FLT_MAX => new Math::BigFloat( '3.40282347e+38' );
Subroutine BEGIN: called CC=1 SCAR=0.0
926 1 ▶use constant DBL_MAX => new Math::BigFloat('1.79769313486231571e+308');
Subroutine BEGIN: called CC=1 SCAR=0.0
927 1 ▶use constant LDBL_MAX => new Math::BigFloat('1.79769313486231571e+308');
Subroutine BEGIN: called CC=1 SCAR=0.0
928 1 ▶use constant FLT_MIN => new Math::BigFloat( '1.17549435e-38' );
Subroutine BEGIN: called CC=1 SCAR=0.0
929 1 ▶use constant DBL_MIN => new Math::BigFloat('2.22507385850720138e-308');
Subroutine BEGIN: called CC=1 SCAR=0.0
930 1 ▶use constant LDBL_MIN => new Math::BigFloat('2.22507385850720138e-308');
Subroutine BEGIN: called CC=1 SCAR=0.0
931
932 0 ▶sub Eval {
Subroutine Eval: not called CC=2 SCAR=17.9
933 0 my $self = shift;
934 0 my ($parser) = @_;
935 0 my @list_expr = @{$self->{list_expr}}; # create a copy
936 0 my $type = CORBA::IDL::TypeDeclarator->GetEffectiveType($parser, $self->{type});
937 0 ▶ if (defined $type) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $type) { } 0 0 0
938 0 return _Eval($parser, $type, \@list_expr);
939 }
940 else {
941 0 return 0;
942 }
943 }
944
945 0 ▶sub _EvalBinop {
Subroutine _EvalBinop: not called CC=45 SCAR=76.4
946 0 my ($parser, $type, $elt, $list_expr, $bypass) = @_;
947 0 ▶ if ( $type->isa('IntegerType')
Branch: 3 branches
BranchTrueFalseTotal
if ($type->isa('IntegerType') or $type->isa('OctetType')) { } 0 0 0
elsif ($type->isa('FloatingPtType')) { } 0 0 0
elsif ($type->isa('FixedPtConstType')) { } 0 0 0
Condition0%0/3
$type->isa("IntegerType") or $type->isa("OctetType")
l!l&&r!l&&!r
000
MC/DC0%0/2
$type->isa("IntegerType") or $type->isa("OctetType")
$type->isa("IntegerType") $type->isa("OctetType")
Truth table0%0/3
A or B
A= $type->isa("IntegerType")B= $type->isa("OctetType")
ABresult
1X1
011
000
948 or $type->isa('OctetType') ) {
949 0 my $right = _Eval($parser, $type, $list_expr, 1);
950 0 ▶ return undef unless (defined $right);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $right 0 0 0
951 0 my $left = _Eval($parser, $type, $list_expr, 1);
952 0 ▶ return undef unless (defined $left);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $left 0 0 0
953 0 my $value = new Math::BigInt($left);
954 0 ▶ if ( $elt->{op} eq '|' ) {
Branch: 10 branches
BranchTrueFalseTotal
if ($elt->{'op'} eq '|') { } 0 0 0
elsif ($elt->{'op'} eq '^') { } 0 0 0
elsif ($elt->{'op'} eq '&') { } 0 0 0
elsif ($elt->{'op'} eq '+') { } 0 0 0
elsif ($elt->{'op'} eq '-') { } 0 0 0
elsif ($elt->{'op'} eq '*') { } 0 0 0
elsif ($elt->{'op'} eq '/') { } 0 0 0
elsif ($elt->{'op'} eq '%') { } 0 0 0
elsif ($elt->{'op'} eq '>>') { } 0 0 0
elsif ($elt->{'op'} eq '<<') { } 0 0 0
955 0 $value->bior($right);
956 0 return _CheckRange($parser, $type, $value, $bypass);
957 }
958 elsif ( $elt->{op} eq '^' ) {
959 0 $value->bxor($right);
960 0 return _CheckRange($parser, $type, $value, $bypass);
961 }
962 elsif ( $elt->{op} eq '&' ) {
963 0 $value->band($right);
964 0 return _CheckRange($parser, $type, $value, $bypass);
965 }
966 elsif ( $elt->{op} eq '+' ) {
967 0 $value->badd($right);
968 0 return _CheckRange($parser, $type, $value, $bypass);
969 }
970 elsif ( $elt->{op} eq '-' ) {
971 0 $value->bsub($right);
972 0 return _CheckRange($parser, $type, $value, $bypass);
973 }
974 elsif ( $elt->{op} eq '*' ) {
975 0 $value->bmul($right);
976 0 return _CheckRange($parser, $type, $value, $bypass);
977 }
978 elsif ( $elt->{op} eq '/' ) {
979 0 $value->bdiv($right);
980 0 return _CheckRange($parser, $type, $value, $bypass);
981 }
982 elsif ( $elt->{op} eq '%' ) {
983 0 $value->bmod($right);
984 0 return _CheckRange($parser, $type, $value, $bypass);
985 }
986 elsif ( $elt->{op} eq '>>' ) {
987 0 ▶ if (0 <= $right and $right < 64) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 <= $right and $right < 64) { } 0 0 0
Condition0%0/3
0 <= $right and $right < 64
!ll&&!rl&&r
000
MC/DC0%0/2
0 <= $right and $right < 64
0 <= $right $right < 64
Truth table0%0/3
A and B
A= 0 <= $rightB= $right < 64
ABresult
0X0
100
111
988 0 $value->brsft($right);
989 0 return _CheckRange($parser, $type, $value, $bypass);
990 }
991 else {
992 0 $parser->Error("shift operation out of range.\n");
993 0 return undef;
994 }
995 }
996 elsif ( $elt->{op} eq '<<' ) {
997 0 ▶ if (0 <= $right and $right < 64) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 <= $right and $right < 64) { } 0 0 0
Condition0%0/3
0 <= $right and $right < 64
!ll&&!rl&&r
000
MC/DC0%0/2
0 <= $right and $right < 64
0 <= $right $right < 64
Truth table0%0/3
A and B
A= 0 <= $rightB= $right < 64
ABresult
0X0
100
111
998 0 $value->blsft($right);
999 0 return _CheckRange($parser, $type, $value, $bypass);
1000 }
1001 else {
1002 0 $parser->Error("shift operation out of range.\n");
1003 0 return undef;
1004 }
1005 }
1006 else {
1007 0 $parser->Error("_BinopEval (int) : INTERNAL ERROR.\n");
1008 0 return undef;
1009 }
1010 }
1011 elsif ( $type->isa('FloatingPtType') ) {
1012 0 my $right = _Eval($parser, $type, $list_expr);
1013 0 ▶ return undef unless (defined $right);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $right 0 0 0
1014 0 my $left = _Eval($parser, $type, $list_expr);
1015 0 ▶ return undef unless (defined $left);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $left 0 0 0
1016 0 my $value = new Math::BigFloat($left);
1017 0 ▶ if ( $elt->{op} eq '+' ) {
Branch: 5 branches
BranchTrueFalseTotal
if ($elt->{'op'} eq '+') { } 0 0 0
elsif ($elt->{'op'} eq '-') { } 0 0 0
elsif ($elt->{'op'} eq '*') { } 0 0 0
elsif ($elt->{'op'} eq '/') { } 0 0 0
elsif ($elt->{'op'} eq '|' or $elt->{'op'} eq '^' or $elt->{'op'} eq '&' or $elt->{'op'} eq '>>' or $elt->{'op'} eq '<<' or $elt->{'op'} eq '%') { } 0 0 0
1018 0 $value->fadd($right);
1019 0 return _CheckRange($parser, $type, $value);
1020 }
1021 elsif ( $elt->{op} eq '-' ) {
1022 0 $value->fsub($right);
1023 0 return _CheckRange($parser, $type, $value);
1024 }
1025 elsif ( $elt->{op} eq '*' ) {
1026 0 $value->fmul($right);
1027 0 return _CheckRange($parser, $type, $value);
1028 }
1029 elsif ( $elt->{op} eq '/' ) {
1030 0 $value->fdiv($right);
1031 0 return _CheckRange($parser, $type, $value);
1032 }
1033 ▶ elsif ( $elt->{op} eq '|'
Condition0%0/15
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>" or $elt->{"op"} eq "<<" or $elt->{"op"} eq "%"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>" or $elt->{"op"} eq "<<"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^"
l!l&&r!l&&!r
000
MC/DC0%0/6
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>" or $elt->{"op"} eq "<<" or $elt->{"op"} eq "%"
$elt->{"op"} eq "|" $elt->{"op"} eq "^" $elt->{"op"} eq "&" $elt->{"op"} eq ">>" $elt->{"op"} eq "<<" $elt->{"op"} eq "%"
Truth table0%0/7
A or B or C or D or E or F
A= $elt->{"op"} eq "|"B= $elt->{"op"} eq "^"C= $elt->{"op"} eq "&"D= $elt->{"op"} eq ">>"E= $elt->{"op"} eq "<<"F= $elt->{"op"} eq "%"
ABCDEFresult
1XXXXX1
01XXXX1
001XXX1
0001XX1
00001X1
0000011
0000000
1034 or $elt->{op} eq '^'
1035 or $elt->{op} eq '&'
1036 or $elt->{op} eq '>>'
1037 or $elt->{op} eq '<<'
1038 or $elt->{op} eq '%' ) {
1039 0 $parser->Error("'$elt->{op}' is not valid for '$type'.\n");
1040 }
1041 else {
1042 0 $parser->Error("_EvalBinop (fp) : INTERNAL ERROR.\n");
1043 0 return undef;
1044 }
1045 }
1046 elsif ( $type->isa('FixedPtConstType') ) {
1047 0 my $right = _Eval($parser, $type, $list_expr);
1048 0 ▶ return undef unless (defined $right);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $right 0 0 0
1049 0 my $left = _Eval($parser, $type, $list_expr);
1050 0 ▶ return undef unless (defined $left);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $left 0 0 0
1051 0 my $value = new Math::BigFloat($left);
1052 0 ▶ if ( $elt->{op} eq '+' ) {
Branch: 5 branches
BranchTrueFalseTotal
if ($elt->{'op'} eq '+') { } 0 0 0
elsif ($elt->{'op'} eq '-') { } 0 0 0
elsif ($elt->{'op'} eq '*') { } 0 0 0
elsif ($elt->{'op'} eq '/') { } 0 0 0
elsif ($elt->{'op'} eq '|' or $elt->{'op'} eq '^' or $elt->{'op'} eq '&' or $elt->{'op'} eq '>>' or $elt->{'op'} eq '<<' or $elt->{'op'} eq '%') { } 0 0 0
1053 0 $value->fadd($right);
1054 0 return _CheckRange($parser, $type, $value);
1055 }
1056 elsif ( $elt->{op} eq '-' ) {
1057 0 $value->fsub($right);
1058 0 return _CheckRange($parser, $type, $value);
1059 }
1060 elsif ( $elt->{op} eq '*' ) {
1061 0 $value->fmul($right);
1062 0 return _CheckRange($parser, $type, $value);
1063 }
1064 elsif ( $elt->{op} eq '/' ) {
1065 0 $value->fdiv($right);
1066 0 return _CheckRange($parser, $type, $value);
1067 }
1068 ▶ elsif ( $elt->{op} eq '|'
Condition0%0/15
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>" or $elt->{"op"} eq "<<" or $elt->{"op"} eq "%"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>" or $elt->{"op"} eq "<<"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&"
l!l&&r!l&&!r
000
$elt->{"op"} eq "|" or $elt->{"op"} eq "^"
l!l&&r!l&&!r
000
MC/DC0%0/6
$elt->{"op"} eq "|" or $elt->{"op"} eq "^" or $elt->{"op"} eq "&" or $elt->{"op"} eq ">>" or $elt->{"op"} eq "<<" or $elt->{"op"} eq "%"
$elt->{"op"} eq "|" $elt->{"op"} eq "^" $elt->{"op"} eq "&" $elt->{"op"} eq ">>" $elt->{"op"} eq "<<" $elt->{"op"} eq "%"
Truth table0%0/7
A or B or C or D or E or F
A= $elt->{"op"} eq "|"B= $elt->{"op"} eq "^"C= $elt->{"op"} eq "&"D= $elt->{"op"} eq ">>"E= $elt->{"op"} eq "<<"F= $elt->{"op"} eq "%"
ABCDEFresult
1XXXXX1
01XXXX1
001XXX1
0001XX1
00001X1
0000011
0000000
1069 or $elt->{op} eq '^'
1070 or $elt->{op} eq '&'
1071 or $elt->{op} eq '>>'
1072 or $elt->{op} eq '<<'
1073 or $elt->{op} eq '%' ) {
1074 0 $parser->Error("'$elt->{op}' is not valid for '$type'.\n");
1075 0 return undef;
1076 }
1077 else {
1078 0 $parser->Error("_EvalBinop (fixed) : INTERNAL ERROR.\n");
1079 0 return undef;
1080 }
1081 }
1082 else {
1083 0 $parser->Error("'$type->{value}' can't use expression.\n");
1084 0 return undef;
1085 }
1086 }
1087
1088 0 ▶sub _EvalUnop {
Subroutine _EvalUnop: not called CC=24 SCAR=64.0
1089 0 my ($parser, $type, $elt, $list_expr, $bypass) = @_;
1090 0 ▶ if ( $type->isa('IntegerType')
Branch: 3 branches
BranchTrueFalseTotal
if ($type->isa('IntegerType') or $type->isa('OctetType')) { } 0 0 0
elsif ($type->isa('FloatingPtType')) { } 0 0 0
elsif ($type->isa('FixedPtConstType')) { } 0 0 0
Condition0%0/3
$type->isa("IntegerType") or $type->isa("OctetType")
l!l&&r!l&&!r
000
MC/DC0%0/2
$type->isa("IntegerType") or $type->isa("OctetType")
$type->isa("IntegerType") $type->isa("OctetType")
Truth table0%0/3
A or B
A= $type->isa("IntegerType")B= $type->isa("OctetType")
ABresult
1X1
011
000
1091 or $type->isa('OctetType') ) {
1092 0 my $right = _Eval($parser, $type, $list_expr, 1);
1093 0 ▶ return undef unless (defined $right);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $right 0 0 0
1094 0 my $value = new Math::BigInt($right);
1095 0 ▶ if ( $elt->{op} eq '+' ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($elt->{'op'} eq '+') { } 0 0 0
elsif ($elt->{'op'} eq '-') { } 0 0 0
elsif ($elt->{'op'} eq '~') { } 0 0 0
1096 0 return _CheckRange($parser, $type, $right, $bypass);
1097 }
1098 elsif ( $elt->{op} eq '-' ) {
1099 0 $value->bneg();
1100 0 return _CheckRange($parser, $type, $value, $bypass);
1101 }
1102 elsif ( $elt->{op} eq '~' ) {
1103 0 my $cpl;
1104 0 ▶ if ($type->{value} eq 'short') {
Branch: 7 branches
BranchTrueFalseTotal
if ($type->{'value'} eq 'short') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned short') { } 0 0 0
elsif ($type->{'value'} eq 'long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long') { } 0 0 0
elsif ($type->{'value'} eq 'long long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long long') { } 0 0 0
elsif ($type->{'value'} eq 'octet') { } 0 0 0
1105 0 $cpl = USHRT_MAX;
1106 }
1107 elsif ($type->{value} eq 'unsigned short') {
1108 0 $cpl = USHRT_MAX;
1109 }
1110 elsif ($type->{value} eq 'long') {
1111 0 $cpl = ULONG_MAX;
1112 }
1113 elsif ($type->{value} eq 'unsigned long') {
1114 0 $cpl = ULONG_MAX;
1115 }
1116 elsif ($type->{value} eq 'long long') {
1117 0 $cpl = ULLONG_MAX;
1118 }
1119 elsif ($type->{value} eq 'unsigned long long') {
1120 0 $cpl = ULLONG_MAX;
1121 }
1122 elsif ($type->{value} eq 'octet') {
1123 0 $cpl = UCHAR_MAX;
1124 }
1125 0 $value->bxor($cpl);
1126 0 return _CheckRange($parser, $type, $value, $bypass);
1127 }
1128 else {
1129 0 $parser->Error("_EvalUnop (int) : INTERNAL ERROR.\n");
1130 0 return undef;
1131 }
1132 }
1133 elsif ( $type->isa('FloatingPtType') ) {
1134 0 my $right = _Eval($parser, $type, $list_expr);
1135 0 ▶ return undef unless (defined $right);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $right 0 0 0
1136 0 my $value = new Math::BigFloat($right);
1137 0 ▶ if ( $elt->{op} eq '+' ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($elt->{'op'} eq '+') { } 0 0 0
elsif ($elt->{'op'} eq '-') { } 0 0 0
elsif ($elt->{'op'} eq '~') { } 0 0 0
1138 0 return _CheckRange($parser, $type, $right);
1139 }
1140 elsif ( $elt->{op} eq '-' ) {
1141 0 $value->fneg();
1142 0 return _CheckRange($parser, $type, $value);
1143 }
1144 elsif ( $elt->{op} eq '~' ) {
1145 0 $parser->Error("'$elt->{op}' is not valid for '$type'.\n");
1146 0 return undef;
1147 }
1148 else {
1149 0 $parser->Error("_EvalUnop (fp) : INTERNAL ERROR.\n");
1150 0 return undef;
1151 }
1152 }
1153 elsif ( $type->isa('FixedPtConstType') ) {
1154 0 my $right = _Eval($parser, $type, $list_expr);
1155 0 ▶ return undef unless (defined $right);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $right 0 0 0
1156 0 my $value = new Math::BigFloat($right);
1157 0 ▶ if ( $elt->{op} eq '+' ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($elt->{'op'} eq '+') { } 0 0 0
elsif ($elt->{'op'} eq '-') { } 0 0 0
elsif ($elt->{'op'} eq '~') { } 0 0 0
1158 0 return _CheckRange($parser, $type, $right);
1159 }
1160 elsif ( $elt->{op} eq '-' ) {
1161 0 $value->fneg();
1162 0 return _CheckRange($parser, $type, $value);
1163 }
1164 elsif ( $elt->{op} eq '~' ) {
1165 0 $parser->Error("'$elt->{op}' is not valid for '$type'.\n");
1166 0 return undef;
1167 }
1168 else {
1169 0 $parser->Error("_EvalUnop (fixed) : INTERNAL ERROR.\n");
1170 0 return undef;
1171 }
1172 }
1173 else {
1174 0 $parser->Error("'$type->{value}' can't use expression.\n");
1175 0 return undef;
1176 }
1177 }
1178
1179 0 ▶sub _Eval {
Subroutine _Eval: not called CC=30 SCAR=68.4
1180 0 my ($parser, $type, $list_expr, $bypass) = @_;
1181 0 my $elt = pop @$list_expr;
1182 0 ▶ return undef unless (defined $elt);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $elt 0 0 0
1183 0 ▶ return undef unless ($elt);
Branch: 1 branch
BranchTrueFalseTotal
unless $elt 0 0 0
1184 0 ▶ unless (ref $elt) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $elt) 0 0 0
1185 0 $elt = $parser->YYData->{symbtab}->Lookup($elt);
1186 0 ▶ return undef unless (defined $elt);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $elt 0 0 0
1187 }
1188 0 ▶ if ($elt->isa('BinaryOp')) {
Branch: 12 branches
BranchTrueFalseTotal
if ($elt->isa('BinaryOp')) { } 0 0 0
elsif ($elt->isa('UnaryOp')) { } 0 0 0
elsif ($elt->isa('Constant')) { } 0 0 0
elsif ($elt->isa('Enum')) { } 0 0 0
elsif ($elt->isa('IntegerLiteral')) { } 0 0 0
elsif ($elt->isa('StringLiteral')) { } 0 0 0
elsif ($elt->isa('WideStringLiteral')) { } 0 0 0
elsif ($elt->isa('CharacterLiteral')) { } 0 0 0
elsif ($elt->isa('WideCharacterLiteral')) { } 0 0 0
elsif ($elt->isa('FixedPtLiteral')) { } 0 0 0
elsif ($elt->isa('FloatingPtLiteral')) { } 0 0 0
elsif ($elt->isa('BooleanLiteral')) { } 0 0 0
1189 0 return _EvalBinop($parser, $type, $elt, $list_expr, $bypass);
1190 }
1191 elsif ($elt->isa('UnaryOp')) {
1192 0 return _EvalUnop($parser, $type, $elt, $list_expr, $bypass);
1193 }
1194 elsif ($elt->isa('Constant')) {
1195 0 ▶ if (ref $type eq ref $elt->{value}->{type}) {
Branch: 2 branches
BranchTrueFalseTotal
if (ref $type eq ref $elt->{'value'}{'type'}) { } 0 0 0
elsif ($type->isa('IntegerType') and $elt->{'value'}{'type'}->isa('OctetType')) { } 0 0 0
1196 0 return _CheckRange($parser, $type, $elt->{value}->{value}, $bypass);
1197 }
1198 ▶ elsif ($type->isa('IntegerType') and $elt->{value}->{type}->isa('OctetType')) {
Condition0%0/3
$type->isa("IntegerType") and $elt->{"value"}{"type"}->isa("OctetType")
!ll&&!rl&&r
000
MC/DC0%0/2
$type->isa("IntegerType") and $elt->{"value"}{"type"}->isa("OctetType")
$type->isa("IntegerType") $elt->{"value"}{"type"}->isa("OctetType")
Truth table0%0/3
A and B
A= $type->isa("IntegerType")B= $elt->{"value"}{"type"}->isa("OctetType")
ABresult
0X0
100
111
1199 0 return _CheckRange($parser, $type, $elt->{value}->{value}, $bypass);
1200 }
1201 else {
1202 0 $parser->Error("'$elt->{value}->{value}' is not a '$type->{value}'.\n");
1203 0 return undef;
1204 }
1205 }
1206 elsif ($elt->isa('Enum')) {
1207 0 ▶ if ($type eq $parser->YYData->{symbtab}->Lookup($elt->{type})) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type eq $parser->YYData->{'symbtab'}->Lookup($elt->{'type'})) { } 0 0 0
1208 0 return $elt;
1209 }
1210 else {
1211 0 $parser->Error("'$elt->{idf}' is not a '$type->{idf}'.\n");
1212 0 return undef;
1213 }
1214 }
1215 elsif ($elt->isa('IntegerLiteral')) {
1216 0 ▶ if ($type->isa('IntegerType')) {
Branch: 2 branches
BranchTrueFalseTotal
if ($type->isa('IntegerType')) { } 0 0 0
elsif ($type->isa('OctetType')) { } 0 0 0
1217 0 return _CheckRange($parser, $type, $elt->{value}, $bypass);
1218 }
1219 elsif ($type->isa('OctetType')) {
1220 0 return _CheckRange($parser, $type, $elt->{value}, $bypass);
1221 }
1222 else {
1223 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1224 0 return undef;
1225 }
1226 }
1227 elsif ($elt->isa('StringLiteral')) {
1228 0 ▶ if ($type->isa('StringType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('StringType')) { } 0 0 0
1229 0 return _CheckRange($parser, $type, $elt->{value});
1230 }
1231 else {
1232 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1233 0 return undef;
1234 }
1235 }
1236 elsif ($elt->isa('WideStringLiteral')) {
1237 0 ▶ if ($type->isa('WideStringType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('WideStringType')) { } 0 0 0
1238 0 return _CheckRange($parser, $type, $elt->{value});
1239 }
1240 else {
1241 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1242 0 return undef;
1243 }
1244 }
1245 elsif ($elt->isa('CharacterLiteral')) {
1246 0 ▶ if ($type->isa('CharType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('CharType')) { } 0 0 0
1247 0 return $elt->{value};
1248 }
1249 else {
1250 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1251 0 return undef;
1252 }
1253 }
1254 elsif ($elt->isa('WideCharacterLiteral')) {
1255 0 ▶ if ($type->isa('WideCharType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('WideCharType')) { } 0 0 0
1256 0 return $elt->{value};
1257 }
1258 else {
1259 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1260 0 return undef;
1261 }
1262 }
1263 elsif ($elt->isa('FixedPtLiteral')) {
1264 0 ▶ if ($type->isa('FixedPtConstType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('FixedPtConstType')) { } 0 0 0
1265 0 return _CheckRange($parser, $type, $elt->{value});
1266 }
1267 else {
1268 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1269 0 return undef;
1270 }
1271 }
1272 elsif ($elt->isa('FloatingPtLiteral')) {
1273 0 ▶ if ($type->isa('FloatingPtType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('FloatingPtType')) { } 0 0 0
1274 0 return _CheckRange($parser, $type, $elt->{value});
1275 }
1276 else {
1277 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1278 0 return undef;
1279 }
1280 }
1281 elsif ($elt->isa('BooleanLiteral')) {
1282 0 ▶ if ($type->isa('BooleanType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type->isa('BooleanType')) { } 0 0 0
1283 0 return $elt->{value};
1284 }
1285 else {
1286 0 $parser->Error("'$elt->{value}' is not a '$type->{value}'.\n");
1287 0 return undef;
1288 }
1289 }
1290 else {
1291 0 $parser->Error("_Eval: INTERNAL ERROR ",ref $elt," .\n");
1292 0 return undef;
1293 }
1294 }
1295
1296 0 ▶sub _CheckRange {
Subroutine _CheckRange: not called CC=40 SCAR=74.0
1297 0 my ($parser, $type, $value, $bypass) = @_;
1298 0 ▶ return $value if (defined $bypass);
Branch: 1 branch
BranchTrueFalseTotal
if defined $bypass 0 0 0
1299 0 ▶ if ( $type->isa('IntegerType') ) {
Branch: 5 branches
BranchTrueFalseTotal
if ($type->isa('IntegerType')) { } 0 0 0
elsif ($type->isa('OctetType')) { } 0 0 0
elsif ($type->isa('FloatingPtType')) { } 0 0 0
elsif ($type->isa('FixedPtConstType')) { } 0 0 0
elsif ($type->isa('StringType') or $type->isa('WideStringType')) { } 0 0 0
1300 0 ▶ if ( $type->{value} eq 'short' ) {
Branch: 6 branches
BranchTrueFalseTotal
if ($type->{'value'} eq 'short') { } 0 0 0
elsif ($type->{'value'} eq 'long') { } 0 0 0
elsif ($type->{'value'} eq 'long long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned short') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long') { } 0 0 0
elsif ($type->{'value'} eq 'unsigned long long') { } 0 0 0
1301 0 ▶ if ($value >= SHRT_MIN and $value <= SHRT_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= {sign => '-', value => ['32768']} and $value <= {sign => '+', value => ['32767']}) { } 0 0 0
Condition0%0/3
$value >= bless( {"sign" => "-","value" => bless( [32768], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $value <= bless( {"sign" => "+","value" => bless( [32767], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= bless( {"sign" => "-","value" => bless( [32768], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $value <= bless( {"sign" => "+","value" => bless( [32767], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= bless( {"sign" => "-","value" => bless( [32768], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $value <= bless( {"sign" => "+","value" => bless( [32767], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= bless( {"sign" => "-","value" => bless( [32768], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $value <= bless( {"sign" => "+","value" => bless( [32767], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1302 0 return $value;
1303 }
1304 else {
1305 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1306 0 return undef;
1307 }
1308 }
1309 elsif ($type->{value} eq 'long') {
1310 0 ▶ if ($value >= LONG_MIN and $value <= LONG_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= {sign => '-', value => [147483648, 2]} and $value <= {sign => '+', value => [147483647, 2]}) { } 0 0 0
Condition0%0/3
$value >= bless( {"sign" => "-","value" => bless( [147483648,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $value <= bless( {"sign" => "+","value" => bless( [147483647,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= bless( {"sign" => "-","value" => bless( [147483648,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $value <= bless( {"sign" => "+","value" => bless( [147483647,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= bless( {"sign" => "-","value" => bless( [147483648,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $value <= bless( {"sign" => "+","value" => bless( [147483647,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= bless( {"sign" => "-","value" => bless( [147483648,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $value <= bless( {"sign" => "+","value" => bless( [147483647,2], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1311 0 return $value;
1312 }
1313 else {
1314 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1315 0 return undef;
1316 }
1317 }
1318 elsif ($type->{value} eq 'long long') {
1319 0 ▶ if ($value >= LLONG_MIN and $value <= LLONG_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= {sign => '-', value => [854775808, 223372036, 9]} and $value <= {sign => '+', value => [854775807, 223372036, 9]}) { } 0 0 0
Condition0%0/3
$value >= bless( {"sign" => "-","value" => bless( [854775808,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $value <= bless( {"sign" => "+","value" => bless( [854775807,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= bless( {"sign" => "-","value" => bless( [854775808,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) and $value <= bless( {"sign" => "+","value" => bless( [854775807,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= bless( {"sign" => "-","value" => bless( [854775808,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' ) $value <= bless( {"sign" => "+","value" => bless( [854775807,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= bless( {"sign" => "-","value" => bless( [854775808,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )B= $value <= bless( {"sign" => "+","value" => bless( [854775807,223372036,9], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1320 0 return $value;
1321 }
1322 else {
1323 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1324 0 return undef;
1325 }
1326 }
1327 elsif ($type->{value} eq 'unsigned short') {
1328 0 ▶ if ($value >= 0 and $value <= USHRT_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= 0 and $value <= {sign => '+', value => ['65535']}) { } 0 0 0
Condition0%0/3
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [65535], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [65535], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= 0 $value <= bless( {"sign" => "+","value" => bless( [65535], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= 0B= $value <= bless( {"sign" => "+","value" => bless( [65535], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1329 0 return $value;
1330 }
1331 else {
1332 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1333 0 return undef;
1334 }
1335 }
1336 elsif ($type->{value} eq 'unsigned long') {
1337 0 ▶ if ($value >= 0 and $value <= ULONG_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= 0 and $value <= {sign => '+', value => [294967295, 4]}) { } 0 0 0
Condition0%0/3
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [294967295,4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [294967295,4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= 0 $value <= bless( {"sign" => "+","value" => bless( [294967295,4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= 0B= $value <= bless( {"sign" => "+","value" => bless( [294967295,4], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1338 0 return $value;
1339 }
1340 else {
1341 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1342 0 return undef;
1343 }
1344 }
1345 elsif ($type->{value} eq 'unsigned long long') {
1346 0 ▶ if ($value >= 0 and $value <= ULLONG_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= 0 and $value <= {sign => '+', value => [709551615, 446744073, 18]}) { } 0 0 0
Condition0%0/3
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [709551615,446744073,18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [709551615,446744073,18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= 0 $value <= bless( {"sign" => "+","value" => bless( [709551615,446744073,18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= 0B= $value <= bless( {"sign" => "+","value" => bless( [709551615,446744073,18], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1347 0 return $value;
1348 }
1349 else {
1350 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1351 0 return undef;
1352 }
1353 }
1354 else {
1355 0 $parser->Error("_CheckRange IntegerType : INTERNAL ERROR.\n");
1356 0 return undef;
1357 }
1358 }
1359 elsif ( $type->isa('OctetType') ) {
1360 0 ▶ if ($value >= 0 and $value <= UCHAR_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($value >= 0 and $value <= {sign => '+', value => ['255']}) { } 0 0 0
Condition0%0/3
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
!ll&&!rl&&r
000
MC/DC0%0/2
$value >= 0 and $value <= bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
$value >= 0 $value <= bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
Truth table0%0/3
A and B
A= $value >= 0B= $value <= bless( {"sign" => "+","value" => bless( [255], 'Math::BigInt::Calc' )}, 'Math::BigInt' )
ABresult
0X0
100
111
1361 0 return $value;
1362 }
1363 else {
1364 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1365 0 return undef;
1366 }
1367 }
1368 elsif ( $type->isa('FloatingPtType') ) {
1369 0 ▶ return $value if ($value == 0);
Branch: 1 branch
BranchTrueFalseTotal
if $value == 0 0 0 0
1370 0 my $abs_v = abs $value;
1371 0 ▶ if ( $type->{value} eq 'float' ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($type->{'value'} eq 'float') { } 0 0 0
elsif ($type->{'value'} eq 'double') { } 0 0 0
elsif ($type->{'value'} eq 'long double') { } 0 0 0
1372 0 ▶ if ($abs_v >= FLT_MIN and $abs_v <= FLT_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($abs_v >= {_e => [46], _es => '-', _m => ['117549435'], sign => '+'} and $abs_v <= {_e => [30], _es => '+', _m => ['340282347'], sign => '+'}) { } 0 0 0
Condition0%0/3
$abs_v >= bless( {"_e" => bless( [46], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [117549435], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) and $abs_v <= bless( {"_e" => bless( [30], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [340282347], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
!ll&&!rl&&r
000
MC/DC0%0/2
$abs_v >= bless( {"_e" => bless( [46], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [117549435], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) and $abs_v <= bless( {"_e" => bless( [30], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [340282347], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
$abs_v >= bless( {"_e" => bless( [46], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [117549435], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) $abs_v <= bless( {"_e" => bless( [30], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [340282347], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
Truth table0%0/3
A and B
A= $abs_v >= bless( {"_e" => bless( [46], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [117549435], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )B= $abs_v <= bless( {"_e" => bless( [30], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [340282347], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
ABresult
0X0
100
111
1373 0 return $value;
1374 }
1375 else {
1376 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1377 0 return undef;
1378 }
1379 }
1380 elsif ($type->{value} eq 'double') {
1381 0 ▶ if ($abs_v >= DBL_MIN and $abs_v <= DBL_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($abs_v >= {_e => [325], _es => '-', _m => [850720138, 222507385], sign => '+'} and $abs_v <= {_e => [291], _es => '+', _m => [486231571, 179769313], sign => '+'}) { } 0 0 0
Condition0%0/3
$abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) and $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
!ll&&!rl&&r
000
MC/DC0%0/2
$abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) and $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
$abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
Truth table0%0/3
A and B
A= $abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )B= $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
ABresult
0X0
100
111
1382 0 return $value;
1383 }
1384 else {
1385 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1386 0 return undef;
1387 }
1388 }
1389 elsif ($type->{value} eq 'long double') {
1390 0 ▶ if ($abs_v >= LDBL_MIN and $abs_v <= LDBL_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($abs_v >= {_e => [325], _es => '-', _m => [850720138, 222507385], sign => '+'} and $abs_v <= {_e => [291], _es => '+', _m => [486231571, 179769313], sign => '+'}) { } 0 0 0
Condition0%0/3
$abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) and $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
!ll&&!rl&&r
000
MC/DC0%0/2
$abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) and $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
$abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' ) $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
Truth table0%0/3
A and B
A= $abs_v >= bless( {"_e" => bless( [325], 'Math::BigInt::Calc' ),"_es" => "-","_m" => bless( [850720138,222507385], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )B= $abs_v <= bless( {"_e" => bless( [291], 'Math::BigInt::Calc' ),"_es" => "+","_m" => bless( [486231571,179769313], 'Math::BigInt::Calc' ),"sign" => "+"}, 'Math::BigFloat' )
ABresult
0X0
100
111
1391 0 return $value;
1392 }
1393 else {
1394 0 $parser->Error("'$type->{value}' $value is out of range.\n");
1395 0 return undef;
1396 }
1397 }
1398 else {
1399 0 $parser->Error("_CheckRange FloatingPtType : INTERNAL ERROR.\n");
1400 0 return undef;
1401 }
1402 }
1403 elsif ( $type->isa('FixedPtConstType') ) {
1404 0 return $value;
1405 }
1406 ▶ elsif ( $type->isa('StringType')
Condition0%0/3
$type->isa("StringType") or $type->isa("WideStringType")
l!l&&r!l&&!r
000
MC/DC0%0/2
$type->isa("StringType") or $type->isa("WideStringType")
$type->isa("StringType") $type->isa("WideStringType")
Truth table0%0/3
A or B
A= $type->isa("StringType")B= $type->isa("WideStringType")
ABresult
1X1
011
000
1407 or $type->isa('WideStringType') ) {
1408 0 ▶ if (exists $type->{max}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $type->{"max"}) 0 0 0
1409 0 my @lst = split //, $value;
1410 0 my $len = @lst;
1411 0 ▶ if ($len <= $type->{max}->{value}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($len <= $type->{'max'}{'value'}) { } 0 0 0
1412 0 return $value;
1413 }
1414 else {
1415 0 $parser->Error("'$type->{value}' '$value' is out of range.\n");
1416 0 return undef;
1417 }
1418 }
1419 0 return $value;
1420 }
1421 }
1422
1423 package CORBA::IDL::Constant;
1424
1425 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1426
1427 0 ▶sub _Init {
Subroutine _Init: not called CC=17 SCAR=57.2
1428 0 my $self = shift;
1429 0 my ($parser) = @_;
1430 0 $self->line_stamp($parser);
1431 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
1432 0 $self->{doc} = $parser->YYData->{doc};
1433 0 $parser->YYData->{doc} = q{};
1434 }
1435 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
1436 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
1437 0 $parser->YYData->{symbtab}->Insert($self);
1438 0 my $type = $self->{type};
1439 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $type);
1440 0 my $defn = CORBA::IDL::TypeDeclarator->GetEffectiveType($parser, $type);
1441 0 ▶ if (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn) { } 0 0 0
1442 0 ▶ if ( ! $defn->isa('IntegerType')
Branch: 1 branch
BranchTrueFalseTotal
unless ($defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType") or $defn->isa("FloatingPtType") or $defn->isa("WideCharType") or $defn->isa("WideStringType") or $defn->isa("FixedPtConstType")) 0 0 0
Condition0%0/27
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType") or $defn->isa("FloatingPtType") or $defn->isa("WideCharType") or $defn->isa("WideStringType") or $defn->isa("FixedPtConstType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType") or $defn->isa("FloatingPtType") or $defn->isa("WideCharType") or $defn->isa("WideStringType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType") or $defn->isa("FloatingPtType") or $defn->isa("WideCharType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType") or $defn->isa("FloatingPtType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("EnumType")
l!l&&r!l&&!r
000
MC/DC0%0/10
$defn->isa("IntegerType") or $defn->isa("EnumType") or $defn->isa("OctetType") or $defn->isa("CharType") or $defn->isa("StringType") or $defn->isa("BooleanType") or $defn->isa("FloatingPtType") or $defn->isa("WideCharType") or $defn->isa("WideStringType") or $defn->isa("FixedPtConstType")
$defn->isa("IntegerType") $defn->isa("EnumType") $defn->isa("OctetType") $defn->isa("CharType") $defn->isa("StringType") $defn->isa("BooleanType") $defn->isa("FloatingPtType") $defn->isa("WideCharType") $defn->isa("WideStringType") $defn->isa("FixedPtConstType")
Truth table0%0/11
A or B or C or D or E or F or G or H or I or J
A= $defn->isa("IntegerType")B= $defn->isa("EnumType")C= $defn->isa("OctetType")D= $defn->isa("CharType")E= $defn->isa("StringType")F= $defn->isa("BooleanType")G= $defn->isa("FloatingPtType")H= $defn->isa("WideCharType")I= $defn->isa("WideStringType")J= $defn->isa("FixedPtConstType")
ABCDEFGHIJresult
1XXXXXXXXX1
01XXXXXXXX1
001XXXXXXX1
0001XXXXXX1
00001XXXXX1
000001XXXX1
0000001XXX1
00000001XX1
000000001X1
00000000011
00000000000
1443 and ! $defn->isa('EnumType')
1444 and ! $defn->isa('OctetType')
1445 and ! $defn->isa('CharType')
1446 and ! $defn->isa('StringType')
1447 and ! $defn->isa('BooleanType')
1448 and ! $defn->isa('FloatingPtType')
1449 and ! $defn->isa('WideCharType')
1450 and ! $defn->isa('WideStringType')
1451 and ! $defn->isa('FixedPtConstType') ) {
1452 0 ▶ my $idf = $defn->{idf} if (exists $defn->{idf});
Branch: 1 branch
BranchTrueFalseTotal
if exists $defn->{"idf"} 0 0 0
1453 0 ▶ $idf ||= $type->{idf} if (exists $type->{idf});
Branch: 1 branch
BranchTrueFalseTotal
if exists $type->{"idf"} 0 0 0
Condition0%0/3
$idf ||= $type->{"idf"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$idf ||= $type->{"idf"}
$idf $type->{"idf"}
Truth table0%0/3
A ||= B
A= $idfB= $type->{"idf"}
ABresult
1X1
011
000
1454 0 ▶ $idf ||= $type;
Condition0%0/3
$idf ||= $type
l!l&&r!l&&!r
000
MC/DC0%0/2
$idf ||= $type
$idf $type
Truth table0%0/3
A ||= B
A= $idfB= $type
ABresult
1X1
011
000
1455 0 $parser->Error("'$idf' refers a bad type for constant.\n");
1456 0 return $self;
1457 }
1458 }
1459 else {
1460 0 $parser->Error(__PACKAGE__ . "::_Init ERROR_INTERNAL ($type).\n");
1461 }
1462 $self->configure(
1463 value => new CORBA::IDL::Expression($parser,
1464 type => $defn,
1465 list_expr => $self->{list_expr}
1466 )
1467 0 );
1468 0 $parser->YYData->{curr_node} = $self;
1469 }
1470
1471 0 ▶sub Lookup {
Subroutine Lookup: not called CC=5 SCAR=34.0
1472 0 my $proto = shift;
1473 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1474 0 $class = substr $class, rindex($class, ':') + 1;
1475 0 my ($parser, $name) = @_;
1476 0 my $defn = $parser->YYData->{symbtab}->Lookup($name);
1477 0 ▶ if (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn) { } 0 0 0
1478 0 ▶ if ( ! $defn->isa($class)
Branch: 1 branch
BranchTrueFalseTotal
unless ($defn->isa($class) or $defn->isa("Enum")) 0 0 0
Condition0%0/3
$defn->isa($class) or $defn->isa("Enum")
l!l&&r!l&&!r
000
MC/DC0%0/2
$defn->isa($class) or $defn->isa("Enum")
$defn->isa($class) $defn->isa("Enum")
Truth table0%0/3
A or B
A= $defn->isa($class)B= $defn->isa("Enum")
ABresult
1X1
011
000
1479 and ! $defn->isa('Enum') ) {
1480 0 $parser->Error("'$name' is not a $class.\n");
1481 }
1482 0 return $defn->{full};
1483 }
1484 else {
1485 0 return q{};
1486 }
1487 }
1488
1489 package CORBA::IDL::UnaryOp;
1490
1491 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1492
1493 package CORBA::IDL::BinaryOp;
1494
1495 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1496
1497 #
1498 # 3.2.5 Literals
1499 #
1500
1501 package CORBA::IDL::Literal;
1502
1503 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1504
1505 package CORBA::IDL::IntegerLiteral;
1506
1507 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1508
1509 package CORBA::IDL::StringLiteral;
1510
1511 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1512
1513 package CORBA::IDL::WideStringLiteral;
1514
1515 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1516
1517 package CORBA::IDL::CharacterLiteral;
1518
1519 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1520
1521 package CORBA::IDL::WideCharacterLiteral;
1522
1523 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1524
1525 package CORBA::IDL::FixedPtLiteral;
1526
1527 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1528
1529 package CORBA::IDL::FloatingPtLiteral;
1530
1531 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1532
1533 package CORBA::IDL::BooleanLiteral;
1534
1535 1 ▶use base qw(CORBA::IDL::Literal);
Subroutine BEGIN: called CC=1 SCAR=0.0
1536
1537 #
1538 # 3.11 Type Declaration
1539 #
1540
1541 package CORBA::IDL::TypeDeclarators;
1542
1543 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1544
1545 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
1546 0 my $self = shift;
1547 0 my ($parser) = @_;
1548 0 $self->line_stamp($parser);
1549 0 my @list;
1550 0 foreach (@{$self->{list_expr}}) {
1551 0 my @array_size = @{$_};
1552 0 my $idf = shift @array_size;
1553 0 my $decl;
1554 0 ▶ if (@array_size) {
Branch: 1 branch
BranchTrueFalseTotal
if (@array_size) { } 0 0 0
1555 $decl = new CORBA::IDL::TypeDeclarator($parser,
1556 type => $self->{type},
1557 0 idf => $idf,
1558 array_size => \@array_size
1559 );
1560 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $self->{type});
1561 }
1562 else {
1563 $decl = new CORBA::IDL::TypeDeclarator($parser,
1564 type => $self->{type},
1565 0 idf => $idf
1566 );
1567 }
1568 0 push @list, $decl->{full};
1569 }
1570 0 $self->configure(list_decl => \@list);
1571 }
1572
1573 0 ▶sub Configure {
Subroutine Configure: not called CC=2 SCAR=17.9
1574 0 my $self = shift;
1575 0 my $parser = shift;
1576 0 $self->configure(@_);
1577 0 foreach (@{$self->{list_decl}}) {
1578 0 my $defn = $parser->YYData->{symbtab}->Lookup($_);
1579 0 $defn->configure(@_);
1580 }
1581 0 return $self;
1582 }
1583
1584 package CORBA::IDL::TypeDeclarator;
1585
1586 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1587
1588 0 ▶sub _Init {
Subroutine _Init: not called CC=4 SCAR=30.0
1589 0 my $self = shift;
1590 0 my ($parser) = @_;
1591 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
1592 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
1593 0 $self->line_stamp($parser);
1594 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
1595 0 $self->{doc} = $parser->YYData->{doc};
1596 0 $parser->YYData->{doc} = q{};
1597 }
1598 0 $parser->YYData->{symbtab}->Insert($self);
1599 0 $parser->YYData->{curr_node} = $self;
1600 0 ▶ $self->{local_type} = 1 if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $self->{type}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $self->{"type"}) 0 0 0
1601 0 ▶ $self->{deprecated} = 1 if (CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $self->{type}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsDeprecated($parser, $self->{"type"}) 0 0 0
1602 }
1603
1604 0 ▶sub Lookup {
Subroutine Lookup: not called CC=9 SCAR=45.0
1605 0 my $proto = shift;
1606 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1607 0 $class = substr $class, rindex($class, ':') + 1;
1608 0 my ($parser, $name) = @_;
1609 0 my $defn = $parser->YYData->{symbtab}->Lookup($name);
1610 0 ▶ if (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn) { } 0 0 0
1611 0 ▶ if ( ! $defn->isa($class)
Branch: 1 branch
BranchTrueFalseTotal
unless ($defn->isa($class) or $defn->isa("NativeType") or $defn->isa("_ConstructedType") or $defn->isa("_ForwardConstructedType") or $defn->isa("BaseInterface") or $defn->isa("ForwardBaseInterface")) 0 0 0
Condition0%0/15
$defn->isa($class) or $defn->isa("NativeType") or $defn->isa("_ConstructedType") or $defn->isa("_ForwardConstructedType") or $defn->isa("BaseInterface") or $defn->isa("ForwardBaseInterface")
l!l&&r!l&&!r
000
$defn->isa($class) or $defn->isa("NativeType") or $defn->isa("_ConstructedType") or $defn->isa("_ForwardConstructedType") or $defn->isa("BaseInterface")
l!l&&r!l&&!r
000
$defn->isa($class) or $defn->isa("NativeType") or $defn->isa("_ConstructedType") or $defn->isa("_ForwardConstructedType")
l!l&&r!l&&!r
000
$defn->isa($class) or $defn->isa("NativeType") or $defn->isa("_ConstructedType")
l!l&&r!l&&!r
000
$defn->isa($class) or $defn->isa("NativeType")
l!l&&r!l&&!r
000
MC/DC0%0/6
$defn->isa($class) or $defn->isa("NativeType") or $defn->isa("_ConstructedType") or $defn->isa("_ForwardConstructedType") or $defn->isa("BaseInterface") or $defn->isa("ForwardBaseInterface")
$defn->isa($class) $defn->isa("NativeType") $defn->isa("_ConstructedType") $defn->isa("_ForwardConstructedType") $defn->isa("BaseInterface") $defn->isa("ForwardBaseInterface")
Truth table0%0/7
A or B or C or D or E or F
A= $defn->isa($class)B= $defn->isa("NativeType")C= $defn->isa("_ConstructedType")D= $defn->isa("_ForwardConstructedType")E= $defn->isa("BaseInterface")F= $defn->isa("ForwardBaseInterface")
ABCDEFresult
1XXXXX1
01XXXX1
001XXX1
0001XX1
00001X1
0000011
0000000
1612 and ! $defn->isa('NativeType')
1613 and ! $defn->isa('_ConstructedType')
1614 and ! $defn->isa('_ForwardConstructedType')
1615 and ! $defn->isa('BaseInterface')
1616 and ! $defn->isa('ForwardBaseInterface') ) {
1617 0 $parser->Error("'$name' is not a type nor a value.\n");
1618 }
1619 0 return $defn->{full};
1620 }
1621 else {
1622 0 return q{};
1623 }
1624 }
1625
1626 0 ▶sub GetDefn {
Subroutine GetDefn: not called CC=4 SCAR=30.0
1627 0 my $proto = shift;
1628 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1629 0 my ($parser, $type) = @_;
1630 0 ▶ return undef unless ($type);
Branch: 1 branch
BranchTrueFalseTotal
unless $type 0 0 0
1631 0 ▶ if (ref $type) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $type) { } 0 0 0
1632 0 return $type;
1633 }
1634 else {
1635 0 my $defn = $parser->YYData->{symbtab}->Lookup($type);
1636 0 return $defn;
1637 }
1638 }
1639
1640 0 ▶sub GetEffectiveType {
Subroutine GetEffectiveType: not called CC=6 SCAR=37.4
1641 0 my $proto = shift;
1642 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1643 0 my ($parser, $type) = @_;
1644 0 my $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $type);
1645 0 ▶ unless (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $defn) 0 0 0
1646 0 $parser->Error(__PACKAGE__ . "::GetEffectiveType ERROR_INTERNAL ($type).\n");
1647 0 return undef;
1648 }
1649 0 ▶ while ( $defn->isa('TypeDeclarator')
Branch: 1 branch
BranchTrueFalseTotal
if ($defn->isa("TypeDeclarator") and not exists $defn->{"array_size"}) 0 0 0
Condition0%0/3
$defn->isa("TypeDeclarator") and not exists $defn->{"array_size"}
!ll&&!rl&&r
000
MC/DC0%0/2
$defn->isa("TypeDeclarator") and not exists $defn->{"array_size"}
$defn->isa("TypeDeclarator") not exists $defn->{"array_size"}
Truth table0%0/3
A and not(B)
A= $defn->isa("TypeDeclarator")B= not exists $defn->{"array_size"}
ABresult
0X0
100
111
1650 and ! exists $defn->{array_size} ) {
1651 0 $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $defn->{type});
1652 0 ▶ unless (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $defn) 0 0 0
1653 0 $parser->Error(__PACKAGE__ . "::GetEffectiveType ERROR_INTERNAL ($defn->{type}).\n");
1654 0 return undef;
1655 }
1656 }
1657 0 return $defn;
1658 }
1659
1660 0 ▶sub CheckDeprecated {
Subroutine CheckDeprecated: not called CC=11 SCAR=48.8
1661 0 my $proto = shift;
1662 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1663 0 my ($parser, $type) = @_;
1664 0 my $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $type);
1665 0 ▶ return unless (defined $defn);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $defn 0 0 0
1666 0 ▶ if ( $defn->isa('StringType')
Branch: 3 branches
BranchTrueFalseTotal
if ($defn->isa('StringType') or $defn->isa('WideStringType')) { } 0 0 0
elsif ($defn->isa('FixedPtType')) { } 0 0 0
elsif ($defn->isa('SequenceType')) { } 0 0 0
Condition0%0/3
$defn->isa("StringType") or $defn->isa("WideStringType")
l!l&&r!l&&!r
000
MC/DC0%0/2
$defn->isa("StringType") or $defn->isa("WideStringType")
$defn->isa("StringType") $defn->isa("WideStringType")
Truth table0%0/3
A or B
A= $defn->isa("StringType")B= $defn->isa("WideStringType")
ABresult
1X1
011
000
1667 or $defn->isa('WideStringType') ) {
1668 0 ▶ if (exists $defn->{max}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $defn->{"max"}) 0 0 0
1669 0 $defn->configure(deprecated => 1);
1670 0 ▶ $parser->Deprecated("Anonymous type.\n")
Branch: 1 branch
BranchTrueFalseTotal
if $CORBA::IDL::Parser::IDL_VERSION ge "2.4" 0 0 0
1671 if ($CORBA::IDL::Parser::IDL_VERSION ge '2.4');
1672 }
1673 }
1674 elsif ( $defn->isa('FixedPtType') ) {
1675 0 $defn->configure(deprecated => 1);
1676 0 ▶ $parser->Deprecated("Anonymous type.\n")
Branch: 1 branch
BranchTrueFalseTotal
if $CORBA::IDL::Parser::IDL_VERSION ge "2.4" 0 0 0
1677 if ($CORBA::IDL::Parser::IDL_VERSION ge '2.4');
1678 }
1679 elsif ( $defn->isa('SequenceType') ) {
1680 0 $defn->configure(deprecated => 1);
1681 0 ▶ $parser->Deprecated("Anonymous type.\n")
Branch: 1 branch
BranchTrueFalseTotal
if $CORBA::IDL::Parser::IDL_VERSION ge "2.4" 0 0 0
1682 if ($CORBA::IDL::Parser::IDL_VERSION ge '2.4');
1683 }
1684 }
1685
1686 0 ▶sub IsDeprecated {
Subroutine IsDeprecated: not called CC=3 SCAR=24.8
1687 0 my $proto = shift;
1688 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1689 0 my ($parser, $type) = @_;
1690 0 my $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $type);
1691 0 ▶ return (exists $defn->{deprecated} ? 1 : undef);
Branch: 1 branch
BranchTrueFalseTotal
exists $defn->{'deprecated'} ? : 0 0 0
1692 }
1693
1694 0 ▶sub CheckForward {
Subroutine CheckForward: not called CC=8 SCAR=42.8
1695 0 my $proto = shift;
1696 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1697
1698 0 my ($parser, $type) = @_;
1699 0 my $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $type);
1700 0 ▶ return unless (defined $defn);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $defn 0 0 0
1701 0 ▶ while ( $defn->isa('SequenceType')
Branch: 1 branch
BranchTrueFalseTotal
if ($defn->isa("SequenceType") or $defn->isa("TypeDeclarator")) 0 0 0
Condition0%0/3
$defn->isa("SequenceType") or $defn->isa("TypeDeclarator")
l!l&&r!l&&!r
000
MC/DC0%0/2
$defn->isa("SequenceType") or $defn->isa("TypeDeclarator")
$defn->isa("SequenceType") $defn->isa("TypeDeclarator")
Truth table0%0/3
A or B
A= $defn->isa("SequenceType")B= $defn->isa("TypeDeclarator")
ABresult
1X1
011
000
1702 or $defn->isa('TypeDeclarator') ) {
1703 0 ▶ last if (exists $defn->{array_size});
Branch: 1 branch
BranchTrueFalseTotal
if exists $defn->{"array_size"} 0 0 0
1704 0 $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $defn->{type});
1705 0 ▶ return unless (defined $defn);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $defn 0 0 0
1706 }
1707 0 ▶ if ($defn->isa('_ForwardConstructedType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($defn->isa("_ForwardConstructedType")) 0 0 0
1708 0 $parser->Error("'$defn->{idf}' is declared, but not defined.\n");
1709 }
1710 }
1711
1712 0 ▶sub IsaLocal {
Subroutine IsaLocal: not called CC=4 SCAR=30.0
1713 0 my $proto = shift;
1714 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
1715
1716 0 my ($parser, $type) = @_;
1717 0 ▶ return undef unless ($type);
Branch: 1 branch
BranchTrueFalseTotal
unless $type 0 0 0
1718 0 my $defn = CORBA::IDL::TypeDeclarator->GetDefn($parser, $type);
1719 0 ▶ return exists $defn->{local_type} if ($defn);
Branch: 1 branch
BranchTrueFalseTotal
if $defn 0 0 0
1720 0 $parser->Error(__PACKAGE__ . "::IsaLocal ERROR_INTERNAL ($type).\n");
1721 0 return undef;
1722 }
1723
1724 package CORBA::IDL::NativeType;
1725
1726 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1727
1728 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
1729 0 my $self = shift;
1730 0 my ($parser) = @_;
1731 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
1732 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
1733 0 $self->line_stamp($parser);
1734 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
1735 0 $self->{doc} = $parser->YYData->{doc};
1736 0 $parser->YYData->{doc} = q{};
1737 }
1738 0 $parser->YYData->{symbtab}->Insert($self);
1739 0 $parser->YYData->{curr_node} = $self;
1740 }
1741
1742 0 ▶sub Configure {
Subroutine Configure: not called CC=1 SCAR=6.9
1743 0 my $self = shift;
1744 0 my $parser = shift;
1745 0 $self->configure(@_);
1746 }
1747
1748 #
1749 # 3.11.1 Basic Types
1750 #
1751
1752 package CORBA::IDL::BasicType;
1753
1754 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1755
1756 package CORBA::IDL::FloatingPtType;
1757
1758 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1759
1760 package CORBA::IDL::IntegerType;
1761
1762 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1763
1764 package CORBA::IDL::CharType;
1765
1766 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1767
1768 package CORBA::IDL::WideCharType;
1769
1770 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1771
1772 package CORBA::IDL::BooleanType;
1773
1774 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1775
1776 package CORBA::IDL::OctetType;
1777
1778 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1779
1780 package CORBA::IDL::AnyType;
1781
1782 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1783
1784 package CORBA::IDL::ObjectType;
1785
1786 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1787
1788 package CORBA::IDL::ValueBaseType;
1789
1790 1 ▶use base qw(CORBA::IDL::BasicType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1791
1792 #
1793 # 3.11.2 Constructed Types
1794 #
1795
1796 package CORBA::IDL::_ConstructedType;
1797
1798 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1799
1800 # 3.11.2.1 Structures
1801 #
1802
1803 package CORBA::IDL::StructType;
1804
1805 1 ▶use base qw(CORBA::IDL::_ConstructedType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1806
1807 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
1808 0 my $self = shift;
1809 0 my ($parser) = @_;
1810 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
1811 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
1812 0 $self->line_stamp($parser);
1813 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
1814 0 $self->{doc} = $parser->YYData->{doc};
1815 0 $parser->YYData->{doc} = q{};
1816 }
1817 0 $parser->YYData->{symbtab}->PushCurrentScope($self);
1818 0 $parser->YYData->{curr_node} = $self;
1819 }
1820
1821 0 ▶sub Configure {
Subroutine Configure: not called CC=5 SCAR=34.0
1822 0 my $self = shift;
1823 0 my $parser = shift;
1824 0 $self->configure(@_);
1825 0 my @list;
1826 0 foreach (@{$self->{list_expr}}) {
1827 0 foreach (@{$_->{list_member}}) {
1828 0 push @list, $_;
1829 0 ▶ $self->{deprecated} = 1 if (CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $_));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsDeprecated($parser, $_) 0 0 0
1830 }
1831 0 ▶ $self->{local_type} = 1 if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $_->{type}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $_->{"type"}) 0 0 0
1832 }
1833 0 $self->configure(list_member => \@list); # list of 'Member'
1834 0 return $self;
1835 }
1836
1837 package CORBA::IDL::Members;
1838
1839 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1840
1841 0 ▶sub _Init {
Subroutine _Init: not called CC=4 SCAR=30.0
1842 0 my $self = shift;
1843 0 my ($parser) = @_;
1844 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $self->{type});
1845 0 CORBA::IDL::TypeDeclarator->CheckForward($parser, $self->{type});
1846 0 my @list;
1847 0 foreach (@{$self->{list_expr}}) {
1848 0 my $member;
1849 0 my @array_size = @{$_};
1850 0 my $idf = shift @array_size;
1851 0 ▶ if (@array_size) {
Branch: 1 branch
BranchTrueFalseTotal
if (@array_size) { } 0 0 0
1852 $member = new CORBA::IDL::Member($parser,
1853 props => $self->{props},
1854 type => $self->{type},
1855 0 idf => $idf,
1856 array_size => \@array_size,
1857 deprecated => 1,
1858 );
1859 0 ▶ $parser->Deprecated("Anonymous type (array).\n")
Branch: 1 branch
BranchTrueFalseTotal
if $CORBA::IDL::Parser::IDL_VERSION ge "2.4" 0 0 0
1860 if ($CORBA::IDL::Parser::IDL_VERSION ge '2.4');
1861 }
1862 else {
1863 $member = new CORBA::IDL::Member($parser,
1864 props => $self->{props},
1865 type => $self->{type},
1866 idf => $idf,
1867 0 deprecated => CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $self->{type}),
1868 );
1869 }
1870 0 push @list, $member->{full};
1871 }
1872 0 $self->configure(list_member => \@list);
1873 }
1874
1875 package CORBA::IDL::Member; # idf, type[, array_size]
1876
1877 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1878
1879 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
1880 0 my $self = shift;
1881 0 my ($parser) = @_;
1882 0 $parser->YYData->{symbtab}->Insert($self);
1883 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
1884 0 $self->{doc} = $parser->YYData->{doc};
1885 0 $parser->YYData->{doc} = q{};
1886 }
1887 0 $parser->YYData->{curr_node} = $self;
1888 }
1889
1890 # 3.11.2.2 Discriminated Unions
1891 #
1892
1893 package CORBA::IDL::UnionType;
1894
1895 1 ▶use base qw(CORBA::IDL::_ConstructedType);
Subroutine BEGIN: called CC=1 SCAR=0.0
1896
1897 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
1898 0 my $self = shift;
1899 0 my ($parser) = @_;
1900 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
1901 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
1902 0 $self->line_stamp($parser);
1903 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
1904 0 $self->{doc} = $parser->YYData->{doc};
1905 0 $parser->YYData->{doc} = q{};
1906 }
1907 0 $parser->YYData->{symbtab}->PushCurrentScope($self);
1908 0 $parser->YYData->{curr_node} = $self;
1909 }
1910
1911 0 ▶sub Configure {
Subroutine Configure: not called CC=25 SCAR=64.8
1912 0 my $self = shift;
1913 0 my $parser = shift;
1914 0 $self->configure(@_);
1915 0 my $dis = $self->{type};
1916 0 my $defn = CORBA::IDL::TypeDeclarator->GetEffectiveType($parser, $dis);
1917 0 ▶ if (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn) 0 0 0
1918 0 ▶ if ( ! $defn->isa('IntegerType')
Branch: 1 branch
BranchTrueFalseTotal
unless ($defn->isa("IntegerType") or $defn->isa("CharType") or $defn->isa("BooleanType") or $defn->isa("EnumType")) 0 0 0
Condition0%0/9
$defn->isa("IntegerType") or $defn->isa("CharType") or $defn->isa("BooleanType") or $defn->isa("EnumType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("CharType") or $defn->isa("BooleanType")
l!l&&r!l&&!r
000
$defn->isa("IntegerType") or $defn->isa("CharType")
l!l&&r!l&&!r
000
MC/DC0%0/4
$defn->isa("IntegerType") or $defn->isa("CharType") or $defn->isa("BooleanType") or $defn->isa("EnumType")
$defn->isa("IntegerType") $defn->isa("CharType") $defn->isa("BooleanType") $defn->isa("EnumType")
Truth table0%0/5
A or B or C or D
A= $defn->isa("IntegerType")B= $defn->isa("CharType")C= $defn->isa("BooleanType")D= $defn->isa("EnumType")
ABCDresult
1XXX1
01XX1
001X1
00011
00000
1919 and ! $defn->isa('CharType')
1920 and ! $defn->isa('BooleanType')
1921 and ! $defn->isa('EnumType') ) {
1922 0 ▶ my $idf = $defn->{idf} if (exists $defn->{idf});
Branch: 1 branch
BranchTrueFalseTotal
if exists $defn->{"idf"} 0 0 0
1923 0 ▶ $idf ||= $dis->{idf} if (exists $dis->{idf});
Branch: 1 branch
BranchTrueFalseTotal
if exists $dis->{"idf"} 0 0 0
Condition0%0/3
$idf ||= $dis->{"idf"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$idf ||= $dis->{"idf"}
$idf $dis->{"idf"}
Truth table0%0/3
A ||= B
A= $idfB= $dis->{"idf"}
ABresult
1X1
011
000
1924 0 ▶ $idf ||= $dis;
Condition0%0/3
$idf ||= $dis
l!l&&r!l&&!r
000
MC/DC0%0/2
$idf ||= $dis
$idf $dis
Truth table0%0/3
A ||= B
A= $idfB= $dis
ABresult
1X1
011
000
1925 0 $parser->Error("'$idf' refers a bad type for union discriminator.\n");
1926 0 return $self;
1927 }
1928 }
1929 0 my %hash;
1930 my @list_all;
1931 0 foreach my $case (@{$self->{list_expr}}) {
1932 0 my $elt = $case->{element};
1933 0 ▶ $self->{local_type} = 1 if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $elt->{type}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $elt->{"type"}) 0 0 0
1934 0 ▶ $self->{deprecated} = 1 if (CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $elt->{value}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsDeprecated($parser, $elt->{"value"}) 0 0 0
1935 0 my @list;
1936 0 foreach (@{$case->{list_label}}) {
1937 0 my $key;
1938 0 ▶ if (ref $_ eq 'CORBA::IDL::Default') {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_ eq 'CORBA::IDL::Default') { } 0 0 0
1939 0 $key = 'Default';
1940 0 push @list, $_;
1941 0 $self->configure(default => $case);
1942 }
1943 else {
1944 # now, type is known
1945 0 my $cst = new CORBA::IDL::Expression($parser,
1946 type => $dis,
1947 list_expr => $_
1948 );
1949 0 ▶ if ($defn->isa('EnumType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($defn->isa('EnumType')) { } 0 0 0
1950 0 $key = $cst->{value}->{full};
1951 }
1952 else {
1953 0 $key = $cst->{value};
1954 }
1955 0 push @list, $cst;
1956 0 push @list_all, $cst;
1957 }
1958 0 ▶ if (defined $key) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $key) 0 0 0
1959 0 ▶ if (exists $hash{$key}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $hash{$key}) { } 0 0 0
1960 0 $parser->Error("label value '$key' is duplicate for union.\n");
1961 }
1962 else {
1963 0 $hash{$key} = $elt;
1964 }
1965 }
1966 }
1967 0 $case->{list_label} = \@list;
1968 }
1969 0 $self->configure(list_member => \@list_all);
1970 0 $self->configure(hash_member => \%hash);
1971 0 ▶ if ($defn->isa('EnumType')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($defn->isa('EnumType')) { } 0 0 0
1972 0 my $all = 1;
1973 0 foreach (@{$defn->{list_member}}) {
1974 0 ▶ $all = 0 unless (exists $hash{$_});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $hash{$_} 0 0 0
1975 }
1976 0 ▶ if ($all) {
Branch: 1 branch
BranchTrueFalseTotal
if ($all) { } 0 0 0
1977 $parser->Error("illegal label 'default'.\n")
1978 0 ▶ if (exists $self->{default});
Branch: 1 branch
BranchTrueFalseTotal
if exists $self->{"default"} 0 0 0
1979 }
1980 else {
1981 $self->configure(need_default => 1)
1982 0 ▶ unless (exists $self->{default});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"default"} 0 0 0
1983 }
1984 }
1985 else {
1986 $self->configure(need_default => 1)
1987 0 ▶ unless (exists $self->{default});
Branch: 1 branch
BranchTrueFalseTotal
unless exists $self->{"default"} 0 0 0
1988 }
1989 0 return $self;
1990 }
1991
1992 package CORBA::IDL::Case;
1993
1994 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1995
1996 package CORBA::IDL::Default;
1997
1998 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
1999
2000 package CORBA::IDL::Element;
2001
2002 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2003
2004 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
2005 0 my $self = shift;
2006 0 my ($parser) = @_;
2007 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $self->{type});
2008 0 CORBA::IDL::TypeDeclarator->CheckForward($parser, $self->{type});
2009 0 my @array_size = @{$self->{list_expr}};
2010 0 my $idf = shift @array_size;
2011 0 my $value;
2012 0 ▶ if (@array_size) {
Branch: 1 branch
BranchTrueFalseTotal
if (@array_size) { } 0 0 0
2013 $value = new CORBA::IDL::Member($parser,
2014 type => $self->{type},
2015 0 idf => $idf,
2016 array_size => \@array_size,
2017 deprecated => 1,
2018 );
2019 0 ▶ $parser->Deprecated("Anonymous type (array).\n")
Branch: 1 branch
BranchTrueFalseTotal
if $CORBA::IDL::Parser::IDL_VERSION ge "2.4" 0 0 0
2020 if ($CORBA::IDL::Parser::IDL_VERSION ge '2.4');
2021 }
2022 else {
2023 $value = new CORBA::IDL::Member($parser,
2024 type => $self->{type},
2025 idf => $idf,
2026 0 deprecated => CORBA::IDL::TypeDeclarator->IsDeprecated($parser, $self->{type}),
2027 );
2028 }
2029 0 $self->configure(value => $value->{full}); # 'Member'
2030 }
2031
2032 # 3.11.2.3 Constructed Recursive Types and Forward Declarations
2033 #
2034
2035 package CORBA::IDL::_ForwardConstructedType;
2036
2037 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2038
2039 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
2040 0 my $self = shift;
2041 0 my ($parser) = @_;
2042 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
2043 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
2044 0 $self->line_stamp($parser);
2045 0 $parser->YYData->{symbtab}->InsertForward($self);
2046 $parser->Error("Forward constructed not supported.\n")
2047 0 ▶ if ($parser->YYData->{forward_constructed_forbidden});
Branch: 1 branch
BranchTrueFalseTotal
if $parser->YYData->{"forward_constructed_forbidden"} 0 0 0
2048
2049 }
2050
2051 package CORBA::IDL::ForwardStructType;
2052
2053 1 ▶use base qw(CORBA::IDL::_ForwardConstructedType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2054
2055 package CORBA::IDL::ForwardUnionType;
2056
2057 1 ▶use base qw(CORBA::IDL::_ForwardConstructedType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2058
2059 # 3.11.2.4 Enumerations
2060 #
2061
2062 package CORBA::IDL::EnumType;
2063
2064 1 ▶use base qw(CORBA::IDL::_ConstructedType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2065
2066 1 ▶use constant ULONG_MAX => 4294967295;
Subroutine BEGIN: called CC=1 SCAR=0.0
2067
2068 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
2069 0 my $self = shift;
2070 0 my ($parser) = @_;
2071 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
2072 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
2073 0 $self->line_stamp($parser);
2074 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2075 0 $self->{doc} = $parser->YYData->{doc};
2076 0 $parser->YYData->{doc} = q{};
2077 }
2078 0 $parser->YYData->{symbtab}->Insert($self);
2079 0 $parser->YYData->{curr_node} = $self;
2080 }
2081
2082 0 ▶sub Configure {
Subroutine Configure: not called CC=4 SCAR=30.0
2083 0 my $self = shift;
2084 0 my $parser = shift;
2085 0 $self->configure(@_);
2086 0 my $idx = 0; # Section 15.3 CDR Transfer Syntax
2087 # 15.3.2.6 Enum
2088 0 my %hash;
2089 my @list;
2090 0 foreach (@{$self->{list_expr}}) {
2091 0 ▶ if (exists $hash{$_->{idf}}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $hash{$_->{'idf'}}) { } 0 0 0
2092 0 $parser->Error("enum '$_->{idf}' is duplicate.\n");
2093 }
2094 else {
2095 0 $hash{$_->{idf}} = $idx;
2096 0 push @list, $_->{full};
2097 }
2098 $_->configure(
2099 type => $self->{full},
2100 0 value => "$idx"
2101 );
2102 0 $idx++;
2103 }
2104 0 $self->configure(list_member => \@list); # list of 'Enum' #### ????
2105 0 ▶ if ($idx > ULONG_MAX) {
Branch: 1 branch
BranchTrueFalseTotal
if ($idx > 4294967295) 0 0 0
2106 0 $parser->Error("too many enum for '$self->{idf}'.\n");
2107 }
2108 0 return $self;
2109 }
2110
2111 package CORBA::IDL::Enum;
2112
2113 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2114
2115 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
2116 0 my $self = shift;
2117 0 my ($parser) = @_;
2118 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2119 0 $self->{doc} = $parser->YYData->{doc};
2120 0 $parser->YYData->{doc} = q{};
2121 }
2122 0 $parser->YYData->{symbtab}->Insert($self);
2123 0 $parser->YYData->{curr_node} = $self;
2124 }
2125
2126 #
2127 # 3.11.3 Template Types
2128 #
2129
2130 package CORBA::IDL::_TemplateType;
2131
2132 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2133
2134 package CORBA::IDL::SequenceType;
2135
2136 1 ▶use base qw(CORBA::IDL::_TemplateType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2137
2138 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
2139 0 my $self = shift;
2140 0 my ($parser) = @_;
2141 0 $self->line_stamp($parser);
2142 0 $parser->YYData->{symbtab}->InsertBogus($self);
2143 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $self->{type});
2144 0 ▶ $self->{local_type} = 1 if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $self->{type}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $self->{"type"}) 0 0 0
2145 }
2146
2147 package CORBA::IDL::StringType;
2148
2149 1 ▶use base qw(CORBA::IDL::_TemplateType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2150
2151 package CORBA::IDL::WideStringType;
2152
2153 1 ▶use base qw(CORBA::IDL::_TemplateType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2154
2155 package CORBA::IDL::FixedPtType;
2156
2157 1 ▶use base qw(CORBA::IDL::_TemplateType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2158
2159 0 ▶sub _Init {
Subroutine _Init: not called CC=1 SCAR=6.9
2160 0 my $self = shift;
2161 0 my ($parser) = @_;
2162 0 $self->line_stamp($parser);
2163 }
2164
2165 package CORBA::IDL::FixedPtConstType;
2166
2167 1 ▶use base qw(CORBA::IDL::_TemplateType);
Subroutine BEGIN: called CC=1 SCAR=0.0
2168
2169 #
2170 # 3.12 Exception Declaration
2171 #
2172
2173 package CORBA::IDL::Exception;
2174
2175 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2176
2177 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
2178 0 my $self = shift;
2179 0 my ($parser) = @_;
2180 0 $self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
2181 0 $self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
2182 0 $self->line_stamp($parser);
2183 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2184 0 $self->{doc} = $parser->YYData->{doc};
2185 0 $parser->YYData->{doc} = q{};
2186 }
2187 0 $parser->YYData->{symbtab}->PushCurrentScope($self);
2188 0 $parser->YYData->{curr_node} = $self;
2189 }
2190
2191 0 ▶sub Configure {
Subroutine Configure: not called CC=4 SCAR=30.0
2192 0 my $self = shift;
2193 0 my $parser = shift;
2194 0 $self->configure(@_);
2195 0 my @list;
2196 0 foreach (@{$self->{list_expr}}) {
2197 0 foreach (@{$_->{list_member}}) {
2198 0 push @list, $_;
2199 }
2200 0 ▶ $self->{local_type} = 1 if (CORBA::IDL::TypeDeclarator->IsaLocal($parser, $_->{type}));
Branch: 1 branch
BranchTrueFalseTotal
if "CORBA::IDL::TypeDeclarator"->IsaLocal($parser, $_->{"type"}) 0 0 0
2201 }
2202 0 $self->configure(list_member => \@list); # list of 'Member'
2203 0 return $self;
2204 }
2205
2206 0 ▶sub Lookup {
Subroutine Lookup: not called CC=5 SCAR=34.0
2207 0 my $proto = shift;
2208 0 ▶ my $class = ref($proto) || $proto;
Condition0%0/3
ref $proto || $proto
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $proto || $proto
ref $proto $proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
ABresult
1X1
011
000
2209 0 $class = substr $class, rindex($class, ':') + 1;
2210 0 my ($parser, $name) = @_;
2211 0 my $defn = $parser->YYData->{symbtab}->Lookup($name);
2212 0 ▶ if (defined $defn) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $defn) { } 0 0 0
2213 0 ▶ unless ($defn->isa($class) || $defn->isa('NativeType')) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($defn->isa($class) or $defn->isa("NativeType")) 0 0 0
Condition0%0/3
$defn->isa($class) or $defn->isa("NativeType")
l!l&&r!l&&!r
000
MC/DC0%0/2
$defn->isa($class) or $defn->isa("NativeType")
$defn->isa($class) $defn->isa("NativeType")
Truth table0%0/3
A or B
A= $defn->isa($class)B= $defn->isa("NativeType")
ABresult
1X1
011
000
2214 0 $parser->Error("'$name' is not a $class or a native type.\n");
2215 }
2216 0 return $defn->{full};
2217 }
2218 else {
2219 0 return q{};
2220 }
2221 }
2222
2223 #
2224 # 3.13 Operation Declaration
2225 #
2226
2227 package CORBA::IDL::Operation;
2228
2229 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2230
2231 0 ▶sub _Init {
Subroutine _Init: not called CC=6 SCAR=37.4
2232 0 my $self = shift;
2233 0 my ($parser) = @_;
2234 0 my $type = $self->{type};
2235 0 $self->line_stamp($parser);
2236 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2237 0 $self->{doc} = $parser->YYData->{doc};
2238 0 $parser->YYData->{doc} = q{};
2239 }
2240 0 $parser->YYData->{symbtab}->Insert($self);
2241 0 $parser->YYData->{unnamed_symbtab} = new CORBA::IDL::UnnamedSymbtab($parser);
2242 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $type);
2243 0 CORBA::IDL::TypeDeclarator->CheckForward($parser, $type);
2244 0 ▶ if (defined $parser->YYData->{curr_itf}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $parser->YYData->{'curr_itf'}) { } 0 0 0
2245 0 $self->{itf} = $parser->YYData->{curr_itf}->{full};
2246 $parser->YYData->{curr_itf}->{hash_attribute_operation}{$self->{idf}} = $self->{full}
2247 0 ▶ unless($self->{idf} =~ /^_/); # _get_ or _set_
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"idf"} =~ /^_/ 0 0 0
2248 }
2249 else {
2250 0 $parser->Error(__PACKAGE__ . "::new ERROR_INTERNAL.\n");
2251 }
2252 0 ▶ unless (ref $type) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $type) 0 0 0
2253 0 ▶ if ($type =~ /::([0-9A-Z_a-z]+)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type =~ /::([0-9A-Z_a-z]+)$/) 0 0 0
2254 0 $parser->YYData->{unnamed_symbtab}->InsertUsed($1);
2255 }
2256 }
2257 0 $parser->YYData->{curr_node} = $self;
2258 }
2259
2260 0 ▶sub _CheckOneway {
Subroutine _CheckOneway: not called CC=9 SCAR=45.0
2261 0 my $self = shift;
2262 0 my ($parser) = @_;
2263 0 ▶ if (exists $self->{modifier} and $self->{modifier} eq 'oneway') {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"modifier"} and $self->{"modifier"} eq "oneway") 0 0 0
Condition0%0/3
exists $self->{"modifier"} and $self->{"modifier"} eq "oneway"
!ll&&!rl&&r
000
MC/DC0%0/2
exists $self->{"modifier"} and $self->{"modifier"} eq "oneway"
exists $self->{"modifier"} $self->{"modifier"} eq "oneway"
Truth table0%0/3
A and B
A= exists $self->{"modifier"}B= $self->{"modifier"} eq "oneway"
ABresult
0X0
100
111
2264 # 3.12.1 Operation Attribute
2265 0 my $type = $self->{type};
2266 0 ▶ unless (ref $type or $type->isa('VoidType')) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $type or $type->isa("VoidType")) 0 0 0
Condition0%0/3
ref $type or $type->isa("VoidType")
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $type or $type->isa("VoidType")
ref $type $type->isa("VoidType")
Truth table0%0/3
A or B
A= ref $typeB= $type->isa("VoidType")
ABresult
1X1
011
000
2267 0 $parser->Error("return type of '$self->{idf}' is not 'void'.\n");
2268 }
2269 0 foreach ( @{$self->{list_param}} ) {
2270 0 ▶ next if ($_->isa('Ellipsis'));
Branch: 1 branch
BranchTrueFalseTotal
if $_->isa("Ellipsis") 0 0 0
2271 0 ▶ if ($_->{attr} ne 'in') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_->{"attr"} ne "in") 0 0 0
2272 0 $parser->Error("parameter '$_->{idf}' is not 'in'.\n");
2273 }
2274 }
2275 0 ▶ if (exists $self->{list_raise}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"list_raise"}) 0 0 0
2276 0 $parser->Error("oneway operation can't raise exception.\n");
2277 }
2278 }
2279 }
2280
2281 0 ▶sub Configure {
Subroutine Configure: not called CC=6 SCAR=37.4
2282 0 my $self = shift;
2283 0 my $parser = shift;
2284 0 $self->configure(@_);
2285 0 $self->_CheckOneway($parser);
2286 0 my @list_in = ();
2287 0 my @list_inout = ();
2288 0 my @list_out = ();
2289 0 foreach ( @{$self->{list_param}} ) {
2290 0 ▶ next if ($_->isa('Ellipsis'));
Branch: 1 branch
BranchTrueFalseTotal
if $_->isa("Ellipsis") 0 0 0
2291 0 ▶ if ($_->{attr} eq 'in') {
Branch: 3 branches
BranchTrueFalseTotal
if ($_->{'attr'} eq 'in') { } 0 0 0
elsif ($_->{'attr'} eq 'inout') { } 0 0 0
elsif ($_->{'attr'} eq 'out') { } 0 0 0
2292 0 push @list_in, $_;
2293 }
2294 elsif ($_->{attr} eq 'inout') {
2295 0 push @list_inout, $_;
2296 }
2297 elsif ($_->{attr} eq 'out') {
2298 0 push @list_out, $_;
2299 }
2300 }
2301 0 $self->{list_in} = \@list_in;
2302 0 $self->{list_inout} = \@list_inout;
2303 0 $self->{list_out} = \@list_out;
2304 0 return $self;
2305 }
2306
2307 package CORBA::IDL::Parameter;
2308
2309 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2310
2311 0 ▶sub _Init {
Subroutine _Init: not called CC=4 SCAR=30.0
2312 0 my $self = shift;
2313 0 my ($parser) = @_;
2314 0 $self->line_stamp($parser);
2315 0 my $type = $self->{type};
2316 0 ▶ unless (ref $type) {
Branch: 1 branch
BranchTrueFalseTotal
unless (ref $type) 0 0 0
2317 0 ▶ if ($type =~ /::([0-9A-Z_a-z]+)$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($type =~ /::([0-9A-Z_a-z]+)$/) 0 0 0
2318 0 $parser->YYData->{unnamed_symbtab}->InsertUsed($1);
2319 }
2320 }
2321 0 CORBA::IDL::TypeDeclarator->CheckDeprecated($parser, $type);
2322 0 CORBA::IDL::TypeDeclarator->CheckForward($parser, $type);
2323 0 $parser->YYData->{unnamed_symbtab}->Insert($self->{idf});
2324 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2325 0 $self->{doc} = $parser->YYData->{doc};
2326 0 $parser->YYData->{doc} = q{};
2327 }
2328 0 $parser->YYData->{curr_node} = $self;
2329 }
2330
2331 package CORBA::IDL::VoidType;
2332
2333 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2334
2335 package CORBA::IDL::Ellipsis;
2336
2337 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2338
2339 #
2340 # 3.14 Attribute Declaration
2341 #
2342
2343 package CORBA::IDL::Attributes;
2344
2345 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2346
2347 0 ▶sub _Init {
Subroutine _Init: not called CC=2 SCAR=17.9
2348 0 my $self = shift;
2349 0 my ($parser) = @_;
2350 0 my @list;
2351 0 foreach (@{$self->{list_expr}}) {
2352 my $attr = new CORBA::IDL::Attribute($parser,
2353 declspec => $self->{declspec},
2354 props => $self->{props},
2355 modifier => $self->{modifier},
2356 type => $self->{type},
2357 idf => $_,
2358 list_getraise => $self->{list_getraise},
2359 list_setraise => $self->{list_setraise}
2360 0 );
2361 0 push @list, $attr->{full};
2362 }
2363 0 $self->configure(list_decl => \@list);
2364 }
2365
2366 package CORBA::IDL::Attribute;
2367
2368 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2369
2370 0 ▶sub _Init {
Subroutine _Init: not called CC=5 SCAR=34.0
2371 0 my $self = shift;
2372 0 my ($parser) = @_;
2373 0 ▶ return unless ($self->{idf});
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"idf"} 0 0 0
2374 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2375 0 $self->{doc} = $parser->YYData->{doc};
2376 0 $parser->YYData->{doc} = q{};
2377 }
2378 0 $self->line_stamp($parser);
2379 0 $parser->YYData->{symbtab}->Insert($self);
2380 0 ▶ if (defined $parser->YYData->{curr_itf}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $parser->YYData->{'curr_itf'}) { } 0 0 0
2381 0 $self->{itf} = $parser->YYData->{curr_itf}->{full};
2382 0 $parser->YYData->{curr_itf}->{hash_attribute_operation}{$self->{idf}} = $self->{full};
2383 }
2384 else {
2385 0 $parser->Error(__PACKAGE__ . "::new ERROR_INTERNAL.\n");
2386 }
2387 0 $parser->YYData->{curr_node} = $self;
2388 my $op = new CORBA::IDL::Operation($parser,
2389 type => $self->{type},
2390 idf => '_get_' . $self->{idf}
2391 0 );
2392 $op->Configure($parser,
2393 list_param => [],
2394 list_raise => $self->{list_getraise}
2395 0 );
2396 0 $self->configure(
2397 _get => $op
2398 );
2399 0 ▶ unless (exists $self->{modifier}) { # readonly
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $self->{"modifier"}) 0 0 0
2400 $op = new CORBA::IDL::Operation($parser,
2401 type => new CORBA::IDL::VoidType($parser,
2402 value => 'void'
2403 ),
2404 idf => '_set_' . $self->{idf}
2405 0 );
2406 # unnamed_symbtab created
2407 $op->Configure($parser,
2408 list_param => [
2409 new CORBA::IDL::Parameter($parser,
2410 attr => 'in',
2411 type => $self->{type},
2412 idf => 'new' . ucfirst $self->{idf}
2413 )
2414 ],
2415 list_raise => $self->{list_setraise}
2416 0 );
2417 0 $self->configure(
2418 _set => $op
2419 );
2420 }
2421 }
2422
2423 #
2424 # 3.15 Repository Identity Related Declarations
2425 #
2426
2427 package CORBA::IDL::TypeId;
2428
2429 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2430
2431 0 ▶sub _Init {
Subroutine _Init: not called CC=21 SCAR=61.4
2432 0 my $self = shift;
2433 0 my ($parser) = @_;
2434 0 my $node = $parser->YYData->{symbtab}->Lookup($self->{idf});
2435 0 ▶ if (defined $node) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $node) 0 0 0
2436 0 ▶ if ( $node->isa('Modules')
Branch: 1 branch
BranchTrueFalseTotal
if ($node->isa('Modules') or $node->isa('BaseInterface') or $node->isa('ForwardBaseInterface') or $node->isa('StateMember') or $node->isa('Constant') or $node->isa('TypeDeclarator') or $node->isa('Enum') or $node->isa('Exception') or $node->isa('Operation') or $node->isa('Attribute') or $node->isa('Provides') or $node->isa('Uses') or $node->isa('Emits') or $node->isa('Publishes') or $node->isa('Consumes') or $node->isa('Factory') or $node->isa('Finder')) { } 0 0 0
Condition0%0/48
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses") or $node->isa("Emits") or $node->isa("Publishes") or $node->isa("Consumes") or $node->isa("Factory") or $node->isa("Finder")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses") or $node->isa("Emits") or $node->isa("Publishes") or $node->isa("Consumes") or $node->isa("Factory")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses") or $node->isa("Emits") or $node->isa("Publishes") or $node->isa("Consumes")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses") or $node->isa("Emits") or $node->isa("Publishes")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses") or $node->isa("Emits")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("BaseInterface")
l!l&&r!l&&!r
000
MC/DC0%0/17
$node->isa("Modules") or $node->isa("BaseInterface") or $node->isa("ForwardBaseInterface") or $node->isa("StateMember") or $node->isa("Constant") or $node->isa("TypeDeclarator") or $node->isa("Enum") or $node->isa("Exception") or $node->isa("Operation") or $node->isa("Attribute") or $node->isa("Provides") or $node->isa("Uses") or $node->isa("Emits") or $node->isa("Publishes") or $node->isa("Consumes") or $node->isa("Factory") or $node->isa("Finder")
too many conditions
2437 or $node->isa('BaseInterface')
2438 or $node->isa('ForwardBaseInterface')
2439 or $node->isa('StateMember')
2440 or $node->isa('Constant')
2441 or $node->isa('TypeDeclarator')
2442 or $node->isa('Enum')
2443 or $node->isa('Exception')
2444 or $node->isa('Operation')
2445 or $node->isa('Attribute')
2446 or $node->isa('Provides')
2447 or $node->isa('Uses')
2448 or $node->isa('Emits')
2449 or $node->isa('Publishes')
2450 or $node->isa('Consumes')
2451 or $node->isa('Factory')
2452 or $node->isa('Finder') ) {
2453 0 ▶ if (exists $node->{id}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{"id"}) 0 0 0
2454 0 $parser->Warning("TypeId/pragma conflict for '$self->{idf}'.\n");
2455 }
2456 0 ▶ if (exists $node->{typeid}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $node->{'typeid'}) { } 0 0 0
2457 0 $parser->Error("TypeId redefinition for '$self->{idf}'.\n");
2458 }
2459 else {
2460 0 $parser->YYData->{symbtab}->CheckID($node, $self->{value});
2461 0 $node->{typeid} = $self->{value};
2462 }
2463 }
2464 else {
2465 0 $parser->Error("Typeid not allowed for '$self->{idf}'.\n");
2466 }
2467 }
2468 }
2469
2470 package CORBA::IDL::TypePrefix;
2471
2472 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2473
2474 0 ▶sub _Init {
Subroutine _Init: not called CC=11 SCAR=48.8
2475 0 my $self = shift;
2476 0 my ($parser) = @_;
2477 0 ▶ unless ($self->{value} =~ /^[0-9A-Za-z_:\.\/\-]*$/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"value"} =~ m[^[0-9A-Za-z_:\./\-]*$]) 0 0 0
2478 0 $parser->Warning("Invalid TypePrefix format for \"$self->{value}\".\n");
2479 }
2480 0 ▶ if ($self->{idf}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'idf'}) { } 0 0 0
2481 0 my $node = $parser->YYData->{symbtab}->Lookup($self->{idf});
2482 0 ▶ if (defined $node) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $node) 0 0 0
2483 0 ▶ if ( $node->isa('Modules')
Branch: 1 branch
BranchTrueFalseTotal
if ($node->isa('Modules') or $node->isa('Interface') or $node->isa('ForwardInterface') or $node->isa('Value') or $node->isa('ForwardValue') or $node->isa('Specification')) { } 0 0 0
Condition0%0/15
$node->isa("Modules") or $node->isa("Interface") or $node->isa("ForwardInterface") or $node->isa("Value") or $node->isa("ForwardValue") or $node->isa("Specification")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("Interface") or $node->isa("ForwardInterface") or $node->isa("Value") or $node->isa("ForwardValue")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("Interface") or $node->isa("ForwardInterface") or $node->isa("Value")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("Interface") or $node->isa("ForwardInterface")
l!l&&r!l&&!r
000
$node->isa("Modules") or $node->isa("Interface")
l!l&&r!l&&!r
000
MC/DC0%0/6
$node->isa("Modules") or $node->isa("Interface") or $node->isa("ForwardInterface") or $node->isa("Value") or $node->isa("ForwardValue") or $node->isa("Specification")
$node->isa("Modules") $node->isa("Interface") $node->isa("ForwardInterface") $node->isa("Value") $node->isa("ForwardValue") $node->isa("Specification")
Truth table0%0/7
A or B or C or D or E or F
A= $node->isa("Modules")B= $node->isa("Interface")C= $node->isa("ForwardInterface")D= $node->isa("Value")E= $node->isa("ForwardValue")F= $node->isa("Specification")
ABCDEFresult
1XXXXX1
01XXXX1
001XXX1
0001XX1
00001X1
0000011
0000000
2484 or $node->isa('Interface')
2485 or $node->isa('ForwardInterface')
2486 or $node->isa('Value')
2487 or $node->isa('ForwardValue')
2488 or $node->isa('Specification') ) {
2489 0 ▶ if ($node->{prefix}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($node->{"prefix"}) 0 0 0
2490 0 $parser->Warning("TypePrefix/pragma conflict for '$self->{idf}'.\n");
2491 }
2492 0 $node->{typeprefix} = $self->{value};
2493 0 $node->{_typeprefix} = $self->{value};
2494 0 $parser->YYData->{symbtab}->{typeprefix}->{$node->{full}} = $self->{value} . '/' . $node->{idf};
2495 }
2496 else {
2497 0 $parser->Error("Typeprefix not allowed for '$self->{idf}'.\n");
2498 }
2499 }
2500 }
2501 else {
2502 0 $parser->YYData->{symbtab}->{typeprefix}->{''} = $self->{value};
2503 }
2504 }
2505
2506 #
2507 # 3.16 Event Declaration
2508 #
2509
2510 package CORBA::IDL::Event;
2511
2512 1 ▶use base qw(CORBA::IDL::Value);
Subroutine BEGIN: called CC=1 SCAR=0.0
2513
2514 package CORBA::IDL::RegularEvent;
2515
2516 1 ▶use base qw(CORBA::IDL::Event);
Subroutine BEGIN: called CC=1 SCAR=0.0
2517
2518 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=4 SCAR=30.0
2519 0 my $self = shift;
2520 0 my ($parser) = @_;
2521 0 ▶ if (exists $self->{inheritance}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}) 0 0 0
2522 0 ▶ if ( exists $self->{inheritance}->{modifier} # truncatable
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"inheritance"}{"modifier"} and exists $self->{"modifier"}) 0 0 0
Condition0%0/3
exists $self->{"inheritance"}{"modifier"} and exists $self->{"modifier"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $self->{"inheritance"}{"modifier"} and exists $self->{"modifier"}
exists $self->{"inheritance"}{"modifier"} exists $self->{"modifier"}
Truth table0%0/3
A and B
A= exists $self->{"inheritance"}{"modifier"}B= exists $self->{"modifier"}
ABresult
0X0
100
111
2523 and exists $self->{modifier} ) { # custom
2524 0 $parser->Error("'truncatable' is used in a custom event.\n");
2525 }
2526 }
2527 }
2528
2529 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=1 SCAR=0.0
2530 # A local type may be used as a parameter, attribute, return type, or exception
2531 # declaration of a local interface or of a valuetype.
2532 }
2533
2534 package CORBA::IDL::AbstractEvent;
2535
2536 1 ▶use base qw(CORBA::IDL::Event);
Subroutine BEGIN: called CC=1 SCAR=0.0
2537
2538 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=1 SCAR=0.0
2539 # empty
2540 }
2541
2542 0 ▶sub _CheckLocal {
Subroutine _CheckLocal: not called CC=1 SCAR=0.0
2543 # A local type may be used as a parameter, attribute, return type, or exception
2544 # declaration of a local interface or of a valuetype.
2545 }
2546
2547 package CORBA::IDL::ForwardEvent;
2548
2549 1 ▶use base qw(CORBA::IDL::ForwardValue);
Subroutine BEGIN: called CC=1 SCAR=0.0
2550
2551 package CORBA::IDL::ForwardRegularEvent;
2552
2553 1 ▶use base qw(CORBA::IDL::ForwardEvent);
Subroutine BEGIN: called CC=1 SCAR=0.0
2554
2555 package CORBA::IDL::ForwardAbstractEvent;
2556
2557 1 ▶use base qw(CORBA::IDL::ForwardEvent);
Subroutine BEGIN: called CC=1 SCAR=0.0
2558
2559 #
2560 # 3.17 Component Declaration
2561 #
2562
2563 package CORBA::IDL::Component;
2564
2565 1 ▶use base qw(CORBA::IDL::BaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
2566
2567 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=1 SCAR=0.0
2568 }
2569
2570 package CORBA::IDL::ForwardComponent;
2571
2572 1 ▶use base qw(CORBA::IDL::ForwardBaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
2573
2574 package CORBA::IDL::Provides;
2575
2576 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2577
2578 package CORBA::IDL::Uses;
2579
2580 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2581
2582 package CORBA::IDL::Emits;
2583
2584 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2585
2586 package CORBA::IDL::Publishes;
2587
2588 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2589
2590 package CORBA::IDL::Consumes;
2591
2592 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2593
2594 #
2595 # 3.18 Home Declaration
2596 #
2597
2598 package CORBA::IDL::Home;
2599
2600 1 ▶use base qw(CORBA::IDL::BaseInterface);
Subroutine BEGIN: called CC=1 SCAR=0.0
2601
2602 0 ▶sub _CheckInheritance {
Subroutine _CheckInheritance: not called CC=1 SCAR=0.0
2603 }
2604
2605 package CORBA::IDL::Factory;
2606
2607 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2608
2609 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
2610 0 my $self = shift;
2611 0 my ($parser) = @_;
2612 0 $parser->YYData->{symbtab}->Insert($self);
2613 0 $parser->YYData->{unnamed_symbtab} = new CORBA::IDL::UnnamedSymbtab($parser);
2614 0 ▶ if (defined $parser->YYData->{curr_itf}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $parser->YYData->{'curr_itf'}) { } 0 0 0
2615 0 $self->{itf} = $parser->YYData->{curr_itf}->{full};
2616 $parser->YYData->{curr_itf}->{hash_attribute_operation}{$self->{idf}} = $self->{full}
2617 0 }
2618 else {
2619 0 $parser->Error(__PACKAGE__ . "::new ERROR_INTERNAL.\n");
2620 }
2621 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2622 0 $self->{doc} = $parser->YYData->{doc};
2623 0 $parser->YYData->{doc} = q{};
2624 }
2625 0 $parser->YYData->{curr_node} = $self;
2626 }
2627
2628 0 ▶sub Configure {
Subroutine Configure: not called CC=3 SCAR=24.8
2629 0 my $self = shift;
2630 0 my $parser = shift;
2631 0 $self->configure(@_);
2632 0 my @list_in = ();
2633 0 foreach ( @{$self->{list_param}} ) {
2634 0 ▶ if ($_->{attr} eq 'in') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_->{"attr"} eq "in") 0 0 0
2635 0 unshift @list_in, $_;
2636 }
2637 }
2638 0 $self->{list_in} = \@list_in;
2639 0 $self->{list_inout} = [];
2640 0 $self->{list_out} = [];
2641 0 return $self;
2642 }
2643
2644 package CORBA::IDL::Finder;
2645
2646 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2647
2648 0 ▶sub _Init {
Subroutine _Init: not called CC=3 SCAR=24.8
2649 0 my $self = shift;
2650 0 my ($parser) = @_;
2651 0 $parser->YYData->{symbtab}->Insert($self);
2652 0 $parser->YYData->{unnamed_symbtab} = new CORBA::IDL::UnnamedSymbtab($parser);
2653 0 ▶ if (defined $parser->YYData->{curr_itf}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $parser->YYData->{'curr_itf'}) { } 0 0 0
2654 0 $self->{itf} = $parser->YYData->{curr_itf}->{full};
2655 $parser->YYData->{curr_itf}->{hash_attribute_operation}{$self->{idf}} = $self->{full}
2656 0 }
2657 else {
2658 0 $parser->Error(__PACKAGE__,"::new ERROR_INTERNAL.\n");
2659 }
2660 0 ▶ if ($parser->YYData->{doc} ne q{}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($parser->YYData->{"doc"} ne "") 0 0 0
2661 0 $self->{doc} = $parser->YYData->{doc};
2662 0 $parser->YYData->{doc} = q{};
2663 }
2664 0 $parser->YYData->{curr_node} = $self;
2665 }
2666
2667 0 ▶sub Configure {
Subroutine Configure: not called CC=3 SCAR=24.8
2668 0 my $self = shift;
2669 0 my $parser = shift;
2670 0 $self->configure(@_);
2671 0 my @list_in = ();
2672 0 foreach ( @{$self->{list_param}} ) {
2673 0 ▶ if ($_->{attr} eq 'in') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_->{"attr"} eq "in") 0 0 0
2674 0 unshift @list_in, $_;
2675 }
2676 }
2677 0 $self->{list_in} = \@list_in;
2678 0 $self->{list_inout} = [];
2679 0 $self->{list_out} = [];
2680 0 return $self;
2681 }
2682
2683 package CORBA::IDL::CodeFragment;
2684
2685 1 ▶use base qw(CORBA::IDL::Node);
Subroutine BEGIN: called CC=1 SCAR=0.0
2686
2687 0 ▶sub _Init {
Subroutine _Init: not called CC=1 SCAR=6.9
2688 0 my $self = shift;
2689 0 my ($parser) = @_;
2690 0 $self->line_stamp($parser);
2691 }
2692
2693 =for tree
2694
2695 Node
2696 Specification -
2697 Import -
2698 Modules - NEW
2699 Module
2700 (BaseInterface) -
2701 (Interface)
2702 RegularInterface
2703 LocalInterface
2704 AbstractInterface
2705 (Value)
2706 RegularValue
2707 BoxedValue
2708 AbstractValue
2709 (Event) -
2710 RegularEvent
2711 AbstractEvent
2712 Component
2713 Home
2714 (ForwardBaseInterface)
2715 (ForwardInterface) -
2716 ForwardRegularInterface
2717 ForwardLocalInterface
2718 ForwardAbstractInterface
2719 (ForwardValue) -
2720 ForwardRegularValue -
2721 ForwardAbstractValue -
2722 (ForwardEvent) -
2723 ForwardRegularEvent -
2724 ForwardAbstractEvent -
2725 ForwardComponent -
2726 InheritanceSpec
2727 StateMembers
2728 StateMember
2729 Initializer
2730 Expression
2731 Constant
2732 UnaryOp -
2733 BinaryOp -
2734 (Literal)
2735 IntegerLiteral -
2736 StringLiteral -
2737 WideStringLiteral -
2738 CharacterLiteral -
2739 WideCharacterLiteral -
2740 FixedPtLiteral -
2741 FloatingLiteral -
2742 BooleanLiteral -
2743 TypeDeclarator
2744 TypeDeclarators
2745 NativeType
2746 (BasicType)
2747 FloatingPtType -
2748 IntegerType -
2749 CharType -
2750 WideCharType -
2751 BooleanType -
2752 OctetType -
2753 AnyType -
2754 ObjectType -
2755 ValueBaseType -
2756 (_ConstructedType)
2757 StructType
2758 UnionType
2759 EnumType
2760 (_ForwardConstructedType)
2761 ForwardStructType -
2762 ForwardUnionType -
2763 Members
2764 Member
2765 Case -
2766 Default -
2767 Element
2768 Enum
2769 (_TemplateType) -
2770 SequenceType
2771 StringType -
2772 WideStringType -
2773 FixedPtType
2774 FixedPtConstType - NEW
2775 Exception
2776 Operation
2777 Parameter
2778 VoidType -
2779 Ellipsis -
2780 Attributes
2781 Attribute
2782 TypeId
2783 TypePrefix
2784 Provides
2785 Uses
2786 Emits
2787 Publishes
2788 Consumes
2789 Factory
2790 Finder
2791
2792 =end tree
2793
2794 1;
2795
« IDL/Parser23.pm ↑ Summary IDL/Symbtab.pm »