line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Interface Definition Language (OMG IDL CORBA v3.0) |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Python Language Mapping Specification, Version 1.2 November 2002 |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package CORBA::Python::NameVisitor; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
8
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
11
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2310
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = '2.64'; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# builds $node->{py_name} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new { |
18
|
0
|
|
|
0
|
0
|
|
my $proto = shift; |
19
|
0
|
|
0
|
|
|
|
my $class = ref($proto) || $proto; |
20
|
0
|
|
|
|
|
|
my $self = {}; |
21
|
0
|
|
|
|
|
|
bless $self, $class; |
22
|
0
|
|
|
|
|
|
my ($parser) = @_; |
23
|
0
|
|
|
|
|
|
$self->{symbtab} = $parser->YYData->{symbtab}; |
24
|
0
|
|
|
|
|
|
$self->{python_keywords} = { # Python 2.5 |
25
|
|
|
|
|
|
|
'and' => 1, |
26
|
|
|
|
|
|
|
'as' => 1, |
27
|
|
|
|
|
|
|
'assert' => 1, |
28
|
|
|
|
|
|
|
'break' => 1, |
29
|
|
|
|
|
|
|
'class' => 1, |
30
|
|
|
|
|
|
|
'continue' => 1, |
31
|
|
|
|
|
|
|
'def' => 1, |
32
|
|
|
|
|
|
|
'del' => 1, |
33
|
|
|
|
|
|
|
'elif' => 1, |
34
|
|
|
|
|
|
|
'else' => 1, |
35
|
|
|
|
|
|
|
'except' => 1, |
36
|
|
|
|
|
|
|
'exec' => 1, |
37
|
|
|
|
|
|
|
'finally' => 1, |
38
|
|
|
|
|
|
|
'for' => 1, |
39
|
|
|
|
|
|
|
'from' => 1, |
40
|
|
|
|
|
|
|
'global' => 1, |
41
|
|
|
|
|
|
|
'if' => 1, |
42
|
|
|
|
|
|
|
'import' => 1, |
43
|
|
|
|
|
|
|
'in' => 1, |
44
|
|
|
|
|
|
|
'is' => 1, |
45
|
|
|
|
|
|
|
'lambda' => 1, |
46
|
|
|
|
|
|
|
'not' => 1, |
47
|
|
|
|
|
|
|
'or' => 1, |
48
|
|
|
|
|
|
|
'pass' => 1, |
49
|
|
|
|
|
|
|
'print' => 1, |
50
|
|
|
|
|
|
|
'raise' => 1, |
51
|
|
|
|
|
|
|
'return' => 1, |
52
|
|
|
|
|
|
|
'try' => 1, |
53
|
|
|
|
|
|
|
'while' => 1, |
54
|
|
|
|
|
|
|
'with' => 1, |
55
|
|
|
|
|
|
|
'yield' => 1, |
56
|
|
|
|
|
|
|
}; |
57
|
0
|
|
|
|
|
|
return $self; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub _get_defn { |
61
|
0
|
|
|
0
|
|
|
my $self = shift; |
62
|
0
|
|
|
|
|
|
my $defn = shift; |
63
|
0
|
0
|
|
|
|
|
if (ref $defn) { |
64
|
0
|
|
|
|
|
|
return $defn; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
else { |
67
|
0
|
|
|
|
|
|
return $self->{symbtab}->Lookup($defn); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub _get_name { |
72
|
0
|
|
|
0
|
|
|
my $self = shift; |
73
|
0
|
|
|
|
|
|
my ($node) = @_; |
74
|
0
|
|
|
|
|
|
my $name = $node->{idf}; |
75
|
0
|
0
|
|
|
|
|
if (exists $self->{python_keywords}->{$name}) { |
76
|
0
|
|
|
|
|
|
return '_' . $name; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
else { |
79
|
0
|
|
|
|
|
|
return $name; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# |
84
|
|
|
|
|
|
|
# 3.5 OMG IDL Specification |
85
|
|
|
|
|
|
|
# |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub visitSpecification { |
88
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
89
|
0
|
|
|
|
|
|
my ($node) = @_; |
90
|
0
|
0
|
|
|
|
|
if (exists $node->{list_import}) { |
91
|
0
|
|
|
|
|
|
foreach (@{$node->{list_import}}) { |
|
0
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
$_->visit($self); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
} |
95
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) { |
|
0
|
|
|
|
|
|
|
96
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
# |
101
|
|
|
|
|
|
|
# 3.6 Import Declaration |
102
|
|
|
|
|
|
|
# |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub visitImport { |
105
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
106
|
0
|
|
|
|
|
|
my ($node) = @_; |
107
|
0
|
|
|
|
|
|
foreach (@{$node->{list_decl}}) { |
|
0
|
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self); |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# |
113
|
|
|
|
|
|
|
# 3.7 Module Declaration |
114
|
|
|
|
|
|
|
# |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub visitModules { |
117
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
118
|
0
|
|
|
|
|
|
my ($node) = @_; |
119
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) { |
|
0
|
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self); |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
# |
125
|
|
|
|
|
|
|
# 3.8 Interface Declaration |
126
|
|
|
|
|
|
|
# |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
sub visitBaseInterface { |
129
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
130
|
0
|
|
|
|
|
|
my ($node) = @_; |
131
|
0
|
0
|
|
|
|
|
return if (exists $node->{py_name}); |
132
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
133
|
0
|
|
|
|
|
|
foreach (@{$node->{list_export}}) { |
|
0
|
|
|
|
|
|
|
134
|
0
|
|
|
|
|
|
$self->{symbtab}->Lookup($_)->visit($self); |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
sub visitForwardBaseInterface { |
139
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
140
|
0
|
|
|
|
|
|
my ($node) = @_; |
141
|
0
|
0
|
|
|
|
|
return if (exists $node->{py_name}); |
142
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
# |
146
|
|
|
|
|
|
|
# 3.9 Value Declaration |
147
|
|
|
|
|
|
|
# |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
sub visitStateMember { |
150
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
151
|
0
|
|
|
|
|
|
my ($node) = @_; |
152
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
153
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self); |
154
|
|
|
|
|
|
|
} |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
sub visitInitializer { |
157
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
158
|
0
|
|
|
|
|
|
my ($node) = @_; |
159
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
160
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { |
|
0
|
|
|
|
|
|
|
161
|
0
|
|
|
|
|
|
$_->visit($self); # parameter |
162
|
|
|
|
|
|
|
} |
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
# |
166
|
|
|
|
|
|
|
# 3.10 Constant Declaration |
167
|
|
|
|
|
|
|
# |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub visitConstant { |
170
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
171
|
0
|
|
|
|
|
|
my ($node) = @_; |
172
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
173
|
|
|
|
|
|
|
} |
174
|
|
|
|
|
|
|
|
175
|
0
|
|
|
0
|
0
|
|
sub visitExpression { |
176
|
|
|
|
|
|
|
# empty |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
# |
180
|
|
|
|
|
|
|
# 3.11 Type Declaration |
181
|
|
|
|
|
|
|
# |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
sub visitTypeDeclarator { |
184
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
185
|
0
|
|
|
|
|
|
my ($node) = @_; |
186
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
187
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self); |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub visitNativeType { |
191
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
192
|
0
|
|
|
|
|
|
my ($node) = @_; |
193
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
# |
197
|
|
|
|
|
|
|
# 3.11.1 Basic Types |
198
|
|
|
|
|
|
|
# |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
sub visitBasicType { |
201
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
202
|
0
|
|
|
|
|
|
my ($node) = @_; |
203
|
0
|
|
|
|
|
|
my $name = $node->{value}; |
204
|
0
|
|
|
|
|
|
$name =~ s/ /_/g; |
205
|
0
|
|
|
|
|
|
$node->{py_name} = $name; |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
# |
209
|
|
|
|
|
|
|
# 3.11.2 Constructed Types |
210
|
|
|
|
|
|
|
# |
211
|
|
|
|
|
|
|
# 3.11.2.1 Structures |
212
|
|
|
|
|
|
|
# |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
sub visitStructType { |
215
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
216
|
0
|
|
|
|
|
|
my ($node) = @_; |
217
|
0
|
0
|
|
|
|
|
return if (exists $node->{py_name}); |
218
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
219
|
0
|
|
|
|
|
|
foreach (@{$node->{list_member}}) { |
|
0
|
|
|
|
|
|
|
220
|
0
|
|
|
|
|
|
$self->_get_defn($_)->visit($self); # member |
221
|
|
|
|
|
|
|
} |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
sub visitMember { |
225
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
226
|
0
|
|
|
|
|
|
my ($node) = @_; |
227
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
228
|
0
|
|
|
|
|
|
my $type = $self->_get_defn($node->{type}); |
229
|
0
|
|
|
|
|
|
$type->visit($self); |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
# 3.11.2.2 Discriminated Unions |
233
|
|
|
|
|
|
|
# |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub visitUnionType { |
236
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
237
|
0
|
|
|
|
|
|
my ($node) = @_; |
238
|
0
|
0
|
|
|
|
|
return if (exists $node->{py_name}); |
239
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
240
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self); |
241
|
0
|
|
|
|
|
|
foreach (@{$node->{list_expr}}) { |
|
0
|
|
|
|
|
|
|
242
|
0
|
|
|
|
|
|
$_->visit($self); # case |
243
|
|
|
|
|
|
|
} |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
sub visitCase { |
247
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
248
|
0
|
|
|
|
|
|
my ($node) = @_; |
249
|
0
|
|
|
|
|
|
foreach (@{$node->{list_label}}) { |
|
0
|
|
|
|
|
|
|
250
|
0
|
|
|
|
|
|
$_->visit($self); # default or expression |
251
|
|
|
|
|
|
|
} |
252
|
0
|
|
|
|
|
|
$node->{element}->visit($self); |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
0
|
|
|
0
|
0
|
|
sub visitDefault { |
256
|
|
|
|
|
|
|
# empty |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
sub visitElement { |
260
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
261
|
0
|
|
|
|
|
|
my ($node) = @_; |
262
|
0
|
|
|
|
|
|
$self->_get_defn($node->{value})->visit($self); # member |
263
|
|
|
|
|
|
|
} |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
# 3.11.2.4 Enumerations |
266
|
|
|
|
|
|
|
# |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
sub visitEnumType { |
269
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
270
|
0
|
|
|
|
|
|
my ($node) = @_; |
271
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
272
|
0
|
|
|
|
|
|
foreach (@{$node->{list_expr}}) { |
|
0
|
|
|
|
|
|
|
273
|
0
|
|
|
|
|
|
$_->visit($self); # enum |
274
|
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
} |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
sub visitEnum { |
278
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
279
|
0
|
|
|
|
|
|
my ($node) = @_; |
280
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
281
|
|
|
|
|
|
|
} |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
# |
284
|
|
|
|
|
|
|
# 3.11.3 Template Types |
285
|
|
|
|
|
|
|
# |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
sub visitSequenceType { |
288
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
289
|
0
|
|
|
|
|
|
my ($node) = @_; |
290
|
0
|
|
|
|
|
|
my $type = $self->_get_defn($node->{type}); |
291
|
0
|
|
|
|
|
|
$type->visit($self); |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub visitStringType { |
295
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
296
|
0
|
|
|
|
|
|
my ($node) = @_; |
297
|
0
|
|
|
|
|
|
$node->{py_name} = 'string'; |
298
|
|
|
|
|
|
|
} |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
sub visitWideStringType { |
301
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
302
|
0
|
|
|
|
|
|
my ($node) = @_; |
303
|
0
|
|
|
|
|
|
$node->{py_name} = 'wstring'; |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
sub visitFixedPtType { |
307
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
308
|
0
|
|
|
|
|
|
my ($node) = @_; |
309
|
0
|
|
|
|
|
|
my $name = 'fixed'; |
310
|
0
|
|
|
|
|
|
$node->{py_name} = $name; |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
sub visitFixedPtConstType { |
314
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
315
|
0
|
|
|
|
|
|
my ($node) = @_; |
316
|
0
|
|
|
|
|
|
my $name = 'fixed'; |
317
|
0
|
|
|
|
|
|
$node->{py_name} = $name; |
318
|
|
|
|
|
|
|
} |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
# |
321
|
|
|
|
|
|
|
# 3.12 Exception Declaration |
322
|
|
|
|
|
|
|
# |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
sub visitException { |
325
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
326
|
0
|
|
|
|
|
|
my ($node) = @_; |
327
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
328
|
0
|
0
|
|
|
|
|
if (exists $node->{list_member}) { |
329
|
0
|
|
|
|
|
|
foreach (@{$node->{list_member}}) { |
|
0
|
|
|
|
|
|
|
330
|
0
|
|
|
|
|
|
$self->_get_defn($_)->visit($self); # member |
331
|
|
|
|
|
|
|
} |
332
|
|
|
|
|
|
|
} |
333
|
|
|
|
|
|
|
} |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
# |
336
|
|
|
|
|
|
|
# 3.13 Operation Declaration |
337
|
|
|
|
|
|
|
# |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
sub visitOperation { |
340
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
341
|
0
|
|
|
|
|
|
my ($node) = @_; |
342
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
343
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { |
|
0
|
|
|
|
|
|
|
344
|
0
|
|
|
|
|
|
$_->visit($self); # parameter |
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
} |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
sub visitParameter { |
349
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
350
|
0
|
|
|
|
|
|
my($node) = @_; |
351
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
352
|
0
|
|
|
|
|
|
$self->_get_defn($node->{type})->visit($self); |
353
|
|
|
|
|
|
|
} |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
sub visitVoidType { |
356
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
357
|
0
|
|
|
|
|
|
my ($node) = @_; |
358
|
0
|
|
|
|
|
|
$node->{py_name} = q{}; |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
# |
362
|
|
|
|
|
|
|
# 3.14 Attribute Declaration |
363
|
|
|
|
|
|
|
# |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
sub visitAttribute { |
366
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
367
|
0
|
|
|
|
|
|
my ($node) = @_; |
368
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
369
|
0
|
|
|
|
|
|
$node->{_get}->visit($self); |
370
|
0
|
0
|
|
|
|
|
$node->{_set}->visit($self) if (exists $node->{_set}); |
371
|
|
|
|
|
|
|
} |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
# |
374
|
|
|
|
|
|
|
# 3.15 Repository Identity Related Declarations |
375
|
|
|
|
|
|
|
# |
376
|
|
|
|
|
|
|
|
377
|
0
|
|
|
0
|
0
|
|
sub visitTypeId { |
378
|
|
|
|
|
|
|
# empty |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
|
381
|
0
|
|
|
0
|
0
|
|
sub visitTypePrefix { |
382
|
|
|
|
|
|
|
# empty |
383
|
|
|
|
|
|
|
} |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
# |
386
|
|
|
|
|
|
|
# 3.17 Component Declaration |
387
|
|
|
|
|
|
|
# |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
sub visitProvides { |
390
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
391
|
0
|
|
|
|
|
|
my ($node) = @_; |
392
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
393
|
|
|
|
|
|
|
} |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
sub visitUses { |
396
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
397
|
0
|
|
|
|
|
|
my ($node) = @_; |
398
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
399
|
|
|
|
|
|
|
} |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
sub visitPublishes { |
402
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
403
|
0
|
|
|
|
|
|
my ($node) = @_; |
404
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
405
|
|
|
|
|
|
|
} |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
sub visitEmits { |
408
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
409
|
0
|
|
|
|
|
|
my ($node) = @_; |
410
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
411
|
|
|
|
|
|
|
} |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
sub visitConsumes { |
414
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
415
|
0
|
|
|
|
|
|
my ($node) = @_; |
416
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
417
|
|
|
|
|
|
|
} |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
# |
420
|
|
|
|
|
|
|
# 3.18 Home Declaration |
421
|
|
|
|
|
|
|
# |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
sub visitFactory { |
424
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
425
|
0
|
|
|
|
|
|
my ($node) = @_; |
426
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
427
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { |
|
0
|
|
|
|
|
|
|
428
|
0
|
|
|
|
|
|
$_->visit($self); # parameter |
429
|
|
|
|
|
|
|
} |
430
|
|
|
|
|
|
|
} |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
sub visitFinder { |
433
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
434
|
0
|
|
|
|
|
|
my ($node) = @_; |
435
|
0
|
|
|
|
|
|
$node->{py_name} = $self->_get_name($node); |
436
|
0
|
|
|
|
|
|
foreach (@{$node->{list_param}}) { |
|
0
|
|
|
|
|
|
|
437
|
0
|
|
|
|
|
|
$_->visit($self); # parameter |
438
|
|
|
|
|
|
|
} |
439
|
|
|
|
|
|
|
} |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
1; |
442
|
|
|
|
|
|
|
|