line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
#
|
3
|
|
|
|
|
|
|
# Interface Definition Language (OMG IDL CORBA v3.0)
|
4
|
|
|
|
|
|
|
#
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
package CORBA::HTML::NameVisitor;
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
9
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6776
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '2.60';
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new {
|
14
|
0
|
|
|
0
|
0
|
|
my $proto = shift;
|
15
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto;
|
16
|
0
|
|
|
|
|
|
my $self = {};
|
17
|
0
|
|
|
|
|
|
bless $self, $class;
|
18
|
0
|
|
|
|
|
|
my ($parser) = @_;
|
19
|
0
|
|
|
|
|
|
$self->{symbtab} = $parser->YYData->{symbtab};
|
20
|
0
|
|
|
|
|
|
return $self;
|
21
|
|
|
|
|
|
|
}
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _get_name {
|
24
|
0
|
|
|
0
|
|
|
my $self = shift;
|
25
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
26
|
0
|
|
|
|
|
|
my $full = $node->{full};
|
27
|
0
|
|
|
|
|
|
$full =~ s/^:://;
|
28
|
0
|
|
|
|
|
|
my @list_name = split /::/, $full;
|
29
|
0
|
|
|
|
|
|
my @list_scope = split /::/, $scope;
|
30
|
0
|
|
|
|
|
|
while (@list_scope) {
|
31
|
0
|
0
|
|
|
|
|
last if ($list_scope[0] ne $list_name[0]);
|
32
|
0
|
|
|
|
|
|
shift @list_name;
|
33
|
0
|
|
|
|
|
|
shift @list_scope;
|
34
|
|
|
|
|
|
|
}
|
35
|
0
|
|
|
|
|
|
my $name = join '::', @list_name;
|
36
|
0
|
|
|
|
|
|
my $fragment = $node->{idf};
|
37
|
0
|
0
|
|
|
|
|
$fragment = $node->{html_name} if (exists $node->{html_name});
|
38
|
0
|
0
|
0
|
|
|
|
if (exists $node->{file_html}) {
|
|
|
0
|
|
|
|
|
|
39
|
0
|
|
|
|
|
|
my $a = '' . $name . '';
|
40
|
0
|
|
|
|
|
|
return $a;
|
41
|
|
|
|
|
|
|
}
|
42
|
|
|
|
|
|
|
elsif ( $node->isa('BaseInterface') or $node->isa('ForwardBaseInterface') ) {
|
43
|
0
|
|
|
|
|
|
my $filename = $node->{full};
|
44
|
0
|
|
|
|
|
|
$filename =~ s/::/_/g;
|
45
|
0
|
|
|
|
|
|
$filename .= '.html';
|
46
|
0
|
|
|
|
|
|
my $a = '' . $name . '';
|
47
|
0
|
|
|
|
|
|
return $a;
|
48
|
|
|
|
|
|
|
}
|
49
|
|
|
|
|
|
|
else {
|
50
|
0
|
|
|
|
|
|
return $name;
|
51
|
|
|
|
|
|
|
}
|
52
|
|
|
|
|
|
|
}
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _get_lexeme {
|
55
|
0
|
|
|
0
|
|
|
my $self = shift;
|
56
|
0
|
|
|
|
|
|
my ($node) = @_;
|
57
|
0
|
|
|
|
|
|
my $value = $node->{lexeme};
|
58
|
0
|
|
|
|
|
|
$value =~ s/&/"&"/g;
|
59
|
0
|
|
|
|
|
|
$value =~ s/"<"/g;
|
60
|
0
|
|
|
|
|
|
$value =~ s/>/">"/g;
|
61
|
0
|
|
|
|
|
|
return $value;
|
62
|
|
|
|
|
|
|
}
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub _get_defn {
|
65
|
0
|
|
|
0
|
|
|
my $self = shift;
|
66
|
0
|
|
|
|
|
|
my ($defn) = @_;
|
67
|
0
|
0
|
|
|
|
|
if (ref $defn) {
|
68
|
0
|
|
|
|
|
|
return $defn;
|
69
|
|
|
|
|
|
|
}
|
70
|
|
|
|
|
|
|
else {
|
71
|
0
|
|
|
|
|
|
return $self->{symbtab}->Lookup($defn);
|
72
|
|
|
|
|
|
|
}
|
73
|
|
|
|
|
|
|
}
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
#
|
76
|
|
|
|
|
|
|
# 3.8 Interface Declaration
|
77
|
|
|
|
|
|
|
#
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub visitBaseInterface {
|
80
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
81
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
82
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
83
|
|
|
|
|
|
|
}
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub visitForwardBaseInterface {
|
86
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
87
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
88
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
89
|
|
|
|
|
|
|
}
|
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
#
|
92
|
|
|
|
|
|
|
# 3.10 Constant Declaration
|
93
|
|
|
|
|
|
|
#
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
sub visitConstant {
|
96
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
97
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
98
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
99
|
|
|
|
|
|
|
}
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub _Eval {
|
102
|
0
|
|
|
0
|
|
|
my $self = shift;
|
103
|
0
|
|
|
|
|
|
my ($list_expr, $scope, $type) = @_;
|
104
|
0
|
|
|
|
|
|
my $elt = pop @{$list_expr};
|
|
0
|
|
|
|
|
|
|
105
|
0
|
0
|
|
|
|
|
unless (ref $elt) {
|
106
|
0
|
|
|
|
|
|
$elt = $self->{symbtab}->Lookup($elt);
|
107
|
|
|
|
|
|
|
}
|
108
|
0
|
0
|
0
|
|
|
|
if ( $elt->isa('BinaryOp') ) {
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
109
|
0
|
|
|
|
|
|
my $right = $self->_Eval($list_expr, $scope, $type);
|
110
|
0
|
|
|
|
|
|
my $left = $self->_Eval($list_expr, $scope, $type);
|
111
|
0
|
|
|
|
|
|
return q{(} . $left . q{ } . $elt->{op} . q{ } . $right . q{)};
|
112
|
|
|
|
|
|
|
}
|
113
|
|
|
|
|
|
|
elsif ( $elt->isa('UnaryOp') ) {
|
114
|
0
|
|
|
|
|
|
my $right = $self->_Eval($list_expr, $scope, $type);
|
115
|
0
|
|
|
|
|
|
return $elt->{op} . $right;
|
116
|
|
|
|
|
|
|
}
|
117
|
|
|
|
|
|
|
elsif ( $elt->isa('Constant')
|
118
|
|
|
|
|
|
|
or $elt->isa('Enum')
|
119
|
|
|
|
|
|
|
or $elt->isa('Literal') ) {
|
120
|
0
|
|
|
|
|
|
return $elt->visit($self, $scope, $type);
|
121
|
|
|
|
|
|
|
}
|
122
|
|
|
|
|
|
|
else {
|
123
|
0
|
|
|
|
|
|
warn __PACKAGE__," _Eval: INTERNAL ERROR ",ref $elt,".\n";
|
124
|
0
|
|
|
|
|
|
return undef;
|
125
|
|
|
|
|
|
|
}
|
126
|
|
|
|
|
|
|
}
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub visitExpression {
|
129
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
130
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
131
|
0
|
|
|
|
|
|
my @list_expr = @{$node->{list_expr}}; # create a copy
|
|
0
|
|
|
|
|
|
|
132
|
0
|
|
|
|
|
|
return $self->_Eval(\@list_expr, $scope, $node->{type});
|
133
|
|
|
|
|
|
|
}
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub visitEnum {
|
136
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
137
|
0
|
|
|
|
|
|
my ($node, $attr) = @_;
|
138
|
0
|
|
|
|
|
|
return $node->{idf};
|
139
|
|
|
|
|
|
|
}
|
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
sub visitIntegerLiteral {
|
142
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
143
|
0
|
|
|
|
|
|
my ($node) = @_;
|
144
|
0
|
|
|
|
|
|
return $self->_get_lexeme($node);
|
145
|
|
|
|
|
|
|
}
|
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
sub visitStringLiteral {
|
148
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
149
|
0
|
|
|
|
|
|
my ($node) = @_;
|
150
|
0
|
|
|
|
|
|
my @list = unpack 'C*', $node->{value};
|
151
|
0
|
|
|
|
|
|
my $str = q{"};
|
152
|
0
|
|
|
|
|
|
foreach (@list) {
|
153
|
0
|
0
|
0
|
|
|
|
if ($_ < 32 or $_ >= 127) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
154
|
0
|
|
|
|
|
|
$str .= sprintf "\\x%02x", $_;
|
155
|
|
|
|
|
|
|
}
|
156
|
|
|
|
|
|
|
elsif ($_ == ord '&') {
|
157
|
0
|
|
|
|
|
|
$str .= '&';
|
158
|
|
|
|
|
|
|
}
|
159
|
|
|
|
|
|
|
elsif ($_ == ord '<') {
|
160
|
0
|
|
|
|
|
|
$str .= '<';
|
161
|
|
|
|
|
|
|
}
|
162
|
|
|
|
|
|
|
elsif ($_ == ord '>') {
|
163
|
0
|
|
|
|
|
|
$str .= '>';
|
164
|
|
|
|
|
|
|
}
|
165
|
|
|
|
|
|
|
else {
|
166
|
0
|
|
|
|
|
|
$str .= chr $_;
|
167
|
|
|
|
|
|
|
}
|
168
|
|
|
|
|
|
|
}
|
169
|
0
|
|
|
|
|
|
$str .= q{"};
|
170
|
0
|
|
|
|
|
|
return $str;
|
171
|
|
|
|
|
|
|
}
|
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub visitWideStringLiteral {
|
174
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
175
|
0
|
|
|
|
|
|
my ($node) = @_;
|
176
|
0
|
|
|
|
|
|
my @list = unpack 'C*', $node->{value};
|
177
|
0
|
|
|
|
|
|
my $str = q{L"};
|
178
|
0
|
|
|
|
|
|
foreach (@list) {
|
179
|
0
|
0
|
0
|
|
|
|
if ($_ < 32 or ($_ >= 128 and $_ < 256)) {
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
180
|
0
|
|
|
|
|
|
$str .= sprintf "\\x%02x", $_;
|
181
|
|
|
|
|
|
|
}
|
182
|
|
|
|
|
|
|
elsif ($_ >= 256) {
|
183
|
0
|
|
|
|
|
|
$str .= sprintf "\\u%04x", $_;
|
184
|
|
|
|
|
|
|
}
|
185
|
|
|
|
|
|
|
elsif ($_ == ord '&') {
|
186
|
0
|
|
|
|
|
|
$str .= '&';
|
187
|
|
|
|
|
|
|
}
|
188
|
|
|
|
|
|
|
elsif ($_ == ord '<') {
|
189
|
0
|
|
|
|
|
|
$str .= '<';
|
190
|
|
|
|
|
|
|
}
|
191
|
|
|
|
|
|
|
elsif ($_ == ord '>') {
|
192
|
0
|
|
|
|
|
|
$str .= '>';
|
193
|
|
|
|
|
|
|
}
|
194
|
|
|
|
|
|
|
else {
|
195
|
0
|
|
|
|
|
|
$str .= chr $_;
|
196
|
|
|
|
|
|
|
}
|
197
|
|
|
|
|
|
|
}
|
198
|
0
|
|
|
|
|
|
$str .= q{"};
|
199
|
0
|
|
|
|
|
|
return $str;
|
200
|
|
|
|
|
|
|
}
|
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
sub visitCharacterLiteral {
|
203
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
204
|
0
|
|
|
|
|
|
my ($node) = @_;
|
205
|
0
|
|
|
|
|
|
my @list = unpack 'C', $node->{value};
|
206
|
0
|
|
|
|
|
|
my $c = $list[0];
|
207
|
0
|
|
|
|
|
|
my $str = q{'};
|
208
|
0
|
0
|
0
|
|
|
|
if ($c < 32 or $c >= 128) {
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
209
|
0
|
|
|
|
|
|
$str .= sprintf "\\x%02x", $c;
|
210
|
|
|
|
|
|
|
}
|
211
|
|
|
|
|
|
|
elsif ($c == ord '&') {
|
212
|
0
|
|
|
|
|
|
$str .= '&';
|
213
|
|
|
|
|
|
|
}
|
214
|
|
|
|
|
|
|
elsif ($c == ord '<') {
|
215
|
0
|
|
|
|
|
|
$str .= '<';
|
216
|
|
|
|
|
|
|
}
|
217
|
|
|
|
|
|
|
elsif ($c == ord '>') {
|
218
|
0
|
|
|
|
|
|
$str .= '>';
|
219
|
|
|
|
|
|
|
}
|
220
|
|
|
|
|
|
|
else {
|
221
|
0
|
|
|
|
|
|
$str .= chr $c;
|
222
|
|
|
|
|
|
|
}
|
223
|
0
|
|
|
|
|
|
$str .= q{'};
|
224
|
0
|
|
|
|
|
|
return $str;
|
225
|
|
|
|
|
|
|
}
|
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
sub visitWideCharacterLiteral {
|
228
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
229
|
0
|
|
|
|
|
|
my ($node) = @_;
|
230
|
0
|
|
|
|
|
|
my @list = unpack 'C', $node->{value};
|
231
|
0
|
|
|
|
|
|
my $c = $list[0];
|
232
|
0
|
|
|
|
|
|
my $str = q{L'};
|
233
|
0
|
0
|
0
|
|
|
|
if ($c < 32 or ($c >= 128 and $c < 256)) {
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
234
|
0
|
|
|
|
|
|
$str .= sprintf "\\x%02x", $c;
|
235
|
|
|
|
|
|
|
}
|
236
|
|
|
|
|
|
|
elsif ($c >= 256) {
|
237
|
0
|
|
|
|
|
|
$str .= sprintf "\\u%04x", $c;
|
238
|
|
|
|
|
|
|
}
|
239
|
|
|
|
|
|
|
elsif ($c == ord '&') {
|
240
|
0
|
|
|
|
|
|
$str .= '&';
|
241
|
|
|
|
|
|
|
}
|
242
|
|
|
|
|
|
|
elsif ($c == ord '<') {
|
243
|
0
|
|
|
|
|
|
$str .= '<';
|
244
|
|
|
|
|
|
|
}
|
245
|
|
|
|
|
|
|
elsif ($c == ord '>') {
|
246
|
0
|
|
|
|
|
|
$str .= '>';
|
247
|
|
|
|
|
|
|
}
|
248
|
|
|
|
|
|
|
else {
|
249
|
0
|
|
|
|
|
|
$str .= chr $c;
|
250
|
|
|
|
|
|
|
}
|
251
|
0
|
|
|
|
|
|
$str .= q{'};
|
252
|
0
|
|
|
|
|
|
return $str;
|
253
|
|
|
|
|
|
|
}
|
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub visitFixedPtLiteral {
|
256
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
257
|
0
|
|
|
|
|
|
my ($node) = @_;
|
258
|
0
|
|
|
|
|
|
return $self->_get_lexeme($node);
|
259
|
|
|
|
|
|
|
}
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub visitFloatingPtLiteral {
|
262
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
263
|
0
|
|
|
|
|
|
my ($node) = @_;
|
264
|
0
|
|
|
|
|
|
return $self->_get_lexeme($node);
|
265
|
|
|
|
|
|
|
}
|
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
sub visitBooleanLiteral {
|
268
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
269
|
0
|
|
|
|
|
|
my ($node) = @_;
|
270
|
0
|
|
|
|
|
|
return $node->{value};
|
271
|
|
|
|
|
|
|
}
|
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
#
|
274
|
|
|
|
|
|
|
# 3.11 Type Declaration
|
275
|
|
|
|
|
|
|
#
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
sub visitTypeDeclarator {
|
278
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
279
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
280
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
281
|
|
|
|
|
|
|
}
|
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
sub visitNativeType {
|
284
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
285
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
286
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
287
|
|
|
|
|
|
|
}
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
sub visitBasicType {
|
290
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
291
|
0
|
|
|
|
|
|
my ($node) = @_;
|
292
|
0
|
|
|
|
|
|
return $node->{value};
|
293
|
|
|
|
|
|
|
}
|
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
sub visitAnyType {
|
296
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
297
|
0
|
|
|
|
|
|
my ($node) = @_;
|
298
|
0
|
|
|
|
|
|
return $node->{value};
|
299
|
|
|
|
|
|
|
}
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
sub visitStructType {
|
302
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
303
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
304
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
305
|
|
|
|
|
|
|
}
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
sub visitUnionType {
|
308
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
309
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
310
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
311
|
|
|
|
|
|
|
}
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
sub visitEnumType {
|
314
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
315
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
316
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
317
|
|
|
|
|
|
|
}
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
sub visitSequenceType {
|
320
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
321
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
322
|
0
|
|
|
|
|
|
my $type = $self->_get_defn($node->{type});
|
323
|
0
|
|
|
|
|
|
my $name = $node->{value} . '<';
|
324
|
0
|
|
|
|
|
|
$name .= $type->visit($self, $scope);
|
325
|
0
|
0
|
|
|
|
|
if (exists $node->{max}) {
|
326
|
0
|
|
|
|
|
|
$name .= q{,};
|
327
|
0
|
|
|
|
|
|
$name .= $node->{max}->visit($self, $scope);
|
328
|
|
|
|
|
|
|
}
|
329
|
0
|
|
|
|
|
|
$name .= '>';
|
330
|
0
|
|
|
|
|
|
return $name;
|
331
|
|
|
|
|
|
|
}
|
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
sub visitStringType {
|
334
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
335
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
336
|
0
|
0
|
|
|
|
|
if (exists $node->{max}) {
|
337
|
0
|
|
|
|
|
|
my $name = $node->{value} . '<';
|
338
|
0
|
|
|
|
|
|
$name .= $node->{max}->visit($self, $scope);
|
339
|
0
|
|
|
|
|
|
$name .= '>';
|
340
|
0
|
|
|
|
|
|
return $name;
|
341
|
|
|
|
|
|
|
}
|
342
|
|
|
|
|
|
|
else {
|
343
|
0
|
|
|
|
|
|
return $node->{value};
|
344
|
|
|
|
|
|
|
}
|
345
|
|
|
|
|
|
|
}
|
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
sub visitWideStringType {
|
348
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
349
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
350
|
0
|
0
|
|
|
|
|
if (exists $node->{max}) {
|
351
|
0
|
|
|
|
|
|
my $name = $node->{value} . '<';
|
352
|
0
|
|
|
|
|
|
$name .= $node->{max}->visit($self, $scope);
|
353
|
0
|
|
|
|
|
|
$name .= '>';
|
354
|
0
|
|
|
|
|
|
return $name;
|
355
|
|
|
|
|
|
|
}
|
356
|
|
|
|
|
|
|
else {
|
357
|
0
|
|
|
|
|
|
return $node->{value};
|
358
|
|
|
|
|
|
|
}
|
359
|
|
|
|
|
|
|
}
|
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
sub visitFixedPtType {
|
362
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
363
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
364
|
0
|
|
|
|
|
|
my $name = $node->{value} . '<';
|
365
|
0
|
|
|
|
|
|
$name .= $node->{d}->visit($self, $scope);
|
366
|
0
|
|
|
|
|
|
$name .= q{,};
|
367
|
0
|
|
|
|
|
|
$name .= $node->{s}->visit($self, $scope);
|
368
|
0
|
|
|
|
|
|
$name .= '>';
|
369
|
0
|
|
|
|
|
|
return $name;
|
370
|
|
|
|
|
|
|
}
|
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
sub visitFixedPtConstType {
|
373
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
374
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
375
|
0
|
|
|
|
|
|
return $node->{value};
|
376
|
|
|
|
|
|
|
}
|
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
sub visitVoidType {
|
379
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
380
|
0
|
|
|
|
|
|
my ($node) = @_;
|
381
|
0
|
|
|
|
|
|
return $node->{value};
|
382
|
|
|
|
|
|
|
}
|
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
sub visitValueBaseType {
|
385
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
386
|
0
|
|
|
|
|
|
my ($node) = @_;
|
387
|
0
|
|
|
|
|
|
return $node->{value};
|
388
|
|
|
|
|
|
|
}
|
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
#
|
391
|
|
|
|
|
|
|
# 3.12 Exception Declaration
|
392
|
|
|
|
|
|
|
#
|
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
sub visitException {
|
395
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
396
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
397
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
398
|
|
|
|
|
|
|
}
|
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
#
|
401
|
|
|
|
|
|
|
# 3.13 Operation Declaration
|
402
|
|
|
|
|
|
|
#
|
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
sub visitOperation {
|
405
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
406
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
407
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
408
|
|
|
|
|
|
|
}
|
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
#
|
411
|
|
|
|
|
|
|
# 3.14 Attribute Declaration
|
412
|
|
|
|
|
|
|
#
|
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
sub visitAttribute {
|
415
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
416
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
417
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
418
|
|
|
|
|
|
|
}
|
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
#
|
421
|
|
|
|
|
|
|
# 3.17 Component Declaration
|
422
|
|
|
|
|
|
|
#
|
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
sub visitProvides {
|
425
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
426
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
427
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
428
|
|
|
|
|
|
|
}
|
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
sub visitUses {
|
431
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
432
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
433
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
434
|
|
|
|
|
|
|
}
|
435
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
sub visitPublishes {
|
437
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
438
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
439
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
440
|
|
|
|
|
|
|
}
|
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
sub visitEmits {
|
443
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
444
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
445
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
446
|
|
|
|
|
|
|
}
|
447
|
|
|
|
|
|
|
|
448
|
|
|
|
|
|
|
sub visitConsumes {
|
449
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
450
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
451
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
452
|
|
|
|
|
|
|
}
|
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
#
|
455
|
|
|
|
|
|
|
# 3.18 Home Declaration
|
456
|
|
|
|
|
|
|
#
|
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
sub visitFactory {
|
459
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
460
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
461
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
462
|
|
|
|
|
|
|
}
|
463
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
sub visitFinder {
|
465
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
466
|
0
|
|
|
|
|
|
my ($node, $scope) = @_;
|
467
|
0
|
|
|
|
|
|
return $self->_get_name($node, $scope);
|
468
|
|
|
|
|
|
|
}
|
469
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
1;
|
471
|
|
|
|
|
|
|
|