Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / TAO_IDL / fe / idl.tab.cpp
blob43432b2741c45fe6700fdcb7d0234663711f447a
1 /* A Bison parser, made by GNU Bison 3.8.2. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 Inc.
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <https://www.gnu.org/licenses/>. */
21 /* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
34 /* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 especially those whose name start with YY_ or yy_. They are
39 private implementation details that can be changed or removed. */
41 /* All symbols defined below should begin with yy or YY, to avoid
42 infringing on user name space. This should be done even for local
43 variables, as they might otherwise be expanded by user macros.
44 There are some unavoidable exceptions within include files to
45 define necessary library symbols; they are noted "INFRINGES ON
46 USER NAME SPACE" below. */
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30802
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.8.2"
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
57 /* Pure parsers. */
58 #define YYPURE 0
60 /* Push parsers. */
61 #define YYPUSH 0
63 /* Pull parsers. */
64 #define YYPULL 1
67 /* Substitute the variable and function names. */
68 #define yyparse tao_yyparse
69 #define yylex tao_yylex
70 #define yyerror tao_yyerror
71 #define yydebug tao_yydebug
72 #define yynerrs tao_yynerrs
73 #define yylval tao_yylval
74 #define yychar tao_yychar
76 /* First part of user prologue. */
77 #line 72 "fe/idl.ypp"
79 #include <utl_identifier.h>
80 #include <utl_err.h>
81 #include <utl_string.h>
82 #include <utl_strlist.h>
83 #include <utl_namelist.h>
84 #include <utl_exprlist.h>
85 #include <utl_labellist.h>
86 #include <utl_decllist.h>
88 #include <global_extern.h>
89 #include <nr_extern.h>
91 #include <ast_argument.h>
92 #include <ast_array.h>
93 #include <ast_attribute.h>
94 #include <ast_field.h>
95 #include <ast_fixed.h>
96 #include <ast_expression.h>
97 #include <ast_operation.h>
98 #include <ast_generator.h>
99 #include <ast_template_module.h>
100 #include <ast_template_module_inst.h>
101 #include <ast_template_module_ref.h>
102 #include <ast_typedef.h>
103 #include <ast_valuebox.h>
104 #include <ast_valuetype.h>
105 #include <ast_valuetype_fwd.h>
106 #include <ast_eventtype.h>
107 #include <ast_eventtype_fwd.h>
108 #include <ast_component.h>
109 #include <ast_component_fwd.h>
110 #include <ast_home.h>
111 #include <ast_porttype.h>
112 #include <ast_connector.h>
113 #include <ast_uses.h>
114 #include <ast_constant.h>
115 #include <ast_union.h>
116 #include <ast_union_fwd.h>
117 #include <ast_structure_fwd.h>
118 #include <ast_extern.h>
119 #include <ast_enum.h>
120 #include <ast_root.h>
121 #include <ast_sequence.h>
122 #include <ast_string.h>
123 #include <ast_factory.h>
124 #include <ast_finder.h>
125 #include <ast_exception.h>
126 #include <ast_param_holder.h>
127 #include <ast_visitor_tmpl_module_inst.h>
128 #include <ast_visitor_tmpl_module_ref.h>
129 #include <ast_visitor_context.h>
130 #include <ast_annotation_appl.h>
131 #include <ast_union_branch.h>
132 #include <ast_enum_val.h>
133 #include <ast_annotation_member.h>
134 #include <ast_provides.h>
135 #include <ast_emits.h>
136 #include <ast_publishes.h>
137 #include <ast_consumes.h>
138 #include <ast_extended_port.h>
139 #include <ast_mirror_port.h>
140 #include <ast_map.h>
142 #include <fe_declarator.h>
143 #include <fe_interface_header.h>
144 #include <fe_obv_header.h>
145 #include <fe_component_header.h>
146 #include <fe_home_header.h>
147 #include <fe_utils.h>
149 void tao_yyerror (const char *);
150 int tao_yylex (void);
151 extern "C" int tao_yywrap (void);
153 extern char tao_yytext[];
154 extern int tao_yyleng;
156 AST_Enum *tao_enum_constant_decl = 0;
157 AST_String *tao_string_decl = 0;
158 AST_Expression::ExprType t_param_const_type = AST_Expression::EV_none;
159 bool stack_based_lookup_for_primary_expr = false;
161 #define TAO_YYDEBUG_LEXER_TEXT (tao_yytext[tao_yyleng] = '\0', tao_yytext)
162 // Compile Optional Tracing Output for Parser, can be enabled with --bison-trace
163 #define YYDEBUG 1
165 #line 166 "fe/idl.tab.cpp"
167 # ifndef YY_CAST
168 # ifdef __cplusplus
169 # define YY_CAST(Type, Val) static_cast<Type> (Val)
170 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
171 # else
172 # define YY_CAST(Type, Val) ((Type) (Val))
173 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
174 # endif
175 # endif
176 # ifndef YY_NULLPTR
177 # if defined __cplusplus
178 # if 201103L <= __cplusplus
179 # define YY_NULLPTR nullptr
180 # else
181 # define YY_NULLPTR 0
182 # endif
183 # else
184 # define YY_NULLPTR ((void*)0)
185 # endif
186 # endif
188 #include "idl.tab.hpp"
189 /* Symbol kind. */
190 enum yysymbol_kind_t
192 YYSYMBOL_YYEMPTY = -2,
193 YYSYMBOL_YYEOF = 0, /* "end of file" */
194 YYSYMBOL_YYerror = 1, /* error */
195 YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
196 YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */
197 YYSYMBOL_IDL_CONST = 4, /* IDL_CONST */
198 YYSYMBOL_IDL_MODULE = 5, /* IDL_MODULE */
199 YYSYMBOL_IDL_INTERFACE = 6, /* IDL_INTERFACE */
200 YYSYMBOL_IDL_TYPEDEF = 7, /* IDL_TYPEDEF */
201 YYSYMBOL_IDL_LONG = 8, /* IDL_LONG */
202 YYSYMBOL_IDL_SHORT = 9, /* IDL_SHORT */
203 YYSYMBOL_IDL_UNSIGNED = 10, /* IDL_UNSIGNED */
204 YYSYMBOL_IDL_DOUBLE = 11, /* IDL_DOUBLE */
205 YYSYMBOL_IDL_FLOAT = 12, /* IDL_FLOAT */
206 YYSYMBOL_IDL_CHAR = 13, /* IDL_CHAR */
207 YYSYMBOL_IDL_WCHAR = 14, /* IDL_WCHAR */
208 YYSYMBOL_IDL_OCTET = 15, /* IDL_OCTET */
209 YYSYMBOL_IDL_BOOLEAN = 16, /* IDL_BOOLEAN */
210 YYSYMBOL_IDL_FIXED = 17, /* IDL_FIXED */
211 YYSYMBOL_IDL_ANY = 18, /* IDL_ANY */
212 YYSYMBOL_IDL_OBJECT = 19, /* IDL_OBJECT */
213 YYSYMBOL_IDL_STRUCT = 20, /* IDL_STRUCT */
214 YYSYMBOL_IDL_UNION = 21, /* IDL_UNION */
215 YYSYMBOL_IDL_SWITCH = 22, /* IDL_SWITCH */
216 YYSYMBOL_IDL_ENUM = 23, /* IDL_ENUM */
217 YYSYMBOL_IDL_SEQUENCE = 24, /* IDL_SEQUENCE */
218 YYSYMBOL_IDL_MAP = 25, /* IDL_MAP */
219 YYSYMBOL_IDL_STRING = 26, /* IDL_STRING */
220 YYSYMBOL_IDL_WSTRING = 27, /* IDL_WSTRING */
221 YYSYMBOL_IDL_EXCEPTION = 28, /* IDL_EXCEPTION */
222 YYSYMBOL_IDL_CASE = 29, /* IDL_CASE */
223 YYSYMBOL_IDL_DEFAULT = 30, /* IDL_DEFAULT */
224 YYSYMBOL_IDL_READONLY = 31, /* IDL_READONLY */
225 YYSYMBOL_IDL_ATTRIBUTE = 32, /* IDL_ATTRIBUTE */
226 YYSYMBOL_IDL_ONEWAY = 33, /* IDL_ONEWAY */
227 YYSYMBOL_IDL_IDEMPOTENT = 34, /* IDL_IDEMPOTENT */
228 YYSYMBOL_IDL_VOID = 35, /* IDL_VOID */
229 YYSYMBOL_IDL_IN = 36, /* IDL_IN */
230 YYSYMBOL_IDL_OUT = 37, /* IDL_OUT */
231 YYSYMBOL_IDL_INOUT = 38, /* IDL_INOUT */
232 YYSYMBOL_IDL_RAISES = 39, /* IDL_RAISES */
233 YYSYMBOL_IDL_CONTEXT = 40, /* IDL_CONTEXT */
234 YYSYMBOL_IDL_NATIVE = 41, /* IDL_NATIVE */
235 YYSYMBOL_IDL_LOCAL = 42, /* IDL_LOCAL */
236 YYSYMBOL_IDL_ABSTRACT = 43, /* IDL_ABSTRACT */
237 YYSYMBOL_IDL_CUSTOM = 44, /* IDL_CUSTOM */
238 YYSYMBOL_IDL_FACTORY = 45, /* IDL_FACTORY */
239 YYSYMBOL_IDL_PRIVATE = 46, /* IDL_PRIVATE */
240 YYSYMBOL_IDL_PUBLIC = 47, /* IDL_PUBLIC */
241 YYSYMBOL_IDL_SUPPORTS = 48, /* IDL_SUPPORTS */
242 YYSYMBOL_IDL_TRUNCATABLE = 49, /* IDL_TRUNCATABLE */
243 YYSYMBOL_IDL_VALUETYPE = 50, /* IDL_VALUETYPE */
244 YYSYMBOL_IDL_COMPONENT = 51, /* IDL_COMPONENT */
245 YYSYMBOL_IDL_CONSUMES = 52, /* IDL_CONSUMES */
246 YYSYMBOL_IDL_EMITS = 53, /* IDL_EMITS */
247 YYSYMBOL_IDL_EVENTTYPE = 54, /* IDL_EVENTTYPE */
248 YYSYMBOL_IDL_FINDER = 55, /* IDL_FINDER */
249 YYSYMBOL_IDL_GETRAISES = 56, /* IDL_GETRAISES */
250 YYSYMBOL_IDL_HOME = 57, /* IDL_HOME */
251 YYSYMBOL_IDL_IMPORT = 58, /* IDL_IMPORT */
252 YYSYMBOL_IDL_MULTIPLE = 59, /* IDL_MULTIPLE */
253 YYSYMBOL_IDL_PRIMARYKEY = 60, /* IDL_PRIMARYKEY */
254 YYSYMBOL_IDL_PROVIDES = 61, /* IDL_PROVIDES */
255 YYSYMBOL_IDL_PUBLISHES = 62, /* IDL_PUBLISHES */
256 YYSYMBOL_IDL_SETRAISES = 63, /* IDL_SETRAISES */
257 YYSYMBOL_IDL_TYPEID = 64, /* IDL_TYPEID */
258 YYSYMBOL_IDL_TYPEPREFIX = 65, /* IDL_TYPEPREFIX */
259 YYSYMBOL_IDL_USES = 66, /* IDL_USES */
260 YYSYMBOL_IDL_MANAGES = 67, /* IDL_MANAGES */
261 YYSYMBOL_IDL_TYPENAME = 68, /* IDL_TYPENAME */
262 YYSYMBOL_IDL_PORT = 69, /* IDL_PORT */
263 YYSYMBOL_IDL_MIRRORPORT = 70, /* IDL_MIRRORPORT */
264 YYSYMBOL_IDL_PORTTYPE = 71, /* IDL_PORTTYPE */
265 YYSYMBOL_IDL_CONNECTOR = 72, /* IDL_CONNECTOR */
266 YYSYMBOL_IDL_ALIAS = 73, /* IDL_ALIAS */
267 YYSYMBOL_IDL_INTEGER_LITERAL = 74, /* IDL_INTEGER_LITERAL */
268 YYSYMBOL_IDL_UINTEGER_LITERAL = 75, /* IDL_UINTEGER_LITERAL */
269 YYSYMBOL_IDL_STRING_LITERAL = 76, /* IDL_STRING_LITERAL */
270 YYSYMBOL_IDL_CHARACTER_LITERAL = 77, /* IDL_CHARACTER_LITERAL */
271 YYSYMBOL_IDL_FLOATING_PT_LITERAL = 78, /* IDL_FLOATING_PT_LITERAL */
272 YYSYMBOL_IDL_FIXED_PT_LITERAL = 79, /* IDL_FIXED_PT_LITERAL */
273 YYSYMBOL_IDL_TRUETOK = 80, /* IDL_TRUETOK */
274 YYSYMBOL_IDL_FALSETOK = 81, /* IDL_FALSETOK */
275 YYSYMBOL_IDL_INT8 = 82, /* IDL_INT8 */
276 YYSYMBOL_IDL_UINT8 = 83, /* IDL_UINT8 */
277 YYSYMBOL_IDL_INT16 = 84, /* IDL_INT16 */
278 YYSYMBOL_IDL_UINT16 = 85, /* IDL_UINT16 */
279 YYSYMBOL_IDL_INT32 = 86, /* IDL_INT32 */
280 YYSYMBOL_IDL_UINT32 = 87, /* IDL_UINT32 */
281 YYSYMBOL_IDL_INT64 = 88, /* IDL_INT64 */
282 YYSYMBOL_IDL_UINT64 = 89, /* IDL_UINT64 */
283 YYSYMBOL_IDL_SCOPE_DELIMITOR = 90, /* IDL_SCOPE_DELIMITOR */
284 YYSYMBOL_IDL_LEFT_SHIFT = 91, /* IDL_LEFT_SHIFT */
285 YYSYMBOL_IDL_RIGHT_SHIFT = 92, /* IDL_RIGHT_SHIFT */
286 YYSYMBOL_IDL_WCHAR_LITERAL = 93, /* IDL_WCHAR_LITERAL */
287 YYSYMBOL_IDL_WSTRING_LITERAL = 94, /* IDL_WSTRING_LITERAL */
288 YYSYMBOL_IDL_ANNOTATION_DECL = 95, /* IDL_ANNOTATION_DECL */
289 YYSYMBOL_IDL_ANNOTATION_SYMBOL = 96, /* IDL_ANNOTATION_SYMBOL */
290 YYSYMBOL_97_ = 97, /* ';' */
291 YYSYMBOL_98_ = 98, /* '{' */
292 YYSYMBOL_99_ = 99, /* '}' */
293 YYSYMBOL_100_ = 100, /* '<' */
294 YYSYMBOL_101_ = 101, /* '>' */
295 YYSYMBOL_102_ = 102, /* ':' */
296 YYSYMBOL_103_ = 103, /* ',' */
297 YYSYMBOL_104_ = 104, /* '=' */
298 YYSYMBOL_105_ = 105, /* '|' */
299 YYSYMBOL_106_ = 106, /* '^' */
300 YYSYMBOL_107_ = 107, /* '&' */
301 YYSYMBOL_108_ = 108, /* '+' */
302 YYSYMBOL_109_ = 109, /* '-' */
303 YYSYMBOL_110_ = 110, /* '*' */
304 YYSYMBOL_111_ = 111, /* '/' */
305 YYSYMBOL_112_ = 112, /* '%' */
306 YYSYMBOL_113_ = 113, /* '~' */
307 YYSYMBOL_114_ = 114, /* '(' */
308 YYSYMBOL_115_ = 115, /* ')' */
309 YYSYMBOL_116_ = 116, /* '[' */
310 YYSYMBOL_117_ = 117, /* ']' */
311 YYSYMBOL_YYACCEPT = 118, /* $accept */
312 YYSYMBOL_start = 119, /* start */
313 YYSYMBOL_definitions = 120, /* definitions */
314 YYSYMBOL_at_least_one_definition = 121, /* at_least_one_definition */
315 YYSYMBOL_definition = 122, /* definition */
316 YYSYMBOL_fixed_definition = 123, /* fixed_definition */
317 YYSYMBOL_124_1 = 124, /* $@1 */
318 YYSYMBOL_125_2 = 125, /* $@2 */
319 YYSYMBOL_126_3 = 126, /* $@3 */
320 YYSYMBOL_127_4 = 127, /* $@4 */
321 YYSYMBOL_128_5 = 128, /* $@5 */
322 YYSYMBOL_129_6 = 129, /* $@6 */
323 YYSYMBOL_130_7 = 130, /* $@7 */
324 YYSYMBOL_131_8 = 131, /* $@8 */
325 YYSYMBOL_132_9 = 132, /* $@9 */
326 YYSYMBOL_133_10 = 133, /* $@10 */
327 YYSYMBOL_134_11 = 134, /* $@11 */
328 YYSYMBOL_135_12 = 135, /* $@12 */
329 YYSYMBOL_136_13 = 136, /* $@13 */
330 YYSYMBOL_137_14 = 137, /* $@14 */
331 YYSYMBOL_138_15 = 138, /* $@15 */
332 YYSYMBOL_module_header = 139, /* module_header */
333 YYSYMBOL_140_16 = 140, /* $@16 */
334 YYSYMBOL_module = 141, /* module */
335 YYSYMBOL_142_17 = 142, /* @17 */
336 YYSYMBOL_143_18 = 143, /* $@18 */
337 YYSYMBOL_144_19 = 144, /* $@19 */
338 YYSYMBOL_template_module_header = 145, /* template_module_header */
339 YYSYMBOL_template_module = 146, /* template_module */
340 YYSYMBOL_147_20 = 147, /* $@20 */
341 YYSYMBOL_148_21 = 148, /* $@21 */
342 YYSYMBOL_149_22 = 149, /* $@22 */
343 YYSYMBOL_150_23 = 150, /* $@23 */
344 YYSYMBOL_151_24 = 151, /* $@24 */
345 YYSYMBOL_at_least_one_tpl_definition = 152, /* at_least_one_tpl_definition */
346 YYSYMBOL_tpl_definitions = 153, /* tpl_definitions */
347 YYSYMBOL_tpl_definition = 154, /* tpl_definition */
348 YYSYMBOL_template_module_ref = 155, /* template_module_ref */
349 YYSYMBOL_156_25 = 156, /* $@25 */
350 YYSYMBOL_157_26 = 157, /* $@26 */
351 YYSYMBOL_template_module_inst = 158, /* template_module_inst */
352 YYSYMBOL_159_27 = 159, /* $@27 */
353 YYSYMBOL_160_28 = 160, /* $@28 */
354 YYSYMBOL_interface_def = 161, /* interface_def */
355 YYSYMBOL_interface = 162, /* interface */
356 YYSYMBOL_163_29 = 163, /* $@29 */
357 YYSYMBOL_164_30 = 164, /* $@30 */
358 YYSYMBOL_165_31 = 165, /* $@31 */
359 YYSYMBOL_interface_decl = 166, /* interface_decl */
360 YYSYMBOL_167_32 = 167, /* $@32 */
361 YYSYMBOL_interface_header = 168, /* interface_header */
362 YYSYMBOL_inheritance_spec = 169, /* inheritance_spec */
363 YYSYMBOL_170_33 = 170, /* $@33 */
364 YYSYMBOL_value_def = 171, /* value_def */
365 YYSYMBOL_valuetype = 172, /* valuetype */
366 YYSYMBOL_value_concrete_decl = 173, /* value_concrete_decl */
367 YYSYMBOL_174_34 = 174, /* @34 */
368 YYSYMBOL_175_35 = 175, /* $@35 */
369 YYSYMBOL_176_36 = 176, /* $@36 */
370 YYSYMBOL_value_abs_decl = 177, /* value_abs_decl */
371 YYSYMBOL_178_37 = 178, /* $@37 */
372 YYSYMBOL_179_38 = 179, /* $@38 */
373 YYSYMBOL_180_39 = 180, /* $@39 */
374 YYSYMBOL_value_header = 181, /* value_header */
375 YYSYMBOL_182_40 = 182, /* $@40 */
376 YYSYMBOL_value_decl = 183, /* value_decl */
377 YYSYMBOL_184_41 = 184, /* $@41 */
378 YYSYMBOL_opt_truncatable = 185, /* opt_truncatable */
379 YYSYMBOL_supports_spec = 186, /* supports_spec */
380 YYSYMBOL_value_forward_decl = 187, /* value_forward_decl */
381 YYSYMBOL_value_box_decl = 188, /* value_box_decl */
382 YYSYMBOL_value_elements = 189, /* value_elements */
383 YYSYMBOL_value_element = 190, /* value_element */
384 YYSYMBOL_191_42 = 191, /* @42 */
385 YYSYMBOL_visibility = 192, /* visibility */
386 YYSYMBOL_state_member = 193, /* state_member */
387 YYSYMBOL_exports = 194, /* exports */
388 YYSYMBOL_at_least_one_export = 195, /* at_least_one_export */
389 YYSYMBOL_export = 196, /* export */
390 YYSYMBOL_197_43 = 197, /* $@43 */
391 YYSYMBOL_198_44 = 198, /* $@44 */
392 YYSYMBOL_199_45 = 199, /* $@45 */
393 YYSYMBOL_200_46 = 200, /* $@46 */
394 YYSYMBOL_201_47 = 201, /* $@47 */
395 YYSYMBOL_202_48 = 202, /* $@48 */
396 YYSYMBOL_203_49 = 203, /* $@49 */
397 YYSYMBOL_204_50 = 204, /* $@50 */
398 YYSYMBOL_at_least_one_scoped_name = 205, /* at_least_one_scoped_name */
399 YYSYMBOL_scoped_names = 206, /* scoped_names */
400 YYSYMBOL_207_51 = 207, /* $@51 */
401 YYSYMBOL_scoped_name = 208, /* scoped_name */
402 YYSYMBOL_209_52 = 209, /* $@52 */
403 YYSYMBOL_210_53 = 210, /* $@53 */
404 YYSYMBOL_id = 211, /* id */
405 YYSYMBOL_defining_id = 212, /* defining_id */
406 YYSYMBOL_interface_forward = 213, /* interface_forward */
407 YYSYMBOL_const_dcl = 214, /* const_dcl */
408 YYSYMBOL_215_54 = 215, /* $@54 */
409 YYSYMBOL_216_55 = 216, /* $@55 */
410 YYSYMBOL_217_56 = 217, /* $@56 */
411 YYSYMBOL_218_57 = 218, /* $@57 */
412 YYSYMBOL_const_type = 219, /* const_type */
413 YYSYMBOL_expression = 220, /* expression */
414 YYSYMBOL_const_expr = 221, /* const_expr */
415 YYSYMBOL_or_expr = 222, /* or_expr */
416 YYSYMBOL_xor_expr = 223, /* xor_expr */
417 YYSYMBOL_and_expr = 224, /* and_expr */
418 YYSYMBOL_shift_expr = 225, /* shift_expr */
419 YYSYMBOL_add_expr = 226, /* add_expr */
420 YYSYMBOL_mult_expr = 227, /* mult_expr */
421 YYSYMBOL_unary_expr = 228, /* unary_expr */
422 YYSYMBOL_primary_expr = 229, /* primary_expr */
423 YYSYMBOL_literal = 230, /* literal */
424 YYSYMBOL_positive_int_expr = 231, /* positive_int_expr */
425 YYSYMBOL_annotation_dcl = 232, /* annotation_dcl */
426 YYSYMBOL_233_58 = 233, /* $@58 */
427 YYSYMBOL_annotation_body = 234, /* annotation_body */
428 YYSYMBOL_annotation_statement = 235, /* annotation_statement */
429 YYSYMBOL_236_59 = 236, /* $@59 */
430 YYSYMBOL_annotation_member_type = 237, /* annotation_member_type */
431 YYSYMBOL_annotation_member = 238, /* annotation_member */
432 YYSYMBOL_annotation_member_default = 239, /* annotation_member_default */
433 YYSYMBOL_at_least_one_annotation = 240, /* at_least_one_annotation */
434 YYSYMBOL_annotations_maybe = 241, /* annotations_maybe */
435 YYSYMBOL_annotation_appl = 242, /* annotation_appl */
436 YYSYMBOL_243_60 = 243, /* @60 */
437 YYSYMBOL_annotation_appl_params_maybe = 244, /* annotation_appl_params_maybe */
438 YYSYMBOL_annotation_appl_params = 245, /* annotation_appl_params */
439 YYSYMBOL_named_annotation_appl_params = 246, /* named_annotation_appl_params */
440 YYSYMBOL_more_named_annotation_appl_params = 247, /* more_named_annotation_appl_params */
441 YYSYMBOL_named_annotation_appl_param = 248, /* named_annotation_appl_param */
442 YYSYMBOL_type_dcl = 249, /* type_dcl */
443 YYSYMBOL_250_61 = 250, /* $@61 */
444 YYSYMBOL_type_declarator = 251, /* type_declarator */
445 YYSYMBOL_252_62 = 252, /* $@62 */
446 YYSYMBOL_type_spec = 253, /* type_spec */
447 YYSYMBOL_simple_type_spec = 254, /* simple_type_spec */
448 YYSYMBOL_base_type_spec = 255, /* base_type_spec */
449 YYSYMBOL_template_type_spec = 256, /* template_type_spec */
450 YYSYMBOL_constructed_type_spec = 257, /* constructed_type_spec */
451 YYSYMBOL_constructed_forward_type_spec = 258, /* constructed_forward_type_spec */
452 YYSYMBOL_at_least_one_declarator = 259, /* at_least_one_declarator */
453 YYSYMBOL_declarators = 260, /* declarators */
454 YYSYMBOL_261_63 = 261, /* $@63 */
455 YYSYMBOL_declarator = 262, /* declarator */
456 YYSYMBOL_at_least_one_simple_declarator = 263, /* at_least_one_simple_declarator */
457 YYSYMBOL_simple_declarators = 264, /* simple_declarators */
458 YYSYMBOL_265_64 = 265, /* $@64 */
459 YYSYMBOL_simple_declarator = 266, /* simple_declarator */
460 YYSYMBOL_complex_declarator = 267, /* complex_declarator */
461 YYSYMBOL_integer_type = 268, /* integer_type */
462 YYSYMBOL_signed_int = 269, /* signed_int */
463 YYSYMBOL_unsigned_int = 270, /* unsigned_int */
464 YYSYMBOL_floating_pt_type = 271, /* floating_pt_type */
465 YYSYMBOL_fixed_type = 272, /* fixed_type */
466 YYSYMBOL_char_type = 273, /* char_type */
467 YYSYMBOL_octet_type = 274, /* octet_type */
468 YYSYMBOL_boolean_type = 275, /* boolean_type */
469 YYSYMBOL_any_type = 276, /* any_type */
470 YYSYMBOL_object_type = 277, /* object_type */
471 YYSYMBOL_struct_decl = 278, /* struct_decl */
472 YYSYMBOL_279_65 = 279, /* $@65 */
473 YYSYMBOL_struct_type = 280, /* struct_type */
474 YYSYMBOL_281_66 = 281, /* $@66 */
475 YYSYMBOL_282_67 = 282, /* $@67 */
476 YYSYMBOL_283_68 = 283, /* $@68 */
477 YYSYMBOL_at_least_one_member = 284, /* at_least_one_member */
478 YYSYMBOL_members = 285, /* members */
479 YYSYMBOL_member = 286, /* member */
480 YYSYMBOL_member_i = 287, /* member_i */
481 YYSYMBOL_288_69 = 288, /* $@69 */
482 YYSYMBOL_289_70 = 289, /* $@70 */
483 YYSYMBOL_290_71 = 290, /* $@71 */
484 YYSYMBOL_union_decl = 291, /* union_decl */
485 YYSYMBOL_292_72 = 292, /* $@72 */
486 YYSYMBOL_union_type = 293, /* union_type */
487 YYSYMBOL_294_73 = 294, /* $@73 */
488 YYSYMBOL_295_74 = 295, /* $@74 */
489 YYSYMBOL_296_75 = 296, /* $@75 */
490 YYSYMBOL_297_76 = 297, /* $@76 */
491 YYSYMBOL_298_77 = 298, /* $@77 */
492 YYSYMBOL_299_78 = 299, /* $@78 */
493 YYSYMBOL_switch_type_spec = 300, /* switch_type_spec */
494 YYSYMBOL_at_least_one_case_branch = 301, /* at_least_one_case_branch */
495 YYSYMBOL_case_branches = 302, /* case_branches */
496 YYSYMBOL_case_branch = 303, /* case_branch */
497 YYSYMBOL_304_79 = 304, /* $@79 */
498 YYSYMBOL_305_80 = 305, /* $@80 */
499 YYSYMBOL_306_81 = 306, /* $@81 */
500 YYSYMBOL_at_least_one_case_label = 307, /* at_least_one_case_label */
501 YYSYMBOL_case_labels = 308, /* case_labels */
502 YYSYMBOL_case_label = 309, /* case_label */
503 YYSYMBOL_310_82 = 310, /* $@82 */
504 YYSYMBOL_311_83 = 311, /* $@83 */
505 YYSYMBOL_312_84 = 312, /* $@84 */
506 YYSYMBOL_element_spec = 313, /* element_spec */
507 YYSYMBOL_314_85 = 314, /* $@85 */
508 YYSYMBOL_struct_forward_type = 315, /* struct_forward_type */
509 YYSYMBOL_union_forward_type = 316, /* union_forward_type */
510 YYSYMBOL_enum_type = 317, /* enum_type */
511 YYSYMBOL_318_86 = 318, /* $@86 */
512 YYSYMBOL_319_87 = 319, /* $@87 */
513 YYSYMBOL_320_88 = 320, /* $@88 */
514 YYSYMBOL_321_89 = 321, /* $@89 */
515 YYSYMBOL_at_least_one_enumerator = 322, /* at_least_one_enumerator */
516 YYSYMBOL_enumerators = 323, /* enumerators */
517 YYSYMBOL_324_90 = 324, /* $@90 */
518 YYSYMBOL_enumerator = 325, /* enumerator */
519 YYSYMBOL_map_type_spec = 326, /* map_type_spec */
520 YYSYMBOL_map_head = 327, /* map_head */
521 YYSYMBOL_328_91 = 328, /* $@91 */
522 YYSYMBOL_329_92 = 329, /* $@92 */
523 YYSYMBOL_sequence_type_spec = 330, /* sequence_type_spec */
524 YYSYMBOL_331_93 = 331, /* $@93 */
525 YYSYMBOL_332_94 = 332, /* $@94 */
526 YYSYMBOL_seq_head = 333, /* seq_head */
527 YYSYMBOL_334_95 = 334, /* $@95 */
528 YYSYMBOL_335_96 = 335, /* $@96 */
529 YYSYMBOL_fixed_type_spec = 336, /* fixed_type_spec */
530 YYSYMBOL_string_type_spec = 337, /* string_type_spec */
531 YYSYMBOL_338_97 = 338, /* $@97 */
532 YYSYMBOL_339_98 = 339, /* $@98 */
533 YYSYMBOL_string_head = 340, /* string_head */
534 YYSYMBOL_wstring_type_spec = 341, /* wstring_type_spec */
535 YYSYMBOL_342_99 = 342, /* $@99 */
536 YYSYMBOL_343_100 = 343, /* $@100 */
537 YYSYMBOL_wstring_head = 344, /* wstring_head */
538 YYSYMBOL_array_declarator = 345, /* array_declarator */
539 YYSYMBOL_346_101 = 346, /* $@101 */
540 YYSYMBOL_at_least_one_array_dim = 347, /* at_least_one_array_dim */
541 YYSYMBOL_array_dims = 348, /* array_dims */
542 YYSYMBOL_array_dim = 349, /* array_dim */
543 YYSYMBOL_350_102 = 350, /* $@102 */
544 YYSYMBOL_351_103 = 351, /* $@103 */
545 YYSYMBOL_attribute = 352, /* attribute */
546 YYSYMBOL_attribute_readonly = 353, /* attribute_readonly */
547 YYSYMBOL_354_104 = 354, /* $@104 */
548 YYSYMBOL_355_105 = 355, /* $@105 */
549 YYSYMBOL_356_106 = 356, /* $@106 */
550 YYSYMBOL_357_107 = 357, /* $@107 */
551 YYSYMBOL_attribute_readwrite = 358, /* attribute_readwrite */
552 YYSYMBOL_359_108 = 359, /* $@108 */
553 YYSYMBOL_360_109 = 360, /* $@109 */
554 YYSYMBOL_361_110 = 361, /* $@110 */
555 YYSYMBOL_362_111 = 362, /* $@111 */
556 YYSYMBOL_exception = 363, /* exception */
557 YYSYMBOL_364_112 = 364, /* $@112 */
558 YYSYMBOL_365_113 = 365, /* @113 */
559 YYSYMBOL_366_114 = 366, /* $@114 */
560 YYSYMBOL_367_115 = 367, /* $@115 */
561 YYSYMBOL_operation = 368, /* operation */
562 YYSYMBOL_369_116 = 369, /* $@116 */
563 YYSYMBOL_370_117 = 370, /* $@117 */
564 YYSYMBOL_371_118 = 371, /* $@118 */
565 YYSYMBOL_372_119 = 372, /* $@119 */
566 YYSYMBOL_opt_op_attribute = 373, /* opt_op_attribute */
567 YYSYMBOL_op_type_spec = 374, /* op_type_spec */
568 YYSYMBOL_init_decl = 375, /* init_decl */
569 YYSYMBOL_376_120 = 376, /* $@120 */
570 YYSYMBOL_377_121 = 377, /* @121 */
571 YYSYMBOL_378_122 = 378, /* $@122 */
572 YYSYMBOL_init_parameter_list = 379, /* init_parameter_list */
573 YYSYMBOL_380_123 = 380, /* $@123 */
574 YYSYMBOL_381_124 = 381, /* $@124 */
575 YYSYMBOL_at_least_one_in_parameter = 382, /* at_least_one_in_parameter */
576 YYSYMBOL_in_parameters = 383, /* in_parameters */
577 YYSYMBOL_384_125 = 384, /* $@125 */
578 YYSYMBOL_in_parameter = 385, /* in_parameter */
579 YYSYMBOL_386_126 = 386, /* $@126 */
580 YYSYMBOL_387_127 = 387, /* $@127 */
581 YYSYMBOL_parameter_list = 388, /* parameter_list */
582 YYSYMBOL_389_128 = 389, /* $@128 */
583 YYSYMBOL_390_129 = 390, /* $@129 */
584 YYSYMBOL_at_least_one_parameter = 391, /* at_least_one_parameter */
585 YYSYMBOL_parameters = 392, /* parameters */
586 YYSYMBOL_393_130 = 393, /* $@130 */
587 YYSYMBOL_parameter = 394, /* parameter */
588 YYSYMBOL_395_131 = 395, /* $@131 */
589 YYSYMBOL_396_132 = 396, /* $@132 */
590 YYSYMBOL_param_type_spec = 397, /* param_type_spec */
591 YYSYMBOL_direction = 398, /* direction */
592 YYSYMBOL_opt_raises = 399, /* opt_raises */
593 YYSYMBOL_400_133 = 400, /* $@133 */
594 YYSYMBOL_401_134 = 401, /* $@134 */
595 YYSYMBOL_opt_getraises = 402, /* opt_getraises */
596 YYSYMBOL_403_135 = 403, /* $@135 */
597 YYSYMBOL_404_136 = 404, /* $@136 */
598 YYSYMBOL_opt_setraises = 405, /* opt_setraises */
599 YYSYMBOL_406_137 = 406, /* $@137 */
600 YYSYMBOL_407_138 = 407, /* $@138 */
601 YYSYMBOL_opt_context = 408, /* opt_context */
602 YYSYMBOL_409_139 = 409, /* $@139 */
603 YYSYMBOL_410_140 = 410, /* $@140 */
604 YYSYMBOL_at_least_one_string_literal = 411, /* at_least_one_string_literal */
605 YYSYMBOL_string_literals = 412, /* string_literals */
606 YYSYMBOL_413_141 = 413, /* $@141 */
607 YYSYMBOL_typeid_dcl = 414, /* typeid_dcl */
608 YYSYMBOL_typeprefix_dcl = 415, /* typeprefix_dcl */
609 YYSYMBOL_component = 416, /* component */
610 YYSYMBOL_component_forward_decl = 417, /* component_forward_decl */
611 YYSYMBOL_component_decl = 418, /* component_decl */
612 YYSYMBOL_419_142 = 419, /* @142 */
613 YYSYMBOL_420_143 = 420, /* $@143 */
614 YYSYMBOL_421_144 = 421, /* $@144 */
615 YYSYMBOL_component_header = 422, /* component_header */
616 YYSYMBOL_423_145 = 423, /* $@145 */
617 YYSYMBOL_424_146 = 424, /* $@146 */
618 YYSYMBOL_component_inheritance_spec = 425, /* component_inheritance_spec */
619 YYSYMBOL_426_147 = 426, /* $@147 */
620 YYSYMBOL_component_exports = 427, /* component_exports */
621 YYSYMBOL_component_export = 428, /* component_export */
622 YYSYMBOL_429_148 = 429, /* $@148 */
623 YYSYMBOL_430_149 = 430, /* $@149 */
624 YYSYMBOL_431_150 = 431, /* $@150 */
625 YYSYMBOL_432_151 = 432, /* $@151 */
626 YYSYMBOL_433_152 = 433, /* $@152 */
627 YYSYMBOL_434_153 = 434, /* $@153 */
628 YYSYMBOL_435_154 = 435, /* $@154 */
629 YYSYMBOL_provides_decl = 436, /* provides_decl */
630 YYSYMBOL_interface_type = 437, /* interface_type */
631 YYSYMBOL_uses_decl = 438, /* uses_decl */
632 YYSYMBOL_uses_opt_multiple = 439, /* uses_opt_multiple */
633 YYSYMBOL_opt_multiple = 440, /* opt_multiple */
634 YYSYMBOL_emits_decl = 441, /* emits_decl */
635 YYSYMBOL_publishes_decl = 442, /* publishes_decl */
636 YYSYMBOL_consumes_decl = 443, /* consumes_decl */
637 YYSYMBOL_home_decl = 444, /* home_decl */
638 YYSYMBOL_445_155 = 445, /* $@155 */
639 YYSYMBOL_home_header = 446, /* home_header */
640 YYSYMBOL_447_156 = 447, /* $@156 */
641 YYSYMBOL_448_157 = 448, /* $@157 */
642 YYSYMBOL_449_158 = 449, /* $@158 */
643 YYSYMBOL_450_159 = 450, /* $@159 */
644 YYSYMBOL_451_160 = 451, /* $@160 */
645 YYSYMBOL_452_161 = 452, /* $@161 */
646 YYSYMBOL_home_inheritance_spec = 453, /* home_inheritance_spec */
647 YYSYMBOL_454_162 = 454, /* $@162 */
648 YYSYMBOL_primary_key_spec = 455, /* primary_key_spec */
649 YYSYMBOL_home_body = 456, /* home_body */
650 YYSYMBOL_457_163 = 457, /* $@163 */
651 YYSYMBOL_458_164 = 458, /* $@164 */
652 YYSYMBOL_home_exports = 459, /* home_exports */
653 YYSYMBOL_home_export = 460, /* home_export */
654 YYSYMBOL_461_165 = 461, /* $@165 */
655 YYSYMBOL_462_166 = 462, /* $@166 */
656 YYSYMBOL_factory_decl = 463, /* factory_decl */
657 YYSYMBOL_464_167 = 464, /* $@167 */
658 YYSYMBOL_465_168 = 465, /* $@168 */
659 YYSYMBOL_finder_decl = 466, /* finder_decl */
660 YYSYMBOL_467_169 = 467, /* $@169 */
661 YYSYMBOL_468_170 = 468, /* $@170 */
662 YYSYMBOL_event = 469, /* event */
663 YYSYMBOL_event_forward_decl = 470, /* event_forward_decl */
664 YYSYMBOL_event_concrete_forward_decl = 471, /* event_concrete_forward_decl */
665 YYSYMBOL_event_abs_forward_decl = 472, /* event_abs_forward_decl */
666 YYSYMBOL_event_abs_decl = 473, /* event_abs_decl */
667 YYSYMBOL_474_171 = 474, /* $@171 */
668 YYSYMBOL_475_172 = 475, /* $@172 */
669 YYSYMBOL_476_173 = 476, /* $@173 */
670 YYSYMBOL_event_abs_header = 477, /* event_abs_header */
671 YYSYMBOL_event_custom_header = 478, /* event_custom_header */
672 YYSYMBOL_event_plain_header = 479, /* event_plain_header */
673 YYSYMBOL_event_rest_of_header = 480, /* event_rest_of_header */
674 YYSYMBOL_481_174 = 481, /* $@174 */
675 YYSYMBOL_event_decl = 482, /* event_decl */
676 YYSYMBOL_483_175 = 483, /* @175 */
677 YYSYMBOL_484_176 = 484, /* $@176 */
678 YYSYMBOL_485_177 = 485, /* $@177 */
679 YYSYMBOL_event_header = 486, /* event_header */
680 YYSYMBOL_formal_parameter_type = 487, /* formal_parameter_type */
681 YYSYMBOL_at_least_one_formal_parameter = 488, /* at_least_one_formal_parameter */
682 YYSYMBOL_formal_parameters = 489, /* formal_parameters */
683 YYSYMBOL_formal_parameter = 490, /* formal_parameter */
684 YYSYMBOL_at_least_one_formal_parameter_name = 491, /* at_least_one_formal_parameter_name */
685 YYSYMBOL_formal_parameter_names = 492, /* formal_parameter_names */
686 YYSYMBOL_formal_parameter_name = 493, /* formal_parameter_name */
687 YYSYMBOL_porttype_decl = 494, /* porttype_decl */
688 YYSYMBOL_495_178 = 495, /* $@178 */
689 YYSYMBOL_496_179 = 496, /* @179 */
690 YYSYMBOL_497_180 = 497, /* $@180 */
691 YYSYMBOL_498_181 = 498, /* $@181 */
692 YYSYMBOL_at_least_one_port_export = 499, /* at_least_one_port_export */
693 YYSYMBOL_port_exports = 500, /* port_exports */
694 YYSYMBOL_port_export = 501, /* port_export */
695 YYSYMBOL_502_182 = 502, /* $@182 */
696 YYSYMBOL_extended_port_decl = 503, /* extended_port_decl */
697 YYSYMBOL_at_least_one_actual_parameter = 504, /* at_least_one_actual_parameter */
698 YYSYMBOL_actual_parameters = 505, /* actual_parameters */
699 YYSYMBOL_actual_parameter = 506, /* actual_parameter */
700 YYSYMBOL_connector_decl = 507, /* connector_decl */
701 YYSYMBOL_connector_header = 508, /* connector_header */
702 YYSYMBOL_509_183 = 509, /* $@183 */
703 YYSYMBOL_510_184 = 510, /* $@184 */
704 YYSYMBOL_connector_body = 511, /* connector_body */
705 YYSYMBOL_512_185 = 512, /* $@185 */
706 YYSYMBOL_513_186 = 513, /* $@186 */
707 YYSYMBOL_connector_exports = 514, /* connector_exports */
708 YYSYMBOL_connector_export = 515, /* connector_export */
709 YYSYMBOL_516_187 = 516, /* $@187 */
710 YYSYMBOL_517_188 = 517, /* $@188 */
711 YYSYMBOL_518_189 = 518, /* $@189 */
712 YYSYMBOL_519_190 = 519 /* $@190 */
714 typedef enum yysymbol_kind_t yysymbol_kind_t;
719 #ifdef short
720 # undef short
721 #endif
723 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
724 <limits.h> and (if available) <stdint.h> are included
725 so that the code can choose integer types of a good width. */
727 #ifndef __PTRDIFF_MAX__
728 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
729 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
730 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
731 # define YY_STDINT_H
732 # endif
733 #endif
735 /* Narrow types that promote to a signed type and that can represent a
736 signed or unsigned integer of at least N bits. In tables they can
737 save space and decrease cache pressure. Promoting to a signed type
738 helps avoid bugs in integer arithmetic. */
740 #ifdef __INT_LEAST8_MAX__
741 typedef __INT_LEAST8_TYPE__ yytype_int8;
742 #elif defined YY_STDINT_H
743 typedef int_least8_t yytype_int8;
744 #else
745 typedef signed char yytype_int8;
746 #endif
748 #ifdef __INT_LEAST16_MAX__
749 typedef __INT_LEAST16_TYPE__ yytype_int16;
750 #elif defined YY_STDINT_H
751 typedef int_least16_t yytype_int16;
752 #else
753 typedef short yytype_int16;
754 #endif
756 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
757 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
758 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
759 && UINT_LEAST8_MAX <= INT_MAX)
760 typedef uint_least8_t yytype_uint8;
761 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
762 typedef unsigned char yytype_uint8;
763 #else
764 typedef short yytype_uint8;
765 #endif
767 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
768 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
769 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
770 && UINT_LEAST16_MAX <= INT_MAX)
771 typedef uint_least16_t yytype_uint16;
772 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
773 typedef unsigned short yytype_uint16;
774 #else
775 typedef int yytype_uint16;
776 #endif
778 #ifndef YYPTRDIFF_T
779 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
780 # define YYPTRDIFF_T __PTRDIFF_TYPE__
781 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
782 # elif defined PTRDIFF_MAX
783 # ifndef ptrdiff_t
784 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
785 # endif
786 # define YYPTRDIFF_T ptrdiff_t
787 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
788 # else
789 # define YYPTRDIFF_T long
790 # define YYPTRDIFF_MAXIMUM LONG_MAX
791 # endif
792 #endif
794 #ifndef YYSIZE_T
795 # ifdef __SIZE_TYPE__
796 # define YYSIZE_T __SIZE_TYPE__
797 # elif defined size_t
798 # define YYSIZE_T size_t
799 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
800 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
801 # define YYSIZE_T size_t
802 # else
803 # define YYSIZE_T unsigned
804 # endif
805 #endif
807 #define YYSIZE_MAXIMUM \
808 YY_CAST (YYPTRDIFF_T, \
809 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
810 ? YYPTRDIFF_MAXIMUM \
811 : YY_CAST (YYSIZE_T, -1)))
813 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
816 /* Stored state numbers (used for stacks). */
817 typedef yytype_int16 yy_state_t;
819 /* State numbers in computations. */
820 typedef int yy_state_fast_t;
822 #ifndef YY_
823 # if defined YYENABLE_NLS && YYENABLE_NLS
824 # if ENABLE_NLS
825 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
826 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
827 # endif
828 # endif
829 # ifndef YY_
830 # define YY_(Msgid) Msgid
831 # endif
832 #endif
835 #ifndef YY_ATTRIBUTE_PURE
836 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
837 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
838 # else
839 # define YY_ATTRIBUTE_PURE
840 # endif
841 #endif
843 #ifndef YY_ATTRIBUTE_UNUSED
844 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
845 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
846 # else
847 # define YY_ATTRIBUTE_UNUSED
848 # endif
849 #endif
851 /* Suppress unused-variable warnings by "using" E. */
852 #if ! defined lint || defined __GNUC__
853 # define YY_USE(E) ((void) (E))
854 #else
855 # define YY_USE(E) /* empty */
856 #endif
858 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
859 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
860 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
861 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
862 _Pragma ("GCC diagnostic push") \
863 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
864 # else
865 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
866 _Pragma ("GCC diagnostic push") \
867 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
868 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
869 # endif
870 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
871 _Pragma ("GCC diagnostic pop")
872 #else
873 # define YY_INITIAL_VALUE(Value) Value
874 #endif
875 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
876 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
877 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
878 #endif
879 #ifndef YY_INITIAL_VALUE
880 # define YY_INITIAL_VALUE(Value) /* Nothing. */
881 #endif
883 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
884 # define YY_IGNORE_USELESS_CAST_BEGIN \
885 _Pragma ("GCC diagnostic push") \
886 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
887 # define YY_IGNORE_USELESS_CAST_END \
888 _Pragma ("GCC diagnostic pop")
889 #endif
890 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
891 # define YY_IGNORE_USELESS_CAST_BEGIN
892 # define YY_IGNORE_USELESS_CAST_END
893 #endif
896 #define YY_ASSERT(E) ((void) (0 && (E)))
898 #if !defined yyoverflow
900 /* The parser invokes alloca or malloc; define the necessary symbols. */
902 # ifdef YYSTACK_USE_ALLOCA
903 # if YYSTACK_USE_ALLOCA
904 # ifdef __GNUC__
905 # define YYSTACK_ALLOC __builtin_alloca
906 # elif defined __BUILTIN_VA_ARG_INCR
907 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
908 # elif defined _AIX
909 # define YYSTACK_ALLOC __alloca
910 # elif defined _MSC_VER
911 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
912 # define alloca _alloca
913 # else
914 # define YYSTACK_ALLOC alloca
915 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
916 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
917 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
918 # ifndef EXIT_SUCCESS
919 # define EXIT_SUCCESS 0
920 # endif
921 # endif
922 # endif
923 # endif
924 # endif
926 # ifdef YYSTACK_ALLOC
927 /* Pacify GCC's 'empty if-body' warning. */
928 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
929 # ifndef YYSTACK_ALLOC_MAXIMUM
930 /* The OS might guarantee only one guard page at the bottom of the stack,
931 and a page size can be as small as 4096 bytes. So we cannot safely
932 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
933 to allow for a few compiler-allocated temporary stack slots. */
934 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
935 # endif
936 # else
937 # define YYSTACK_ALLOC YYMALLOC
938 # define YYSTACK_FREE YYFREE
939 # ifndef YYSTACK_ALLOC_MAXIMUM
940 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
941 # endif
942 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
943 && ! ((defined YYMALLOC || defined malloc) \
944 && (defined YYFREE || defined free)))
945 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
946 # ifndef EXIT_SUCCESS
947 # define EXIT_SUCCESS 0
948 # endif
949 # endif
950 # ifndef YYMALLOC
951 # define YYMALLOC malloc
952 # if ! defined malloc && ! defined EXIT_SUCCESS
953 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
954 # endif
955 # endif
956 # ifndef YYFREE
957 # define YYFREE free
958 # if ! defined free && ! defined EXIT_SUCCESS
959 void free (void *); /* INFRINGES ON USER NAME SPACE */
960 # endif
961 # endif
962 # endif
963 #endif /* !defined yyoverflow */
965 #if (! defined yyoverflow \
966 && (! defined __cplusplus \
967 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
969 /* A type that is properly aligned for any stack member. */
970 union yyalloc
972 yy_state_t yyss_alloc;
973 YYSTYPE yyvs_alloc;
976 /* The size of the maximum gap between one aligned stack and the next. */
977 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
979 /* The size of an array large to enough to hold all stacks, each with
980 N elements. */
981 # define YYSTACK_BYTES(N) \
982 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
983 + YYSTACK_GAP_MAXIMUM)
985 # define YYCOPY_NEEDED 1
987 /* Relocate STACK from its old location to the new one. The
988 local variables YYSIZE and YYSTACKSIZE give the old and new number of
989 elements in the stack, and YYPTR gives the new location of the
990 stack. Advance YYPTR to a properly aligned location for the next
991 stack. */
992 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
993 do \
995 YYPTRDIFF_T yynewbytes; \
996 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
997 Stack = &yyptr->Stack_alloc; \
998 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
999 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1001 while (0)
1003 #endif
1005 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1006 /* Copy COUNT objects from SRC to DST. The source and destination do
1007 not overlap. */
1008 # ifndef YYCOPY
1009 # if defined __GNUC__ && 1 < __GNUC__
1010 # define YYCOPY(Dst, Src, Count) \
1011 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1012 # else
1013 # define YYCOPY(Dst, Src, Count) \
1014 do \
1016 YYPTRDIFF_T yyi; \
1017 for (yyi = 0; yyi < (Count); yyi++) \
1018 (Dst)[yyi] = (Src)[yyi]; \
1020 while (0)
1021 # endif
1022 # endif
1023 #endif /* !YYCOPY_NEEDED */
1025 /* YYFINAL -- State number of the termination state. */
1026 #define YYFINAL 4
1027 /* YYLAST -- Last index in YYTABLE. */
1028 #define YYLAST 2130
1030 /* YYNTOKENS -- Number of terminals. */
1031 #define YYNTOKENS 118
1032 /* YYNNTS -- Number of nonterminals. */
1033 #define YYNNTS 402
1034 /* YYNRULES -- Number of rules. */
1035 #define YYNRULES 613
1036 /* YYNSTATES -- Number of states. */
1037 #define YYNSTATES 901
1039 /* YYMAXUTOK -- Last valid token kind. */
1040 #define YYMAXUTOK 351
1043 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1044 as returned by yylex, with out-of-bounds checking. */
1045 #define YYTRANSLATE(YYX) \
1046 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1047 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1048 : YYSYMBOL_YYUNDEF)
1050 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1051 as returned by yylex. */
1052 static const yytype_int8 yytranslate[] =
1054 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1055 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1056 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1057 2, 2, 2, 2, 2, 2, 2, 112, 107, 2,
1058 114, 115, 110, 108, 103, 109, 2, 111, 2, 2,
1059 2, 2, 2, 2, 2, 2, 2, 2, 102, 97,
1060 100, 104, 101, 2, 2, 2, 2, 2, 2, 2,
1061 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1062 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1063 2, 116, 2, 117, 106, 2, 2, 2, 2, 2,
1064 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1065 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1066 2, 2, 2, 98, 105, 99, 113, 2, 2, 2,
1067 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1068 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1069 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1070 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1071 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1072 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1073 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1074 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1075 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1076 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1077 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1078 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1079 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1080 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1081 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1082 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1083 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1084 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1085 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1086 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1087 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1088 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1089 95, 96
1092 #if YYDEBUG
1093 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1094 static const yytype_int16 yyrline[] =
1096 0, 419, 419, 422, 423, 431, 446, 450, 451, 452,
1097 457, 456, 465, 464, 473, 472, 481, 480, 489, 488,
1098 497, 496, 505, 504, 513, 512, 521, 520, 529, 528,
1099 537, 536, 545, 544, 553, 552, 561, 560, 569, 568,
1100 582, 581, 593, 632, 636, 592, 652, 660, 674, 684,
1101 714, 718, 659, 743, 747, 748, 752, 753, 758, 763,
1102 757, 849, 854, 848, 925, 926, 931, 969, 973, 930,
1103 990, 989, 1001, 1038, 1068, 1101, 1100, 1109, 1116, 1117,
1104 1118, 1119, 1123, 1128, 1133, 1180, 1184, 1132, 1213, 1256,
1105 1260, 1211, 1279, 1277, 1317, 1316, 1328, 1332, 1339, 1344,
1106 1351, 1376, 1404, 1470, 1489, 1493, 1497, 1498, 1510, 1509,
1107 1527, 1531, 1538, 1559, 1560, 1564, 1579, 1584, 1583, 1592,
1108 1591, 1600, 1599, 1608, 1607, 1616, 1615, 1624, 1623, 1632,
1109 1631, 1640, 1639, 1652, 1664, 1662, 1687, 1694, 1704, 1703,
1110 1729, 1727, 1752, 1762, 1773, 1817, 1844, 1876, 1880, 1884,
1111 1888, 1875, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1960,
1112 1964, 2032, 2034, 2036, 2037, 2049, 2050, 2062, 2063, 2075,
1113 2076, 2085, 2097, 2098, 2107, 2119, 2120, 2129, 2138, 2150,
1114 2151, 2160, 2169, 2181, 2238, 2239, 2246, 2250, 2255, 2262,
1115 2269, 2273, 2278, 2282, 2286, 2290, 2297, 2366, 2365, 2394,
1116 2395, 2399, 2400, 2401, 2403, 2402, 2411, 2412, 2416, 2472,
1117 2476, 2483, 2496, 2506, 2514, 2513, 2601, 2605, 2612, 2621,
1118 2628, 2636, 2642, 2649, 2662, 2661, 2670, 2674, 2678, 2682,
1119 2710, 2718, 2717, 2788, 2789, 2793, 2800, 2801, 2827, 2828,
1120 2829, 2830, 2831, 2832, 2833, 2834, 2838, 2839, 2840, 2841,
1121 2842, 2846, 2847, 2848, 2852, 2853, 2857, 2869, 2867, 2892,
1122 2899, 2900, 2904, 2916, 2914, 2939, 2946, 2962, 2980, 2981,
1123 2985, 2989, 2993, 2997, 3001, 3005, 3009, 3016, 3020, 3024,
1124 3028, 3032, 3036, 3040, 3047, 3051, 3055, 3062, 3069, 3073,
1125 3080, 3087, 3094, 3101, 3109, 3108, 3122, 3153, 3157, 3121,
1126 3174, 3177, 3178, 3182, 3200, 3204, 3199, 3262, 3261, 3274,
1127 3273, 3286, 3290, 3323, 3327, 3386, 3390, 3285, 3412, 3419,
1128 3432, 3441, 3448, 3449, 3558, 3561, 3562, 3567, 3571, 3566,
1129 3607, 3606, 3618, 3628, 3646, 3654, 3653, 3667, 3671, 3666,
1130 3687, 3686, 3736, 3761, 3785, 3789, 3820, 3824, 3784, 3848,
1131 3853, 3851, 3857, 3861, 3899, 3963, 3973, 3962, 3998, 4002,
1132 3996, 4086, 4153, 4162, 4152, 4176, 4186, 4190, 4184, 4232,
1133 4258, 4267, 4271, 4265, 4313, 4339, 4347, 4346, 4389, 4399,
1134 4417, 4425, 4429, 4424, 4489, 4490, 4495, 4499, 4503, 4507,
1135 4494, 4566, 4570, 4574, 4578, 4565, 4646, 4650, 4682, 4686,
1136 4645, 4703, 4707, 4768, 4772, 4702, 4809, 4814, 4819, 4826,
1137 4827, 4838, 4843, 4886, 4837, 4908, 4907, 4916, 4915, 4926,
1138 4931, 4929, 4935, 4940, 4944, 4939, 4983, 4982, 4991, 4990,
1139 5001, 5006, 5004, 5010, 5015, 5019, 5014, 5064, 5071, 5072,
1140 5073, 5228, 5232, 5236, 5244, 5248, 5243, 5257, 5265, 5269,
1141 5264, 5278, 5286, 5290, 5285, 5299, 5307, 5311, 5306, 5320,
1142 5327, 5339, 5337, 5360, 5367, 5397, 5436, 5437, 5441, 5472,
1143 5514, 5518, 5471, 5537, 5541, 5535, 5582, 5581, 5589, 5596,
1144 5611, 5612, 5617, 5616, 5626, 5625, 5635, 5634, 5644, 5643,
1145 5653, 5652, 5662, 5661, 5671, 5670, 5681, 5774, 5780, 5805,
1146 5912, 5921, 5925, 5932, 6007, 6079, 6155, 6154, 6204, 6208,
1147 6212, 6216, 6220, 6224, 6203, 6277, 6276, 6284, 6291, 6296,
1148 6304, 6308, 6303, 6318, 6319, 6323, 6325, 6324, 6333, 6332,
1149 6345, 6368, 6343, 6394, 6421, 6392, 6445, 6446, 6447, 6451,
1150 6452, 6456, 6485, 6517, 6561, 6565, 6515, 6582, 6591, 6609,
1151 6620, 6619, 6657, 6708, 6712, 6655, 6729, 6733, 6740, 6744,
1152 6748, 6752, 6756, 6760, 6764, 6768, 6772, 6776, 6780, 6788,
1153 6819, 6832, 6839, 6864, 6882, 6889, 6904, 6911, 6921, 6925,
1154 6944, 6952, 6920, 6967, 6982, 6986, 6987, 6991, 6992, 6994,
1155 6993, 7004, 7071, 7119, 7135, 7148, 7155, 7214, 7222, 7226,
1156 7221, 7287, 7291, 7286, 7304, 7305, 7310, 7309, 7318, 7317,
1157 7326, 7325, 7334, 7333
1159 #endif
1161 /** Accessing symbol of state STATE. */
1162 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1164 #if YYDEBUG || 0
1165 /* The user-facing name of the symbol whose (internal) number is
1166 YYSYMBOL. No bounds checking. */
1167 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1169 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1170 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1171 static const char *const yytname[] =
1173 "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER",
1174 "IDL_CONST", "IDL_MODULE", "IDL_INTERFACE", "IDL_TYPEDEF", "IDL_LONG",
1175 "IDL_SHORT", "IDL_UNSIGNED", "IDL_DOUBLE", "IDL_FLOAT", "IDL_CHAR",
1176 "IDL_WCHAR", "IDL_OCTET", "IDL_BOOLEAN", "IDL_FIXED", "IDL_ANY",
1177 "IDL_OBJECT", "IDL_STRUCT", "IDL_UNION", "IDL_SWITCH", "IDL_ENUM",
1178 "IDL_SEQUENCE", "IDL_MAP", "IDL_STRING", "IDL_WSTRING", "IDL_EXCEPTION",
1179 "IDL_CASE", "IDL_DEFAULT", "IDL_READONLY", "IDL_ATTRIBUTE", "IDL_ONEWAY",
1180 "IDL_IDEMPOTENT", "IDL_VOID", "IDL_IN", "IDL_OUT", "IDL_INOUT",
1181 "IDL_RAISES", "IDL_CONTEXT", "IDL_NATIVE", "IDL_LOCAL", "IDL_ABSTRACT",
1182 "IDL_CUSTOM", "IDL_FACTORY", "IDL_PRIVATE", "IDL_PUBLIC", "IDL_SUPPORTS",
1183 "IDL_TRUNCATABLE", "IDL_VALUETYPE", "IDL_COMPONENT", "IDL_CONSUMES",
1184 "IDL_EMITS", "IDL_EVENTTYPE", "IDL_FINDER", "IDL_GETRAISES", "IDL_HOME",
1185 "IDL_IMPORT", "IDL_MULTIPLE", "IDL_PRIMARYKEY", "IDL_PROVIDES",
1186 "IDL_PUBLISHES", "IDL_SETRAISES", "IDL_TYPEID", "IDL_TYPEPREFIX",
1187 "IDL_USES", "IDL_MANAGES", "IDL_TYPENAME", "IDL_PORT", "IDL_MIRRORPORT",
1188 "IDL_PORTTYPE", "IDL_CONNECTOR", "IDL_ALIAS", "IDL_INTEGER_LITERAL",
1189 "IDL_UINTEGER_LITERAL", "IDL_STRING_LITERAL", "IDL_CHARACTER_LITERAL",
1190 "IDL_FLOATING_PT_LITERAL", "IDL_FIXED_PT_LITERAL", "IDL_TRUETOK",
1191 "IDL_FALSETOK", "IDL_INT8", "IDL_UINT8", "IDL_INT16", "IDL_UINT16",
1192 "IDL_INT32", "IDL_UINT32", "IDL_INT64", "IDL_UINT64",
1193 "IDL_SCOPE_DELIMITOR", "IDL_LEFT_SHIFT", "IDL_RIGHT_SHIFT",
1194 "IDL_WCHAR_LITERAL", "IDL_WSTRING_LITERAL", "IDL_ANNOTATION_DECL",
1195 "IDL_ANNOTATION_SYMBOL", "';'", "'{'", "'}'", "'<'", "'>'", "':'", "','",
1196 "'='", "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'",
1197 "'('", "')'", "'['", "']'", "$accept", "start", "definitions",
1198 "at_least_one_definition", "definition", "fixed_definition", "$@1",
1199 "$@2", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", "$@11",
1200 "$@12", "$@13", "$@14", "$@15", "module_header", "$@16", "module", "@17",
1201 "$@18", "$@19", "template_module_header", "template_module", "$@20",
1202 "$@21", "$@22", "$@23", "$@24", "at_least_one_tpl_definition",
1203 "tpl_definitions", "tpl_definition", "template_module_ref", "$@25",
1204 "$@26", "template_module_inst", "$@27", "$@28", "interface_def",
1205 "interface", "$@29", "$@30", "$@31", "interface_decl", "$@32",
1206 "interface_header", "inheritance_spec", "$@33", "value_def", "valuetype",
1207 "value_concrete_decl", "@34", "$@35", "$@36", "value_abs_decl", "$@37",
1208 "$@38", "$@39", "value_header", "$@40", "value_decl", "$@41",
1209 "opt_truncatable", "supports_spec", "value_forward_decl",
1210 "value_box_decl", "value_elements", "value_element", "@42", "visibility",
1211 "state_member", "exports", "at_least_one_export", "export", "$@43",
1212 "$@44", "$@45", "$@46", "$@47", "$@48", "$@49", "$@50",
1213 "at_least_one_scoped_name", "scoped_names", "$@51", "scoped_name",
1214 "$@52", "$@53", "id", "defining_id", "interface_forward", "const_dcl",
1215 "$@54", "$@55", "$@56", "$@57", "const_type", "expression", "const_expr",
1216 "or_expr", "xor_expr", "and_expr", "shift_expr", "add_expr", "mult_expr",
1217 "unary_expr", "primary_expr", "literal", "positive_int_expr",
1218 "annotation_dcl", "$@58", "annotation_body", "annotation_statement",
1219 "$@59", "annotation_member_type", "annotation_member",
1220 "annotation_member_default", "at_least_one_annotation",
1221 "annotations_maybe", "annotation_appl", "@60",
1222 "annotation_appl_params_maybe", "annotation_appl_params",
1223 "named_annotation_appl_params", "more_named_annotation_appl_params",
1224 "named_annotation_appl_param", "type_dcl", "$@61", "type_declarator",
1225 "$@62", "type_spec", "simple_type_spec", "base_type_spec",
1226 "template_type_spec", "constructed_type_spec",
1227 "constructed_forward_type_spec", "at_least_one_declarator",
1228 "declarators", "$@63", "declarator", "at_least_one_simple_declarator",
1229 "simple_declarators", "$@64", "simple_declarator", "complex_declarator",
1230 "integer_type", "signed_int", "unsigned_int", "floating_pt_type",
1231 "fixed_type", "char_type", "octet_type", "boolean_type", "any_type",
1232 "object_type", "struct_decl", "$@65", "struct_type", "$@66", "$@67",
1233 "$@68", "at_least_one_member", "members", "member", "member_i", "$@69",
1234 "$@70", "$@71", "union_decl", "$@72", "union_type", "$@73", "$@74",
1235 "$@75", "$@76", "$@77", "$@78", "switch_type_spec",
1236 "at_least_one_case_branch", "case_branches", "case_branch", "$@79",
1237 "$@80", "$@81", "at_least_one_case_label", "case_labels", "case_label",
1238 "$@82", "$@83", "$@84", "element_spec", "$@85", "struct_forward_type",
1239 "union_forward_type", "enum_type", "$@86", "$@87", "$@88", "$@89",
1240 "at_least_one_enumerator", "enumerators", "$@90", "enumerator",
1241 "map_type_spec", "map_head", "$@91", "$@92", "sequence_type_spec",
1242 "$@93", "$@94", "seq_head", "$@95", "$@96", "fixed_type_spec",
1243 "string_type_spec", "$@97", "$@98", "string_head", "wstring_type_spec",
1244 "$@99", "$@100", "wstring_head", "array_declarator", "$@101",
1245 "at_least_one_array_dim", "array_dims", "array_dim", "$@102", "$@103",
1246 "attribute", "attribute_readonly", "$@104", "$@105", "$@106", "$@107",
1247 "attribute_readwrite", "$@108", "$@109", "$@110", "$@111", "exception",
1248 "$@112", "@113", "$@114", "$@115", "operation", "$@116", "$@117",
1249 "$@118", "$@119", "opt_op_attribute", "op_type_spec", "init_decl",
1250 "$@120", "@121", "$@122", "init_parameter_list", "$@123", "$@124",
1251 "at_least_one_in_parameter", "in_parameters", "$@125", "in_parameter",
1252 "$@126", "$@127", "parameter_list", "$@128", "$@129",
1253 "at_least_one_parameter", "parameters", "$@130", "parameter", "$@131",
1254 "$@132", "param_type_spec", "direction", "opt_raises", "$@133", "$@134",
1255 "opt_getraises", "$@135", "$@136", "opt_setraises", "$@137", "$@138",
1256 "opt_context", "$@139", "$@140", "at_least_one_string_literal",
1257 "string_literals", "$@141", "typeid_dcl", "typeprefix_dcl", "component",
1258 "component_forward_decl", "component_decl", "@142", "$@143", "$@144",
1259 "component_header", "$@145", "$@146", "component_inheritance_spec",
1260 "$@147", "component_exports", "component_export", "$@148", "$@149",
1261 "$@150", "$@151", "$@152", "$@153", "$@154", "provides_decl",
1262 "interface_type", "uses_decl", "uses_opt_multiple", "opt_multiple",
1263 "emits_decl", "publishes_decl", "consumes_decl", "home_decl", "$@155",
1264 "home_header", "$@156", "$@157", "$@158", "$@159", "$@160", "$@161",
1265 "home_inheritance_spec", "$@162", "primary_key_spec", "home_body",
1266 "$@163", "$@164", "home_exports", "home_export", "$@165", "$@166",
1267 "factory_decl", "$@167", "$@168", "finder_decl", "$@169", "$@170",
1268 "event", "event_forward_decl", "event_concrete_forward_decl",
1269 "event_abs_forward_decl", "event_abs_decl", "$@171", "$@172", "$@173",
1270 "event_abs_header", "event_custom_header", "event_plain_header",
1271 "event_rest_of_header", "$@174", "event_decl", "@175", "$@176", "$@177",
1272 "event_header", "formal_parameter_type", "at_least_one_formal_parameter",
1273 "formal_parameters", "formal_parameter",
1274 "at_least_one_formal_parameter_name", "formal_parameter_names",
1275 "formal_parameter_name", "porttype_decl", "$@178", "@179", "$@180",
1276 "$@181", "at_least_one_port_export", "port_exports", "port_export",
1277 "$@182", "extended_port_decl", "at_least_one_actual_parameter",
1278 "actual_parameters", "actual_parameter", "connector_decl",
1279 "connector_header", "$@183", "$@184", "connector_body", "$@185", "$@186",
1280 "connector_exports", "connector_export", "$@187", "$@188", "$@189",
1281 "$@190", YY_NULLPTR
1284 static const char *
1285 yysymbol_name (yysymbol_kind_t yysymbol)
1287 return yytname[yysymbol];
1289 #endif
1291 #define YYPACT_NINF (-679)
1293 #define yypact_value_is_default(Yyn) \
1294 ((Yyn) == YYPACT_NINF)
1296 #define YYTABLE_NINF (-582)
1298 #define yytable_value_is_error(Yyn) \
1301 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1302 STATE-NUM. */
1303 static const yytype_int16 yypact[] =
1305 -679, 94, 1414, -679, -679, -679, -679, -679, -679, -679,
1306 -679, -679, -679, -679, 83, 51, 70, 106, -679, 83,
1307 83, -679, 57, 57, -679, -679, 83, -679, -679, 15,
1308 -679, 577, 29, 69, -679, -679, 7, -679, -679, -679,
1309 -679, -679, -679, 550, -679, -679, -679, -679, -679, 1616,
1310 21, -679, -679, 78, -679, 126, -679, -679, -679, -679,
1311 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1312 -679, -679, -679, -679, 60, -679, -679, -679, 60, -679,
1313 -679, 87, 91, 2010, 57, 83, 1887, 83, 83, 83,
1314 83, -679, -679, -679, 10, 83, 25, -679, 76, 83,
1315 -679, 60, 83, 97, 127, 83, -679, -679, 23, -679,
1316 26, 148, -679, 92, -679, 129, 138, 2062, -679, -679,
1317 -679, 155, 196, -679, 156, 158, 159, 85, -679, 150,
1318 -679, -679, -679, -679, -679, -679, 168, -679, -679, -679,
1319 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1320 -679, -679, 163, -679, -679, -679, -679, -679, -679, -679,
1321 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1322 126, -679, -679, -679, 157, -679, 5, -679, -679, 169,
1323 -679, 172, 176, 177, -679, 57, 160, 178, 180, -679,
1324 184, 188, 189, 190, 191, 193, 194, 199, -679, -679,
1325 -679, 200, 204, -679, -679, -679, -679, 163, -679, -679,
1326 -679, -679, -679, -679, -679, -679, -679, 163, -679, -679,
1327 -679, -679, -679, -679, -679, -679, 205, -679, 195, -679,
1328 -679, 207, -679, 288, -679, -679, -679, -679, 44, -679,
1329 -679, -679, 2010, -679, -679, -679, -679, 198, -679, -679,
1330 -679, -679, -679, 300, -679, -679, 56, 210, -679, -679,
1331 -679, -679, -679, -679, -679, -679, 298, -679, 186, 212,
1332 216, 271, -679, -679, -679, -679, -679, -679, -679, 163,
1333 -679, -679, 211, -679, -679, -679, -679, -679, -679, -679,
1334 -679, -679, 271, 228, 242, -679, -679, -679, 83, 83,
1335 250, 251, -679, -679, -679, 253, -679, 288, 254, -679,
1336 -679, -679, -679, -679, 350, -679, 257, 256, -679, -679,
1337 -679, -679, -679, -679, -679, -679, -679, -679, 135, 135,
1338 135, 186, 163, -679, -679, 249, 255, 259, 89, 93,
1339 86, -679, -679, -679, -679, -679, 57, -679, -679, -679,
1340 -679, 264, -679, -679, 57, -679, 186, 186, 186, 246,
1341 -679, -679, -679, -679, -679, -679, -679, 173, -679, -6,
1342 -679, -679, -679, -679, -679, -679, -679, -679, 57, 271,
1343 -679, -679, -679, -679, 207, 1342, 1529, 269, 268, -679,
1344 2062, -679, -679, -679, 258, 186, 186, 186, 186, 186,
1345 186, 186, 186, 186, 186, 267, 83, -679, 163, 1119,
1346 -679, 838, 186, -679, 1435, -679, -679, -679, -679, 186,
1347 -679, 1479, -679, -679, -679, 252, 1026, -679, -679, -679,
1348 -679, 53, 312, 57, 57, -679, -679, -679, -679, -679,
1349 53, -679, 273, -679, 272, -679, 275, -679, -679, 1213,
1350 163, -679, 57, 271, -679, -679, -679, -679, 278, -679,
1351 -679, 83, -679, -679, 282, 283, 382, 289, -679, -679,
1352 255, 259, 89, 93, 93, 86, 86, -679, -679, -679,
1353 -679, -679, 285, -679, -679, -679, 287, -679, -679, 1799,
1354 -679, -679, -679, -679, 1922, -679, -679, -679, -679, -679,
1355 292, -679, 1834, -679, -679, 1709, -679, 293, 1435, -679,
1356 299, 304, 306, 297, -679, 301, -679, 290, -679, -679,
1357 -679, 314, 315, 503, 57, 57, 57, 276, -679, 316,
1358 -679, -679, -679, -679, -679, -679, -679, 83, 83, -679,
1359 318, -679, -679, -679, 1307, 932, 388, 1975, -679, 163,
1360 288, -679, -679, 65, 67, 324, 328, 330, 288, 331,
1361 -679, -679, -5, -679, 49, -679, -679, 332, 333, 163,
1362 -679, 337, 110, 1887, -679, 399, -679, -679, -679, -679,
1363 56, -679, 341, -679, 344, -679, 345, 346, 347, 348,
1364 -679, 163, -679, -679, -679, -679, -679, 349, 352, 444,
1365 -679, -679, -679, 353, -679, -679, 351, -679, -679, -679,
1366 186, -679, 288, -679, 355, 83, -679, -679, 445, 163,
1367 -679, -679, -679, -679, -679, -679, 71, 71, 71, -679,
1368 358, -679, 359, 360, 362, 363, 366, 369, -679, -679,
1369 -679, 370, 371, 376, 377, -679, -679, -679, -679, -679,
1370 -679, -679, -679, -679, -679, 186, -679, -679, -679, 83,
1371 -679, 379, 378, 384, -679, 402, 386, 110, -679, 390,
1372 391, -679, 392, 186, 393, 1591, -679, 57, -679, -679,
1373 -679, -679, -679, -679, 488, -679, -679, -679, -679, -679,
1374 -679, 297, 290, -679, -679, 380, -679, -679, -679, -679,
1375 -679, -679, -679, -679, -679, -679, 383, 383, -679, -679,
1376 -679, -679, 1975, 83, -679, 186, 389, -679, -679, -679,
1377 -679, -679, -679, -679, 395, -679, -679, -679, -679, -679,
1378 57, -679, -679, -679, -679, 396, 163, -679, 383, 1435,
1379 -679, 397, -679, 460, -679, -679, -679, -679, -679, -679,
1380 -679, -679, 57, -679, 163, 400, 668, -679, 394, -679,
1381 -679, -679, 409, 385, 462, 470, 470, 83, 454, 417,
1382 404, -679, 163, 422, -679, -679, 408, -679, 470, -679,
1383 -679, -679, 414, -679, -679, -679, -679, -679, -679, -679,
1384 -679, -679, 464, 527, 416, 170, 470, -679, 153, 1975,
1385 -679, 431, 423, 470, 424, 476, 83, 57, -679, -679,
1386 439, -679, -679, -679, -679, -679, 427, -679, -679, -679,
1387 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1388 -679, -679, -679, -679, -679, 163, -679, 440, -679, 441,
1389 1975, 506, 450, 186, 446, 451, 54, -679, 201, 83,
1390 462, 57, 57, 435, 83, 527, -679, -679, -679, -679,
1391 -679, -679, -679, -679, -679, 1681, -679, -679, -679, 437,
1392 457, -679, -679, -679, 170, 83, 442, 452, -679, -679,
1393 -679, -679, 57, -679, -679, -679, -679, 83, 458, 463,
1394 504, -679, -679, -679, -679, 467, 491, -679, -679, 519,
1395 -679
1398 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1399 Performed when YYTABLE does not specify something else to do. Zero
1400 means the default is an error. */
1401 static const yytype_int16 yydefact[] =
1403 4, 0, 0, 3, 1, 38, 147, 40, 70, 224,
1404 294, 309, 344, 396, 0, 0, 0, 0, 94, 0,
1405 0, 508, 0, 0, 578, 598, 0, 6, 7, 42,
1406 24, 61, 0, 0, 22, 64, 77, 66, 26, 78,
1407 83, 79, 84, 77, 80, 81, 65, 18, 10, 0,
1408 0, 12, 230, 296, 226, 343, 227, 254, 255, 228,
1409 20, 14, 16, 28, 467, 466, 469, 30, 506, 32,
1410 538, 540, 539, 537, 77, 556, 557, 536, 77, 34,
1411 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1412 0, 143, 266, 229, 77, 0, 77, 88, 77, 0,
1413 82, 77, 0, 473, 549, 0, 142, 138, 0, 137,
1414 0, 0, 213, 0, 46, 0, 0, 0, 213, 8,
1415 9, 0, 97, 72, 0, 0, 0, 270, 272, 0,
1416 284, 285, 288, 289, 290, 291, 287, 292, 293, 362,
1417 355, 370, 375, 273, 280, 274, 281, 275, 282, 276,
1418 283, 92, 237, 102, 233, 235, 236, 234, 238, 268,
1419 269, 239, 243, 240, 242, 241, 244, 245, 296, 251,
1420 0, 252, 253, 250, 0, 246, 0, 249, 247, 369,
1421 248, 374, 0, 0, 5, 0, 211, 0, 0, 311,
1422 0, 0, 0, 0, 0, 0, 0, 0, 550, 543,
1423 552, 0, 0, 601, 597, 39, 287, 160, 148, 152,
1424 156, 157, 153, 154, 155, 158, 159, 41, 71, 225,
1425 231, 295, 310, 345, 397, 73, 547, 74, 0, 548,
1426 95, 478, 509, 0, 464, 140, 465, 579, 0, 197,
1427 43, 25, 0, 564, 559, 560, 566, 562, 563, 567,
1428 565, 561, 558, 0, 48, 571, 0, 0, 23, 96,
1429 75, 67, 27, 85, 271, 286, 277, 279, 0, 0,
1430 0, 99, 354, 361, 358, 366, 371, 19, 11, 214,
1431 13, 297, 0, 21, 15, 17, 29, 470, 31, 520,
1432 507, 33, 99, 0, 0, 35, 37, 605, 0, 0,
1433 0, 0, 89, 476, 474, 517, 139, 0, 0, 599,
1434 212, 200, 4, 568, 0, 572, 0, 569, 186, 187,
1435 188, 190, 193, 192, 194, 195, 191, 189, 0, 0,
1436 0, 0, 183, 596, 161, 162, 163, 165, 167, 169,
1437 172, 175, 179, 184, 595, 62, 0, 114, 105, 278,
1438 196, 0, 363, 213, 0, 93, 0, 0, 0, 217,
1439 213, 312, 481, 524, 551, 544, 553, 602, 149, 266,
1440 232, 259, 260, 261, 267, 346, 398, 114, 0, 99,
1441 515, 510, 141, 580, 478, 0, 0, 3, 0, 49,
1442 0, 180, 181, 182, 0, 0, 0, 0, 0, 0,
1443 0, 0, 0, 0, 0, 593, 0, 76, 136, 0,
1444 113, 0, 0, 213, 0, 98, 359, 367, 372, 0,
1445 215, 0, 298, 302, 213, 213, 0, 114, 105, 386,
1446 391, 0, 502, 0, 0, 610, 384, 385, 606, 608,
1447 0, 612, 0, 604, 0, 213, 256, 213, 302, 0,
1448 477, 475, 0, 99, 586, 600, 204, 198, 0, 206,
1449 199, 0, 201, 207, 0, 0, 0, 0, 570, 185,
1450 164, 166, 168, 170, 171, 173, 174, 176, 177, 178,
1451 213, 63, 133, 131, 406, 407, 0, 116, 123, 0,
1452 117, 127, 125, 129, 0, 119, 121, 411, 111, 110,
1453 0, 104, 0, 106, 107, 0, 108, 0, 0, 356,
1454 0, 0, 0, 137, 218, 0, 219, 222, 307, 304,
1455 303, 0, 213, 0, 0, 0, 0, 0, 492, 0,
1456 480, 482, 484, 486, 488, 490, 494, 0, 0, 525,
1457 0, 523, 526, 528, 0, 0, 0, 0, 498, 497,
1458 0, 501, 500, 0, 0, 0, 0, 0, 0, 0,
1459 603, 150, 0, 257, 0, 347, 352, 213, 0, 516,
1460 511, 585, 213, 0, 202, 210, 203, 45, 573, 50,
1461 0, 134, 0, 69, 0, 115, 0, 0, 0, 0,
1462 410, 440, 437, 438, 439, 401, 409, 0, 0, 0,
1463 87, 112, 103, 0, 365, 364, 0, 360, 368, 373,
1464 0, 216, 0, 220, 0, 0, 299, 301, 270, 323,
1465 318, 319, 320, 321, 313, 322, 0, 0, 0, 479,
1466 0, 472, 0, 0, 0, 0, 0, 0, 530, 533,
1467 522, 0, 0, 0, 0, 387, 392, 496, 591, 592,
1468 611, 607, 609, 499, 613, 0, 381, 377, 380, 0,
1469 353, 0, 349, 0, 91, 0, 0, 0, 589, 0,
1470 0, 584, 0, 0, 0, 0, 594, 0, 132, 124,
1471 118, 128, 126, 130, 0, 120, 122, 412, 109, 213,
1472 223, 0, 222, 308, 305, 0, 505, 503, 504, 493,
1473 483, 485, 487, 489, 491, 495, 0, 0, 527, 529,
1474 546, 555, 0, 0, 151, 0, 378, 258, 348, 350,
1475 400, 512, 582, 583, 0, 587, 588, 205, 209, 208,
1476 0, 56, 42, 51, 55, 0, 135, 402, 0, 0,
1477 221, 0, 314, 415, 531, 534, 388, 393, 265, 382,
1478 379, 213, 0, 590, 58, 0, 0, 57, 0, 413,
1479 357, 306, 0, 0, 0, 447, 447, 0, 451, 262,
1480 0, 351, 513, 0, 52, 54, 428, 403, 447, 315,
1481 416, 423, 0, 422, 444, 532, 535, 389, 448, 394,
1482 263, 383, 519, 0, 0, 0, 447, 414, 0, 0,
1483 418, 419, 0, 447, 0, 455, 0, 0, 514, 577,
1484 0, 576, 427, 441, 442, 443, 0, 433, 434, 404,
1485 330, 337, 335, 316, 326, 327, 334, 424, 420, 445,
1486 390, 449, 452, 395, 264, 518, 59, 574, 429, 430,
1487 0, 459, 0, 0, 0, 0, 0, 213, 332, 0,
1488 0, 0, 0, 0, 0, 0, 431, 435, 456, 405,
1489 331, 338, 336, 317, 325, 0, 333, 425, 421, 0,
1490 0, 453, 60, 575, 0, 0, 0, 0, 340, 328,
1491 446, 450, 0, 432, 436, 457, 339, 0, 0, 0,
1492 0, 341, 329, 454, 463, 0, 460, 458, 461, 0,
1496 /* YYPGOTO[NTERM-NUM]. */
1497 static const yytype_int16 yypgoto[] =
1499 -679, -679, 284, 291, 530, -617, -679, -679, -679, -679,
1500 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1501 -679, -588, -679, -679, -679, -679, -679, -679, -679, -679,
1502 -679, -679, -679, -679, -679, -679, -152, -679, -679, -679,
1503 -679, -679, -679, -679, -679, -679, -679, -679, 222, -679,
1504 -679, 27, -679, -679, -679, 590, -679, -679, -679, -679,
1505 -679, -679, -679, 592, -679, 224, -679, -679, -250, -679,
1506 -679, 181, 107, -679, -679, -679, -324, -679, -361, -679,
1507 -679, -679, -679, -679, -679, -679, -679, -337, -679, -679,
1508 -22, -679, -679, -193, -10, -679, 17, -679, -679, -679,
1509 -679, -198, -44, -233, -679, 218, 219, 217, -151, -150,
1510 -185, -107, -679, -320, -679, -679, -679, -679, -679, -679,
1511 -679, -679, 12, -83, 566, -679, -679, -679, -679, -74,
1512 8, 18, -679, 46, -679, -31, -389, -466, -679, -679,
1513 -679, 2, -679, -679, -616, -146, -679, -679, -7, -679,
1514 -75, -679, -679, -51, -42, -65, -50, -49, 237, -679,
1515 -40, -679, -38, -679, -679, -679, -679, 175, 265, 122,
1516 -679, -679, -679, -37, -679, -32, -679, -679, -679, -679,
1517 -679, -679, -679, -679, -679, -220, -679, -679, -679, -679,
1518 -679, -219, -679, -679, -679, -679, -679, -679, -679, -41,
1519 -679, -679, -679, -679, -679, -679, -679, -123, -679, -679,
1520 -679, -679, -679, -679, -679, -679, -679, -679, -679, -70,
1521 -679, -679, -679, -68, -679, -679, -679, -679, -679, -679,
1522 -679, -86, -679, -679, -328, -679, -679, -679, -679, -679,
1523 -679, -679, -679, -679, -679, 20, -679, -679, -679, -679,
1524 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1525 -679, -656, -679, -679, -679, -679, -679, -209, -679, -679,
1526 -679, -679, -679, -679, -679, -679, -231, -679, -679, -517,
1527 -679, -678, -679, -679, -679, -679, -679, -679, -679, -679,
1528 -679, -679, -679, -679, -679, -679, 22, 24, -679, -679,
1529 -679, -679, -679, -679, -679, -679, -679, 262, -679, -679,
1530 121, -679, -679, -679, -679, -679, -679, -679, -340, 209,
1531 -336, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1532 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1533 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1534 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1535 -679, -679, 572, -679, -679, -679, -679, -679, -679, -679,
1536 -679, -679, 261, -679, -679, -202, -679, -679, -679, -679,
1537 -679, -679, -679, -13, -679, 294, -679, -679, 77, -679,
1538 -679, -679, -679, -679, -679, -679, -679, -679, -679, -679,
1539 -679, -679
1542 /* YYDEFGOTO[NTERM-NUM]. */
1543 static const yytype_int16 yydefgoto[] =
1545 0, 1, 2, 3, 27, 28, 183, 187, 191, 192,
1546 182, 190, 121, 116, 125, 193, 195, 197, 201, 202,
1547 82, 29, 84, 30, 115, 312, 465, 31, 32, 117,
1548 316, 467, 675, 755, 733, 756, 734, 735, 773, 854,
1549 33, 118, 406, 34, 35, 124, 347, 486, 36, 85,
1550 37, 151, 346, 38, 39, 40, 126, 348, 500, 41,
1551 228, 377, 568, 42, 271, 43, 102, 260, 355, 44,
1552 45, 411, 501, 603, 502, 503, 409, 410, 487, 586,
1553 597, 598, 584, 588, 587, 589, 582, 407, 482, 677,
1554 332, 233, 307, 109, 369, 46, 488, 83, 298, 444,
1555 655, 208, 333, 350, 335, 336, 337, 338, 339, 340,
1556 341, 342, 343, 351, 48, 311, 385, 460, 573, 461,
1557 462, 674, 489, 50, 310, 359, 420, 515, 516, 613,
1558 517, 490, 86, 219, 299, 220, 154, 155, 156, 157,
1559 52, 370, 446, 659, 371, 747, 769, 806, 372, 373,
1560 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
1561 53, 87, 54, 188, 360, 521, 422, 522, 617, 520,
1562 615, 741, 614, 55, 88, 56, 282, 424, 695, 762,
1563 798, 845, 624, 823, 846, 824, 847, 888, 842, 825,
1564 848, 826, 844, 843, 877, 879, 887, 57, 58, 59,
1565 89, 300, 447, 661, 565, 662, 751, 566, 173, 174,
1566 270, 606, 175, 356, 510, 176, 269, 413, 177, 178,
1567 357, 511, 179, 180, 358, 512, 181, 374, 445, 657,
1568 716, 658, 715, 770, 491, 436, 546, 712, 767, 803,
1569 437, 547, 713, 768, 805, 492, 90, 301, 448, 663,
1570 493, 684, 758, 796, 841, 494, 595, 506, 599, 738,
1571 778, 744, 763, 764, 782, 801, 850, 783, 799, 849,
1572 777, 794, 795, 816, 839, 874, 817, 840, 875, 596,
1573 818, 785, 802, 851, 789, 804, 852, 833, 853, 882,
1574 859, 876, 890, 895, 896, 899, 495, 496, 63, 64,
1575 65, 194, 362, 529, 66, 231, 379, 304, 378, 425,
1576 530, 632, 633, 634, 635, 636, 630, 637, 531, 550,
1577 532, 440, 552, 533, 534, 535, 67, 196, 68, 105,
1578 305, 453, 665, 752, 792, 381, 452, 808, 290, 363,
1579 540, 426, 541, 641, 642, 542, 706, 765, 543, 707,
1580 766, 69, 70, 71, 72, 73, 293, 427, 643, 74,
1581 75, 76, 199, 292, 77, 294, 428, 644, 78, 253,
1582 254, 317, 255, 810, 837, 811, 79, 111, 308, 454,
1583 666, 571, 572, 671, 724, 536, 257, 405, 344, 80,
1584 81, 112, 384, 204, 297, 442, 367, 443, 556, 557,
1585 555, 559
1588 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1589 positive, shift that token. If negative, reduce the rule whose
1590 number is the opposite. If YYTABLE_NINF, syntax error. */
1591 static const yytype_int16 yytable[] =
1593 108, 110, 172, 168, 92, 169, 170, 93, 209, 103,
1594 104, 171, 153, 215, 49, 216, 113, 415, 212, 47,
1595 51, 152, 60, 334, 61, 509, 62, 438, 592, 238,
1596 646, 439, 210, 213, 214, 256, 416, 417, 418, 435,
1597 306, 211, 364, 717, 313, 172, 168, 309, 169, 170,
1598 504, 745, 660, 449, 171, 820, 106, 8, 731, 106,
1599 106, 207, 217, 123, 152, 539, 47, 51, 648, 60,
1600 649, 61, 548, 62, 106, 218, 8, 221, 222, 223,
1601 224, 592, 759, 821, 822, 226, 91, 732, 786, 229,
1602 -376, 185, 230, 264, 4, 232, 265, 528, 394, 234,
1603 797, 198, 236, 544, -144, 198, 273, -145, 274, 122,
1604 -376, 656, 122, 235, 382, 114, 235, 185, 819, 605,
1605 18, 225, -146, 227, 95, 830, 119, 122, 585, 451,
1606 318, 319, 320, 321, 322, 323, 324, 325, 106, 731,
1607 185, 429, 430, 107, 504, 185, 107, 107, 189, 326,
1608 327, 237, 185, -324, 820, 235, 18, 235, 266, 267,
1609 99, 235, 122, 279, 328, 329, 120, 209, 732, 330,
1610 331, 431, 215, -100, 216, -342, 432, 212, 122, 507,
1611 398, 399, 821, 822, 504, 203, 514, 459, 205, 106,
1612 239, 210, 213, 214, -468, 746, 402, 403, 404, 528,
1613 211, 400, 401, 570, 429, 430, 813, 814, 815, 318,
1614 319, 320, 321, 322, 323, 324, 325, 477, 478, 479,
1615 207, 391, 392, 393, -541, 107, 513, 240, 326, 327,
1616 821, 822, 669, 867, 431, 241, 670, 94, 96, 432,
1617 98, 101, 433, 434, 668, 259, 592, 473, 474, 331,
1618 475, 476, 258, 235, 261, 262, -212, 263, 272, 884,
1619 318, 319, 320, 321, 322, 323, 324, 325, 268, 275,
1620 414, 891, 276, 277, 278, 280, 107, 421, 281, 326,
1621 327, 283, 827, 429, 430, 284, 285, 286, 368, 287,
1622 288, 106, 289, 302, 328, 329, 291, 295, 314, 330,
1623 331, 296, -542, 315, 524, 525, 349, 429, 430, 303,
1624 209, 345, 352, 431, 526, 215, 353, 216, 432, 354,
1625 212, 433, 434, 857, 408, 361, 365, 669, 524, 525,
1626 508, 670, 408, 592, 210, 213, 214, 431, 526, 668,
1627 366, 523, 432, 211, 464, 433, 434, 334, 375, 376,
1628 760, -471, 383, 388, 395, 380, 450, 647, 389, 390,
1629 419, 396, 562, 207, 564, 653, 397, 412, -44, 466,
1630 480, 551, 560, 469, 592, 574, 561, 690, 563, 576,
1631 172, 168, 577, 169, 170, 578, 583, 579, 581, 171,
1632 519, 600, 152, 612, 604, 749, 481, 580, 49, 152,
1633 607, 610, 458, 47, 51, 608, 60, 609, 61, 549,
1634 62, 553, 554, 616, -300, 631, 611, 640, 549, 691,
1635 645, 650, 334, 505, 593, 651, 594, 652, 654, 673,
1636 569, -399, 664, 696, 697, 698, -581, 527, 678, 421,
1637 728, 679, 680, 681, 682, 683, 685, 687, 620, 686,
1638 688, 575, 693, 264, 689, 699, 700, 701, 621, 702,
1639 703, 172, 168, 704, 169, 170, 705, 708, 709, 721,
1640 171, 519, 591, 622, 623, 710, 711, 593, 718, 594,
1641 152, 719, 625, 720, 421, 722, 152, 725, 726, 727,
1642 729, 737, 753, 757, 761, 742, -417, 743, 781, 774,
1643 780, 619, 626, 627, 628, 656, 106, 779, 776, 784,
1644 788, 618, 128, 129, 869, 870, 132, 133, 134, 135,
1645 790, 791, 793, -426, 807, 591, 12, 638, 639, 800,
1646 809, 812, 172, 168, 828, 169, 170, 829, 831, 832,
1647 836, 171, 838, 855, 856, 889, 858, 860, 862, 871,
1648 863, 152, 880, 106, 886, 892, 885, 505, 127, 128,
1649 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,
1650 10, 11, 881, 12, 139, 140, 141, 142, 893, 184,
1651 894, -47, 897, -47, 667, 143, 144, 145, 146, 147,
1652 148, 149, 150, 107, 898, 900, 386, -47, -47, 185,
1653 -47, -47, -47, 387, 775, -47, 739, 100, 97, 545,
1654 861, 714, 602, 470, 472, 471, 186, 694, 740, 672,
1655 692, 787, 463, 567, 601, 423, 864, -47, 771, 866,
1656 750, -47, 143, 144, 145, 146, 147, 148, 149, 150,
1657 107, 868, 593, 883, 594, -47, 455, -101, 629, 558,
1658 200, 468, 122, 873, 723, 736, 0, 676, 0, 0,
1659 0, 441, 0, 0, 0, 0, 0, 0, 564, 5,
1660 0, 0, 6, 7, 8, 9, 0, 0, 0, 0,
1661 0, 0, 0, 0, 0, 0, 0, 0, 10, 11,
1662 591, 12, 47, 51, 0, 60, 13, 61, 0, 62,
1663 0, 0, 0, 92, 0, 0, 748, 0, 754, 14,
1664 15, 16, 17, 0, 0, 0, 0, 152, 18, 19,
1665 0, 0, 20, 0, 0, 21, 0, 0, 0, 593,
1666 772, 594, 22, 23, 0, 0, 0, 0, 0, 24,
1667 25, 730, 0, 0, 0, 0, 0, 0, 0, 0,
1668 0, 0, 0, 0, 0, 0, 0, 92, 0, 0,
1669 748, 0, 0, 26, 865, 0, 0, -53, 0, 0,
1670 593, 0, 594, 47, 51, 0, 60, 591, 61, 0,
1671 62, 0, 0, 0, 0, 835, 0, 0, 0, 0,
1672 0, 0, 0, 0, 0, 0, 92, 0, 0, 834,
1673 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1674 0, 0, 0, 0, 0, 0, 0, 0, 591, 0,
1675 0, 0, 0, 0, 172, 168, 0, 169, 170, 408,
1676 408, 0, 0, 171, 878, 0, 0, 0, 0, 483,
1677 0, -408, 6, 152, 872, 9, -408, -408, -408, -408,
1678 -408, -408, -408, -408, -408, -408, -408, -408, 10, 11,
1679 408, 12, 0, 0, -408, -408, 13, 0, 0, 429,
1680 430, 484, 485, -408, 0, 0, 0, 0, 0, 14,
1681 0, 0, 0, 497, 498, 499, 0, 0, 0, 0,
1682 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1683 0, 0, 22, 23, 0, 0, 0, 0, 0, 0,
1684 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1685 -408, -408, -408, -408, -408, -408, -408, -408, -408, 0,
1686 0, 0, 0, 483, -213, -408, 6, -86, 0, 9,
1687 -408, -408, -408, -408, -408, -408, -408, -408, -408, -408,
1688 -408, -408, 10, 11, 0, 12, 0, 0, -408, -408,
1689 13, 0, 0, 429, 430, 484, 485, -408, 0, 0,
1690 0, 0, 0, 14, 0, 0, 0, 497, 498, 499,
1691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1692 0, 0, 0, 0, 0, 0, 22, 23, 0, 0,
1693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1694 0, 0, 0, 0, -408, -408, -408, -408, -408, -408,
1695 -408, -408, -408, 0, 0, 0, 0, 483, -213, -408,
1696 6, -554, 0, 9, -408, -408, -408, -408, -408, -408,
1697 -408, -408, -408, -408, -408, -408, 10, 11, 0, 12,
1698 0, 0, -408, -408, 13, 0, 0, 429, 430, 484,
1699 485, -408, 0, 0, 0, 0, 0, 14, 0, 0,
1700 0, 537, 0, 0, 0, 0, 0, 0, 0, 0,
1701 0, 538, 0, 0, 0, 0, 0, 0, 0, 0,
1702 22, 23, 0, 0, 0, 0, 0, 0, 0, 0,
1703 0, 0, 0, 0, 0, 0, 0, 0, -408, -408,
1704 -408, -408, -408, -408, -408, -408, -408, 0, 0, 0,
1705 483, 0, -408, 6, 0, -521, 9, -408, -408, -408,
1706 -408, -408, -408, -408, -408, -408, -408, -408, -408, 10,
1707 11, 0, 12, 0, 0, -408, -408, 13, 0, 0,
1708 429, 430, 484, 485, -408, 0, 0, 0, 0, 0,
1709 14, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1711 0, 0, 0, 22, 23, 0, 0, 0, 0, 0,
1712 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1713 0, -408, -408, -408, -408, -408, -408, -408, -408, -408,
1714 0, 0, 0, 0, 483, -213, -408, 6, -68, 0,
1715 9, -408, -408, -408, -408, -408, -408, -408, -408, -408,
1716 -408, -408, -408, 10, 11, 0, 12, 0, 0, -408,
1717 -408, 13, 0, 0, 429, 430, 484, 485, -408, 0,
1718 0, 0, 0, 0, 14, 0, 0, 0, 0, 0,
1719 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1720 0, 0, 0, 0, 0, 0, 0, 22, 23, 0,
1721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1722 0, 0, 0, 0, 0, -408, -408, -408, -408, -408,
1723 -408, -408, -408, -408, 0, 0, 0, 0, 483, -213,
1724 -408, 6, -90, 0, 9, -408, -408, -408, -408, -408,
1725 -408, -408, -408, -408, -408, -408, -408, 10, 11, 0,
1726 12, 0, 0, -408, -408, 13, 0, 0, 429, 430,
1727 484, 485, -408, 0, 0, 106, 6, 0, 14, 456,
1728 127, 128, 129, 130, 131, 132, 133, 134, 135, 206,
1729 137, 0, 0, 0, 0, 12, 0, 0, 141, 142,
1730 0, 22, 23, 0, 0, 0, 0, 0, 0, 0,
1731 0, 0, 0, 0, 0, 0, 0, 0, 0, -408,
1732 -408, -408, -408, -408, -408, -408, -408, -408, 0, 0,
1733 0, 0, 0, -213, 0, 0, -545, 0, 0, 0,
1734 0, 0, 0, 0, -2, 5, 0, 0, 6, 7,
1735 8, 9, 0, 0, 143, 144, 145, 146, 147, 148,
1736 149, 150, 107, 0, 10, 11, 0, 12, 106, 0,
1737 0, 457, 13, 127, 128, 129, 130, 131, 132, 133,
1738 134, 135, 136, 137, 138, 14, 15, 16, 17, 139,
1739 140, 141, 142, 0, 18, 19, 0, 0, 20, 0,
1740 0, 21, 0, 0, 0, 0, 0, 0, 22, 23,
1741 518, 0, 106, 0, 0, 24, 25, 127, 128, 129,
1742 130, 131, 132, 133, 134, 135, 136, 137, 138, 10,
1743 11, 0, 12, 139, 140, 141, 142, 0, 0, 26,
1744 -213, 0, 0, 0, 0, 0, 0, 143, 144, 145,
1745 146, 147, 148, 149, 150, 107, 0, 0, 0, 0,
1746 5, 185, 0, 6, 7, 8, 9, 0, 0, 0,
1747 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
1748 11, 0, 12, 0, 0, 0, 0, 13, 0, 0,
1749 0, 143, 144, 145, 146, 147, 148, 149, 150, 107,
1750 14, 15, 16, 17, 0, 185, 0, 0, 0, 18,
1751 19, 0, 0, 20, 0, 0, 21, 0, 0, 0,
1752 0, 0, 5, 22, 23, 6, 7, 8, 9, 0,
1753 24, 25, 0, 0, 0, 0, 0, 0, 0, 0,
1754 0, 10, 11, 0, 12, 0, 0, 5, 0, 13,
1755 6, 7, 8, 9, 26, -213, 0, 0, 0, 0,
1756 0, 0, 14, 15, 16, 17, 10, 11, 0, 12,
1757 0, 18, 19, 0, 13, 20, 0, 0, 21, 0,
1758 0, 0, 0, 0, 0, 22, 23, 14, 15, 16,
1759 17, 0, 24, 25, 730, 0, 18, 19, 0, 0,
1760 20, 0, 0, 21, 0, 0, 0, 0, 0, 0,
1761 22, 23, 0, 0, 106, 0, 26, 24, 25, 127,
1762 128, 129, 130, 131, 132, 133, 134, 135, 136, 137,
1763 138, 10, 11, 0, 12, 139, 140, 141, 142, 0,
1764 483, 26, -408, 6, 0, 0, 9, -408, -408, -408,
1765 -408, -408, -408, -408, -408, -408, -408, -408, -408, 10,
1766 11, 0, 12, 0, 0, -408, -408, 13, 0, 0,
1767 429, 430, 484, 485, -408, 0, 0, 0, 0, 0,
1768 14, 0, 0, 0, 497, 498, 499, 0, 0, 0,
1769 0, 0, 0, 143, 144, 145, 146, 147, 148, 149,
1770 150, 107, 0, 22, 23, 0, 0, 185, 0, 0,
1771 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1772 0, -408, -408, -408, -408, -408, -408, -408, -408, -408,
1773 483, 0, -408, 6, 0, 0, 9, -408, -408, -408,
1774 -408, -408, -408, -408, -408, -408, -408, -408, -408, 10,
1775 11, 0, 12, 0, 0, -408, -408, 13, 0, 0,
1776 429, 430, 484, 485, -408, 518, 0, 106, 0, 0,
1777 14, 0, 127, 128, 129, 130, 131, 132, 133, 134,
1778 135, 136, 137, 138, 10, 11, 0, 12, 139, 140,
1779 141, 142, 0, 22, 23, 0, 0, 0, 0, 0,
1780 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1781 0, -408, -408, -408, -408, -408, -408, -408, -408, -408,
1782 106, 0, 0, 0, 0, 127, 128, 129, 130, 131,
1783 132, 133, 134, 135, 136, 137, 138, 10, 11, 0,
1784 12, 139, 140, 141, 142, 0, 143, 144, 145, 146,
1785 147, 148, 149, 150, 107, 106, 0, 0, 0, 0,
1786 127, 128, 129, 130, 131, 132, 133, 134, 135, 206,
1787 137, 138, 0, 0, 0, 0, 0, 0, 141, 142,
1788 0, 0, 0, 0, 0, 0, 0, 590, 0, 0,
1789 0, 0, 0, 0, 0, 0, 0, 0, 0, 143,
1790 144, 145, 146, 147, 148, 149, 150, 107, 106, 0,
1791 0, 0, 0, 127, 128, 129, 130, 131, 132, 133,
1792 134, 135, 206, 137, 138, 0, 0, 0, 0, 0,
1793 0, 141, 142, 0, 143, 144, 145, 146, 147, 148,
1794 149, 150, 107, 106, 0, 0, 0, 0, 127, 128,
1795 129, 130, 131, 132, 133, 134, 135, 206, 0, 0,
1796 0, 0, 0, 0, 0, 0, 141, 142, 0, 0,
1797 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1798 0, 0, 0, 0, 0, 0, 0, 143, 144, 145,
1799 146, 147, 148, 149, 150, 107, 242, 0, 243, 0,
1800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1801 0, 0, 244, 245, 0, 246, 247, 248, 0, 0,
1802 249, 0, 143, 144, 145, 146, 147, 148, 149, 150,
1803 107, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1804 0, 0, 250, 0, 0, 0, 251, 0, 0, 0,
1805 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1809 static const yytype_int16 yycheck[] =
1811 22, 23, 43, 43, 14, 43, 43, 14, 83, 19,
1812 20, 43, 43, 83, 2, 83, 26, 354, 83, 2,
1813 2, 43, 2, 256, 2, 414, 2, 367, 494, 112,
1814 547, 367, 83, 83, 83, 118, 356, 357, 358, 367,
1815 233, 83, 292, 659, 242, 86, 86, 3, 86, 86,
1816 411, 707, 3, 377, 86, 1, 3, 6, 675, 3,
1817 3, 83, 84, 36, 86, 426, 49, 49, 3, 49,
1818 3, 49, 19, 49, 3, 85, 6, 87, 88, 89,
1819 90, 547, 738, 29, 30, 95, 3, 675, 766, 99,
1820 96, 96, 102, 8, 0, 105, 11, 425, 331, 76,
1821 778, 74, 76, 427, 97, 78, 101, 97, 103, 102,
1822 116, 116, 102, 90, 307, 100, 90, 96, 796, 508,
1823 50, 94, 97, 96, 54, 803, 97, 102, 489, 379,
1824 74, 75, 76, 77, 78, 79, 80, 81, 3, 756,
1825 96, 31, 32, 90, 505, 96, 90, 90, 22, 93,
1826 94, 3, 96, 99, 1, 90, 50, 90, 8, 9,
1827 54, 90, 102, 185, 108, 109, 97, 242, 756, 113,
1828 114, 61, 242, 97, 242, 97, 66, 242, 102, 412,
1829 91, 92, 29, 30, 545, 98, 419, 385, 97, 3,
1830 98, 242, 242, 242, 97, 712, 110, 111, 112, 527,
1831 242, 108, 109, 453, 31, 32, 36, 37, 38, 74,
1832 75, 76, 77, 78, 79, 80, 81, 402, 403, 404,
1833 242, 328, 329, 330, 97, 90, 419, 98, 93, 94,
1834 29, 30, 572, 849, 61, 97, 572, 15, 16, 66,
1835 16, 17, 69, 70, 572, 49, 712, 398, 399, 114,
1836 400, 401, 97, 90, 98, 97, 96, 98, 101, 875,
1837 74, 75, 76, 77, 78, 79, 80, 81, 100, 100,
1838 353, 887, 100, 97, 97, 97, 90, 360, 98, 93,
1839 94, 97, 799, 31, 32, 97, 97, 97, 298, 98,
1840 97, 3, 98, 98, 108, 109, 97, 97, 100, 113,
1841 114, 97, 97, 3, 52, 53, 8, 31, 32, 102,
1842 385, 101, 100, 61, 62, 385, 100, 385, 66, 48,
1843 385, 69, 70, 840, 346, 114, 98, 667, 52, 53,
1844 413, 667, 354, 799, 385, 385, 385, 61, 62, 667,
1845 98, 424, 66, 385, 385, 69, 70, 580, 98, 98,
1846 739, 99, 98, 3, 105, 102, 378, 550, 101, 103,
1847 114, 106, 445, 385, 447, 558, 107, 103, 99, 101,
1848 103, 59, 99, 115, 840, 97, 104, 610, 103, 97,
1849 421, 421, 99, 421, 421, 3, 99, 98, 103, 421,
1850 421, 99, 414, 103, 101, 715, 406, 480, 386, 421,
1851 101, 104, 385, 386, 386, 101, 386, 101, 386, 431,
1852 386, 433, 434, 99, 99, 99, 115, 99, 440, 612,
1853 32, 97, 655, 411, 494, 97, 494, 97, 97, 30,
1854 452, 99, 99, 626, 627, 628, 99, 425, 97, 522,
1855 673, 97, 97, 97, 97, 97, 97, 3, 523, 97,
1856 97, 461, 97, 8, 103, 97, 97, 97, 523, 97,
1857 97, 502, 502, 97, 502, 502, 97, 97, 97, 67,
1858 502, 502, 494, 523, 523, 99, 99, 547, 99, 547,
1859 502, 103, 523, 99, 567, 99, 508, 97, 97, 97,
1860 97, 3, 97, 97, 97, 115, 36, 114, 36, 99,
1861 115, 523, 524, 525, 526, 116, 3, 98, 114, 39,
1862 56, 8, 9, 10, 851, 852, 13, 14, 15, 16,
1863 103, 117, 100, 115, 60, 547, 23, 537, 538, 115,
1864 3, 115, 573, 573, 103, 573, 573, 114, 114, 63,
1865 101, 573, 115, 103, 103, 882, 40, 97, 102, 114,
1866 99, 573, 115, 3, 102, 97, 114, 545, 8, 9,
1867 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1868 20, 21, 115, 23, 24, 25, 26, 27, 115, 49,
1869 76, 4, 115, 6, 572, 82, 83, 84, 85, 86,
1870 87, 88, 89, 90, 103, 76, 312, 20, 21, 96,
1871 23, 24, 25, 312, 756, 28, 689, 17, 16, 428,
1872 843, 655, 505, 395, 397, 396, 50, 615, 692, 573,
1873 612, 767, 385, 448, 502, 360, 846, 50, 751, 848,
1874 716, 54, 82, 83, 84, 85, 86, 87, 88, 89,
1875 90, 850, 712, 874, 712, 68, 384, 97, 527, 440,
1876 78, 390, 102, 855, 667, 677, -1, 580, -1, -1,
1877 -1, 367, -1, -1, -1, -1, -1, -1, 751, 1,
1878 -1, -1, 4, 5, 6, 7, -1, -1, -1, -1,
1879 -1, -1, -1, -1, -1, -1, -1, -1, 20, 21,
1880 712, 23, 675, 675, -1, 675, 28, 675, -1, 675,
1881 -1, -1, -1, 713, -1, -1, 713, -1, 730, 41,
1882 42, 43, 44, -1, -1, -1, -1, 739, 50, 51,
1883 -1, -1, 54, -1, -1, 57, -1, -1, -1, 799,
1884 752, 799, 64, 65, -1, -1, -1, -1, -1, 71,
1885 72, 73, -1, -1, -1, -1, -1, -1, -1, -1,
1886 -1, -1, -1, -1, -1, -1, -1, 767, -1, -1,
1887 767, -1, -1, 95, 847, -1, -1, 99, -1, -1,
1888 840, -1, 840, 756, 756, -1, 756, 799, 756, -1,
1889 756, -1, -1, -1, -1, 807, -1, -1, -1, -1,
1890 -1, -1, -1, -1, -1, -1, 806, -1, -1, 806,
1891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1892 -1, -1, -1, -1, -1, -1, -1, -1, 840, -1,
1893 -1, -1, -1, -1, 865, 865, -1, 865, 865, 851,
1894 852, -1, -1, 865, 865, -1, -1, -1, -1, 1,
1895 -1, 3, 4, 865, 854, 7, 8, 9, 10, 11,
1896 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1897 882, 23, -1, -1, 26, 27, 28, -1, -1, 31,
1898 32, 33, 34, 35, -1, -1, -1, -1, -1, 41,
1899 -1, -1, -1, 45, 46, 47, -1, -1, -1, -1,
1900 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1901 -1, -1, 64, 65, -1, -1, -1, -1, -1, -1,
1902 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1903 82, 83, 84, 85, 86, 87, 88, 89, 90, -1,
1904 -1, -1, -1, 1, 96, 3, 4, 99, -1, 7,
1905 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1906 18, 19, 20, 21, -1, 23, -1, -1, 26, 27,
1907 28, -1, -1, 31, 32, 33, 34, 35, -1, -1,
1908 -1, -1, -1, 41, -1, -1, -1, 45, 46, 47,
1909 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1910 -1, -1, -1, -1, -1, -1, 64, 65, -1, -1,
1911 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1912 -1, -1, -1, -1, 82, 83, 84, 85, 86, 87,
1913 88, 89, 90, -1, -1, -1, -1, 1, 96, 3,
1914 4, 99, -1, 7, 8, 9, 10, 11, 12, 13,
1915 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
1916 -1, -1, 26, 27, 28, -1, -1, 31, 32, 33,
1917 34, 35, -1, -1, -1, -1, -1, 41, -1, -1,
1918 -1, 45, -1, -1, -1, -1, -1, -1, -1, -1,
1919 -1, 55, -1, -1, -1, -1, -1, -1, -1, -1,
1920 64, 65, -1, -1, -1, -1, -1, -1, -1, -1,
1921 -1, -1, -1, -1, -1, -1, -1, -1, 82, 83,
1922 84, 85, 86, 87, 88, 89, 90, -1, -1, -1,
1923 1, -1, 3, 4, -1, 99, 7, 8, 9, 10,
1924 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1925 21, -1, 23, -1, -1, 26, 27, 28, -1, -1,
1926 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
1927 41, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1928 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1929 -1, -1, -1, 64, 65, -1, -1, -1, -1, -1,
1930 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1931 -1, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1932 -1, -1, -1, -1, 1, 96, 3, 4, 99, -1,
1933 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1934 17, 18, 19, 20, 21, -1, 23, -1, -1, 26,
1935 27, 28, -1, -1, 31, 32, 33, 34, 35, -1,
1936 -1, -1, -1, -1, 41, -1, -1, -1, -1, -1,
1937 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1938 -1, -1, -1, -1, -1, -1, -1, 64, 65, -1,
1939 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1940 -1, -1, -1, -1, -1, 82, 83, 84, 85, 86,
1941 87, 88, 89, 90, -1, -1, -1, -1, 1, 96,
1942 3, 4, 99, -1, 7, 8, 9, 10, 11, 12,
1943 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
1944 23, -1, -1, 26, 27, 28, -1, -1, 31, 32,
1945 33, 34, 35, -1, -1, 3, 4, -1, 41, 7,
1946 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1947 18, -1, -1, -1, -1, 23, -1, -1, 26, 27,
1948 -1, 64, 65, -1, -1, -1, -1, -1, -1, -1,
1949 -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
1950 83, 84, 85, 86, 87, 88, 89, 90, -1, -1,
1951 -1, -1, -1, 96, -1, -1, 99, -1, -1, -1,
1952 -1, -1, -1, -1, 0, 1, -1, -1, 4, 5,
1953 6, 7, -1, -1, 82, 83, 84, 85, 86, 87,
1954 88, 89, 90, -1, 20, 21, -1, 23, 3, -1,
1955 -1, 99, 28, 8, 9, 10, 11, 12, 13, 14,
1956 15, 16, 17, 18, 19, 41, 42, 43, 44, 24,
1957 25, 26, 27, -1, 50, 51, -1, -1, 54, -1,
1958 -1, 57, -1, -1, -1, -1, -1, -1, 64, 65,
1959 1, -1, 3, -1, -1, 71, 72, 8, 9, 10,
1960 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1961 21, -1, 23, 24, 25, 26, 27, -1, -1, 95,
1962 96, -1, -1, -1, -1, -1, -1, 82, 83, 84,
1963 85, 86, 87, 88, 89, 90, -1, -1, -1, -1,
1964 1, 96, -1, 4, 5, 6, 7, -1, -1, -1,
1965 -1, -1, -1, -1, -1, -1, -1, -1, -1, 20,
1966 21, -1, 23, -1, -1, -1, -1, 28, -1, -1,
1967 -1, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1968 41, 42, 43, 44, -1, 96, -1, -1, -1, 50,
1969 51, -1, -1, 54, -1, -1, 57, -1, -1, -1,
1970 -1, -1, 1, 64, 65, 4, 5, 6, 7, -1,
1971 71, 72, -1, -1, -1, -1, -1, -1, -1, -1,
1972 -1, 20, 21, -1, 23, -1, -1, 1, -1, 28,
1973 4, 5, 6, 7, 95, 96, -1, -1, -1, -1,
1974 -1, -1, 41, 42, 43, 44, 20, 21, -1, 23,
1975 -1, 50, 51, -1, 28, 54, -1, -1, 57, -1,
1976 -1, -1, -1, -1, -1, 64, 65, 41, 42, 43,
1977 44, -1, 71, 72, 73, -1, 50, 51, -1, -1,
1978 54, -1, -1, 57, -1, -1, -1, -1, -1, -1,
1979 64, 65, -1, -1, 3, -1, 95, 71, 72, 8,
1980 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1981 19, 20, 21, -1, 23, 24, 25, 26, 27, -1,
1982 1, 95, 3, 4, -1, -1, 7, 8, 9, 10,
1983 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1984 21, -1, 23, -1, -1, 26, 27, 28, -1, -1,
1985 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
1986 41, -1, -1, -1, 45, 46, 47, -1, -1, -1,
1987 -1, -1, -1, 82, 83, 84, 85, 86, 87, 88,
1988 89, 90, -1, 64, 65, -1, -1, 96, -1, -1,
1989 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1990 -1, 82, 83, 84, 85, 86, 87, 88, 89, 90,
1991 1, -1, 3, 4, -1, -1, 7, 8, 9, 10,
1992 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1993 21, -1, 23, -1, -1, 26, 27, 28, -1, -1,
1994 31, 32, 33, 34, 35, 1, -1, 3, -1, -1,
1995 41, -1, 8, 9, 10, 11, 12, 13, 14, 15,
1996 16, 17, 18, 19, 20, 21, -1, 23, 24, 25,
1997 26, 27, -1, 64, 65, -1, -1, -1, -1, -1,
1998 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1999 -1, 82, 83, 84, 85, 86, 87, 88, 89, 90,
2000 3, -1, -1, -1, -1, 8, 9, 10, 11, 12,
2001 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
2002 23, 24, 25, 26, 27, -1, 82, 83, 84, 85,
2003 86, 87, 88, 89, 90, 3, -1, -1, -1, -1,
2004 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
2005 18, 19, -1, -1, -1, -1, -1, -1, 26, 27,
2006 -1, -1, -1, -1, -1, -1, -1, 35, -1, -1,
2007 -1, -1, -1, -1, -1, -1, -1, -1, -1, 82,
2008 83, 84, 85, 86, 87, 88, 89, 90, 3, -1,
2009 -1, -1, -1, 8, 9, 10, 11, 12, 13, 14,
2010 15, 16, 17, 18, 19, -1, -1, -1, -1, -1,
2011 -1, 26, 27, -1, 82, 83, 84, 85, 86, 87,
2012 88, 89, 90, 3, -1, -1, -1, -1, 8, 9,
2013 10, 11, 12, 13, 14, 15, 16, 17, -1, -1,
2014 -1, -1, -1, -1, -1, -1, 26, 27, -1, -1,
2015 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2016 -1, -1, -1, -1, -1, -1, -1, 82, 83, 84,
2017 85, 86, 87, 88, 89, 90, 4, -1, 6, -1,
2018 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2019 -1, -1, 20, 21, -1, 23, 24, 25, -1, -1,
2020 28, -1, 82, 83, 84, 85, 86, 87, 88, 89,
2021 90, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2022 -1, -1, 50, -1, -1, -1, 54, -1, -1, -1,
2023 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2027 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2028 state STATE-NUM. */
2029 static const yytype_int16 yystos[] =
2031 0, 119, 120, 121, 0, 1, 4, 5, 6, 7,
2032 20, 21, 23, 28, 41, 42, 43, 44, 50, 51,
2033 54, 57, 64, 65, 71, 72, 95, 122, 123, 139,
2034 141, 145, 146, 158, 161, 162, 166, 168, 171, 172,
2035 173, 177, 181, 183, 187, 188, 213, 214, 232, 240,
2036 241, 249, 258, 278, 280, 291, 293, 315, 316, 317,
2037 363, 414, 415, 416, 417, 418, 422, 444, 446, 469,
2038 470, 471, 472, 473, 477, 478, 479, 482, 486, 494,
2039 507, 508, 138, 215, 140, 167, 250, 279, 292, 318,
2040 364, 3, 212, 266, 166, 54, 166, 181, 183, 54,
2041 173, 183, 184, 212, 212, 447, 3, 90, 208, 211,
2042 208, 495, 509, 212, 100, 142, 131, 147, 159, 97,
2043 97, 130, 102, 169, 163, 132, 174, 8, 9, 10,
2044 11, 12, 13, 14, 15, 16, 17, 18, 19, 24,
2045 25, 26, 27, 82, 83, 84, 85, 86, 87, 88,
2046 89, 169, 208, 253, 254, 255, 256, 257, 268, 269,
2047 270, 271, 272, 273, 274, 275, 276, 277, 278, 280,
2048 291, 293, 317, 326, 327, 330, 333, 336, 337, 340,
2049 341, 344, 128, 124, 122, 96, 242, 125, 281, 22,
2050 129, 126, 127, 133, 419, 134, 445, 135, 169, 480,
2051 480, 136, 137, 98, 511, 97, 17, 208, 219, 268,
2052 271, 272, 273, 274, 275, 337, 341, 208, 212, 251,
2053 253, 212, 212, 212, 212, 169, 212, 169, 178, 212,
2054 212, 423, 212, 209, 76, 90, 76, 3, 241, 98,
2055 98, 97, 4, 6, 20, 21, 23, 24, 25, 28,
2056 50, 54, 68, 487, 488, 490, 241, 504, 97, 49,
2057 185, 98, 97, 98, 8, 11, 8, 9, 100, 334,
2058 328, 182, 101, 101, 103, 100, 100, 97, 97, 208,
2059 97, 98, 294, 97, 97, 97, 97, 98, 97, 98,
2060 456, 97, 481, 474, 483, 97, 97, 512, 216, 252,
2061 319, 365, 98, 102, 425, 448, 211, 210, 496, 3,
2062 242, 233, 143, 219, 100, 3, 148, 489, 74, 75,
2063 76, 77, 78, 79, 80, 81, 93, 94, 108, 109,
2064 113, 114, 208, 220, 221, 222, 223, 224, 225, 226,
2065 227, 228, 229, 230, 506, 101, 170, 164, 175, 8,
2066 221, 231, 100, 100, 48, 186, 331, 338, 342, 243,
2067 282, 114, 420, 457, 186, 98, 98, 514, 212, 212,
2068 259, 262, 266, 267, 345, 98, 98, 179, 426, 424,
2069 102, 453, 211, 98, 510, 234, 120, 121, 3, 101,
2070 103, 229, 229, 229, 221, 105, 106, 107, 91, 92,
2071 108, 109, 110, 111, 112, 505, 160, 205, 208, 194,
2072 195, 189, 103, 335, 241, 205, 231, 231, 231, 114,
2073 244, 241, 284, 286, 295, 427, 459, 475, 484, 31,
2074 32, 61, 66, 69, 70, 352, 353, 358, 436, 438,
2075 439, 503, 513, 515, 217, 346, 260, 320, 366, 194,
2076 208, 186, 454, 449, 497, 425, 7, 99, 214, 219,
2077 235, 237, 238, 276, 317, 144, 101, 149, 490, 115,
2078 223, 224, 225, 226, 226, 227, 227, 228, 228, 228,
2079 103, 212, 206, 1, 33, 34, 165, 196, 214, 240,
2080 249, 352, 363, 368, 373, 414, 415, 45, 46, 47,
2081 176, 190, 192, 193, 196, 240, 375, 221, 241, 254,
2082 332, 339, 343, 211, 221, 245, 246, 248, 1, 253,
2083 287, 283, 285, 241, 52, 53, 62, 240, 352, 421,
2084 428, 436, 438, 441, 442, 443, 503, 45, 55, 196,
2085 458, 460, 463, 466, 194, 189, 354, 359, 19, 208,
2086 437, 59, 440, 208, 208, 518, 516, 517, 437, 519,
2087 99, 104, 241, 103, 241, 322, 325, 285, 180, 208,
2088 186, 499, 500, 236, 97, 212, 97, 99, 3, 98,
2089 241, 103, 204, 99, 200, 196, 197, 202, 201, 203,
2090 35, 208, 255, 337, 341, 374, 397, 198, 199, 376,
2091 99, 287, 190, 191, 101, 254, 329, 101, 101, 101,
2092 104, 115, 103, 247, 290, 288, 99, 286, 8, 208,
2093 268, 273, 274, 275, 300, 317, 208, 208, 208, 428,
2094 434, 99, 429, 430, 431, 432, 433, 435, 212, 212,
2095 99, 461, 462, 476, 485, 32, 397, 211, 3, 3,
2096 97, 97, 97, 211, 97, 218, 116, 347, 349, 261,
2097 3, 321, 323, 367, 99, 450, 498, 240, 352, 436,
2098 438, 501, 251, 30, 239, 150, 506, 207, 97, 97,
2099 97, 97, 97, 97, 369, 97, 97, 3, 97, 103,
2100 221, 211, 248, 97, 259, 296, 211, 211, 211, 97,
2101 97, 97, 97, 97, 97, 97, 464, 467, 97, 97,
2102 99, 99, 355, 360, 220, 350, 348, 262, 99, 103,
2103 99, 67, 99, 501, 502, 97, 97, 97, 221, 97,
2104 73, 123, 139, 152, 154, 155, 208, 3, 377, 241,
2105 247, 289, 115, 114, 379, 379, 397, 263, 266, 231,
2106 349, 324, 451, 97, 208, 151, 153, 97, 370, 379,
2107 254, 97, 297, 380, 381, 465, 468, 356, 361, 264,
2108 351, 325, 208, 156, 99, 154, 114, 388, 378, 98,
2109 115, 36, 382, 385, 39, 399, 399, 263, 56, 402,
2110 103, 117, 452, 100, 389, 390, 371, 399, 298, 386,
2111 115, 383, 400, 357, 403, 362, 265, 60, 455, 3,
2112 491, 493, 115, 36, 37, 38, 391, 394, 398, 399,
2113 1, 29, 30, 301, 303, 307, 309, 397, 103, 114,
2114 399, 114, 63, 405, 266, 208, 101, 492, 115, 392,
2115 395, 372, 306, 311, 310, 299, 302, 304, 308, 387,
2116 384, 401, 404, 406, 157, 103, 103, 397, 40, 408,
2117 97, 221, 102, 99, 303, 241, 309, 262, 385, 205,
2118 205, 114, 212, 493, 393, 396, 409, 312, 253, 313,
2119 115, 115, 407, 394, 262, 114, 102, 314, 305, 205,
2120 410, 262, 97, 115, 76, 411, 412, 115, 103, 413,
2124 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
2125 static const yytype_int16 yyr1[] =
2127 0, 118, 119, 120, 120, 121, 121, 122, 122, 122,
2128 124, 123, 125, 123, 126, 123, 127, 123, 128, 123,
2129 129, 123, 130, 123, 131, 123, 132, 123, 133, 123,
2130 134, 123, 135, 123, 136, 123, 137, 123, 138, 123,
2131 140, 139, 142, 143, 144, 141, 145, 147, 148, 149,
2132 150, 151, 146, 152, 153, 153, 154, 154, 156, 157,
2133 155, 159, 160, 158, 161, 161, 163, 164, 165, 162,
2134 167, 166, 168, 168, 168, 170, 169, 169, 171, 171,
2135 171, 171, 172, 172, 174, 175, 176, 173, 178, 179,
2136 180, 177, 182, 181, 184, 183, 185, 185, 186, 186,
2137 187, 187, 188, 189, 189, 189, 190, 190, 191, 190,
2138 192, 192, 193, 194, 194, 195, 195, 197, 196, 198,
2139 196, 199, 196, 200, 196, 201, 196, 202, 196, 203,
2140 196, 204, 196, 205, 207, 206, 206, 208, 209, 208,
2141 210, 208, 211, 212, 213, 213, 213, 215, 216, 217,
2142 218, 214, 219, 219, 219, 219, 219, 219, 219, 219,
2143 219, 220, 221, 222, 222, 223, 223, 224, 224, 225,
2144 225, 225, 226, 226, 226, 227, 227, 227, 227, 228,
2145 228, 228, 228, 229, 229, 229, 230, 230, 230, 230,
2146 230, 230, 230, 230, 230, 230, 231, 233, 232, 234,
2147 234, 235, 235, 235, 236, 235, 237, 237, 238, 239,
2148 239, 240, 241, 241, 243, 242, 244, 244, 245, 245,
2149 246, 247, 247, 248, 250, 249, 249, 249, 249, 249,
2150 249, 252, 251, 253, 253, 254, 254, 254, 255, 255,
2151 255, 255, 255, 255, 255, 255, 256, 256, 256, 256,
2152 256, 257, 257, 257, 258, 258, 259, 261, 260, 260,
2153 262, 262, 263, 265, 264, 264, 266, 267, 268, 268,
2154 269, 269, 269, 269, 269, 269, 269, 270, 270, 270,
2155 270, 270, 270, 270, 271, 271, 271, 272, 273, 273,
2156 274, 275, 276, 277, 279, 278, 281, 282, 283, 280,
2157 284, 285, 285, 286, 288, 289, 287, 290, 287, 292,
2158 291, 294, 295, 296, 297, 298, 299, 293, 300, 300,
2159 300, 300, 300, 300, 301, 302, 302, 304, 305, 303,
2160 306, 303, 307, 308, 308, 310, 309, 311, 312, 309,
2161 314, 313, 315, 316, 318, 319, 320, 321, 317, 322,
2162 324, 323, 323, 325, 326, 328, 329, 327, 331, 332,
2163 330, 330, 334, 335, 333, 336, 338, 339, 337, 337,
2164 340, 342, 343, 341, 341, 344, 346, 345, 347, 348,
2165 348, 350, 351, 349, 352, 352, 354, 355, 356, 357,
2166 353, 359, 360, 361, 362, 358, 364, 365, 366, 367,
2167 363, 369, 370, 371, 372, 368, 373, 373, 373, 374,
2168 374, 376, 377, 378, 375, 380, 379, 381, 379, 382,
2169 384, 383, 383, 386, 387, 385, 389, 388, 390, 388,
2170 391, 393, 392, 392, 395, 396, 394, 397, 397, 397,
2171 397, 398, 398, 398, 400, 401, 399, 399, 403, 404,
2172 402, 402, 406, 407, 405, 405, 409, 410, 408, 408,
2173 411, 413, 412, 412, 414, 415, 416, 416, 417, 419,
2174 420, 421, 418, 423, 424, 422, 426, 425, 425, 427,
2175 427, 427, 429, 428, 430, 428, 431, 428, 432, 428,
2176 433, 428, 434, 428, 435, 428, 436, 437, 437, 438,
2177 439, 440, 440, 441, 442, 443, 445, 444, 447, 448,
2178 449, 450, 451, 452, 446, 454, 453, 453, 455, 455,
2179 457, 458, 456, 459, 459, 460, 461, 460, 462, 460,
2180 464, 465, 463, 467, 468, 466, 469, 469, 469, 470,
2181 470, 471, 472, 474, 475, 476, 473, 477, 478, 479,
2182 481, 480, 483, 484, 485, 482, 486, 486, 487, 487,
2183 487, 487, 487, 487, 487, 487, 487, 487, 487, 488,
2184 489, 489, 490, 490, 491, 492, 492, 493, 495, 496,
2185 497, 498, 494, 499, 499, 500, 500, 501, 501, 502,
2186 501, 503, 503, 504, 505, 505, 506, 507, 509, 510,
2187 508, 512, 513, 511, 514, 514, 516, 515, 517, 515,
2188 518, 515, 519, 515
2191 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
2192 static const yytype_int8 yyr2[] =
2194 0, 2, 1, 1, 0, 3, 2, 1, 2, 2,
2195 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2196 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2197 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2198 0, 3, 0, 0, 0, 7, 2, 0, 0, 0,
2199 0, 0, 11, 2, 2, 0, 1, 2, 0, 0,
2200 8, 0, 0, 6, 1, 1, 0, 0, 0, 7,
2201 0, 3, 2, 3, 3, 0, 4, 0, 1, 1,
2202 1, 1, 2, 1, 0, 0, 0, 7, 0, 0,
2203 0, 8, 0, 4, 0, 3, 1, 0, 2, 0,
2204 2, 1, 2, 3, 2, 0, 1, 1, 0, 3,
2205 1, 1, 2, 1, 0, 3, 2, 0, 3, 0,
2206 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
2207 3, 0, 3, 2, 0, 4, 0, 1, 0, 3,
2208 0, 4, 1, 1, 1, 2, 2, 0, 0, 0,
2209 0, 9, 1, 1, 1, 1, 1, 1, 1, 1,
2210 1, 1, 1, 1, 3, 1, 3, 1, 3, 1,
2211 3, 3, 1, 3, 3, 1, 3, 3, 3, 1,
2212 2, 2, 2, 1, 1, 3, 1, 1, 1, 1,
2213 1, 1, 1, 1, 1, 1, 1, 0, 6, 2,
2214 0, 1, 2, 2, 0, 4, 1, 1, 4, 2,
2215 0, 2, 2, 0, 0, 4, 3, 0, 1, 1,
2216 2, 3, 0, 3, 0, 3, 1, 1, 1, 2,
2217 1, 0, 3, 1, 1, 1, 1, 1, 1, 1,
2218 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2219 1, 1, 1, 1, 1, 1, 2, 0, 4, 0,
2220 1, 1, 2, 0, 4, 0, 1, 1, 1, 1,
2221 1, 2, 1, 1, 1, 1, 1, 2, 3, 2,
2222 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
2223 1, 1, 1, 1, 0, 3, 0, 0, 0, 7,
2224 2, 2, 0, 2, 0, 0, 5, 0, 3, 0,
2225 3, 0, 0, 0, 0, 0, 0, 15, 1, 1,
2226 1, 1, 1, 1, 2, 2, 0, 0, 0, 6,
2227 0, 3, 2, 2, 0, 0, 3, 0, 0, 5,
2228 0, 3, 1, 1, 0, 0, 0, 0, 9, 2,
2229 0, 4, 0, 2, 2, 0, 0, 9, 0, 0,
2230 6, 2, 0, 0, 6, 6, 0, 0, 6, 1,
2231 1, 0, 0, 6, 1, 1, 0, 4, 2, 2,
2232 0, 0, 0, 5, 1, 1, 0, 0, 0, 0,
2233 9, 0, 0, 0, 0, 9, 0, 0, 0, 0,
2234 9, 0, 0, 0, 0, 10, 1, 1, 0, 1,
2235 1, 0, 0, 0, 7, 0, 3, 0, 4, 2,
2236 0, 4, 0, 0, 0, 5, 0, 3, 0, 4,
2237 2, 0, 4, 0, 0, 0, 5, 1, 1, 1,
2238 1, 1, 1, 1, 0, 0, 6, 0, 0, 0,
2239 6, 0, 0, 0, 6, 0, 0, 0, 6, 0,
2240 2, 0, 4, 0, 3, 3, 1, 1, 2, 0,
2241 0, 0, 7, 0, 0, 6, 0, 3, 0, 3,
2242 2, 0, 0, 3, 0, 3, 0, 3, 0, 3,
2243 0, 3, 0, 3, 0, 3, 3, 1, 1, 3,
2244 2, 1, 0, 3, 3, 3, 0, 3, 0, 0,
2245 0, 0, 0, 0, 13, 0, 3, 0, 2, 0,
2246 0, 0, 5, 2, 0, 1, 0, 3, 0, 3,
2247 0, 0, 6, 0, 0, 6, 1, 1, 1, 1,
2248 1, 2, 3, 0, 0, 0, 8, 3, 3, 2,
2249 0, 3, 0, 0, 0, 8, 1, 1, 1, 1,
2250 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
2251 3, 0, 2, 5, 2, 3, 0, 1, 0, 0,
2252 0, 0, 9, 3, 2, 1, 0, 2, 2, 0,
2253 3, 3, 3, 3, 4, 0, 1, 2, 0, 0,
2254 6, 0, 0, 5, 2, 0, 0, 3, 0, 3,
2255 0, 3, 0, 3
2259 enum { YYENOMEM = -2 };
2261 #define yyerrok (yyerrstatus = 0)
2262 #define yyclearin (yychar = YYEMPTY)
2264 #define YYACCEPT goto yyacceptlab
2265 #define YYABORT goto yyabortlab
2266 #define YYERROR goto yyerrorlab
2267 #define YYNOMEM goto yyexhaustedlab
2270 #define YYRECOVERING() (!!yyerrstatus)
2272 #define YYBACKUP(Token, Value) \
2273 do \
2274 if (yychar == YYEMPTY) \
2276 yychar = (Token); \
2277 yylval = (Value); \
2278 YYPOPSTACK (yylen); \
2279 yystate = *yyssp; \
2280 goto yybackup; \
2282 else \
2284 yyerror (YY_("syntax error: cannot back up")); \
2285 YYERROR; \
2287 while (0)
2289 /* Backward compatibility with an undocumented macro.
2290 Use YYerror or YYUNDEF. */
2291 #define YYERRCODE YYUNDEF
2294 /* Enable debugging if requested. */
2295 #if YYDEBUG
2297 # ifndef YYFPRINTF
2298 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2299 # define YYFPRINTF fprintf
2300 # endif
2302 # define YYDPRINTF(Args) \
2303 do { \
2304 if (yydebug) \
2305 YYFPRINTF Args; \
2306 } while (0)
2311 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
2312 do { \
2313 if (yydebug) \
2315 YYFPRINTF (stderr, "%s ", Title); \
2316 yy_symbol_print (stderr, \
2317 Kind, Value); \
2318 YYFPRINTF (stderr, "\n"); \
2320 } while (0)
2323 /*-----------------------------------.
2324 | Print this symbol's value on YYO. |
2325 `-----------------------------------*/
2327 static void
2328 yy_symbol_value_print (FILE *yyo,
2329 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
2331 FILE *yyoutput = yyo;
2332 YY_USE (yyoutput);
2333 if (!yyvaluep)
2334 return;
2335 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2336 YY_USE (yykind);
2337 YY_IGNORE_MAYBE_UNINITIALIZED_END
2341 /*---------------------------.
2342 | Print this symbol on YYO. |
2343 `---------------------------*/
2345 static void
2346 yy_symbol_print (FILE *yyo,
2347 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
2349 YYFPRINTF (yyo, "%s %s (",
2350 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
2352 yy_symbol_value_print (yyo, yykind, yyvaluep);
2353 YYFPRINTF (yyo, ")");
2356 /*------------------------------------------------------------------.
2357 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2358 | TOP (included). |
2359 `------------------------------------------------------------------*/
2361 static void
2362 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
2364 YYFPRINTF (stderr, "Stack now");
2365 for (; yybottom <= yytop; yybottom++)
2367 int yybot = *yybottom;
2368 YYFPRINTF (stderr, " %d", yybot);
2370 YYFPRINTF (stderr, "\n");
2373 # define YY_STACK_PRINT(Bottom, Top) \
2374 do { \
2375 if (yydebug) \
2376 yy_stack_print ((Bottom), (Top)); \
2377 } while (0)
2380 /*------------------------------------------------.
2381 | Report that the YYRULE is going to be reduced. |
2382 `------------------------------------------------*/
2384 static void
2385 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
2386 int yyrule)
2388 int yylno = yyrline[yyrule];
2389 int yynrhs = yyr2[yyrule];
2390 int yyi;
2391 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
2392 yyrule - 1, yylno);
2393 /* The symbols being reduced. */
2394 for (yyi = 0; yyi < yynrhs; yyi++)
2396 YYFPRINTF (stderr, " $%d = ", yyi + 1);
2397 yy_symbol_print (stderr,
2398 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
2399 &yyvsp[(yyi + 1) - (yynrhs)]);
2400 YYFPRINTF (stderr, "\n");
2404 # define YY_REDUCE_PRINT(Rule) \
2405 do { \
2406 if (yydebug) \
2407 yy_reduce_print (yyssp, yyvsp, Rule); \
2408 } while (0)
2410 /* Nonzero means print parse trace. It is left uninitialized so that
2411 multiple parsers can coexist. */
2412 int yydebug;
2413 #else /* !YYDEBUG */
2414 # define YYDPRINTF(Args) ((void) 0)
2415 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
2416 # define YY_STACK_PRINT(Bottom, Top)
2417 # define YY_REDUCE_PRINT(Rule)
2418 #endif /* !YYDEBUG */
2421 /* YYINITDEPTH -- initial size of the parser's stacks. */
2422 #ifndef YYINITDEPTH
2423 # define YYINITDEPTH 200
2424 #endif
2426 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2427 if the built-in stack extension method is used).
2429 Do not make this value too large; the results are undefined if
2430 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2431 evaluated with infinite-precision integer arithmetic. */
2433 #ifndef YYMAXDEPTH
2434 # define YYMAXDEPTH 10000
2435 #endif
2442 /*-----------------------------------------------.
2443 | Release the memory associated to this symbol. |
2444 `-----------------------------------------------*/
2446 static void
2447 yydestruct (const char *yymsg,
2448 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
2450 YY_USE (yyvaluep);
2451 if (!yymsg)
2452 yymsg = "Deleting";
2453 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2455 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2456 YY_USE (yykind);
2457 YY_IGNORE_MAYBE_UNINITIALIZED_END
2461 /* Lookahead token kind. */
2462 int yychar;
2464 /* The semantic value of the lookahead symbol. */
2465 YYSTYPE yylval;
2466 /* Number of syntax errors so far. */
2467 int yynerrs;
2472 /*----------.
2473 | yyparse. |
2474 `----------*/
2477 yyparse (void)
2479 yy_state_fast_t yystate = 0;
2480 /* Number of tokens to shift before error messages enabled. */
2481 int yyerrstatus = 0;
2483 /* Refer to the stacks through separate pointers, to allow yyoverflow
2484 to reallocate them elsewhere. */
2486 /* Their size. */
2487 YYPTRDIFF_T yystacksize = YYINITDEPTH;
2489 /* The state stack: array, bottom, top. */
2490 yy_state_t yyssa[YYINITDEPTH];
2491 yy_state_t *yyss = yyssa;
2492 yy_state_t *yyssp = yyss;
2494 /* The semantic value stack: array, bottom, top. */
2495 YYSTYPE yyvsa[YYINITDEPTH];
2496 YYSTYPE *yyvs = yyvsa;
2497 YYSTYPE *yyvsp = yyvs;
2499 int yyn;
2500 /* The return value of yyparse. */
2501 int yyresult;
2502 /* Lookahead symbol kind. */
2503 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
2504 /* The variables used to return semantic value and location from the
2505 action routines. */
2506 YYSTYPE yyval;
2510 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2512 /* The number of symbols on the RHS of the reduced rule.
2513 Keep to zero when no symbol should be popped. */
2514 int yylen = 0;
2516 YYDPRINTF ((stderr, "Starting parse\n"));
2518 yychar = YYEMPTY; /* Cause a token to be read. */
2520 goto yysetstate;
2523 /*------------------------------------------------------------.
2524 | yynewstate -- push a new state, which is found in yystate. |
2525 `------------------------------------------------------------*/
2526 yynewstate:
2527 /* In all cases, when you get here, the value and location stacks
2528 have just been pushed. So pushing a state here evens the stacks. */
2529 yyssp++;
2532 /*--------------------------------------------------------------------.
2533 | yysetstate -- set current state (the top of the stack) to yystate. |
2534 `--------------------------------------------------------------------*/
2535 yysetstate:
2536 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2537 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
2538 YY_IGNORE_USELESS_CAST_BEGIN
2539 *yyssp = YY_CAST (yy_state_t, yystate);
2540 YY_IGNORE_USELESS_CAST_END
2541 YY_STACK_PRINT (yyss, yyssp);
2543 if (yyss + yystacksize - 1 <= yyssp)
2544 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
2545 YYNOMEM;
2546 #else
2548 /* Get the current used size of the three stacks, in elements. */
2549 YYPTRDIFF_T yysize = yyssp - yyss + 1;
2551 # if defined yyoverflow
2553 /* Give user a chance to reallocate the stack. Use copies of
2554 these so that the &'s don't force the real ones into
2555 memory. */
2556 yy_state_t *yyss1 = yyss;
2557 YYSTYPE *yyvs1 = yyvs;
2559 /* Each stack pointer address is followed by the size of the
2560 data in use in that stack, in bytes. This used to be a
2561 conditional around just the two extra args, but that might
2562 be undefined if yyoverflow is a macro. */
2563 yyoverflow (YY_("memory exhausted"),
2564 &yyss1, yysize * YYSIZEOF (*yyssp),
2565 &yyvs1, yysize * YYSIZEOF (*yyvsp),
2566 &yystacksize);
2567 yyss = yyss1;
2568 yyvs = yyvs1;
2570 # else /* defined YYSTACK_RELOCATE */
2571 /* Extend the stack our own way. */
2572 if (YYMAXDEPTH <= yystacksize)
2573 YYNOMEM;
2574 yystacksize *= 2;
2575 if (YYMAXDEPTH < yystacksize)
2576 yystacksize = YYMAXDEPTH;
2579 yy_state_t *yyss1 = yyss;
2580 union yyalloc *yyptr =
2581 YY_CAST (union yyalloc *,
2582 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
2583 if (! yyptr)
2584 YYNOMEM;
2585 YYSTACK_RELOCATE (yyss_alloc, yyss);
2586 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2587 # undef YYSTACK_RELOCATE
2588 if (yyss1 != yyssa)
2589 YYSTACK_FREE (yyss1);
2591 # endif
2593 yyssp = yyss + yysize - 1;
2594 yyvsp = yyvs + yysize - 1;
2596 YY_IGNORE_USELESS_CAST_BEGIN
2597 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
2598 YY_CAST (long, yystacksize)));
2599 YY_IGNORE_USELESS_CAST_END
2601 if (yyss + yystacksize - 1 <= yyssp)
2602 YYABORT;
2604 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
2607 if (yystate == YYFINAL)
2608 YYACCEPT;
2610 goto yybackup;
2613 /*-----------.
2614 | yybackup. |
2615 `-----------*/
2616 yybackup:
2617 /* Do appropriate processing given the current state. Read a
2618 lookahead token if we need one and don't already have one. */
2620 /* First try to decide what to do without reference to lookahead token. */
2621 yyn = yypact[yystate];
2622 if (yypact_value_is_default (yyn))
2623 goto yydefault;
2625 /* Not known => get a lookahead token if don't already have one. */
2627 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
2628 if (yychar == YYEMPTY)
2630 YYDPRINTF ((stderr, "Reading a token\n"));
2631 yychar = yylex ();
2634 if (yychar <= YYEOF)
2636 yychar = YYEOF;
2637 yytoken = YYSYMBOL_YYEOF;
2638 YYDPRINTF ((stderr, "Now at end of input.\n"));
2640 else if (yychar == YYerror)
2642 /* The scanner already issued an error message, process directly
2643 to error recovery. But do not keep the error token as
2644 lookahead, it is too special and may lead us to an endless
2645 loop in error recovery. */
2646 yychar = YYUNDEF;
2647 yytoken = YYSYMBOL_YYerror;
2648 goto yyerrlab1;
2650 else
2652 yytoken = YYTRANSLATE (yychar);
2653 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2656 /* If the proper action on seeing token YYTOKEN is to reduce or to
2657 detect an error, take that action. */
2658 yyn += yytoken;
2659 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2660 goto yydefault;
2661 yyn = yytable[yyn];
2662 if (yyn <= 0)
2664 if (yytable_value_is_error (yyn))
2665 goto yyerrlab;
2666 yyn = -yyn;
2667 goto yyreduce;
2670 /* Count tokens shifted since error; after three, turn off error
2671 status. */
2672 if (yyerrstatus)
2673 yyerrstatus--;
2675 /* Shift the lookahead token. */
2676 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2677 yystate = yyn;
2678 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2679 *++yyvsp = yylval;
2680 YY_IGNORE_MAYBE_UNINITIALIZED_END
2682 /* Discard the shifted token. */
2683 yychar = YYEMPTY;
2684 goto yynewstate;
2687 /*-----------------------------------------------------------.
2688 | yydefault -- do the default action for the current state. |
2689 `-----------------------------------------------------------*/
2690 yydefault:
2691 yyn = yydefact[yystate];
2692 if (yyn == 0)
2693 goto yyerrlab;
2694 goto yyreduce;
2697 /*-----------------------------.
2698 | yyreduce -- do a reduction. |
2699 `-----------------------------*/
2700 yyreduce:
2701 /* yyn is the number of a rule to reduce with. */
2702 yylen = yyr2[yyn];
2704 /* If YYLEN is nonzero, implement the default value of the action:
2705 '$$ = $1'.
2707 Otherwise, the following line sets YYVAL to garbage.
2708 This behavior is undocumented and Bison
2709 users should not rely upon it. Assigning to YYVAL
2710 unconditionally makes the parser a bit smaller, and it avoids a
2711 GCC warning that YYVAL may be used uninitialized. */
2712 yyval = yyvsp[1-yylen];
2715 YY_REDUCE_PRINT (yyn);
2716 switch (yyn)
2718 case 5: /* at_least_one_definition: definitions at_least_one_annotation definition */
2719 #line 432 "fe/idl.ypp"
2721 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
2722 AST_Decl *&node = (yyvsp[0].dcval);
2723 if (node)
2725 node->annotation_appls (*annotations);
2727 else
2729 idl_global->err ()-> unsupported_warning (
2730 "Annotating this is not supported");
2732 delete annotations;
2734 #line 2747 "fe/idl.tab.cpp"
2735 break;
2737 case 10: /* $@1: %empty */
2738 #line 457 "fe/idl.ypp"
2740 idl_global->set_parse_state (IDL_GlobalData::PS_AnnotationDeclSeen);
2742 #line 2755 "fe/idl.tab.cpp"
2743 break;
2745 case 11: /* fixed_definition: annotation_dcl $@1 ';' */
2746 #line 461 "fe/idl.ypp"
2748 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2750 #line 2763 "fe/idl.tab.cpp"
2751 break;
2753 case 12: /* $@2: %empty */
2754 #line 465 "fe/idl.ypp"
2756 idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
2758 #line 2771 "fe/idl.tab.cpp"
2759 break;
2761 case 13: /* fixed_definition: type_dcl $@2 ';' */
2762 #line 469 "fe/idl.ypp"
2764 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2766 #line 2779 "fe/idl.tab.cpp"
2767 break;
2769 case 14: /* $@3: %empty */
2770 #line 473 "fe/idl.ypp"
2772 idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
2774 #line 2787 "fe/idl.tab.cpp"
2775 break;
2777 case 15: /* fixed_definition: typeid_dcl $@3 ';' */
2778 #line 477 "fe/idl.ypp"
2780 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2782 #line 2795 "fe/idl.tab.cpp"
2783 break;
2785 case 16: /* $@4: %empty */
2786 #line 481 "fe/idl.ypp"
2788 idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
2790 #line 2803 "fe/idl.tab.cpp"
2791 break;
2793 case 17: /* fixed_definition: typeprefix_dcl $@4 ';' */
2794 #line 485 "fe/idl.ypp"
2796 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2798 #line 2811 "fe/idl.tab.cpp"
2799 break;
2801 case 18: /* $@5: %empty */
2802 #line 489 "fe/idl.ypp"
2804 idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
2806 #line 2819 "fe/idl.tab.cpp"
2807 break;
2809 case 19: /* fixed_definition: const_dcl $@5 ';' */
2810 #line 493 "fe/idl.ypp"
2812 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2814 #line 2827 "fe/idl.tab.cpp"
2815 break;
2817 case 20: /* $@6: %empty */
2818 #line 497 "fe/idl.ypp"
2820 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
2822 #line 2835 "fe/idl.tab.cpp"
2823 break;
2825 case 21: /* fixed_definition: exception $@6 ';' */
2826 #line 501 "fe/idl.ypp"
2828 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2830 #line 2843 "fe/idl.tab.cpp"
2831 break;
2833 case 22: /* $@7: %empty */
2834 #line 505 "fe/idl.ypp"
2836 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
2838 #line 2851 "fe/idl.tab.cpp"
2839 break;
2841 case 23: /* fixed_definition: interface_def $@7 ';' */
2842 #line 509 "fe/idl.ypp"
2844 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2846 #line 2859 "fe/idl.tab.cpp"
2847 break;
2849 case 24: /* $@8: %empty */
2850 #line 513 "fe/idl.ypp"
2852 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
2854 #line 2867 "fe/idl.tab.cpp"
2855 break;
2857 case 25: /* fixed_definition: module $@8 ';' */
2858 #line 517 "fe/idl.ypp"
2860 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2862 #line 2875 "fe/idl.tab.cpp"
2863 break;
2865 case 26: /* $@9: %empty */
2866 #line 521 "fe/idl.ypp"
2868 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeDeclSeen);
2870 #line 2883 "fe/idl.tab.cpp"
2871 break;
2873 case 27: /* fixed_definition: value_def $@9 ';' */
2874 #line 525 "fe/idl.ypp"
2876 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2878 #line 2891 "fe/idl.tab.cpp"
2879 break;
2881 case 28: /* $@10: %empty */
2882 #line 529 "fe/idl.ypp"
2884 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentDeclSeen);
2886 #line 2899 "fe/idl.tab.cpp"
2887 break;
2889 case 29: /* fixed_definition: component $@10 ';' */
2890 #line 533 "fe/idl.ypp"
2892 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2894 #line 2907 "fe/idl.tab.cpp"
2895 break;
2897 case 30: /* $@11: %empty */
2898 #line 537 "fe/idl.ypp"
2900 idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
2902 #line 2915 "fe/idl.tab.cpp"
2903 break;
2905 case 31: /* fixed_definition: home_decl $@11 ';' */
2906 #line 541 "fe/idl.ypp"
2908 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2910 #line 2923 "fe/idl.tab.cpp"
2911 break;
2913 case 32: /* $@12: %empty */
2914 #line 545 "fe/idl.ypp"
2916 idl_global->set_parse_state (IDL_GlobalData::PS_EventDeclSeen);
2918 #line 2931 "fe/idl.tab.cpp"
2919 break;
2921 case 33: /* fixed_definition: event $@12 ';' */
2922 #line 549 "fe/idl.ypp"
2924 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2926 #line 2939 "fe/idl.tab.cpp"
2927 break;
2929 case 34: /* $@13: %empty */
2930 #line 553 "fe/idl.ypp"
2932 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeDeclSeen);
2934 #line 2947 "fe/idl.tab.cpp"
2935 break;
2937 case 35: /* fixed_definition: porttype_decl $@13 ';' */
2938 #line 557 "fe/idl.ypp"
2940 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2942 #line 2955 "fe/idl.tab.cpp"
2943 break;
2945 case 36: /* $@14: %empty */
2946 #line 561 "fe/idl.ypp"
2948 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorDeclSeen);
2950 #line 2963 "fe/idl.tab.cpp"
2951 break;
2953 case 37: /* fixed_definition: connector_decl $@14 ';' */
2954 #line 565 "fe/idl.ypp"
2956 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2958 #line 2971 "fe/idl.tab.cpp"
2959 break;
2961 case 38: /* $@15: %empty */
2962 #line 569 "fe/idl.ypp"
2964 idl_global->err ()->syntax_error (idl_global->parse_state ());
2966 #line 2979 "fe/idl.tab.cpp"
2967 break;
2969 case 39: /* fixed_definition: error $@15 ';' */
2970 #line 573 "fe/idl.ypp"
2972 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2973 yyerrok;
2974 (yyval.dcval) = 0;
2976 #line 2989 "fe/idl.tab.cpp"
2977 break;
2979 case 40: /* $@16: %empty */
2980 #line 582 "fe/idl.ypp"
2982 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
2984 #line 2997 "fe/idl.tab.cpp"
2985 break;
2987 case 41: /* module_header: IDL_MODULE $@16 scoped_name */
2988 #line 586 "fe/idl.ypp"
2990 (yyval.idlist) = (yyvsp[0].idlist);
2992 #line 3005 "fe/idl.tab.cpp"
2993 break;
2995 case 42: /* @17: %empty */
2996 #line 593 "fe/idl.ypp"
2998 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
3000 // The module_header rule is common to template module, fixed
3001 // module and instantiated template module. In the last
3002 // case, a fully scoped name is allowed, but here we
3003 // allow only an identifier (a scoped name of length
3004 // 1). If not satisfied, we output a parse error with
3005 // the appropriate message.
3006 if ((yyvsp[0].idlist)->length () != 1)
3008 idl_global->err ()->syntax_error (
3009 IDL_GlobalData::PS_ModuleIDSeen);
3012 AST_Module *m = 0;
3013 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3016 * Make a new module and add it to the enclosing scope
3018 if (s != 0)
3020 m = idl_global->gen ()->create_module (s, (yyvsp[0].idlist));
3021 (void) s->fe_add_module (m);
3024 (yyvsp[0].idlist)->destroy ();
3025 delete (yyvsp[0].idlist);
3026 (yyvsp[0].idlist) = 0;
3029 * Push it on the stack
3031 idl_global->scopes ().push (m);
3033 (yyval.dcval) = m;
3035 #line 3048 "fe/idl.tab.cpp"
3036 break;
3038 case 43: /* $@18: %empty */
3039 #line 632 "fe/idl.ypp"
3041 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
3043 #line 3056 "fe/idl.tab.cpp"
3044 break;
3046 case 44: /* $@19: %empty */
3047 #line 636 "fe/idl.ypp"
3049 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleBodySeen);
3051 #line 3064 "fe/idl.tab.cpp"
3052 break;
3054 case 45: /* module: module_header @17 '{' $@18 at_least_one_definition $@19 '}' */
3055 #line 640 "fe/idl.ypp"
3057 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleQsSeen);
3059 * Finished with this module - pop it from the scope stack.
3062 idl_global->scopes ().pop ();
3063 (yyval.dcval) = (yyvsp[-5].dcval);
3065 #line 3078 "fe/idl.tab.cpp"
3066 break;
3068 case 46: /* template_module_header: module_header '<' */
3069 #line 653 "fe/idl.ypp"
3071 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleIDSeen);
3073 #line 3086 "fe/idl.tab.cpp"
3074 break;
3076 case 47: /* $@20: %empty */
3077 #line 660 "fe/idl.ypp"
3079 // The module_header rule is common to template module, fixed
3080 // module and instantiated template module. In the last
3081 // case, a fully scoped name is allowed, but here we
3082 // allow only an identifier (a scoped name of length
3083 // 1). If not satisfied, we output a syntax error with
3084 // the appropriate message.
3085 if ((yyvsp[0].idlist)->length () != 1)
3087 idl_global->err ()->syntax_error (
3088 IDL_GlobalData::PS_ModuleIDSeen);
3091 #line 3104 "fe/idl.tab.cpp"
3092 break;
3094 case 48: /* $@21: %empty */
3095 #line 674 "fe/idl.ypp"
3097 if (FE_Utils::duplicate_param_id ((yyvsp[0].plval)))
3099 idl_global->err ()->duplicate_param_id (
3100 (yyvsp[-2].idlist));
3102 return 1;
3105 #line 3118 "fe/idl.tab.cpp"
3106 break;
3108 case 49: /* $@22: %empty */
3109 #line 684 "fe/idl.ypp"
3111 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleParamsSeen);
3113 AST_Template_Module *tm =
3114 idl_global->gen ()->create_template_module ((yyvsp[-4].idlist),
3115 (yyvsp[-2].plval));
3117 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3118 AST_Module *m = s->fe_add_module (tm);
3120 // We've probably tried to reopen a template module,
3121 // going further will cause a crash.
3122 if (m == 0)
3124 return 1;
3128 * Push it on the stack
3130 idl_global->scopes ().push (tm);
3132 // Contained items not part of an alias will get flag set.
3133 idl_global->in_tmpl_mod_no_alias (true);
3135 // Store these for reference as we parse the scope
3136 // of the template module.
3137 idl_global->current_params ((yyvsp[-2].plval));
3139 #line 3152 "fe/idl.tab.cpp"
3140 break;
3142 case 50: /* $@23: %empty */
3143 #line 714 "fe/idl.ypp"
3145 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleSqSeen);
3147 #line 3160 "fe/idl.tab.cpp"
3148 break;
3150 case 51: /* $@24: %empty */
3151 #line 718 "fe/idl.ypp"
3153 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleBodySeen);
3155 #line 3168 "fe/idl.tab.cpp"
3156 break;
3158 case 52: /* template_module: template_module_header $@20 at_least_one_formal_parameter $@21 '>' $@22 '{' $@23 at_least_one_tpl_definition $@24 '}' */
3159 #line 722 "fe/idl.ypp"
3161 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleQsSeen);
3164 * Finished with this module - pop it from the scope stack.
3166 idl_global->scopes ().pop ();
3168 // Unset the flag, the no_alias version because any scope
3169 // traversal triggered by an alias would have ended by now.
3170 idl_global->in_tmpl_mod_no_alias (false);
3172 // Clear the pointer so scoped name lookup will know
3173 // that we are no longer in a template module scope.
3174 idl_global->current_params (0);
3176 (yyval.dcval) = 0;
3178 #line 3191 "fe/idl.tab.cpp"
3179 break;
3181 case 58: /* $@25: %empty */
3182 #line 758 "fe/idl.ypp"
3184 idl_global->set_parse_state (
3185 IDL_GlobalData::PS_ModuleRefSeen);
3187 #line 3200 "fe/idl.tab.cpp"
3188 break;
3190 case 59: /* $@26: %empty */
3191 #line 763 "fe/idl.ypp"
3193 idl_global->set_parse_state (
3194 IDL_GlobalData::PS_ModuleRefParamsSeen);
3196 #line 3209 "fe/idl.tab.cpp"
3197 break;
3199 case 60: /* template_module_ref: IDL_ALIAS scoped_name $@25 '<' at_least_one_formal_parameter_name '>' $@26 defining_id */
3200 #line 768 "fe/idl.ypp"
3202 idl_global->set_parse_state (
3203 IDL_GlobalData::PS_ModuleRefIDSeen);
3205 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3206 AST_Decl *d =
3207 s->lookup_by_name ((yyvsp[-6].idlist));
3209 if (d == 0)
3211 idl_global->err ()->lookup_error ((yyvsp[-6].idlist));
3212 return 1;
3215 AST_Template_Module *ref =
3216 dynamic_cast<AST_Template_Module*> (d);
3218 if (ref == 0)
3220 idl_global->err ()->template_module_expected (d);
3221 return 1;
3224 bool refs_match =
3225 ref->match_param_refs ((yyvsp[-3].slval),
3228 if (! refs_match)
3230 // Error message is already output.
3231 return 1;
3234 UTL_ScopedName sn ((yyvsp[0].idval), 0);
3236 AST_Template_Module_Ref *tmr =
3237 idl_global->gen ()->create_template_module_ref (
3238 &sn,
3239 ref,
3240 (yyvsp[-3].slval));
3242 (void) s->fe_add_template_module_ref (tmr);
3244 sn.destroy ();
3245 (yyvsp[-6].idlist)->destroy ();
3246 delete (yyvsp[-6].idlist);
3247 (yyvsp[-6].idlist) = 0;
3249 // Save the current flag value to be restored below.
3250 bool itmna_flag = idl_global->in_tmpl_mod_no_alias ();
3251 idl_global->in_tmpl_mod_no_alias (false);
3252 idl_global->in_tmpl_mod_alias (true);
3254 ast_visitor_context ctx;
3255 ctx.template_params (ref->template_params ());
3256 ast_visitor_tmpl_module_ref v (&ctx);
3258 // The implied IDL resulting from this reference is
3259 // created here, in the template module scope. Upon
3260 // instantiation of the enclosing template module, the
3261 // visitor copies this implied IDL to the instantiated
3262 // module scope. The extra copy is less than ideal, but
3263 // otherwise we have ugly lookup issues when the
3264 // referenced template module's contents are referenced
3265 // using the aliased scoped name.
3266 if (v.visit_template_module_ref (tmr) != 0)
3268 ACE_ERROR ((LM_ERROR,
3269 ACE_TEXT ("visit_template_module_ref")
3270 ACE_TEXT (" failed\n")));
3272 idl_global->set_err_count (idl_global->err_count () + 1);
3275 idl_global->in_tmpl_mod_no_alias (itmna_flag);
3276 idl_global->in_tmpl_mod_alias (false);
3278 #line 3291 "fe/idl.tab.cpp"
3279 break;
3281 case 61: /* $@27: %empty */
3282 #line 849 "fe/idl.ypp"
3284 idl_global->set_parse_state (
3285 IDL_GlobalData::PS_InstModuleSeen);
3287 #line 3300 "fe/idl.tab.cpp"
3288 break;
3290 case 62: /* $@28: %empty */
3291 #line 854 "fe/idl.ypp"
3293 idl_global->set_parse_state (
3294 IDL_GlobalData::PS_InstModuleArgsSeen);
3296 #line 3309 "fe/idl.tab.cpp"
3297 break;
3299 case 63: /* template_module_inst: template_module_header $@27 at_least_one_actual_parameter '>' $@28 defining_id */
3300 #line 859 "fe/idl.ypp"
3302 idl_global->set_parse_state (
3303 IDL_GlobalData::PS_InstModuleIDSeen);
3305 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3306 UTL_ScopedName *sn = (yyvsp[-5].idlist);
3307 AST_Template_Module *ref = 0;
3308 AST_Decl *d = s->lookup_by_name (sn);
3310 if (d == 0)
3312 idl_global->err ()->lookup_error (sn);
3313 return 1;
3315 else
3317 ref = dynamic_cast<AST_Template_Module*> (d);
3319 if (ref == 0)
3321 idl_global->err ()->template_module_expected (d);
3322 return 1;
3326 sn->destroy ();
3327 delete sn;
3328 sn = 0;
3329 (yyvsp[-5].idlist) = 0;
3331 if (! ref->match_arg_names ((yyvsp[-3].alval)))
3333 return 1;
3336 ACE_NEW_RETURN (sn,
3337 UTL_ScopedName ((yyvsp[0].idval),
3341 AST_Template_Module_Inst *tmi =
3342 idl_global->gen ()->create_template_module_inst (
3344 ref,
3345 (yyvsp[-3].alval));
3347 (void) s->fe_add_template_module_inst (tmi);
3349 ast_visitor_context ctx;
3350 ctx.template_args ((yyvsp[-3].alval));
3351 ast_visitor_tmpl_module_inst v (&ctx);
3353 if (v.visit_template_module_inst (tmi) != 0)
3355 ACE_ERROR ((LM_ERROR,
3356 ACE_TEXT ("visit_template_module_inst")
3357 ACE_TEXT (" failed\n")));
3359 idl_global->set_err_count (idl_global->err_count () + 1);
3362 (yyval.dcval) = 0;
3364 #line 3377 "fe/idl.tab.cpp"
3365 break;
3367 case 66: /* $@29: %empty */
3368 #line 931 "fe/idl.ypp"
3370 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3371 AST_Interface *i = 0;
3373 FE_InterfaceHeader *header = (yyvsp[0].ihval);
3374 (yyvsp[0].ihval) = 0;
3377 * Make a new interface node and add it to its enclosing scope.
3379 if (s && header)
3381 i = idl_global->gen ()->create_interface (
3382 header->name (),
3383 header->inherits (),
3384 header->n_inherits (),
3385 header->inherits_flat (),
3386 header->n_inherits_flat (),
3387 header->is_local (),
3388 header->is_abstract ()
3390 AST_Interface::fwd_redefinition_helper (i, s);
3392 * Add the interface to its definition scope.
3394 s->fe_add_interface (i);
3396 // This FE_InterfaceHeader class isn't destroyed with the AST.
3397 header->destroy ();
3398 delete header;
3402 * Push it on the scope stack.
3404 idl_global->scopes ().push (i);
3406 #line 3419 "fe/idl.tab.cpp"
3407 break;
3409 case 67: /* $@30: %empty */
3410 #line 969 "fe/idl.ypp"
3412 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
3414 #line 3427 "fe/idl.tab.cpp"
3415 break;
3417 case 68: /* $@31: %empty */
3418 #line 973 "fe/idl.ypp"
3420 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
3422 #line 3435 "fe/idl.tab.cpp"
3423 break;
3425 case 69: /* interface: interface_header $@29 '{' $@30 exports $@31 '}' */
3426 #line 977 "fe/idl.ypp"
3428 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
3430 (yyval.dcval) = dynamic_cast<AST_Decl *> (idl_global->scopes ().top_non_null ());
3432 * Done with this interface - pop it off the scopes stack
3434 idl_global->scopes ().pop ();
3436 #line 3449 "fe/idl.tab.cpp"
3437 break;
3439 case 70: /* $@32: %empty */
3440 #line 990 "fe/idl.ypp"
3442 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
3444 #line 3457 "fe/idl.tab.cpp"
3445 break;
3447 case 71: /* interface_decl: IDL_INTERFACE $@32 defining_id */
3448 #line 994 "fe/idl.ypp"
3450 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
3451 (yyval.idval) = (yyvsp[0].idval);
3453 #line 3466 "fe/idl.tab.cpp"
3454 break;
3456 case 72: /* interface_header: interface_decl inheritance_spec */
3457 #line 1002 "fe/idl.ypp"
3459 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3461 if ((yyvsp[0].nlval) != 0 && (yyvsp[0].nlval)->truncatable ())
3463 idl_global->err ()->syntax_error (
3464 IDL_GlobalData::PS_InheritColonSeen
3469 * Create an AST representation of the information in the header
3470 * part of an interface - this representation contains a computed
3471 * list of all interfaces which this interface inherits from,
3472 * recursively
3474 UTL_ScopedName *n = 0;
3475 ACE_NEW_RETURN (n,
3476 UTL_ScopedName ((yyvsp[-1].idval), 0),
3478 ACE_NEW_RETURN ((yyval.ihval),
3479 FE_InterfaceHeader (n,
3480 (yyvsp[0].nlval),
3481 false,
3482 false,
3483 true),
3486 if (0 != (yyvsp[0].nlval))
3488 (yyvsp[0].nlval)->destroy ();
3489 delete (yyvsp[0].nlval);
3490 (yyvsp[0].nlval) = 0;
3493 #line 3506 "fe/idl.tab.cpp"
3494 break;
3496 case 73: /* interface_header: IDL_LOCAL interface_decl inheritance_spec */
3497 #line 1039 "fe/idl.ypp"
3499 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3502 * Create an AST representation of the information in the header
3503 * part of an interface - this representation contains a computed
3504 * list of all interfaces which this interface inherits from,
3505 * recursively
3507 UTL_ScopedName *n = 0;
3508 ACE_NEW_RETURN (n,
3509 UTL_ScopedName ((yyvsp[-1].idval), 0),
3511 ACE_NEW_RETURN ((yyval.ihval),
3512 FE_InterfaceHeader (n,
3513 (yyvsp[0].nlval),
3514 true,
3515 false,
3516 true),
3519 if (0 != (yyvsp[0].nlval))
3521 (yyvsp[0].nlval)->destroy ();
3522 delete (yyvsp[0].nlval);
3523 (yyvsp[0].nlval) = 0;
3526 #line 3539 "fe/idl.tab.cpp"
3527 break;
3529 case 74: /* interface_header: IDL_ABSTRACT interface_decl inheritance_spec */
3530 #line 1069 "fe/idl.ypp"
3532 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3535 * Create an AST representation of the information in the header
3536 * part of an interface - this representation contains a computed
3537 * list of all interfaces which this interface inherits from,
3538 * recursively
3540 UTL_ScopedName *n = 0;
3541 ACE_NEW_RETURN (n,
3542 UTL_ScopedName ((yyvsp[-1].idval), 0),
3544 ACE_NEW_RETURN ((yyval.ihval),
3545 FE_InterfaceHeader (n,
3546 (yyvsp[0].nlval),
3547 false,
3548 true,
3549 true),
3552 if (0 != (yyvsp[0].nlval))
3554 (yyvsp[0].nlval)->destroy ();
3555 delete (yyvsp[0].nlval);
3556 (yyvsp[0].nlval) = 0;
3559 #line 3572 "fe/idl.tab.cpp"
3560 break;
3562 case 75: /* $@33: %empty */
3563 #line 1101 "fe/idl.ypp"
3565 idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
3567 #line 3580 "fe/idl.tab.cpp"
3568 break;
3570 case 76: /* inheritance_spec: ':' opt_truncatable $@33 at_least_one_scoped_name */
3571 #line 1105 "fe/idl.ypp"
3573 (yyvsp[0].nlval)->truncatable ((yyvsp[-2].bval));
3574 (yyval.nlval) = (yyvsp[0].nlval);
3576 #line 3589 "fe/idl.tab.cpp"
3577 break;
3579 case 77: /* inheritance_spec: %empty */
3580 #line 1110 "fe/idl.ypp"
3582 (yyval.nlval) = 0;
3584 #line 3597 "fe/idl.tab.cpp"
3585 break;
3587 case 82: /* valuetype: IDL_CUSTOM value_concrete_decl */
3588 #line 1124 "fe/idl.ypp"
3590 idl_global->err ()->unsupported_error ("custom is not supported");
3591 (yyval.dcval) = (yyvsp[0].dcval);
3593 #line 3606 "fe/idl.tab.cpp"
3594 break;
3596 case 84: /* @34: %empty */
3597 #line 1133 "fe/idl.ypp"
3599 FE_OBVHeader *&valuetype_header = (yyvsp[0].vhval);
3600 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
3601 AST_ValueType *valuetype = 0;
3603 if (scope && valuetype_header)
3605 valuetype = idl_global->gen ()->create_valuetype (
3606 valuetype_header->name (),
3607 valuetype_header->inherits (),
3608 valuetype_header->n_inherits (),
3609 valuetype_header->inherits_concrete (),
3610 valuetype_header->inherits_flat (),
3611 valuetype_header->n_inherits_flat (),
3612 valuetype_header->supports (),
3613 valuetype_header->n_supports (),
3614 valuetype_header->supports_concrete (),
3615 false,
3616 valuetype_header->truncatable (),
3617 false);
3619 AST_Interface *valuetype_as_interface =
3620 dynamic_cast<AST_Interface *> (valuetype);
3621 AST_Interface::fwd_redefinition_helper (
3622 valuetype_as_interface, scope);
3623 valuetype = dynamic_cast<AST_ValueType *> (
3624 valuetype_as_interface);
3627 * Add the valuetype to its definition scope
3629 scope->fe_add_valuetype (valuetype);
3631 // FE_OBVHeader is not automatically destroyed in the AST
3632 valuetype_header->destroy ();
3633 delete valuetype_header;
3634 valuetype_header = 0;
3638 * Push it on the scope stack
3640 idl_global->scopes ().push (valuetype);
3642 (yyval.dcval) = valuetype;
3644 #line 3657 "fe/idl.tab.cpp"
3645 break;
3647 case 85: /* $@35: %empty */
3648 #line 1180 "fe/idl.ypp"
3650 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
3652 #line 3665 "fe/idl.tab.cpp"
3653 break;
3655 case 86: /* $@36: %empty */
3656 #line 1184 "fe/idl.ypp"
3658 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
3660 #line 3673 "fe/idl.tab.cpp"
3661 break;
3663 case 87: /* value_concrete_decl: value_header @34 '{' $@35 value_elements $@36 '}' */
3664 #line 1188 "fe/idl.ypp"
3666 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
3668 AST_ValueType *vt =
3669 dynamic_cast<AST_ValueType*> (
3670 idl_global->scopes ().top_non_null ()
3673 if (vt != 0 && vt->will_have_factory ())
3675 idl_global->valuefactory_seen_ = true;
3679 * Done with this value type - pop it off the scopes stack
3681 idl_global->scopes ().pop ();
3683 (yyval.dcval) = (yyvsp[-5].dcval);
3685 #line 3698 "fe/idl.tab.cpp"
3686 break;
3688 case 88: /* $@37: %empty */
3689 #line 1213 "fe/idl.ypp"
3691 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3692 AST_ValueType *v = 0;
3693 AST_Interface *i = 0;
3695 if (s != 0 && (yyvsp[0].vhval) != 0)
3698 idl_global->gen ()->create_valuetype (
3699 (yyvsp[0].vhval)->name (),
3700 (yyvsp[0].vhval)->inherits (),
3701 (yyvsp[0].vhval)->n_inherits (),
3702 (yyvsp[0].vhval)->inherits_concrete (),
3703 (yyvsp[0].vhval)->inherits_flat (),
3704 (yyvsp[0].vhval)->n_inherits_flat (),
3705 (yyvsp[0].vhval)->supports (),
3706 (yyvsp[0].vhval)->n_supports (),
3707 (yyvsp[0].vhval)->supports_concrete (),
3708 true,
3709 false,
3710 false
3712 i = dynamic_cast<AST_Interface*> (v);
3713 AST_Interface::fwd_redefinition_helper (i,
3716 * Add the valuetype to its definition scope
3718 v = dynamic_cast<AST_ValueType*> (i);
3719 (void) s->fe_add_valuetype (v);
3721 // FE_OBVHeader is not automatically destroyed in the AST
3722 (yyvsp[0].vhval)->destroy ();
3723 delete (yyvsp[0].vhval);
3724 (yyvsp[0].vhval) = 0;
3728 * Push it on the scope stack.
3730 idl_global->scopes ().push (v);
3732 #line 3745 "fe/idl.tab.cpp"
3733 break;
3735 case 89: /* $@38: %empty */
3736 #line 1256 "fe/idl.ypp"
3738 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
3740 #line 3753 "fe/idl.tab.cpp"
3741 break;
3743 case 90: /* $@39: %empty */
3744 #line 1260 "fe/idl.ypp"
3746 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
3748 #line 3761 "fe/idl.tab.cpp"
3749 break;
3751 case 91: /* value_abs_decl: IDL_ABSTRACT value_header $@37 '{' $@38 exports $@39 '}' */
3752 #line 1264 "fe/idl.ypp"
3754 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
3757 * Done with this valuetype - pop it off the scopes stack.
3759 idl_global->scopes ().pop ();
3761 (yyval.dcval) = 0;
3763 #line 3776 "fe/idl.tab.cpp"
3764 break;
3766 case 92: /* $@40: %empty */
3767 #line 1279 "fe/idl.ypp"
3769 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3771 #line 3784 "fe/idl.tab.cpp"
3772 break;
3774 case 93: /* value_header: value_decl inheritance_spec $@40 supports_spec */
3775 #line 1283 "fe/idl.ypp"
3777 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
3779 UTL_ScopedName *sn = 0;
3780 ACE_NEW_RETURN (sn,
3781 UTL_ScopedName ((yyvsp[-3].idval), 0),
3783 ACE_NEW_RETURN ((yyval.vhval),
3784 FE_OBVHeader (sn,
3785 (yyvsp[-2].nlval),
3786 (yyvsp[0].nlval),
3787 ((yyvsp[-2].nlval) != 0
3788 ? (yyvsp[-2].nlval)->truncatable ()
3789 : false)),
3792 if (0 != (yyvsp[0].nlval))
3794 (yyvsp[0].nlval)->destroy ();
3795 delete (yyvsp[0].nlval);
3796 (yyvsp[0].nlval) = 0;
3799 if (0 != (yyvsp[-2].nlval))
3801 (yyvsp[-2].nlval)->destroy ();
3802 delete (yyvsp[-2].nlval);
3803 (yyvsp[-2].nlval) = 0;
3806 #line 3819 "fe/idl.tab.cpp"
3807 break;
3809 case 94: /* $@41: %empty */
3810 #line 1317 "fe/idl.ypp"
3812 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSeen);
3814 #line 3827 "fe/idl.tab.cpp"
3815 break;
3817 case 95: /* value_decl: IDL_VALUETYPE $@41 defining_id */
3818 #line 1321 "fe/idl.ypp"
3820 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeIDSeen);
3821 (yyval.idval) = (yyvsp[0].idval);
3823 #line 3836 "fe/idl.tab.cpp"
3824 break;
3826 case 96: /* opt_truncatable: IDL_TRUNCATABLE */
3827 #line 1329 "fe/idl.ypp"
3829 (yyval.bval) = true;
3831 #line 3844 "fe/idl.tab.cpp"
3832 break;
3834 case 97: /* opt_truncatable: %empty */
3835 #line 1333 "fe/idl.ypp"
3837 (yyval.bval) = false;
3839 #line 3852 "fe/idl.tab.cpp"
3840 break;
3842 case 98: /* supports_spec: IDL_SUPPORTS at_least_one_scoped_name */
3843 #line 1341 "fe/idl.ypp"
3845 (yyval.nlval) = (yyvsp[0].nlval);
3847 #line 3860 "fe/idl.tab.cpp"
3848 break;
3850 case 99: /* supports_spec: %empty */
3851 #line 1345 "fe/idl.ypp"
3853 (yyval.nlval) = 0;
3855 #line 3868 "fe/idl.tab.cpp"
3856 break;
3858 case 100: /* value_forward_decl: IDL_ABSTRACT value_decl */
3859 #line 1353 "fe/idl.ypp"
3861 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3862 UTL_ScopedName n ((yyvsp[0].idval),
3864 AST_ValueTypeFwd *f = 0;
3865 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeForwardSeen);
3868 * Create a node representing a forward declaration of an
3869 * valuetype. Store it in the enclosing scope
3871 if (s != 0)
3873 f = idl_global->gen ()->create_valuetype_fwd (&n,
3874 true);
3875 (void) s->fe_add_valuetype_fwd (f);
3878 (yyvsp[0].idval)->destroy ();
3879 delete (yyvsp[0].idval);
3880 (yyvsp[0].idval) = 0;
3882 #line 3895 "fe/idl.tab.cpp"
3883 break;
3885 case 101: /* value_forward_decl: value_decl */
3886 #line 1377 "fe/idl.ypp"
3888 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3889 UTL_ScopedName n ((yyvsp[0].idval),
3891 AST_ValueTypeFwd *f = 0;
3892 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeForwardSeen);
3895 * Create a node representing a forward declaration of an
3896 * valuetype. Store it in the enclosing scope
3898 if (s != 0)
3900 f = idl_global->gen ()->create_valuetype_fwd (&n,
3901 false);
3902 (void) s->fe_add_valuetype_fwd (f);
3905 (yyvsp[0].idval)->destroy ();
3906 delete (yyvsp[0].idval);
3907 (yyvsp[0].idval) = 0;
3909 (yyval.dcval) = 0;
3911 #line 3924 "fe/idl.tab.cpp"
3912 break;
3914 case 102: /* value_box_decl: value_decl type_spec */
3915 #line 1405 "fe/idl.ypp"
3917 idl_global->set_parse_state (IDL_GlobalData::PS_ValueBoxDeclSeen);
3919 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3920 UTL_ScopedName n ((yyvsp[-1].idval),
3923 if (s != 0 && (yyvsp[0].dcval) != 0)
3926 * Get the type_spec associated with the valuebox
3928 AST_Type *tp = 0;
3929 AST_Typedef *td
3930 = dynamic_cast<AST_Typedef*> ((yyvsp[0].dcval));
3932 if (td == 0)
3934 tp = dynamic_cast<AST_Type*> ((yyvsp[0].dcval));
3936 else
3938 tp = td->primitive_base_type ();
3941 if (tp == 0)
3943 // The <type_spec> given is a valid type
3944 idl_global->err ()->not_a_type ((yyvsp[0].dcval));
3946 else
3948 AST_Decl::NodeType nt = tp->node_type ();
3950 if (nt == AST_Decl::NT_valuetype
3951 || nt == AST_Decl::NT_eventtype)
3953 // valuetype is not allowed as <type_spec>
3954 // for boxed value
3955 idl_global->err ()->error0 (
3956 UTL_Error::EIDL_ILLEGAL_BOXED_TYPE
3959 else
3962 * Add the valuebox to its definition scope
3964 AST_ValueBox *vb =
3965 idl_global->gen ()->create_valuebox (&n,
3966 tp);
3967 (void) s->fe_add_valuebox (vb);
3972 (yyvsp[-1].idval)->destroy ();
3973 delete (yyvsp[-1].idval);
3974 (yyvsp[-1].idval) = 0;
3976 (yyval.dcval) = 0;
3978 #line 3991 "fe/idl.tab.cpp"
3979 break;
3981 case 103: /* value_elements: value_elements at_least_one_annotation value_element */
3982 #line 1471 "fe/idl.ypp"
3984 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
3985 AST_Decls *&decls = (yyvsp[0].decls_val);
3986 if (decls)
3988 for (size_t i = 0; i < decls->size (); i++)
3990 (*decls)[i]->annotation_appls (*annotations);
3993 else
3995 idl_global->err ()-> unsupported_warning (
3996 "Annotating this is not supported");
3998 delete annotations;
3999 delete decls;
4001 #line 4014 "fe/idl.tab.cpp"
4002 break;
4004 case 104: /* value_elements: value_elements value_element */
4005 #line 1490 "fe/idl.ypp"
4007 delete (yyvsp[0].decls_val);
4009 #line 4022 "fe/idl.tab.cpp"
4010 break;
4012 case 107: /* value_element: export */
4013 #line 1499 "fe/idl.ypp"
4015 AST_Decl *&node = (yyvsp[0].dcval);
4016 AST_Decls *value = 0;
4017 if (node)
4019 value = new AST_Decls;
4020 value->push_back (node);
4022 (yyval.decls_val) = value;
4024 #line 4037 "fe/idl.tab.cpp"
4025 break;
4027 case 108: /* @42: %empty */
4028 #line 1510 "fe/idl.ypp"
4030 AST_Decl *&node = (yyvsp[0].dcval);
4031 AST_Decls *value = 0;
4032 if (node)
4034 value = new AST_Decls;
4035 value->push_back (node);
4037 (yyval.decls_val) = value;
4039 #line 4052 "fe/idl.tab.cpp"
4040 break;
4042 case 109: /* value_element: init_decl @42 ';' */
4043 #line 1521 "fe/idl.ypp"
4045 (yyval.decls_val) = (yyvsp[-1].decls_val);
4047 #line 4060 "fe/idl.tab.cpp"
4048 break;
4050 case 110: /* visibility: IDL_PUBLIC */
4051 #line 1528 "fe/idl.ypp"
4053 (yyval.vival) = AST_Field::vis_PUBLIC;
4055 #line 4068 "fe/idl.tab.cpp"
4056 break;
4058 case 111: /* visibility: IDL_PRIVATE */
4059 #line 1532 "fe/idl.ypp"
4061 (yyval.vival) = AST_Field::vis_PRIVATE;
4063 #line 4076 "fe/idl.tab.cpp"
4064 break;
4066 case 112: /* state_member: visibility member_i */
4067 #line 1539 "fe/idl.ypp"
4069 AST_Field::Visibility &visibility = (yyvsp[-1].vival);
4070 AST_Decls *&decls_ptr = (yyvsp[0].decls_val);
4071 if (decls_ptr)
4073 AST_Decls &decls = *decls_ptr;
4074 for (size_t i = 0; i < decls.size (); i++)
4076 AST_Field *field = dynamic_cast<AST_Field *> (decls[i]);
4077 if (field)
4079 field->visibility (visibility);
4083 (yyval.decls_val) = decls_ptr;
4085 #line 4098 "fe/idl.tab.cpp"
4086 break;
4088 case 115: /* at_least_one_export: exports at_least_one_annotation export */
4089 #line 1565 "fe/idl.ypp"
4091 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
4092 AST_Decl *d = (yyvsp[0].dcval);
4093 if (d)
4095 d->annotation_appls (*annotations);
4097 else
4099 idl_global->err ()-> unsupported_warning (
4100 "Annotating this is not supported");
4102 delete annotations;
4104 #line 4117 "fe/idl.tab.cpp"
4105 break;
4107 case 117: /* $@43: %empty */
4108 #line 1584 "fe/idl.ypp"
4110 idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
4112 #line 4125 "fe/idl.tab.cpp"
4113 break;
4115 case 118: /* export: type_dcl $@43 ';' */
4116 #line 1588 "fe/idl.ypp"
4118 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4120 #line 4133 "fe/idl.tab.cpp"
4121 break;
4123 case 119: /* $@44: %empty */
4124 #line 1592 "fe/idl.ypp"
4126 idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
4128 #line 4141 "fe/idl.tab.cpp"
4129 break;
4131 case 120: /* export: typeid_dcl $@44 ';' */
4132 #line 1596 "fe/idl.ypp"
4134 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4136 #line 4149 "fe/idl.tab.cpp"
4137 break;
4139 case 121: /* $@45: %empty */
4140 #line 1600 "fe/idl.ypp"
4142 idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
4144 #line 4157 "fe/idl.tab.cpp"
4145 break;
4147 case 122: /* export: typeprefix_dcl $@45 ';' */
4148 #line 1604 "fe/idl.ypp"
4150 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4152 #line 4165 "fe/idl.tab.cpp"
4153 break;
4155 case 123: /* $@46: %empty */
4156 #line 1608 "fe/idl.ypp"
4158 idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
4160 #line 4173 "fe/idl.tab.cpp"
4161 break;
4163 case 124: /* export: const_dcl $@46 ';' */
4164 #line 1612 "fe/idl.ypp"
4166 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4168 #line 4181 "fe/idl.tab.cpp"
4169 break;
4171 case 125: /* $@47: %empty */
4172 #line 1616 "fe/idl.ypp"
4174 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
4176 #line 4189 "fe/idl.tab.cpp"
4177 break;
4179 case 126: /* export: exception $@47 ';' */
4180 #line 1620 "fe/idl.ypp"
4182 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4184 #line 4197 "fe/idl.tab.cpp"
4185 break;
4187 case 127: /* $@48: %empty */
4188 #line 1624 "fe/idl.ypp"
4190 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
4192 #line 4205 "fe/idl.tab.cpp"
4193 break;
4195 case 128: /* export: attribute $@48 ';' */
4196 #line 1628 "fe/idl.ypp"
4198 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4200 #line 4213 "fe/idl.tab.cpp"
4201 break;
4203 case 129: /* $@49: %empty */
4204 #line 1632 "fe/idl.ypp"
4206 idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
4208 #line 4221 "fe/idl.tab.cpp"
4209 break;
4211 case 130: /* export: operation $@49 ';' */
4212 #line 1636 "fe/idl.ypp"
4214 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4216 #line 4229 "fe/idl.tab.cpp"
4217 break;
4219 case 131: /* $@50: %empty */
4220 #line 1640 "fe/idl.ypp"
4222 idl_global->err ()->syntax_error (idl_global->parse_state ());
4224 #line 4237 "fe/idl.tab.cpp"
4225 break;
4227 case 132: /* export: error $@50 ';' */
4228 #line 1644 "fe/idl.ypp"
4230 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4231 yyerrok;
4232 (yyval.dcval) = 0;
4234 #line 4247 "fe/idl.tab.cpp"
4235 break;
4237 case 133: /* at_least_one_scoped_name: scoped_name scoped_names */
4238 #line 1653 "fe/idl.ypp"
4240 ACE_NEW_RETURN ((yyval.nlval),
4241 UTL_NameList ((yyvsp[-1].idlist),
4242 (yyvsp[0].nlval)),
4245 #line 4258 "fe/idl.tab.cpp"
4246 break;
4248 case 134: /* $@51: %empty */
4249 #line 1664 "fe/idl.ypp"
4251 idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
4253 #line 4266 "fe/idl.tab.cpp"
4254 break;
4256 case 135: /* scoped_names: scoped_names ',' $@51 scoped_name */
4257 #line 1668 "fe/idl.ypp"
4259 idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
4261 UTL_NameList *nl = 0;
4262 ACE_NEW_RETURN (nl,
4263 UTL_NameList ((yyvsp[0].idlist),
4267 if ((yyvsp[-3].nlval) == 0)
4269 (yyval.nlval) = nl;
4271 else
4273 (yyvsp[-3].nlval)->nconc (nl);
4274 (yyval.nlval) = (yyvsp[-3].nlval);
4277 #line 4290 "fe/idl.tab.cpp"
4278 break;
4280 case 136: /* scoped_names: %empty */
4281 #line 1688 "fe/idl.ypp"
4283 (yyval.nlval) = 0;
4285 #line 4298 "fe/idl.tab.cpp"
4286 break;
4288 case 137: /* scoped_name: id */
4289 #line 1695 "fe/idl.ypp"
4291 idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
4293 ACE_NEW_RETURN ((yyval.idlist),
4294 UTL_IdList ((yyvsp[0].idval),
4298 #line 4311 "fe/idl.tab.cpp"
4299 break;
4301 case 138: /* $@52: %empty */
4302 #line 1704 "fe/idl.ypp"
4304 idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
4306 #line 4319 "fe/idl.tab.cpp"
4307 break;
4309 case 139: /* scoped_name: IDL_SCOPE_DELIMITOR $@52 id */
4310 #line 1708 "fe/idl.ypp"
4312 idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
4314 Identifier *id = 0;
4315 ACE_NEW_RETURN (id,
4316 Identifier ((yyvsp[-2].strval)),
4318 ACE::strdelete ((yyvsp[-2].strval));
4319 (yyvsp[-2].strval) = 0;
4320 UTL_IdList *sn = 0;
4321 ACE_NEW_RETURN (sn,
4322 UTL_IdList ((yyvsp[0].idval),
4325 ACE_NEW_RETURN ((yyval.idlist),
4326 UTL_IdList (id,
4327 sn),
4330 #line 4343 "fe/idl.tab.cpp"
4331 break;
4333 case 140: /* $@53: %empty */
4334 #line 1729 "fe/idl.ypp"
4336 idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
4338 // This cleans up all the non-global "::"s in scoped names.
4339 // If there is a global one, it gets put into the UTL_IdList,
4340 // so we clean it up in the case above.
4341 ACE::strdelete ((yyvsp[0].strval));
4342 (yyvsp[0].strval) = 0;
4344 #line 4357 "fe/idl.tab.cpp"
4345 break;
4347 case 141: /* scoped_name: scoped_name IDL_SCOPE_DELIMITOR $@53 id */
4348 #line 1739 "fe/idl.ypp"
4350 idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
4352 UTL_IdList *sn = 0;
4353 ACE_NEW_RETURN (sn,
4354 UTL_IdList ((yyvsp[0].idval),
4357 (yyvsp[-3].idlist)->nconc (sn);
4358 (yyval.idlist) = (yyvsp[-3].idlist);
4360 #line 4373 "fe/idl.tab.cpp"
4361 break;
4363 case 142: /* id: IDENTIFIER */
4364 #line 1753 "fe/idl.ypp"
4366 ACE_NEW_RETURN ((yyval.idval),
4367 Identifier ((yyvsp[0].strval)),
4369 ACE::strdelete ((yyvsp[0].strval));
4370 (yyvsp[0].strval) = 0;
4372 #line 4385 "fe/idl.tab.cpp"
4373 break;
4375 case 143: /* defining_id: IDENTIFIER */
4376 #line 1763 "fe/idl.ypp"
4378 /* defining_id is a defining identifier
4379 whereas id is usually a reference to a defining identifier */
4380 ACE_NEW_RETURN ((yyval.idval), Identifier ((yyvsp[0].strval)), 1);
4381 ACE::strdelete ((yyvsp[0].strval));
4382 (yyvsp[0].strval) = 0;
4384 #line 4397 "fe/idl.tab.cpp"
4385 break;
4387 case 144: /* interface_forward: interface_decl */
4388 #line 1774 "fe/idl.ypp"
4390 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4391 UTL_ScopedName n ((yyvsp[0].idval), 0);
4393 if (ACE_OS::strcmp ((yyvsp[0].idval)->get_string (),
4394 "TypeCode") == 0
4395 && !idl_global->in_main_file ())
4397 AST_PredefinedType *pdt =
4398 idl_global->gen ()->create_predefined_type (
4399 AST_PredefinedType::PT_pseudo,
4403 s->add_to_scope (pdt);
4405 (yyvsp[0].idval)->destroy ();
4406 delete (yyvsp[0].idval);
4407 (yyvsp[0].idval) = 0;
4409 break;
4412 AST_InterfaceFwd *f = 0;
4413 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen);
4416 * Create a node representing a forward declaration of an
4417 * interface. Store it in the enclosing scope
4419 if (s != 0)
4421 f = idl_global->gen ()->create_interface_fwd (&n,
4424 (void) s->fe_add_interface_fwd (f);
4427 (yyvsp[0].idval)->destroy ();
4428 delete (yyvsp[0].idval);
4429 (yyvsp[0].idval) = 0;
4431 #line 4444 "fe/idl.tab.cpp"
4432 break;
4434 case 145: /* interface_forward: IDL_LOCAL interface_decl */
4435 #line 1818 "fe/idl.ypp"
4437 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4438 UTL_ScopedName n ((yyvsp[0].idval),
4440 AST_InterfaceFwd *f = 0;
4441 idl_global->set_parse_state (
4442 IDL_GlobalData::PS_InterfaceForwardSeen
4446 * Create a node representing a forward declaration of an
4447 * interface. Store it in the enclosing scope
4449 if (s != 0)
4451 f = idl_global->gen ()->create_interface_fwd (&n,
4454 (void) s->fe_add_interface_fwd (f);
4457 (yyvsp[0].idval)->destroy ();
4458 delete (yyvsp[0].idval);
4459 (yyvsp[0].idval) = 0;
4461 #line 4474 "fe/idl.tab.cpp"
4462 break;
4464 case 146: /* interface_forward: IDL_ABSTRACT interface_decl */
4465 #line 1845 "fe/idl.ypp"
4467 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4468 UTL_ScopedName n ((yyvsp[0].idval),
4470 AST_InterfaceFwd *f = 0;
4471 idl_global->set_parse_state (
4472 IDL_GlobalData::PS_InterfaceForwardSeen
4476 * Create a node representing a forward declaration of an
4477 * interface. Store it in the enclosing scope
4479 if (s != 0)
4481 f = idl_global->gen ()->create_interface_fwd (&n,
4484 (void) s->fe_add_interface_fwd (f);
4487 (yyvsp[0].idval)->destroy ();
4488 delete (yyvsp[0].idval);
4489 (yyvsp[0].idval) = 0;
4491 (yyval.dcval) = dynamic_cast<AST_Decl *> (f);
4493 #line 4506 "fe/idl.tab.cpp"
4494 break;
4496 case 147: /* $@54: %empty */
4497 #line 1876 "fe/idl.ypp"
4499 idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
4501 #line 4514 "fe/idl.tab.cpp"
4502 break;
4504 case 148: /* $@55: %empty */
4505 #line 1880 "fe/idl.ypp"
4507 idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
4509 #line 4522 "fe/idl.tab.cpp"
4510 break;
4512 case 149: /* $@56: %empty */
4513 #line 1884 "fe/idl.ypp"
4515 idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
4517 #line 4530 "fe/idl.tab.cpp"
4518 break;
4520 case 150: /* $@57: %empty */
4521 #line 1888 "fe/idl.ypp"
4523 idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
4525 #line 4538 "fe/idl.tab.cpp"
4526 break;
4528 case 151: /* const_dcl: IDL_CONST $@54 const_type $@55 defining_id $@56 '=' $@57 expression */
4529 #line 1892 "fe/idl.ypp"
4531 (yyval.dcval) = 0;
4532 UTL_ScopedName n ((yyvsp[-4].idval), 0);
4534 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4535 AST_Constant *c = 0;
4536 idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen);
4539 * Create a node representing a constant declaration. Store
4540 * it in the enclosing scope.
4542 if ((yyvsp[0].exval) != 0 && s != 0)
4544 AST_Param_Holder *param_holder = (yyvsp[0].exval)->param_holder ();
4546 AST_Expression::AST_ExprValue *result =
4547 (yyvsp[0].exval)->check_and_coerce ((yyvsp[-6].etval), tao_enum_constant_decl);
4548 tao_enum_constant_decl = 0;
4550 // If the expression is a template parameter place
4551 // holder, 'result' will be 0, but it's ok.
4552 if (result == 0 && param_holder == 0)
4554 idl_global->err ()->coercion_error ((yyvsp[0].exval), (yyvsp[-6].etval));
4555 (yyvsp[0].exval)->destroy ();
4556 delete (yyvsp[0].exval);
4557 (yyvsp[0].exval) = 0;
4559 else
4561 AST_Expression::ExprType et = (yyvsp[-6].etval);
4563 if (param_holder != 0
4564 && et != param_holder->info ()->const_type_)
4566 idl_global->err ()->mismatched_template_param (
4567 param_holder->info ()->name_.c_str ());
4569 else
4571 c = idl_global->gen ()->create_constant ((yyvsp[-6].etval), (yyvsp[0].exval), &n);
4572 (void) s->fe_add_constant (c);
4573 (yyval.dcval) = c;
4577 delete result;
4578 result = 0;
4581 (yyvsp[-4].idval)->destroy ();
4582 delete (yyvsp[-4].idval);
4583 (yyvsp[-4].idval) = 0;
4585 #line 4598 "fe/idl.tab.cpp"
4586 break;
4588 case 158: /* const_type: string_type_spec */
4589 #line 1957 "fe/idl.ypp"
4591 (yyval.etval) = AST_Expression::EV_string;
4593 #line 4606 "fe/idl.tab.cpp"
4594 break;
4596 case 159: /* const_type: wstring_type_spec */
4597 #line 1961 "fe/idl.ypp"
4599 (yyval.etval) = AST_Expression::EV_wstring;
4601 #line 4614 "fe/idl.tab.cpp"
4602 break;
4604 case 160: /* const_type: scoped_name */
4605 #line 1965 "fe/idl.ypp"
4607 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4608 AST_PredefinedType *c = 0;
4609 AST_Typedef *t = 0;
4610 UTL_ScopedName *sn = (yyvsp[0].idlist);
4613 * If the constant's type is a scoped name, it must resolve
4614 * to a scalar constant type
4616 AST_Decl *d =
4617 s->lookup_by_name (sn);
4619 if (s != 0 && d != 0)
4622 * Look through typedefs.
4624 while (d->node_type () == AST_Decl::NT_typedef)
4626 t = dynamic_cast<AST_Typedef*> (d);
4628 if (t == 0)
4630 break;
4633 d = t->base_type ();
4636 if (d->node_type () == AST_Decl::NT_pre_defined)
4638 c = dynamic_cast<AST_PredefinedType*> (d);
4640 (yyval.etval) = FE_Utils::PredefinedTypeToExprType (c->pt ());
4642 else if (d->node_type () == AST_Decl::NT_string)
4644 (yyval.etval) = AST_Expression::EV_string;
4646 else if (d->node_type () == AST_Decl::NT_wstring)
4648 (yyval.etval) = AST_Expression::EV_wstring;
4650 else if (d->node_type () == AST_Decl::NT_enum)
4652 (yyval.etval) = AST_Expression::EV_enum;
4653 tao_enum_constant_decl =
4654 dynamic_cast<AST_Enum*> (d);
4656 else
4658 idl_global->err ()->constant_expected (sn, d);
4661 else
4663 idl_global->err ()->lookup_error (sn);
4666 sn->destroy ();
4667 delete sn;
4668 sn = 0;
4669 (yyvsp[0].idlist) = 0;
4671 #line 4684 "fe/idl.tab.cpp"
4672 break;
4674 case 164: /* or_expr: or_expr '|' xor_expr */
4675 #line 2038 "fe/idl.ypp"
4677 (yyval.exval) =
4678 idl_global->gen ()->create_expr (
4679 AST_Expression::EC_or,
4680 (yyvsp[-2].exval),
4681 (yyvsp[0].exval)
4684 #line 4697 "fe/idl.tab.cpp"
4685 break;
4687 case 166: /* xor_expr: xor_expr '^' and_expr */
4688 #line 2051 "fe/idl.ypp"
4690 (yyval.exval) =
4691 idl_global->gen ()->create_expr (
4692 AST_Expression::EC_xor,
4693 (yyvsp[-2].exval),
4694 (yyvsp[0].exval)
4697 #line 4710 "fe/idl.tab.cpp"
4698 break;
4700 case 168: /* and_expr: and_expr '&' shift_expr */
4701 #line 2064 "fe/idl.ypp"
4703 (yyval.exval) =
4704 idl_global->gen ()->create_expr (
4705 AST_Expression::EC_and,
4706 (yyvsp[-2].exval),
4707 (yyvsp[0].exval)
4710 #line 4723 "fe/idl.tab.cpp"
4711 break;
4713 case 170: /* shift_expr: shift_expr IDL_LEFT_SHIFT add_expr */
4714 #line 2077 "fe/idl.ypp"
4716 (yyval.exval) =
4717 idl_global->gen ()->create_expr (
4718 AST_Expression::EC_left,
4719 (yyvsp[-2].exval),
4720 (yyvsp[0].exval)
4723 #line 4736 "fe/idl.tab.cpp"
4724 break;
4726 case 171: /* shift_expr: shift_expr IDL_RIGHT_SHIFT add_expr */
4727 #line 2086 "fe/idl.ypp"
4729 (yyval.exval) =
4730 idl_global->gen ()->create_expr (
4731 AST_Expression::EC_right,
4732 (yyvsp[-2].exval),
4733 (yyvsp[0].exval)
4736 #line 4749 "fe/idl.tab.cpp"
4737 break;
4739 case 173: /* add_expr: add_expr '+' mult_expr */
4740 #line 2099 "fe/idl.ypp"
4742 (yyval.exval) =
4743 idl_global->gen ()->create_expr (
4744 AST_Expression::EC_add,
4745 (yyvsp[-2].exval),
4746 (yyvsp[0].exval)
4749 #line 4762 "fe/idl.tab.cpp"
4750 break;
4752 case 174: /* add_expr: add_expr '-' mult_expr */
4753 #line 2108 "fe/idl.ypp"
4755 (yyval.exval) =
4756 idl_global->gen ()->create_expr (
4757 AST_Expression::EC_minus,
4758 (yyvsp[-2].exval),
4759 (yyvsp[0].exval)
4762 #line 4775 "fe/idl.tab.cpp"
4763 break;
4765 case 176: /* mult_expr: mult_expr '*' unary_expr */
4766 #line 2121 "fe/idl.ypp"
4768 (yyval.exval) =
4769 idl_global->gen ()->create_expr (
4770 AST_Expression::EC_mul,
4771 (yyvsp[-2].exval),
4772 (yyvsp[0].exval)
4775 #line 4788 "fe/idl.tab.cpp"
4776 break;
4778 case 177: /* mult_expr: mult_expr '/' unary_expr */
4779 #line 2130 "fe/idl.ypp"
4781 (yyval.exval) =
4782 idl_global->gen ()->create_expr (
4783 AST_Expression::EC_div,
4784 (yyvsp[-2].exval),
4785 (yyvsp[0].exval)
4788 #line 4801 "fe/idl.tab.cpp"
4789 break;
4791 case 178: /* mult_expr: mult_expr '%' unary_expr */
4792 #line 2139 "fe/idl.ypp"
4794 (yyval.exval) =
4795 idl_global->gen ()->create_expr (
4796 AST_Expression::EC_mod,
4797 (yyvsp[-2].exval),
4798 (yyvsp[0].exval)
4801 #line 4814 "fe/idl.tab.cpp"
4802 break;
4804 case 180: /* unary_expr: '+' primary_expr */
4805 #line 2152 "fe/idl.ypp"
4807 (yyval.exval) =
4808 idl_global->gen ()->create_expr (
4809 AST_Expression::EC_u_plus,
4810 (yyvsp[0].exval),
4814 #line 4827 "fe/idl.tab.cpp"
4815 break;
4817 case 181: /* unary_expr: '-' primary_expr */
4818 #line 2161 "fe/idl.ypp"
4820 (yyval.exval) =
4821 idl_global->gen ()->create_expr (
4822 AST_Expression::EC_u_minus,
4823 (yyvsp[0].exval),
4827 #line 4840 "fe/idl.tab.cpp"
4828 break;
4830 case 182: /* unary_expr: '~' primary_expr */
4831 #line 2170 "fe/idl.ypp"
4833 (yyval.exval) =
4834 idl_global->gen ()->create_expr (
4835 AST_Expression::EC_bit_neg,
4836 (yyvsp[0].exval),
4840 #line 4853 "fe/idl.tab.cpp"
4841 break;
4843 case 183: /* primary_expr: scoped_name */
4844 #line 2182 "fe/idl.ypp"
4846 UTL_ScopedName *name = (yyvsp[0].idlist);
4849 * An expression which is a scoped name is not resolved now,
4850 * but only when it is evaluated (such as when it is assigned
4851 * as a constant value).
4853 AST_Expression *expr = 0;
4855 AST_Decl *node = stack_based_lookup_for_primary_expr ?
4856 idl_global->scopes ().lookup_by_name (name) :
4857 idl_global->scopes ().top_non_null ()->lookup_by_name (name);
4858 if (!node)
4860 if (!idl_global->ignore_lookup_errors_)
4862 idl_global->err ()->lookup_error (name);
4863 return 1;
4866 else if (node->node_type () == AST_Decl::NT_const)
4869 * If the scoped name is an IDL constant, it
4870 * may be used in an array dim, a string
4871 * bound, or a sequence bound. If so, it
4872 * must be unsigned and > 0. We assign the
4873 * constant's value and type to the
4874 * expression created here so we can check
4875 * them later.
4877 AST_Constant *c = dynamic_cast<AST_Constant *> (node);
4878 expr = idl_global->gen ()->create_expr (
4879 c->constant_value (),
4880 c->et ());
4882 else
4884 // An AST_Expression owns the scoped name
4885 // passed in this constructor, so we copy it
4886 // and destroy it below no matter which case
4887 // is followed.
4888 expr = idl_global->gen ()->create_expr (name->copy ());
4889 if (node->node_type () == AST_Decl::NT_enum_val)
4891 expr->enum_parent (
4892 dynamic_cast<AST_EnumVal *> (node)->enum_parent ());
4896 (yyval.exval) = expr;
4897 name->destroy ();
4898 delete name;
4899 (yyvsp[0].idlist) = name = 0;
4901 #line 4914 "fe/idl.tab.cpp"
4902 break;
4904 case 185: /* primary_expr: '(' const_expr ')' */
4905 #line 2240 "fe/idl.ypp"
4907 (yyval.exval) = (yyvsp[-1].exval);
4909 #line 4922 "fe/idl.tab.cpp"
4910 break;
4912 case 186: /* literal: IDL_INTEGER_LITERAL */
4913 #line 2247 "fe/idl.ypp"
4915 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].ival));
4917 #line 4930 "fe/idl.tab.cpp"
4918 break;
4920 case 187: /* literal: IDL_UINTEGER_LITERAL */
4921 #line 2251 "fe/idl.ypp"
4923 (yyval.exval) =
4924 idl_global->gen ()->create_expr ((yyvsp[0].uival));
4926 #line 4939 "fe/idl.tab.cpp"
4927 break;
4929 case 188: /* literal: IDL_STRING_LITERAL */
4930 #line 2256 "fe/idl.ypp"
4932 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].sval));
4933 (yyvsp[0].sval)->destroy ();
4934 delete (yyvsp[0].sval);
4935 (yyvsp[0].sval) = 0;
4937 #line 4950 "fe/idl.tab.cpp"
4938 break;
4940 case 189: /* literal: IDL_WSTRING_LITERAL */
4941 #line 2263 "fe/idl.ypp"
4943 char *wide_string = (yyvsp[0].wsval);
4944 (yyval.exval) = idl_global->gen ()->create_expr (wide_string);
4945 ACE_OS::free (wide_string);
4946 (yyvsp[0].wsval) = 0;
4948 #line 4961 "fe/idl.tab.cpp"
4949 break;
4951 case 190: /* literal: IDL_CHARACTER_LITERAL */
4952 #line 2270 "fe/idl.ypp"
4954 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].cval));
4956 #line 4969 "fe/idl.tab.cpp"
4957 break;
4959 case 191: /* literal: IDL_WCHAR_LITERAL */
4960 #line 2274 "fe/idl.ypp"
4962 ACE_OutputCDR::from_wchar wc ((yyvsp[0].wcval));
4963 (yyval.exval) = idl_global->gen ()->create_expr (wc);
4965 #line 4978 "fe/idl.tab.cpp"
4966 break;
4968 case 192: /* literal: IDL_FIXED_PT_LITERAL */
4969 #line 2279 "fe/idl.ypp"
4971 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].fixval));
4973 #line 4986 "fe/idl.tab.cpp"
4974 break;
4976 case 193: /* literal: IDL_FLOATING_PT_LITERAL */
4977 #line 2283 "fe/idl.ypp"
4979 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].dval));
4981 #line 4994 "fe/idl.tab.cpp"
4982 break;
4984 case 194: /* literal: IDL_TRUETOK */
4985 #line 2287 "fe/idl.ypp"
4987 (yyval.exval) = idl_global->gen ()->create_expr (true);
4989 #line 5002 "fe/idl.tab.cpp"
4990 break;
4992 case 195: /* literal: IDL_FALSETOK */
4993 #line 2291 "fe/idl.ypp"
4995 (yyval.exval) = idl_global->gen ()->create_expr (false);
4997 #line 5010 "fe/idl.tab.cpp"
4998 break;
5000 case 196: /* positive_int_expr: const_expr */
5001 #line 2298 "fe/idl.ypp"
5003 int good_expression = 1;
5004 (yyvsp[0].exval)->evaluate (AST_Expression::EK_positive_int);
5005 AST_Expression::AST_ExprValue *ev = (yyvsp[0].exval)->ev ();
5008 * If const_expr is an enum value (AST_EnumVal inherits from
5009 * AST_Constant), the AST_ExprValue will probably not be set,
5010 * but there's no need to check anyway
5012 if (ev != 0)
5014 switch (ev->et)
5016 case AST_Expression::EV_ushort:
5017 if (ev->u.usval == 0)
5019 good_expression = 0;
5022 break;
5023 case AST_Expression::EV_ulong:
5024 if (ev->u.ulval == 0)
5026 good_expression = 0;
5029 break;
5030 case AST_Expression::EV_ulonglong:
5031 if (ev->u.ullval == 0)
5033 good_expression = 0;
5036 break;
5037 case AST_Expression::EV_octet:
5038 if (ev->u.oval == 0)
5040 good_expression = 0;
5043 break;
5044 case AST_Expression::EV_bool:
5045 if (ev->u.bval == 0)
5047 good_expression = 0;
5050 break;
5051 default:
5052 good_expression = 0;
5053 break;
5057 if (good_expression)
5059 (yyval.exval) = (yyvsp[0].exval);
5061 else
5063 idl_global->err ()->syntax_error (idl_global->parse_state ());
5066 #line 5079 "fe/idl.tab.cpp"
5067 break;
5069 case 197: /* $@58: %empty */
5070 #line 2366 "fe/idl.ypp"
5072 if (idl_global->idl_version_ < IDL_VERSION_4)
5074 idl_global->err ()->idl_version_error (
5075 "Annotations are an IDL4 feature");
5078 Identifier *id = (yyvsp[-1].idval);
5079 UTL_ScopedName name (id, 0);
5080 AST_Annotation_Decl::escape_name (&name);
5081 AST_Annotation_Decl *annotation_decl = idl_global->gen ()->
5082 create_annotation_decl (&name);
5083 idl_global->scopes ().top_non_null ()->
5084 fe_add_annotation_decl (annotation_decl);
5085 idl_global->scopes ().push (annotation_decl);
5087 #line 5100 "fe/idl.tab.cpp"
5088 break;
5090 case 198: /* annotation_dcl: IDL_ANNOTATION_DECL defining_id '{' $@58 annotation_body '}' */
5091 #line 2383 "fe/idl.ypp"
5093 Identifier *id = (yyvsp[-4].idval);
5094 idl_global->scopes ().pop ();
5095 id->destroy ();
5096 delete id;
5098 (yyval.dcval) = 0;
5100 #line 5113 "fe/idl.tab.cpp"
5101 break;
5103 case 204: /* $@59: %empty */
5104 #line 2403 "fe/idl.ypp"
5106 idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
5107 idl_global->in_typedef (true);
5109 #line 5122 "fe/idl.tab.cpp"
5110 break;
5112 case 208: /* annotation_member: annotation_member_type defining_id annotation_member_default ';' */
5113 #line 2417 "fe/idl.ypp"
5115 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
5116 UTL_Scope *root = idl_global->scopes ().bottom ();
5118 AST_Expression::ExprType type = (yyvsp[-3].etval);
5119 Identifier *name = (yyvsp[-2].idval);
5120 // Annotation member names can't clash with C++ keywords
5121 FE_Utils::original_local_name (name);
5122 UTL_ScopedName *scoped_name = new UTL_ScopedName (name, 0);
5123 AST_Expression *default_value = (yyvsp[-1].exval);
5125 AST_Decl * type_obj;
5126 switch (type)
5128 case AST_Expression::EV_string:
5129 case AST_Expression::EV_wstring:
5130 type_obj = tao_string_decl;
5131 break;
5132 case AST_Expression::EV_enum:
5133 type_obj = tao_enum_constant_decl;
5134 break;
5135 default:
5136 type_obj = root->lookup_primitive_type (type);
5139 FE_Declarator *declarator = new FE_Declarator (
5140 scoped_name, FE_Declarator::FD_simple, 0);
5141 AST_Annotation_Member *member = idl_global->gen ()->
5142 create_annotation_member (
5143 type, declarator->compose (type_obj), declarator->name ());
5144 scope->fe_add_annotation_member (member);
5146 declarator->destroy ();
5147 delete declarator;
5149 if (default_value)
5151 // Check if types are compatible, else report error
5152 AST_Expression::AST_ExprValue *result =
5153 default_value->check_and_coerce (type, tao_enum_constant_decl);
5154 tao_enum_constant_decl = 0;
5155 if (result)
5157 member->value (default_value);
5159 else
5161 idl_global->err ()->coercion_error (default_value, type);
5163 delete result;
5166 #line 5179 "fe/idl.tab.cpp"
5167 break;
5169 case 209: /* annotation_member_default: IDL_DEFAULT const_expr */
5170 #line 2473 "fe/idl.ypp"
5172 (yyval.exval) = (yyvsp[0].exval);
5174 #line 5187 "fe/idl.tab.cpp"
5175 break;
5177 case 210: /* annotation_member_default: %empty */
5178 #line 2477 "fe/idl.ypp"
5180 (yyval.exval) = 0;
5182 #line 5195 "fe/idl.tab.cpp"
5183 break;
5185 case 211: /* at_least_one_annotation: annotations_maybe annotation_appl */
5186 #line 2484 "fe/idl.ypp"
5188 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
5189 AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val);
5190 if (annotation)
5192 annotations->add (annotation);
5194 (yyval.annotations_val) = annotations;
5196 #line 5209 "fe/idl.tab.cpp"
5197 break;
5199 case 212: /* annotations_maybe: annotations_maybe annotation_appl */
5200 #line 2497 "fe/idl.ypp"
5202 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
5203 AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val);
5204 if (annotation)
5206 annotations->add (annotation);
5208 (yyval.annotations_val) = annotations;
5210 #line 5223 "fe/idl.tab.cpp"
5211 break;
5213 case 213: /* annotations_maybe: %empty */
5214 #line 2507 "fe/idl.ypp"
5216 (yyval.annotations_val) = new AST_Annotation_Appls ();
5218 #line 5231 "fe/idl.tab.cpp"
5219 break;
5221 case 214: /* @60: %empty */
5222 #line 2514 "fe/idl.ypp"
5224 if (idl_global->idl_version_ < IDL_VERSION_4)
5226 idl_global->err ()->idl_version_error (
5227 "Annotations are an IDL4 feature");
5230 AST_Annotation_Decl *decl = 0;
5231 UTL_ScopedName *name = (yyvsp[0].idlist);
5232 AST_Annotation_Decl::escape_name (name);
5234 // Check for Matching Annotation Declaration
5235 AST_Decl *d = idl_global->scopes ().top_non_null ()->
5236 lookup_by_name (name);
5237 if (d)
5239 decl = dynamic_cast<AST_Annotation_Decl*> (d);
5240 if (decl)
5242 idl_global->scopes ().push (decl);
5245 else
5247 Identifier &id = *name->last_component ();
5248 switch (idl_global->unknown_annotations_)
5250 default:
5251 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ONCE:
5252 if (idl_global->unknown_annotations_seen_.insert (id) == 1)
5254 break;
5256 idl_global->err ()->lookup_warning (name);
5257 break;
5258 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ALL:
5259 idl_global->err ()->lookup_warning (name);
5260 break;
5261 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_ERROR:
5262 idl_global->err ()->lookup_error (name);
5263 break;
5264 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_IGNORE:
5265 break;
5269 * Ignore lookup errors for parameter values that might depend on
5270 * constants or enums from the missing annotation declaration.
5272 idl_global->ignore_lookup_errors_ = true;
5275 stack_based_lookup_for_primary_expr = true;
5277 (yyval.annotation_decl_val) = decl;
5279 #line 5292 "fe/idl.tab.cpp"
5280 break;
5282 case 215: /* annotation_appl: IDL_ANNOTATION_SYMBOL scoped_name @60 annotation_appl_params_maybe */
5283 #line 2571 "fe/idl.ypp"
5285 idl_global->ignore_lookup_errors_ = false;
5286 stack_based_lookup_for_primary_expr = false;
5287 AST_Annotation_Appl *appl = 0;
5288 UTL_ScopedName *name = (yyvsp[-2].idlist);
5289 AST_Annotation_Decl *decl = (yyvsp[-1].annotation_decl_val);
5290 AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
5292 if (decl)
5294 appl = idl_global->gen ()->create_annotation_appl (name, params);
5295 appl->apply_from (decl);
5296 idl_global->scopes ().pop ();
5298 else
5300 AST_Annotation_Appl::delete_params (params);
5303 if (name)
5305 name->destroy ();
5306 delete name;
5309 (yyval.annotation_val) = appl;
5311 #line 5324 "fe/idl.tab.cpp"
5312 break;
5314 case 216: /* annotation_appl_params_maybe: '(' annotation_appl_params ')' */
5315 #line 2602 "fe/idl.ypp"
5317 (yyval.annotation_params_val) = (yyvsp[-1].annotation_params_val);
5319 #line 5332 "fe/idl.tab.cpp"
5320 break;
5322 case 217: /* annotation_appl_params_maybe: %empty */
5323 #line 2606 "fe/idl.ypp"
5325 (yyval.annotation_params_val) = 0;
5327 #line 5340 "fe/idl.tab.cpp"
5328 break;
5330 case 218: /* annotation_appl_params: const_expr */
5331 #line 2613 "fe/idl.ypp"
5333 AST_Annotation_Appl::Params *params = new AST_Annotation_Appl::Params;
5334 AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
5335 param->id = 0;
5336 param->expr = (yyvsp[0].exval);
5337 params->push (param);
5338 (yyval.annotation_params_val) = params;
5340 #line 5353 "fe/idl.tab.cpp"
5341 break;
5343 case 219: /* annotation_appl_params: named_annotation_appl_params */
5344 #line 2622 "fe/idl.ypp"
5346 (yyval.annotation_params_val) = (yyvsp[0].annotation_params_val);
5348 #line 5361 "fe/idl.tab.cpp"
5349 break;
5351 case 220: /* named_annotation_appl_params: named_annotation_appl_param more_named_annotation_appl_params */
5352 #line 2629 "fe/idl.ypp"
5354 AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
5355 params->push ((yyvsp[-1].annotation_param_val));
5356 (yyval.annotation_params_val) = params;
5358 #line 5371 "fe/idl.tab.cpp"
5359 break;
5361 case 221: /* more_named_annotation_appl_params: ',' named_annotation_appl_param more_named_annotation_appl_params */
5362 #line 2637 "fe/idl.ypp"
5364 AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
5365 params->push ((yyvsp[-1].annotation_param_val));
5366 (yyval.annotation_params_val) = params;
5368 #line 5381 "fe/idl.tab.cpp"
5369 break;
5371 case 222: /* more_named_annotation_appl_params: %empty */
5372 #line 2643 "fe/idl.ypp"
5374 (yyval.annotation_params_val) = new AST_Annotation_Appl::Params;
5376 #line 5389 "fe/idl.tab.cpp"
5377 break;
5379 case 223: /* named_annotation_appl_param: id '=' const_expr */
5380 #line 2650 "fe/idl.ypp"
5382 AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
5383 param->id = (yyvsp[-2].idval);
5384 // Annotation Member Names Can't Clash with C++ keywords
5385 FE_Utils::original_local_name (param->id);
5386 param->expr = (yyvsp[0].exval);
5387 (yyval.annotation_param_val) = param;
5389 #line 5402 "fe/idl.tab.cpp"
5390 break;
5392 case 224: /* $@61: %empty */
5393 #line 2662 "fe/idl.ypp"
5395 idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
5396 idl_global->in_typedef (true);
5398 #line 5411 "fe/idl.tab.cpp"
5399 break;
5401 case 225: /* type_dcl: IDL_TYPEDEF $@61 type_declarator */
5402 #line 2667 "fe/idl.ypp"
5404 (yyval.dcval) = (yyvsp[0].dcval);
5406 #line 5419 "fe/idl.tab.cpp"
5407 break;
5409 case 226: /* type_dcl: struct_type */
5410 #line 2671 "fe/idl.ypp"
5412 (yyval.dcval) = (yyvsp[0].dcval);
5414 #line 5427 "fe/idl.tab.cpp"
5415 break;
5417 case 227: /* type_dcl: union_type */
5418 #line 2675 "fe/idl.ypp"
5420 (yyval.dcval) = (yyvsp[0].dcval);
5422 #line 5435 "fe/idl.tab.cpp"
5423 break;
5425 case 228: /* type_dcl: enum_type */
5426 #line 2679 "fe/idl.ypp"
5428 (yyval.dcval) = (yyvsp[0].dcval);
5430 #line 5443 "fe/idl.tab.cpp"
5431 break;
5433 case 229: /* type_dcl: IDL_NATIVE simple_declarator */
5434 #line 2683 "fe/idl.ypp"
5436 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5437 AST_Native *node = 0;
5438 idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen);
5441 * Create a node representing a Native and add it to its
5442 * enclosing scope
5444 if (s != 0)
5446 node =
5447 idl_global->gen ()->create_native (
5448 (yyvsp[0].deval)->name ()
5451 * Add it to its defining scope
5453 (void) s->fe_add_native (node);
5456 (yyvsp[0].deval)->destroy ();
5457 delete (yyvsp[0].deval);
5458 (yyvsp[0].deval) = 0;
5460 (yyval.dcval) = 0;
5462 #line 5475 "fe/idl.tab.cpp"
5463 break;
5465 case 230: /* type_dcl: constructed_forward_type_spec */
5466 #line 2711 "fe/idl.ypp"
5468 (yyval.dcval) = 0;
5470 #line 5483 "fe/idl.tab.cpp"
5471 break;
5473 case 231: /* $@62: %empty */
5474 #line 2718 "fe/idl.ypp"
5476 idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
5478 #line 5491 "fe/idl.tab.cpp"
5479 break;
5481 case 232: /* type_declarator: type_spec $@62 at_least_one_declarator */
5482 #line 2722 "fe/idl.ypp"
5484 AST_Decl *type_spec = (yyvsp[-2].dcval);
5485 UTL_DeclList *decls = (yyvsp[0].dlval);
5487 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5488 FE_Declarator *d = 0;
5489 AST_Typedef *t = 0;
5490 unsigned long index = 0UL;
5491 idl_global->set_parse_state (IDL_GlobalData::PS_DeclaratorsSeen);
5494 * Create a list of type renamings. Add them to the
5495 * enclosing scope
5497 if (s && type_spec && decls)
5499 for (UTL_DecllistActiveIterator l (decls); !l.is_done (); l.next ())
5501 d = l.item ();
5502 if (d == 0)
5504 continue;
5507 AST_Type *tp = d->compose (type_spec);
5508 if (tp == 0)
5510 continue;
5513 if (AST_Decl::NT_except == tp->node_type ())
5515 idl_global->err ()->not_a_type (tp);
5516 continue;
5519 t = idl_global->gen ()->create_typedef (tp,
5520 d->name (),
5521 s->is_local (),
5522 s->is_abstract ());
5524 // If the base type is a sequence or array, the typedef
5525 // constructor sets owns_base_type_ to true. But if
5526 // there is a comma-separated list of such typedefs,
5527 // the base type can be destroyed only once. In all
5528 // other cases, the line below has no effect.
5529 if (index++ > 0)
5531 t->owns_base_type (false);
5534 (void) s->fe_add_typedef (t);
5535 idl_global->in_typedef (false);
5538 // This FE_Declarator class isn't destroyed with the AST.
5539 decls->destroy ();
5540 delete decls;
5541 (yyvsp[0].dlval) = decls = 0;
5544 (yyval.dcval) = t;
5546 #line 5559 "fe/idl.tab.cpp"
5547 break;
5549 case 235: /* simple_type_spec: base_type_spec */
5550 #line 2794 "fe/idl.ypp"
5552 (yyval.dcval) =
5553 idl_global->scopes ().bottom ()->lookup_primitive_type (
5554 (yyvsp[0].etval)
5557 #line 5570 "fe/idl.tab.cpp"
5558 break;
5560 case 237: /* simple_type_spec: scoped_name */
5561 #line 2802 "fe/idl.ypp"
5563 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5564 AST_Decl *d = 0;
5566 if (s != 0)
5569 s->lookup_by_name ((yyvsp[0].idlist));
5572 if (d == 0)
5574 idl_global->err ()->lookup_error ((yyvsp[0].idlist));
5576 else
5578 d->last_referenced_as ((yyvsp[0].idlist));
5582 (yyval.dcval) = d;
5584 #line 5597 "fe/idl.tab.cpp"
5585 break;
5587 case 256: /* at_least_one_declarator: declarator declarators */
5588 #line 2858 "fe/idl.ypp"
5590 ACE_NEW_RETURN ((yyval.dlval),
5591 UTL_DeclList ((yyvsp[-1].deval),
5592 (yyvsp[0].dlval)),
5595 #line 5608 "fe/idl.tab.cpp"
5596 break;
5598 case 257: /* $@63: %empty */
5599 #line 2869 "fe/idl.ypp"
5601 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
5603 #line 5616 "fe/idl.tab.cpp"
5604 break;
5606 case 258: /* declarators: declarators ',' $@63 declarator */
5607 #line 2873 "fe/idl.ypp"
5609 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
5611 UTL_DeclList *dl = 0;
5612 ACE_NEW_RETURN (dl,
5613 UTL_DeclList ((yyvsp[0].deval),
5617 if ((yyvsp[-3].dlval) == 0)
5619 (yyval.dlval) = dl;
5621 else
5623 (yyvsp[-3].dlval)->nconc (dl);
5624 (yyval.dlval) = (yyvsp[-3].dlval);
5627 #line 5640 "fe/idl.tab.cpp"
5628 break;
5630 case 259: /* declarators: %empty */
5631 #line 2893 "fe/idl.ypp"
5633 (yyval.dlval) = 0;
5635 #line 5648 "fe/idl.tab.cpp"
5636 break;
5638 case 262: /* at_least_one_simple_declarator: simple_declarator simple_declarators */
5639 #line 2905 "fe/idl.ypp"
5641 ACE_NEW_RETURN ((yyval.dlval),
5642 UTL_DeclList ((yyvsp[-1].deval),
5643 (yyvsp[0].dlval)),
5646 #line 5659 "fe/idl.tab.cpp"
5647 break;
5649 case 263: /* $@64: %empty */
5650 #line 2916 "fe/idl.ypp"
5652 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
5654 #line 5667 "fe/idl.tab.cpp"
5655 break;
5657 case 264: /* simple_declarators: simple_declarators ',' $@64 simple_declarator */
5658 #line 2920 "fe/idl.ypp"
5660 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
5662 UTL_DeclList *dl = 0;
5663 ACE_NEW_RETURN (dl,
5664 UTL_DeclList ((yyvsp[0].deval),
5668 if ((yyvsp[-3].dlval) == 0)
5670 (yyval.dlval) = dl;
5672 else
5674 (yyvsp[-3].dlval)->nconc (dl);
5675 (yyval.dlval) = (yyvsp[-3].dlval);
5678 #line 5691 "fe/idl.tab.cpp"
5679 break;
5681 case 265: /* simple_declarators: %empty */
5682 #line 2940 "fe/idl.ypp"
5684 (yyval.dlval) = 0;
5686 #line 5699 "fe/idl.tab.cpp"
5687 break;
5689 case 266: /* simple_declarator: defining_id */
5690 #line 2947 "fe/idl.ypp"
5692 UTL_ScopedName *sn = 0;
5693 ACE_NEW_RETURN (sn,
5694 UTL_ScopedName ((yyvsp[0].idval),
5697 ACE_NEW_RETURN ((yyval.deval),
5698 FE_Declarator (sn,
5699 FE_Declarator::FD_simple,
5703 #line 5716 "fe/idl.tab.cpp"
5704 break;
5706 case 267: /* complex_declarator: array_declarator */
5707 #line 2963 "fe/idl.ypp"
5709 UTL_ScopedName *sn = 0;
5710 ACE_NEW_RETURN (sn,
5711 UTL_ScopedName (
5712 (yyvsp[0].dcval)->local_name ()->copy (),
5716 ACE_NEW_RETURN ((yyval.deval),
5717 FE_Declarator (sn,
5718 FE_Declarator::FD_complex,
5719 (yyvsp[0].dcval)),
5722 #line 5735 "fe/idl.tab.cpp"
5723 break;
5725 case 270: /* signed_int: IDL_LONG */
5726 #line 2986 "fe/idl.ypp"
5728 (yyval.etval) = AST_Expression::EV_long;
5730 #line 5743 "fe/idl.tab.cpp"
5731 break;
5733 case 271: /* signed_int: IDL_LONG IDL_LONG */
5734 #line 2990 "fe/idl.ypp"
5736 (yyval.etval) = AST_Expression::EV_longlong;
5738 #line 5751 "fe/idl.tab.cpp"
5739 break;
5741 case 272: /* signed_int: IDL_SHORT */
5742 #line 2994 "fe/idl.ypp"
5744 (yyval.etval) = AST_Expression::EV_short;
5746 #line 5759 "fe/idl.tab.cpp"
5747 break;
5749 case 273: /* signed_int: IDL_INT8 */
5750 #line 2998 "fe/idl.ypp"
5752 (yyval.etval) = AST_Expression::EV_int8;
5754 #line 5767 "fe/idl.tab.cpp"
5755 break;
5757 case 274: /* signed_int: IDL_INT16 */
5758 #line 3002 "fe/idl.ypp"
5760 (yyval.etval) = AST_Expression::EV_short;
5762 #line 5775 "fe/idl.tab.cpp"
5763 break;
5765 case 275: /* signed_int: IDL_INT32 */
5766 #line 3006 "fe/idl.ypp"
5768 (yyval.etval) = AST_Expression::EV_long;
5770 #line 5783 "fe/idl.tab.cpp"
5771 break;
5773 case 276: /* signed_int: IDL_INT64 */
5774 #line 3010 "fe/idl.ypp"
5776 (yyval.etval) = AST_Expression::EV_longlong;
5778 #line 5791 "fe/idl.tab.cpp"
5779 break;
5781 case 277: /* unsigned_int: IDL_UNSIGNED IDL_LONG */
5782 #line 3017 "fe/idl.ypp"
5784 (yyval.etval) = AST_Expression::EV_ulong;
5786 #line 5799 "fe/idl.tab.cpp"
5787 break;
5789 case 278: /* unsigned_int: IDL_UNSIGNED IDL_LONG IDL_LONG */
5790 #line 3021 "fe/idl.ypp"
5792 (yyval.etval) = AST_Expression::EV_ulonglong;
5794 #line 5807 "fe/idl.tab.cpp"
5795 break;
5797 case 279: /* unsigned_int: IDL_UNSIGNED IDL_SHORT */
5798 #line 3025 "fe/idl.ypp"
5800 (yyval.etval) = AST_Expression::EV_ushort;
5802 #line 5815 "fe/idl.tab.cpp"
5803 break;
5805 case 280: /* unsigned_int: IDL_UINT8 */
5806 #line 3029 "fe/idl.ypp"
5808 (yyval.etval) = AST_Expression::EV_uint8;
5810 #line 5823 "fe/idl.tab.cpp"
5811 break;
5813 case 281: /* unsigned_int: IDL_UINT16 */
5814 #line 3033 "fe/idl.ypp"
5816 (yyval.etval) = AST_Expression::EV_ushort;
5818 #line 5831 "fe/idl.tab.cpp"
5819 break;
5821 case 282: /* unsigned_int: IDL_UINT32 */
5822 #line 3037 "fe/idl.ypp"
5824 (yyval.etval) = AST_Expression::EV_ulong;
5826 #line 5839 "fe/idl.tab.cpp"
5827 break;
5829 case 283: /* unsigned_int: IDL_UINT64 */
5830 #line 3041 "fe/idl.ypp"
5832 (yyval.etval) = AST_Expression::EV_ulonglong;
5834 #line 5847 "fe/idl.tab.cpp"
5835 break;
5837 case 284: /* floating_pt_type: IDL_DOUBLE */
5838 #line 3048 "fe/idl.ypp"
5840 (yyval.etval) = AST_Expression::EV_double;
5842 #line 5855 "fe/idl.tab.cpp"
5843 break;
5845 case 285: /* floating_pt_type: IDL_FLOAT */
5846 #line 3052 "fe/idl.ypp"
5848 (yyval.etval) = AST_Expression::EV_float;
5850 #line 5863 "fe/idl.tab.cpp"
5851 break;
5853 case 286: /* floating_pt_type: IDL_LONG IDL_DOUBLE */
5854 #line 3056 "fe/idl.ypp"
5856 (yyval.etval) = AST_Expression::EV_longdouble;
5858 #line 5871 "fe/idl.tab.cpp"
5859 break;
5861 case 287: /* fixed_type: IDL_FIXED */
5862 #line 3063 "fe/idl.ypp"
5864 (yyval.etval) = AST_Expression::EV_fixed;
5866 #line 5879 "fe/idl.tab.cpp"
5867 break;
5869 case 288: /* char_type: IDL_CHAR */
5870 #line 3070 "fe/idl.ypp"
5872 (yyval.etval) = AST_Expression::EV_char;
5874 #line 5887 "fe/idl.tab.cpp"
5875 break;
5877 case 289: /* char_type: IDL_WCHAR */
5878 #line 3074 "fe/idl.ypp"
5880 (yyval.etval) = AST_Expression::EV_wchar;
5882 #line 5895 "fe/idl.tab.cpp"
5883 break;
5885 case 290: /* octet_type: IDL_OCTET */
5886 #line 3081 "fe/idl.ypp"
5888 (yyval.etval) = AST_Expression::EV_octet;
5890 #line 5903 "fe/idl.tab.cpp"
5891 break;
5893 case 291: /* boolean_type: IDL_BOOLEAN */
5894 #line 3088 "fe/idl.ypp"
5896 (yyval.etval) = AST_Expression::EV_bool;
5898 #line 5911 "fe/idl.tab.cpp"
5899 break;
5901 case 292: /* any_type: IDL_ANY */
5902 #line 3095 "fe/idl.ypp"
5904 (yyval.etval) = AST_Expression::EV_any;
5906 #line 5919 "fe/idl.tab.cpp"
5907 break;
5909 case 293: /* object_type: IDL_OBJECT */
5910 #line 3102 "fe/idl.ypp"
5912 (yyval.etval) = AST_Expression::EV_object;
5914 #line 5927 "fe/idl.tab.cpp"
5915 break;
5917 case 294: /* $@65: %empty */
5918 #line 3109 "fe/idl.ypp"
5920 idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
5922 #line 5935 "fe/idl.tab.cpp"
5923 break;
5925 case 295: /* struct_decl: IDL_STRUCT $@65 defining_id */
5926 #line 3113 "fe/idl.ypp"
5928 idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
5929 (yyval.idval) = (yyvsp[0].idval);
5931 #line 5944 "fe/idl.tab.cpp"
5932 break;
5934 case 296: /* $@66: %empty */
5935 #line 3122 "fe/idl.ypp"
5937 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5938 UTL_ScopedName n ((yyvsp[0].idval), 0);
5939 AST_Structure *d = 0;
5942 * Create a node representing a struct declaration. Add it
5943 * to the enclosing scope
5945 if (s != 0)
5948 idl_global->gen ()->create_structure (
5950 s->is_local (),
5951 s->is_abstract ()
5953 AST_Structure::fwd_redefinition_helper (d, s);
5954 (void) s->fe_add_structure (d);
5958 * Push the scope of the struct on the scopes stack.
5960 idl_global->scopes ().push (d);
5962 (yyvsp[0].idval)->destroy ();
5963 delete (yyvsp[0].idval);
5964 (yyvsp[0].idval) = 0;
5966 #line 5979 "fe/idl.tab.cpp"
5967 break;
5969 case 297: /* $@67: %empty */
5970 #line 3153 "fe/idl.ypp"
5972 idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
5974 #line 5987 "fe/idl.tab.cpp"
5975 break;
5977 case 298: /* $@68: %empty */
5978 #line 3157 "fe/idl.ypp"
5980 idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
5982 #line 5995 "fe/idl.tab.cpp"
5983 break;
5985 case 299: /* struct_type: struct_decl $@66 '{' $@67 at_least_one_member $@68 '}' */
5986 #line 3161 "fe/idl.ypp"
5988 idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
5991 * Done with this struct. Pop its scope off the scopes stack.
5993 (yyval.dcval) = dynamic_cast<AST_Structure*> (
5994 idl_global->scopes ().top_non_null ()
5996 idl_global->scopes ().pop ();
5998 #line 6011 "fe/idl.tab.cpp"
5999 break;
6001 case 303: /* member: annotations_maybe member_i */
6002 #line 3183 "fe/idl.ypp"
6004 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
6005 AST_Decls *members = (yyvsp[0].decls_val);
6006 if (annotations && members)
6008 for (size_t i = 0; i < members->size (); i++)
6010 (*members)[i]->annotation_appls (*annotations);
6013 delete annotations;
6014 delete members;
6016 #line 6029 "fe/idl.tab.cpp"
6017 break;
6019 case 304: /* $@69: %empty */
6020 #line 3200 "fe/idl.ypp"
6022 idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
6024 #line 6037 "fe/idl.tab.cpp"
6025 break;
6027 case 305: /* $@70: %empty */
6028 #line 3204 "fe/idl.ypp"
6030 idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
6032 #line 6045 "fe/idl.tab.cpp"
6033 break;
6035 case 306: /* member_i: type_spec $@69 at_least_one_declarator $@70 ';' */
6036 #line 3208 "fe/idl.ypp"
6038 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6039 FE_Declarator *d = 0;
6040 AST_Field *f = 0;
6041 idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted);
6042 AST_Decls *members = 0;
6045 * Check for illegal recursive use of type.
6047 if ((yyvsp[-4].dcval) != 0
6048 && AST_illegal_recursive_type ((yyvsp[-4].dcval)))
6050 idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE,
6051 (yyvsp[-4].dcval));
6054 * Create a node representing a struct or exception member
6055 * Add it to the enclosing scope.
6057 else if (s && (yyvsp[-4].dcval) && (yyvsp[-2].dlval))
6059 members = new AST_Decls;
6060 for (UTL_DecllistActiveIterator l ((yyvsp[-2].dlval));
6061 !l.is_done ();
6062 l.next ())
6064 d = l.item ();
6066 if (d == 0)
6068 continue;
6071 AST_Type *tp = d->compose ((yyvsp[-4].dcval));
6073 if (tp == 0)
6075 continue;
6078 f = idl_global->gen ()->create_field (tp, d->name ());
6079 members->push_back (f);
6080 (void) s->fe_add_field (f);
6084 (yyvsp[-2].dlval)->destroy ();
6085 delete (yyvsp[-2].dlval);
6086 (yyvsp[-2].dlval) = 0;
6088 (yyval.decls_val) = members;
6090 #line 6103 "fe/idl.tab.cpp"
6091 break;
6093 case 307: /* $@71: %empty */
6094 #line 3262 "fe/idl.ypp"
6096 idl_global->err ()->syntax_error (idl_global->parse_state ());
6098 #line 6111 "fe/idl.tab.cpp"
6099 break;
6101 case 308: /* member_i: error $@71 ';' */
6102 #line 3266 "fe/idl.ypp"
6104 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
6105 yyerrok;
6107 #line 6120 "fe/idl.tab.cpp"
6108 break;
6110 case 309: /* $@72: %empty */
6111 #line 3274 "fe/idl.ypp"
6113 idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
6115 #line 6128 "fe/idl.tab.cpp"
6116 break;
6118 case 310: /* union_decl: IDL_UNION $@72 defining_id */
6119 #line 3278 "fe/idl.ypp"
6121 idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
6122 (yyval.idval) = (yyvsp[0].idval);
6124 #line 6137 "fe/idl.tab.cpp"
6125 break;
6127 case 311: /* $@73: %empty */
6128 #line 3286 "fe/idl.ypp"
6130 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
6132 #line 6145 "fe/idl.tab.cpp"
6133 break;
6135 case 312: /* $@74: %empty */
6136 #line 3290 "fe/idl.ypp"
6138 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6139 UTL_ScopedName n ((yyvsp[-3].idval), 0);
6140 AST_Union *u = 0;
6141 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
6144 * Create a node representing an empty union. Add it to its enclosing
6145 * scope.
6147 if (s != 0)
6149 u = idl_global->gen ()->create_union (0,
6151 s->is_local (),
6152 s->is_abstract ());
6154 AST_Structure *st = dynamic_cast<AST_Structure*> (u);
6155 AST_Structure::fwd_redefinition_helper (st, s);
6156 u = dynamic_cast<AST_Union*> (st);
6157 (void) s->fe_add_union (u);
6161 * Push the scope of the union on the scopes stack
6163 idl_global->scopes ().push (u);
6166 * Don't delete $1 yet; we'll need it a bit later.
6169 #line 6182 "fe/idl.tab.cpp"
6170 break;
6172 case 313: /* $@75: %empty */
6173 #line 3323 "fe/idl.ypp"
6175 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
6177 #line 6190 "fe/idl.tab.cpp"
6178 break;
6180 case 314: /* $@76: %empty */
6181 #line 3327 "fe/idl.ypp"
6184 * The top of the scopes must be an empty union we added after we
6185 * encountered 'union <id> switch ('. Now we are ready to add a
6186 * correct one. Temporarily remove the top so that we setup the
6187 * correct union in a right scope.
6189 UTL_Scope *top = idl_global->scopes ().top_non_null ();
6190 idl_global->scopes ().pop ();
6191 AST_Annotation_Appls *disc_annotations = (yyvsp[-3].annotations_val);
6193 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6194 UTL_ScopedName n ((yyvsp[-8].idval), 0);
6195 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen);
6198 * Create a node representing a union.
6200 if ((yyvsp[-2].dcval) != 0 && s != 0)
6202 AST_ConcreteType *tp =
6203 dynamic_cast<AST_ConcreteType*> ((yyvsp[-2].dcval));
6205 if (tp == 0)
6207 idl_global->err ()->not_a_type ((yyvsp[-2].dcval));
6209 else
6211 /* Create a union with a correct discriminator. */
6212 AST_Union *u = 0;
6213 u = idl_global->gen ()->create_union (tp,
6215 s->is_local (),
6216 s->is_abstract ());
6218 /* Narrow the enclosing scope. */
6219 AST_Union *e = dynamic_cast<AST_Union*> (top);
6221 e->redefine (u);
6222 e->disc_annotations (*disc_annotations); // Set Discriminator Annotations
6224 u->destroy ();
6225 delete u;
6230 * Restore the top.
6232 idl_global->scopes ().push (top);
6234 (yyvsp[-8].idval)->destroy ();
6235 delete (yyvsp[-8].idval);
6236 (yyvsp[-8].idval) = 0;
6238 delete disc_annotations;
6240 #line 6253 "fe/idl.tab.cpp"
6241 break;
6243 case 315: /* $@77: %empty */
6244 #line 3386 "fe/idl.ypp"
6246 idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
6248 #line 6261 "fe/idl.tab.cpp"
6249 break;
6251 case 316: /* $@78: %empty */
6252 #line 3390 "fe/idl.ypp"
6254 idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
6256 #line 6269 "fe/idl.tab.cpp"
6257 break;
6259 case 317: /* union_type: union_decl IDL_SWITCH $@73 '(' $@74 annotations_maybe switch_type_spec $@75 ')' $@76 '{' $@77 at_least_one_case_branch $@78 '}' */
6260 #line 3394 "fe/idl.ypp"
6262 idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
6265 * Done with this union. Pop its scope from the scopes stack.
6267 (yyval.dcval) = dynamic_cast<AST_Union*> (
6268 idl_global->scopes ().top_non_null ()
6271 if ((yyval.dcval) != 0)
6273 idl_global->scopes ().pop ();
6276 #line 6289 "fe/idl.tab.cpp"
6277 break;
6279 case 318: /* switch_type_spec: integer_type */
6280 #line 3413 "fe/idl.ypp"
6282 (yyval.dcval) =
6283 idl_global->scopes ().bottom ()->lookup_primitive_type (
6284 (yyvsp[0].etval)
6287 #line 6300 "fe/idl.tab.cpp"
6288 break;
6290 case 319: /* switch_type_spec: char_type */
6291 #line 3420 "fe/idl.ypp"
6293 /* wchars are not allowed. */
6294 if ((yyvsp[0].etval) == AST_Expression::EV_wchar)
6296 idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
6299 (yyval.dcval) =
6300 idl_global->scopes ().bottom ()->lookup_primitive_type (
6301 (yyvsp[0].etval)
6304 #line 6317 "fe/idl.tab.cpp"
6305 break;
6307 case 320: /* switch_type_spec: octet_type */
6308 #line 3433 "fe/idl.ypp"
6310 /* octets are not allowed. */
6311 idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE);
6312 (yyval.dcval) =
6313 idl_global->scopes ().bottom ()->lookup_primitive_type (
6314 (yyvsp[0].etval)
6317 #line 6330 "fe/idl.tab.cpp"
6318 break;
6320 case 321: /* switch_type_spec: boolean_type */
6321 #line 3442 "fe/idl.ypp"
6323 (yyval.dcval) =
6324 idl_global->scopes ().bottom ()->lookup_primitive_type (
6325 (yyvsp[0].etval)
6328 #line 6341 "fe/idl.tab.cpp"
6329 break;
6331 case 323: /* switch_type_spec: scoped_name */
6332 #line 3450 "fe/idl.ypp"
6334 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6335 AST_Decl *d = 0;
6336 AST_PredefinedType *p = 0;
6337 AST_Typedef *t = 0;
6338 bool found = false;
6341 * The discriminator is a scoped name. Try to resolve to
6342 * one of the scalar types or to an enum. Thread through
6343 * typedef's to arrive at the base type at the end of the
6344 * chain.
6347 s->lookup_by_name ((yyvsp[0].idlist));
6349 if (s != 0 && d != 0)
6351 while (!found)
6353 switch (d->node_type ())
6355 case AST_Decl::NT_enum:
6356 (yyval.dcval) = d;
6357 found = true;
6358 break;
6359 case AST_Decl::NT_pre_defined:
6360 p = dynamic_cast<AST_PredefinedType*> (d);
6362 if (p != 0)
6364 switch (p->pt ())
6366 case AST_PredefinedType::PT_long:
6367 case AST_PredefinedType::PT_ulong:
6368 case AST_PredefinedType::PT_longlong:
6369 case AST_PredefinedType::PT_ulonglong:
6370 case AST_PredefinedType::PT_short:
6371 case AST_PredefinedType::PT_ushort:
6372 case AST_PredefinedType::PT_char:
6373 case AST_PredefinedType::PT_boolean:
6374 (yyval.dcval) = p;
6375 found = true;
6376 break;
6377 case AST_PredefinedType::PT_wchar:
6378 case AST_PredefinedType::PT_octet:
6379 /* octets and wchars are not allowed */
6380 idl_global->err ()->error0 (
6381 UTL_Error::EIDL_DISC_TYPE
6383 (yyval.dcval) = 0;
6384 found = true;
6385 break;
6386 default:
6387 (yyval.dcval) = 0;
6388 found = true;
6389 break;
6392 else
6394 (yyval.dcval) = 0;
6395 found = true;
6398 break;
6399 case AST_Decl::NT_typedef:
6400 t = dynamic_cast<AST_Typedef*> (d);
6402 if (t != 0)
6404 d = t->base_type ();
6407 break;
6408 default:
6409 (yyval.dcval) = 0;
6410 found = true;
6411 break;
6415 else
6417 (yyval.dcval) = 0;
6420 if ((yyval.dcval) == 0)
6422 idl_global->err ()->lookup_error ((yyvsp[0].idlist));
6424 (yyvsp[0].idlist)->destroy ();
6425 delete (yyvsp[0].idlist);
6426 (yyvsp[0].idlist) = 0;
6428 /* If we don't return here, we'll crash later.*/
6429 if (!idl_global->ignore_lookup_errors_)
6431 return 1;
6435 (yyvsp[0].idlist)->destroy ();
6436 delete (yyvsp[0].idlist);
6437 (yyvsp[0].idlist) = 0;
6439 #line 6452 "fe/idl.tab.cpp"
6440 break;
6442 case 327: /* $@79: %empty */
6443 #line 3567 "fe/idl.ypp"
6445 idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
6447 #line 6460 "fe/idl.tab.cpp"
6448 break;
6450 case 328: /* $@80: %empty */
6451 #line 3571 "fe/idl.ypp"
6453 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
6455 #line 6468 "fe/idl.tab.cpp"
6456 break;
6458 case 329: /* case_branch: at_least_one_case_label $@79 annotations_maybe element_spec $@80 ';' */
6459 #line 3575 "fe/idl.ypp"
6461 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6462 AST_UnionBranch *b = 0;
6463 AST_Annotation_Appls *annotations = (yyvsp[-3].annotations_val);
6464 AST_Field *f = (yyvsp[-2].ffval);
6465 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemCompleted);
6468 * Create several nodes representing branches of a union.
6469 * Add them to the enclosing scope (the union scope)
6471 if (s != 0 && (yyvsp[-5].llval) != 0 && (yyvsp[-2].ffval) != 0)
6474 idl_global->gen ()->create_union_branch (
6475 (yyvsp[-5].llval),
6476 f->field_type (),
6477 f->name ()
6479 b->annotation_appls (*annotations);
6480 (void) s->fe_add_union_branch (b);
6482 // f has passed its field type to the union branch,
6483 // but the rest still needs to be cleaned up.
6484 f->AST_Decl::destroy ();
6485 delete f;
6486 f = 0;
6489 delete annotations;
6491 #line 6504 "fe/idl.tab.cpp"
6492 break;
6494 case 330: /* $@81: %empty */
6495 #line 3607 "fe/idl.ypp"
6497 idl_global->err ()->syntax_error (idl_global->parse_state ());
6499 #line 6512 "fe/idl.tab.cpp"
6500 break;
6502 case 331: /* case_branch: error $@81 ';' */
6503 #line 3611 "fe/idl.ypp"
6505 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
6506 yyerrok;
6508 #line 6521 "fe/idl.tab.cpp"
6509 break;
6511 case 332: /* at_least_one_case_label: case_label case_labels */
6512 #line 3619 "fe/idl.ypp"
6514 ACE_NEW_RETURN ((yyval.llval),
6515 UTL_LabelList ((yyvsp[-1].ulval),
6516 (yyvsp[0].llval)),
6519 #line 6532 "fe/idl.tab.cpp"
6520 break;
6522 case 333: /* case_labels: case_labels case_label */
6523 #line 3629 "fe/idl.ypp"
6525 UTL_LabelList *ll = 0;
6526 ACE_NEW_RETURN (ll,
6527 UTL_LabelList ((yyvsp[0].ulval),
6531 if ((yyvsp[-1].llval) == 0)
6533 (yyval.llval) = ll;
6535 else
6537 (yyvsp[-1].llval)->nconc (ll);
6538 (yyval.llval) = (yyvsp[-1].llval);
6541 #line 6554 "fe/idl.tab.cpp"
6542 break;
6544 case 334: /* case_labels: %empty */
6545 #line 3647 "fe/idl.ypp"
6547 (yyval.llval) = 0;
6549 #line 6562 "fe/idl.tab.cpp"
6550 break;
6552 case 335: /* $@82: %empty */
6553 #line 3654 "fe/idl.ypp"
6555 idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen);
6557 #line 6570 "fe/idl.tab.cpp"
6558 break;
6560 case 336: /* case_label: IDL_DEFAULT $@82 ':' */
6561 #line 3658 "fe/idl.ypp"
6563 idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
6565 (yyval.ulval) = idl_global->gen ()->create_union_label (
6566 AST_UnionLabel::UL_default,
6570 #line 6583 "fe/idl.tab.cpp"
6571 break;
6573 case 337: /* $@83: %empty */
6574 #line 3667 "fe/idl.ypp"
6576 idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
6578 #line 6591 "fe/idl.tab.cpp"
6579 break;
6581 case 338: /* $@84: %empty */
6582 #line 3671 "fe/idl.ypp"
6584 idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen);
6586 #line 6599 "fe/idl.tab.cpp"
6587 break;
6589 case 339: /* case_label: IDL_CASE $@83 const_expr $@84 ':' */
6590 #line 3675 "fe/idl.ypp"
6592 idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
6594 (yyval.ulval) = idl_global->gen ()->create_union_label (
6595 AST_UnionLabel::UL_label,
6596 (yyvsp[-2].exval)
6599 #line 6612 "fe/idl.tab.cpp"
6600 break;
6602 case 340: /* $@85: %empty */
6603 #line 3687 "fe/idl.ypp"
6605 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
6607 #line 6620 "fe/idl.tab.cpp"
6608 break;
6610 case 341: /* element_spec: type_spec $@85 declarator */
6611 #line 3691 "fe/idl.ypp"
6613 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
6616 * Check for illegal recursive use of type
6618 if ((yyvsp[-2].dcval) != 0
6619 && AST_illegal_recursive_type ((yyvsp[-2].dcval)))
6621 idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, (yyvsp[-2].dcval));
6623 (yyval.ffval) = 0;
6626 * Create a field in a union branch
6628 else if ((yyvsp[-2].dcval) == 0
6629 || (yyvsp[0].deval) == 0)
6631 (yyval.ffval) = 0;
6633 else
6635 AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval));
6637 if (tp == 0)
6639 (yyval.ffval) = 0;
6641 else
6643 (yyval.ffval) = idl_global->gen ()->create_field (
6645 (yyvsp[0].deval)->name ()
6649 (yyvsp[0].deval)->destroy ();
6650 delete (yyvsp[0].deval);
6651 (yyvsp[0].deval) = 0;
6654 #line 6667 "fe/idl.tab.cpp"
6655 break;
6657 case 342: /* struct_forward_type: struct_decl */
6658 #line 3737 "fe/idl.ypp"
6660 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6661 UTL_ScopedName n ((yyvsp[0].idval),
6663 AST_StructureFwd *d = 0;
6666 * Create a node representing a forward declaration of a struct.
6668 if (s != 0)
6670 d = idl_global->gen ()->create_structure_fwd (&n);
6671 (void) s->fe_add_structure_fwd (d);
6674 (yyvsp[0].idval)->destroy ();
6675 delete (yyvsp[0].idval);
6676 (yyvsp[0].idval) = 0;
6678 (yyval.dcval) = d;
6680 #line 6693 "fe/idl.tab.cpp"
6681 break;
6683 case 343: /* union_forward_type: union_decl */
6684 #line 3762 "fe/idl.ypp"
6686 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6687 UTL_ScopedName n ((yyvsp[0].idval),
6689 AST_UnionFwd *u = 0;
6692 * Create a node representing a forward declaration of a union.
6694 if (s != 0)
6696 u = idl_global->gen ()->create_union_fwd (&n);
6697 (void) s->fe_add_union_fwd (u);
6700 (yyvsp[0].idval)->destroy ();
6701 delete (yyvsp[0].idval);
6702 (yyvsp[0].idval) = 0;
6704 #line 6717 "fe/idl.tab.cpp"
6705 break;
6707 case 344: /* $@86: %empty */
6708 #line 3785 "fe/idl.ypp"
6710 idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
6712 #line 6725 "fe/idl.tab.cpp"
6713 break;
6715 case 345: /* $@87: %empty */
6716 #line 3789 "fe/idl.ypp"
6718 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6719 UTL_ScopedName n ((yyvsp[0].idval), 0);
6720 AST_Enum *e = 0;
6721 idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen);
6724 * Create a node representing an enum and add it to its
6725 * enclosing scope.
6727 if (s != 0)
6729 e = idl_global->gen ()->create_enum (&n,
6730 s->is_local (),
6731 s->is_abstract ());
6733 * Add it to its defining scope
6735 (void) s->fe_add_enum (e);
6739 * Push the enum scope on the scopes stack.
6741 idl_global->scopes ().push (e);
6743 (yyvsp[0].idval)->destroy ();
6744 delete (yyvsp[0].idval);
6745 (yyvsp[0].idval) = 0;
6747 #line 6760 "fe/idl.tab.cpp"
6748 break;
6750 case 346: /* $@88: %empty */
6751 #line 3820 "fe/idl.ypp"
6753 idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
6755 #line 6768 "fe/idl.tab.cpp"
6756 break;
6758 case 347: /* $@89: %empty */
6759 #line 3824 "fe/idl.ypp"
6761 idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
6763 #line 6776 "fe/idl.tab.cpp"
6764 break;
6766 case 348: /* enum_type: IDL_ENUM $@86 defining_id $@87 '{' $@88 at_least_one_enumerator $@89 '}' */
6767 #line 3828 "fe/idl.ypp"
6769 idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
6772 * Done with this enum. Pop its scope from the scopes stack.
6774 if (idl_global->scopes ().top () == 0)
6776 (yyval.dcval) = 0;
6778 else
6780 (yyval.dcval) = dynamic_cast<AST_Enum*> (
6781 idl_global->scopes ().top_non_null ()
6783 idl_global->scopes ().pop ();
6786 #line 6799 "fe/idl.tab.cpp"
6787 break;
6789 case 350: /* $@90: %empty */
6790 #line 3853 "fe/idl.ypp"
6792 idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
6794 #line 6807 "fe/idl.tab.cpp"
6795 break;
6797 case 353: /* enumerator: annotations_maybe IDENTIFIER */
6798 #line 3862 "fe/idl.ypp"
6800 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6801 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
6802 Identifier id ((yyvsp[0].strval));
6803 ACE::strdelete ((yyvsp[0].strval));
6804 (yyvsp[0].strval) = 0;
6805 UTL_ScopedName n (&id, 0);
6806 AST_EnumVal *e = 0;
6807 AST_Enum *c = 0;
6810 * Create a node representing one enumerator in an enum
6811 * Add it to the enclosing scope (the enum scope)
6813 if (s != 0
6814 && s->scope_node_type () == AST_Decl::NT_enum)
6816 c = dynamic_cast<AST_Enum*> (s);
6818 if (c != 0)
6820 e = idl_global->gen ()->create_enum_val (
6821 c->next_enum_val (),
6824 e->enum_parent (c);
6825 e->annotation_appls (*annotations);
6828 (void) s->fe_add_enum_val (e);
6831 delete annotations;
6833 #line 6846 "fe/idl.tab.cpp"
6834 break;
6836 case 354: /* map_type_spec: map_head '>' */
6837 #line 3901 "fe/idl.ypp"
6839 AST_Map *map = 0;
6840 Decl_Annotations_Pair_Pair* type_pair = (yyvsp[-1].decl_annotations_pair_val_pair);
6841 Decl_Annotations_Pair *key_type = type_pair->first;
6842 Decl_Annotations_Pair *val_type = type_pair->second;
6845 * Remove map marker from scopes stack.
6847 if (idl_global->scopes ().top () == 0)
6849 idl_global->scopes ().pop ();
6852 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6855 * Create a node representing a map.
6857 if (key_type && val_type)
6859 AST_Type *ktp = dynamic_cast<AST_Type*> (key_type->decl);
6860 AST_Type *vtp = dynamic_cast<AST_Type*> (val_type->decl);
6862 if (ktp == 0 || vtp == 0)
6864 ; // Error will be caught in FE_Declarator.
6866 else
6868 Identifier id ("map");
6869 UTL_ScopedName sn (&id, 0);
6870 ACE_CDR::ULong bound = 0UL;
6872 map =
6873 idl_global->gen ()->create_map (
6874 idl_global->gen ()->create_expr (
6875 bound,
6876 AST_Expression::EV_ulong
6878 ktp,
6879 vtp,
6880 &sn,
6881 s->is_local (),
6882 s->is_abstract ()
6884 map->key_type_annotations (*key_type->annotations);
6885 map->value_type_annotations (*val_type->annotations);
6887 idl_global->err ()->anonymous_type_diagnostic ();
6891 delete key_type->annotations;
6892 delete val_type->annotations;
6893 delete type_pair;
6894 (yyval.dcval) = map;
6896 #line 6909 "fe/idl.tab.cpp"
6897 break;
6899 case 355: /* $@91: %empty */
6900 #line 3963 "fe/idl.ypp"
6902 idl_global->set_parse_state (IDL_GlobalData::PS_MapSeen);
6905 * Push a map marker on scopes stack.
6907 idl_global->scopes ().push (0);
6909 #line 6922 "fe/idl.tab.cpp"
6910 break;
6912 case 356: /* $@92: %empty */
6913 #line 3973 "fe/idl.ypp"
6915 idl_global->set_parse_state(IDL_GlobalData::PS_MapKeyTypeSeen);
6917 #line 6930 "fe/idl.tab.cpp"
6918 break;
6920 case 357: /* map_head: IDL_MAP $@91 '<' annotations_maybe simple_type_spec $@92 ',' annotations_maybe simple_type_spec */
6921 #line 3978 "fe/idl.ypp"
6923 idl_global->set_parse_state(IDL_GlobalData::PS_MapValueTypeSeen);
6924 Decl_Annotations_Pair *key = new Decl_Annotations_Pair;
6925 key->decl = (yyvsp[-4].dcval);
6926 key->annotations = (yyvsp[-5].annotations_val);
6928 Decl_Annotations_Pair *value = new Decl_Annotations_Pair;
6929 value->decl = (yyvsp[0].dcval);
6930 value->annotations = (yyvsp[-1].annotations_val);
6932 Decl_Annotations_Pair_Pair* pairs = new Decl_Annotations_Pair_Pair;
6933 pairs->first = key;
6934 pairs->second = value;
6935 (yyval.decl_annotations_pair_val_pair) = pairs;
6937 #line 6950 "fe/idl.tab.cpp"
6938 break;
6940 case 358: /* $@93: %empty */
6941 #line 3998 "fe/idl.ypp"
6943 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
6945 #line 6958 "fe/idl.tab.cpp"
6946 break;
6948 case 359: /* $@94: %empty */
6949 #line 4002 "fe/idl.ypp"
6951 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
6953 #line 6966 "fe/idl.tab.cpp"
6954 break;
6956 case 360: /* sequence_type_spec: seq_head ',' $@93 positive_int_expr $@94 '>' */
6957 #line 4006 "fe/idl.ypp"
6959 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
6961 AST_Sequence *seq = 0;
6962 Decl_Annotations_Pair *seq_head = (yyvsp[-5].decl_annotations_pair_val);
6963 AST_Decl *type = 0;
6964 AST_Annotation_Appls *type_annotations = 0;
6965 if (seq_head)
6967 type = seq_head->decl;
6968 type_annotations = seq_head->annotations;
6970 delete seq_head;
6973 * Remove sequence marker from scopes stack.
6975 if (idl_global->scopes ().top () == 0)
6977 idl_global->scopes ().pop ();
6980 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6983 * Create a node representing a sequence
6985 AST_Expression::AST_ExprValue *ev = 0;
6986 AST_Param_Holder *param_holder = 0;
6988 if ((yyvsp[-2].exval) != 0)
6990 param_holder =
6991 (yyvsp[-2].exval)->param_holder ();
6993 ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
6996 // If the expression corresponds to a template parameter,
6997 // it's ok for the coercion to fail at this point. We check
6998 // for a type mismatch below.
6999 if (0 == (yyvsp[-2].exval)
7000 || (0 == ev && 0 == param_holder))
7002 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7003 AST_Expression::EV_ulong);
7005 else if (type)
7007 AST_Type *tp = dynamic_cast<AST_Type*> (type);
7009 if (0 == tp)
7011 ; // Error will be caught in FE_Declarator.
7013 else
7015 Identifier id ("sequence");
7016 UTL_ScopedName sn (&id,
7019 seq =
7020 idl_global->gen ()->create_sequence (
7021 (yyvsp[-2].exval),
7023 &sn,
7024 s->is_local (),
7025 s->is_abstract ()
7027 seq->base_type_annotations (*type_annotations);
7029 idl_global->err ()->anonymous_type_diagnostic ();
7033 delete type_annotations;
7034 delete ev;
7035 ev = 0;
7036 (yyval.dcval) = seq;
7038 #line 7051 "fe/idl.tab.cpp"
7039 break;
7041 case 361: /* sequence_type_spec: seq_head '>' */
7042 #line 4088 "fe/idl.ypp"
7044 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
7046 AST_Sequence *seq = 0;
7047 Decl_Annotations_Pair *seq_head = (yyvsp[-1].decl_annotations_pair_val);
7048 AST_Decl *type = 0;
7049 AST_Annotation_Appls *type_annotations = 0;
7050 if (seq_head)
7052 type = seq_head->decl;
7053 type_annotations = seq_head->annotations;
7055 delete seq_head;
7058 * Remove sequence marker from scopes stack.
7060 if (idl_global->scopes ().top () == 0)
7062 idl_global->scopes ().pop ();
7065 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7068 * Create a node representing a sequence.
7070 if (type)
7072 AST_Type *tp = dynamic_cast<AST_Type*> (type);
7074 if (tp == 0)
7076 ; // Error will be caught in FE_Declarator.
7078 else
7080 Identifier id ("sequence");
7081 UTL_ScopedName sn (&id, 0);
7082 ACE_CDR::ULong bound = 0UL;
7084 seq =
7085 idl_global->gen ()->create_sequence (
7086 idl_global->gen ()->create_expr (
7087 bound,
7088 AST_Expression::EV_ulong
7091 &sn,
7092 s->is_local (),
7093 s->is_abstract ()
7095 seq->base_type_annotations (*type_annotations);
7097 idl_global->err ()->anonymous_type_diagnostic ();
7101 delete type_annotations;
7102 (yyval.dcval) = seq;
7104 #line 7117 "fe/idl.tab.cpp"
7105 break;
7107 case 362: /* $@95: %empty */
7108 #line 4153 "fe/idl.ypp"
7110 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
7113 * Push a sequence marker on scopes stack.
7115 idl_global->scopes ().push (0);
7117 #line 7130 "fe/idl.tab.cpp"
7118 break;
7120 case 363: /* $@96: %empty */
7121 #line 4162 "fe/idl.ypp"
7123 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
7125 #line 7138 "fe/idl.tab.cpp"
7126 break;
7128 case 364: /* seq_head: IDL_SEQUENCE $@95 '<' $@96 annotations_maybe simple_type_spec */
7129 #line 4166 "fe/idl.ypp"
7131 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
7132 Decl_Annotations_Pair *seq_head = new Decl_Annotations_Pair;
7133 seq_head->decl = (yyvsp[0].dcval);
7134 seq_head->annotations = (yyvsp[-1].annotations_val);
7135 (yyval.decl_annotations_pair_val) = seq_head;
7137 #line 7150 "fe/idl.tab.cpp"
7138 break;
7140 case 365: /* fixed_type_spec: IDL_FIXED '<' positive_int_expr ',' const_expr '>' */
7141 #line 4177 "fe/idl.ypp"
7143 (yyvsp[-1].exval)->evaluate (AST_Expression::EK_positive_int);
7144 (yyval.dcval) = idl_global->gen ()->create_fixed ((yyvsp[-3].exval), (yyvsp[-1].exval));
7146 #line 7159 "fe/idl.tab.cpp"
7147 break;
7149 case 366: /* $@97: %empty */
7150 #line 4186 "fe/idl.ypp"
7152 idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
7154 #line 7167 "fe/idl.tab.cpp"
7155 break;
7157 case 367: /* $@98: %empty */
7158 #line 4190 "fe/idl.ypp"
7160 idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
7162 #line 7175 "fe/idl.tab.cpp"
7163 break;
7165 case 368: /* string_type_spec: string_head '<' $@97 positive_int_expr $@98 '>' */
7166 #line 4194 "fe/idl.ypp"
7168 idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
7171 * Create a node representing a string.
7173 AST_Expression::AST_ExprValue *ev = 0;
7175 if ((yyvsp[-2].exval) != 0)
7177 ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7180 if (0 == (yyvsp[-2].exval) || 0 == ev)
7182 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7183 AST_Expression::EV_ulong);
7184 (yyval.dcval) = 0;
7186 else
7188 tao_string_decl = idl_global->gen ()->create_string ((yyvsp[-2].exval));
7191 * Add this AST_String to the types defined in the global scope.
7193 idl_global->root ()->fe_add_string (
7194 dynamic_cast<AST_String*> (
7195 tao_string_decl));
7197 idl_global->err ()->anonymous_type_diagnostic ();
7199 (yyval.dcval) = tao_string_decl;
7202 delete ev;
7203 ev = 0;
7205 #line 7218 "fe/idl.tab.cpp"
7206 break;
7208 case 369: /* string_type_spec: string_head */
7209 #line 4233 "fe/idl.ypp"
7211 idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
7214 * Create a node representing a string.
7216 ACE_CDR::ULong bound = 0UL;
7217 tao_string_decl =
7218 idl_global->gen ()->create_string (
7219 idl_global->gen ()->create_expr (bound,
7220 AST_Expression::EV_ulong)
7224 * Add this AST_String to the types defined in the global scope.
7226 idl_global->root ()->fe_add_string (
7227 dynamic_cast<AST_String*> (
7228 tao_string_decl));
7230 (yyval.dcval) = tao_string_decl;
7232 #line 7245 "fe/idl.tab.cpp"
7233 break;
7235 case 370: /* string_head: IDL_STRING */
7236 #line 4259 "fe/idl.ypp"
7238 idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
7240 #line 7253 "fe/idl.tab.cpp"
7241 break;
7243 case 371: /* $@99: %empty */
7244 #line 4267 "fe/idl.ypp"
7246 idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
7248 #line 7261 "fe/idl.tab.cpp"
7249 break;
7251 case 372: /* $@100: %empty */
7252 #line 4271 "fe/idl.ypp"
7254 idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
7256 #line 7269 "fe/idl.tab.cpp"
7257 break;
7259 case 373: /* wstring_type_spec: wstring_head '<' $@99 positive_int_expr $@100 '>' */
7260 #line 4275 "fe/idl.ypp"
7262 idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
7265 * Create a node representing a string.
7267 AST_Expression::AST_ExprValue *ev = 0;
7269 if ((yyvsp[-2].exval) != 0)
7271 ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7274 if (0 == (yyvsp[-2].exval) || 0 == ev)
7276 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7277 AST_Expression::EV_ulong);
7278 (yyval.dcval) = 0;
7280 else
7282 AST_String *string = idl_global->gen ()->create_wstring ((yyvsp[-2].exval));
7285 * Add this AST_String to the types defined in the global scope.
7287 idl_global->root ()->fe_add_string (
7288 dynamic_cast<AST_String*> (
7289 string));
7291 idl_global->err ()->anonymous_type_diagnostic ();
7293 (yyval.dcval) = string;
7296 delete ev;
7297 ev = 0;
7299 #line 7312 "fe/idl.tab.cpp"
7300 break;
7302 case 374: /* wstring_type_spec: wstring_head */
7303 #line 4314 "fe/idl.ypp"
7305 idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
7308 * Create a node representing a wstring.
7310 ACE_CDR::ULong bound = 0UL;
7311 AST_String *string =
7312 idl_global->gen ()->create_wstring (
7313 idl_global->gen ()->create_expr (bound,
7314 AST_Expression::EV_ulong)
7318 * Add this AST_String to the types defined in the global scope.
7320 idl_global->root ()->fe_add_string (
7321 dynamic_cast<AST_String*> (
7322 string));
7324 (yyval.dcval) = string;
7326 #line 7339 "fe/idl.tab.cpp"
7327 break;
7329 case 375: /* wstring_head: IDL_WSTRING */
7330 #line 4340 "fe/idl.ypp"
7332 idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
7334 #line 7347 "fe/idl.tab.cpp"
7335 break;
7337 case 376: /* $@101: %empty */
7338 #line 4347 "fe/idl.ypp"
7340 idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
7342 #line 7355 "fe/idl.tab.cpp"
7343 break;
7345 case 377: /* array_declarator: defining_id $@101 annotations_maybe at_least_one_array_dim */
7346 #line 4351 "fe/idl.ypp"
7348 idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
7350 AST_Array *array = 0;
7351 AST_Annotation_Appls *base_type_annotations = (yyvsp[-1].annotations_val);
7352 UTL_ExprList *array_dims = (yyvsp[0].elval);
7355 * Create a node representing an array.
7357 if (array_dims)
7359 UTL_ScopedName sn ((yyvsp[-3].idval),
7361 array =
7362 idl_global->gen ()->create_array (
7363 &sn,
7364 array_dims->length (),
7365 array_dims,
7369 array->base_type_annotations (*base_type_annotations);
7370 sn.destroy ();
7372 idl_global->err ()->anonymous_type_diagnostic ();
7375 array_dims->destroy ();
7376 delete array_dims;
7378 delete base_type_annotations;
7380 (yyval.dcval) = array;
7382 #line 7395 "fe/idl.tab.cpp"
7383 break;
7385 case 378: /* at_least_one_array_dim: array_dim array_dims */
7386 #line 4390 "fe/idl.ypp"
7388 ACE_NEW_RETURN ((yyval.elval),
7389 UTL_ExprList ((yyvsp[-1].exval),
7390 (yyvsp[0].elval)),
7393 #line 7406 "fe/idl.tab.cpp"
7394 break;
7396 case 379: /* array_dims: array_dims array_dim */
7397 #line 4400 "fe/idl.ypp"
7399 UTL_ExprList *el = 0;
7400 ACE_NEW_RETURN (el,
7401 UTL_ExprList ((yyvsp[0].exval),
7405 if ((yyvsp[-1].elval) == 0)
7407 (yyval.elval) = el;
7409 else
7411 (yyvsp[-1].elval)->nconc (el);
7412 (yyval.elval) = (yyvsp[-1].elval);
7415 #line 7428 "fe/idl.tab.cpp"
7416 break;
7418 case 380: /* array_dims: %empty */
7419 #line 4418 "fe/idl.ypp"
7421 (yyval.elval) = 0;
7423 #line 7436 "fe/idl.tab.cpp"
7424 break;
7426 case 381: /* $@102: %empty */
7427 #line 4425 "fe/idl.ypp"
7429 idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
7431 #line 7444 "fe/idl.tab.cpp"
7432 break;
7434 case 382: /* $@103: %empty */
7435 #line 4429 "fe/idl.ypp"
7437 idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
7439 #line 7452 "fe/idl.tab.cpp"
7440 break;
7442 case 383: /* array_dim: '[' $@102 positive_int_expr $@103 ']' */
7443 #line 4433 "fe/idl.ypp"
7445 idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
7448 * Array dimensions are expressions which must be coerced to
7449 * positive integers.
7451 AST_Expression::AST_ExprValue *ev = 0;
7452 AST_Param_Holder *param_holder = 0;
7454 if ((yyvsp[-2].exval) != 0)
7456 param_holder =
7457 (yyvsp[-2].exval)->param_holder ();
7459 ev =
7460 (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7463 if (0 == (yyvsp[-2].exval)
7464 || (ev == 0 && param_holder == 0))
7466 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7467 AST_Expression::EV_ulong);
7468 (yyval.exval) = 0;
7470 else
7472 if (param_holder != 0)
7474 AST_Expression::ExprType et =
7475 param_holder->info ()->const_type_;
7477 // If the bound expression represents a
7478 // template parameter, it must be a const
7479 // and of type unsigned long.
7480 if (et != AST_Expression::EV_ulong)
7482 idl_global->err ()->mismatched_template_param (
7483 param_holder->info ()->name_.c_str ());
7485 delete ev;
7486 ev = 0;
7487 return 1;
7491 (yyval.exval) = (yyvsp[-2].exval);
7494 delete ev;
7495 ev = 0;
7497 #line 7510 "fe/idl.tab.cpp"
7498 break;
7500 case 386: /* $@104: %empty */
7501 #line 4495 "fe/idl.ypp"
7503 idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
7505 #line 7518 "fe/idl.tab.cpp"
7506 break;
7508 case 387: /* $@105: %empty */
7509 #line 4499 "fe/idl.ypp"
7511 idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
7513 #line 7526 "fe/idl.tab.cpp"
7514 break;
7516 case 388: /* $@106: %empty */
7517 #line 4503 "fe/idl.ypp"
7519 idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
7521 #line 7534 "fe/idl.tab.cpp"
7522 break;
7524 case 389: /* $@107: %empty */
7525 #line 4507 "fe/idl.ypp"
7527 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
7529 #line 7542 "fe/idl.tab.cpp"
7530 break;
7532 case 390: /* attribute_readonly: IDL_READONLY $@104 IDL_ATTRIBUTE $@105 param_type_spec $@106 at_least_one_simple_declarator $@107 opt_raises */
7533 #line 4511 "fe/idl.ypp"
7535 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7536 AST_Attribute *a = 0;
7537 FE_Declarator *d = 0;
7539 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
7542 * Create nodes representing attributes and add them to the
7543 * enclosing scope.
7545 if (s != 0 && (yyvsp[-4].dcval) != 0 && (yyvsp[-2].dlval) != 0)
7547 for (UTL_DecllistActiveIterator l ((yyvsp[-2].dlval)); !l.is_done (); l.next ())
7549 d = l.item ();
7551 if (d == 0)
7553 continue;
7556 AST_Type *tp = d->compose ((yyvsp[-4].dcval));
7558 if (tp == 0)
7560 continue;
7563 a = idl_global->gen ()->create_attribute (
7564 true, tp, d->name (), s->is_local (), s->is_abstract ());
7566 if ((yyvsp[0].nlval) != 0)
7568 (void) a->fe_add_get_exceptions ((yyvsp[0].nlval));
7570 (yyvsp[0].nlval)->destroy ();
7571 delete (yyvsp[0].nlval);
7572 (yyvsp[0].nlval) = 0;
7575 (void) s->fe_add_attribute (a);
7579 (yyvsp[-2].dlval)->destroy ();
7580 delete (yyvsp[-2].dlval);
7581 (yyvsp[-2].dlval) = 0;
7583 (yyval.dcval) = a;
7585 #line 7598 "fe/idl.tab.cpp"
7586 break;
7588 case 391: /* $@108: %empty */
7589 #line 4566 "fe/idl.ypp"
7591 idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
7593 #line 7606 "fe/idl.tab.cpp"
7594 break;
7596 case 392: /* $@109: %empty */
7597 #line 4570 "fe/idl.ypp"
7599 idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
7601 #line 7614 "fe/idl.tab.cpp"
7602 break;
7604 case 393: /* $@110: %empty */
7605 #line 4574 "fe/idl.ypp"
7607 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
7609 #line 7622 "fe/idl.tab.cpp"
7610 break;
7612 case 394: /* $@111: %empty */
7613 #line 4578 "fe/idl.ypp"
7615 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseCompleted);
7617 #line 7630 "fe/idl.tab.cpp"
7618 break;
7620 case 395: /* attribute_readwrite: IDL_ATTRIBUTE $@108 param_type_spec $@109 at_least_one_simple_declarator $@110 opt_getraises $@111 opt_setraises */
7621 #line 4582 "fe/idl.ypp"
7623 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7624 AST_Attribute *a = 0;
7625 FE_Declarator *d = 0;
7627 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseCompleted);
7630 * Create nodes representing attributes and add them to the
7631 * enclosing scope.
7633 if (s != 0 && (yyvsp[-6].dcval) != 0 && (yyvsp[-4].dlval) != 0)
7635 for (UTL_DecllistActiveIterator l ((yyvsp[-4].dlval)); !l.is_done (); l.next ())
7637 d = l.item ();
7639 if (d == 0)
7641 continue;
7644 AST_Type *tp = d->compose ((yyvsp[-6].dcval));
7646 if (tp == 0)
7648 continue;
7651 a = idl_global->gen ()->create_attribute (
7652 false, tp, d->name (), s->is_local (), s->is_abstract ());
7654 if ((yyvsp[-2].nlval) != 0)
7656 (void) a->fe_add_get_exceptions ((yyvsp[-2].nlval));
7658 (yyvsp[-2].nlval)->destroy ();
7659 delete (yyvsp[-2].nlval);
7660 (yyvsp[-2].nlval) = 0;
7663 if ((yyvsp[0].nlval) != 0)
7665 (void) a->fe_add_set_exceptions ((yyvsp[0].nlval));
7667 (yyvsp[0].nlval)->destroy ();
7668 delete (yyvsp[0].nlval);
7669 (yyvsp[0].nlval) = 0;
7672 (void) s->fe_add_attribute (a);
7676 (yyvsp[-4].dlval)->destroy ();
7677 delete (yyvsp[-4].dlval);
7678 (yyvsp[-4].dlval) = 0;
7680 (yyval.dcval) = a;
7682 #line 7695 "fe/idl.tab.cpp"
7683 break;
7685 case 396: /* $@112: %empty */
7686 #line 4646 "fe/idl.ypp"
7688 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
7690 #line 7703 "fe/idl.tab.cpp"
7691 break;
7693 case 397: /* @113: %empty */
7694 #line 4650 "fe/idl.ypp"
7696 Identifier *&id = (yyvsp[0].idval);
7697 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
7698 UTL_ScopedName scoped_name (id, 0);
7699 AST_Exception *exception = 0;
7700 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptIDSeen);
7703 * Create a node representing an exception and add it to
7704 * the enclosing scope.
7706 if (scope)
7708 exception = idl_global->gen ()->create_exception (
7709 &scoped_name,
7710 scope->is_local (),
7711 scope->is_abstract ());
7712 scope->fe_add_exception (exception);
7716 * Push the exception scope on the scope stack.
7718 idl_global->scopes ().push (exception);
7720 id->destroy ();
7721 delete id;
7722 id = 0;
7724 (yyval.dcval) = exception;
7726 #line 7739 "fe/idl.tab.cpp"
7727 break;
7729 case 398: /* $@114: %empty */
7730 #line 4682 "fe/idl.ypp"
7732 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
7734 #line 7747 "fe/idl.tab.cpp"
7735 break;
7737 case 399: /* $@115: %empty */
7738 #line 4686 "fe/idl.ypp"
7740 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen);
7742 #line 7755 "fe/idl.tab.cpp"
7743 break;
7745 case 400: /* exception: IDL_EXCEPTION $@112 defining_id @113 '{' $@114 members $@115 '}' */
7746 #line 4690 "fe/idl.ypp"
7748 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen);
7750 * Done with this exception. Pop its scope from the scope stack.
7752 idl_global->scopes ().pop ();
7754 (yyval.dcval) = (yyvsp[-5].dcval);
7756 #line 7769 "fe/idl.tab.cpp"
7757 break;
7759 case 401: /* $@116: %empty */
7760 #line 4703 "fe/idl.ypp"
7762 idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
7764 #line 7777 "fe/idl.tab.cpp"
7765 break;
7767 case 402: /* $@117: %empty */
7768 #line 4707 "fe/idl.ypp"
7770 AST_Operation *op = 0;
7771 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
7773 AST_Operation::Flags op_flags = (yyvsp[-3].ofval);
7774 AST_Decl *type_node = (yyvsp[-2].dcval);
7775 (yyvsp[-2].dcval) = 0;
7776 Identifier id ((yyvsp[0].strval));
7777 ACE::strdelete ((yyvsp[0].strval));
7778 (yyvsp[0].strval) = 0;
7780 UTL_ScopedName name (&id, 0);
7781 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
7784 * Create a node representing an operation on an interface
7785 * and add it to its enclosing scope.
7787 if (scope != 0 && type_node != 0)
7789 AST_Type *type = dynamic_cast<AST_Type*> (type_node);
7791 if (type == 0)
7793 idl_global->err ()->not_a_type (type_node);
7795 else if (type->node_type () == AST_Decl::NT_except)
7797 idl_global->err ()->not_a_type (type_node);
7799 else
7801 AST_Decl *d = ScopeAsDecl (scope);
7802 AST_Decl::NodeType nt = d->node_type ();
7803 const bool local = scope->is_local ()
7804 || nt == AST_Decl::NT_valuetype
7805 || nt == AST_Decl::NT_eventtype;
7807 op = idl_global->gen ()->create_operation (
7808 type, op_flags, &name, local, scope->is_abstract ());
7810 if (!local && type->is_local ())
7812 idl_global->err ()->local_remote_mismatch (type, op);
7813 op->destroy ();
7814 delete op;
7815 op = 0;
7817 else
7819 scope->fe_add_operation (op);
7825 * Push the operation scope onto the scopes stack.
7827 idl_global->scopes ().push (op);
7829 #line 7842 "fe/idl.tab.cpp"
7830 break;
7832 case 403: /* $@118: %empty */
7833 #line 4768 "fe/idl.ypp"
7835 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
7837 #line 7850 "fe/idl.tab.cpp"
7838 break;
7840 case 404: /* $@119: %empty */
7841 #line 4772 "fe/idl.ypp"
7843 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
7845 #line 7858 "fe/idl.tab.cpp"
7846 break;
7848 case 405: /* operation: opt_op_attribute op_type_spec $@116 IDENTIFIER $@117 parameter_list $@118 opt_raises $@119 opt_context */
7849 #line 4776 "fe/idl.ypp"
7851 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7852 AST_Operation *o = 0;
7853 idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted);
7856 * Add exceptions and context to the operation.
7858 if (s != 0 && s->scope_node_type () == AST_Decl::NT_op)
7860 o = dynamic_cast<AST_Operation*> (s);
7862 if ((yyvsp[-2].nlval) != 0 && o != 0)
7864 (void) o->fe_add_exceptions ((yyvsp[-2].nlval));
7867 if ((yyvsp[0].slval) != 0)
7869 (void) o->fe_add_context ((yyvsp[0].slval));
7874 * Done with this operation. Pop its scope from the scopes stack.
7876 idl_global->scopes ().pop ();
7878 (yyval.dcval) = o;
7880 #line 7893 "fe/idl.tab.cpp"
7881 break;
7883 case 406: /* opt_op_attribute: IDL_ONEWAY */
7884 #line 4810 "fe/idl.ypp"
7886 idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
7887 (yyval.ofval) = AST_Operation::OP_oneway;
7889 #line 7902 "fe/idl.tab.cpp"
7890 break;
7892 case 407: /* opt_op_attribute: IDL_IDEMPOTENT */
7893 #line 4815 "fe/idl.ypp"
7895 idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
7896 (yyval.ofval) = AST_Operation::OP_idempotent;
7898 #line 7911 "fe/idl.tab.cpp"
7899 break;
7901 case 408: /* opt_op_attribute: %empty */
7902 #line 4820 "fe/idl.ypp"
7904 (yyval.ofval) = AST_Operation::OP_noflags;
7906 #line 7919 "fe/idl.tab.cpp"
7907 break;
7909 case 410: /* op_type_spec: IDL_VOID */
7910 #line 4828 "fe/idl.ypp"
7912 (yyval.dcval) =
7913 idl_global->scopes ().bottom ()->lookup_primitive_type (
7914 AST_Expression::EV_void
7917 #line 7930 "fe/idl.tab.cpp"
7918 break;
7920 case 411: /* $@120: %empty */
7921 #line 4838 "fe/idl.ypp"
7923 //@@ PS_FactorySeen?
7924 idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
7926 #line 7939 "fe/idl.tab.cpp"
7927 break;
7929 case 412: /* @121: %empty */
7930 #line 4843 "fe/idl.ypp"
7932 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7934 if (s->is_abstract ())
7936 //@@ Fire error
7937 ACE_ERROR ((LM_ERROR,
7938 ACE_TEXT ("error in %C line %d:\n")
7939 ACE_TEXT ("Abstract valuetype can't have a ")
7940 ACE_TEXT ("factory construct.\n"),
7941 idl_global->filename ()->get_string (),
7942 idl_global->lineno ()));
7944 idl_global->set_err_count (idl_global->err_count () + 1);
7947 Identifier id ((yyvsp[0].strval));
7948 ACE::strdelete ((yyvsp[0].strval));
7949 (yyvsp[0].strval) = 0;
7951 UTL_ScopedName n (&id,
7953 AST_Factory *factory = 0;
7954 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
7957 * Create a node representing an factory construct
7958 * and add it to its enclosing scope
7960 if (s != 0)
7962 factory = idl_global->gen ()->create_factory (&n);
7963 (void) s->fe_add_factory (factory);
7967 * Push the operation scope onto the scopes stack.
7969 idl_global->scopes ().push (factory);
7971 (yyval.dcval) = factory;
7973 #line 7986 "fe/idl.tab.cpp"
7974 break;
7976 case 413: /* $@122: %empty */
7977 #line 4886 "fe/idl.ypp"
7979 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
7981 #line 7994 "fe/idl.tab.cpp"
7982 break;
7984 case 414: /* init_decl: IDL_FACTORY $@120 IDENTIFIER @121 init_parameter_list $@122 opt_raises */
7985 #line 4890 "fe/idl.ypp"
7987 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
7989 if ((yyvsp[0].nlval))
7991 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7992 AST_Factory *f = dynamic_cast<AST_Factory*> (s);
7993 (void) f->fe_add_exceptions ((yyvsp[0].nlval));
7996 idl_global->scopes ().pop ();
7998 (yyval.dcval) = (yyvsp[-3].dcval);
8000 #line 8013 "fe/idl.tab.cpp"
8001 break;
8003 case 415: /* $@123: %empty */
8004 #line 4908 "fe/idl.ypp"
8006 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8008 #line 8021 "fe/idl.tab.cpp"
8009 break;
8011 case 416: /* init_parameter_list: '(' $@123 ')' */
8012 #line 4912 "fe/idl.ypp"
8014 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8016 #line 8029 "fe/idl.tab.cpp"
8017 break;
8019 case 417: /* $@124: %empty */
8020 #line 4916 "fe/idl.ypp"
8022 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8024 #line 8037 "fe/idl.tab.cpp"
8025 break;
8027 case 418: /* init_parameter_list: '(' $@124 at_least_one_in_parameter ')' */
8028 #line 4921 "fe/idl.ypp"
8030 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8032 #line 8045 "fe/idl.tab.cpp"
8033 break;
8035 case 420: /* $@125: %empty */
8036 #line 4931 "fe/idl.ypp"
8038 idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
8040 #line 8053 "fe/idl.tab.cpp"
8041 break;
8043 case 423: /* $@126: %empty */
8044 #line 4940 "fe/idl.ypp"
8046 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
8048 #line 8061 "fe/idl.tab.cpp"
8049 break;
8051 case 424: /* $@127: %empty */
8052 #line 4944 "fe/idl.ypp"
8054 idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
8056 #line 8069 "fe/idl.tab.cpp"
8057 break;
8059 case 425: /* in_parameter: IDL_IN $@126 param_type_spec $@127 declarator */
8060 #line 4948 "fe/idl.ypp"
8062 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8063 AST_Argument *a = 0;
8064 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
8067 * Create a node representing an argument to an operation
8068 * Add it to the enclosing scope (the operation scope).
8070 if ((yyvsp[-2].dcval) != 0
8071 && (yyvsp[0].deval) != 0 &&
8072 s != 0)
8074 AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval));
8076 if (tp != 0)
8078 a = idl_global->gen ()->create_argument (
8079 AST_Argument::dir_IN,
8081 (yyvsp[0].deval)->name ()
8084 (void) s->fe_add_argument (a);
8088 (yyvsp[0].deval)->destroy ();
8089 delete (yyvsp[0].deval);
8090 (yyvsp[0].deval) = 0;
8092 #line 8105 "fe/idl.tab.cpp"
8093 break;
8095 case 426: /* $@128: %empty */
8096 #line 4983 "fe/idl.ypp"
8098 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8100 #line 8113 "fe/idl.tab.cpp"
8101 break;
8103 case 427: /* parameter_list: '(' $@128 ')' */
8104 #line 4987 "fe/idl.ypp"
8106 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8108 #line 8121 "fe/idl.tab.cpp"
8109 break;
8111 case 428: /* $@129: %empty */
8112 #line 4991 "fe/idl.ypp"
8114 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8116 #line 8129 "fe/idl.tab.cpp"
8117 break;
8119 case 429: /* parameter_list: '(' $@129 at_least_one_parameter ')' */
8120 #line 4996 "fe/idl.ypp"
8122 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8124 #line 8137 "fe/idl.tab.cpp"
8125 break;
8127 case 431: /* $@130: %empty */
8128 #line 5006 "fe/idl.ypp"
8130 idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
8132 #line 8145 "fe/idl.tab.cpp"
8133 break;
8135 case 434: /* $@131: %empty */
8136 #line 5015 "fe/idl.ypp"
8138 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
8140 #line 8153 "fe/idl.tab.cpp"
8141 break;
8143 case 435: /* $@132: %empty */
8144 #line 5019 "fe/idl.ypp"
8146 idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
8148 #line 8161 "fe/idl.tab.cpp"
8149 break;
8151 case 436: /* parameter: direction $@131 param_type_spec $@132 declarator */
8152 #line 5023 "fe/idl.ypp"
8154 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8155 AST_Argument *a = 0;
8156 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
8159 * Create a node representing an argument to an operation
8160 * Add it to the enclosing scope (the operation scope).
8162 if ((yyvsp[-2].dcval) != 0
8163 && (yyvsp[0].deval) != 0
8164 && s != 0)
8166 AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval));
8168 if (tp != 0)
8170 if (!s->is_local () && tp->is_local ())
8172 idl_global->err ()->local_remote_mismatch (tp, s);
8174 else
8177 idl_global->gen ()->create_argument (
8178 (yyvsp[-4].dival),
8180 (yyvsp[0].deval)->name ()
8182 (void) s->fe_add_argument (a);
8187 (yyvsp[0].deval)->destroy ();
8188 delete (yyvsp[0].deval);
8189 (yyvsp[0].deval) = 0;
8191 #line 8204 "fe/idl.tab.cpp"
8192 break;
8194 case 437: /* param_type_spec: base_type_spec */
8195 #line 5065 "fe/idl.ypp"
8197 (yyval.dcval) =
8198 idl_global->scopes ().bottom ()->lookup_primitive_type (
8199 (yyvsp[0].etval)
8202 #line 8215 "fe/idl.tab.cpp"
8203 break;
8205 case 440: /* param_type_spec: scoped_name */
8206 #line 5074 "fe/idl.ypp"
8208 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8209 AST_Decl *d = 0;
8210 UTL_ScopedName *n = (yyvsp[0].idlist);
8212 if (s != 0)
8214 d = s->lookup_by_name (n, false, false);
8217 if (d == 0)
8219 idl_global->err ()->lookup_error (n);
8220 (yyvsp[0].idlist)->destroy ();
8221 (yyvsp[0].idlist) = 0;
8223 /* If we don't return here, we'll crash later.*/
8224 return 1;
8226 else
8228 d->last_referenced_as ((yyvsp[0].idlist));
8229 AST_Decl::NodeType nt = d->node_type ();
8230 AST_Type *t = dynamic_cast<AST_Type*> (d);
8231 AST_Typedef *td = 0;
8232 bool can_be_undefined = false;
8234 if (nt == AST_Decl::NT_typedef)
8236 // This code block ensures that a sequence of
8237 // as-yet-undefined struct or union isn't used
8238 // as a return type or argument.
8239 td = dynamic_cast<AST_Typedef*> (d);
8240 AST_Type *pbt = td->primitive_base_type ();
8242 if (pbt->node_type () == AST_Decl::NT_sequence)
8244 t = pbt;
8245 AST_Sequence *seq_type =
8246 dynamic_cast<AST_Sequence*> (pbt);
8247 AST_Type *elem_type =
8248 seq_type->base_type ();
8249 AST_Decl::NodeType elem_nt =
8250 elem_type->node_type ();
8252 if (elem_nt == AST_Decl::NT_typedef)
8254 AST_Typedef *elem_td =
8255 dynamic_cast<AST_Typedef*> (elem_type);
8256 elem_type = elem_td->primitive_base_type ();
8257 elem_nt = elem_type->node_type ();
8260 if (elem_nt == AST_Decl::NT_interface
8261 || elem_nt == AST_Decl::NT_interface_fwd
8262 || elem_nt == AST_Decl::NT_valuetype
8263 || elem_nt == AST_Decl::NT_valuetype_fwd
8264 || elem_nt == AST_Decl::NT_component
8265 || elem_nt == AST_Decl::NT_component_fwd)
8267 can_be_undefined = true;
8271 if (pbt->node_type() == AST_Decl::NT_map)
8273 t = pbt;
8274 AST_Map *map_type =
8275 dynamic_cast<AST_Map*> (pbt);
8276 AST_Type *key_type =
8277 map_type->key_type ();
8278 AST_Type *val_type =
8279 map_type->value_type ();
8281 AST_Decl::NodeType key_nt =
8282 key_type->node_type ();
8283 AST_Decl::NodeType val_nt =
8284 val_type->node_type ();
8286 if (key_nt == AST_Decl::NT_typedef)
8288 AST_Typedef *key_td =
8289 dynamic_cast<AST_Typedef*> (key_type);
8290 key_type = key_td->primitive_base_type ();
8291 key_nt = key_type->node_type ();
8294 if (val_nt == AST_Decl::NT_typedef)
8296 AST_Typedef *val_td =
8297 dynamic_cast<AST_Typedef*> (val_type);
8298 val_type = val_td->primitive_base_type ();
8299 val_nt = val_type->node_type ();
8302 if (key_nt == AST_Decl::NT_interface
8303 || key_nt == AST_Decl::NT_interface_fwd
8304 || key_nt == AST_Decl::NT_valuetype
8305 || key_nt == AST_Decl::NT_valuetype_fwd
8306 || key_nt == AST_Decl::NT_component
8307 || key_nt == AST_Decl::NT_component_fwd
8308 || val_nt == AST_Decl::NT_interface
8309 || val_nt == AST_Decl::NT_interface_fwd
8310 || val_nt == AST_Decl::NT_valuetype
8311 || val_nt == AST_Decl::NT_valuetype_fwd
8312 || val_nt == AST_Decl::NT_component
8313 || val_nt == AST_Decl::NT_component_fwd)
8315 can_be_undefined = true;
8319 if (! t->is_defined () && ! can_be_undefined)
8321 idl_global->err ()->error1 (
8322 UTL_Error::EIDL_ILLEGAL_ADD,
8323 (nt == AST_Decl::NT_typedef ? td : t));
8325 /* If we don't return here, we'll crash later.*/
8326 return 1;
8329 else
8331 // For forward declared structs and unions, we
8332 // want the full definition, but we need to
8333 // check that it's been fully defined.
8334 AST_StructureFwd *fwd =
8335 dynamic_cast<AST_StructureFwd*> (d);
8337 if (fwd != 0)
8339 t = fwd->full_definition ();
8341 if (! t->is_defined ())
8343 idl_global->err ()->error1 (
8344 UTL_Error::EIDL_ILLEGAL_ADD,
8347 /* If we don't return here, we'll crash later.*/
8348 return 1;
8351 d = t;
8356 (yyval.dcval) = d;
8358 #line 8371 "fe/idl.tab.cpp"
8359 break;
8361 case 441: /* direction: IDL_IN */
8362 #line 5229 "fe/idl.ypp"
8364 (yyval.dival) = AST_Argument::dir_IN;
8366 #line 8379 "fe/idl.tab.cpp"
8367 break;
8369 case 442: /* direction: IDL_OUT */
8370 #line 5233 "fe/idl.ypp"
8372 (yyval.dival) = AST_Argument::dir_OUT;
8374 #line 8387 "fe/idl.tab.cpp"
8375 break;
8377 case 443: /* direction: IDL_INOUT */
8378 #line 5237 "fe/idl.ypp"
8380 (yyval.dival) = AST_Argument::dir_INOUT;
8382 #line 8395 "fe/idl.tab.cpp"
8383 break;
8385 case 444: /* $@133: %empty */
8386 #line 5244 "fe/idl.ypp"
8388 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen);
8390 #line 8403 "fe/idl.tab.cpp"
8391 break;
8393 case 445: /* $@134: %empty */
8394 #line 5248 "fe/idl.ypp"
8396 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen);
8398 #line 8411 "fe/idl.tab.cpp"
8399 break;
8401 case 446: /* opt_raises: IDL_RAISES $@133 '(' $@134 at_least_one_scoped_name ')' */
8402 #line 5253 "fe/idl.ypp"
8404 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
8405 (yyval.nlval) = (yyvsp[-1].nlval);
8407 #line 8420 "fe/idl.tab.cpp"
8408 break;
8410 case 447: /* opt_raises: %empty */
8411 #line 5258 "fe/idl.ypp"
8413 (yyval.nlval) = 0;
8415 #line 8428 "fe/idl.tab.cpp"
8416 break;
8418 case 448: /* $@135: %empty */
8419 #line 5265 "fe/idl.ypp"
8421 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSeen);
8423 #line 8436 "fe/idl.tab.cpp"
8424 break;
8426 case 449: /* $@136: %empty */
8427 #line 5269 "fe/idl.ypp"
8429 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSqSeen);
8431 #line 8444 "fe/idl.tab.cpp"
8432 break;
8434 case 450: /* opt_getraises: IDL_GETRAISES $@135 '(' $@136 at_least_one_scoped_name ')' */
8435 #line 5274 "fe/idl.ypp"
8437 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseQsSeen);
8438 (yyval.nlval) = (yyvsp[-1].nlval);
8440 #line 8453 "fe/idl.tab.cpp"
8441 break;
8443 case 451: /* opt_getraises: %empty */
8444 #line 5279 "fe/idl.ypp"
8446 (yyval.nlval) = 0;
8448 #line 8461 "fe/idl.tab.cpp"
8449 break;
8451 case 452: /* $@137: %empty */
8452 #line 5286 "fe/idl.ypp"
8454 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSeen);
8456 #line 8469 "fe/idl.tab.cpp"
8457 break;
8459 case 453: /* $@138: %empty */
8460 #line 5290 "fe/idl.ypp"
8462 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSqSeen);
8464 #line 8477 "fe/idl.tab.cpp"
8465 break;
8467 case 454: /* opt_setraises: IDL_SETRAISES $@137 '(' $@138 at_least_one_scoped_name ')' */
8468 #line 5295 "fe/idl.ypp"
8470 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseQsSeen);
8471 (yyval.nlval) = (yyvsp[-1].nlval);
8473 #line 8486 "fe/idl.tab.cpp"
8474 break;
8476 case 455: /* opt_setraises: %empty */
8477 #line 5300 "fe/idl.ypp"
8479 (yyval.nlval) = 0;
8481 #line 8494 "fe/idl.tab.cpp"
8482 break;
8484 case 456: /* $@139: %empty */
8485 #line 5307 "fe/idl.ypp"
8487 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen);
8489 #line 8502 "fe/idl.tab.cpp"
8490 break;
8492 case 457: /* $@140: %empty */
8493 #line 5311 "fe/idl.ypp"
8495 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen);
8497 #line 8510 "fe/idl.tab.cpp"
8498 break;
8500 case 458: /* opt_context: IDL_CONTEXT $@139 '(' $@140 at_least_one_string_literal ')' */
8501 #line 5316 "fe/idl.ypp"
8503 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
8504 (yyval.slval) = (yyvsp[-1].slval);
8506 #line 8519 "fe/idl.tab.cpp"
8507 break;
8509 case 459: /* opt_context: %empty */
8510 #line 5321 "fe/idl.ypp"
8512 (yyval.slval) = 0;
8514 #line 8527 "fe/idl.tab.cpp"
8515 break;
8517 case 460: /* at_least_one_string_literal: IDL_STRING_LITERAL string_literals */
8518 #line 5328 "fe/idl.ypp"
8520 ACE_NEW_RETURN ((yyval.slval),
8521 UTL_StrList ((yyvsp[-1].sval),
8522 (yyvsp[0].slval)),
8525 #line 8538 "fe/idl.tab.cpp"
8526 break;
8528 case 461: /* $@141: %empty */
8529 #line 5339 "fe/idl.ypp"
8531 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
8533 #line 8546 "fe/idl.tab.cpp"
8534 break;
8536 case 462: /* string_literals: string_literals ',' $@141 IDL_STRING_LITERAL */
8537 #line 5343 "fe/idl.ypp"
8539 UTL_StrList *sl = 0;
8540 ACE_NEW_RETURN (sl,
8541 UTL_StrList ((yyvsp[0].sval),
8545 if ((yyvsp[-3].slval) == 0)
8547 (yyval.slval) = sl;
8549 else
8551 (yyvsp[-3].slval)->nconc (sl);
8552 (yyval.slval) = (yyvsp[-3].slval);
8555 #line 8568 "fe/idl.tab.cpp"
8556 break;
8558 case 463: /* string_literals: %empty */
8559 #line 5361 "fe/idl.ypp"
8561 (yyval.slval) = 0;
8563 #line 8576 "fe/idl.tab.cpp"
8564 break;
8566 case 464: /* typeid_dcl: IDL_TYPEID scoped_name IDL_STRING_LITERAL */
8567 #line 5368 "fe/idl.ypp"
8569 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8570 AST_Decl *d =
8571 s->lookup_by_name ((yyvsp[-1].idlist));
8573 if (d == 0)
8575 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
8577 else
8579 d->set_id_with_typeid (
8580 (yyvsp[0].sval)->get_string ()
8584 (yyvsp[-1].idlist)->destroy ();
8585 delete (yyvsp[-1].idlist);
8586 (yyvsp[-1].idlist) = 0;
8588 (yyvsp[0].sval)->destroy ();
8589 delete (yyvsp[0].sval);
8590 (yyvsp[0].sval) = 0;
8592 (yyval.dcval) = 0;
8594 #line 8607 "fe/idl.tab.cpp"
8595 break;
8597 case 465: /* typeprefix_dcl: IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL */
8598 #line 5398 "fe/idl.ypp"
8600 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8601 AST_Decl *d = ScopeAsDecl (s);
8603 // If we are in a module, we want to avoid a lookup unless the
8604 // typeprefix is to be applied to some other scope, since we
8605 // might get a previous opening of the module, and the prefix
8606 // of this opening would never get checked or set.
8607 if (d->name ()->compare ((yyvsp[-1].idlist)) != 0)
8610 s->lookup_by_name ((yyvsp[-1].idlist));
8613 if (d == 0)
8615 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
8617 else
8619 d->set_prefix_with_typeprefix (
8620 (yyvsp[0].sval)->get_string ()
8624 (yyvsp[-1].idlist)->destroy ();
8625 delete (yyvsp[-1].idlist);
8626 (yyvsp[-1].idlist) = 0;
8628 (yyvsp[0].sval)->destroy ();
8629 delete (yyvsp[0].sval);
8630 (yyvsp[0].sval) = 0;
8632 (yyval.dcval) = 0;
8634 #line 8647 "fe/idl.tab.cpp"
8635 break;
8637 case 468: /* component_forward_decl: IDL_COMPONENT defining_id */
8638 #line 5443 "fe/idl.ypp"
8640 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8641 UTL_ScopedName n ((yyvsp[0].idval),
8643 AST_ComponentFwd *f = 0;
8644 idl_global->set_parse_state (
8645 IDL_GlobalData::PS_ComponentForwardSeen
8649 * Create a node representing a forward declaration of a
8650 * component. Store it in the enclosing scope.
8652 if (s != 0)
8654 f = idl_global->gen ()->create_component_fwd (&n);
8655 (void) s->fe_add_component_fwd (f);
8658 (yyvsp[0].idval)->destroy ();
8659 delete (yyvsp[0].idval);
8660 (yyvsp[0].idval) = 0;
8662 (yyval.dcval) = 0;
8664 #line 8677 "fe/idl.tab.cpp"
8665 break;
8667 case 469: /* @142: %empty */
8668 #line 5472 "fe/idl.ypp"
8670 FE_ComponentHeader *&component_header = (yyvsp[0].chval);
8671 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
8672 AST_Component *component = 0;
8675 * Make a new component node and add it to the enclosing scope.
8677 if (scope && component_header)
8679 component = idl_global->gen ()->create_component (
8680 component_header->name (),
8681 component_header->base_component (),
8682 component_header->supports (),
8683 component_header->n_supports (),
8684 component_header->supports_flat (),
8685 component_header->n_supports_flat ());
8686 AST_Interface *component_as_interface =
8687 dynamic_cast<AST_Interface *> (component);
8688 AST_Interface::fwd_redefinition_helper (
8689 component_as_interface, scope);
8690 component = dynamic_cast<AST_Component *> (component_as_interface);
8693 * Add the component to its definition scope.
8695 scope->fe_add_component (component);
8697 // This FE_ComponentHeader class isn't destroyed with the AST.
8698 component_header->destroy ();
8699 delete component_header;
8700 component_header = 0;
8704 * Push it on the scope stack.
8706 idl_global->scopes ().push (component);
8708 (yyval.dcval) = component;
8710 #line 8723 "fe/idl.tab.cpp"
8711 break;
8713 case 470: /* $@143: %empty */
8714 #line 5514 "fe/idl.ypp"
8716 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSqSeen);
8718 #line 8731 "fe/idl.tab.cpp"
8719 break;
8721 case 471: /* $@144: %empty */
8722 #line 5518 "fe/idl.ypp"
8724 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentBodySeen);
8726 #line 8739 "fe/idl.tab.cpp"
8727 break;
8729 case 472: /* component_decl: component_header @142 '{' $@143 component_exports $@144 '}' */
8730 #line 5522 "fe/idl.ypp"
8732 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentQsSeen);
8735 * Done with this component - pop it off the scopes stack.
8737 idl_global->scopes ().pop ();
8739 (yyval.dcval) = (yyvsp[-5].dcval);
8741 #line 8754 "fe/idl.tab.cpp"
8742 break;
8744 case 473: /* $@145: %empty */
8745 #line 5537 "fe/idl.ypp"
8747 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentIDSeen);
8749 #line 8762 "fe/idl.tab.cpp"
8750 break;
8752 case 474: /* $@146: %empty */
8753 #line 5541 "fe/idl.ypp"
8755 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
8757 #line 8770 "fe/idl.tab.cpp"
8758 break;
8760 case 475: /* component_header: IDL_COMPONENT defining_id $@145 component_inheritance_spec $@146 supports_spec */
8761 #line 5545 "fe/idl.ypp"
8763 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
8766 * Create an AST representation of the information in the header
8767 * part of a component.
8769 UTL_ScopedName *n = 0;
8770 ACE_NEW_RETURN (n,
8771 UTL_ScopedName ((yyvsp[-4].idval),
8774 ACE_NEW_RETURN ((yyval.chval),
8775 FE_ComponentHeader (n,
8776 (yyvsp[-2].idlist),
8777 (yyvsp[0].nlval),
8778 false),
8781 if (0 != (yyvsp[0].nlval))
8783 (yyvsp[0].nlval)->destroy ();
8784 delete (yyvsp[0].nlval);
8785 (yyvsp[0].nlval) = 0;
8788 if (0 != (yyvsp[-2].idlist))
8790 (yyvsp[-2].idlist)->destroy ();
8791 delete (yyvsp[-2].idlist);
8792 (yyvsp[-2].idlist) = 0;
8795 #line 8808 "fe/idl.tab.cpp"
8796 break;
8798 case 476: /* $@147: %empty */
8799 #line 5582 "fe/idl.ypp"
8801 idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
8803 #line 8816 "fe/idl.tab.cpp"
8804 break;
8806 case 477: /* component_inheritance_spec: ':' $@147 scoped_name */
8807 #line 5586 "fe/idl.ypp"
8809 (yyval.idlist) = (yyvsp[0].idlist);
8811 #line 8824 "fe/idl.tab.cpp"
8812 break;
8814 case 478: /* component_inheritance_spec: %empty */
8815 #line 5590 "fe/idl.ypp"
8817 (yyval.idlist) = 0;
8819 #line 8832 "fe/idl.tab.cpp"
8820 break;
8822 case 479: /* component_exports: component_exports at_least_one_annotation component_export */
8823 #line 5597 "fe/idl.ypp"
8825 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
8826 AST_Decl *&node = (yyvsp[0].dcval);
8827 if (node)
8829 node->annotation_appls (*annotations);
8831 else
8833 idl_global->err ()-> unsupported_warning (
8834 "Annotating this is not supported");
8836 delete annotations;
8838 #line 8851 "fe/idl.tab.cpp"
8839 break;
8841 case 482: /* $@148: %empty */
8842 #line 5617 "fe/idl.ypp"
8844 idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
8846 #line 8859 "fe/idl.tab.cpp"
8847 break;
8849 case 483: /* component_export: provides_decl $@148 ';' */
8850 #line 5621 "fe/idl.ypp"
8852 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8853 (yyval.dcval) = (yyvsp[-2].dcval);
8855 #line 8868 "fe/idl.tab.cpp"
8856 break;
8858 case 484: /* $@149: %empty */
8859 #line 5626 "fe/idl.ypp"
8861 idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
8863 #line 8876 "fe/idl.tab.cpp"
8864 break;
8866 case 485: /* component_export: uses_decl $@149 ';' */
8867 #line 5630 "fe/idl.ypp"
8869 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8870 (yyval.dcval) = (yyvsp[-2].dcval);
8872 #line 8885 "fe/idl.tab.cpp"
8873 break;
8875 case 486: /* $@150: %empty */
8876 #line 5635 "fe/idl.ypp"
8878 idl_global->set_parse_state (IDL_GlobalData::PS_EmitsDeclSeen);
8880 #line 8893 "fe/idl.tab.cpp"
8881 break;
8883 case 487: /* component_export: emits_decl $@150 ';' */
8884 #line 5639 "fe/idl.ypp"
8886 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8887 (yyval.dcval) = (yyvsp[-2].dcval);
8889 #line 8902 "fe/idl.tab.cpp"
8890 break;
8892 case 488: /* $@151: %empty */
8893 #line 5644 "fe/idl.ypp"
8895 idl_global->set_parse_state (IDL_GlobalData::PS_PublishesDeclSeen);
8897 #line 8910 "fe/idl.tab.cpp"
8898 break;
8900 case 489: /* component_export: publishes_decl $@151 ';' */
8901 #line 5648 "fe/idl.ypp"
8903 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8904 (yyval.dcval) = (yyvsp[-2].dcval);
8906 #line 8919 "fe/idl.tab.cpp"
8907 break;
8909 case 490: /* $@152: %empty */
8910 #line 5653 "fe/idl.ypp"
8912 idl_global->set_parse_state (IDL_GlobalData::PS_ConsumesDeclSeen);
8914 #line 8927 "fe/idl.tab.cpp"
8915 break;
8917 case 491: /* component_export: consumes_decl $@152 ';' */
8918 #line 5657 "fe/idl.ypp"
8920 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8921 (yyval.dcval) = (yyvsp[-2].dcval);
8923 #line 8936 "fe/idl.tab.cpp"
8924 break;
8926 case 492: /* $@153: %empty */
8927 #line 5662 "fe/idl.ypp"
8929 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
8931 #line 8944 "fe/idl.tab.cpp"
8932 break;
8934 case 493: /* component_export: attribute $@153 ';' */
8935 #line 5666 "fe/idl.ypp"
8937 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8938 (yyval.dcval) = (yyvsp[-2].dcval);
8940 #line 8953 "fe/idl.tab.cpp"
8941 break;
8943 case 494: /* $@154: %empty */
8944 #line 5671 "fe/idl.ypp"
8946 idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
8948 #line 8961 "fe/idl.tab.cpp"
8949 break;
8951 case 495: /* component_export: extended_port_decl $@154 ';' */
8952 #line 5675 "fe/idl.ypp"
8954 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8955 (yyval.dcval) = (yyvsp[-2].dcval);
8957 #line 8970 "fe/idl.tab.cpp"
8958 break;
8960 case 496: /* provides_decl: IDL_PROVIDES interface_type id */
8961 #line 5682 "fe/idl.ypp"
8963 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8964 bool so_far_so_good = true;
8965 AST_Decl::NodeType nt = AST_Decl::NT_type;
8966 AST_Param_Holder *ph = 0;
8968 AST_Decl *d =
8969 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
8971 if (d == 0)
8973 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
8974 so_far_so_good = false;
8976 else
8978 int compare = 0;
8979 nt = d->node_type ();
8981 switch (nt)
8983 case AST_Decl::NT_interface:
8984 break;
8985 case AST_Decl::NT_param_holder:
8986 ph = dynamic_cast<AST_Param_Holder*> (d);
8987 nt = ph->info ()->type_;
8989 if (nt != AST_Decl::NT_type
8990 && nt != AST_Decl::NT_interface)
8992 idl_global->err ()->mismatched_template_param (
8993 ph->info ()->name_.c_str ());
8995 so_far_so_good = false;
8998 break;
8999 case AST_Decl::NT_pre_defined:
9000 // Nothing else but CORBA::Object can have
9001 // this identifier.
9002 compare =
9003 ACE_OS::strcmp (d->local_name ()->get_string (),
9004 "Object");
9006 // Simple provides port must use IDL interface
9007 // or CORBA::Object.
9008 if (compare != 0)
9010 idl_global->err ()->interface_expected (d);
9011 so_far_so_good = false;
9014 break;
9015 default:
9016 idl_global->err ()->interface_expected (d);
9017 so_far_so_good = false;
9018 break;
9022 AST_Provides *provides = 0;
9024 if (so_far_so_good)
9026 AST_Type *port_interface_type =
9027 dynamic_cast<AST_Type*> (d);
9029 // Strip off _cxx_, if any, for port name.
9030 FE_Utils::original_local_name ((yyvsp[0].idval));
9032 UTL_ScopedName sn ((yyvsp[0].idval),
9035 provides = idl_global->gen ()->create_provides (
9036 &sn, port_interface_type);
9038 (void) s->fe_add_provides (provides);
9041 (yyvsp[-1].idlist)->destroy ();
9042 delete (yyvsp[-1].idlist);
9043 (yyvsp[-1].idlist) = 0;
9045 (yyvsp[0].idval)->destroy ();
9046 delete (yyvsp[0].idval);
9047 (yyvsp[0].idval) = 0;
9049 (yyval.dcval) = dynamic_cast<AST_Decl *> (provides);
9051 #line 9064 "fe/idl.tab.cpp"
9052 break;
9054 case 497: /* interface_type: scoped_name */
9055 #line 5775 "fe/idl.ypp"
9057 // Lookups and checking are done where the 'interface_type'
9058 // token is used, in 'provides_decl' and 'uses_decl'.
9059 (yyval.idlist) = (yyvsp[0].idlist);
9061 #line 9074 "fe/idl.tab.cpp"
9062 break;
9064 case 498: /* interface_type: IDL_OBJECT */
9065 #line 5781 "fe/idl.ypp"
9067 Identifier *corba_id = 0;
9069 ACE_NEW_RETURN (corba_id,
9070 Identifier ("Object"),
9073 UTL_IdList *conc_name = 0;
9074 ACE_NEW_RETURN (conc_name,
9075 UTL_IdList (corba_id,
9079 ACE_NEW_RETURN (corba_id,
9080 Identifier ("CORBA"),
9083 ACE_NEW_RETURN ((yyval.idlist),
9084 UTL_IdList (corba_id,
9085 conc_name),
9088 #line 9101 "fe/idl.tab.cpp"
9089 break;
9091 case 499: /* uses_decl: uses_opt_multiple interface_type id */
9092 #line 5806 "fe/idl.ypp"
9094 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9095 bool so_far_so_good = true;
9096 AST_Decl::NodeType nt = AST_Decl::NT_type;
9097 AST_Param_Holder *ph = 0;
9099 AST_Decl *d =
9100 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9102 if (d == 0)
9104 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9105 so_far_so_good = false;
9107 else
9109 int compare = 0;
9110 nt = d->node_type ();
9112 switch (nt)
9114 case AST_Decl::NT_interface:
9115 break;
9116 case AST_Decl::NT_param_holder:
9117 ph = dynamic_cast<AST_Param_Holder*> (d);
9118 nt = ph->info ()->type_;
9120 if (nt != AST_Decl::NT_type
9121 && nt != AST_Decl::NT_interface)
9123 idl_global->err ()->mismatched_template_param (
9124 ph->info ()->name_.c_str ());
9126 so_far_so_good = false;
9129 break;
9130 case AST_Decl::NT_pre_defined:
9131 // Nothing else but CORBA::Object can have
9132 // this identifier.
9133 compare =
9134 ACE_OS::strcmp (d->local_name ()->get_string (),
9135 "Object");
9137 // Simple provides port must use IDL interface
9138 // or CORBA::Object.
9139 if (compare != 0)
9141 idl_global->err ()->interface_expected (d);
9142 so_far_so_good = false;
9145 break;
9146 default:
9147 idl_global->err ()->interface_expected (d);
9148 so_far_so_good = false;
9149 break;
9153 AST_Uses *uses = 0;
9155 if (so_far_so_good)
9157 AST_Type *port_interface_type =
9158 dynamic_cast<AST_Type*> (d);
9160 // Strip off _cxx_, if any, for port name.
9161 FE_Utils::original_local_name ((yyvsp[0].idval));
9163 UTL_ScopedName sn ((yyvsp[0].idval),
9166 uses = idl_global->gen ()->create_uses (
9167 &sn, port_interface_type, (yyvsp[-2].bval));
9168 s->fe_add_uses (uses);
9170 AST_Component *c =
9171 dynamic_cast<AST_Component*> (s);
9173 if (c != 0
9174 && uses->is_multiple ()
9175 && !idl_global->using_ifr_backend ()
9176 && !idl_global->ignore_idl3 ()
9177 && nt != AST_Decl::NT_param_holder)
9179 // These datatypes must be created in the
9180 // front end so they can be looked up
9181 // when compiling the generated executor IDL.
9182 FE_Utils::create_uses_multiple_stuff (c, uses);
9186 (yyvsp[-1].idlist)->destroy ();
9187 delete (yyvsp[-1].idlist);
9188 (yyvsp[-1].idlist) = 0;
9190 (yyvsp[0].idval)->destroy ();
9191 delete (yyvsp[0].idval);
9192 (yyvsp[0].idval) = 0;
9194 (yyval.dcval) = uses;
9196 #line 9209 "fe/idl.tab.cpp"
9197 break;
9199 case 500: /* uses_opt_multiple: IDL_USES opt_multiple */
9200 #line 5913 "fe/idl.ypp"
9202 // We use this extra rule here to use in both uses_decl and
9203 // extended_uses_decl, so the LALR(1) parser can avoid conflicts.
9204 (yyval.bval) = (yyvsp[0].bval);
9206 #line 9219 "fe/idl.tab.cpp"
9207 break;
9209 case 501: /* opt_multiple: IDL_MULTIPLE */
9210 #line 5922 "fe/idl.ypp"
9212 (yyval.bval) = true;
9214 #line 9227 "fe/idl.tab.cpp"
9215 break;
9217 case 502: /* opt_multiple: %empty */
9218 #line 5926 "fe/idl.ypp"
9220 (yyval.bval) = false;
9222 #line 9235 "fe/idl.tab.cpp"
9223 break;
9225 case 503: /* emits_decl: IDL_EMITS scoped_name id */
9226 #line 5933 "fe/idl.ypp"
9228 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9229 bool so_far_so_good = true;
9230 AST_Decl::NodeType nt = AST_Decl::NT_type;
9231 AST_Param_Holder *ph = 0;
9233 AST_Decl *d =
9234 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9236 if (0 == d)
9238 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9239 so_far_so_good = false;
9241 else
9243 nt = d->node_type ();
9245 switch (nt)
9247 case AST_Decl::NT_eventtype:
9248 break;
9249 case AST_Decl::NT_param_holder:
9250 ph = dynamic_cast<AST_Param_Holder*> (d);
9251 nt = ph->info ()->type_;
9253 if (nt != AST_Decl::NT_type
9254 && nt != AST_Decl::NT_eventtype)
9256 idl_global->err ()->mismatched_template_param (
9257 ph->info ()->name_.c_str ());
9259 so_far_so_good = false;
9262 break;
9263 default:
9264 idl_global->err ()->eventtype_expected (d);
9265 so_far_so_good = false;
9266 break;
9270 AST_Emits *e = 0;
9272 if (so_far_so_good)
9274 AST_Type *event_type =
9275 dynamic_cast<AST_Type*> (d);
9277 // Strip off _cxx_, if any, for port name.
9278 FE_Utils::original_local_name ((yyvsp[0].idval));
9280 UTL_ScopedName sn ((yyvsp[0].idval),
9283 e = idl_global->gen ()->create_emits (&sn, event_type);
9285 (void) s->fe_add_emits (e);
9288 (yyvsp[-1].idlist)->destroy ();
9289 delete (yyvsp[-1].idlist);
9290 (yyvsp[-1].idlist) = 0;
9292 (yyvsp[0].idval)->destroy ();
9293 delete (yyvsp[0].idval);
9294 (yyvsp[0].idval) = 0;
9296 (yyval.dcval) = e;
9298 #line 9311 "fe/idl.tab.cpp"
9299 break;
9301 case 504: /* publishes_decl: IDL_PUBLISHES scoped_name id */
9302 #line 6008 "fe/idl.ypp"
9304 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9305 bool so_far_so_good = true;
9306 AST_Decl::NodeType nt = AST_Decl::NT_type;
9307 AST_Param_Holder *ph = 0;
9309 AST_Decl *d =
9310 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9312 if (0 == d)
9314 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9315 so_far_so_good = false;
9317 else
9319 nt = d->node_type ();
9321 switch (nt)
9323 case AST_Decl::NT_eventtype:
9324 break;
9325 case AST_Decl::NT_param_holder:
9326 ph = dynamic_cast<AST_Param_Holder*> (d);
9327 nt = ph->info ()->type_;
9329 if (nt != AST_Decl::NT_type
9330 && nt != AST_Decl::NT_eventtype)
9332 idl_global->err ()->mismatched_template_param (
9333 ph->info ()->name_.c_str ());
9335 so_far_so_good = false;
9338 break;
9339 default:
9340 idl_global->err ()->eventtype_expected (d);
9341 so_far_so_good = false;
9342 break;
9346 AST_Publishes *p = 0;
9348 if (so_far_so_good)
9350 AST_Type *event_type =
9351 dynamic_cast<AST_Type*> (d);
9353 // Strip off _cxx_, if any, for port name.
9354 FE_Utils::original_local_name ((yyvsp[0].idval));
9356 UTL_ScopedName sn ((yyvsp[0].idval), 0);
9357 p = idl_global->gen ()->create_publishes (&sn, event_type);
9358 s->fe_add_publishes (p);
9361 (yyvsp[-1].idlist)->destroy ();
9362 delete (yyvsp[-1].idlist);
9363 (yyvsp[-1].idlist) = 0;
9365 (yyvsp[0].idval)->destroy ();
9366 delete (yyvsp[0].idval);
9367 (yyvsp[0].idval) = 0;
9369 (yyval.dcval) = p;
9371 #line 9384 "fe/idl.tab.cpp"
9372 break;
9374 case 505: /* consumes_decl: IDL_CONSUMES scoped_name id */
9375 #line 6080 "fe/idl.ypp"
9377 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9378 bool so_far_so_good = true;
9379 AST_Decl::NodeType nt = AST_Decl::NT_type;
9380 AST_Param_Holder *ph = 0;
9382 AST_Decl *d =
9383 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9385 if (0 == d)
9387 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9388 so_far_so_good = false;
9390 else
9392 nt = d->node_type ();
9394 switch (nt)
9396 case AST_Decl::NT_eventtype:
9397 break;
9398 case AST_Decl::NT_param_holder:
9399 ph = dynamic_cast<AST_Param_Holder*> (d);
9400 nt = ph->info ()->type_;
9402 if (nt != AST_Decl::NT_type
9403 && nt != AST_Decl::NT_eventtype)
9405 idl_global->err ()->mismatched_template_param (
9406 ph->info ()->name_.c_str ());
9408 so_far_so_good = false;
9411 break;
9412 default:
9413 idl_global->err ()->eventtype_expected (d);
9414 so_far_so_good = false;
9415 break;
9419 AST_Consumes *c = 0;
9421 if (so_far_so_good)
9423 AST_Type *event_type =
9424 dynamic_cast<AST_Type*> (d);
9426 // Strip off _cxx_, if any, for port name.
9427 FE_Utils::original_local_name ((yyvsp[0].idval));
9429 UTL_ScopedName sn ((yyvsp[0].idval),
9432 c = idl_global->gen ()->create_consumes (&sn, event_type);
9434 (void) s->fe_add_consumes (c);
9437 (yyvsp[-1].idlist)->destroy ();
9438 delete (yyvsp[-1].idlist);
9439 (yyvsp[-1].idlist) = 0;
9441 (yyvsp[0].idval)->destroy ();
9442 delete (yyvsp[0].idval);
9443 (yyvsp[0].idval) = 0;
9445 (yyval.dcval) = c;
9447 #line 9460 "fe/idl.tab.cpp"
9448 break;
9450 case 506: /* $@155: %empty */
9451 #line 6155 "fe/idl.ypp"
9453 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9454 AST_Home *h = 0;
9457 * Make a new home node and add it to the enclosing scope.
9459 if (s != 0 && (yyvsp[0].hhval) != 0)
9462 idl_global->gen ()->create_home (
9463 (yyvsp[0].hhval)->name (),
9464 (yyvsp[0].hhval)->base_home (),
9465 (yyvsp[0].hhval)->managed_component (),
9466 (yyvsp[0].hhval)->primary_key (),
9467 (yyvsp[0].hhval)->supports (),
9468 (yyvsp[0].hhval)->n_supports (),
9469 (yyvsp[0].hhval)->supports_flat (),
9470 (yyvsp[0].hhval)->n_supports_flat ()
9473 * Add the home to its definition scope.
9475 (void) s->fe_add_home (h);
9477 // This FE_HomeHeader class isn't destroyed with the AST.
9478 (yyvsp[0].hhval)->destroy ();
9479 delete (yyvsp[0].hhval);
9480 (yyvsp[0].hhval) = 0;
9484 * Push it on the scope stack.
9486 idl_global->scopes ().push (h);
9488 #line 9501 "fe/idl.tab.cpp"
9489 break;
9491 case 507: /* home_decl: home_header $@155 home_body */
9492 #line 6192 "fe/idl.ypp"
9495 * Done with this component - pop it off the scopes stack.
9497 idl_global->scopes ().pop ();
9499 (yyval.dcval) = 0;
9501 #line 9514 "fe/idl.tab.cpp"
9502 break;
9504 case 508: /* $@156: %empty */
9505 #line 6204 "fe/idl.ypp"
9507 idl_global->set_parse_state (IDL_GlobalData::PS_HomeSeen);
9509 #line 9522 "fe/idl.tab.cpp"
9510 break;
9512 case 509: /* $@157: %empty */
9513 #line 6208 "fe/idl.ypp"
9515 idl_global->set_parse_state (IDL_GlobalData::PS_HomeIDSeen);
9517 #line 9530 "fe/idl.tab.cpp"
9518 break;
9520 case 510: /* $@158: %empty */
9521 #line 6212 "fe/idl.ypp"
9523 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
9525 #line 9538 "fe/idl.tab.cpp"
9526 break;
9528 case 511: /* $@159: %empty */
9529 #line 6216 "fe/idl.ypp"
9531 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
9533 #line 9546 "fe/idl.tab.cpp"
9534 break;
9536 case 512: /* $@160: %empty */
9537 #line 6220 "fe/idl.ypp"
9539 idl_global->set_parse_state (IDL_GlobalData::PS_ManagesSeen);
9541 #line 9554 "fe/idl.tab.cpp"
9542 break;
9544 case 513: /* $@161: %empty */
9545 #line 6224 "fe/idl.ypp"
9547 idl_global->set_parse_state (IDL_GlobalData::PS_ManagesIDSeen);
9549 #line 9562 "fe/idl.tab.cpp"
9550 break;
9552 case 514: /* home_header: IDL_HOME $@156 defining_id $@157 home_inheritance_spec $@158 supports_spec $@159 IDL_MANAGES $@160 scoped_name $@161 primary_key_spec */
9553 #line 6228 "fe/idl.ypp"
9555 idl_global->set_parse_state (IDL_GlobalData::PS_PrimaryKeySpecSeen);
9558 * Create an AST representation of the information in the header
9559 * part of a component home.
9561 UTL_ScopedName *n = 0;
9562 ACE_NEW_RETURN (n,
9563 UTL_ScopedName ((yyvsp[-10].idval), 0),
9566 ACE_NEW_RETURN ((yyval.hhval),
9567 FE_HomeHeader (n,
9568 (yyvsp[-8].idlist),
9569 (yyvsp[-6].nlval),
9570 (yyvsp[-2].idlist),
9571 (yyvsp[0].idlist)),
9574 (yyvsp[-2].idlist)->destroy ();
9575 delete (yyvsp[-2].idlist);
9576 (yyvsp[-2].idlist) = 0;
9578 if (0 != (yyvsp[-8].idlist))
9580 (yyvsp[-8].idlist)->destroy ();
9581 delete (yyvsp[-8].idlist);
9582 (yyvsp[-8].idlist) = 0;
9585 if (0 != (yyvsp[0].idlist))
9587 (yyvsp[0].idlist)->destroy ();
9588 delete (yyvsp[0].idlist);
9589 (yyvsp[0].idlist) = 0;
9592 if (0 != (yyvsp[-6].nlval))
9594 (yyvsp[-6].nlval)->destroy ();
9595 delete (yyvsp[-6].nlval);
9596 (yyvsp[-6].nlval) = 0;
9599 #line 9612 "fe/idl.tab.cpp"
9600 break;
9602 case 515: /* $@162: %empty */
9603 #line 6277 "fe/idl.ypp"
9605 idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
9607 #line 9620 "fe/idl.tab.cpp"
9608 break;
9610 case 516: /* home_inheritance_spec: ':' $@162 scoped_name */
9611 #line 6281 "fe/idl.ypp"
9613 (yyval.idlist) = (yyvsp[0].idlist);
9615 #line 9628 "fe/idl.tab.cpp"
9616 break;
9618 case 517: /* home_inheritance_spec: %empty */
9619 #line 6285 "fe/idl.ypp"
9621 (yyval.idlist) = 0;
9623 #line 9636 "fe/idl.tab.cpp"
9624 break;
9626 case 518: /* primary_key_spec: IDL_PRIMARYKEY scoped_name */
9627 #line 6293 "fe/idl.ypp"
9629 (yyval.idlist) = (yyvsp[0].idlist);
9631 #line 9644 "fe/idl.tab.cpp"
9632 break;
9634 case 519: /* primary_key_spec: %empty */
9635 #line 6297 "fe/idl.ypp"
9637 (yyval.idlist) = 0;
9639 #line 9652 "fe/idl.tab.cpp"
9640 break;
9642 case 520: /* $@163: %empty */
9643 #line 6304 "fe/idl.ypp"
9645 idl_global->set_parse_state (IDL_GlobalData::PS_HomeSqSeen);
9647 #line 9660 "fe/idl.tab.cpp"
9648 break;
9650 case 521: /* $@164: %empty */
9651 #line 6308 "fe/idl.ypp"
9653 idl_global->set_parse_state (IDL_GlobalData::PS_HomeBodySeen);
9655 #line 9668 "fe/idl.tab.cpp"
9656 break;
9658 case 522: /* home_body: '{' $@163 home_exports $@164 '}' */
9659 #line 6312 "fe/idl.ypp"
9661 idl_global->set_parse_state (IDL_GlobalData::PS_HomeQsSeen);
9663 #line 9676 "fe/idl.tab.cpp"
9664 break;
9666 case 526: /* $@165: %empty */
9667 #line 6325 "fe/idl.ypp"
9669 idl_global->set_parse_state (IDL_GlobalData::PS_FactoryDeclSeen);
9671 #line 9684 "fe/idl.tab.cpp"
9672 break;
9674 case 527: /* home_export: factory_decl $@165 ';' */
9675 #line 6329 "fe/idl.ypp"
9677 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
9679 #line 9692 "fe/idl.tab.cpp"
9680 break;
9682 case 528: /* $@166: %empty */
9683 #line 6333 "fe/idl.ypp"
9685 idl_global->set_parse_state (IDL_GlobalData::PS_FinderDeclSeen);
9687 #line 9700 "fe/idl.tab.cpp"
9688 break;
9690 case 529: /* home_export: finder_decl $@166 ';' */
9691 #line 6337 "fe/idl.ypp"
9693 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
9695 #line 9708 "fe/idl.tab.cpp"
9696 break;
9698 case 530: /* $@167: %empty */
9699 #line 6345 "fe/idl.ypp"
9701 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9702 UTL_ScopedName n ((yyvsp[0].idval),
9704 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
9707 * Create a node representing a factory operation
9708 * and add it to the enclosing scope.
9710 AST_Factory *f = idl_global->gen ()->create_factory (&n);
9711 (void) s->fe_add_factory (f);
9713 (yyvsp[0].idval)->destroy ();
9714 delete (yyvsp[0].idval);
9715 (yyvsp[0].idval) = 0;
9718 * Push the factory scope onto the scopes stack.
9720 idl_global->scopes ().push (f);
9722 #line 9735 "fe/idl.tab.cpp"
9723 break;
9725 case 531: /* $@168: %empty */
9726 #line 6368 "fe/idl.ypp"
9728 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
9730 #line 9743 "fe/idl.tab.cpp"
9731 break;
9733 case 532: /* factory_decl: IDL_FACTORY defining_id $@167 init_parameter_list $@168 opt_raises */
9734 #line 6372 "fe/idl.ypp"
9736 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9737 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
9740 * Add exceptions and context to the factory.
9742 if ((yyvsp[0].nlval) != 0)
9744 (void) s->fe_add_exceptions ((yyvsp[0].nlval));
9748 * Done with this factory. Pop its scope from the scopes stack.
9750 idl_global->scopes ().pop ();
9752 #line 9765 "fe/idl.tab.cpp"
9753 break;
9755 case 533: /* $@169: %empty */
9756 #line 6394 "fe/idl.ypp"
9758 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9759 UTL_ScopedName n ((yyvsp[0].idval),
9762 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
9765 * Create a node representing a home finder
9766 * and add it to the enclosing scope.
9768 AST_Finder *f =
9769 idl_global->gen ()->create_finder (&n);
9771 (void) s->fe_add_finder (f);
9774 (yyvsp[0].idval)->destroy ();
9775 delete (yyvsp[0].idval);
9776 (yyvsp[0].idval) = 0;
9779 * Push the operation scope onto the scopes stack.
9781 idl_global->scopes ().push (f);
9783 #line 9796 "fe/idl.tab.cpp"
9784 break;
9786 case 534: /* $@170: %empty */
9787 #line 6421 "fe/idl.ypp"
9789 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
9791 #line 9804 "fe/idl.tab.cpp"
9792 break;
9794 case 535: /* finder_decl: IDL_FINDER defining_id $@169 init_parameter_list $@170 opt_raises */
9795 #line 6425 "fe/idl.ypp"
9797 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9798 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
9801 * Add exceptions and context to the finder.
9803 if ((yyvsp[0].nlval) != 0)
9805 (void) s->fe_add_exceptions ((yyvsp[0].nlval));
9809 * Done with this operation. Pop its scope from the scopes stack.
9811 idl_global->scopes ().pop ();
9813 #line 9826 "fe/idl.tab.cpp"
9814 break;
9816 case 541: /* event_concrete_forward_decl: IDL_EVENTTYPE defining_id */
9817 #line 6458 "fe/idl.ypp"
9819 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9820 UTL_ScopedName n ((yyvsp[0].idval),
9822 AST_EventTypeFwd *f = 0;
9823 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeForwardSeen);
9826 * Create a node representing a forward declaration of an
9827 * eventtype. Store it in the enclosing scope
9829 if (s != 0)
9831 f = idl_global->gen ()->create_eventtype_fwd (&n,
9832 false);
9833 (void) s->fe_add_valuetype_fwd (f);
9836 (yyvsp[0].idval)->destroy ();
9837 delete (yyvsp[0].idval);
9838 (yyvsp[0].idval) = 0;
9840 (yyval.dcval) = 0;
9842 #line 9855 "fe/idl.tab.cpp"
9843 break;
9845 case 542: /* event_abs_forward_decl: IDL_ABSTRACT IDL_EVENTTYPE defining_id */
9846 #line 6488 "fe/idl.ypp"
9848 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9849 UTL_ScopedName n ((yyvsp[0].idval),
9851 AST_EventTypeFwd *f = 0;
9852 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeForwardSeen);
9855 * Create a node representing a forward declaration of an
9856 * eventtype. Store it in the enclosing scope
9858 if (s != 0)
9860 f = idl_global->gen ()->create_eventtype_fwd (&n,
9861 true);
9862 (void) s->fe_add_valuetype_fwd (f);
9865 (yyvsp[0].idval)->destroy ();
9866 delete (yyvsp[0].idval);
9867 (yyvsp[0].idval) = 0;
9869 (yyval.dcval) = 0;
9871 #line 9884 "fe/idl.tab.cpp"
9872 break;
9874 case 543: /* $@171: %empty */
9875 #line 6517 "fe/idl.ypp"
9877 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9878 AST_EventType *e = 0;
9879 AST_Interface *i = 0;
9881 if (s != 0 && (yyvsp[-1].idval) != 0)
9883 UTL_ScopedName sn ((yyvsp[-1].idval),
9886 idl_global->gen ()->create_eventtype (
9887 &sn,
9888 (yyvsp[0].vhval)->inherits (),
9889 (yyvsp[0].vhval)->n_inherits (),
9890 (yyvsp[0].vhval)->inherits_concrete (),
9891 (yyvsp[0].vhval)->inherits_flat (),
9892 (yyvsp[0].vhval)->n_inherits_flat (),
9893 (yyvsp[0].vhval)->supports (),
9894 (yyvsp[0].vhval)->n_supports (),
9895 (yyvsp[0].vhval)->supports_concrete (),
9896 true,
9897 false,
9898 false
9900 i = dynamic_cast<AST_Interface*> (e);
9901 AST_Interface::fwd_redefinition_helper (i,
9904 * Add the eventetype to its definition scope
9906 e = dynamic_cast<AST_EventType*> (i);
9907 (void) s->fe_add_eventtype (e);
9911 * Push it on the scope stack.
9913 idl_global->scopes ().push (e);
9915 (yyvsp[-1].idval)->destroy ();
9916 delete (yyvsp[-1].idval);
9917 (yyvsp[-1].idval) = 0;
9919 #line 9932 "fe/idl.tab.cpp"
9920 break;
9922 case 544: /* $@172: %empty */
9923 #line 6561 "fe/idl.ypp"
9925 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
9927 #line 9940 "fe/idl.tab.cpp"
9928 break;
9930 case 545: /* $@173: %empty */
9931 #line 6565 "fe/idl.ypp"
9933 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
9935 #line 9948 "fe/idl.tab.cpp"
9936 break;
9938 case 546: /* event_abs_decl: event_abs_header event_rest_of_header $@171 '{' $@172 exports $@173 '}' */
9939 #line 6569 "fe/idl.ypp"
9941 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
9944 * Done with this eventtype - pop it off the scopes stack.
9946 idl_global->scopes ().pop ();
9948 (yyval.dcval) = 0;
9950 #line 9963 "fe/idl.tab.cpp"
9951 break;
9953 case 547: /* event_abs_header: IDL_ABSTRACT IDL_EVENTTYPE defining_id */
9954 #line 6585 "fe/idl.ypp"
9956 (yyval.idval) = (yyvsp[0].idval);
9958 #line 9971 "fe/idl.tab.cpp"
9959 break;
9961 case 548: /* event_custom_header: IDL_CUSTOM IDL_EVENTTYPE defining_id */
9962 #line 6594 "fe/idl.ypp"
9964 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
9966 ACE_DEBUG ((LM_DEBUG,
9967 ACE_TEXT ("error in %C line %d\n"),
9968 idl_global->filename ()->get_string (),
9969 idl_global->lineno ()));
9970 ACE_DEBUG ((LM_DEBUG,
9971 ACE_TEXT ("Sorry, I (TAO_IDL) can't handle")
9972 ACE_TEXT (" custom yet\n")));
9973 (yyval.idval) = 0;
9975 #line 9988 "fe/idl.tab.cpp"
9976 break;
9978 case 549: /* event_plain_header: IDL_EVENTTYPE defining_id */
9979 #line 6611 "fe/idl.ypp"
9981 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
9983 (yyval.idval) = (yyvsp[0].idval);
9985 #line 9998 "fe/idl.tab.cpp"
9986 break;
9988 case 550: /* $@174: %empty */
9989 #line 6620 "fe/idl.ypp"
9991 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
9993 #line 10006 "fe/idl.tab.cpp"
9994 break;
9996 case 551: /* event_rest_of_header: inheritance_spec $@174 supports_spec */
9997 #line 6624 "fe/idl.ypp"
9999 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
10001 ACE_NEW_RETURN ((yyval.vhval),
10002 FE_OBVHeader (
10004 (yyvsp[-2].nlval),
10005 (yyvsp[0].nlval),
10006 (yyvsp[-2].nlval)
10007 ? (yyvsp[-2].nlval)->truncatable ()
10008 : false,
10009 true),
10012 if (0 != (yyvsp[0].nlval))
10014 (yyvsp[0].nlval)->destroy ();
10015 delete (yyvsp[0].nlval);
10016 (yyvsp[0].nlval) = 0;
10019 if (0 != (yyvsp[-2].nlval))
10021 (yyvsp[-2].nlval)->destroy ();
10022 delete (yyvsp[-2].nlval);
10023 (yyvsp[-2].nlval) = 0;
10026 #line 10039 "fe/idl.tab.cpp"
10027 break;
10029 case 552: /* @175: %empty */
10030 #line 6657 "fe/idl.ypp"
10032 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
10033 Identifier *&event_id = (yyvsp[-1].idval);
10034 FE_OBVHeader *&event_header = (yyvsp[0].vhval);
10035 AST_EventType *eventtype = 0;
10037 if (scope && event_header)
10039 // We create the scoped name here instead of with the
10040 // FE_OBVHeader because there is a token for it only here.
10041 UTL_ScopedName sn (event_id, 0);
10042 eventtype = idl_global->gen ()->create_eventtype (
10043 &sn,
10044 event_header->inherits (),
10045 event_header->n_inherits (),
10046 event_header->inherits_concrete (),
10047 event_header->inherits_flat (),
10048 event_header->n_inherits_flat (),
10049 event_header->supports (),
10050 event_header->n_supports (),
10051 event_header->supports_concrete (),
10052 false,
10053 event_header->truncatable (),
10054 false);
10055 AST_Interface *eventtype_as_interface =
10056 dynamic_cast<AST_Interface *> (eventtype);
10057 AST_Interface::fwd_redefinition_helper (
10058 eventtype_as_interface, scope);
10059 eventtype = dynamic_cast<AST_EventType *> (eventtype_as_interface);
10062 * Add the eventetype to its definition scope
10064 scope->fe_add_eventtype (eventtype);
10066 // FE_OBVHeader is not automatically destroyed in the AST
10067 event_header->destroy ();
10068 delete event_header;
10069 event_header = 0;
10071 sn.destroy ();
10075 * Push it on the scope stack.
10077 idl_global->scopes ().push (eventtype);
10079 (yyval.dcval) = eventtype;
10081 #line 10094 "fe/idl.tab.cpp"
10082 break;
10084 case 553: /* $@176: %empty */
10085 #line 6708 "fe/idl.ypp"
10087 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
10089 #line 10102 "fe/idl.tab.cpp"
10090 break;
10092 case 554: /* $@177: %empty */
10093 #line 6712 "fe/idl.ypp"
10095 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
10097 #line 10110 "fe/idl.tab.cpp"
10098 break;
10100 case 555: /* event_decl: event_header event_rest_of_header @175 '{' $@176 value_elements $@177 '}' */
10101 #line 6716 "fe/idl.ypp"
10103 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
10106 * Done with this eventtype - pop it off the scopes stack.
10108 idl_global->scopes ().pop ();
10110 (yyval.dcval) = (yyvsp[-5].dcval);
10112 #line 10125 "fe/idl.tab.cpp"
10113 break;
10115 case 556: /* event_header: event_custom_header */
10116 #line 6730 "fe/idl.ypp"
10118 (yyval.idval) = (yyvsp[0].idval);
10120 #line 10133 "fe/idl.tab.cpp"
10121 break;
10123 case 557: /* event_header: event_plain_header */
10124 #line 6734 "fe/idl.ypp"
10126 (yyval.idval) = (yyvsp[0].idval);
10128 #line 10141 "fe/idl.tab.cpp"
10129 break;
10131 case 558: /* formal_parameter_type: IDL_TYPENAME */
10132 #line 6741 "fe/idl.ypp"
10134 (yyval.ntval) = AST_Decl::NT_type;
10136 #line 10149 "fe/idl.tab.cpp"
10137 break;
10139 case 559: /* formal_parameter_type: IDL_STRUCT */
10140 #line 6745 "fe/idl.ypp"
10142 (yyval.ntval) = AST_Decl::NT_struct;
10144 #line 10157 "fe/idl.tab.cpp"
10145 break;
10147 case 560: /* formal_parameter_type: IDL_UNION */
10148 #line 6749 "fe/idl.ypp"
10150 (yyval.ntval) = AST_Decl::NT_union;
10152 #line 10165 "fe/idl.tab.cpp"
10153 break;
10155 case 561: /* formal_parameter_type: IDL_EVENTTYPE */
10156 #line 6753 "fe/idl.ypp"
10158 (yyval.ntval) = AST_Decl::NT_eventtype;
10160 #line 10173 "fe/idl.tab.cpp"
10161 break;
10163 case 562: /* formal_parameter_type: IDL_SEQUENCE */
10164 #line 6757 "fe/idl.ypp"
10166 (yyval.ntval) = AST_Decl::NT_sequence;
10168 #line 10181 "fe/idl.tab.cpp"
10169 break;
10171 case 563: /* formal_parameter_type: IDL_MAP */
10172 #line 6761 "fe/idl.ypp"
10174 (yyval.ntval) = AST_Decl::NT_map;
10176 #line 10189 "fe/idl.tab.cpp"
10177 break;
10179 case 564: /* formal_parameter_type: IDL_INTERFACE */
10180 #line 6765 "fe/idl.ypp"
10182 (yyval.ntval) = AST_Decl::NT_interface;
10184 #line 10197 "fe/idl.tab.cpp"
10185 break;
10187 case 565: /* formal_parameter_type: IDL_VALUETYPE */
10188 #line 6769 "fe/idl.ypp"
10190 (yyval.ntval) = AST_Decl::NT_valuetype;
10192 #line 10205 "fe/idl.tab.cpp"
10193 break;
10195 case 566: /* formal_parameter_type: IDL_ENUM */
10196 #line 6773 "fe/idl.ypp"
10198 (yyval.ntval) = AST_Decl::NT_enum;
10200 #line 10213 "fe/idl.tab.cpp"
10201 break;
10203 case 567: /* formal_parameter_type: IDL_EXCEPTION */
10204 #line 6777 "fe/idl.ypp"
10206 (yyval.ntval) = AST_Decl::NT_except;
10208 #line 10221 "fe/idl.tab.cpp"
10209 break;
10211 case 568: /* formal_parameter_type: IDL_CONST const_type */
10212 #line 6781 "fe/idl.ypp"
10214 (yyval.ntval) = AST_Decl::NT_const;
10215 t_param_const_type = (yyvsp[0].etval);
10217 #line 10230 "fe/idl.tab.cpp"
10218 break;
10220 case 569: /* at_least_one_formal_parameter: formal_parameter formal_parameters */
10221 #line 6789 "fe/idl.ypp"
10223 if ((yyvsp[0].plval) == 0)
10225 ACE_NEW_RETURN ((yyvsp[0].plval), FE_Utils::T_PARAMLIST_INFO, 1);
10228 (yyvsp[0].plval)->enqueue_head (*(yyvsp[-1].pival));
10229 delete (yyvsp[-1].pival);
10230 (yyvsp[-1].pival) = 0;
10232 // The param added above is always the last one parsed,
10233 // so we check for matches between sequence<T> & T here.
10234 ACE_CString bad_id =
10235 FE_Utils::check_for_seq_of_param (
10236 (yyvsp[0].plval));
10238 if (!bad_id.empty ())
10240 delete (yyvsp[0].plval);
10241 (yyvsp[0].plval) = 0;
10243 idl_global->err ()->mismatch_seq_of_param (bad_id.c_str ());
10244 return 1;
10247 (yyval.plval) = (yyvsp[0].plval);
10249 #line 10262 "fe/idl.tab.cpp"
10250 break;
10252 case 570: /* formal_parameters: formal_parameters ',' formal_parameter */
10253 #line 6820 "fe/idl.ypp"
10255 if ((yyvsp[-2].plval) == 0)
10257 ACE_NEW_RETURN ((yyvsp[-2].plval), FE_Utils::T_PARAMLIST_INFO, 1);
10260 (yyvsp[-2].plval)->enqueue_tail (*(yyvsp[0].pival));
10261 (yyval.plval) = (yyvsp[-2].plval);
10263 delete (yyvsp[0].pival);
10264 (yyvsp[0].pival) = 0;
10266 #line 10279 "fe/idl.tab.cpp"
10267 break;
10269 case 571: /* formal_parameters: %empty */
10270 #line 6833 "fe/idl.ypp"
10272 (yyval.plval) = 0;
10274 #line 10287 "fe/idl.tab.cpp"
10275 break;
10277 case 572: /* formal_parameter: formal_parameter_type IDENTIFIER */
10278 #line 6840 "fe/idl.ypp"
10281 ACE_NEW_RETURN ((yyval.pival),
10282 FE_Utils::T_Param_Info,
10285 AST_Decl::NodeType nt = (yyvsp[-1].ntval);
10287 (yyval.pival)->type_ = nt;
10288 (yyval.pival)->name_ = (yyvsp[0].strval);
10289 ACE::strdelete ((yyvsp[0].strval));
10290 (yyvsp[0].strval) = 0;
10292 if (nt == AST_Decl::NT_const)
10294 (yyval.pival)->const_type_ = t_param_const_type;
10295 (yyval.pival)->enum_const_type_decl_ =
10296 tao_enum_constant_decl;
10298 // Reset these values.
10299 t_param_const_type = AST_Expression::EV_none;
10300 tao_enum_constant_decl = 0;
10303 #line 10316 "fe/idl.tab.cpp"
10304 break;
10306 case 573: /* formal_parameter: IDL_SEQUENCE '<' IDENTIFIER '>' IDENTIFIER */
10307 #line 6865 "fe/idl.ypp"
10309 ACE_NEW_RETURN ((yyval.pival),
10310 FE_Utils::T_Param_Info,
10313 (yyval.pival)->type_ = AST_Decl::NT_sequence;
10314 (yyval.pival)->seq_param_ref_ = (yyvsp[-2].strval);
10315 (yyval.pival)->name_ += (yyvsp[0].strval);
10317 ACE::strdelete ((yyvsp[-2].strval));
10318 (yyvsp[-2].strval) = 0;
10319 ACE::strdelete ((yyvsp[0].strval));
10320 (yyvsp[0].strval) = 0;
10322 #line 10335 "fe/idl.tab.cpp"
10323 break;
10325 case 574: /* at_least_one_formal_parameter_name: formal_parameter_name formal_parameter_names */
10326 #line 6883 "fe/idl.ypp"
10328 ACE_NEW_RETURN ((yyval.slval), UTL_StrList ((yyvsp[-1].sval), (yyvsp[0].slval)), 1);
10330 #line 10343 "fe/idl.tab.cpp"
10331 break;
10333 case 575: /* formal_parameter_names: formal_parameter_names ',' formal_parameter_name */
10334 #line 6890 "fe/idl.ypp"
10336 UTL_StrList *sl = 0;
10337 ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), 0), 1);
10339 if ((yyvsp[-2].slval) == 0)
10341 (yyval.slval) = sl;
10343 else
10345 (yyvsp[-2].slval)->nconc (sl);
10346 (yyval.slval) = (yyvsp[-2].slval);
10349 #line 10362 "fe/idl.tab.cpp"
10350 break;
10352 case 576: /* formal_parameter_names: %empty */
10353 #line 6905 "fe/idl.ypp"
10355 (yyval.slval) = 0;
10357 #line 10370 "fe/idl.tab.cpp"
10358 break;
10360 case 577: /* formal_parameter_name: IDENTIFIER */
10361 #line 6912 "fe/idl.ypp"
10363 ACE_NEW_RETURN ((yyval.sval),
10364 UTL_String ((yyvsp[0].strval), true),
10367 #line 10380 "fe/idl.tab.cpp"
10368 break;
10370 case 578: /* $@178: %empty */
10371 #line 6921 "fe/idl.ypp"
10373 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSeen);
10375 #line 10388 "fe/idl.tab.cpp"
10376 break;
10378 case 579: /* @179: %empty */
10379 #line 6925 "fe/idl.ypp"
10381 char *&id_value = (yyvsp[0].strval);
10382 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeIDSeen);
10383 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
10385 Identifier id (id_value);
10386 ACE::strdelete (id_value);
10387 id_value = 0;
10389 UTL_ScopedName scoped_name (&id, 0);
10390 AST_PortType *porttype = idl_global->gen ()->create_porttype (
10391 &scoped_name);
10392 scope->fe_add_porttype (porttype);
10393 (yyval.dcval) = porttype;
10395 // Push it on the scopes stack.
10396 idl_global->scopes ().push (porttype);
10398 #line 10411 "fe/idl.tab.cpp"
10399 break;
10401 case 580: /* $@180: %empty */
10402 #line 6944 "fe/idl.ypp"
10404 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSqSeen);
10406 #line 10419 "fe/idl.tab.cpp"
10407 break;
10409 case 581: /* $@181: %empty */
10410 #line 6952 "fe/idl.ypp"
10412 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeBodySeen);
10414 #line 10427 "fe/idl.tab.cpp"
10415 break;
10417 case 582: /* porttype_decl: IDL_PORTTYPE $@178 IDENTIFIER @179 '{' $@180 at_least_one_port_export $@181 '}' */
10418 #line 6956 "fe/idl.ypp"
10420 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen);
10422 // Done with this port type - pop it off the scopes stack.
10423 idl_global->scopes ().pop ();
10425 (yyval.dcval) = (yyvsp[-5].dcval);
10427 #line 10440 "fe/idl.tab.cpp"
10428 break;
10430 case 583: /* at_least_one_port_export: port_exports at_least_one_annotation port_export */
10431 #line 6968 "fe/idl.ypp"
10433 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
10434 AST_Decl *&node = (yyvsp[0].dcval);
10435 if (node)
10437 node->annotation_appls (*annotations);
10439 else
10441 idl_global->err ()-> unsupported_warning (
10442 "Annotating this is not supported");
10444 delete annotations;
10446 #line 10459 "fe/idl.tab.cpp"
10447 break;
10449 case 589: /* $@182: %empty */
10450 #line 6994 "fe/idl.ypp"
10452 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
10454 #line 10467 "fe/idl.tab.cpp"
10455 break;
10457 case 590: /* port_export: attribute $@182 ';' */
10458 #line 6998 "fe/idl.ypp"
10460 (yyval.dcval) = (yyvsp[-2].dcval);
10462 #line 10475 "fe/idl.tab.cpp"
10463 break;
10465 case 591: /* extended_port_decl: IDL_PORT scoped_name IDENTIFIER */
10466 #line 7005 "fe/idl.ypp"
10468 idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
10469 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10470 AST_Decl *d =
10471 s->lookup_by_name ((yyvsp[-1].idlist));
10472 AST_PortType *pt = 0;
10473 bool so_far_so_good = true;
10475 if (d == 0)
10477 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
10478 so_far_so_good = false;
10480 else
10482 pt = dynamic_cast<AST_PortType*> (d);
10484 if (pt == 0)
10486 idl_global->err ()->error1 (UTL_Error::EIDL_PORTTYPE_EXPECTED,
10488 so_far_so_good = false;
10492 AST_Extended_Port *ep = 0;
10494 if (so_far_so_good)
10496 Identifier id ((yyvsp[0].strval));
10497 ACE::strdelete ((yyvsp[0].strval));
10498 (yyvsp[0].strval) = 0;
10500 UTL_ScopedName sn (&id, 0);
10501 ep = idl_global->gen ()->create_extended_port (&sn, pt);
10502 s->fe_add_extended_port (ep);
10504 // Create (in the AST) the struct(s) and sequence(s)
10505 // needed for multiplex uses ports, if any.
10506 for (UTL_ScopeActiveIterator i (pt, UTL_Scope::IK_decls);
10507 !i.is_done ();
10508 i.next ())
10510 d = i.item ();
10512 AST_Uses *u = dynamic_cast<AST_Uses*> (d);
10514 if (u != 0 && u->is_multiple ())
10516 AST_Component *c =
10517 dynamic_cast<AST_Component*> (s);
10519 FE_Utils::create_uses_multiple_stuff (
10522 id.get_string ());
10527 (yyvsp[-1].idlist)->destroy ();
10528 delete (yyvsp[-1].idlist);
10529 (yyvsp[-1].idlist) = 0;
10531 (yyval.dcval) = ep;
10533 #line 10546 "fe/idl.tab.cpp"
10534 break;
10536 case 592: /* extended_port_decl: IDL_MIRRORPORT scoped_name IDENTIFIER */
10537 #line 7072 "fe/idl.ypp"
10539 idl_global->set_parse_state (IDL_GlobalData::PS_MirrorPortDeclSeen);
10540 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10541 AST_Decl *d =
10542 s->lookup_by_name ((yyvsp[-1].idlist));
10543 AST_PortType *pt = 0;
10544 bool so_far_so_good = true;
10546 if (d == 0)
10548 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
10549 so_far_so_good = false;
10551 else
10553 pt = dynamic_cast<AST_PortType*> (d);
10555 if (pt == 0)
10557 idl_global->err ()->error1 (UTL_Error::EIDL_PORTTYPE_EXPECTED,
10559 so_far_so_good = false;
10563 AST_Mirror_Port *mp = 0;
10565 if (so_far_so_good)
10567 Identifier id ((yyvsp[0].strval));
10568 ACE::strdelete ((yyvsp[0].strval));
10569 (yyvsp[0].strval) = 0;
10571 UTL_ScopedName sn (&id, 0);
10572 mp = idl_global->gen ()->create_mirror_port (&sn, pt);
10573 s->fe_add_mirror_port (mp);
10576 (yyvsp[-1].idlist)->destroy ();
10577 delete (yyvsp[-1].idlist);
10578 (yyvsp[-1].idlist) = 0;
10580 (yyval.dcval) = mp;
10582 #line 10595 "fe/idl.tab.cpp"
10583 break;
10585 case 593: /* at_least_one_actual_parameter: annotations_maybe actual_parameter actual_parameters */
10586 #line 7120 "fe/idl.ypp"
10588 if ((yyvsp[0].alval) == 0)
10590 ACE_NEW_RETURN ((yyvsp[0].alval),
10591 FE_Utils::T_ARGLIST,
10595 delete (yyvsp[-2].annotations_val);
10596 (yyvsp[0].alval)->enqueue_head ((yyvsp[-1].dcval));
10597 (yyval.alval) = (yyvsp[0].alval);
10599 #line 10612 "fe/idl.tab.cpp"
10600 break;
10602 case 594: /* actual_parameters: actual_parameters ',' annotations_maybe actual_parameter */
10603 #line 7136 "fe/idl.ypp"
10605 if ((yyvsp[-3].alval) == 0)
10607 ACE_NEW_RETURN ((yyvsp[-3].alval),
10608 FE_Utils::T_ARGLIST,
10612 delete (yyvsp[-1].annotations_val);
10613 (yyvsp[-3].alval)->enqueue_tail ((yyvsp[0].dcval));
10614 (yyval.alval) = (yyvsp[-3].alval);
10616 #line 10629 "fe/idl.tab.cpp"
10617 break;
10619 case 595: /* actual_parameters: %empty */
10620 #line 7149 "fe/idl.ypp"
10622 (yyval.alval) = 0;
10624 #line 10637 "fe/idl.tab.cpp"
10625 break;
10627 case 596: /* actual_parameter: expression */
10628 #line 7156 "fe/idl.ypp"
10630 // To avoid grammar conflicts with this LALR(1) parser,
10631 // we take advantage of the fact that an expression can
10632 // be a scoped name. At that lower level, we create an
10633 // expression containing the scoped name, and at a
10634 // higher lever, deduce that it's not supposed to be
10635 // a constant and look up the type to add to the template
10636 // arg list.
10637 AST_Expression *ex = (yyvsp[0].exval);
10638 UTL_ScopedName *sn = ex->n ();
10639 AST_Decl *d = 0;
10640 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10642 if (sn != 0)
10644 d = s->lookup_by_name (sn);
10646 if (d == 0)
10648 idl_global->err ()->lookup_error (sn);
10649 return 1;
10651 else
10653 AST_Decl::NodeType nt = d->node_type ();
10655 if (nt == AST_Decl::NT_enum_val)
10657 (yyvsp[0].exval)->evaluate (
10658 AST_Expression::EK_const);
10660 (yyval.dcval) =
10661 idl_global->gen ()->create_constant (
10662 (yyvsp[0].exval)->ev ()->et,
10663 (yyvsp[0].exval),
10664 sn);
10666 else
10668 (yyval.dcval) = d;
10672 else
10674 (yyvsp[0].exval)->evaluate (
10675 AST_Expression::EK_const);
10677 (yyval.dcval) =
10678 idl_global->gen ()->create_constant (
10679 (yyvsp[0].exval)->ev ()->et,
10680 (yyvsp[0].exval),
10684 #line 10697 "fe/idl.tab.cpp"
10685 break;
10687 case 597: /* connector_decl: connector_header connector_body */
10688 #line 7215 "fe/idl.ypp"
10690 (yyval.dcval) = 0;
10692 #line 10705 "fe/idl.tab.cpp"
10693 break;
10695 case 598: /* $@183: %empty */
10696 #line 7222 "fe/idl.ypp"
10698 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSeen);
10700 #line 10713 "fe/idl.tab.cpp"
10701 break;
10703 case 599: /* $@184: %empty */
10704 #line 7226 "fe/idl.ypp"
10706 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorIDSeen);
10708 #line 10721 "fe/idl.tab.cpp"
10709 break;
10711 case 600: /* connector_header: IDL_CONNECTOR $@183 annotations_maybe IDENTIFIER $@184 component_inheritance_spec */
10712 #line 7230 "fe/idl.ypp"
10714 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10715 AST_Connector *parent = 0;
10716 bool so_far_so_good = true;
10718 Identifier id ((yyvsp[-2].strval));
10719 ACE::strdelete ((yyvsp[-2].strval));
10720 (yyvsp[-2].strval) = 0;
10722 UTL_ScopedName sn (&id, 0);
10724 if ((yyvsp[0].idlist) != 0)
10726 AST_Decl *d =
10727 s->lookup_by_name ((yyvsp[0].idlist));
10729 if (d == 0)
10731 idl_global->err ()->lookup_error ((yyvsp[0].idlist));
10732 so_far_so_good = false;
10735 parent =
10736 dynamic_cast<AST_Connector*> (d);
10738 if (parent == 0)
10740 idl_global->err ()->error1 (
10741 UTL_Error::EIDL_CONNECTOR_EXPECTED,
10744 so_far_so_good = false;
10747 (yyvsp[0].idlist)->destroy ();
10748 delete (yyvsp[0].idlist);
10749 (yyvsp[0].idlist) = 0;
10752 if (so_far_so_good)
10754 AST_Connector *c =
10755 idl_global->gen ()->create_connector (&sn,
10756 parent);
10758 (void) s->fe_add_connector (c);
10760 // Push it on the scopes stack.
10761 idl_global->scopes ().push (c);
10764 delete (yyvsp[-3].annotations_val);
10766 #line 10779 "fe/idl.tab.cpp"
10767 break;
10769 case 601: /* $@185: %empty */
10770 #line 7287 "fe/idl.ypp"
10772 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSqSeen);
10774 #line 10787 "fe/idl.tab.cpp"
10775 break;
10777 case 602: /* $@186: %empty */
10778 #line 7291 "fe/idl.ypp"
10780 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorBodySeen);
10782 #line 10795 "fe/idl.tab.cpp"
10783 break;
10785 case 603: /* connector_body: '{' $@185 connector_exports $@186 '}' */
10786 #line 7295 "fe/idl.ypp"
10788 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorQsSeen);
10790 // Done with this connector - pop it off the scope stack.
10791 idl_global->scopes ().pop ();
10793 #line 10806 "fe/idl.tab.cpp"
10794 break;
10796 case 606: /* $@187: %empty */
10797 #line 7310 "fe/idl.ypp"
10799 idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
10801 #line 10814 "fe/idl.tab.cpp"
10802 break;
10804 case 607: /* connector_export: provides_decl $@187 ';' */
10805 #line 7314 "fe/idl.ypp"
10807 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10809 #line 10822 "fe/idl.tab.cpp"
10810 break;
10812 case 608: /* $@188: %empty */
10813 #line 7318 "fe/idl.ypp"
10815 idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
10817 #line 10830 "fe/idl.tab.cpp"
10818 break;
10820 case 609: /* connector_export: uses_decl $@188 ';' */
10821 #line 7322 "fe/idl.ypp"
10823 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10825 #line 10838 "fe/idl.tab.cpp"
10826 break;
10828 case 610: /* $@189: %empty */
10829 #line 7326 "fe/idl.ypp"
10831 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
10833 #line 10846 "fe/idl.tab.cpp"
10834 break;
10836 case 611: /* connector_export: attribute $@189 ';' */
10837 #line 7330 "fe/idl.ypp"
10839 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10841 #line 10854 "fe/idl.tab.cpp"
10842 break;
10844 case 612: /* $@190: %empty */
10845 #line 7334 "fe/idl.ypp"
10847 idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
10849 #line 10862 "fe/idl.tab.cpp"
10850 break;
10852 case 613: /* connector_export: extended_port_decl $@190 ';' */
10853 #line 7338 "fe/idl.ypp"
10855 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10857 #line 10870 "fe/idl.tab.cpp"
10858 break;
10861 #line 10874 "fe/idl.tab.cpp"
10863 default: break;
10865 /* User semantic actions sometimes alter yychar, and that requires
10866 that yytoken be updated with the new translation. We take the
10867 approach of translating immediately before every use of yytoken.
10868 One alternative is translating here after every semantic action,
10869 but that translation would be missed if the semantic action invokes
10870 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
10871 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
10872 incorrect destructor might then be invoked immediately. In the
10873 case of YYERROR or YYBACKUP, subsequent parser actions might lead
10874 to an incorrect destructor call or verbose syntax error message
10875 before the lookahead is translated. */
10876 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
10878 YYPOPSTACK (yylen);
10879 yylen = 0;
10881 *++yyvsp = yyval;
10883 /* Now 'shift' the result of the reduction. Determine what state
10884 that goes to, based on the state we popped back to and the rule
10885 number reduced by. */
10887 const int yylhs = yyr1[yyn] - YYNTOKENS;
10888 const int yyi = yypgoto[yylhs] + *yyssp;
10889 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
10890 ? yytable[yyi]
10891 : yydefgoto[yylhs]);
10894 goto yynewstate;
10897 /*--------------------------------------.
10898 | yyerrlab -- here on detecting error. |
10899 `--------------------------------------*/
10900 yyerrlab:
10901 /* Make sure we have latest lookahead translation. See comments at
10902 user semantic actions for why this is necessary. */
10903 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
10904 /* If not already recovering from an error, report this error. */
10905 if (!yyerrstatus)
10907 ++yynerrs;
10908 yyerror (YY_("syntax error"));
10911 if (yyerrstatus == 3)
10913 /* If just tried and failed to reuse lookahead token after an
10914 error, discard it. */
10916 if (yychar <= YYEOF)
10918 /* Return failure if at end of input. */
10919 if (yychar == YYEOF)
10920 YYABORT;
10922 else
10924 yydestruct ("Error: discarding",
10925 yytoken, &yylval);
10926 yychar = YYEMPTY;
10930 /* Else will try to reuse lookahead token after shifting the error
10931 token. */
10932 goto yyerrlab1;
10935 /*---------------------------------------------------.
10936 | yyerrorlab -- error raised explicitly by YYERROR. |
10937 `---------------------------------------------------*/
10938 yyerrorlab:
10939 /* Pacify compilers when the user code never invokes YYERROR and the
10940 label yyerrorlab therefore never appears in user code. */
10941 if (0)
10942 YYERROR;
10943 ++yynerrs;
10945 /* Do not reclaim the symbols of the rule whose action triggered
10946 this YYERROR. */
10947 YYPOPSTACK (yylen);
10948 yylen = 0;
10949 YY_STACK_PRINT (yyss, yyssp);
10950 yystate = *yyssp;
10951 goto yyerrlab1;
10954 /*-------------------------------------------------------------.
10955 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10956 `-------------------------------------------------------------*/
10957 yyerrlab1:
10958 yyerrstatus = 3; /* Each real token shifted decrements this. */
10960 /* Pop stack until we find a state that shifts the error token. */
10961 for (;;)
10963 yyn = yypact[yystate];
10964 if (!yypact_value_is_default (yyn))
10966 yyn += YYSYMBOL_YYerror;
10967 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
10969 yyn = yytable[yyn];
10970 if (0 < yyn)
10971 break;
10975 /* Pop the current state because it cannot handle the error token. */
10976 if (yyssp == yyss)
10977 YYABORT;
10980 yydestruct ("Error: popping",
10981 YY_ACCESSING_SYMBOL (yystate), yyvsp);
10982 YYPOPSTACK (1);
10983 yystate = *yyssp;
10984 YY_STACK_PRINT (yyss, yyssp);
10987 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
10988 *++yyvsp = yylval;
10989 YY_IGNORE_MAYBE_UNINITIALIZED_END
10992 /* Shift the error token. */
10993 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
10995 yystate = yyn;
10996 goto yynewstate;
10999 /*-------------------------------------.
11000 | yyacceptlab -- YYACCEPT comes here. |
11001 `-------------------------------------*/
11002 yyacceptlab:
11003 yyresult = 0;
11004 goto yyreturnlab;
11007 /*-----------------------------------.
11008 | yyabortlab -- YYABORT comes here. |
11009 `-----------------------------------*/
11010 yyabortlab:
11011 yyresult = 1;
11012 goto yyreturnlab;
11015 /*-----------------------------------------------------------.
11016 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
11017 `-----------------------------------------------------------*/
11018 yyexhaustedlab:
11019 yyerror (YY_("memory exhausted"));
11020 yyresult = 2;
11021 goto yyreturnlab;
11024 /*----------------------------------------------------------.
11025 | yyreturnlab -- parsing is finished, clean up and return. |
11026 `----------------------------------------------------------*/
11027 yyreturnlab:
11028 if (yychar != YYEMPTY)
11030 /* Make sure we have latest lookahead translation. See comments at
11031 user semantic actions for why this is necessary. */
11032 yytoken = YYTRANSLATE (yychar);
11033 yydestruct ("Cleanup: discarding lookahead",
11034 yytoken, &yylval);
11036 /* Do not reclaim the symbols of the rule whose action triggered
11037 this YYABORT or YYACCEPT. */
11038 YYPOPSTACK (yylen);
11039 YY_STACK_PRINT (yyss, yyssp);
11040 while (yyssp != yyss)
11042 yydestruct ("Cleanup: popping",
11043 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
11044 YYPOPSTACK (1);
11046 #ifndef yyoverflow
11047 if (yyss != yyssa)
11048 YYSTACK_FREE (yyss);
11049 #endif
11051 return yyresult;
11054 #line 7343 "fe/idl.ypp"
11056 /* programs */
11059 * ???
11062 tao_yywrap (void)
11064 return 1;
11068 * Report an error situation discovered in a production
11070 void
11071 tao_yyerror (const char *msg)
11073 ACE_ERROR ((LM_ERROR, "%C\n", msg));