Use =default for skeleton copy constructor
[ACE_TAO.git] / TAO / TAO_IDL / fe / idl.tab.cpp
blobde355a5a881222d9e677c53448a1b3b22025d683
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_STRING = 25, /* IDL_STRING */
219 YYSYMBOL_IDL_WSTRING = 26, /* IDL_WSTRING */
220 YYSYMBOL_IDL_EXCEPTION = 27, /* IDL_EXCEPTION */
221 YYSYMBOL_IDL_CASE = 28, /* IDL_CASE */
222 YYSYMBOL_IDL_DEFAULT = 29, /* IDL_DEFAULT */
223 YYSYMBOL_IDL_READONLY = 30, /* IDL_READONLY */
224 YYSYMBOL_IDL_ATTRIBUTE = 31, /* IDL_ATTRIBUTE */
225 YYSYMBOL_IDL_ONEWAY = 32, /* IDL_ONEWAY */
226 YYSYMBOL_IDL_IDEMPOTENT = 33, /* IDL_IDEMPOTENT */
227 YYSYMBOL_IDL_VOID = 34, /* IDL_VOID */
228 YYSYMBOL_IDL_IN = 35, /* IDL_IN */
229 YYSYMBOL_IDL_OUT = 36, /* IDL_OUT */
230 YYSYMBOL_IDL_INOUT = 37, /* IDL_INOUT */
231 YYSYMBOL_IDL_RAISES = 38, /* IDL_RAISES */
232 YYSYMBOL_IDL_CONTEXT = 39, /* IDL_CONTEXT */
233 YYSYMBOL_IDL_NATIVE = 40, /* IDL_NATIVE */
234 YYSYMBOL_IDL_LOCAL = 41, /* IDL_LOCAL */
235 YYSYMBOL_IDL_ABSTRACT = 42, /* IDL_ABSTRACT */
236 YYSYMBOL_IDL_CUSTOM = 43, /* IDL_CUSTOM */
237 YYSYMBOL_IDL_FACTORY = 44, /* IDL_FACTORY */
238 YYSYMBOL_IDL_PRIVATE = 45, /* IDL_PRIVATE */
239 YYSYMBOL_IDL_PUBLIC = 46, /* IDL_PUBLIC */
240 YYSYMBOL_IDL_SUPPORTS = 47, /* IDL_SUPPORTS */
241 YYSYMBOL_IDL_TRUNCATABLE = 48, /* IDL_TRUNCATABLE */
242 YYSYMBOL_IDL_VALUETYPE = 49, /* IDL_VALUETYPE */
243 YYSYMBOL_IDL_COMPONENT = 50, /* IDL_COMPONENT */
244 YYSYMBOL_IDL_CONSUMES = 51, /* IDL_CONSUMES */
245 YYSYMBOL_IDL_EMITS = 52, /* IDL_EMITS */
246 YYSYMBOL_IDL_EVENTTYPE = 53, /* IDL_EVENTTYPE */
247 YYSYMBOL_IDL_FINDER = 54, /* IDL_FINDER */
248 YYSYMBOL_IDL_GETRAISES = 55, /* IDL_GETRAISES */
249 YYSYMBOL_IDL_HOME = 56, /* IDL_HOME */
250 YYSYMBOL_IDL_IMPORT = 57, /* IDL_IMPORT */
251 YYSYMBOL_IDL_MULTIPLE = 58, /* IDL_MULTIPLE */
252 YYSYMBOL_IDL_PRIMARYKEY = 59, /* IDL_PRIMARYKEY */
253 YYSYMBOL_IDL_PROVIDES = 60, /* IDL_PROVIDES */
254 YYSYMBOL_IDL_PUBLISHES = 61, /* IDL_PUBLISHES */
255 YYSYMBOL_IDL_SETRAISES = 62, /* IDL_SETRAISES */
256 YYSYMBOL_IDL_TYPEID = 63, /* IDL_TYPEID */
257 YYSYMBOL_IDL_TYPEPREFIX = 64, /* IDL_TYPEPREFIX */
258 YYSYMBOL_IDL_USES = 65, /* IDL_USES */
259 YYSYMBOL_IDL_MANAGES = 66, /* IDL_MANAGES */
260 YYSYMBOL_IDL_TYPENAME = 67, /* IDL_TYPENAME */
261 YYSYMBOL_IDL_PORT = 68, /* IDL_PORT */
262 YYSYMBOL_IDL_MIRRORPORT = 69, /* IDL_MIRRORPORT */
263 YYSYMBOL_IDL_PORTTYPE = 70, /* IDL_PORTTYPE */
264 YYSYMBOL_IDL_CONNECTOR = 71, /* IDL_CONNECTOR */
265 YYSYMBOL_IDL_ALIAS = 72, /* IDL_ALIAS */
266 YYSYMBOL_IDL_INTEGER_LITERAL = 73, /* IDL_INTEGER_LITERAL */
267 YYSYMBOL_IDL_UINTEGER_LITERAL = 74, /* IDL_UINTEGER_LITERAL */
268 YYSYMBOL_IDL_STRING_LITERAL = 75, /* IDL_STRING_LITERAL */
269 YYSYMBOL_IDL_CHARACTER_LITERAL = 76, /* IDL_CHARACTER_LITERAL */
270 YYSYMBOL_IDL_FLOATING_PT_LITERAL = 77, /* IDL_FLOATING_PT_LITERAL */
271 YYSYMBOL_IDL_FIXED_PT_LITERAL = 78, /* IDL_FIXED_PT_LITERAL */
272 YYSYMBOL_IDL_TRUETOK = 79, /* IDL_TRUETOK */
273 YYSYMBOL_IDL_FALSETOK = 80, /* IDL_FALSETOK */
274 YYSYMBOL_IDL_INT8 = 81, /* IDL_INT8 */
275 YYSYMBOL_IDL_UINT8 = 82, /* IDL_UINT8 */
276 YYSYMBOL_IDL_INT16 = 83, /* IDL_INT16 */
277 YYSYMBOL_IDL_UINT16 = 84, /* IDL_UINT16 */
278 YYSYMBOL_IDL_INT32 = 85, /* IDL_INT32 */
279 YYSYMBOL_IDL_UINT32 = 86, /* IDL_UINT32 */
280 YYSYMBOL_IDL_INT64 = 87, /* IDL_INT64 */
281 YYSYMBOL_IDL_UINT64 = 88, /* IDL_UINT64 */
282 YYSYMBOL_IDL_SCOPE_DELIMITOR = 89, /* IDL_SCOPE_DELIMITOR */
283 YYSYMBOL_IDL_LEFT_SHIFT = 90, /* IDL_LEFT_SHIFT */
284 YYSYMBOL_IDL_RIGHT_SHIFT = 91, /* IDL_RIGHT_SHIFT */
285 YYSYMBOL_IDL_WCHAR_LITERAL = 92, /* IDL_WCHAR_LITERAL */
286 YYSYMBOL_IDL_WSTRING_LITERAL = 93, /* IDL_WSTRING_LITERAL */
287 YYSYMBOL_IDL_ANNOTATION_DECL = 94, /* IDL_ANNOTATION_DECL */
288 YYSYMBOL_IDL_ANNOTATION_SYMBOL = 95, /* IDL_ANNOTATION_SYMBOL */
289 YYSYMBOL_IDL_BITFIELD = 96, /* IDL_BITFIELD */
290 YYSYMBOL_IDL_BITMASK = 97, /* IDL_BITMASK */
291 YYSYMBOL_IDL_BITSET = 98, /* IDL_BITSET */
292 YYSYMBOL_IDL_MAP = 99, /* IDL_MAP */
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_118_ = 118, /* ')' */
312 YYSYMBOL_119_ = 119, /* '[' */
313 YYSYMBOL_120_ = 120, /* ']' */
314 YYSYMBOL_YYACCEPT = 121, /* $accept */
315 YYSYMBOL_start = 122, /* start */
316 YYSYMBOL_definitions = 123, /* definitions */
317 YYSYMBOL_at_least_one_definition = 124, /* at_least_one_definition */
318 YYSYMBOL_definition = 125, /* definition */
319 YYSYMBOL_fixed_definition = 126, /* fixed_definition */
320 YYSYMBOL_127_1 = 127, /* $@1 */
321 YYSYMBOL_128_2 = 128, /* $@2 */
322 YYSYMBOL_129_3 = 129, /* $@3 */
323 YYSYMBOL_130_4 = 130, /* $@4 */
324 YYSYMBOL_131_5 = 131, /* $@5 */
325 YYSYMBOL_132_6 = 132, /* $@6 */
326 YYSYMBOL_133_7 = 133, /* $@7 */
327 YYSYMBOL_134_8 = 134, /* $@8 */
328 YYSYMBOL_135_9 = 135, /* $@9 */
329 YYSYMBOL_136_10 = 136, /* $@10 */
330 YYSYMBOL_137_11 = 137, /* $@11 */
331 YYSYMBOL_138_12 = 138, /* $@12 */
332 YYSYMBOL_139_13 = 139, /* $@13 */
333 YYSYMBOL_140_14 = 140, /* $@14 */
334 YYSYMBOL_141_15 = 141, /* $@15 */
335 YYSYMBOL_module_header = 142, /* module_header */
336 YYSYMBOL_143_16 = 143, /* $@16 */
337 YYSYMBOL_module = 144, /* module */
338 YYSYMBOL_145_17 = 145, /* @17 */
339 YYSYMBOL_146_18 = 146, /* $@18 */
340 YYSYMBOL_147_19 = 147, /* $@19 */
341 YYSYMBOL_template_module_header = 148, /* template_module_header */
342 YYSYMBOL_template_module = 149, /* template_module */
343 YYSYMBOL_150_20 = 150, /* $@20 */
344 YYSYMBOL_151_21 = 151, /* $@21 */
345 YYSYMBOL_152_22 = 152, /* $@22 */
346 YYSYMBOL_153_23 = 153, /* $@23 */
347 YYSYMBOL_154_24 = 154, /* $@24 */
348 YYSYMBOL_at_least_one_tpl_definition = 155, /* at_least_one_tpl_definition */
349 YYSYMBOL_tpl_definitions = 156, /* tpl_definitions */
350 YYSYMBOL_tpl_definition = 157, /* tpl_definition */
351 YYSYMBOL_template_module_ref = 158, /* template_module_ref */
352 YYSYMBOL_159_25 = 159, /* $@25 */
353 YYSYMBOL_160_26 = 160, /* $@26 */
354 YYSYMBOL_template_module_inst = 161, /* template_module_inst */
355 YYSYMBOL_162_27 = 162, /* $@27 */
356 YYSYMBOL_163_28 = 163, /* $@28 */
357 YYSYMBOL_interface_def = 164, /* interface_def */
358 YYSYMBOL_interface = 165, /* interface */
359 YYSYMBOL_166_29 = 166, /* $@29 */
360 YYSYMBOL_167_30 = 167, /* $@30 */
361 YYSYMBOL_168_31 = 168, /* $@31 */
362 YYSYMBOL_interface_decl = 169, /* interface_decl */
363 YYSYMBOL_170_32 = 170, /* $@32 */
364 YYSYMBOL_interface_header = 171, /* interface_header */
365 YYSYMBOL_inheritance_spec = 172, /* inheritance_spec */
366 YYSYMBOL_173_33 = 173, /* $@33 */
367 YYSYMBOL_value_def = 174, /* value_def */
368 YYSYMBOL_valuetype = 175, /* valuetype */
369 YYSYMBOL_value_concrete_decl = 176, /* value_concrete_decl */
370 YYSYMBOL_177_34 = 177, /* @34 */
371 YYSYMBOL_178_35 = 178, /* $@35 */
372 YYSYMBOL_179_36 = 179, /* $@36 */
373 YYSYMBOL_value_abs_decl = 180, /* value_abs_decl */
374 YYSYMBOL_181_37 = 181, /* $@37 */
375 YYSYMBOL_182_38 = 182, /* $@38 */
376 YYSYMBOL_183_39 = 183, /* $@39 */
377 YYSYMBOL_value_header = 184, /* value_header */
378 YYSYMBOL_185_40 = 185, /* $@40 */
379 YYSYMBOL_value_decl = 186, /* value_decl */
380 YYSYMBOL_187_41 = 187, /* $@41 */
381 YYSYMBOL_opt_truncatable = 188, /* opt_truncatable */
382 YYSYMBOL_supports_spec = 189, /* supports_spec */
383 YYSYMBOL_value_forward_decl = 190, /* value_forward_decl */
384 YYSYMBOL_value_box_decl = 191, /* value_box_decl */
385 YYSYMBOL_value_elements = 192, /* value_elements */
386 YYSYMBOL_value_element = 193, /* value_element */
387 YYSYMBOL_194_42 = 194, /* @42 */
388 YYSYMBOL_visibility = 195, /* visibility */
389 YYSYMBOL_state_member = 196, /* state_member */
390 YYSYMBOL_exports = 197, /* exports */
391 YYSYMBOL_at_least_one_export = 198, /* at_least_one_export */
392 YYSYMBOL_export = 199, /* export */
393 YYSYMBOL_200_43 = 200, /* $@43 */
394 YYSYMBOL_201_44 = 201, /* $@44 */
395 YYSYMBOL_202_45 = 202, /* $@45 */
396 YYSYMBOL_203_46 = 203, /* $@46 */
397 YYSYMBOL_204_47 = 204, /* $@47 */
398 YYSYMBOL_205_48 = 205, /* $@48 */
399 YYSYMBOL_206_49 = 206, /* $@49 */
400 YYSYMBOL_207_50 = 207, /* $@50 */
401 YYSYMBOL_at_least_one_scoped_name = 208, /* at_least_one_scoped_name */
402 YYSYMBOL_scoped_names = 209, /* scoped_names */
403 YYSYMBOL_210_51 = 210, /* $@51 */
404 YYSYMBOL_scoped_name = 211, /* scoped_name */
405 YYSYMBOL_212_52 = 212, /* $@52 */
406 YYSYMBOL_213_53 = 213, /* $@53 */
407 YYSYMBOL_id = 214, /* id */
408 YYSYMBOL_defining_id = 215, /* defining_id */
409 YYSYMBOL_interface_forward = 216, /* interface_forward */
410 YYSYMBOL_const_dcl = 217, /* const_dcl */
411 YYSYMBOL_218_54 = 218, /* $@54 */
412 YYSYMBOL_219_55 = 219, /* $@55 */
413 YYSYMBOL_220_56 = 220, /* $@56 */
414 YYSYMBOL_221_57 = 221, /* $@57 */
415 YYSYMBOL_const_type = 222, /* const_type */
416 YYSYMBOL_expression = 223, /* expression */
417 YYSYMBOL_const_expr = 224, /* const_expr */
418 YYSYMBOL_or_expr = 225, /* or_expr */
419 YYSYMBOL_xor_expr = 226, /* xor_expr */
420 YYSYMBOL_and_expr = 227, /* and_expr */
421 YYSYMBOL_shift_expr = 228, /* shift_expr */
422 YYSYMBOL_add_expr = 229, /* add_expr */
423 YYSYMBOL_mult_expr = 230, /* mult_expr */
424 YYSYMBOL_unary_expr = 231, /* unary_expr */
425 YYSYMBOL_primary_expr = 232, /* primary_expr */
426 YYSYMBOL_literal = 233, /* literal */
427 YYSYMBOL_positive_int_expr = 234, /* positive_int_expr */
428 YYSYMBOL_annotation_dcl = 235, /* annotation_dcl */
429 YYSYMBOL_236_58 = 236, /* $@58 */
430 YYSYMBOL_annotation_body = 237, /* annotation_body */
431 YYSYMBOL_annotation_statement = 238, /* annotation_statement */
432 YYSYMBOL_239_59 = 239, /* $@59 */
433 YYSYMBOL_annotation_member_type = 240, /* annotation_member_type */
434 YYSYMBOL_annotation_member = 241, /* annotation_member */
435 YYSYMBOL_annotation_member_default = 242, /* annotation_member_default */
436 YYSYMBOL_at_least_one_annotation = 243, /* at_least_one_annotation */
437 YYSYMBOL_annotations_maybe = 244, /* annotations_maybe */
438 YYSYMBOL_annotation_appl = 245, /* annotation_appl */
439 YYSYMBOL_246_60 = 246, /* @60 */
440 YYSYMBOL_annotation_appl_params_maybe = 247, /* annotation_appl_params_maybe */
441 YYSYMBOL_annotation_appl_params = 248, /* annotation_appl_params */
442 YYSYMBOL_named_annotation_appl_params = 249, /* named_annotation_appl_params */
443 YYSYMBOL_more_named_annotation_appl_params = 250, /* more_named_annotation_appl_params */
444 YYSYMBOL_named_annotation_appl_param = 251, /* named_annotation_appl_param */
445 YYSYMBOL_type_dcl = 252, /* type_dcl */
446 YYSYMBOL_253_61 = 253, /* $@61 */
447 YYSYMBOL_type_declarator = 254, /* type_declarator */
448 YYSYMBOL_255_62 = 255, /* $@62 */
449 YYSYMBOL_type_spec = 256, /* type_spec */
450 YYSYMBOL_simple_type_spec = 257, /* simple_type_spec */
451 YYSYMBOL_base_type_spec = 258, /* base_type_spec */
452 YYSYMBOL_template_type_spec = 259, /* template_type_spec */
453 YYSYMBOL_constructed_type_spec = 260, /* constructed_type_spec */
454 YYSYMBOL_constructed_forward_type_spec = 261, /* constructed_forward_type_spec */
455 YYSYMBOL_at_least_one_declarator = 262, /* at_least_one_declarator */
456 YYSYMBOL_declarators = 263, /* declarators */
457 YYSYMBOL_264_63 = 264, /* $@63 */
458 YYSYMBOL_declarator = 265, /* declarator */
459 YYSYMBOL_at_least_one_simple_declarator = 266, /* at_least_one_simple_declarator */
460 YYSYMBOL_simple_declarators = 267, /* simple_declarators */
461 YYSYMBOL_268_64 = 268, /* $@64 */
462 YYSYMBOL_simple_declarator = 269, /* simple_declarator */
463 YYSYMBOL_complex_declarator = 270, /* complex_declarator */
464 YYSYMBOL_integer_type = 271, /* integer_type */
465 YYSYMBOL_signed_int = 272, /* signed_int */
466 YYSYMBOL_unsigned_int = 273, /* unsigned_int */
467 YYSYMBOL_floating_pt_type = 274, /* floating_pt_type */
468 YYSYMBOL_fixed_type = 275, /* fixed_type */
469 YYSYMBOL_char_type = 276, /* char_type */
470 YYSYMBOL_octet_type = 277, /* octet_type */
471 YYSYMBOL_boolean_type = 278, /* boolean_type */
472 YYSYMBOL_any_type = 279, /* any_type */
473 YYSYMBOL_object_type = 280, /* object_type */
474 YYSYMBOL_struct_decl = 281, /* struct_decl */
475 YYSYMBOL_282_65 = 282, /* $@65 */
476 YYSYMBOL_struct_type = 283, /* struct_type */
477 YYSYMBOL_284_66 = 284, /* $@66 */
478 YYSYMBOL_285_67 = 285, /* $@67 */
479 YYSYMBOL_struct_body = 286, /* struct_body */
480 YYSYMBOL_struct_body_with_members = 287, /* struct_body_with_members */
481 YYSYMBOL_288_68 = 288, /* $@68 */
482 YYSYMBOL_members = 289, /* members */
483 YYSYMBOL_member = 290, /* member */
484 YYSYMBOL_member_i = 291, /* member_i */
485 YYSYMBOL_292_69 = 292, /* $@69 */
486 YYSYMBOL_293_70 = 293, /* $@70 */
487 YYSYMBOL_294_71 = 294, /* $@71 */
488 YYSYMBOL_union_decl = 295, /* union_decl */
489 YYSYMBOL_296_72 = 296, /* $@72 */
490 YYSYMBOL_union_type = 297, /* union_type */
491 YYSYMBOL_298_73 = 298, /* $@73 */
492 YYSYMBOL_299_74 = 299, /* $@74 */
493 YYSYMBOL_300_75 = 300, /* $@75 */
494 YYSYMBOL_301_76 = 301, /* $@76 */
495 YYSYMBOL_302_77 = 302, /* $@77 */
496 YYSYMBOL_303_78 = 303, /* $@78 */
497 YYSYMBOL_switch_type_spec = 304, /* switch_type_spec */
498 YYSYMBOL_at_least_one_case_branch = 305, /* at_least_one_case_branch */
499 YYSYMBOL_case_branches = 306, /* case_branches */
500 YYSYMBOL_case_branch = 307, /* case_branch */
501 YYSYMBOL_308_79 = 308, /* $@79 */
502 YYSYMBOL_309_80 = 309, /* $@80 */
503 YYSYMBOL_310_81 = 310, /* $@81 */
504 YYSYMBOL_at_least_one_case_label = 311, /* at_least_one_case_label */
505 YYSYMBOL_case_labels = 312, /* case_labels */
506 YYSYMBOL_case_label = 313, /* case_label */
507 YYSYMBOL_314_82 = 314, /* $@82 */
508 YYSYMBOL_315_83 = 315, /* $@83 */
509 YYSYMBOL_316_84 = 316, /* $@84 */
510 YYSYMBOL_element_spec = 317, /* element_spec */
511 YYSYMBOL_318_85 = 318, /* $@85 */
512 YYSYMBOL_struct_forward_type = 319, /* struct_forward_type */
513 YYSYMBOL_union_forward_type = 320, /* union_forward_type */
514 YYSYMBOL_enum_type = 321, /* enum_type */
515 YYSYMBOL_322_86 = 322, /* $@86 */
516 YYSYMBOL_323_87 = 323, /* $@87 */
517 YYSYMBOL_324_88 = 324, /* $@88 */
518 YYSYMBOL_325_89 = 325, /* $@89 */
519 YYSYMBOL_at_least_one_enumerator = 326, /* at_least_one_enumerator */
520 YYSYMBOL_enumerators = 327, /* enumerators */
521 YYSYMBOL_328_90 = 328, /* $@90 */
522 YYSYMBOL_enumerator = 329, /* enumerator */
523 YYSYMBOL_map_type_spec = 330, /* map_type_spec */
524 YYSYMBOL_map_head = 331, /* map_head */
525 YYSYMBOL_332_91 = 332, /* $@91 */
526 YYSYMBOL_333_92 = 333, /* $@92 */
527 YYSYMBOL_sequence_type_spec = 334, /* sequence_type_spec */
528 YYSYMBOL_335_93 = 335, /* $@93 */
529 YYSYMBOL_336_94 = 336, /* $@94 */
530 YYSYMBOL_seq_head = 337, /* seq_head */
531 YYSYMBOL_338_95 = 338, /* $@95 */
532 YYSYMBOL_339_96 = 339, /* $@96 */
533 YYSYMBOL_fixed_type_spec = 340, /* fixed_type_spec */
534 YYSYMBOL_string_type_spec = 341, /* string_type_spec */
535 YYSYMBOL_342_97 = 342, /* $@97 */
536 YYSYMBOL_343_98 = 343, /* $@98 */
537 YYSYMBOL_string_head = 344, /* string_head */
538 YYSYMBOL_wstring_type_spec = 345, /* wstring_type_spec */
539 YYSYMBOL_346_99 = 346, /* $@99 */
540 YYSYMBOL_347_100 = 347, /* $@100 */
541 YYSYMBOL_wstring_head = 348, /* wstring_head */
542 YYSYMBOL_array_declarator = 349, /* array_declarator */
543 YYSYMBOL_350_101 = 350, /* $@101 */
544 YYSYMBOL_at_least_one_array_dim = 351, /* at_least_one_array_dim */
545 YYSYMBOL_array_dims = 352, /* array_dims */
546 YYSYMBOL_array_dim = 353, /* array_dim */
547 YYSYMBOL_354_102 = 354, /* $@102 */
548 YYSYMBOL_355_103 = 355, /* $@103 */
549 YYSYMBOL_attribute = 356, /* attribute */
550 YYSYMBOL_attribute_readonly = 357, /* attribute_readonly */
551 YYSYMBOL_358_104 = 358, /* $@104 */
552 YYSYMBOL_359_105 = 359, /* $@105 */
553 YYSYMBOL_360_106 = 360, /* $@106 */
554 YYSYMBOL_361_107 = 361, /* $@107 */
555 YYSYMBOL_attribute_readwrite = 362, /* attribute_readwrite */
556 YYSYMBOL_363_108 = 363, /* $@108 */
557 YYSYMBOL_364_109 = 364, /* $@109 */
558 YYSYMBOL_365_110 = 365, /* $@110 */
559 YYSYMBOL_366_111 = 366, /* $@111 */
560 YYSYMBOL_exception = 367, /* exception */
561 YYSYMBOL_368_112 = 368, /* $@112 */
562 YYSYMBOL_369_113 = 369, /* @113 */
563 YYSYMBOL_370_114 = 370, /* $@114 */
564 YYSYMBOL_371_115 = 371, /* $@115 */
565 YYSYMBOL_operation = 372, /* operation */
566 YYSYMBOL_373_116 = 373, /* $@116 */
567 YYSYMBOL_374_117 = 374, /* $@117 */
568 YYSYMBOL_375_118 = 375, /* $@118 */
569 YYSYMBOL_376_119 = 376, /* $@119 */
570 YYSYMBOL_opt_op_attribute = 377, /* opt_op_attribute */
571 YYSYMBOL_op_type_spec = 378, /* op_type_spec */
572 YYSYMBOL_init_decl = 379, /* init_decl */
573 YYSYMBOL_380_120 = 380, /* $@120 */
574 YYSYMBOL_381_121 = 381, /* @121 */
575 YYSYMBOL_382_122 = 382, /* $@122 */
576 YYSYMBOL_init_parameter_list = 383, /* init_parameter_list */
577 YYSYMBOL_384_123 = 384, /* $@123 */
578 YYSYMBOL_385_124 = 385, /* $@124 */
579 YYSYMBOL_at_least_one_in_parameter = 386, /* at_least_one_in_parameter */
580 YYSYMBOL_in_parameters = 387, /* in_parameters */
581 YYSYMBOL_388_125 = 388, /* $@125 */
582 YYSYMBOL_in_parameter = 389, /* in_parameter */
583 YYSYMBOL_390_126 = 390, /* $@126 */
584 YYSYMBOL_391_127 = 391, /* $@127 */
585 YYSYMBOL_parameter_list = 392, /* parameter_list */
586 YYSYMBOL_393_128 = 393, /* $@128 */
587 YYSYMBOL_394_129 = 394, /* $@129 */
588 YYSYMBOL_at_least_one_parameter = 395, /* at_least_one_parameter */
589 YYSYMBOL_parameters = 396, /* parameters */
590 YYSYMBOL_397_130 = 397, /* $@130 */
591 YYSYMBOL_parameter = 398, /* parameter */
592 YYSYMBOL_399_131 = 399, /* $@131 */
593 YYSYMBOL_400_132 = 400, /* $@132 */
594 YYSYMBOL_param_type_spec = 401, /* param_type_spec */
595 YYSYMBOL_direction = 402, /* direction */
596 YYSYMBOL_opt_raises = 403, /* opt_raises */
597 YYSYMBOL_404_133 = 404, /* $@133 */
598 YYSYMBOL_405_134 = 405, /* $@134 */
599 YYSYMBOL_opt_getraises = 406, /* opt_getraises */
600 YYSYMBOL_407_135 = 407, /* $@135 */
601 YYSYMBOL_408_136 = 408, /* $@136 */
602 YYSYMBOL_opt_setraises = 409, /* opt_setraises */
603 YYSYMBOL_410_137 = 410, /* $@137 */
604 YYSYMBOL_411_138 = 411, /* $@138 */
605 YYSYMBOL_opt_context = 412, /* opt_context */
606 YYSYMBOL_413_139 = 413, /* $@139 */
607 YYSYMBOL_414_140 = 414, /* $@140 */
608 YYSYMBOL_at_least_one_string_literal = 415, /* at_least_one_string_literal */
609 YYSYMBOL_string_literals = 416, /* string_literals */
610 YYSYMBOL_417_141 = 417, /* $@141 */
611 YYSYMBOL_typeid_dcl = 418, /* typeid_dcl */
612 YYSYMBOL_typeprefix_dcl = 419, /* typeprefix_dcl */
613 YYSYMBOL_component = 420, /* component */
614 YYSYMBOL_component_forward_decl = 421, /* component_forward_decl */
615 YYSYMBOL_component_decl = 422, /* component_decl */
616 YYSYMBOL_423_142 = 423, /* @142 */
617 YYSYMBOL_424_143 = 424, /* $@143 */
618 YYSYMBOL_425_144 = 425, /* $@144 */
619 YYSYMBOL_component_header = 426, /* component_header */
620 YYSYMBOL_427_145 = 427, /* $@145 */
621 YYSYMBOL_428_146 = 428, /* $@146 */
622 YYSYMBOL_component_inheritance_spec = 429, /* component_inheritance_spec */
623 YYSYMBOL_430_147 = 430, /* $@147 */
624 YYSYMBOL_component_exports = 431, /* component_exports */
625 YYSYMBOL_component_export = 432, /* component_export */
626 YYSYMBOL_433_148 = 433, /* $@148 */
627 YYSYMBOL_434_149 = 434, /* $@149 */
628 YYSYMBOL_435_150 = 435, /* $@150 */
629 YYSYMBOL_436_151 = 436, /* $@151 */
630 YYSYMBOL_437_152 = 437, /* $@152 */
631 YYSYMBOL_438_153 = 438, /* $@153 */
632 YYSYMBOL_439_154 = 439, /* $@154 */
633 YYSYMBOL_provides_decl = 440, /* provides_decl */
634 YYSYMBOL_interface_type = 441, /* interface_type */
635 YYSYMBOL_uses_decl = 442, /* uses_decl */
636 YYSYMBOL_uses_opt_multiple = 443, /* uses_opt_multiple */
637 YYSYMBOL_opt_multiple = 444, /* opt_multiple */
638 YYSYMBOL_emits_decl = 445, /* emits_decl */
639 YYSYMBOL_publishes_decl = 446, /* publishes_decl */
640 YYSYMBOL_consumes_decl = 447, /* consumes_decl */
641 YYSYMBOL_home_decl = 448, /* home_decl */
642 YYSYMBOL_449_155 = 449, /* $@155 */
643 YYSYMBOL_home_header = 450, /* home_header */
644 YYSYMBOL_451_156 = 451, /* $@156 */
645 YYSYMBOL_452_157 = 452, /* $@157 */
646 YYSYMBOL_453_158 = 453, /* $@158 */
647 YYSYMBOL_454_159 = 454, /* $@159 */
648 YYSYMBOL_455_160 = 455, /* $@160 */
649 YYSYMBOL_456_161 = 456, /* $@161 */
650 YYSYMBOL_home_inheritance_spec = 457, /* home_inheritance_spec */
651 YYSYMBOL_458_162 = 458, /* $@162 */
652 YYSYMBOL_primary_key_spec = 459, /* primary_key_spec */
653 YYSYMBOL_home_body = 460, /* home_body */
654 YYSYMBOL_461_163 = 461, /* $@163 */
655 YYSYMBOL_462_164 = 462, /* $@164 */
656 YYSYMBOL_home_exports = 463, /* home_exports */
657 YYSYMBOL_home_export = 464, /* home_export */
658 YYSYMBOL_465_165 = 465, /* $@165 */
659 YYSYMBOL_466_166 = 466, /* $@166 */
660 YYSYMBOL_factory_decl = 467, /* factory_decl */
661 YYSYMBOL_468_167 = 468, /* $@167 */
662 YYSYMBOL_469_168 = 469, /* $@168 */
663 YYSYMBOL_finder_decl = 470, /* finder_decl */
664 YYSYMBOL_471_169 = 471, /* $@169 */
665 YYSYMBOL_472_170 = 472, /* $@170 */
666 YYSYMBOL_event = 473, /* event */
667 YYSYMBOL_event_forward_decl = 474, /* event_forward_decl */
668 YYSYMBOL_event_concrete_forward_decl = 475, /* event_concrete_forward_decl */
669 YYSYMBOL_event_abs_forward_decl = 476, /* event_abs_forward_decl */
670 YYSYMBOL_event_abs_decl = 477, /* event_abs_decl */
671 YYSYMBOL_478_171 = 478, /* $@171 */
672 YYSYMBOL_479_172 = 479, /* $@172 */
673 YYSYMBOL_480_173 = 480, /* $@173 */
674 YYSYMBOL_event_abs_header = 481, /* event_abs_header */
675 YYSYMBOL_event_custom_header = 482, /* event_custom_header */
676 YYSYMBOL_event_plain_header = 483, /* event_plain_header */
677 YYSYMBOL_event_rest_of_header = 484, /* event_rest_of_header */
678 YYSYMBOL_485_174 = 485, /* $@174 */
679 YYSYMBOL_event_decl = 486, /* event_decl */
680 YYSYMBOL_487_175 = 487, /* @175 */
681 YYSYMBOL_488_176 = 488, /* $@176 */
682 YYSYMBOL_489_177 = 489, /* $@177 */
683 YYSYMBOL_event_header = 490, /* event_header */
684 YYSYMBOL_formal_parameter_type = 491, /* formal_parameter_type */
685 YYSYMBOL_at_least_one_formal_parameter = 492, /* at_least_one_formal_parameter */
686 YYSYMBOL_formal_parameters = 493, /* formal_parameters */
687 YYSYMBOL_formal_parameter = 494, /* formal_parameter */
688 YYSYMBOL_at_least_one_formal_parameter_name = 495, /* at_least_one_formal_parameter_name */
689 YYSYMBOL_formal_parameter_names = 496, /* formal_parameter_names */
690 YYSYMBOL_formal_parameter_name = 497, /* formal_parameter_name */
691 YYSYMBOL_porttype_decl = 498, /* porttype_decl */
692 YYSYMBOL_499_178 = 499, /* $@178 */
693 YYSYMBOL_500_179 = 500, /* @179 */
694 YYSYMBOL_501_180 = 501, /* $@180 */
695 YYSYMBOL_502_181 = 502, /* $@181 */
696 YYSYMBOL_at_least_one_port_export = 503, /* at_least_one_port_export */
697 YYSYMBOL_port_exports = 504, /* port_exports */
698 YYSYMBOL_port_export = 505, /* port_export */
699 YYSYMBOL_506_182 = 506, /* $@182 */
700 YYSYMBOL_extended_port_decl = 507, /* extended_port_decl */
701 YYSYMBOL_at_least_one_actual_parameter = 508, /* at_least_one_actual_parameter */
702 YYSYMBOL_actual_parameters = 509, /* actual_parameters */
703 YYSYMBOL_actual_parameter = 510, /* actual_parameter */
704 YYSYMBOL_connector_decl = 511, /* connector_decl */
705 YYSYMBOL_connector_header = 512, /* connector_header */
706 YYSYMBOL_513_183 = 513, /* $@183 */
707 YYSYMBOL_514_184 = 514, /* $@184 */
708 YYSYMBOL_connector_body = 515, /* connector_body */
709 YYSYMBOL_516_185 = 516, /* $@185 */
710 YYSYMBOL_517_186 = 517, /* $@186 */
711 YYSYMBOL_connector_exports = 518, /* connector_exports */
712 YYSYMBOL_connector_export = 519, /* connector_export */
713 YYSYMBOL_520_187 = 520, /* $@187 */
714 YYSYMBOL_521_188 = 521, /* $@188 */
715 YYSYMBOL_522_189 = 522, /* $@189 */
716 YYSYMBOL_523_190 = 523 /* $@190 */
718 typedef enum yysymbol_kind_t yysymbol_kind_t;
723 #ifdef short
724 # undef short
725 #endif
727 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
728 <limits.h> and (if available) <stdint.h> are included
729 so that the code can choose integer types of a good width. */
731 #ifndef __PTRDIFF_MAX__
732 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
733 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
734 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
735 # define YY_STDINT_H
736 # endif
737 #endif
739 /* Narrow types that promote to a signed type and that can represent a
740 signed or unsigned integer of at least N bits. In tables they can
741 save space and decrease cache pressure. Promoting to a signed type
742 helps avoid bugs in integer arithmetic. */
744 #ifdef __INT_LEAST8_MAX__
745 typedef __INT_LEAST8_TYPE__ yytype_int8;
746 #elif defined YY_STDINT_H
747 typedef int_least8_t yytype_int8;
748 #else
749 typedef signed char yytype_int8;
750 #endif
752 #ifdef __INT_LEAST16_MAX__
753 typedef __INT_LEAST16_TYPE__ yytype_int16;
754 #elif defined YY_STDINT_H
755 typedef int_least16_t yytype_int16;
756 #else
757 typedef short yytype_int16;
758 #endif
760 /* Work around bug in HP-UX 11.23, which defines these macros
761 incorrectly for preprocessor constants. This workaround can likely
762 be removed in 2023, as HPE has promised support for HP-UX 11.23
763 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
764 <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
765 #ifdef __hpux
766 # undef UINT_LEAST8_MAX
767 # undef UINT_LEAST16_MAX
768 # define UINT_LEAST8_MAX 255
769 # define UINT_LEAST16_MAX 65535
770 #endif
772 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
773 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
774 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
775 && UINT_LEAST8_MAX <= INT_MAX)
776 typedef uint_least8_t yytype_uint8;
777 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
778 typedef unsigned char yytype_uint8;
779 #else
780 typedef short yytype_uint8;
781 #endif
783 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
784 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
785 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
786 && UINT_LEAST16_MAX <= INT_MAX)
787 typedef uint_least16_t yytype_uint16;
788 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
789 typedef unsigned short yytype_uint16;
790 #else
791 typedef int yytype_uint16;
792 #endif
794 #ifndef YYPTRDIFF_T
795 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
796 # define YYPTRDIFF_T __PTRDIFF_TYPE__
797 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
798 # elif defined PTRDIFF_MAX
799 # ifndef ptrdiff_t
800 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
801 # endif
802 # define YYPTRDIFF_T ptrdiff_t
803 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
804 # else
805 # define YYPTRDIFF_T long
806 # define YYPTRDIFF_MAXIMUM LONG_MAX
807 # endif
808 #endif
810 #ifndef YYSIZE_T
811 # ifdef __SIZE_TYPE__
812 # define YYSIZE_T __SIZE_TYPE__
813 # elif defined size_t
814 # define YYSIZE_T size_t
815 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
816 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
817 # define YYSIZE_T size_t
818 # else
819 # define YYSIZE_T unsigned
820 # endif
821 #endif
823 #define YYSIZE_MAXIMUM \
824 YY_CAST (YYPTRDIFF_T, \
825 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
826 ? YYPTRDIFF_MAXIMUM \
827 : YY_CAST (YYSIZE_T, -1)))
829 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
832 /* Stored state numbers (used for stacks). */
833 typedef yytype_int16 yy_state_t;
835 /* State numbers in computations. */
836 typedef int yy_state_fast_t;
838 #ifndef YY_
839 # if defined YYENABLE_NLS && YYENABLE_NLS
840 # if ENABLE_NLS
841 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
842 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
843 # endif
844 # endif
845 # ifndef YY_
846 # define YY_(Msgid) Msgid
847 # endif
848 #endif
851 #ifndef YY_ATTRIBUTE_PURE
852 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
853 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
854 # else
855 # define YY_ATTRIBUTE_PURE
856 # endif
857 #endif
859 #ifndef YY_ATTRIBUTE_UNUSED
860 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
861 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
862 # else
863 # define YY_ATTRIBUTE_UNUSED
864 # endif
865 #endif
867 /* Suppress unused-variable warnings by "using" E. */
868 #if ! defined lint || defined __GNUC__
869 # define YY_USE(E) ((void) (E))
870 #else
871 # define YY_USE(E) /* empty */
872 #endif
874 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
875 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
876 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
877 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
878 _Pragma ("GCC diagnostic push") \
879 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
880 # else
881 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
882 _Pragma ("GCC diagnostic push") \
883 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
884 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
885 # endif
886 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
887 _Pragma ("GCC diagnostic pop")
888 #else
889 # define YY_INITIAL_VALUE(Value) Value
890 #endif
891 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
892 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
893 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
894 #endif
895 #ifndef YY_INITIAL_VALUE
896 # define YY_INITIAL_VALUE(Value) /* Nothing. */
897 #endif
899 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
900 # define YY_IGNORE_USELESS_CAST_BEGIN \
901 _Pragma ("GCC diagnostic push") \
902 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
903 # define YY_IGNORE_USELESS_CAST_END \
904 _Pragma ("GCC diagnostic pop")
905 #endif
906 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
907 # define YY_IGNORE_USELESS_CAST_BEGIN
908 # define YY_IGNORE_USELESS_CAST_END
909 #endif
912 #define YY_ASSERT(E) ((void) (0 && (E)))
914 #if !defined yyoverflow
916 /* The parser invokes alloca or malloc; define the necessary symbols. */
918 # ifdef YYSTACK_USE_ALLOCA
919 # if YYSTACK_USE_ALLOCA
920 # ifdef __GNUC__
921 # define YYSTACK_ALLOC __builtin_alloca
922 # elif defined __BUILTIN_VA_ARG_INCR
923 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
924 # elif defined _AIX
925 # define YYSTACK_ALLOC __alloca
926 # elif defined _MSC_VER
927 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
928 # define alloca _alloca
929 # else
930 # define YYSTACK_ALLOC alloca
931 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
932 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
933 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
934 # ifndef EXIT_SUCCESS
935 # define EXIT_SUCCESS 0
936 # endif
937 # endif
938 # endif
939 # endif
940 # endif
942 # ifdef YYSTACK_ALLOC
943 /* Pacify GCC's 'empty if-body' warning. */
944 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
945 # ifndef YYSTACK_ALLOC_MAXIMUM
946 /* The OS might guarantee only one guard page at the bottom of the stack,
947 and a page size can be as small as 4096 bytes. So we cannot safely
948 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
949 to allow for a few compiler-allocated temporary stack slots. */
950 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
951 # endif
952 # else
953 # define YYSTACK_ALLOC YYMALLOC
954 # define YYSTACK_FREE YYFREE
955 # ifndef YYSTACK_ALLOC_MAXIMUM
956 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
957 # endif
958 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
959 && ! ((defined YYMALLOC || defined malloc) \
960 && (defined YYFREE || defined free)))
961 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
962 # ifndef EXIT_SUCCESS
963 # define EXIT_SUCCESS 0
964 # endif
965 # endif
966 # ifndef YYMALLOC
967 # define YYMALLOC malloc
968 # if ! defined malloc && ! defined EXIT_SUCCESS
969 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
970 # endif
971 # endif
972 # ifndef YYFREE
973 # define YYFREE free
974 # if ! defined free && ! defined EXIT_SUCCESS
975 void free (void *); /* INFRINGES ON USER NAME SPACE */
976 # endif
977 # endif
978 # endif
979 #endif /* !defined yyoverflow */
981 #if (! defined yyoverflow \
982 && (! defined __cplusplus \
983 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
985 /* A type that is properly aligned for any stack member. */
986 union yyalloc
988 yy_state_t yyss_alloc;
989 YYSTYPE yyvs_alloc;
992 /* The size of the maximum gap between one aligned stack and the next. */
993 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
995 /* The size of an array large to enough to hold all stacks, each with
996 N elements. */
997 # define YYSTACK_BYTES(N) \
998 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
999 + YYSTACK_GAP_MAXIMUM)
1001 # define YYCOPY_NEEDED 1
1003 /* Relocate STACK from its old location to the new one. The
1004 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1005 elements in the stack, and YYPTR gives the new location of the
1006 stack. Advance YYPTR to a properly aligned location for the next
1007 stack. */
1008 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
1009 do \
1011 YYPTRDIFF_T yynewbytes; \
1012 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
1013 Stack = &yyptr->Stack_alloc; \
1014 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
1015 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
1017 while (0)
1019 #endif
1021 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
1022 /* Copy COUNT objects from SRC to DST. The source and destination do
1023 not overlap. */
1024 # ifndef YYCOPY
1025 # if defined __GNUC__ && 1 < __GNUC__
1026 # define YYCOPY(Dst, Src, Count) \
1027 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
1028 # else
1029 # define YYCOPY(Dst, Src, Count) \
1030 do \
1032 YYPTRDIFF_T yyi; \
1033 for (yyi = 0; yyi < (Count); yyi++) \
1034 (Dst)[yyi] = (Src)[yyi]; \
1036 while (0)
1037 # endif
1038 # endif
1039 #endif /* !YYCOPY_NEEDED */
1041 /* YYFINAL -- State number of the termination state. */
1042 #define YYFINAL 4
1043 /* YYLAST -- Last index in YYTABLE. */
1044 #define YYLAST 2110
1046 /* YYNTOKENS -- Number of terminals. */
1047 #define YYNTOKENS 121
1048 /* YYNNTS -- Number of nonterminals. */
1049 #define YYNNTS 403
1050 /* YYNRULES -- Number of rules. */
1051 #define YYNRULES 616
1052 /* YYNSTATES -- Number of states. */
1053 #define YYNSTATES 903
1055 /* YYMAXUTOK -- Last valid token kind. */
1056 #define YYMAXUTOK 354
1059 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1060 as returned by yylex, with out-of-bounds checking. */
1061 #define YYTRANSLATE(YYX) \
1062 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1063 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1064 : YYSYMBOL_YYUNDEF)
1066 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1067 as returned by yylex. */
1068 static const yytype_int8 yytranslate[] =
1070 0, 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, 115, 110, 2,
1074 117, 118, 113, 111, 106, 112, 2, 114, 2, 2,
1075 2, 2, 2, 2, 2, 2, 2, 2, 105, 100,
1076 103, 107, 104, 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, 119, 2, 120, 109, 2, 2, 2, 2, 2,
1080 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1081 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1082 2, 2, 2, 101, 108, 102, 116, 2, 2, 2,
1083 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1084 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1085 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1086 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1087 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1088 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1089 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1090 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1091 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1092 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1093 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1094 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1095 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1096 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1097 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1098 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1099 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1100 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1101 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
1102 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
1103 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
1104 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
1105 95, 96, 97, 98, 99
1108 #if YYDEBUG
1109 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1110 static const yytype_int16 yyrline[] =
1112 0, 423, 423, 426, 427, 435, 450, 454, 455, 456,
1113 461, 460, 469, 468, 477, 476, 485, 484, 493, 492,
1114 501, 500, 509, 508, 517, 516, 525, 524, 533, 532,
1115 541, 540, 549, 548, 557, 556, 565, 564, 573, 572,
1116 586, 585, 597, 636, 640, 596, 656, 664, 678, 688,
1117 718, 722, 663, 747, 751, 752, 756, 757, 762, 767,
1118 761, 853, 858, 852, 929, 930, 935, 973, 977, 934,
1119 994, 993, 1005, 1042, 1072, 1105, 1104, 1113, 1120, 1121,
1120 1122, 1123, 1127, 1132, 1137, 1184, 1188, 1136, 1217, 1260,
1121 1264, 1215, 1283, 1281, 1321, 1320, 1332, 1336, 1343, 1348,
1122 1355, 1380, 1408, 1474, 1493, 1497, 1501, 1502, 1514, 1513,
1123 1531, 1535, 1542, 1563, 1564, 1568, 1583, 1588, 1587, 1596,
1124 1595, 1604, 1603, 1612, 1611, 1620, 1619, 1628, 1627, 1636,
1125 1635, 1644, 1643, 1656, 1668, 1666, 1691, 1698, 1708, 1707,
1126 1733, 1731, 1756, 1766, 1777, 1821, 1848, 1880, 1884, 1888,
1127 1892, 1879, 1954, 1955, 1956, 1957, 1958, 1959, 1960, 1964,
1128 1968, 2036, 2038, 2040, 2041, 2053, 2054, 2066, 2067, 2079,
1129 2080, 2089, 2101, 2102, 2111, 2123, 2124, 2133, 2142, 2154,
1130 2155, 2164, 2173, 2185, 2242, 2243, 2250, 2254, 2259, 2266,
1131 2273, 2277, 2282, 2286, 2290, 2294, 2301, 2370, 2369, 2396,
1132 2397, 2401, 2402, 2403, 2405, 2404, 2413, 2414, 2418, 2474,
1133 2478, 2485, 2498, 2508, 2516, 2515, 2601, 2605, 2612, 2621,
1134 2625, 2632, 2640, 2646, 2653, 2666, 2665, 2674, 2678, 2682,
1135 2686, 2714, 2722, 2721, 2792, 2793, 2797, 2804, 2805, 2831,
1136 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2842, 2843, 2844,
1137 2845, 2846, 2850, 2851, 2852, 2856, 2857, 2861, 2873, 2871,
1138 2896, 2903, 2904, 2908, 2920, 2918, 2943, 2950, 2966, 2984,
1139 2985, 2989, 2993, 2997, 3001, 3005, 3009, 3013, 3020, 3024,
1140 3028, 3032, 3036, 3040, 3044, 3051, 3055, 3059, 3066, 3073,
1141 3077, 3084, 3091, 3098, 3105, 3113, 3112, 3126, 3157, 3125,
1142 3173, 3181, 3186, 3185, 3196, 3197, 3201, 3219, 3223, 3218,
1143 3281, 3280, 3293, 3292, 3305, 3309, 3342, 3346, 3405, 3409,
1144 3304, 3431, 3435, 3443, 3451, 3455, 3456, 3565, 3568, 3569,
1145 3574, 3578, 3573, 3614, 3613, 3625, 3635, 3653, 3661, 3660,
1146 3674, 3678, 3673, 3694, 3693, 3743, 3768, 3792, 3796, 3827,
1147 3831, 3791, 3855, 3860, 3858, 3864, 3868, 3906, 3970, 3980,
1148 3969, 4005, 4009, 4003, 4093, 4160, 4169, 4159, 4183, 4193,
1149 4197, 4191, 4239, 4265, 4274, 4278, 4272, 4320, 4346, 4354,
1150 4353, 4396, 4406, 4424, 4432, 4436, 4431, 4496, 4497, 4502,
1151 4506, 4510, 4514, 4501, 4573, 4577, 4581, 4585, 4572, 4653,
1152 4657, 4689, 4693, 4652, 4710, 4714, 4775, 4779, 4709, 4816,
1153 4821, 4826, 4833, 4834, 4845, 4850, 4893, 4844, 4915, 4914,
1154 4923, 4922, 4933, 4938, 4936, 4942, 4947, 4951, 4946, 4990,
1155 4989, 4998, 4997, 5008, 5013, 5011, 5017, 5022, 5026, 5021,
1156 5071, 5078, 5079, 5080, 5235, 5239, 5243, 5251, 5255, 5250,
1157 5264, 5272, 5276, 5271, 5285, 5293, 5297, 5292, 5306, 5314,
1158 5318, 5313, 5327, 5334, 5346, 5344, 5367, 5374, 5404, 5443,
1159 5444, 5448, 5479, 5521, 5525, 5478, 5544, 5548, 5542, 5589,
1160 5588, 5596, 5603, 5618, 5619, 5624, 5623, 5633, 5632, 5642,
1161 5641, 5651, 5650, 5660, 5659, 5669, 5668, 5678, 5677, 5688,
1162 5781, 5787, 5812, 5919, 5928, 5932, 5939, 6014, 6086, 6162,
1163 6161, 6211, 6215, 6219, 6223, 6227, 6231, 6210, 6284, 6283,
1164 6291, 6298, 6303, 6311, 6315, 6310, 6325, 6326, 6330, 6332,
1165 6331, 6340, 6339, 6352, 6375, 6350, 6401, 6428, 6399, 6452,
1166 6453, 6454, 6458, 6459, 6463, 6492, 6524, 6568, 6572, 6522,
1167 6589, 6598, 6616, 6627, 6626, 6664, 6715, 6719, 6662, 6736,
1168 6740, 6747, 6751, 6755, 6759, 6763, 6767, 6771, 6775, 6779,
1169 6783, 6787, 6795, 6826, 6839, 6846, 6871, 6889, 6896, 6911,
1170 6918, 6928, 6932, 6951, 6959, 6927, 6974, 6989, 6993, 6994,
1171 6998, 6999, 7001, 7000, 7011, 7078, 7126, 7142, 7155, 7162,
1172 7221, 7229, 7233, 7228, 7294, 7298, 7293, 7311, 7312, 7317,
1173 7316, 7325, 7324, 7333, 7332, 7341, 7340
1175 #endif
1177 /** Accessing symbol of state STATE. */
1178 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1180 #if YYDEBUG || 0
1181 /* The user-facing name of the symbol whose (internal) number is
1182 YYSYMBOL. No bounds checking. */
1183 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1185 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1186 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1187 static const char *const yytname[] =
1189 "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER",
1190 "IDL_CONST", "IDL_MODULE", "IDL_INTERFACE", "IDL_TYPEDEF", "IDL_LONG",
1191 "IDL_SHORT", "IDL_UNSIGNED", "IDL_DOUBLE", "IDL_FLOAT", "IDL_CHAR",
1192 "IDL_WCHAR", "IDL_OCTET", "IDL_BOOLEAN", "IDL_FIXED", "IDL_ANY",
1193 "IDL_OBJECT", "IDL_STRUCT", "IDL_UNION", "IDL_SWITCH", "IDL_ENUM",
1194 "IDL_SEQUENCE", "IDL_STRING", "IDL_WSTRING", "IDL_EXCEPTION", "IDL_CASE",
1195 "IDL_DEFAULT", "IDL_READONLY", "IDL_ATTRIBUTE", "IDL_ONEWAY",
1196 "IDL_IDEMPOTENT", "IDL_VOID", "IDL_IN", "IDL_OUT", "IDL_INOUT",
1197 "IDL_RAISES", "IDL_CONTEXT", "IDL_NATIVE", "IDL_LOCAL", "IDL_ABSTRACT",
1198 "IDL_CUSTOM", "IDL_FACTORY", "IDL_PRIVATE", "IDL_PUBLIC", "IDL_SUPPORTS",
1199 "IDL_TRUNCATABLE", "IDL_VALUETYPE", "IDL_COMPONENT", "IDL_CONSUMES",
1200 "IDL_EMITS", "IDL_EVENTTYPE", "IDL_FINDER", "IDL_GETRAISES", "IDL_HOME",
1201 "IDL_IMPORT", "IDL_MULTIPLE", "IDL_PRIMARYKEY", "IDL_PROVIDES",
1202 "IDL_PUBLISHES", "IDL_SETRAISES", "IDL_TYPEID", "IDL_TYPEPREFIX",
1203 "IDL_USES", "IDL_MANAGES", "IDL_TYPENAME", "IDL_PORT", "IDL_MIRRORPORT",
1204 "IDL_PORTTYPE", "IDL_CONNECTOR", "IDL_ALIAS", "IDL_INTEGER_LITERAL",
1205 "IDL_UINTEGER_LITERAL", "IDL_STRING_LITERAL", "IDL_CHARACTER_LITERAL",
1206 "IDL_FLOATING_PT_LITERAL", "IDL_FIXED_PT_LITERAL", "IDL_TRUETOK",
1207 "IDL_FALSETOK", "IDL_INT8", "IDL_UINT8", "IDL_INT16", "IDL_UINT16",
1208 "IDL_INT32", "IDL_UINT32", "IDL_INT64", "IDL_UINT64",
1209 "IDL_SCOPE_DELIMITOR", "IDL_LEFT_SHIFT", "IDL_RIGHT_SHIFT",
1210 "IDL_WCHAR_LITERAL", "IDL_WSTRING_LITERAL", "IDL_ANNOTATION_DECL",
1211 "IDL_ANNOTATION_SYMBOL", "IDL_BITFIELD", "IDL_BITMASK", "IDL_BITSET",
1212 "IDL_MAP", "';'", "'{'", "'}'", "'<'", "'>'", "':'", "','", "'='", "'|'",
1213 "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'('", "')'",
1214 "'['", "']'", "$accept", "start", "definitions",
1215 "at_least_one_definition", "definition", "fixed_definition", "$@1",
1216 "$@2", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", "$@11",
1217 "$@12", "$@13", "$@14", "$@15", "module_header", "$@16", "module", "@17",
1218 "$@18", "$@19", "template_module_header", "template_module", "$@20",
1219 "$@21", "$@22", "$@23", "$@24", "at_least_one_tpl_definition",
1220 "tpl_definitions", "tpl_definition", "template_module_ref", "$@25",
1221 "$@26", "template_module_inst", "$@27", "$@28", "interface_def",
1222 "interface", "$@29", "$@30", "$@31", "interface_decl", "$@32",
1223 "interface_header", "inheritance_spec", "$@33", "value_def", "valuetype",
1224 "value_concrete_decl", "@34", "$@35", "$@36", "value_abs_decl", "$@37",
1225 "$@38", "$@39", "value_header", "$@40", "value_decl", "$@41",
1226 "opt_truncatable", "supports_spec", "value_forward_decl",
1227 "value_box_decl", "value_elements", "value_element", "@42", "visibility",
1228 "state_member", "exports", "at_least_one_export", "export", "$@43",
1229 "$@44", "$@45", "$@46", "$@47", "$@48", "$@49", "$@50",
1230 "at_least_one_scoped_name", "scoped_names", "$@51", "scoped_name",
1231 "$@52", "$@53", "id", "defining_id", "interface_forward", "const_dcl",
1232 "$@54", "$@55", "$@56", "$@57", "const_type", "expression", "const_expr",
1233 "or_expr", "xor_expr", "and_expr", "shift_expr", "add_expr", "mult_expr",
1234 "unary_expr", "primary_expr", "literal", "positive_int_expr",
1235 "annotation_dcl", "$@58", "annotation_body", "annotation_statement",
1236 "$@59", "annotation_member_type", "annotation_member",
1237 "annotation_member_default", "at_least_one_annotation",
1238 "annotations_maybe", "annotation_appl", "@60",
1239 "annotation_appl_params_maybe", "annotation_appl_params",
1240 "named_annotation_appl_params", "more_named_annotation_appl_params",
1241 "named_annotation_appl_param", "type_dcl", "$@61", "type_declarator",
1242 "$@62", "type_spec", "simple_type_spec", "base_type_spec",
1243 "template_type_spec", "constructed_type_spec",
1244 "constructed_forward_type_spec", "at_least_one_declarator",
1245 "declarators", "$@63", "declarator", "at_least_one_simple_declarator",
1246 "simple_declarators", "$@64", "simple_declarator", "complex_declarator",
1247 "integer_type", "signed_int", "unsigned_int", "floating_pt_type",
1248 "fixed_type", "char_type", "octet_type", "boolean_type", "any_type",
1249 "object_type", "struct_decl", "$@65", "struct_type", "$@66", "$@67",
1250 "struct_body", "struct_body_with_members", "$@68", "members", "member",
1251 "member_i", "$@69", "$@70", "$@71", "union_decl", "$@72", "union_type",
1252 "$@73", "$@74", "$@75", "$@76", "$@77", "$@78", "switch_type_spec",
1253 "at_least_one_case_branch", "case_branches", "case_branch", "$@79",
1254 "$@80", "$@81", "at_least_one_case_label", "case_labels", "case_label",
1255 "$@82", "$@83", "$@84", "element_spec", "$@85", "struct_forward_type",
1256 "union_forward_type", "enum_type", "$@86", "$@87", "$@88", "$@89",
1257 "at_least_one_enumerator", "enumerators", "$@90", "enumerator",
1258 "map_type_spec", "map_head", "$@91", "$@92", "sequence_type_spec",
1259 "$@93", "$@94", "seq_head", "$@95", "$@96", "fixed_type_spec",
1260 "string_type_spec", "$@97", "$@98", "string_head", "wstring_type_spec",
1261 "$@99", "$@100", "wstring_head", "array_declarator", "$@101",
1262 "at_least_one_array_dim", "array_dims", "array_dim", "$@102", "$@103",
1263 "attribute", "attribute_readonly", "$@104", "$@105", "$@106", "$@107",
1264 "attribute_readwrite", "$@108", "$@109", "$@110", "$@111", "exception",
1265 "$@112", "@113", "$@114", "$@115", "operation", "$@116", "$@117",
1266 "$@118", "$@119", "opt_op_attribute", "op_type_spec", "init_decl",
1267 "$@120", "@121", "$@122", "init_parameter_list", "$@123", "$@124",
1268 "at_least_one_in_parameter", "in_parameters", "$@125", "in_parameter",
1269 "$@126", "$@127", "parameter_list", "$@128", "$@129",
1270 "at_least_one_parameter", "parameters", "$@130", "parameter", "$@131",
1271 "$@132", "param_type_spec", "direction", "opt_raises", "$@133", "$@134",
1272 "opt_getraises", "$@135", "$@136", "opt_setraises", "$@137", "$@138",
1273 "opt_context", "$@139", "$@140", "at_least_one_string_literal",
1274 "string_literals", "$@141", "typeid_dcl", "typeprefix_dcl", "component",
1275 "component_forward_decl", "component_decl", "@142", "$@143", "$@144",
1276 "component_header", "$@145", "$@146", "component_inheritance_spec",
1277 "$@147", "component_exports", "component_export", "$@148", "$@149",
1278 "$@150", "$@151", "$@152", "$@153", "$@154", "provides_decl",
1279 "interface_type", "uses_decl", "uses_opt_multiple", "opt_multiple",
1280 "emits_decl", "publishes_decl", "consumes_decl", "home_decl", "$@155",
1281 "home_header", "$@156", "$@157", "$@158", "$@159", "$@160", "$@161",
1282 "home_inheritance_spec", "$@162", "primary_key_spec", "home_body",
1283 "$@163", "$@164", "home_exports", "home_export", "$@165", "$@166",
1284 "factory_decl", "$@167", "$@168", "finder_decl", "$@169", "$@170",
1285 "event", "event_forward_decl", "event_concrete_forward_decl",
1286 "event_abs_forward_decl", "event_abs_decl", "$@171", "$@172", "$@173",
1287 "event_abs_header", "event_custom_header", "event_plain_header",
1288 "event_rest_of_header", "$@174", "event_decl", "@175", "$@176", "$@177",
1289 "event_header", "formal_parameter_type", "at_least_one_formal_parameter",
1290 "formal_parameters", "formal_parameter",
1291 "at_least_one_formal_parameter_name", "formal_parameter_names",
1292 "formal_parameter_name", "porttype_decl", "$@178", "@179", "$@180",
1293 "$@181", "at_least_one_port_export", "port_exports", "port_export",
1294 "$@182", "extended_port_decl", "at_least_one_actual_parameter",
1295 "actual_parameters", "actual_parameter", "connector_decl",
1296 "connector_header", "$@183", "$@184", "connector_body", "$@185", "$@186",
1297 "connector_exports", "connector_export", "$@187", "$@188", "$@189",
1298 "$@190", YY_NULLPTR
1301 static const char *
1302 yysymbol_name (yysymbol_kind_t yysymbol)
1304 return yytname[yysymbol];
1306 #endif
1308 #define YYPACT_NINF (-655)
1310 #define yypact_value_is_default(Yyn) \
1311 ((Yyn) == YYPACT_NINF)
1313 #define YYTABLE_NINF (-585)
1315 #define yytable_value_is_error(Yyn) \
1318 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1319 STATE-NUM. */
1320 static const yytype_int16 yypact[] =
1322 -655, 96, 1478, -655, -655, -655, -655, -655, -655, -655,
1323 -655, -655, -655, -655, 99, 113, 68, 89, -655, 99,
1324 99, -655, 47, 47, -655, -655, 99, -655, -655, 21,
1325 -655, 1531, 31, 50, -655, -655, 3, -655, -655, -655,
1326 -655, -655, -655, 548, -655, -655, -655, -655, -655, 1671,
1327 53, -655, -655, 75, -655, 100, -655, -655, -655, -655,
1328 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1329 -655, -655, -655, -655, 73, -655, -655, -655, 73, -655,
1330 -655, 93, 119, 2021, 47, 99, 1426, 99, 99, 99,
1331 99, -655, -655, -655, 6, 99, 25, -655, 27, 99,
1332 -655, 73, 99, 126, 129, 99, -655, -655, 12, -655,
1333 29, 229, -655, 137, -655, 140, 144, 1539, -655, -655,
1334 -655, 153, 199, -655, 156, 158, 170, 101, -655, 147,
1335 -655, -655, -655, -655, -655, -655, 169, -655, -655, -655,
1336 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1337 -655, -655, 187, -655, -655, -655, -655, -655, -655, -655,
1338 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1339 100, -655, -655, -655, 175, -655, 81, -655, -655, 177,
1340 -655, 180, 184, 185, -655, 47, 192, 194, 188, -655,
1341 197, 198, 200, 201, 202, 210, 213, 211, -655, -655,
1342 -655, 218, 221, -655, -655, -655, -655, 187, -655, -655,
1343 -655, -655, -655, -655, -655, -655, -655, 187, -655, -655,
1344 -655, -655, -655, -655, -655, -655, 222, -655, 224, -655,
1345 -655, 186, -655, 287, -655, -655, -655, -655, 40, -655,
1346 -655, -655, 2021, -655, -655, -655, -655, 196, -655, -655,
1347 -655, -655, -655, 289, -655, -655, 138, 219, -655, -655,
1348 -655, -655, -655, -655, -655, -655, 294, -655, 91, 223,
1349 225, 284, -655, -655, -655, -655, -655, -655, -655, 187,
1350 -655, -655, 230, -655, -655, -655, -655, -655, -655, -655,
1351 -655, -655, 284, 237, 238, -655, -655, -655, 99, 99,
1352 248, 249, -655, -655, -655, 246, -655, 287, 251, -655,
1353 -655, -655, -655, -655, 350, -655, 253, 252, -655, -655,
1354 -655, -655, -655, -655, -655, -655, -655, -655, 189, 189,
1355 189, 91, 187, -655, -655, 247, 250, 255, 71, 70,
1356 39, -655, -655, -655, -655, -655, 47, -655, -655, -655,
1357 -655, 256, -655, -655, 47, -655, 91, 91, 91, 254,
1358 259, -655, -655, -655, -655, -655, -655, 277, -655, -14,
1359 -655, -655, -655, -655, -655, -655, -655, -655, 47, 284,
1360 -655, -655, -655, -655, 186, 1293, 1570, 265, 266, -655,
1361 1539, -655, -655, -655, 257, 91, 91, 91, 91, 91,
1362 91, 91, 91, 91, 91, 263, 99, -655, 187, 1128,
1363 -655, 840, 91, -655, 506, -655, -655, -655, -655, 91,
1364 -655, -655, 726, -655, -655, -655, -655, 191, 1032, -655,
1365 -655, -655, -655, 54, 314, 47, 47, -655, -655, -655,
1366 -655, -655, 54, -655, 271, -655, 267, -655, 273, -655,
1367 -655, 1163, 187, -655, 47, 284, -655, -655, -655, -655,
1368 280, -655, -655, 99, -655, -655, 283, 275, 383, 286,
1369 -655, -655, 250, 255, 71, 70, 70, 39, 39, -655,
1370 -655, -655, -655, -655, 282, -655, -655, -655, 291, -655,
1371 -655, 1901, -655, -655, -655, -655, 1934, -655, -655, -655,
1372 -655, -655, 292, -655, 1388, -655, -655, 1812, -655, 285,
1373 506, -655, 297, 301, 303, 288, -655, 298, -655, 306,
1374 -655, -655, -655, 296, 1723, 47, 47, 47, 244, -655,
1375 313, -655, -655, -655, -655, -655, -655, -655, 99, 99,
1376 -655, 315, -655, -655, -655, 1259, 936, 387, 1988, -655,
1377 187, 287, -655, -655, 48, 56, 319, 321, 324, 287,
1378 325, -655, -655, -9, -655, 44, -655, -655, 327, 328,
1379 187, -655, 329, 69, 1426, -655, 398, -655, -655, -655,
1380 -655, 138, -655, 333, -655, 334, -655, 339, 342, 343,
1381 344, -655, 187, -655, -655, -655, -655, -655, 345, 346,
1382 444, -655, -655, -655, 348, -655, -655, 351, -655, -655,
1383 -655, 91, -655, 287, -655, 349, 99, 352, -655, 442,
1384 187, -655, -655, -655, -655, -655, -655, 57, 57, 57,
1385 -655, 356, -655, 360, 361, 362, 365, 368, 369, -655,
1386 -655, -655, 370, 371, 374, 375, -655, -655, -655, -655,
1387 -655, -655, -655, -655, -655, -655, 91, -655, -655, -655,
1388 99, -655, 377, 378, 379, -655, 386, 384, 69, -655,
1389 389, 390, -655, 391, 91, 392, 1646, -655, 47, -655,
1390 -655, -655, -655, -655, -655, 484, -655, -655, -655, -655,
1391 -655, -655, 288, 306, -655, -655, -655, 376, -655, -655,
1392 -655, -655, -655, -655, -655, -655, -655, -655, 380, 380,
1393 -655, -655, -655, -655, 1988, 99, -655, 91, 381, -655,
1394 -655, -655, -655, -655, -655, -655, 393, -655, -655, -655,
1395 -655, -655, 47, -655, -655, -655, -655, 395, 187, -655,
1396 380, 506, -655, 396, -655, 463, -655, -655, -655, -655,
1397 -655, -655, -655, -655, 47, -655, 187, 397, 618, -655,
1398 394, -655, -655, -655, 400, 388, 475, 474, 474, 99,
1399 458, 421, 415, -655, 187, 436, -655, -655, 422, -655,
1400 474, -655, -655, -655, 423, -655, -655, -655, -655, -655,
1401 -655, -655, -655, -655, 485, 540, 427, 123, 474, -655,
1402 62, 1988, -655, 440, 430, 474, 431, 487, 99, 47,
1403 -655, -655, 446, -655, -655, -655, -655, -655, 435, -655,
1404 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1405 -655, -655, -655, -655, -655, -655, -655, 187, -655, 448,
1406 -655, 449, 1988, 536, 476, 91, 472, 477, 55, -655,
1407 172, 99, 475, 47, 47, 461, 99, 540, -655, -655,
1408 -655, -655, -655, -655, -655, -655, -655, 1407, -655, -655,
1409 -655, 462, 464, -655, -655, -655, 123, 99, 466, 479,
1410 -655, -655, -655, -655, 47, -655, -655, -655, -655, 99,
1411 481, 467, 511, -655, -655, -655, -655, 478, 492, -655,
1412 -655, 524, -655
1415 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1416 Performed when YYTABLE does not specify something else to do. Zero
1417 means the default is an error. */
1418 static const yytype_int16 yydefact[] =
1420 4, 0, 0, 3, 1, 38, 147, 40, 70, 225,
1421 295, 312, 347, 399, 0, 0, 0, 0, 94, 0,
1422 0, 511, 0, 0, 581, 601, 0, 6, 7, 42,
1423 24, 61, 0, 0, 22, 64, 77, 66, 26, 78,
1424 83, 79, 84, 77, 80, 81, 65, 18, 10, 0,
1425 0, 12, 231, 297, 227, 346, 228, 255, 256, 229,
1426 20, 14, 16, 28, 470, 469, 472, 30, 509, 32,
1427 541, 543, 542, 540, 77, 559, 560, 539, 77, 34,
1428 36, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1429 0, 143, 267, 230, 77, 0, 77, 88, 77, 0,
1430 82, 77, 0, 476, 552, 0, 142, 138, 0, 137,
1431 0, 0, 213, 0, 46, 0, 0, 0, 213, 8,
1432 9, 0, 97, 72, 0, 0, 0, 271, 273, 0,
1433 285, 286, 289, 290, 291, 292, 288, 293, 294, 365,
1434 373, 378, 274, 281, 275, 282, 276, 283, 277, 284,
1435 358, 92, 238, 102, 234, 236, 237, 235, 239, 269,
1436 270, 240, 244, 241, 243, 242, 245, 246, 297, 252,
1437 0, 253, 254, 251, 0, 247, 0, 250, 248, 372,
1438 249, 377, 0, 0, 5, 0, 211, 0, 0, 314,
1439 0, 0, 0, 0, 0, 0, 0, 0, 553, 546,
1440 555, 0, 0, 604, 600, 39, 288, 160, 148, 152,
1441 156, 157, 153, 154, 155, 158, 159, 41, 71, 226,
1442 232, 296, 313, 348, 400, 73, 550, 74, 0, 551,
1443 95, 481, 512, 0, 467, 140, 468, 582, 0, 197,
1444 43, 25, 0, 567, 562, 563, 569, 565, 570, 568,
1445 564, 561, 566, 0, 48, 574, 0, 0, 23, 96,
1446 75, 67, 27, 85, 272, 287, 278, 280, 0, 0,
1447 0, 99, 357, 364, 361, 369, 374, 19, 11, 214,
1448 13, 298, 0, 21, 15, 17, 29, 473, 31, 523,
1449 510, 33, 99, 0, 0, 35, 37, 608, 0, 0,
1450 0, 0, 89, 479, 477, 520, 139, 0, 0, 602,
1451 212, 200, 4, 571, 0, 575, 0, 572, 186, 187,
1452 188, 190, 193, 192, 194, 195, 191, 189, 0, 0,
1453 0, 0, 183, 599, 161, 162, 163, 165, 167, 169,
1454 172, 175, 179, 184, 598, 62, 0, 114, 105, 279,
1455 196, 0, 366, 213, 0, 93, 0, 0, 0, 217,
1456 213, 315, 484, 527, 554, 547, 556, 605, 149, 267,
1457 233, 260, 261, 262, 268, 349, 401, 114, 0, 99,
1458 518, 513, 141, 583, 481, 0, 0, 3, 0, 49,
1459 0, 180, 181, 182, 0, 0, 0, 0, 0, 0,
1460 0, 0, 0, 0, 0, 596, 0, 76, 136, 0,
1461 113, 0, 0, 213, 0, 98, 362, 370, 375, 220,
1462 215, 300, 0, 299, 301, 305, 213, 213, 0, 114,
1463 105, 389, 394, 0, 505, 0, 0, 613, 387, 388,
1464 609, 611, 0, 615, 0, 607, 0, 213, 257, 213,
1465 305, 0, 480, 478, 0, 99, 589, 603, 204, 198,
1466 0, 206, 199, 0, 201, 207, 0, 0, 0, 0,
1467 573, 185, 164, 166, 168, 170, 171, 173, 174, 176,
1468 177, 178, 213, 63, 133, 131, 409, 410, 0, 116,
1469 123, 0, 117, 127, 125, 129, 0, 119, 121, 414,
1470 111, 110, 0, 104, 0, 106, 107, 0, 108, 0,
1471 0, 359, 0, 0, 0, 137, 218, 0, 219, 223,
1472 310, 307, 306, 213, 0, 0, 0, 0, 0, 495,
1473 0, 483, 485, 487, 489, 491, 493, 497, 0, 0,
1474 528, 0, 526, 529, 531, 0, 0, 0, 0, 501,
1475 500, 0, 504, 503, 0, 0, 0, 0, 0, 0,
1476 0, 606, 150, 0, 258, 0, 350, 355, 213, 0,
1477 519, 514, 588, 213, 0, 202, 210, 203, 45, 576,
1478 50, 0, 134, 0, 69, 0, 115, 0, 0, 0,
1479 0, 413, 443, 440, 441, 442, 404, 412, 0, 0,
1480 0, 87, 112, 103, 0, 368, 367, 0, 363, 371,
1481 376, 0, 216, 0, 221, 0, 0, 0, 304, 271,
1482 326, 321, 322, 323, 324, 316, 325, 0, 0, 0,
1483 482, 0, 475, 0, 0, 0, 0, 0, 0, 533,
1484 536, 525, 0, 0, 0, 0, 390, 395, 499, 594,
1485 595, 614, 610, 612, 502, 616, 0, 384, 380, 383,
1486 0, 356, 0, 352, 0, 91, 0, 0, 0, 592,
1487 0, 0, 587, 0, 0, 0, 0, 597, 0, 132,
1488 124, 118, 128, 126, 130, 0, 120, 122, 415, 109,
1489 213, 224, 0, 223, 311, 308, 303, 0, 508, 506,
1490 507, 496, 486, 488, 490, 492, 494, 498, 0, 0,
1491 530, 532, 549, 558, 0, 0, 151, 0, 381, 259,
1492 351, 353, 403, 515, 585, 586, 0, 590, 591, 205,
1493 209, 208, 0, 56, 42, 51, 55, 0, 135, 405,
1494 0, 0, 222, 0, 317, 418, 534, 537, 391, 396,
1495 266, 385, 382, 213, 0, 593, 58, 0, 0, 57,
1496 0, 416, 360, 309, 0, 0, 0, 450, 450, 0,
1497 454, 263, 0, 354, 516, 0, 52, 54, 431, 406,
1498 450, 318, 419, 426, 0, 425, 447, 535, 538, 392,
1499 451, 397, 264, 386, 522, 0, 0, 0, 450, 417,
1500 0, 0, 421, 422, 0, 450, 0, 458, 0, 0,
1501 517, 580, 0, 579, 430, 444, 445, 446, 0, 436,
1502 437, 407, 333, 340, 338, 319, 329, 330, 337, 427,
1503 423, 448, 393, 452, 455, 398, 265, 521, 59, 577,
1504 432, 433, 0, 462, 0, 0, 0, 0, 0, 213,
1505 335, 0, 0, 0, 0, 0, 0, 0, 434, 438,
1506 459, 408, 334, 341, 339, 320, 328, 0, 336, 428,
1507 424, 0, 0, 456, 60, 578, 0, 0, 0, 0,
1508 343, 331, 449, 453, 0, 435, 439, 460, 342, 0,
1509 0, 0, 0, 344, 332, 457, 466, 0, 463, 461,
1510 464, 0, 465
1513 /* YYPGOTO[NTERM-NUM]. */
1514 static const yytype_int16 yypgoto[] =
1516 -655, -655, 290, 299, 551, -618, -655, -655, -655, -655,
1517 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1518 -655, -611, -655, -655, -655, -655, -655, -655, -655, -655,
1519 -655, -655, -655, -655, -655, -655, -155, -655, -655, -655,
1520 -655, -655, -655, -655, -655, -655, -655, -655, 190, -655,
1521 -655, 19, -655, -655, -655, 587, -655, -655, -655, -655,
1522 -655, -655, -655, 590, -655, 193, -655, -655, -251, -655,
1523 -655, 178, 102, -655, -655, -655, -309, -655, -358, -655,
1524 -655, -655, -655, -655, -655, -655, -655, -346, -655, -655,
1525 -22, -655, -655, -191, -10, -655, 17, -655, -655, -655,
1526 -655, -190, -46, -233, -655, 220, 217, 231, -162, -161,
1527 -206, -105, -655, -320, -655, -655, -655, -655, -655, -655,
1528 -655, -655, 24, -83, 564, -655, -655, -655, -655, -77,
1529 4, 18, -655, 46, -655, -31, -387, -466, -655, -655,
1530 -655, 2, -655, -655, -616, -148, -655, -655, -7, -655,
1531 -69, -655, -655, -52, -51, -66, -65, -49, 241, -655,
1532 -40, -655, -38, -655, -655, -655, -655, -655, 204, 295,
1533 136, -655, -655, -655, -37, -655, -32, -655, -655, -655,
1534 -655, -655, -655, -655, -655, -655, -221, -655, -655, -655,
1535 -655, -655, -208, -655, -655, -655, -655, -655, -655, -655,
1536 -41, -655, -655, -655, -655, -655, -655, -655, -110, -655,
1537 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1538 -70, -655, -655, -655, -68, -655, -655, -655, -655, -655,
1539 -655, -655, -67, -655, -655, -339, -655, -655, -655, -655,
1540 -655, -655, -655, -655, -655, -655, 20, -655, -655, -655,
1541 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1542 -655, -655, -633, -655, -655, -655, -655, -655, -203, -655,
1543 -655, -655, -655, -655, -655, -655, -655, -226, -655, -655,
1544 -515, -655, -654, -655, -655, -655, -655, -655, -655, -655,
1545 -655, -655, -655, -655, -655, -655, -655, 22, 23, -655,
1546 -655, -655, -655, -655, -655, -655, -655, -655, 268, -655,
1547 -655, 134, -655, -655, -655, -655, -655, -655, -655, -328,
1548 215, -327, -655, -655, -655, -655, -655, -655, -655, -655,
1549 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1550 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1551 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1552 -655, -655, -655, 585, -655, -655, -655, -655, -655, -655,
1553 -655, -655, -655, 274, -655, -655, -192, -655, -655, -655,
1554 -655, -655, -655, -655, -2, -655, 302, -655, -655, 92,
1555 -655, -655, -655, -655, -655, -655, -655, -655, -655, -655,
1556 -655, -655, -655
1559 /* YYDEFGOTO[NTERM-NUM]. */
1560 static const yytype_int16 yydefgoto[] =
1562 0, 1, 2, 3, 27, 28, 183, 187, 191, 192,
1563 182, 190, 121, 116, 125, 193, 195, 197, 201, 202,
1564 82, 29, 84, 30, 115, 312, 467, 31, 32, 117,
1565 316, 469, 676, 757, 735, 758, 736, 737, 775, 856,
1566 33, 118, 406, 34, 35, 124, 347, 488, 36, 85,
1567 37, 151, 346, 38, 39, 40, 126, 348, 502, 41,
1568 228, 377, 569, 42, 271, 43, 102, 260, 355, 44,
1569 45, 411, 503, 604, 504, 505, 409, 410, 489, 587,
1570 598, 599, 585, 589, 588, 590, 583, 407, 484, 678,
1571 332, 233, 307, 109, 369, 46, 490, 83, 298, 446,
1572 656, 208, 333, 350, 335, 336, 337, 338, 339, 340,
1573 341, 342, 343, 351, 48, 311, 385, 462, 574, 463,
1574 464, 675, 491, 50, 310, 359, 420, 517, 518, 614,
1575 519, 492, 86, 219, 299, 220, 154, 155, 156, 157,
1576 52, 370, 448, 660, 371, 749, 771, 808, 372, 373,
1577 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
1578 53, 87, 54, 188, 360, 423, 424, 617, 523, 618,
1579 522, 616, 743, 615, 55, 88, 56, 282, 426, 697,
1580 764, 800, 847, 625, 825, 848, 826, 849, 890, 844,
1581 827, 850, 828, 846, 845, 879, 881, 889, 57, 58,
1582 59, 89, 300, 449, 662, 566, 663, 753, 567, 173,
1583 174, 270, 607, 175, 356, 512, 176, 269, 413, 177,
1584 178, 357, 513, 179, 180, 358, 514, 181, 374, 447,
1585 658, 718, 659, 717, 772, 493, 438, 547, 714, 769,
1586 805, 439, 548, 715, 770, 807, 494, 90, 301, 450,
1587 664, 495, 685, 760, 798, 843, 496, 596, 508, 600,
1588 740, 780, 746, 765, 766, 784, 803, 852, 785, 801,
1589 851, 779, 796, 797, 818, 841, 876, 819, 842, 877,
1590 597, 820, 787, 804, 853, 791, 806, 854, 835, 855,
1591 884, 861, 878, 892, 897, 898, 901, 497, 498, 63,
1592 64, 65, 194, 362, 530, 66, 231, 379, 304, 378,
1593 427, 531, 633, 634, 635, 636, 637, 631, 638, 532,
1594 551, 533, 442, 553, 534, 535, 536, 67, 196, 68,
1595 105, 305, 455, 666, 754, 794, 381, 454, 810, 290,
1596 363, 541, 428, 542, 642, 643, 543, 708, 767, 544,
1597 709, 768, 69, 70, 71, 72, 73, 293, 429, 644,
1598 74, 75, 76, 199, 292, 77, 294, 430, 645, 78,
1599 253, 254, 317, 255, 812, 839, 813, 79, 111, 308,
1600 456, 667, 572, 573, 672, 726, 537, 257, 405, 344,
1601 80, 81, 112, 384, 204, 297, 444, 367, 445, 557,
1602 558, 556, 560
1605 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1606 positive, shift that token. If negative, reduce the rule whose
1607 number is the opposite. If YYTABLE_NINF, syntax error. */
1608 static const yytype_int16 yytable[] =
1610 108, 110, 172, 168, 92, 169, 170, 93, 415, 103,
1611 104, 171, 153, 215, 209, 216, 113, 212, 213, 47,
1612 51, 152, 60, 334, 61, 62, 49, 511, 437, 238,
1613 593, 210, 211, 647, 214, 256, 416, 417, 418, 440,
1614 441, 364, 306, 309, 719, 172, 168, 661, 169, 170,
1615 106, 649, 313, 506, 171, 123, 822, 106, 733, 650,
1616 106, 207, 217, 822, 152, 734, 47, 51, 451, 60,
1617 540, 61, 62, 549, 8, 218, 747, 221, 222, 223,
1618 224, -379, 593, 823, 824, 226, 185, 234, 529, 229,
1619 823, 824, 230, 198, 106, 232, 4, 198, 394, 431,
1620 432, 235, 91, -144, 236, -379, -145, 761, 122, 264,
1621 657, 122, 265, 225, 788, 227, 382, 18, 235, 8,
1622 545, 95, 189, 606, 114, -146, 799, -100, 453, 433,
1623 122, 119, 122, 586, 434, 185, 107, 235, 18, 185,
1624 733, 106, 99, 107, 821, 235, 235, 734, 185, 506,
1625 120, 832, 402, 403, 404, 266, 267, -327, 815, 816,
1626 817, 398, 399, 279, 318, 319, 320, 321, 322, 323,
1627 324, 325, 215, 209, 216, -345, 212, 213, 122, 509,
1628 107, 400, 401, 326, 327, 273, 516, 274, 506, 529,
1629 210, 211, 106, 214, 203, 461, 479, 480, 481, 748,
1630 823, 824, 328, 329, 571, 94, 96, 330, 331, 98,
1631 101, 318, 319, 320, 321, 322, 323, 324, 325, 205,
1632 207, 431, 432, 391, 392, 393, -471, 107, 515, -544,
1633 326, 327, 237, 185, 669, 869, 475, 476, 239, 477,
1634 478, 240, 525, 526, 241, 670, 671, 259, 593, 328,
1635 329, 433, 527, 258, 330, 331, 434, 261, 262, 435,
1636 436, 886, 318, 319, 320, 321, 322, 323, 324, 325,
1637 414, 263, 268, 893, 431, 432, 235, 422, 107, 272,
1638 275, 326, 327, 276, 277, 278, 829, -212, 368, 281,
1639 106, 303, 315, -474, 280, 525, 526, 283, 284, 314,
1640 285, 286, 349, 287, 433, 527, 331, 431, 432, 434,
1641 288, 291, 435, 436, 289, 215, 209, 216, 295, 212,
1642 213, 296, -545, 345, 408, 302, 352, 859, 353, 669,
1643 510, 354, 408, 210, 211, 593, 214, 433, 365, 366,
1644 670, 671, 434, 524, 466, 435, 436, 361, 334, 375,
1645 376, 380, 383, 388, 762, 395, 452, 389, 390, 396,
1646 648, 421, 412, 207, 563, 397, 565, -44, 654, 482,
1647 468, 419, 552, 561, 562, 471, 593, 578, 691, 564,
1648 575, 172, 168, 577, 169, 170, 579, 580, 582, 605,
1649 171, 521, 152, 584, 601, 611, 483, 751, -302, 581,
1650 152, 608, 460, 47, 51, 609, 60, 610, 61, 62,
1651 49, 550, 613, 554, 555, 632, 612, 641, 646, 651,
1652 550, 652, 692, 334, 653, 655, 594, 674, 595, -402,
1653 665, -584, 570, 679, 680, 507, 698, 699, 700, 681,
1654 422, 730, 682, 683, 684, 686, 687, 688, 689, 694,
1655 264, 528, 723, 576, 696, 621, 701, 690, 622, 623,
1656 702, 703, 704, 172, 168, 705, 169, 170, 706, 707,
1657 710, 711, 171, 521, 592, 624, 712, 713, 594, 720,
1658 595, 722, 152, 626, 721, 422, 724, 739, 152, 727,
1659 728, 729, 731, 755, 744, 759, 763, 745, -420, 776,
1660 657, 781, 620, 627, 628, 629, 782, 871, 872, 106,
1661 783, 778, 786, 790, 127, 128, 129, 130, 131, 132,
1662 133, 134, 135, 136, 137, 138, 592, 792, 639, 640,
1663 139, 140, 141, 172, 168, 793, 169, 170, 891, 795,
1664 -429, 802, 171, 811, 809, 814, 830, 831, 833, 834,
1665 838, 106, 152, 840, 857, 858, 127, 128, 129, 130,
1666 131, 132, 133, 134, 135, 136, 137, 138, 10, 11,
1667 507, 12, 139, 140, 141, 860, 862, 864, 873, 865,
1668 882, 894, 883, 887, 888, 895, 896, 142, 143, 144,
1669 145, 146, 147, 148, 149, 107, 899, 668, 900, 902,
1670 184, 185, 386, 777, 100, 150, 97, 741, 546, 603,
1671 716, 387, 863, 473, 186, 472, 742, 693, 695, 5,
1672 673, 789, 6, 7, 8, 9, 465, 866, 474, 142,
1673 143, 144, 145, 146, 147, 148, 149, 107, 10, 11,
1674 602, 12, 868, 773, 594, 13, 595, 150, -101, 870,
1675 885, 752, 457, 122, 568, 425, 738, 559, 14, 15,
1676 16, 17, 630, 200, 470, 875, 725, 18, 19, 443,
1677 565, 20, 0, 677, 21, 0, 0, 0, 0, 0,
1678 0, 22, 23, 0, 0, 0, 0, 0, 24, 25,
1679 732, 0, 592, 47, 51, 0, 60, 0, 61, 62,
1680 0, 0, 0, 0, 0, 92, 0, 0, 750, 0,
1681 756, 0, 26, 0, 0, 0, 0, 0, 0, 152,
1682 -53, 0, 0, 0, 0, 0, 0, 520, 0, 106,
1683 0, 594, 774, 595, 127, 128, 129, 130, 131, 132,
1684 133, 134, 135, 136, 137, 138, 10, 11, 0, 12,
1685 139, 140, 141, 0, 0, 0, 0, 0, 0, 92,
1686 0, 0, 750, 0, 0, 0, 867, 0, 0, 0,
1687 0, 0, 594, 0, 595, 47, 51, 0, 60, 592,
1688 61, 62, 0, 0, 0, 0, 0, 837, 0, 0,
1689 0, 0, 0, 0, 0, 0, 0, 0, 92, 0,
1690 0, 836, 0, 0, 0, 0, 0, 142, 143, 144,
1691 145, 146, 147, 148, 149, 107, 0, 0, 0, 0,
1692 592, 185, 0, 0, 0, 150, 172, 168, 0, 169,
1693 170, 408, 408, 0, 0, 171, 880, 0, 0, 0,
1694 0, 485, 0, -411, 6, 152, 874, 9, -411, -411,
1695 -411, -411, -411, -411, -411, -411, -411, -411, -411, -411,
1696 10, 11, 408, 12, 0, -411, -411, 13, 0, 0,
1697 431, 432, 486, 487, -411, 0, 0, 0, 0, 0,
1698 14, 0, 0, 0, 499, 500, 501, 0, 0, 0,
1699 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1700 0, 0, 0, 22, 23, 0, 0, 0, 0, 0,
1701 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1702 0, -411, -411, -411, -411, -411, -411, -411, -411, -411,
1703 0, 0, 0, 0, 0, -213, 0, 485, 0, -411,
1704 6, 0, -86, 9, -411, -411, -411, -411, -411, -411,
1705 -411, -411, -411, -411, -411, -411, 10, 11, 0, 12,
1706 0, -411, -411, 13, 0, 0, 431, 432, 486, 487,
1707 -411, 0, 0, 0, 0, 0, 14, 0, 0, 0,
1708 499, 500, 501, 0, 0, 0, 0, 0, 0, 0,
1709 0, 0, 0, 0, 0, 0, 0, 0, 0, 22,
1710 23, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1711 0, 0, 0, 0, 0, 0, 0, -411, -411, -411,
1712 -411, -411, -411, -411, -411, -411, 0, 0, 0, 0,
1713 0, -213, 0, 485, 0, -411, 6, 0, -557, 9,
1714 -411, -411, -411, -411, -411, -411, -411, -411, -411, -411,
1715 -411, -411, 10, 11, 0, 12, 0, -411, -411, 13,
1716 0, 0, 431, 432, 486, 487, -411, 0, 0, 0,
1717 0, 0, 14, 0, 0, 0, 538, 0, 0, 0,
1718 0, 0, 0, 0, 0, 0, 539, 0, 0, 0,
1719 0, 0, 0, 0, 0, 22, 23, 0, 0, 0,
1720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1721 0, 0, 0, -411, -411, -411, -411, -411, -411, -411,
1722 -411, -411, 0, 0, 0, 0, 0, 0, 0, 485,
1723 0, -411, 6, 0, -524, 9, -411, -411, -411, -411,
1724 -411, -411, -411, -411, -411, -411, -411, -411, 10, 11,
1725 0, 12, 0, -411, -411, 13, 0, 0, 431, 432,
1726 486, 487, -411, 0, 485, 0, -411, 6, 14, 0,
1727 9, -411, -411, -411, -411, -411, -411, -411, -411, -411,
1728 -411, -411, -411, 10, 11, 0, 12, 0, -411, -411,
1729 13, 22, 23, 431, 432, 486, 487, -411, 0, 0,
1730 0, 0, 0, 14, 0, 0, 0, 0, 0, -411,
1731 -411, -411, -411, -411, -411, -411, -411, -411, 0, 0,
1732 0, 0, 0, -213, 0, 0, 22, 23, 0, 0,
1733 -68, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1734 0, 0, 0, 0, -411, -411, -411, -411, -411, -411,
1735 -411, -411, -411, 0, 0, 0, 0, 0, -213, 0,
1736 485, 0, -411, 6, 0, -90, 9, -411, -411, -411,
1737 -411, -411, -411, -411, -411, -411, -411, -411, -411, 10,
1738 11, 0, 12, 0, -411, -411, 13, 0, 0, 431,
1739 432, 486, 487, -411, 0, 0, 106, 6, 0, 14,
1740 458, 127, 128, 129, 130, 131, 132, 133, 134, 135,
1741 206, 137, 0, 0, 0, 0, 12, 0, 140, 141,
1742 0, 0, 22, 23, 0, 0, 0, 0, 0, 0,
1743 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1744 -411, -411, -411, -411, -411, -411, -411, -411, -411, 0,
1745 0, 0, 0, 0, -213, 0, 0, 0, 0, 0,
1746 0, -548, 0, 0, 0, 0, 0, 0, 0, 0,
1747 0, 0, 0, 0, 142, 143, 144, 145, 146, 147,
1748 148, 149, 107, 0, 0, 0, 0, 0, 0, 520,
1749 0, 106, 0, 0, 0, 459, 127, 128, 129, 130,
1750 131, 132, 133, 134, 135, 136, 137, 138, 10, 11,
1751 106, 12, 139, 140, 141, 127, 128, 129, 130, 131,
1752 132, 133, 134, 135, 136, 137, 138, 10, 11, 106,
1753 12, 139, 140, 141, 127, 128, 129, 130, 131, 132,
1754 133, 134, 135, 136, 137, 138, 10, 11, 0, 12,
1755 139, 140, 141, 0, 0, 0, 0, 0, 0, 0,
1756 0, 0, 0, 0, 0, 0, 0, 0, 0, 142,
1757 143, 144, 145, 146, 147, 148, 149, 107, -2, 5,
1758 0, 0, 6, 7, 8, 9, 0, 150, 142, 143,
1759 144, 145, 146, 147, 148, 149, 107, 0, 10, 11,
1760 0, 12, 185, 0, 0, 13, 150, 142, 143, 144,
1761 145, 146, 147, 148, 149, 107, 0, 0, 14, 15,
1762 16, 17, 0, 0, 0, 150, 0, 18, 19, 0,
1763 0, 20, 0, 0, 21, -47, 0, -47, 0, 0,
1764 0, 22, 23, 242, 0, 243, 0, 0, 24, 25,
1765 0, -47, -47, 0, -47, -47, 0, 0, -47, 244,
1766 245, 0, 246, 247, 0, 0, 248, 0, 0, 0,
1767 0, 5, 26, -213, 6, 7, 8, 9, 0, 0,
1768 -47, 0, 0, 0, -47, 0, 0, 0, 249, 0,
1769 10, 11, 250, 12, 0, 0, 0, 13, -47, 0,
1770 0, 0, 0, 0, 0, 0, 251, 0, 0, 0,
1771 14, 15, 16, 17, 0, 0, 0, 0, 0, 18,
1772 19, 0, 0, 20, 0, 0, 21, 0, 0, 0,
1773 -47, 0, 0, 22, 23, 0, 0, 0, 252, 0,
1774 24, 25, 0, 0, 0, 0, 0, 5, 0, 0,
1775 6, 7, 8, 9, 0, 0, 0, 0, 0, 0,
1776 0, 0, 0, 0, 26, -213, 10, 11, 0, 12,
1777 0, 0, 5, 13, 0, 6, 7, 8, 9, 0,
1778 0, 0, 0, 0, 0, 0, 14, 15, 16, 17,
1779 0, 10, 11, 0, 12, 18, 19, 0, 13, 20,
1780 0, 0, 21, 0, 0, 0, 0, 0, 0, 22,
1781 23, 14, 15, 16, 17, 0, 24, 25, 732, 0,
1782 18, 19, 0, 0, 20, 0, 106, 21, 0, 0,
1783 0, 619, 128, 129, 22, 23, 132, 133, 134, 135,
1784 26, 24, 25, 0, 0, 0, 12, 0, 0, 0,
1785 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1786 0, 0, 0, 0, 0, 26, 0, 0, 0, 0,
1787 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1788 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1789 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1790 0, 0, 0, 0, 142, 143, 144, 145, 146, 147,
1791 148, 149, 107, 485, 0, -411, 6, 0, 185, 9,
1792 -411, -411, -411, -411, -411, -411, -411, -411, -411, -411,
1793 -411, -411, 10, 11, 0, 12, 0, -411, -411, 13,
1794 0, 0, 431, 432, 486, 487, -411, 0, 0, 0,
1795 0, 0, 14, 0, 0, 0, 499, 500, 501, 0,
1796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1797 0, 0, 0, 0, 0, 22, 23, 0, 0, 0,
1798 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1799 0, 0, 0, -411, -411, -411, -411, -411, -411, -411,
1800 -411, -411, 485, 0, -411, 6, 0, 0, 9, -411,
1801 -411, -411, -411, -411, -411, -411, -411, -411, -411, -411,
1802 -411, 10, 11, 0, 12, 0, -411, -411, 13, 0,
1803 0, 431, 432, 486, 487, -411, 0, 106, 0, 0,
1804 0, 14, 127, 128, 129, 130, 131, 132, 133, 134,
1805 135, 206, 137, 138, 0, 0, 0, 0, 0, 140,
1806 141, 0, 0, 0, 22, 23, 0, 0, 591, 0,
1807 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1808 0, 0, -411, -411, -411, -411, -411, -411, -411, -411,
1809 -411, 106, 0, 0, 0, 0, 127, 128, 129, 130,
1810 131, 132, 133, 134, 135, 206, 137, 138, 0, 0,
1811 0, 0, 0, 140, 141, 142, 143, 144, 145, 146,
1812 147, 148, 149, 107, 106, 0, 0, 0, 0, 127,
1813 128, 129, 130, 131, 132, 133, 134, 135, 206, 0,
1814 0, 0, 0, 0, 0, 0, 140, 141, 0, 0,
1815 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1816 0, 0, 0, 0, 0, 0, 0, 0, 0, 142,
1817 143, 144, 145, 146, 147, 148, 149, 107, 0, 0,
1818 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1819 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1820 0, 0, 142, 143, 144, 145, 146, 147, 148, 149,
1824 static const yytype_int16 yycheck[] =
1826 22, 23, 43, 43, 14, 43, 43, 14, 354, 19,
1827 20, 43, 43, 83, 83, 83, 26, 83, 83, 2,
1828 2, 43, 2, 256, 2, 2, 2, 414, 367, 112,
1829 496, 83, 83, 548, 83, 118, 356, 357, 358, 367,
1830 367, 292, 233, 3, 660, 86, 86, 3, 86, 86,
1831 3, 3, 242, 411, 86, 36, 1, 3, 676, 3,
1832 3, 83, 84, 1, 86, 676, 49, 49, 377, 49,
1833 428, 49, 49, 19, 6, 85, 709, 87, 88, 89,
1834 90, 95, 548, 28, 29, 95, 95, 75, 427, 99,
1835 28, 29, 102, 74, 3, 105, 0, 78, 331, 30,
1836 31, 89, 3, 100, 75, 119, 100, 740, 105, 8,
1837 119, 105, 11, 94, 768, 96, 307, 49, 89, 6,
1838 429, 53, 22, 510, 103, 100, 780, 100, 379, 60,
1839 105, 100, 105, 491, 65, 95, 89, 89, 49, 95,
1840 758, 3, 53, 89, 798, 89, 89, 758, 95, 507,
1841 100, 805, 113, 114, 115, 8, 9, 102, 35, 36,
1842 37, 90, 91, 185, 73, 74, 75, 76, 77, 78,
1843 79, 80, 242, 242, 242, 100, 242, 242, 105, 412,
1844 89, 111, 112, 92, 93, 104, 419, 106, 546, 528,
1845 242, 242, 3, 242, 101, 385, 402, 403, 404, 714,
1846 28, 29, 111, 112, 455, 15, 16, 116, 117, 16,
1847 17, 73, 74, 75, 76, 77, 78, 79, 80, 100,
1848 242, 30, 31, 328, 329, 330, 100, 89, 419, 100,
1849 92, 93, 3, 95, 573, 851, 398, 399, 101, 400,
1850 401, 101, 51, 52, 100, 573, 573, 48, 714, 111,
1851 112, 60, 61, 100, 116, 117, 65, 101, 100, 68,
1852 69, 877, 73, 74, 75, 76, 77, 78, 79, 80,
1853 353, 101, 103, 889, 30, 31, 89, 360, 89, 104,
1854 103, 92, 93, 103, 100, 100, 801, 95, 298, 101,
1855 3, 105, 3, 102, 100, 51, 52, 100, 100, 103,
1856 100, 100, 8, 101, 60, 61, 117, 30, 31, 65,
1857 100, 100, 68, 69, 101, 385, 385, 385, 100, 385,
1858 385, 100, 100, 104, 346, 101, 103, 842, 103, 668,
1859 413, 47, 354, 385, 385, 801, 385, 60, 101, 101,
1860 668, 668, 65, 426, 385, 68, 69, 117, 581, 101,
1861 101, 105, 101, 3, 741, 108, 378, 104, 106, 109,
1862 551, 102, 106, 385, 447, 110, 449, 102, 559, 106,
1863 104, 117, 58, 102, 107, 118, 842, 102, 611, 106,
1864 100, 422, 422, 100, 422, 422, 3, 101, 106, 104,
1865 422, 422, 414, 102, 102, 107, 406, 717, 102, 482,
1866 422, 104, 385, 386, 386, 104, 386, 104, 386, 386,
1867 386, 433, 106, 435, 436, 102, 118, 102, 31, 100,
1868 442, 100, 613, 656, 100, 100, 496, 29, 496, 102,
1869 102, 102, 454, 100, 100, 411, 627, 628, 629, 100,
1870 523, 674, 100, 100, 100, 100, 100, 3, 100, 100,
1871 8, 427, 66, 463, 102, 524, 100, 106, 524, 524,
1872 100, 100, 100, 504, 504, 100, 504, 504, 100, 100,
1873 100, 100, 504, 504, 496, 524, 102, 102, 548, 102,
1874 548, 102, 504, 524, 106, 568, 102, 3, 510, 100,
1875 100, 100, 100, 100, 118, 100, 100, 117, 35, 102,
1876 119, 101, 524, 525, 526, 527, 118, 853, 854, 3,
1877 35, 117, 38, 55, 8, 9, 10, 11, 12, 13,
1878 14, 15, 16, 17, 18, 19, 548, 106, 538, 539,
1879 24, 25, 26, 574, 574, 120, 574, 574, 884, 103,
1880 118, 118, 574, 3, 59, 118, 106, 117, 117, 62,
1881 104, 3, 574, 118, 106, 106, 8, 9, 10, 11,
1882 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1883 546, 23, 24, 25, 26, 39, 100, 105, 117, 102,
1884 118, 100, 118, 117, 105, 118, 75, 81, 82, 83,
1885 84, 85, 86, 87, 88, 89, 118, 573, 106, 75,
1886 49, 95, 312, 758, 17, 99, 16, 690, 430, 507,
1887 656, 312, 845, 396, 50, 395, 693, 613, 616, 1,
1888 574, 769, 4, 5, 6, 7, 385, 848, 397, 81,
1889 82, 83, 84, 85, 86, 87, 88, 89, 20, 21,
1890 504, 23, 850, 753, 714, 27, 714, 99, 100, 852,
1891 876, 718, 384, 105, 450, 360, 678, 442, 40, 41,
1892 42, 43, 528, 78, 390, 857, 668, 49, 50, 367,
1893 753, 53, -1, 581, 56, -1, -1, -1, -1, -1,
1894 -1, 63, 64, -1, -1, -1, -1, -1, 70, 71,
1895 72, -1, 714, 676, 676, -1, 676, -1, 676, 676,
1896 -1, -1, -1, -1, -1, 715, -1, -1, 715, -1,
1897 732, -1, 94, -1, -1, -1, -1, -1, -1, 741,
1898 102, -1, -1, -1, -1, -1, -1, 1, -1, 3,
1899 -1, 801, 754, 801, 8, 9, 10, 11, 12, 13,
1900 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
1901 24, 25, 26, -1, -1, -1, -1, -1, -1, 769,
1902 -1, -1, 769, -1, -1, -1, 849, -1, -1, -1,
1903 -1, -1, 842, -1, 842, 758, 758, -1, 758, 801,
1904 758, 758, -1, -1, -1, -1, -1, 809, -1, -1,
1905 -1, -1, -1, -1, -1, -1, -1, -1, 808, -1,
1906 -1, 808, -1, -1, -1, -1, -1, 81, 82, 83,
1907 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
1908 842, 95, -1, -1, -1, 99, 867, 867, -1, 867,
1909 867, 853, 854, -1, -1, 867, 867, -1, -1, -1,
1910 -1, 1, -1, 3, 4, 867, 856, 7, 8, 9,
1911 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1912 20, 21, 884, 23, -1, 25, 26, 27, -1, -1,
1913 30, 31, 32, 33, 34, -1, -1, -1, -1, -1,
1914 40, -1, -1, -1, 44, 45, 46, -1, -1, -1,
1915 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1916 -1, -1, -1, 63, 64, -1, -1, -1, -1, -1,
1917 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1918 -1, 81, 82, 83, 84, 85, 86, 87, 88, 89,
1919 -1, -1, -1, -1, -1, 95, -1, 1, -1, 3,
1920 4, -1, 102, 7, 8, 9, 10, 11, 12, 13,
1921 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
1922 -1, 25, 26, 27, -1, -1, 30, 31, 32, 33,
1923 34, -1, -1, -1, -1, -1, 40, -1, -1, -1,
1924 44, 45, 46, -1, -1, -1, -1, -1, -1, -1,
1925 -1, -1, -1, -1, -1, -1, -1, -1, -1, 63,
1926 64, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1927 -1, -1, -1, -1, -1, -1, -1, 81, 82, 83,
1928 84, 85, 86, 87, 88, 89, -1, -1, -1, -1,
1929 -1, 95, -1, 1, -1, 3, 4, -1, 102, 7,
1930 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1931 18, 19, 20, 21, -1, 23, -1, 25, 26, 27,
1932 -1, -1, 30, 31, 32, 33, 34, -1, -1, -1,
1933 -1, -1, 40, -1, -1, -1, 44, -1, -1, -1,
1934 -1, -1, -1, -1, -1, -1, 54, -1, -1, -1,
1935 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
1936 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1937 -1, -1, -1, 81, 82, 83, 84, 85, 86, 87,
1938 88, 89, -1, -1, -1, -1, -1, -1, -1, 1,
1939 -1, 3, 4, -1, 102, 7, 8, 9, 10, 11,
1940 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1941 -1, 23, -1, 25, 26, 27, -1, -1, 30, 31,
1942 32, 33, 34, -1, 1, -1, 3, 4, 40, -1,
1943 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1944 17, 18, 19, 20, 21, -1, 23, -1, 25, 26,
1945 27, 63, 64, 30, 31, 32, 33, 34, -1, -1,
1946 -1, -1, -1, 40, -1, -1, -1, -1, -1, 81,
1947 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
1948 -1, -1, -1, 95, -1, -1, 63, 64, -1, -1,
1949 102, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1950 -1, -1, -1, -1, 81, 82, 83, 84, 85, 86,
1951 87, 88, 89, -1, -1, -1, -1, -1, 95, -1,
1952 1, -1, 3, 4, -1, 102, 7, 8, 9, 10,
1953 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1954 21, -1, 23, -1, 25, 26, 27, -1, -1, 30,
1955 31, 32, 33, 34, -1, -1, 3, 4, -1, 40,
1956 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1957 17, 18, -1, -1, -1, -1, 23, -1, 25, 26,
1958 -1, -1, 63, 64, -1, -1, -1, -1, -1, -1,
1959 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1960 81, 82, 83, 84, 85, 86, 87, 88, 89, -1,
1961 -1, -1, -1, -1, 95, -1, -1, -1, -1, -1,
1962 -1, 102, -1, -1, -1, -1, -1, -1, -1, -1,
1963 -1, -1, -1, -1, 81, 82, 83, 84, 85, 86,
1964 87, 88, 89, -1, -1, -1, -1, -1, -1, 1,
1965 -1, 3, -1, -1, -1, 102, 8, 9, 10, 11,
1966 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1967 3, 23, 24, 25, 26, 8, 9, 10, 11, 12,
1968 13, 14, 15, 16, 17, 18, 19, 20, 21, 3,
1969 23, 24, 25, 26, 8, 9, 10, 11, 12, 13,
1970 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
1971 24, 25, 26, -1, -1, -1, -1, -1, -1, -1,
1972 -1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
1973 82, 83, 84, 85, 86, 87, 88, 89, 0, 1,
1974 -1, -1, 4, 5, 6, 7, -1, 99, 81, 82,
1975 83, 84, 85, 86, 87, 88, 89, -1, 20, 21,
1976 -1, 23, 95, -1, -1, 27, 99, 81, 82, 83,
1977 84, 85, 86, 87, 88, 89, -1, -1, 40, 41,
1978 42, 43, -1, -1, -1, 99, -1, 49, 50, -1,
1979 -1, 53, -1, -1, 56, 4, -1, 6, -1, -1,
1980 -1, 63, 64, 4, -1, 6, -1, -1, 70, 71,
1981 -1, 20, 21, -1, 23, 24, -1, -1, 27, 20,
1982 21, -1, 23, 24, -1, -1, 27, -1, -1, -1,
1983 -1, 1, 94, 95, 4, 5, 6, 7, -1, -1,
1984 49, -1, -1, -1, 53, -1, -1, -1, 49, -1,
1985 20, 21, 53, 23, -1, -1, -1, 27, 67, -1,
1986 -1, -1, -1, -1, -1, -1, 67, -1, -1, -1,
1987 40, 41, 42, 43, -1, -1, -1, -1, -1, 49,
1988 50, -1, -1, 53, -1, -1, 56, -1, -1, -1,
1989 99, -1, -1, 63, 64, -1, -1, -1, 99, -1,
1990 70, 71, -1, -1, -1, -1, -1, 1, -1, -1,
1991 4, 5, 6, 7, -1, -1, -1, -1, -1, -1,
1992 -1, -1, -1, -1, 94, 95, 20, 21, -1, 23,
1993 -1, -1, 1, 27, -1, 4, 5, 6, 7, -1,
1994 -1, -1, -1, -1, -1, -1, 40, 41, 42, 43,
1995 -1, 20, 21, -1, 23, 49, 50, -1, 27, 53,
1996 -1, -1, 56, -1, -1, -1, -1, -1, -1, 63,
1997 64, 40, 41, 42, 43, -1, 70, 71, 72, -1,
1998 49, 50, -1, -1, 53, -1, 3, 56, -1, -1,
1999 -1, 8, 9, 10, 63, 64, 13, 14, 15, 16,
2000 94, 70, 71, -1, -1, -1, 23, -1, -1, -1,
2001 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2002 -1, -1, -1, -1, -1, 94, -1, -1, -1, -1,
2003 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2004 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2005 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2006 -1, -1, -1, -1, 81, 82, 83, 84, 85, 86,
2007 87, 88, 89, 1, -1, 3, 4, -1, 95, 7,
2008 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
2009 18, 19, 20, 21, -1, 23, -1, 25, 26, 27,
2010 -1, -1, 30, 31, 32, 33, 34, -1, -1, -1,
2011 -1, -1, 40, -1, -1, -1, 44, 45, 46, -1,
2012 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2013 -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
2014 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2015 -1, -1, -1, 81, 82, 83, 84, 85, 86, 87,
2016 88, 89, 1, -1, 3, 4, -1, -1, 7, 8,
2017 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
2018 19, 20, 21, -1, 23, -1, 25, 26, 27, -1,
2019 -1, 30, 31, 32, 33, 34, -1, 3, -1, -1,
2020 -1, 40, 8, 9, 10, 11, 12, 13, 14, 15,
2021 16, 17, 18, 19, -1, -1, -1, -1, -1, 25,
2022 26, -1, -1, -1, 63, 64, -1, -1, 34, -1,
2023 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2024 -1, -1, 81, 82, 83, 84, 85, 86, 87, 88,
2025 89, 3, -1, -1, -1, -1, 8, 9, 10, 11,
2026 12, 13, 14, 15, 16, 17, 18, 19, -1, -1,
2027 -1, -1, -1, 25, 26, 81, 82, 83, 84, 85,
2028 86, 87, 88, 89, 3, -1, -1, -1, -1, 8,
2029 9, 10, 11, 12, 13, 14, 15, 16, 17, -1,
2030 -1, -1, -1, -1, -1, -1, 25, 26, -1, -1,
2031 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2032 -1, -1, -1, -1, -1, -1, -1, -1, -1, 81,
2033 82, 83, 84, 85, 86, 87, 88, 89, -1, -1,
2034 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2035 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
2036 -1, -1, 81, 82, 83, 84, 85, 86, 87, 88,
2040 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
2041 state STATE-NUM. */
2042 static const yytype_int16 yystos[] =
2044 0, 122, 123, 124, 0, 1, 4, 5, 6, 7,
2045 20, 21, 23, 27, 40, 41, 42, 43, 49, 50,
2046 53, 56, 63, 64, 70, 71, 94, 125, 126, 142,
2047 144, 148, 149, 161, 164, 165, 169, 171, 174, 175,
2048 176, 180, 184, 186, 190, 191, 216, 217, 235, 243,
2049 244, 252, 261, 281, 283, 295, 297, 319, 320, 321,
2050 367, 418, 419, 420, 421, 422, 426, 448, 450, 473,
2051 474, 475, 476, 477, 481, 482, 483, 486, 490, 498,
2052 511, 512, 141, 218, 143, 170, 253, 282, 296, 322,
2053 368, 3, 215, 269, 169, 53, 169, 184, 186, 53,
2054 176, 186, 187, 215, 215, 451, 3, 89, 211, 214,
2055 211, 499, 513, 215, 103, 145, 134, 150, 162, 100,
2056 100, 133, 105, 172, 166, 135, 177, 8, 9, 10,
2057 11, 12, 13, 14, 15, 16, 17, 18, 19, 24,
2058 25, 26, 81, 82, 83, 84, 85, 86, 87, 88,
2059 99, 172, 211, 256, 257, 258, 259, 260, 271, 272,
2060 273, 274, 275, 276, 277, 278, 279, 280, 281, 283,
2061 295, 297, 321, 330, 331, 334, 337, 340, 341, 344,
2062 345, 348, 131, 127, 125, 95, 245, 128, 284, 22,
2063 132, 129, 130, 136, 423, 137, 449, 138, 172, 484,
2064 484, 139, 140, 101, 515, 100, 17, 211, 222, 271,
2065 274, 275, 276, 277, 278, 341, 345, 211, 215, 254,
2066 256, 215, 215, 215, 215, 172, 215, 172, 181, 215,
2067 215, 427, 215, 212, 75, 89, 75, 3, 244, 101,
2068 101, 100, 4, 6, 20, 21, 23, 24, 27, 49,
2069 53, 67, 99, 491, 492, 494, 244, 508, 100, 48,
2070 188, 101, 100, 101, 8, 11, 8, 9, 103, 338,
2071 332, 185, 104, 104, 106, 103, 103, 100, 100, 211,
2072 100, 101, 298, 100, 100, 100, 100, 101, 100, 101,
2073 460, 100, 485, 478, 487, 100, 100, 516, 219, 255,
2074 323, 369, 101, 105, 429, 452, 214, 213, 500, 3,
2075 245, 236, 146, 222, 103, 3, 151, 493, 73, 74,
2076 75, 76, 77, 78, 79, 80, 92, 93, 111, 112,
2077 116, 117, 211, 223, 224, 225, 226, 227, 228, 229,
2078 230, 231, 232, 233, 510, 104, 173, 167, 178, 8,
2079 224, 234, 103, 103, 47, 189, 335, 342, 346, 246,
2080 285, 117, 424, 461, 189, 101, 101, 518, 215, 215,
2081 262, 265, 269, 270, 349, 101, 101, 182, 430, 428,
2082 105, 457, 214, 101, 514, 237, 123, 124, 3, 104,
2083 106, 232, 232, 232, 224, 108, 109, 110, 90, 91,
2084 111, 112, 113, 114, 115, 509, 163, 208, 211, 197,
2085 198, 192, 106, 339, 244, 208, 234, 234, 234, 117,
2086 247, 102, 244, 286, 287, 290, 299, 431, 463, 479,
2087 488, 30, 31, 60, 65, 68, 69, 356, 357, 362,
2088 440, 442, 443, 507, 517, 519, 220, 350, 263, 324,
2089 370, 197, 211, 189, 458, 453, 501, 429, 7, 102,
2090 217, 222, 238, 240, 241, 279, 321, 147, 104, 152,
2091 494, 118, 226, 227, 228, 229, 229, 230, 230, 231,
2092 231, 231, 106, 215, 209, 1, 32, 33, 168, 199,
2093 217, 243, 252, 356, 367, 372, 377, 418, 419, 44,
2094 45, 46, 179, 193, 195, 196, 199, 243, 379, 224,
2095 244, 257, 336, 343, 347, 214, 224, 248, 249, 251,
2096 1, 256, 291, 289, 244, 51, 52, 61, 243, 356,
2097 425, 432, 440, 442, 445, 446, 447, 507, 44, 54,
2098 199, 462, 464, 467, 470, 197, 192, 358, 363, 19,
2099 211, 441, 58, 444, 211, 211, 522, 520, 521, 441,
2100 523, 102, 107, 244, 106, 244, 326, 329, 289, 183,
2101 211, 189, 503, 504, 239, 100, 215, 100, 102, 3,
2102 101, 244, 106, 207, 102, 203, 199, 200, 205, 204,
2103 206, 34, 211, 258, 341, 345, 378, 401, 201, 202,
2104 380, 102, 291, 193, 194, 104, 257, 333, 104, 104,
2105 104, 107, 118, 106, 250, 294, 292, 288, 290, 8,
2106 211, 271, 276, 277, 278, 304, 321, 211, 211, 211,
2107 432, 438, 102, 433, 434, 435, 436, 437, 439, 215,
2108 215, 102, 465, 466, 480, 489, 31, 401, 214, 3,
2109 3, 100, 100, 100, 214, 100, 221, 119, 351, 353,
2110 264, 3, 325, 327, 371, 102, 454, 502, 243, 356,
2111 440, 442, 505, 254, 29, 242, 153, 510, 210, 100,
2112 100, 100, 100, 100, 100, 373, 100, 100, 3, 100,
2113 106, 224, 214, 251, 100, 262, 102, 300, 214, 214,
2114 214, 100, 100, 100, 100, 100, 100, 100, 468, 471,
2115 100, 100, 102, 102, 359, 364, 223, 354, 352, 265,
2116 102, 106, 102, 66, 102, 505, 506, 100, 100, 100,
2117 224, 100, 72, 126, 142, 155, 157, 158, 211, 3,
2118 381, 244, 250, 293, 118, 117, 383, 383, 401, 266,
2119 269, 234, 353, 328, 455, 100, 211, 154, 156, 100,
2120 374, 383, 257, 100, 301, 384, 385, 469, 472, 360,
2121 365, 267, 355, 329, 211, 159, 102, 157, 117, 392,
2122 382, 101, 118, 35, 386, 389, 38, 403, 403, 266,
2123 55, 406, 106, 120, 456, 103, 393, 394, 375, 403,
2124 302, 390, 118, 387, 404, 361, 407, 366, 268, 59,
2125 459, 3, 495, 497, 118, 35, 36, 37, 395, 398,
2126 402, 403, 1, 28, 29, 305, 307, 311, 313, 401,
2127 106, 117, 403, 117, 62, 409, 269, 211, 104, 496,
2128 118, 396, 399, 376, 310, 315, 314, 303, 306, 308,
2129 312, 391, 388, 405, 408, 410, 160, 106, 106, 401,
2130 39, 412, 100, 224, 105, 102, 307, 244, 313, 265,
2131 389, 208, 208, 117, 215, 497, 397, 400, 413, 316,
2132 256, 317, 118, 118, 411, 398, 265, 117, 105, 318,
2133 309, 208, 414, 265, 100, 118, 75, 415, 416, 118,
2134 106, 417, 75
2137 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
2138 static const yytype_int16 yyr1[] =
2140 0, 121, 122, 123, 123, 124, 124, 125, 125, 125,
2141 127, 126, 128, 126, 129, 126, 130, 126, 131, 126,
2142 132, 126, 133, 126, 134, 126, 135, 126, 136, 126,
2143 137, 126, 138, 126, 139, 126, 140, 126, 141, 126,
2144 143, 142, 145, 146, 147, 144, 148, 150, 151, 152,
2145 153, 154, 149, 155, 156, 156, 157, 157, 159, 160,
2146 158, 162, 163, 161, 164, 164, 166, 167, 168, 165,
2147 170, 169, 171, 171, 171, 173, 172, 172, 174, 174,
2148 174, 174, 175, 175, 177, 178, 179, 176, 181, 182,
2149 183, 180, 185, 184, 187, 186, 188, 188, 189, 189,
2150 190, 190, 191, 192, 192, 192, 193, 193, 194, 193,
2151 195, 195, 196, 197, 197, 198, 198, 200, 199, 201,
2152 199, 202, 199, 203, 199, 204, 199, 205, 199, 206,
2153 199, 207, 199, 208, 210, 209, 209, 211, 212, 211,
2154 213, 211, 214, 215, 216, 216, 216, 218, 219, 220,
2155 221, 217, 222, 222, 222, 222, 222, 222, 222, 222,
2156 222, 223, 224, 225, 225, 226, 226, 227, 227, 228,
2157 228, 228, 229, 229, 229, 230, 230, 230, 230, 231,
2158 231, 231, 231, 232, 232, 232, 233, 233, 233, 233,
2159 233, 233, 233, 233, 233, 233, 234, 236, 235, 237,
2160 237, 238, 238, 238, 239, 238, 240, 240, 241, 242,
2161 242, 243, 244, 244, 246, 245, 247, 247, 248, 248,
2162 248, 249, 250, 250, 251, 253, 252, 252, 252, 252,
2163 252, 252, 255, 254, 256, 256, 257, 257, 257, 258,
2164 258, 258, 258, 258, 258, 258, 258, 259, 259, 259,
2165 259, 259, 260, 260, 260, 261, 261, 262, 264, 263,
2166 263, 265, 265, 266, 268, 267, 267, 269, 270, 271,
2167 271, 272, 272, 272, 272, 272, 272, 272, 273, 273,
2168 273, 273, 273, 273, 273, 274, 274, 274, 275, 276,
2169 276, 277, 278, 279, 280, 282, 281, 284, 285, 283,
2170 286, 286, 288, 287, 289, 289, 290, 292, 293, 291,
2171 294, 291, 296, 295, 298, 299, 300, 301, 302, 303,
2172 297, 304, 304, 304, 304, 304, 304, 305, 306, 306,
2173 308, 309, 307, 310, 307, 311, 312, 312, 314, 313,
2174 315, 316, 313, 318, 317, 319, 320, 322, 323, 324,
2175 325, 321, 326, 328, 327, 327, 329, 330, 332, 333,
2176 331, 335, 336, 334, 334, 338, 339, 337, 340, 342,
2177 343, 341, 341, 344, 346, 347, 345, 345, 348, 350,
2178 349, 351, 352, 352, 354, 355, 353, 356, 356, 358,
2179 359, 360, 361, 357, 363, 364, 365, 366, 362, 368,
2180 369, 370, 371, 367, 373, 374, 375, 376, 372, 377,
2181 377, 377, 378, 378, 380, 381, 382, 379, 384, 383,
2182 385, 383, 386, 388, 387, 387, 390, 391, 389, 393,
2183 392, 394, 392, 395, 397, 396, 396, 399, 400, 398,
2184 401, 401, 401, 401, 402, 402, 402, 404, 405, 403,
2185 403, 407, 408, 406, 406, 410, 411, 409, 409, 413,
2186 414, 412, 412, 415, 417, 416, 416, 418, 419, 420,
2187 420, 421, 423, 424, 425, 422, 427, 428, 426, 430,
2188 429, 429, 431, 431, 431, 433, 432, 434, 432, 435,
2189 432, 436, 432, 437, 432, 438, 432, 439, 432, 440,
2190 441, 441, 442, 443, 444, 444, 445, 446, 447, 449,
2191 448, 451, 452, 453, 454, 455, 456, 450, 458, 457,
2192 457, 459, 459, 461, 462, 460, 463, 463, 464, 465,
2193 464, 466, 464, 468, 469, 467, 471, 472, 470, 473,
2194 473, 473, 474, 474, 475, 476, 478, 479, 480, 477,
2195 481, 482, 483, 485, 484, 487, 488, 489, 486, 490,
2196 490, 491, 491, 491, 491, 491, 491, 491, 491, 491,
2197 491, 491, 492, 493, 493, 494, 494, 495, 496, 496,
2198 497, 499, 500, 501, 502, 498, 503, 503, 504, 504,
2199 505, 505, 506, 505, 507, 507, 508, 509, 509, 510,
2200 511, 513, 514, 512, 516, 517, 515, 518, 518, 520,
2201 519, 521, 519, 522, 519, 523, 519
2204 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
2205 static const yytype_int8 yyr2[] =
2207 0, 2, 1, 1, 0, 3, 2, 1, 2, 2,
2208 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2209 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2210 0, 3, 0, 3, 0, 3, 0, 3, 0, 3,
2211 0, 3, 0, 0, 0, 7, 2, 0, 0, 0,
2212 0, 0, 11, 2, 2, 0, 1, 2, 0, 0,
2213 8, 0, 0, 6, 1, 1, 0, 0, 0, 7,
2214 0, 3, 2, 3, 3, 0, 4, 0, 1, 1,
2215 1, 1, 2, 1, 0, 0, 0, 7, 0, 0,
2216 0, 8, 0, 4, 0, 3, 1, 0, 2, 0,
2217 2, 1, 2, 3, 2, 0, 1, 1, 0, 3,
2218 1, 1, 2, 1, 0, 3, 2, 0, 3, 0,
2219 3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
2220 3, 0, 3, 2, 0, 4, 0, 1, 0, 3,
2221 0, 4, 1, 1, 1, 2, 2, 0, 0, 0,
2222 0, 9, 1, 1, 1, 1, 1, 1, 1, 1,
2223 1, 1, 1, 1, 3, 1, 3, 1, 3, 1,
2224 3, 3, 1, 3, 3, 1, 3, 3, 3, 1,
2225 2, 2, 2, 1, 1, 3, 1, 1, 1, 1,
2226 1, 1, 1, 1, 1, 1, 1, 0, 6, 2,
2227 0, 1, 2, 2, 0, 4, 1, 1, 4, 2,
2228 0, 2, 2, 0, 0, 4, 3, 0, 1, 1,
2229 0, 2, 3, 0, 3, 0, 3, 1, 1, 1,
2230 2, 1, 0, 3, 1, 1, 1, 1, 1, 1,
2231 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2232 1, 1, 1, 1, 1, 1, 1, 2, 0, 4,
2233 0, 1, 1, 2, 0, 4, 0, 1, 1, 1,
2234 1, 1, 2, 1, 1, 1, 1, 1, 2, 3,
2235 2, 1, 1, 1, 1, 1, 1, 2, 1, 1,
2236 1, 1, 1, 1, 1, 0, 3, 0, 0, 5,
2237 1, 1, 0, 4, 2, 0, 2, 0, 0, 5,
2238 0, 3, 0, 3, 0, 0, 0, 0, 0, 0,
2239 15, 1, 1, 1, 1, 1, 1, 2, 2, 0,
2240 0, 0, 6, 0, 3, 2, 2, 0, 0, 3,
2241 0, 0, 5, 0, 3, 1, 1, 0, 0, 0,
2242 0, 9, 2, 0, 4, 0, 2, 2, 0, 0,
2243 9, 0, 0, 6, 2, 0, 0, 6, 6, 0,
2244 0, 6, 1, 1, 0, 0, 6, 1, 1, 0,
2245 4, 2, 2, 0, 0, 0, 5, 1, 1, 0,
2246 0, 0, 0, 9, 0, 0, 0, 0, 9, 0,
2247 0, 0, 0, 9, 0, 0, 0, 0, 10, 1,
2248 1, 0, 1, 1, 0, 0, 0, 7, 0, 3,
2249 0, 4, 2, 0, 4, 0, 0, 0, 5, 0,
2250 3, 0, 4, 2, 0, 4, 0, 0, 0, 5,
2251 1, 1, 1, 1, 1, 1, 1, 0, 0, 6,
2252 0, 0, 0, 6, 0, 0, 0, 6, 0, 0,
2253 0, 6, 0, 2, 0, 4, 0, 3, 3, 1,
2254 1, 2, 0, 0, 0, 7, 0, 0, 6, 0,
2255 3, 0, 3, 2, 0, 0, 3, 0, 3, 0,
2256 3, 0, 3, 0, 3, 0, 3, 0, 3, 3,
2257 1, 1, 3, 2, 1, 0, 3, 3, 3, 0,
2258 3, 0, 0, 0, 0, 0, 0, 13, 0, 3,
2259 0, 2, 0, 0, 0, 5, 2, 0, 1, 0,
2260 3, 0, 3, 0, 0, 6, 0, 0, 6, 1,
2261 1, 1, 1, 1, 2, 3, 0, 0, 0, 8,
2262 3, 3, 2, 0, 3, 0, 0, 0, 8, 1,
2263 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2264 1, 2, 2, 3, 0, 2, 5, 2, 3, 0,
2265 1, 0, 0, 0, 0, 9, 3, 2, 1, 0,
2266 2, 2, 0, 3, 3, 3, 3, 4, 0, 1,
2267 2, 0, 0, 6, 0, 0, 5, 2, 0, 0,
2268 3, 0, 3, 0, 3, 0, 3
2272 enum { YYENOMEM = -2 };
2274 #define yyerrok (yyerrstatus = 0)
2275 #define yyclearin (yychar = YYEMPTY)
2277 #define YYACCEPT goto yyacceptlab
2278 #define YYABORT goto yyabortlab
2279 #define YYERROR goto yyerrorlab
2280 #define YYNOMEM goto yyexhaustedlab
2283 #define YYRECOVERING() (!!yyerrstatus)
2285 #define YYBACKUP(Token, Value) \
2286 do \
2287 if (yychar == YYEMPTY) \
2289 yychar = (Token); \
2290 yylval = (Value); \
2291 YYPOPSTACK (yylen); \
2292 yystate = *yyssp; \
2293 goto yybackup; \
2295 else \
2297 yyerror (YY_("syntax error: cannot back up")); \
2298 YYERROR; \
2300 while (0)
2302 /* Backward compatibility with an undocumented macro.
2303 Use YYerror or YYUNDEF. */
2304 #define YYERRCODE YYUNDEF
2307 /* Enable debugging if requested. */
2308 #if YYDEBUG
2310 # ifndef YYFPRINTF
2311 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2312 # define YYFPRINTF fprintf
2313 # endif
2315 # define YYDPRINTF(Args) \
2316 do { \
2317 if (yydebug) \
2318 YYFPRINTF Args; \
2319 } while (0)
2324 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
2325 do { \
2326 if (yydebug) \
2328 YYFPRINTF (stderr, "%s ", Title); \
2329 yy_symbol_print (stderr, \
2330 Kind, Value); \
2331 YYFPRINTF (stderr, "\n"); \
2333 } while (0)
2336 /*-----------------------------------.
2337 | Print this symbol's value on YYO. |
2338 `-----------------------------------*/
2340 static void
2341 yy_symbol_value_print (FILE *yyo,
2342 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
2344 FILE *yyoutput = yyo;
2345 YY_USE (yyoutput);
2346 if (!yyvaluep)
2347 return;
2348 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2349 YY_USE (yykind);
2350 YY_IGNORE_MAYBE_UNINITIALIZED_END
2354 /*---------------------------.
2355 | Print this symbol on YYO. |
2356 `---------------------------*/
2358 static void
2359 yy_symbol_print (FILE *yyo,
2360 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
2362 YYFPRINTF (yyo, "%s %s (",
2363 yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
2365 yy_symbol_value_print (yyo, yykind, yyvaluep);
2366 YYFPRINTF (yyo, ")");
2369 /*------------------------------------------------------------------.
2370 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2371 | TOP (included). |
2372 `------------------------------------------------------------------*/
2374 static void
2375 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
2377 YYFPRINTF (stderr, "Stack now");
2378 for (; yybottom <= yytop; yybottom++)
2380 int yybot = *yybottom;
2381 YYFPRINTF (stderr, " %d", yybot);
2383 YYFPRINTF (stderr, "\n");
2386 # define YY_STACK_PRINT(Bottom, Top) \
2387 do { \
2388 if (yydebug) \
2389 yy_stack_print ((Bottom), (Top)); \
2390 } while (0)
2393 /*------------------------------------------------.
2394 | Report that the YYRULE is going to be reduced. |
2395 `------------------------------------------------*/
2397 static void
2398 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
2399 int yyrule)
2401 int yylno = yyrline[yyrule];
2402 int yynrhs = yyr2[yyrule];
2403 int yyi;
2404 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
2405 yyrule - 1, yylno);
2406 /* The symbols being reduced. */
2407 for (yyi = 0; yyi < yynrhs; yyi++)
2409 YYFPRINTF (stderr, " $%d = ", yyi + 1);
2410 yy_symbol_print (stderr,
2411 YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
2412 &yyvsp[(yyi + 1) - (yynrhs)]);
2413 YYFPRINTF (stderr, "\n");
2417 # define YY_REDUCE_PRINT(Rule) \
2418 do { \
2419 if (yydebug) \
2420 yy_reduce_print (yyssp, yyvsp, Rule); \
2421 } while (0)
2423 /* Nonzero means print parse trace. It is left uninitialized so that
2424 multiple parsers can coexist. */
2425 int yydebug;
2426 #else /* !YYDEBUG */
2427 # define YYDPRINTF(Args) ((void) 0)
2428 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
2429 # define YY_STACK_PRINT(Bottom, Top)
2430 # define YY_REDUCE_PRINT(Rule)
2431 #endif /* !YYDEBUG */
2434 /* YYINITDEPTH -- initial size of the parser's stacks. */
2435 #ifndef YYINITDEPTH
2436 # define YYINITDEPTH 200
2437 #endif
2439 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2440 if the built-in stack extension method is used).
2442 Do not make this value too large; the results are undefined if
2443 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2444 evaluated with infinite-precision integer arithmetic. */
2446 #ifndef YYMAXDEPTH
2447 # define YYMAXDEPTH 10000
2448 #endif
2455 /*-----------------------------------------------.
2456 | Release the memory associated to this symbol. |
2457 `-----------------------------------------------*/
2459 static void
2460 yydestruct (const char *yymsg,
2461 yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
2463 YY_USE (yyvaluep);
2464 if (!yymsg)
2465 yymsg = "Deleting";
2466 YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2468 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2469 YY_USE (yykind);
2470 YY_IGNORE_MAYBE_UNINITIALIZED_END
2474 /* Lookahead token kind. */
2475 int yychar;
2477 /* The semantic value of the lookahead symbol. */
2478 YYSTYPE yylval;
2479 /* Number of syntax errors so far. */
2480 int yynerrs;
2485 /*----------.
2486 | yyparse. |
2487 `----------*/
2490 yyparse (void)
2492 yy_state_fast_t yystate = 0;
2493 /* Number of tokens to shift before error messages enabled. */
2494 int yyerrstatus = 0;
2496 /* Refer to the stacks through separate pointers, to allow yyoverflow
2497 to reallocate them elsewhere. */
2499 /* Their size. */
2500 YYPTRDIFF_T yystacksize = YYINITDEPTH;
2502 /* The state stack: array, bottom, top. */
2503 yy_state_t yyssa[YYINITDEPTH];
2504 yy_state_t *yyss = yyssa;
2505 yy_state_t *yyssp = yyss;
2507 /* The semantic value stack: array, bottom, top. */
2508 YYSTYPE yyvsa[YYINITDEPTH];
2509 YYSTYPE *yyvs = yyvsa;
2510 YYSTYPE *yyvsp = yyvs;
2512 int yyn;
2513 /* The return value of yyparse. */
2514 int yyresult;
2515 /* Lookahead symbol kind. */
2516 yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
2517 /* The variables used to return semantic value and location from the
2518 action routines. */
2519 YYSTYPE yyval;
2523 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2525 /* The number of symbols on the RHS of the reduced rule.
2526 Keep to zero when no symbol should be popped. */
2527 int yylen = 0;
2529 YYDPRINTF ((stderr, "Starting parse\n"));
2531 yychar = YYEMPTY; /* Cause a token to be read. */
2533 goto yysetstate;
2536 /*------------------------------------------------------------.
2537 | yynewstate -- push a new state, which is found in yystate. |
2538 `------------------------------------------------------------*/
2539 yynewstate:
2540 /* In all cases, when you get here, the value and location stacks
2541 have just been pushed. So pushing a state here evens the stacks. */
2542 yyssp++;
2545 /*--------------------------------------------------------------------.
2546 | yysetstate -- set current state (the top of the stack) to yystate. |
2547 `--------------------------------------------------------------------*/
2548 yysetstate:
2549 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2550 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
2551 YY_IGNORE_USELESS_CAST_BEGIN
2552 *yyssp = YY_CAST (yy_state_t, yystate);
2553 YY_IGNORE_USELESS_CAST_END
2554 YY_STACK_PRINT (yyss, yyssp);
2556 if (yyss + yystacksize - 1 <= yyssp)
2557 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
2558 YYNOMEM;
2559 #else
2561 /* Get the current used size of the three stacks, in elements. */
2562 YYPTRDIFF_T yysize = yyssp - yyss + 1;
2564 # if defined yyoverflow
2566 /* Give user a chance to reallocate the stack. Use copies of
2567 these so that the &'s don't force the real ones into
2568 memory. */
2569 yy_state_t *yyss1 = yyss;
2570 YYSTYPE *yyvs1 = yyvs;
2572 /* Each stack pointer address is followed by the size of the
2573 data in use in that stack, in bytes. This used to be a
2574 conditional around just the two extra args, but that might
2575 be undefined if yyoverflow is a macro. */
2576 yyoverflow (YY_("memory exhausted"),
2577 &yyss1, yysize * YYSIZEOF (*yyssp),
2578 &yyvs1, yysize * YYSIZEOF (*yyvsp),
2579 &yystacksize);
2580 yyss = yyss1;
2581 yyvs = yyvs1;
2583 # else /* defined YYSTACK_RELOCATE */
2584 /* Extend the stack our own way. */
2585 if (YYMAXDEPTH <= yystacksize)
2586 YYNOMEM;
2587 yystacksize *= 2;
2588 if (YYMAXDEPTH < yystacksize)
2589 yystacksize = YYMAXDEPTH;
2592 yy_state_t *yyss1 = yyss;
2593 union yyalloc *yyptr =
2594 YY_CAST (union yyalloc *,
2595 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
2596 if (! yyptr)
2597 YYNOMEM;
2598 YYSTACK_RELOCATE (yyss_alloc, yyss);
2599 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2600 # undef YYSTACK_RELOCATE
2601 if (yyss1 != yyssa)
2602 YYSTACK_FREE (yyss1);
2604 # endif
2606 yyssp = yyss + yysize - 1;
2607 yyvsp = yyvs + yysize - 1;
2609 YY_IGNORE_USELESS_CAST_BEGIN
2610 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
2611 YY_CAST (long, yystacksize)));
2612 YY_IGNORE_USELESS_CAST_END
2614 if (yyss + yystacksize - 1 <= yyssp)
2615 YYABORT;
2617 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
2620 if (yystate == YYFINAL)
2621 YYACCEPT;
2623 goto yybackup;
2626 /*-----------.
2627 | yybackup. |
2628 `-----------*/
2629 yybackup:
2630 /* Do appropriate processing given the current state. Read a
2631 lookahead token if we need one and don't already have one. */
2633 /* First try to decide what to do without reference to lookahead token. */
2634 yyn = yypact[yystate];
2635 if (yypact_value_is_default (yyn))
2636 goto yydefault;
2638 /* Not known => get a lookahead token if don't already have one. */
2640 /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
2641 if (yychar == YYEMPTY)
2643 YYDPRINTF ((stderr, "Reading a token\n"));
2644 yychar = yylex ();
2647 if (yychar <= YYEOF)
2649 yychar = YYEOF;
2650 yytoken = YYSYMBOL_YYEOF;
2651 YYDPRINTF ((stderr, "Now at end of input.\n"));
2653 else if (yychar == YYerror)
2655 /* The scanner already issued an error message, process directly
2656 to error recovery. But do not keep the error token as
2657 lookahead, it is too special and may lead us to an endless
2658 loop in error recovery. */
2659 yychar = YYUNDEF;
2660 yytoken = YYSYMBOL_YYerror;
2661 goto yyerrlab1;
2663 else
2665 yytoken = YYTRANSLATE (yychar);
2666 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2669 /* If the proper action on seeing token YYTOKEN is to reduce or to
2670 detect an error, take that action. */
2671 yyn += yytoken;
2672 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2673 goto yydefault;
2674 yyn = yytable[yyn];
2675 if (yyn <= 0)
2677 if (yytable_value_is_error (yyn))
2678 goto yyerrlab;
2679 yyn = -yyn;
2680 goto yyreduce;
2683 /* Count tokens shifted since error; after three, turn off error
2684 status. */
2685 if (yyerrstatus)
2686 yyerrstatus--;
2688 /* Shift the lookahead token. */
2689 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2690 yystate = yyn;
2691 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2692 *++yyvsp = yylval;
2693 YY_IGNORE_MAYBE_UNINITIALIZED_END
2695 /* Discard the shifted token. */
2696 yychar = YYEMPTY;
2697 goto yynewstate;
2700 /*-----------------------------------------------------------.
2701 | yydefault -- do the default action for the current state. |
2702 `-----------------------------------------------------------*/
2703 yydefault:
2704 yyn = yydefact[yystate];
2705 if (yyn == 0)
2706 goto yyerrlab;
2707 goto yyreduce;
2710 /*-----------------------------.
2711 | yyreduce -- do a reduction. |
2712 `-----------------------------*/
2713 yyreduce:
2714 /* yyn is the number of a rule to reduce with. */
2715 yylen = yyr2[yyn];
2717 /* If YYLEN is nonzero, implement the default value of the action:
2718 '$$ = $1'.
2720 Otherwise, the following line sets YYVAL to garbage.
2721 This behavior is undocumented and Bison
2722 users should not rely upon it. Assigning to YYVAL
2723 unconditionally makes the parser a bit smaller, and it avoids a
2724 GCC warning that YYVAL may be used uninitialized. */
2725 yyval = yyvsp[1-yylen];
2728 YY_REDUCE_PRINT (yyn);
2729 switch (yyn)
2731 case 5: /* at_least_one_definition: definitions at_least_one_annotation definition */
2732 #line 436 "fe/idl.ypp"
2734 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
2735 AST_Decl *&node = (yyvsp[0].dcval);
2736 if (node)
2738 node->annotation_appls (*annotations);
2740 else
2742 idl_global->err ()-> unsupported_warning (
2743 "Annotating this is not supported");
2745 delete annotations;
2747 #line 2748 "fe/idl.tab.cpp"
2748 break;
2750 case 10: /* $@1: %empty */
2751 #line 461 "fe/idl.ypp"
2753 idl_global->set_parse_state (IDL_GlobalData::PS_AnnotationDeclSeen);
2755 #line 2756 "fe/idl.tab.cpp"
2756 break;
2758 case 11: /* fixed_definition: annotation_dcl $@1 ';' */
2759 #line 465 "fe/idl.ypp"
2761 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2763 #line 2764 "fe/idl.tab.cpp"
2764 break;
2766 case 12: /* $@2: %empty */
2767 #line 469 "fe/idl.ypp"
2769 idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
2771 #line 2772 "fe/idl.tab.cpp"
2772 break;
2774 case 13: /* fixed_definition: type_dcl $@2 ';' */
2775 #line 473 "fe/idl.ypp"
2777 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2779 #line 2780 "fe/idl.tab.cpp"
2780 break;
2782 case 14: /* $@3: %empty */
2783 #line 477 "fe/idl.ypp"
2785 idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
2787 #line 2788 "fe/idl.tab.cpp"
2788 break;
2790 case 15: /* fixed_definition: typeid_dcl $@3 ';' */
2791 #line 481 "fe/idl.ypp"
2793 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2795 #line 2796 "fe/idl.tab.cpp"
2796 break;
2798 case 16: /* $@4: %empty */
2799 #line 485 "fe/idl.ypp"
2801 idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
2803 #line 2804 "fe/idl.tab.cpp"
2804 break;
2806 case 17: /* fixed_definition: typeprefix_dcl $@4 ';' */
2807 #line 489 "fe/idl.ypp"
2809 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2811 #line 2812 "fe/idl.tab.cpp"
2812 break;
2814 case 18: /* $@5: %empty */
2815 #line 493 "fe/idl.ypp"
2817 idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
2819 #line 2820 "fe/idl.tab.cpp"
2820 break;
2822 case 19: /* fixed_definition: const_dcl $@5 ';' */
2823 #line 497 "fe/idl.ypp"
2825 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2827 #line 2828 "fe/idl.tab.cpp"
2828 break;
2830 case 20: /* $@6: %empty */
2831 #line 501 "fe/idl.ypp"
2833 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
2835 #line 2836 "fe/idl.tab.cpp"
2836 break;
2838 case 21: /* fixed_definition: exception $@6 ';' */
2839 #line 505 "fe/idl.ypp"
2841 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2843 #line 2844 "fe/idl.tab.cpp"
2844 break;
2846 case 22: /* $@7: %empty */
2847 #line 509 "fe/idl.ypp"
2849 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceDeclSeen);
2851 #line 2852 "fe/idl.tab.cpp"
2852 break;
2854 case 23: /* fixed_definition: interface_def $@7 ';' */
2855 #line 513 "fe/idl.ypp"
2857 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2859 #line 2860 "fe/idl.tab.cpp"
2860 break;
2862 case 24: /* $@8: %empty */
2863 #line 517 "fe/idl.ypp"
2865 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleDeclSeen);
2867 #line 2868 "fe/idl.tab.cpp"
2868 break;
2870 case 25: /* fixed_definition: module $@8 ';' */
2871 #line 521 "fe/idl.ypp"
2873 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2875 #line 2876 "fe/idl.tab.cpp"
2876 break;
2878 case 26: /* $@9: %empty */
2879 #line 525 "fe/idl.ypp"
2881 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeDeclSeen);
2883 #line 2884 "fe/idl.tab.cpp"
2884 break;
2886 case 27: /* fixed_definition: value_def $@9 ';' */
2887 #line 529 "fe/idl.ypp"
2889 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2891 #line 2892 "fe/idl.tab.cpp"
2892 break;
2894 case 28: /* $@10: %empty */
2895 #line 533 "fe/idl.ypp"
2897 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentDeclSeen);
2899 #line 2900 "fe/idl.tab.cpp"
2900 break;
2902 case 29: /* fixed_definition: component $@10 ';' */
2903 #line 537 "fe/idl.ypp"
2905 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2907 #line 2908 "fe/idl.tab.cpp"
2908 break;
2910 case 30: /* $@11: %empty */
2911 #line 541 "fe/idl.ypp"
2913 idl_global->set_parse_state (IDL_GlobalData::PS_HomeDeclSeen);
2915 #line 2916 "fe/idl.tab.cpp"
2916 break;
2918 case 31: /* fixed_definition: home_decl $@11 ';' */
2919 #line 545 "fe/idl.ypp"
2921 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2923 #line 2924 "fe/idl.tab.cpp"
2924 break;
2926 case 32: /* $@12: %empty */
2927 #line 549 "fe/idl.ypp"
2929 idl_global->set_parse_state (IDL_GlobalData::PS_EventDeclSeen);
2931 #line 2932 "fe/idl.tab.cpp"
2932 break;
2934 case 33: /* fixed_definition: event $@12 ';' */
2935 #line 553 "fe/idl.ypp"
2937 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2939 #line 2940 "fe/idl.tab.cpp"
2940 break;
2942 case 34: /* $@13: %empty */
2943 #line 557 "fe/idl.ypp"
2945 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeDeclSeen);
2947 #line 2948 "fe/idl.tab.cpp"
2948 break;
2950 case 35: /* fixed_definition: porttype_decl $@13 ';' */
2951 #line 561 "fe/idl.ypp"
2953 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2955 #line 2956 "fe/idl.tab.cpp"
2956 break;
2958 case 36: /* $@14: %empty */
2959 #line 565 "fe/idl.ypp"
2961 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorDeclSeen);
2963 #line 2964 "fe/idl.tab.cpp"
2964 break;
2966 case 37: /* fixed_definition: connector_decl $@14 ';' */
2967 #line 569 "fe/idl.ypp"
2969 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2971 #line 2972 "fe/idl.tab.cpp"
2972 break;
2974 case 38: /* $@15: %empty */
2975 #line 573 "fe/idl.ypp"
2977 idl_global->err ()->syntax_error (idl_global->parse_state ());
2979 #line 2980 "fe/idl.tab.cpp"
2980 break;
2982 case 39: /* fixed_definition: error $@15 ';' */
2983 #line 577 "fe/idl.ypp"
2985 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
2986 yyerrok;
2987 (yyval.dcval) = 0;
2989 #line 2990 "fe/idl.tab.cpp"
2990 break;
2992 case 40: /* $@16: %empty */
2993 #line 586 "fe/idl.ypp"
2995 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSeen);
2997 #line 2998 "fe/idl.tab.cpp"
2998 break;
3000 case 41: /* module_header: IDL_MODULE $@16 scoped_name */
3001 #line 590 "fe/idl.ypp"
3003 (yyval.idlist) = (yyvsp[0].idlist);
3005 #line 3006 "fe/idl.tab.cpp"
3006 break;
3008 case 42: /* @17: %empty */
3009 #line 597 "fe/idl.ypp"
3011 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleIDSeen);
3013 // The module_header rule is common to template module, fixed
3014 // module and instantiated template module. In the last
3015 // case, a fully scoped name is allowed, but here we
3016 // allow only an identifier (a scoped name of length
3017 // 1). If not satisfied, we output a parse error with
3018 // the appropriate message.
3019 if ((yyvsp[0].idlist)->length () != 1)
3021 idl_global->err ()->syntax_error (
3022 IDL_GlobalData::PS_ModuleIDSeen);
3025 AST_Module *m = 0;
3026 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3029 * Make a new module and add it to the enclosing scope
3031 if (s != 0)
3033 m = idl_global->gen ()->create_module (s, (yyvsp[0].idlist));
3034 (void) s->fe_add_module (m);
3037 (yyvsp[0].idlist)->destroy ();
3038 delete (yyvsp[0].idlist);
3039 (yyvsp[0].idlist) = 0;
3042 * Push it on the stack
3044 idl_global->scopes ().push (m);
3046 (yyval.dcval) = m;
3048 #line 3049 "fe/idl.tab.cpp"
3049 break;
3051 case 43: /* $@18: %empty */
3052 #line 636 "fe/idl.ypp"
3054 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleSqSeen);
3056 #line 3057 "fe/idl.tab.cpp"
3057 break;
3059 case 44: /* $@19: %empty */
3060 #line 640 "fe/idl.ypp"
3062 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleBodySeen);
3064 #line 3065 "fe/idl.tab.cpp"
3065 break;
3067 case 45: /* module: module_header @17 '{' $@18 at_least_one_definition $@19 '}' */
3068 #line 644 "fe/idl.ypp"
3070 idl_global->set_parse_state (IDL_GlobalData::PS_ModuleQsSeen);
3072 * Finished with this module - pop it from the scope stack.
3075 idl_global->scopes ().pop ();
3076 (yyval.dcval) = (yyvsp[-5].dcval);
3078 #line 3079 "fe/idl.tab.cpp"
3079 break;
3081 case 46: /* template_module_header: module_header '<' */
3082 #line 657 "fe/idl.ypp"
3084 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleIDSeen);
3086 #line 3087 "fe/idl.tab.cpp"
3087 break;
3089 case 47: /* $@20: %empty */
3090 #line 664 "fe/idl.ypp"
3092 // The module_header rule is common to template module, fixed
3093 // module and instantiated template module. In the last
3094 // case, a fully scoped name is allowed, but here we
3095 // allow only an identifier (a scoped name of length
3096 // 1). If not satisfied, we output a syntax error with
3097 // the appropriate message.
3098 if ((yyvsp[0].idlist)->length () != 1)
3100 idl_global->err ()->syntax_error (
3101 IDL_GlobalData::PS_ModuleIDSeen);
3104 #line 3105 "fe/idl.tab.cpp"
3105 break;
3107 case 48: /* $@21: %empty */
3108 #line 678 "fe/idl.ypp"
3110 if (FE_Utils::duplicate_param_id ((yyvsp[0].plval)))
3112 idl_global->err ()->duplicate_param_id (
3113 (yyvsp[-2].idlist));
3115 return 1;
3118 #line 3119 "fe/idl.tab.cpp"
3119 break;
3121 case 49: /* $@22: %empty */
3122 #line 688 "fe/idl.ypp"
3124 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleParamsSeen);
3126 AST_Template_Module *tm =
3127 idl_global->gen ()->create_template_module ((yyvsp[-4].idlist),
3128 (yyvsp[-2].plval));
3130 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3131 AST_Module *m = s->fe_add_module (tm);
3133 // We've probably tried to reopen a template module,
3134 // going further will cause a crash.
3135 if (m == 0)
3137 return 1;
3141 * Push it on the stack
3143 idl_global->scopes ().push (tm);
3145 // Contained items not part of an alias will get flag set.
3146 idl_global->in_tmpl_mod_no_alias (true);
3148 // Store these for reference as we parse the scope
3149 // of the template module.
3150 idl_global->current_params ((yyvsp[-2].plval));
3152 #line 3153 "fe/idl.tab.cpp"
3153 break;
3155 case 50: /* $@23: %empty */
3156 #line 718 "fe/idl.ypp"
3158 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleSqSeen);
3160 #line 3161 "fe/idl.tab.cpp"
3161 break;
3163 case 51: /* $@24: %empty */
3164 #line 722 "fe/idl.ypp"
3166 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleBodySeen);
3168 #line 3169 "fe/idl.tab.cpp"
3169 break;
3171 case 52: /* template_module: template_module_header $@20 at_least_one_formal_parameter $@21 '>' $@22 '{' $@23 at_least_one_tpl_definition $@24 '}' */
3172 #line 726 "fe/idl.ypp"
3174 idl_global->set_parse_state (IDL_GlobalData::PS_TmplModuleQsSeen);
3177 * Finished with this module - pop it from the scope stack.
3179 idl_global->scopes ().pop ();
3181 // Unset the flag, the no_alias version because any scope
3182 // traversal triggered by an alias would have ended by now.
3183 idl_global->in_tmpl_mod_no_alias (false);
3185 // Clear the pointer so scoped name lookup will know
3186 // that we are no longer in a template module scope.
3187 idl_global->current_params (0);
3189 (yyval.dcval) = 0;
3191 #line 3192 "fe/idl.tab.cpp"
3192 break;
3194 case 58: /* $@25: %empty */
3195 #line 762 "fe/idl.ypp"
3197 idl_global->set_parse_state (
3198 IDL_GlobalData::PS_ModuleRefSeen);
3200 #line 3201 "fe/idl.tab.cpp"
3201 break;
3203 case 59: /* $@26: %empty */
3204 #line 767 "fe/idl.ypp"
3206 idl_global->set_parse_state (
3207 IDL_GlobalData::PS_ModuleRefParamsSeen);
3209 #line 3210 "fe/idl.tab.cpp"
3210 break;
3212 case 60: /* template_module_ref: IDL_ALIAS scoped_name $@25 '<' at_least_one_formal_parameter_name '>' $@26 defining_id */
3213 #line 772 "fe/idl.ypp"
3215 idl_global->set_parse_state (
3216 IDL_GlobalData::PS_ModuleRefIDSeen);
3218 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3219 AST_Decl *d =
3220 s->lookup_by_name ((yyvsp[-6].idlist));
3222 if (d == 0)
3224 idl_global->err ()->lookup_error ((yyvsp[-6].idlist));
3225 return 1;
3228 AST_Template_Module *ref =
3229 dynamic_cast<AST_Template_Module*> (d);
3231 if (ref == 0)
3233 idl_global->err ()->template_module_expected (d);
3234 return 1;
3237 bool refs_match =
3238 ref->match_param_refs ((yyvsp[-3].slval),
3241 if (! refs_match)
3243 // Error message is already output.
3244 return 1;
3247 UTL_ScopedName sn ((yyvsp[0].idval), 0);
3249 AST_Template_Module_Ref *tmr =
3250 idl_global->gen ()->create_template_module_ref (
3251 &sn,
3252 ref,
3253 (yyvsp[-3].slval));
3255 (void) s->fe_add_template_module_ref (tmr);
3257 sn.destroy ();
3258 (yyvsp[-6].idlist)->destroy ();
3259 delete (yyvsp[-6].idlist);
3260 (yyvsp[-6].idlist) = 0;
3262 // Save the current flag value to be restored below.
3263 bool itmna_flag = idl_global->in_tmpl_mod_no_alias ();
3264 idl_global->in_tmpl_mod_no_alias (false);
3265 idl_global->in_tmpl_mod_alias (true);
3267 ast_visitor_context ctx;
3268 ctx.template_params (ref->template_params ());
3269 ast_visitor_tmpl_module_ref v (&ctx);
3271 // The implied IDL resulting from this reference is
3272 // created here, in the template module scope. Upon
3273 // instantiation of the enclosing template module, the
3274 // visitor copies this implied IDL to the instantiated
3275 // module scope. The extra copy is less than ideal, but
3276 // otherwise we have ugly lookup issues when the
3277 // referenced template module's contents are referenced
3278 // using the aliased scoped name.
3279 if (v.visit_template_module_ref (tmr) != 0)
3281 ACE_ERROR ((LM_ERROR,
3282 ACE_TEXT ("visit_template_module_ref")
3283 ACE_TEXT (" failed\n")));
3285 idl_global->set_err_count (idl_global->err_count () + 1);
3288 idl_global->in_tmpl_mod_no_alias (itmna_flag);
3289 idl_global->in_tmpl_mod_alias (false);
3291 #line 3292 "fe/idl.tab.cpp"
3292 break;
3294 case 61: /* $@27: %empty */
3295 #line 853 "fe/idl.ypp"
3297 idl_global->set_parse_state (
3298 IDL_GlobalData::PS_InstModuleSeen);
3300 #line 3301 "fe/idl.tab.cpp"
3301 break;
3303 case 62: /* $@28: %empty */
3304 #line 858 "fe/idl.ypp"
3306 idl_global->set_parse_state (
3307 IDL_GlobalData::PS_InstModuleArgsSeen);
3309 #line 3310 "fe/idl.tab.cpp"
3310 break;
3312 case 63: /* template_module_inst: template_module_header $@27 at_least_one_actual_parameter '>' $@28 defining_id */
3313 #line 863 "fe/idl.ypp"
3315 idl_global->set_parse_state (
3316 IDL_GlobalData::PS_InstModuleIDSeen);
3318 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3319 UTL_ScopedName *sn = (yyvsp[-5].idlist);
3320 AST_Template_Module *ref = 0;
3321 AST_Decl *d = s->lookup_by_name (sn);
3323 if (d == 0)
3325 idl_global->err ()->lookup_error (sn);
3326 return 1;
3328 else
3330 ref = dynamic_cast<AST_Template_Module*> (d);
3332 if (ref == 0)
3334 idl_global->err ()->template_module_expected (d);
3335 return 1;
3339 sn->destroy ();
3340 delete sn;
3341 sn = 0;
3342 (yyvsp[-5].idlist) = 0;
3344 if (! ref->match_arg_names ((yyvsp[-3].alval)))
3346 return 1;
3349 ACE_NEW_RETURN (sn,
3350 UTL_ScopedName ((yyvsp[0].idval),
3354 AST_Template_Module_Inst *tmi =
3355 idl_global->gen ()->create_template_module_inst (
3357 ref,
3358 (yyvsp[-3].alval));
3360 (void) s->fe_add_template_module_inst (tmi);
3362 ast_visitor_context ctx;
3363 ctx.template_args ((yyvsp[-3].alval));
3364 ast_visitor_tmpl_module_inst v (&ctx);
3366 if (v.visit_template_module_inst (tmi) != 0)
3368 ACE_ERROR ((LM_ERROR,
3369 ACE_TEXT ("visit_template_module_inst")
3370 ACE_TEXT (" failed\n")));
3372 idl_global->set_err_count (idl_global->err_count () + 1);
3375 (yyval.dcval) = 0;
3377 #line 3378 "fe/idl.tab.cpp"
3378 break;
3380 case 66: /* $@29: %empty */
3381 #line 935 "fe/idl.ypp"
3383 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3384 AST_Interface *i = 0;
3386 FE_InterfaceHeader *header = (yyvsp[0].ihval);
3387 (yyvsp[0].ihval) = 0;
3390 * Make a new interface node and add it to its enclosing scope.
3392 if (s && header)
3394 i = idl_global->gen ()->create_interface (
3395 header->name (),
3396 header->inherits (),
3397 header->n_inherits (),
3398 header->inherits_flat (),
3399 header->n_inherits_flat (),
3400 header->is_local (),
3401 header->is_abstract ()
3403 AST_Interface::fwd_redefinition_helper (i, s);
3405 * Add the interface to its definition scope.
3407 s->fe_add_interface (i);
3409 // This FE_InterfaceHeader class isn't destroyed with the AST.
3410 header->destroy ();
3411 delete header;
3415 * Push it on the scope stack.
3417 idl_global->scopes ().push (i);
3419 #line 3420 "fe/idl.tab.cpp"
3420 break;
3422 case 67: /* $@30: %empty */
3423 #line 973 "fe/idl.ypp"
3425 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSqSeen);
3427 #line 3428 "fe/idl.tab.cpp"
3428 break;
3430 case 68: /* $@31: %empty */
3431 #line 977 "fe/idl.ypp"
3433 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceBodySeen);
3435 #line 3436 "fe/idl.tab.cpp"
3436 break;
3438 case 69: /* interface: interface_header $@29 '{' $@30 exports $@31 '}' */
3439 #line 981 "fe/idl.ypp"
3441 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceQsSeen);
3443 (yyval.dcval) = dynamic_cast<AST_Decl *> (idl_global->scopes ().top_non_null ());
3445 * Done with this interface - pop it off the scopes stack
3447 idl_global->scopes ().pop ();
3449 #line 3450 "fe/idl.tab.cpp"
3450 break;
3452 case 70: /* $@32: %empty */
3453 #line 994 "fe/idl.ypp"
3455 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceSeen);
3457 #line 3458 "fe/idl.tab.cpp"
3458 break;
3460 case 71: /* interface_decl: IDL_INTERFACE $@32 defining_id */
3461 #line 998 "fe/idl.ypp"
3463 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceIDSeen);
3464 (yyval.idval) = (yyvsp[0].idval);
3466 #line 3467 "fe/idl.tab.cpp"
3467 break;
3469 case 72: /* interface_header: interface_decl inheritance_spec */
3470 #line 1006 "fe/idl.ypp"
3472 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3474 if ((yyvsp[0].nlval) != 0 && (yyvsp[0].nlval)->truncatable ())
3476 idl_global->err ()->syntax_error (
3477 IDL_GlobalData::PS_InheritColonSeen
3482 * Create an AST representation of the information in the header
3483 * part of an interface - this representation contains a computed
3484 * list of all interfaces which this interface inherits from,
3485 * recursively
3487 UTL_ScopedName *n = 0;
3488 ACE_NEW_RETURN (n,
3489 UTL_ScopedName ((yyvsp[-1].idval), 0),
3491 ACE_NEW_RETURN ((yyval.ihval),
3492 FE_InterfaceHeader (n,
3493 (yyvsp[0].nlval),
3494 false,
3495 false,
3496 true),
3499 if (0 != (yyvsp[0].nlval))
3501 (yyvsp[0].nlval)->destroy ();
3502 delete (yyvsp[0].nlval);
3503 (yyvsp[0].nlval) = 0;
3506 #line 3507 "fe/idl.tab.cpp"
3507 break;
3509 case 73: /* interface_header: IDL_LOCAL interface_decl inheritance_spec */
3510 #line 1043 "fe/idl.ypp"
3512 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3515 * Create an AST representation of the information in the header
3516 * part of an interface - this representation contains a computed
3517 * list of all interfaces which this interface inherits from,
3518 * recursively
3520 UTL_ScopedName *n = 0;
3521 ACE_NEW_RETURN (n,
3522 UTL_ScopedName ((yyvsp[-1].idval), 0),
3524 ACE_NEW_RETURN ((yyval.ihval),
3525 FE_InterfaceHeader (n,
3526 (yyvsp[0].nlval),
3527 true,
3528 false,
3529 true),
3532 if (0 != (yyvsp[0].nlval))
3534 (yyvsp[0].nlval)->destroy ();
3535 delete (yyvsp[0].nlval);
3536 (yyvsp[0].nlval) = 0;
3539 #line 3540 "fe/idl.tab.cpp"
3540 break;
3542 case 74: /* interface_header: IDL_ABSTRACT interface_decl inheritance_spec */
3543 #line 1073 "fe/idl.ypp"
3545 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3548 * Create an AST representation of the information in the header
3549 * part of an interface - this representation contains a computed
3550 * list of all interfaces which this interface inherits from,
3551 * recursively
3553 UTL_ScopedName *n = 0;
3554 ACE_NEW_RETURN (n,
3555 UTL_ScopedName ((yyvsp[-1].idval), 0),
3557 ACE_NEW_RETURN ((yyval.ihval),
3558 FE_InterfaceHeader (n,
3559 (yyvsp[0].nlval),
3560 false,
3561 true,
3562 true),
3565 if (0 != (yyvsp[0].nlval))
3567 (yyvsp[0].nlval)->destroy ();
3568 delete (yyvsp[0].nlval);
3569 (yyvsp[0].nlval) = 0;
3572 #line 3573 "fe/idl.tab.cpp"
3573 break;
3575 case 75: /* $@33: %empty */
3576 #line 1105 "fe/idl.ypp"
3578 idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
3580 #line 3581 "fe/idl.tab.cpp"
3581 break;
3583 case 76: /* inheritance_spec: ':' opt_truncatable $@33 at_least_one_scoped_name */
3584 #line 1109 "fe/idl.ypp"
3586 (yyvsp[0].nlval)->truncatable ((yyvsp[-2].bval));
3587 (yyval.nlval) = (yyvsp[0].nlval);
3589 #line 3590 "fe/idl.tab.cpp"
3590 break;
3592 case 77: /* inheritance_spec: %empty */
3593 #line 1114 "fe/idl.ypp"
3595 (yyval.nlval) = 0;
3597 #line 3598 "fe/idl.tab.cpp"
3598 break;
3600 case 82: /* valuetype: IDL_CUSTOM value_concrete_decl */
3601 #line 1128 "fe/idl.ypp"
3603 idl_global->err ()->unsupported_error ("custom is not supported");
3604 (yyval.dcval) = (yyvsp[0].dcval);
3606 #line 3607 "fe/idl.tab.cpp"
3607 break;
3609 case 84: /* @34: %empty */
3610 #line 1137 "fe/idl.ypp"
3612 FE_OBVHeader *&valuetype_header = (yyvsp[0].vhval);
3613 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
3614 AST_ValueType *valuetype = 0;
3616 if (scope && valuetype_header)
3618 valuetype = idl_global->gen ()->create_valuetype (
3619 valuetype_header->name (),
3620 valuetype_header->inherits (),
3621 valuetype_header->n_inherits (),
3622 valuetype_header->inherits_concrete (),
3623 valuetype_header->inherits_flat (),
3624 valuetype_header->n_inherits_flat (),
3625 valuetype_header->supports (),
3626 valuetype_header->n_supports (),
3627 valuetype_header->supports_concrete (),
3628 false,
3629 valuetype_header->truncatable (),
3630 false);
3632 AST_Interface *valuetype_as_interface =
3633 dynamic_cast<AST_Interface *> (valuetype);
3634 AST_Interface::fwd_redefinition_helper (
3635 valuetype_as_interface, scope);
3636 valuetype = dynamic_cast<AST_ValueType *> (
3637 valuetype_as_interface);
3640 * Add the valuetype to its definition scope
3642 scope->fe_add_valuetype (valuetype);
3644 // FE_OBVHeader is not automatically destroyed in the AST
3645 valuetype_header->destroy ();
3646 delete valuetype_header;
3647 valuetype_header = 0;
3651 * Push it on the scope stack
3653 idl_global->scopes ().push (valuetype);
3655 (yyval.dcval) = valuetype;
3657 #line 3658 "fe/idl.tab.cpp"
3658 break;
3660 case 85: /* $@35: %empty */
3661 #line 1184 "fe/idl.ypp"
3663 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
3665 #line 3666 "fe/idl.tab.cpp"
3666 break;
3668 case 86: /* $@36: %empty */
3669 #line 1188 "fe/idl.ypp"
3671 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
3673 #line 3674 "fe/idl.tab.cpp"
3674 break;
3676 case 87: /* value_concrete_decl: value_header @34 '{' $@35 value_elements $@36 '}' */
3677 #line 1192 "fe/idl.ypp"
3679 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
3681 AST_ValueType *vt =
3682 dynamic_cast<AST_ValueType*> (
3683 idl_global->scopes ().top_non_null ()
3686 if (vt != 0 && vt->will_have_factory ())
3688 idl_global->valuefactory_seen_ = true;
3692 * Done with this value type - pop it off the scopes stack
3694 idl_global->scopes ().pop ();
3696 (yyval.dcval) = (yyvsp[-5].dcval);
3698 #line 3699 "fe/idl.tab.cpp"
3699 break;
3701 case 88: /* $@37: %empty */
3702 #line 1217 "fe/idl.ypp"
3704 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3705 AST_ValueType *v = 0;
3706 AST_Interface *i = 0;
3708 if (s != 0 && (yyvsp[0].vhval) != 0)
3711 idl_global->gen ()->create_valuetype (
3712 (yyvsp[0].vhval)->name (),
3713 (yyvsp[0].vhval)->inherits (),
3714 (yyvsp[0].vhval)->n_inherits (),
3715 (yyvsp[0].vhval)->inherits_concrete (),
3716 (yyvsp[0].vhval)->inherits_flat (),
3717 (yyvsp[0].vhval)->n_inherits_flat (),
3718 (yyvsp[0].vhval)->supports (),
3719 (yyvsp[0].vhval)->n_supports (),
3720 (yyvsp[0].vhval)->supports_concrete (),
3721 true,
3722 false,
3723 false
3725 i = dynamic_cast<AST_Interface*> (v);
3726 AST_Interface::fwd_redefinition_helper (i,
3729 * Add the valuetype to its definition scope
3731 v = dynamic_cast<AST_ValueType*> (i);
3732 (void) s->fe_add_valuetype (v);
3734 // FE_OBVHeader is not automatically destroyed in the AST
3735 (yyvsp[0].vhval)->destroy ();
3736 delete (yyvsp[0].vhval);
3737 (yyvsp[0].vhval) = 0;
3741 * Push it on the scope stack.
3743 idl_global->scopes ().push (v);
3745 #line 3746 "fe/idl.tab.cpp"
3746 break;
3748 case 89: /* $@38: %empty */
3749 #line 1260 "fe/idl.ypp"
3751 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSqSeen);
3753 #line 3754 "fe/idl.tab.cpp"
3754 break;
3756 case 90: /* $@39: %empty */
3757 #line 1264 "fe/idl.ypp"
3759 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeBodySeen);
3761 #line 3762 "fe/idl.tab.cpp"
3762 break;
3764 case 91: /* value_abs_decl: IDL_ABSTRACT value_header $@37 '{' $@38 exports $@39 '}' */
3765 #line 1268 "fe/idl.ypp"
3767 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeQsSeen);
3770 * Done with this valuetype - pop it off the scopes stack.
3772 idl_global->scopes ().pop ();
3774 (yyval.dcval) = 0;
3776 #line 3777 "fe/idl.tab.cpp"
3777 break;
3779 case 92: /* $@40: %empty */
3780 #line 1283 "fe/idl.ypp"
3782 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
3784 #line 3785 "fe/idl.tab.cpp"
3785 break;
3787 case 93: /* value_header: value_decl inheritance_spec $@40 supports_spec */
3788 #line 1287 "fe/idl.ypp"
3790 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
3792 UTL_ScopedName *sn = 0;
3793 ACE_NEW_RETURN (sn,
3794 UTL_ScopedName ((yyvsp[-3].idval), 0),
3796 ACE_NEW_RETURN ((yyval.vhval),
3797 FE_OBVHeader (sn,
3798 (yyvsp[-2].nlval),
3799 (yyvsp[0].nlval),
3800 ((yyvsp[-2].nlval) != 0
3801 ? (yyvsp[-2].nlval)->truncatable ()
3802 : false)),
3805 if (0 != (yyvsp[0].nlval))
3807 (yyvsp[0].nlval)->destroy ();
3808 delete (yyvsp[0].nlval);
3809 (yyvsp[0].nlval) = 0;
3812 if (0 != (yyvsp[-2].nlval))
3814 (yyvsp[-2].nlval)->destroy ();
3815 delete (yyvsp[-2].nlval);
3816 (yyvsp[-2].nlval) = 0;
3819 #line 3820 "fe/idl.tab.cpp"
3820 break;
3822 case 94: /* $@41: %empty */
3823 #line 1321 "fe/idl.ypp"
3825 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeSeen);
3827 #line 3828 "fe/idl.tab.cpp"
3828 break;
3830 case 95: /* value_decl: IDL_VALUETYPE $@41 defining_id */
3831 #line 1325 "fe/idl.ypp"
3833 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeIDSeen);
3834 (yyval.idval) = (yyvsp[0].idval);
3836 #line 3837 "fe/idl.tab.cpp"
3837 break;
3839 case 96: /* opt_truncatable: IDL_TRUNCATABLE */
3840 #line 1333 "fe/idl.ypp"
3842 (yyval.bval) = true;
3844 #line 3845 "fe/idl.tab.cpp"
3845 break;
3847 case 97: /* opt_truncatable: %empty */
3848 #line 1337 "fe/idl.ypp"
3850 (yyval.bval) = false;
3852 #line 3853 "fe/idl.tab.cpp"
3853 break;
3855 case 98: /* supports_spec: IDL_SUPPORTS at_least_one_scoped_name */
3856 #line 1345 "fe/idl.ypp"
3858 (yyval.nlval) = (yyvsp[0].nlval);
3860 #line 3861 "fe/idl.tab.cpp"
3861 break;
3863 case 99: /* supports_spec: %empty */
3864 #line 1349 "fe/idl.ypp"
3866 (yyval.nlval) = 0;
3868 #line 3869 "fe/idl.tab.cpp"
3869 break;
3871 case 100: /* value_forward_decl: IDL_ABSTRACT value_decl */
3872 #line 1357 "fe/idl.ypp"
3874 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3875 UTL_ScopedName n ((yyvsp[0].idval),
3877 AST_ValueTypeFwd *f = 0;
3878 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeForwardSeen);
3881 * Create a node representing a forward declaration of an
3882 * valuetype. Store it in the enclosing scope
3884 if (s != 0)
3886 f = idl_global->gen ()->create_valuetype_fwd (&n,
3887 true);
3888 (void) s->fe_add_valuetype_fwd (f);
3891 (yyvsp[0].idval)->destroy ();
3892 delete (yyvsp[0].idval);
3893 (yyvsp[0].idval) = 0;
3895 #line 3896 "fe/idl.tab.cpp"
3896 break;
3898 case 101: /* value_forward_decl: value_decl */
3899 #line 1381 "fe/idl.ypp"
3901 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3902 UTL_ScopedName n ((yyvsp[0].idval),
3904 AST_ValueTypeFwd *f = 0;
3905 idl_global->set_parse_state (IDL_GlobalData::PS_ValueTypeForwardSeen);
3908 * Create a node representing a forward declaration of an
3909 * valuetype. Store it in the enclosing scope
3911 if (s != 0)
3913 f = idl_global->gen ()->create_valuetype_fwd (&n,
3914 false);
3915 (void) s->fe_add_valuetype_fwd (f);
3918 (yyvsp[0].idval)->destroy ();
3919 delete (yyvsp[0].idval);
3920 (yyvsp[0].idval) = 0;
3922 (yyval.dcval) = 0;
3924 #line 3925 "fe/idl.tab.cpp"
3925 break;
3927 case 102: /* value_box_decl: value_decl type_spec */
3928 #line 1409 "fe/idl.ypp"
3930 idl_global->set_parse_state (IDL_GlobalData::PS_ValueBoxDeclSeen);
3932 UTL_Scope *s = idl_global->scopes ().top_non_null ();
3933 UTL_ScopedName n ((yyvsp[-1].idval),
3936 if (s != 0 && (yyvsp[0].dcval) != 0)
3939 * Get the type_spec associated with the valuebox
3941 AST_Type *tp = 0;
3942 AST_Typedef *td
3943 = dynamic_cast<AST_Typedef*> ((yyvsp[0].dcval));
3945 if (td == 0)
3947 tp = dynamic_cast<AST_Type*> ((yyvsp[0].dcval));
3949 else
3951 tp = td->primitive_base_type ();
3954 if (tp == 0)
3956 // The <type_spec> given is a valid type
3957 idl_global->err ()->not_a_type ((yyvsp[0].dcval));
3959 else
3961 AST_Decl::NodeType nt = tp->node_type ();
3963 if (nt == AST_Decl::NT_valuetype
3964 || nt == AST_Decl::NT_eventtype)
3966 // valuetype is not allowed as <type_spec>
3967 // for boxed value
3968 idl_global->err ()->error0 (
3969 UTL_Error::EIDL_ILLEGAL_BOXED_TYPE
3972 else
3975 * Add the valuebox to its definition scope
3977 AST_ValueBox *vb =
3978 idl_global->gen ()->create_valuebox (&n,
3979 tp);
3980 (void) s->fe_add_valuebox (vb);
3985 (yyvsp[-1].idval)->destroy ();
3986 delete (yyvsp[-1].idval);
3987 (yyvsp[-1].idval) = 0;
3989 (yyval.dcval) = 0;
3991 #line 3992 "fe/idl.tab.cpp"
3992 break;
3994 case 103: /* value_elements: value_elements at_least_one_annotation value_element */
3995 #line 1475 "fe/idl.ypp"
3997 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
3998 AST_Decls *&decls = (yyvsp[0].decls_val);
3999 if (decls)
4001 for (size_t i = 0; i < decls->size (); i++)
4003 (*decls)[i]->annotation_appls (*annotations);
4006 else
4008 idl_global->err ()-> unsupported_warning (
4009 "Annotating this is not supported");
4011 delete annotations;
4012 delete decls;
4014 #line 4015 "fe/idl.tab.cpp"
4015 break;
4017 case 104: /* value_elements: value_elements value_element */
4018 #line 1494 "fe/idl.ypp"
4020 delete (yyvsp[0].decls_val);
4022 #line 4023 "fe/idl.tab.cpp"
4023 break;
4025 case 107: /* value_element: export */
4026 #line 1503 "fe/idl.ypp"
4028 AST_Decl *&node = (yyvsp[0].dcval);
4029 AST_Decls *value = 0;
4030 if (node)
4032 value = new AST_Decls;
4033 value->push_back (node);
4035 (yyval.decls_val) = value;
4037 #line 4038 "fe/idl.tab.cpp"
4038 break;
4040 case 108: /* @42: %empty */
4041 #line 1514 "fe/idl.ypp"
4043 AST_Decl *&node = (yyvsp[0].dcval);
4044 AST_Decls *value = 0;
4045 if (node)
4047 value = new AST_Decls;
4048 value->push_back (node);
4050 (yyval.decls_val) = value;
4052 #line 4053 "fe/idl.tab.cpp"
4053 break;
4055 case 109: /* value_element: init_decl @42 ';' */
4056 #line 1525 "fe/idl.ypp"
4058 (yyval.decls_val) = (yyvsp[-1].decls_val);
4060 #line 4061 "fe/idl.tab.cpp"
4061 break;
4063 case 110: /* visibility: IDL_PUBLIC */
4064 #line 1532 "fe/idl.ypp"
4066 (yyval.vival) = AST_Field::vis_PUBLIC;
4068 #line 4069 "fe/idl.tab.cpp"
4069 break;
4071 case 111: /* visibility: IDL_PRIVATE */
4072 #line 1536 "fe/idl.ypp"
4074 (yyval.vival) = AST_Field::vis_PRIVATE;
4076 #line 4077 "fe/idl.tab.cpp"
4077 break;
4079 case 112: /* state_member: visibility member_i */
4080 #line 1543 "fe/idl.ypp"
4082 AST_Field::Visibility &visibility = (yyvsp[-1].vival);
4083 AST_Decls *&decls_ptr = (yyvsp[0].decls_val);
4084 if (decls_ptr)
4086 AST_Decls &decls = *decls_ptr;
4087 for (size_t i = 0; i < decls.size (); i++)
4089 AST_Field *field = dynamic_cast<AST_Field *> (decls[i]);
4090 if (field)
4092 field->visibility (visibility);
4096 (yyval.decls_val) = decls_ptr;
4098 #line 4099 "fe/idl.tab.cpp"
4099 break;
4101 case 115: /* at_least_one_export: exports at_least_one_annotation export */
4102 #line 1569 "fe/idl.ypp"
4104 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
4105 AST_Decl *d = (yyvsp[0].dcval);
4106 if (d)
4108 d->annotation_appls (*annotations);
4110 else
4112 idl_global->err ()-> unsupported_warning (
4113 "Annotating this is not supported");
4115 delete annotations;
4117 #line 4118 "fe/idl.tab.cpp"
4118 break;
4120 case 117: /* $@43: %empty */
4121 #line 1588 "fe/idl.ypp"
4123 idl_global->set_parse_state (IDL_GlobalData::PS_TypeDeclSeen);
4125 #line 4126 "fe/idl.tab.cpp"
4126 break;
4128 case 118: /* export: type_dcl $@43 ';' */
4129 #line 1592 "fe/idl.ypp"
4131 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4133 #line 4134 "fe/idl.tab.cpp"
4134 break;
4136 case 119: /* $@44: %empty */
4137 #line 1596 "fe/idl.ypp"
4139 idl_global->set_parse_state (IDL_GlobalData::PS_TypeIdDeclSeen);
4141 #line 4142 "fe/idl.tab.cpp"
4142 break;
4144 case 120: /* export: typeid_dcl $@44 ';' */
4145 #line 1600 "fe/idl.ypp"
4147 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4149 #line 4150 "fe/idl.tab.cpp"
4150 break;
4152 case 121: /* $@45: %empty */
4153 #line 1604 "fe/idl.ypp"
4155 idl_global->set_parse_state (IDL_GlobalData::PS_TypePrefixDeclSeen);
4157 #line 4158 "fe/idl.tab.cpp"
4158 break;
4160 case 122: /* export: typeprefix_dcl $@45 ';' */
4161 #line 1608 "fe/idl.ypp"
4163 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4165 #line 4166 "fe/idl.tab.cpp"
4166 break;
4168 case 123: /* $@46: %empty */
4169 #line 1612 "fe/idl.ypp"
4171 idl_global->set_parse_state (IDL_GlobalData::PS_ConstDeclSeen);
4173 #line 4174 "fe/idl.tab.cpp"
4174 break;
4176 case 124: /* export: const_dcl $@46 ';' */
4177 #line 1616 "fe/idl.ypp"
4179 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4181 #line 4182 "fe/idl.tab.cpp"
4182 break;
4184 case 125: /* $@47: %empty */
4185 #line 1620 "fe/idl.ypp"
4187 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptDeclSeen);
4189 #line 4190 "fe/idl.tab.cpp"
4190 break;
4192 case 126: /* export: exception $@47 ';' */
4193 #line 1624 "fe/idl.ypp"
4195 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4197 #line 4198 "fe/idl.tab.cpp"
4198 break;
4200 case 127: /* $@48: %empty */
4201 #line 1628 "fe/idl.ypp"
4203 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
4205 #line 4206 "fe/idl.tab.cpp"
4206 break;
4208 case 128: /* export: attribute $@48 ';' */
4209 #line 1632 "fe/idl.ypp"
4211 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4213 #line 4214 "fe/idl.tab.cpp"
4214 break;
4216 case 129: /* $@49: %empty */
4217 #line 1636 "fe/idl.ypp"
4219 idl_global->set_parse_state (IDL_GlobalData::PS_OpDeclSeen);
4221 #line 4222 "fe/idl.tab.cpp"
4222 break;
4224 case 130: /* export: operation $@49 ';' */
4225 #line 1640 "fe/idl.ypp"
4227 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4229 #line 4230 "fe/idl.tab.cpp"
4230 break;
4232 case 131: /* $@50: %empty */
4233 #line 1644 "fe/idl.ypp"
4235 idl_global->err ()->syntax_error (idl_global->parse_state ());
4237 #line 4238 "fe/idl.tab.cpp"
4238 break;
4240 case 132: /* export: error $@50 ';' */
4241 #line 1648 "fe/idl.ypp"
4243 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
4244 yyerrok;
4245 (yyval.dcval) = 0;
4247 #line 4248 "fe/idl.tab.cpp"
4248 break;
4250 case 133: /* at_least_one_scoped_name: scoped_name scoped_names */
4251 #line 1657 "fe/idl.ypp"
4253 ACE_NEW_RETURN ((yyval.nlval),
4254 UTL_NameList ((yyvsp[-1].idlist),
4255 (yyvsp[0].nlval)),
4258 #line 4259 "fe/idl.tab.cpp"
4259 break;
4261 case 134: /* $@51: %empty */
4262 #line 1668 "fe/idl.ypp"
4264 idl_global->set_parse_state (IDL_GlobalData::PS_SNListCommaSeen);
4266 #line 4267 "fe/idl.tab.cpp"
4267 break;
4269 case 135: /* scoped_names: scoped_names ',' $@51 scoped_name */
4270 #line 1672 "fe/idl.ypp"
4272 idl_global->set_parse_state (IDL_GlobalData::PS_ScopedNameSeen);
4274 UTL_NameList *nl = 0;
4275 ACE_NEW_RETURN (nl,
4276 UTL_NameList ((yyvsp[0].idlist),
4280 if ((yyvsp[-3].nlval) == 0)
4282 (yyval.nlval) = nl;
4284 else
4286 (yyvsp[-3].nlval)->nconc (nl);
4287 (yyval.nlval) = (yyvsp[-3].nlval);
4290 #line 4291 "fe/idl.tab.cpp"
4291 break;
4293 case 136: /* scoped_names: %empty */
4294 #line 1692 "fe/idl.ypp"
4296 (yyval.nlval) = 0;
4298 #line 4299 "fe/idl.tab.cpp"
4299 break;
4301 case 137: /* scoped_name: id */
4302 #line 1699 "fe/idl.ypp"
4304 idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
4306 ACE_NEW_RETURN ((yyval.idlist),
4307 UTL_IdList ((yyvsp[0].idval),
4311 #line 4312 "fe/idl.tab.cpp"
4312 break;
4314 case 138: /* $@52: %empty */
4315 #line 1708 "fe/idl.ypp"
4317 idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
4319 #line 4320 "fe/idl.tab.cpp"
4320 break;
4322 case 139: /* scoped_name: IDL_SCOPE_DELIMITOR $@52 id */
4323 #line 1712 "fe/idl.ypp"
4325 idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
4327 Identifier *id = 0;
4328 ACE_NEW_RETURN (id,
4329 Identifier ((yyvsp[-2].strval)),
4331 ACE::strdelete ((yyvsp[-2].strval));
4332 (yyvsp[-2].strval) = 0;
4333 UTL_IdList *sn = 0;
4334 ACE_NEW_RETURN (sn,
4335 UTL_IdList ((yyvsp[0].idval),
4338 ACE_NEW_RETURN ((yyval.idlist),
4339 UTL_IdList (id,
4340 sn),
4343 #line 4344 "fe/idl.tab.cpp"
4344 break;
4346 case 140: /* $@53: %empty */
4347 #line 1733 "fe/idl.ypp"
4349 idl_global->set_parse_state (IDL_GlobalData::PS_ScopeDelimSeen);
4351 // This cleans up all the non-global "::"s in scoped names.
4352 // If there is a global one, it gets put into the UTL_IdList,
4353 // so we clean it up in the case above.
4354 ACE::strdelete ((yyvsp[0].strval));
4355 (yyvsp[0].strval) = 0;
4357 #line 4358 "fe/idl.tab.cpp"
4358 break;
4360 case 141: /* scoped_name: scoped_name IDL_SCOPE_DELIMITOR $@53 id */
4361 #line 1743 "fe/idl.ypp"
4363 idl_global->set_parse_state (IDL_GlobalData::PS_SN_IDSeen);
4365 UTL_IdList *sn = 0;
4366 ACE_NEW_RETURN (sn,
4367 UTL_IdList ((yyvsp[0].idval),
4370 (yyvsp[-3].idlist)->nconc (sn);
4371 (yyval.idlist) = (yyvsp[-3].idlist);
4373 #line 4374 "fe/idl.tab.cpp"
4374 break;
4376 case 142: /* id: IDENTIFIER */
4377 #line 1757 "fe/idl.ypp"
4379 ACE_NEW_RETURN ((yyval.idval),
4380 Identifier ((yyvsp[0].strval)),
4382 ACE::strdelete ((yyvsp[0].strval));
4383 (yyvsp[0].strval) = 0;
4385 #line 4386 "fe/idl.tab.cpp"
4386 break;
4388 case 143: /* defining_id: IDENTIFIER */
4389 #line 1767 "fe/idl.ypp"
4391 /* defining_id is a defining identifier
4392 whereas id is usually a reference to a defining identifier */
4393 ACE_NEW_RETURN ((yyval.idval), Identifier ((yyvsp[0].strval)), 1);
4394 ACE::strdelete ((yyvsp[0].strval));
4395 (yyvsp[0].strval) = 0;
4397 #line 4398 "fe/idl.tab.cpp"
4398 break;
4400 case 144: /* interface_forward: interface_decl */
4401 #line 1778 "fe/idl.ypp"
4403 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4404 UTL_ScopedName n ((yyvsp[0].idval), 0);
4406 if (ACE_OS::strcmp ((yyvsp[0].idval)->get_string (),
4407 "TypeCode") == 0
4408 && !idl_global->in_main_file ())
4410 AST_PredefinedType *pdt =
4411 idl_global->gen ()->create_predefined_type (
4412 AST_PredefinedType::PT_pseudo,
4416 s->add_to_scope (pdt);
4418 (yyvsp[0].idval)->destroy ();
4419 delete (yyvsp[0].idval);
4420 (yyvsp[0].idval) = 0;
4422 break;
4425 AST_InterfaceFwd *f = 0;
4426 idl_global->set_parse_state (IDL_GlobalData::PS_InterfaceForwardSeen);
4429 * Create a node representing a forward declaration of an
4430 * interface. Store it in the enclosing scope
4432 if (s != 0)
4434 f = idl_global->gen ()->create_interface_fwd (&n,
4437 (void) s->fe_add_interface_fwd (f);
4440 (yyvsp[0].idval)->destroy ();
4441 delete (yyvsp[0].idval);
4442 (yyvsp[0].idval) = 0;
4444 #line 4445 "fe/idl.tab.cpp"
4445 break;
4447 case 145: /* interface_forward: IDL_LOCAL interface_decl */
4448 #line 1822 "fe/idl.ypp"
4450 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4451 UTL_ScopedName n ((yyvsp[0].idval),
4453 AST_InterfaceFwd *f = 0;
4454 idl_global->set_parse_state (
4455 IDL_GlobalData::PS_InterfaceForwardSeen
4459 * Create a node representing a forward declaration of an
4460 * interface. Store it in the enclosing scope
4462 if (s != 0)
4464 f = idl_global->gen ()->create_interface_fwd (&n,
4467 (void) s->fe_add_interface_fwd (f);
4470 (yyvsp[0].idval)->destroy ();
4471 delete (yyvsp[0].idval);
4472 (yyvsp[0].idval) = 0;
4474 #line 4475 "fe/idl.tab.cpp"
4475 break;
4477 case 146: /* interface_forward: IDL_ABSTRACT interface_decl */
4478 #line 1849 "fe/idl.ypp"
4480 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4481 UTL_ScopedName n ((yyvsp[0].idval),
4483 AST_InterfaceFwd *f = 0;
4484 idl_global->set_parse_state (
4485 IDL_GlobalData::PS_InterfaceForwardSeen
4489 * Create a node representing a forward declaration of an
4490 * interface. Store it in the enclosing scope
4492 if (s != 0)
4494 f = idl_global->gen ()->create_interface_fwd (&n,
4497 (void) s->fe_add_interface_fwd (f);
4500 (yyvsp[0].idval)->destroy ();
4501 delete (yyvsp[0].idval);
4502 (yyvsp[0].idval) = 0;
4504 (yyval.dcval) = dynamic_cast<AST_Decl *> (f);
4506 #line 4507 "fe/idl.tab.cpp"
4507 break;
4509 case 147: /* $@54: %empty */
4510 #line 1880 "fe/idl.ypp"
4512 idl_global->set_parse_state (IDL_GlobalData::PS_ConstSeen);
4514 #line 4515 "fe/idl.tab.cpp"
4515 break;
4517 case 148: /* $@55: %empty */
4518 #line 1884 "fe/idl.ypp"
4520 idl_global->set_parse_state (IDL_GlobalData::PS_ConstTypeSeen);
4522 #line 4523 "fe/idl.tab.cpp"
4523 break;
4525 case 149: /* $@56: %empty */
4526 #line 1888 "fe/idl.ypp"
4528 idl_global->set_parse_state (IDL_GlobalData::PS_ConstIDSeen);
4530 #line 4531 "fe/idl.tab.cpp"
4531 break;
4533 case 150: /* $@57: %empty */
4534 #line 1892 "fe/idl.ypp"
4536 idl_global->set_parse_state (IDL_GlobalData::PS_ConstAssignSeen);
4538 #line 4539 "fe/idl.tab.cpp"
4539 break;
4541 case 151: /* const_dcl: IDL_CONST $@54 const_type $@55 defining_id $@56 '=' $@57 expression */
4542 #line 1896 "fe/idl.ypp"
4544 (yyval.dcval) = 0;
4545 UTL_ScopedName n ((yyvsp[-4].idval), 0);
4547 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4548 AST_Constant *c = 0;
4549 idl_global->set_parse_state (IDL_GlobalData::PS_ConstExprSeen);
4552 * Create a node representing a constant declaration. Store
4553 * it in the enclosing scope.
4555 if ((yyvsp[0].exval) != 0 && s != 0)
4557 AST_Param_Holder *param_holder = (yyvsp[0].exval)->param_holder ();
4559 AST_Expression::AST_ExprValue *result =
4560 (yyvsp[0].exval)->check_and_coerce ((yyvsp[-6].etval), tao_enum_constant_decl);
4561 tao_enum_constant_decl = 0;
4563 // If the expression is a template parameter place
4564 // holder, 'result' will be 0, but it's ok.
4565 if (result == 0 && param_holder == 0)
4567 idl_global->err ()->coercion_error ((yyvsp[0].exval), (yyvsp[-6].etval));
4568 (yyvsp[0].exval)->destroy ();
4569 delete (yyvsp[0].exval);
4570 (yyvsp[0].exval) = 0;
4572 else
4574 AST_Expression::ExprType et = (yyvsp[-6].etval);
4576 if (param_holder != 0
4577 && et != param_holder->info ()->const_type_)
4579 idl_global->err ()->mismatched_template_param (
4580 param_holder->info ()->name_.c_str ());
4582 else
4584 c = idl_global->gen ()->create_constant ((yyvsp[-6].etval), (yyvsp[0].exval), &n);
4585 (void) s->fe_add_constant (c);
4586 (yyval.dcval) = c;
4590 delete result;
4591 result = 0;
4594 (yyvsp[-4].idval)->destroy ();
4595 delete (yyvsp[-4].idval);
4596 (yyvsp[-4].idval) = 0;
4598 #line 4599 "fe/idl.tab.cpp"
4599 break;
4601 case 158: /* const_type: string_type_spec */
4602 #line 1961 "fe/idl.ypp"
4604 (yyval.etval) = AST_Expression::EV_string;
4606 #line 4607 "fe/idl.tab.cpp"
4607 break;
4609 case 159: /* const_type: wstring_type_spec */
4610 #line 1965 "fe/idl.ypp"
4612 (yyval.etval) = AST_Expression::EV_wstring;
4614 #line 4615 "fe/idl.tab.cpp"
4615 break;
4617 case 160: /* const_type: scoped_name */
4618 #line 1969 "fe/idl.ypp"
4620 UTL_Scope *s = idl_global->scopes ().top_non_null ();
4621 AST_PredefinedType *c = 0;
4622 AST_Typedef *t = 0;
4623 UTL_ScopedName *sn = (yyvsp[0].idlist);
4626 * If the constant's type is a scoped name, it must resolve
4627 * to a scalar constant type
4629 AST_Decl *d =
4630 s->lookup_by_name (sn);
4632 if (s != 0 && d != 0)
4635 * Look through typedefs.
4637 while (d->node_type () == AST_Decl::NT_typedef)
4639 t = dynamic_cast<AST_Typedef*> (d);
4641 if (t == 0)
4643 break;
4646 d = t->base_type ();
4649 if (d->node_type () == AST_Decl::NT_pre_defined)
4651 c = dynamic_cast<AST_PredefinedType*> (d);
4653 (yyval.etval) = FE_Utils::PredefinedTypeToExprType (c->pt ());
4655 else if (d->node_type () == AST_Decl::NT_string)
4657 (yyval.etval) = AST_Expression::EV_string;
4659 else if (d->node_type () == AST_Decl::NT_wstring)
4661 (yyval.etval) = AST_Expression::EV_wstring;
4663 else if (d->node_type () == AST_Decl::NT_enum)
4665 (yyval.etval) = AST_Expression::EV_enum;
4666 tao_enum_constant_decl =
4667 dynamic_cast<AST_Enum*> (d);
4669 else
4671 idl_global->err ()->constant_expected (sn, d);
4674 else
4676 idl_global->err ()->lookup_error (sn);
4679 sn->destroy ();
4680 delete sn;
4681 sn = 0;
4682 (yyvsp[0].idlist) = 0;
4684 #line 4685 "fe/idl.tab.cpp"
4685 break;
4687 case 164: /* or_expr: or_expr '|' xor_expr */
4688 #line 2042 "fe/idl.ypp"
4690 (yyval.exval) =
4691 idl_global->gen ()->create_expr (
4692 AST_Expression::EC_or,
4693 (yyvsp[-2].exval),
4694 (yyvsp[0].exval)
4697 #line 4698 "fe/idl.tab.cpp"
4698 break;
4700 case 166: /* xor_expr: xor_expr '^' and_expr */
4701 #line 2055 "fe/idl.ypp"
4703 (yyval.exval) =
4704 idl_global->gen ()->create_expr (
4705 AST_Expression::EC_xor,
4706 (yyvsp[-2].exval),
4707 (yyvsp[0].exval)
4710 #line 4711 "fe/idl.tab.cpp"
4711 break;
4713 case 168: /* and_expr: and_expr '&' shift_expr */
4714 #line 2068 "fe/idl.ypp"
4716 (yyval.exval) =
4717 idl_global->gen ()->create_expr (
4718 AST_Expression::EC_and,
4719 (yyvsp[-2].exval),
4720 (yyvsp[0].exval)
4723 #line 4724 "fe/idl.tab.cpp"
4724 break;
4726 case 170: /* shift_expr: shift_expr IDL_LEFT_SHIFT add_expr */
4727 #line 2081 "fe/idl.ypp"
4729 (yyval.exval) =
4730 idl_global->gen ()->create_expr (
4731 AST_Expression::EC_left,
4732 (yyvsp[-2].exval),
4733 (yyvsp[0].exval)
4736 #line 4737 "fe/idl.tab.cpp"
4737 break;
4739 case 171: /* shift_expr: shift_expr IDL_RIGHT_SHIFT add_expr */
4740 #line 2090 "fe/idl.ypp"
4742 (yyval.exval) =
4743 idl_global->gen ()->create_expr (
4744 AST_Expression::EC_right,
4745 (yyvsp[-2].exval),
4746 (yyvsp[0].exval)
4749 #line 4750 "fe/idl.tab.cpp"
4750 break;
4752 case 173: /* add_expr: add_expr '+' mult_expr */
4753 #line 2103 "fe/idl.ypp"
4755 (yyval.exval) =
4756 idl_global->gen ()->create_expr (
4757 AST_Expression::EC_add,
4758 (yyvsp[-2].exval),
4759 (yyvsp[0].exval)
4762 #line 4763 "fe/idl.tab.cpp"
4763 break;
4765 case 174: /* add_expr: add_expr '-' mult_expr */
4766 #line 2112 "fe/idl.ypp"
4768 (yyval.exval) =
4769 idl_global->gen ()->create_expr (
4770 AST_Expression::EC_minus,
4771 (yyvsp[-2].exval),
4772 (yyvsp[0].exval)
4775 #line 4776 "fe/idl.tab.cpp"
4776 break;
4778 case 176: /* mult_expr: mult_expr '*' unary_expr */
4779 #line 2125 "fe/idl.ypp"
4781 (yyval.exval) =
4782 idl_global->gen ()->create_expr (
4783 AST_Expression::EC_mul,
4784 (yyvsp[-2].exval),
4785 (yyvsp[0].exval)
4788 #line 4789 "fe/idl.tab.cpp"
4789 break;
4791 case 177: /* mult_expr: mult_expr '/' unary_expr */
4792 #line 2134 "fe/idl.ypp"
4794 (yyval.exval) =
4795 idl_global->gen ()->create_expr (
4796 AST_Expression::EC_div,
4797 (yyvsp[-2].exval),
4798 (yyvsp[0].exval)
4801 #line 4802 "fe/idl.tab.cpp"
4802 break;
4804 case 178: /* mult_expr: mult_expr '%' unary_expr */
4805 #line 2143 "fe/idl.ypp"
4807 (yyval.exval) =
4808 idl_global->gen ()->create_expr (
4809 AST_Expression::EC_mod,
4810 (yyvsp[-2].exval),
4811 (yyvsp[0].exval)
4814 #line 4815 "fe/idl.tab.cpp"
4815 break;
4817 case 180: /* unary_expr: '+' primary_expr */
4818 #line 2156 "fe/idl.ypp"
4820 (yyval.exval) =
4821 idl_global->gen ()->create_expr (
4822 AST_Expression::EC_u_plus,
4823 (yyvsp[0].exval),
4827 #line 4828 "fe/idl.tab.cpp"
4828 break;
4830 case 181: /* unary_expr: '-' primary_expr */
4831 #line 2165 "fe/idl.ypp"
4833 (yyval.exval) =
4834 idl_global->gen ()->create_expr (
4835 AST_Expression::EC_u_minus,
4836 (yyvsp[0].exval),
4840 #line 4841 "fe/idl.tab.cpp"
4841 break;
4843 case 182: /* unary_expr: '~' primary_expr */
4844 #line 2174 "fe/idl.ypp"
4846 (yyval.exval) =
4847 idl_global->gen ()->create_expr (
4848 AST_Expression::EC_bit_neg,
4849 (yyvsp[0].exval),
4853 #line 4854 "fe/idl.tab.cpp"
4854 break;
4856 case 183: /* primary_expr: scoped_name */
4857 #line 2186 "fe/idl.ypp"
4859 UTL_ScopedName *name = (yyvsp[0].idlist);
4862 * An expression which is a scoped name is not resolved now,
4863 * but only when it is evaluated (such as when it is assigned
4864 * as a constant value).
4866 AST_Expression *expr = 0;
4868 AST_Decl *node = stack_based_lookup_for_primary_expr ?
4869 idl_global->scopes ().lookup_by_name (name) :
4870 idl_global->scopes ().top_non_null ()->lookup_by_name (name);
4871 if (!node)
4873 if (!idl_global->ignore_lookup_errors_)
4875 idl_global->err ()->lookup_error (name);
4876 return 1;
4879 else if (node->node_type () == AST_Decl::NT_const)
4882 * If the scoped name is an IDL constant, it
4883 * may be used in an array dim, a string
4884 * bound, or a sequence bound. If so, it
4885 * must be unsigned and > 0. We assign the
4886 * constant's value and type to the
4887 * expression created here so we can check
4888 * them later.
4890 AST_Constant *c = dynamic_cast<AST_Constant *> (node);
4891 expr = idl_global->gen ()->create_expr (
4892 c->constant_value (),
4893 c->et ());
4895 else
4897 // An AST_Expression owns the scoped name
4898 // passed in this constructor, so we copy it
4899 // and destroy it below no matter which case
4900 // is followed.
4901 expr = idl_global->gen ()->create_expr (name->copy ());
4902 if (node->node_type () == AST_Decl::NT_enum_val)
4904 expr->enum_parent (
4905 dynamic_cast<AST_EnumVal *> (node)->enum_parent ());
4909 (yyval.exval) = expr;
4910 name->destroy ();
4911 delete name;
4912 (yyvsp[0].idlist) = name = 0;
4914 #line 4915 "fe/idl.tab.cpp"
4915 break;
4917 case 185: /* primary_expr: '(' const_expr ')' */
4918 #line 2244 "fe/idl.ypp"
4920 (yyval.exval) = (yyvsp[-1].exval);
4922 #line 4923 "fe/idl.tab.cpp"
4923 break;
4925 case 186: /* literal: IDL_INTEGER_LITERAL */
4926 #line 2251 "fe/idl.ypp"
4928 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].ival));
4930 #line 4931 "fe/idl.tab.cpp"
4931 break;
4933 case 187: /* literal: IDL_UINTEGER_LITERAL */
4934 #line 2255 "fe/idl.ypp"
4936 (yyval.exval) =
4937 idl_global->gen ()->create_expr ((yyvsp[0].uival));
4939 #line 4940 "fe/idl.tab.cpp"
4940 break;
4942 case 188: /* literal: IDL_STRING_LITERAL */
4943 #line 2260 "fe/idl.ypp"
4945 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].sval));
4946 (yyvsp[0].sval)->destroy ();
4947 delete (yyvsp[0].sval);
4948 (yyvsp[0].sval) = 0;
4950 #line 4951 "fe/idl.tab.cpp"
4951 break;
4953 case 189: /* literal: IDL_WSTRING_LITERAL */
4954 #line 2267 "fe/idl.ypp"
4956 char *wide_string = (yyvsp[0].wsval);
4957 (yyval.exval) = idl_global->gen ()->create_expr (wide_string);
4958 ACE_OS::free (wide_string);
4959 (yyvsp[0].wsval) = 0;
4961 #line 4962 "fe/idl.tab.cpp"
4962 break;
4964 case 190: /* literal: IDL_CHARACTER_LITERAL */
4965 #line 2274 "fe/idl.ypp"
4967 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].cval));
4969 #line 4970 "fe/idl.tab.cpp"
4970 break;
4972 case 191: /* literal: IDL_WCHAR_LITERAL */
4973 #line 2278 "fe/idl.ypp"
4975 ACE_OutputCDR::from_wchar wc ((yyvsp[0].wcval));
4976 (yyval.exval) = idl_global->gen ()->create_expr (wc);
4978 #line 4979 "fe/idl.tab.cpp"
4979 break;
4981 case 192: /* literal: IDL_FIXED_PT_LITERAL */
4982 #line 2283 "fe/idl.ypp"
4984 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].fixval));
4986 #line 4987 "fe/idl.tab.cpp"
4987 break;
4989 case 193: /* literal: IDL_FLOATING_PT_LITERAL */
4990 #line 2287 "fe/idl.ypp"
4992 (yyval.exval) = idl_global->gen ()->create_expr ((yyvsp[0].dval));
4994 #line 4995 "fe/idl.tab.cpp"
4995 break;
4997 case 194: /* literal: IDL_TRUETOK */
4998 #line 2291 "fe/idl.ypp"
5000 (yyval.exval) = idl_global->gen ()->create_expr (true);
5002 #line 5003 "fe/idl.tab.cpp"
5003 break;
5005 case 195: /* literal: IDL_FALSETOK */
5006 #line 2295 "fe/idl.ypp"
5008 (yyval.exval) = idl_global->gen ()->create_expr (false);
5010 #line 5011 "fe/idl.tab.cpp"
5011 break;
5013 case 196: /* positive_int_expr: const_expr */
5014 #line 2302 "fe/idl.ypp"
5016 int good_expression = 1;
5017 (yyvsp[0].exval)->evaluate (AST_Expression::EK_positive_int);
5018 AST_Expression::AST_ExprValue *ev = (yyvsp[0].exval)->ev ();
5021 * If const_expr is an enum value (AST_EnumVal inherits from
5022 * AST_Constant), the AST_ExprValue will probably not be set,
5023 * but there's no need to check anyway
5025 if (ev != 0)
5027 switch (ev->et)
5029 case AST_Expression::EV_ushort:
5030 if (ev->u.usval == 0)
5032 good_expression = 0;
5035 break;
5036 case AST_Expression::EV_ulong:
5037 if (ev->u.ulval == 0)
5039 good_expression = 0;
5042 break;
5043 case AST_Expression::EV_ulonglong:
5044 if (ev->u.ullval == 0)
5046 good_expression = 0;
5049 break;
5050 case AST_Expression::EV_octet:
5051 if (ev->u.oval == 0)
5053 good_expression = 0;
5056 break;
5057 case AST_Expression::EV_bool:
5058 if (ev->u.bval == 0)
5060 good_expression = 0;
5063 break;
5064 default:
5065 good_expression = 0;
5066 break;
5070 if (good_expression)
5072 (yyval.exval) = (yyvsp[0].exval);
5074 else
5076 idl_global->err ()->syntax_error (idl_global->parse_state ());
5079 #line 5080 "fe/idl.tab.cpp"
5080 break;
5082 case 197: /* $@58: %empty */
5083 #line 2370 "fe/idl.ypp"
5085 if (idl_global->idl_version_ < IDL_VERSION_4)
5086 idl_global->err ()->idl_version_error (
5087 "Annotations are not allowed in IDL versions before 4");
5089 Identifier *id = (yyvsp[-1].idval);
5090 UTL_ScopedName name (id, 0);
5091 AST_Annotation_Decl::escape_name (&name);
5092 AST_Annotation_Decl *annotation_decl = idl_global->gen ()->
5093 create_annotation_decl (&name);
5094 idl_global->scopes ().top_non_null ()->
5095 fe_add_annotation_decl (annotation_decl);
5096 idl_global->scopes ().push (annotation_decl);
5098 #line 5099 "fe/idl.tab.cpp"
5099 break;
5101 case 198: /* annotation_dcl: IDL_ANNOTATION_DECL defining_id '{' $@58 annotation_body '}' */
5102 #line 2385 "fe/idl.ypp"
5104 Identifier *id = (yyvsp[-4].idval);
5105 idl_global->scopes ().pop ();
5106 id->destroy ();
5107 delete id;
5109 (yyval.dcval) = 0;
5111 #line 5112 "fe/idl.tab.cpp"
5112 break;
5114 case 204: /* $@59: %empty */
5115 #line 2405 "fe/idl.ypp"
5117 idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
5118 idl_global->in_typedef (true);
5120 #line 5121 "fe/idl.tab.cpp"
5121 break;
5123 case 208: /* annotation_member: annotation_member_type defining_id annotation_member_default ';' */
5124 #line 2419 "fe/idl.ypp"
5126 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
5127 UTL_Scope *root = idl_global->scopes ().bottom ();
5129 AST_Expression::ExprType type = (yyvsp[-3].etval);
5130 Identifier *name = (yyvsp[-2].idval);
5131 // Annotation member names can't clash with C++ keywords
5132 FE_Utils::original_local_name (name);
5133 UTL_ScopedName *scoped_name = new UTL_ScopedName (name, 0);
5134 AST_Expression *default_value = (yyvsp[-1].exval);
5136 AST_Decl * type_obj;
5137 switch (type)
5139 case AST_Expression::EV_string:
5140 case AST_Expression::EV_wstring:
5141 type_obj = tao_string_decl;
5142 break;
5143 case AST_Expression::EV_enum:
5144 type_obj = tao_enum_constant_decl;
5145 break;
5146 default:
5147 type_obj = root->lookup_primitive_type (type);
5150 FE_Declarator *declarator = new FE_Declarator (
5151 scoped_name, FE_Declarator::FD_simple, 0);
5152 AST_Annotation_Member *member = idl_global->gen ()->
5153 create_annotation_member (
5154 type, declarator->compose (type_obj), declarator->name ());
5155 scope->fe_add_annotation_member (member);
5157 declarator->destroy ();
5158 delete declarator;
5160 if (default_value)
5162 // Check if types are compatible, else report error
5163 AST_Expression::AST_ExprValue *result =
5164 default_value->check_and_coerce (type, tao_enum_constant_decl);
5165 tao_enum_constant_decl = 0;
5166 if (result)
5168 member->value (default_value);
5170 else
5172 idl_global->err ()->coercion_error (default_value, type);
5174 delete result;
5177 #line 5178 "fe/idl.tab.cpp"
5178 break;
5180 case 209: /* annotation_member_default: IDL_DEFAULT const_expr */
5181 #line 2475 "fe/idl.ypp"
5183 (yyval.exval) = (yyvsp[0].exval);
5185 #line 5186 "fe/idl.tab.cpp"
5186 break;
5188 case 210: /* annotation_member_default: %empty */
5189 #line 2479 "fe/idl.ypp"
5191 (yyval.exval) = 0;
5193 #line 5194 "fe/idl.tab.cpp"
5194 break;
5196 case 211: /* at_least_one_annotation: annotations_maybe annotation_appl */
5197 #line 2486 "fe/idl.ypp"
5199 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
5200 AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val);
5201 if (annotation)
5203 annotations->add (annotation);
5205 (yyval.annotations_val) = annotations;
5207 #line 5208 "fe/idl.tab.cpp"
5208 break;
5210 case 212: /* annotations_maybe: annotations_maybe annotation_appl */
5211 #line 2499 "fe/idl.ypp"
5213 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
5214 AST_Annotation_Appl *annotation = (yyvsp[0].annotation_val);
5215 if (annotation)
5217 annotations->add (annotation);
5219 (yyval.annotations_val) = annotations;
5221 #line 5222 "fe/idl.tab.cpp"
5222 break;
5224 case 213: /* annotations_maybe: %empty */
5225 #line 2509 "fe/idl.ypp"
5227 (yyval.annotations_val) = new AST_Annotation_Appls ();
5229 #line 5230 "fe/idl.tab.cpp"
5230 break;
5232 case 214: /* @60: %empty */
5233 #line 2516 "fe/idl.ypp"
5235 if (idl_global->idl_version_ < IDL_VERSION_4)
5236 idl_global->err ()->idl_version_error (
5237 "Annotations are not allowed in IDL versions before 4");
5239 AST_Annotation_Decl *decl = 0;
5240 UTL_ScopedName *name = (yyvsp[0].idlist);
5241 AST_Annotation_Decl::escape_name (name);
5243 // Check for Matching Annotation Declaration
5244 AST_Decl *d = idl_global->scopes ().top_non_null ()->
5245 lookup_by_name (name);
5246 if (d)
5248 decl = dynamic_cast<AST_Annotation_Decl*> (d);
5249 if (decl)
5251 idl_global->scopes ().push (decl);
5254 else
5256 Identifier &id = *name->last_component ();
5257 switch (idl_global->unknown_annotations_)
5259 default:
5260 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ONCE:
5261 if (idl_global->unknown_annotations_seen_.insert (id) == 1)
5263 break;
5265 idl_global->err ()->lookup_warning (name);
5266 break;
5267 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_WARN_ALL:
5268 idl_global->err ()->lookup_warning (name);
5269 break;
5270 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_ERROR:
5271 idl_global->err ()->lookup_error (name);
5272 break;
5273 case IDL_GlobalData::UNKNOWN_ANNOTATIONS_IGNORE:
5274 break;
5278 * Ignore lookup errors for parameter values that might depend on
5279 * constants or enums from the missing annotation declaration.
5281 idl_global->ignore_lookup_errors_ = true;
5284 stack_based_lookup_for_primary_expr = true;
5286 (yyval.annotation_decl_val) = decl;
5288 #line 5289 "fe/idl.tab.cpp"
5289 break;
5291 case 215: /* annotation_appl: IDL_ANNOTATION_SYMBOL scoped_name @60 annotation_appl_params_maybe */
5292 #line 2571 "fe/idl.ypp"
5294 idl_global->ignore_lookup_errors_ = false;
5295 stack_based_lookup_for_primary_expr = false;
5296 AST_Annotation_Appl *appl = 0;
5297 UTL_ScopedName *name = (yyvsp[-2].idlist);
5298 AST_Annotation_Decl *decl = (yyvsp[-1].annotation_decl_val);
5299 AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
5301 if (decl)
5303 appl = idl_global->gen ()->create_annotation_appl (name, params);
5304 appl->apply_from (decl);
5305 idl_global->scopes ().pop ();
5307 else
5309 AST_Annotation_Appl::delete_params (params);
5312 if (name)
5314 name->destroy ();
5315 delete name;
5318 (yyval.annotation_val) = appl;
5320 #line 5321 "fe/idl.tab.cpp"
5321 break;
5323 case 216: /* annotation_appl_params_maybe: '(' annotation_appl_params ')' */
5324 #line 2602 "fe/idl.ypp"
5326 (yyval.annotation_params_val) = (yyvsp[-1].annotation_params_val);
5328 #line 5329 "fe/idl.tab.cpp"
5329 break;
5331 case 217: /* annotation_appl_params_maybe: %empty */
5332 #line 2606 "fe/idl.ypp"
5334 (yyval.annotation_params_val) = 0;
5336 #line 5337 "fe/idl.tab.cpp"
5337 break;
5339 case 218: /* annotation_appl_params: const_expr */
5340 #line 2613 "fe/idl.ypp"
5342 AST_Annotation_Appl::Params *params = new AST_Annotation_Appl::Params;
5343 AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
5344 param->id = 0;
5345 param->expr = (yyvsp[0].exval);
5346 params->push (param);
5347 (yyval.annotation_params_val) = params;
5349 #line 5350 "fe/idl.tab.cpp"
5350 break;
5352 case 219: /* annotation_appl_params: named_annotation_appl_params */
5353 #line 2622 "fe/idl.ypp"
5355 (yyval.annotation_params_val) = (yyvsp[0].annotation_params_val);
5357 #line 5358 "fe/idl.tab.cpp"
5358 break;
5360 case 220: /* annotation_appl_params: %empty */
5361 #line 2626 "fe/idl.ypp"
5363 (yyval.annotation_params_val) = 0;
5365 #line 5366 "fe/idl.tab.cpp"
5366 break;
5368 case 221: /* named_annotation_appl_params: named_annotation_appl_param more_named_annotation_appl_params */
5369 #line 2633 "fe/idl.ypp"
5371 AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
5372 params->push ((yyvsp[-1].annotation_param_val));
5373 (yyval.annotation_params_val) = params;
5375 #line 5376 "fe/idl.tab.cpp"
5376 break;
5378 case 222: /* more_named_annotation_appl_params: ',' named_annotation_appl_param more_named_annotation_appl_params */
5379 #line 2641 "fe/idl.ypp"
5381 AST_Annotation_Appl::Params *params = (yyvsp[0].annotation_params_val);
5382 params->push ((yyvsp[-1].annotation_param_val));
5383 (yyval.annotation_params_val) = params;
5385 #line 5386 "fe/idl.tab.cpp"
5386 break;
5388 case 223: /* more_named_annotation_appl_params: %empty */
5389 #line 2647 "fe/idl.ypp"
5391 (yyval.annotation_params_val) = new AST_Annotation_Appl::Params;
5393 #line 5394 "fe/idl.tab.cpp"
5394 break;
5396 case 224: /* named_annotation_appl_param: id '=' const_expr */
5397 #line 2654 "fe/idl.ypp"
5399 AST_Annotation_Appl::Param *param = new AST_Annotation_Appl::Param;
5400 param->id = (yyvsp[-2].idval);
5401 // Annotation Member Names Can't Clash with C++ keywords
5402 FE_Utils::original_local_name (param->id);
5403 param->expr = (yyvsp[0].exval);
5404 (yyval.annotation_param_val) = param;
5406 #line 5407 "fe/idl.tab.cpp"
5407 break;
5409 case 225: /* $@61: %empty */
5410 #line 2666 "fe/idl.ypp"
5412 idl_global->set_parse_state (IDL_GlobalData::PS_TypedefSeen);
5413 idl_global->in_typedef (true);
5415 #line 5416 "fe/idl.tab.cpp"
5416 break;
5418 case 226: /* type_dcl: IDL_TYPEDEF $@61 type_declarator */
5419 #line 2671 "fe/idl.ypp"
5421 (yyval.dcval) = (yyvsp[0].dcval);
5423 #line 5424 "fe/idl.tab.cpp"
5424 break;
5426 case 227: /* type_dcl: struct_type */
5427 #line 2675 "fe/idl.ypp"
5429 (yyval.dcval) = (yyvsp[0].dcval);
5431 #line 5432 "fe/idl.tab.cpp"
5432 break;
5434 case 228: /* type_dcl: union_type */
5435 #line 2679 "fe/idl.ypp"
5437 (yyval.dcval) = (yyvsp[0].dcval);
5439 #line 5440 "fe/idl.tab.cpp"
5440 break;
5442 case 229: /* type_dcl: enum_type */
5443 #line 2683 "fe/idl.ypp"
5445 (yyval.dcval) = (yyvsp[0].dcval);
5447 #line 5448 "fe/idl.tab.cpp"
5448 break;
5450 case 230: /* type_dcl: IDL_NATIVE simple_declarator */
5451 #line 2687 "fe/idl.ypp"
5453 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5454 AST_Native *node = 0;
5455 idl_global->set_parse_state (IDL_GlobalData::PS_NativeSeen);
5458 * Create a node representing a Native and add it to its
5459 * enclosing scope
5461 if (s != 0)
5463 node =
5464 idl_global->gen ()->create_native (
5465 (yyvsp[0].deval)->name ()
5468 * Add it to its defining scope
5470 (void) s->fe_add_native (node);
5473 (yyvsp[0].deval)->destroy ();
5474 delete (yyvsp[0].deval);
5475 (yyvsp[0].deval) = 0;
5477 (yyval.dcval) = 0;
5479 #line 5480 "fe/idl.tab.cpp"
5480 break;
5482 case 231: /* type_dcl: constructed_forward_type_spec */
5483 #line 2715 "fe/idl.ypp"
5485 (yyval.dcval) = 0;
5487 #line 5488 "fe/idl.tab.cpp"
5488 break;
5490 case 232: /* $@62: %empty */
5491 #line 2722 "fe/idl.ypp"
5493 idl_global->set_parse_state (IDL_GlobalData::PS_TypeSpecSeen);
5495 #line 5496 "fe/idl.tab.cpp"
5496 break;
5498 case 233: /* type_declarator: type_spec $@62 at_least_one_declarator */
5499 #line 2726 "fe/idl.ypp"
5501 AST_Decl *type_spec = (yyvsp[-2].dcval);
5502 UTL_DeclList *decls = (yyvsp[0].dlval);
5504 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5505 FE_Declarator *d = 0;
5506 AST_Typedef *t = 0;
5507 unsigned long index = 0UL;
5508 idl_global->set_parse_state (IDL_GlobalData::PS_DeclaratorsSeen);
5511 * Create a list of type renamings. Add them to the
5512 * enclosing scope
5514 if (s && type_spec && decls)
5516 for (UTL_DecllistActiveIterator l (decls); !l.is_done (); l.next ())
5518 d = l.item ();
5519 if (d == 0)
5521 continue;
5524 AST_Type *tp = d->compose (type_spec);
5525 if (tp == 0)
5527 continue;
5530 if (AST_Decl::NT_except == tp->node_type ())
5532 idl_global->err ()->not_a_type (tp);
5533 continue;
5536 t = idl_global->gen ()->create_typedef (tp,
5537 d->name (),
5538 s->is_local (),
5539 s->is_abstract ());
5541 // If the base type is a sequence or array, the typedef
5542 // constructor sets owns_base_type_ to true. But if
5543 // there is a comma-separated list of such typedefs,
5544 // the base type can be destroyed only once. In all
5545 // other cases, the line below has no effect.
5546 if (index++ > 0)
5548 t->owns_base_type (false);
5551 (void) s->fe_add_typedef (t);
5552 idl_global->in_typedef (false);
5555 // This FE_Declarator class isn't destroyed with the AST.
5556 decls->destroy ();
5557 delete decls;
5558 (yyvsp[0].dlval) = decls = 0;
5561 (yyval.dcval) = t;
5563 #line 5564 "fe/idl.tab.cpp"
5564 break;
5566 case 236: /* simple_type_spec: base_type_spec */
5567 #line 2798 "fe/idl.ypp"
5569 (yyval.dcval) =
5570 idl_global->scopes ().bottom ()->lookup_primitive_type (
5571 (yyvsp[0].etval)
5574 #line 5575 "fe/idl.tab.cpp"
5575 break;
5577 case 238: /* simple_type_spec: scoped_name */
5578 #line 2806 "fe/idl.ypp"
5580 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5581 AST_Decl *d = 0;
5583 if (s != 0)
5586 s->lookup_by_name ((yyvsp[0].idlist));
5589 if (d == 0)
5591 idl_global->err ()->lookup_error ((yyvsp[0].idlist));
5593 else
5595 d->last_referenced_as ((yyvsp[0].idlist));
5599 (yyval.dcval) = d;
5601 #line 5602 "fe/idl.tab.cpp"
5602 break;
5604 case 257: /* at_least_one_declarator: declarator declarators */
5605 #line 2862 "fe/idl.ypp"
5607 ACE_NEW_RETURN ((yyval.dlval),
5608 UTL_DeclList ((yyvsp[-1].deval),
5609 (yyvsp[0].dlval)),
5612 #line 5613 "fe/idl.tab.cpp"
5613 break;
5615 case 258: /* $@63: %empty */
5616 #line 2873 "fe/idl.ypp"
5618 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
5620 #line 5621 "fe/idl.tab.cpp"
5621 break;
5623 case 259: /* declarators: declarators ',' $@63 declarator */
5624 #line 2877 "fe/idl.ypp"
5626 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
5628 UTL_DeclList *dl = 0;
5629 ACE_NEW_RETURN (dl,
5630 UTL_DeclList ((yyvsp[0].deval),
5634 if ((yyvsp[-3].dlval) == 0)
5636 (yyval.dlval) = dl;
5638 else
5640 (yyvsp[-3].dlval)->nconc (dl);
5641 (yyval.dlval) = (yyvsp[-3].dlval);
5644 #line 5645 "fe/idl.tab.cpp"
5645 break;
5647 case 260: /* declarators: %empty */
5648 #line 2897 "fe/idl.ypp"
5650 (yyval.dlval) = 0;
5652 #line 5653 "fe/idl.tab.cpp"
5653 break;
5655 case 263: /* at_least_one_simple_declarator: simple_declarator simple_declarators */
5656 #line 2909 "fe/idl.ypp"
5658 ACE_NEW_RETURN ((yyval.dlval),
5659 UTL_DeclList ((yyvsp[-1].deval),
5660 (yyvsp[0].dlval)),
5663 #line 5664 "fe/idl.tab.cpp"
5664 break;
5666 case 264: /* $@64: %empty */
5667 #line 2920 "fe/idl.ypp"
5669 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsCommaSeen);
5671 #line 5672 "fe/idl.tab.cpp"
5672 break;
5674 case 265: /* simple_declarators: simple_declarators ',' $@64 simple_declarator */
5675 #line 2924 "fe/idl.ypp"
5677 idl_global->set_parse_state (IDL_GlobalData::PS_DeclsDeclSeen);
5679 UTL_DeclList *dl = 0;
5680 ACE_NEW_RETURN (dl,
5681 UTL_DeclList ((yyvsp[0].deval),
5685 if ((yyvsp[-3].dlval) == 0)
5687 (yyval.dlval) = dl;
5689 else
5691 (yyvsp[-3].dlval)->nconc (dl);
5692 (yyval.dlval) = (yyvsp[-3].dlval);
5695 #line 5696 "fe/idl.tab.cpp"
5696 break;
5698 case 266: /* simple_declarators: %empty */
5699 #line 2944 "fe/idl.ypp"
5701 (yyval.dlval) = 0;
5703 #line 5704 "fe/idl.tab.cpp"
5704 break;
5706 case 267: /* simple_declarator: defining_id */
5707 #line 2951 "fe/idl.ypp"
5709 UTL_ScopedName *sn = 0;
5710 ACE_NEW_RETURN (sn,
5711 UTL_ScopedName ((yyvsp[0].idval),
5714 ACE_NEW_RETURN ((yyval.deval),
5715 FE_Declarator (sn,
5716 FE_Declarator::FD_simple,
5720 #line 5721 "fe/idl.tab.cpp"
5721 break;
5723 case 268: /* complex_declarator: array_declarator */
5724 #line 2967 "fe/idl.ypp"
5726 UTL_ScopedName *sn = 0;
5727 ACE_NEW_RETURN (sn,
5728 UTL_ScopedName (
5729 (yyvsp[0].dcval)->local_name ()->copy (),
5733 ACE_NEW_RETURN ((yyval.deval),
5734 FE_Declarator (sn,
5735 FE_Declarator::FD_complex,
5736 (yyvsp[0].dcval)),
5739 #line 5740 "fe/idl.tab.cpp"
5740 break;
5742 case 271: /* signed_int: IDL_LONG */
5743 #line 2990 "fe/idl.ypp"
5745 (yyval.etval) = AST_Expression::EV_long;
5747 #line 5748 "fe/idl.tab.cpp"
5748 break;
5750 case 272: /* signed_int: IDL_LONG IDL_LONG */
5751 #line 2994 "fe/idl.ypp"
5753 (yyval.etval) = AST_Expression::EV_longlong;
5755 #line 5756 "fe/idl.tab.cpp"
5756 break;
5758 case 273: /* signed_int: IDL_SHORT */
5759 #line 2998 "fe/idl.ypp"
5761 (yyval.etval) = AST_Expression::EV_short;
5763 #line 5764 "fe/idl.tab.cpp"
5764 break;
5766 case 274: /* signed_int: IDL_INT8 */
5767 #line 3002 "fe/idl.ypp"
5769 (yyval.etval) = AST_Expression::EV_int8;
5771 #line 5772 "fe/idl.tab.cpp"
5772 break;
5774 case 275: /* signed_int: IDL_INT16 */
5775 #line 3006 "fe/idl.ypp"
5777 (yyval.etval) = AST_Expression::EV_short;
5779 #line 5780 "fe/idl.tab.cpp"
5780 break;
5782 case 276: /* signed_int: IDL_INT32 */
5783 #line 3010 "fe/idl.ypp"
5785 (yyval.etval) = AST_Expression::EV_long;
5787 #line 5788 "fe/idl.tab.cpp"
5788 break;
5790 case 277: /* signed_int: IDL_INT64 */
5791 #line 3014 "fe/idl.ypp"
5793 (yyval.etval) = AST_Expression::EV_longlong;
5795 #line 5796 "fe/idl.tab.cpp"
5796 break;
5798 case 278: /* unsigned_int: IDL_UNSIGNED IDL_LONG */
5799 #line 3021 "fe/idl.ypp"
5801 (yyval.etval) = AST_Expression::EV_ulong;
5803 #line 5804 "fe/idl.tab.cpp"
5804 break;
5806 case 279: /* unsigned_int: IDL_UNSIGNED IDL_LONG IDL_LONG */
5807 #line 3025 "fe/idl.ypp"
5809 (yyval.etval) = AST_Expression::EV_ulonglong;
5811 #line 5812 "fe/idl.tab.cpp"
5812 break;
5814 case 280: /* unsigned_int: IDL_UNSIGNED IDL_SHORT */
5815 #line 3029 "fe/idl.ypp"
5817 (yyval.etval) = AST_Expression::EV_ushort;
5819 #line 5820 "fe/idl.tab.cpp"
5820 break;
5822 case 281: /* unsigned_int: IDL_UINT8 */
5823 #line 3033 "fe/idl.ypp"
5825 (yyval.etval) = AST_Expression::EV_uint8;
5827 #line 5828 "fe/idl.tab.cpp"
5828 break;
5830 case 282: /* unsigned_int: IDL_UINT16 */
5831 #line 3037 "fe/idl.ypp"
5833 (yyval.etval) = AST_Expression::EV_ushort;
5835 #line 5836 "fe/idl.tab.cpp"
5836 break;
5838 case 283: /* unsigned_int: IDL_UINT32 */
5839 #line 3041 "fe/idl.ypp"
5841 (yyval.etval) = AST_Expression::EV_ulong;
5843 #line 5844 "fe/idl.tab.cpp"
5844 break;
5846 case 284: /* unsigned_int: IDL_UINT64 */
5847 #line 3045 "fe/idl.ypp"
5849 (yyval.etval) = AST_Expression::EV_ulonglong;
5851 #line 5852 "fe/idl.tab.cpp"
5852 break;
5854 case 285: /* floating_pt_type: IDL_DOUBLE */
5855 #line 3052 "fe/idl.ypp"
5857 (yyval.etval) = AST_Expression::EV_double;
5859 #line 5860 "fe/idl.tab.cpp"
5860 break;
5862 case 286: /* floating_pt_type: IDL_FLOAT */
5863 #line 3056 "fe/idl.ypp"
5865 (yyval.etval) = AST_Expression::EV_float;
5867 #line 5868 "fe/idl.tab.cpp"
5868 break;
5870 case 287: /* floating_pt_type: IDL_LONG IDL_DOUBLE */
5871 #line 3060 "fe/idl.ypp"
5873 (yyval.etval) = AST_Expression::EV_longdouble;
5875 #line 5876 "fe/idl.tab.cpp"
5876 break;
5878 case 288: /* fixed_type: IDL_FIXED */
5879 #line 3067 "fe/idl.ypp"
5881 (yyval.etval) = AST_Expression::EV_fixed;
5883 #line 5884 "fe/idl.tab.cpp"
5884 break;
5886 case 289: /* char_type: IDL_CHAR */
5887 #line 3074 "fe/idl.ypp"
5889 (yyval.etval) = AST_Expression::EV_char;
5891 #line 5892 "fe/idl.tab.cpp"
5892 break;
5894 case 290: /* char_type: IDL_WCHAR */
5895 #line 3078 "fe/idl.ypp"
5897 (yyval.etval) = AST_Expression::EV_wchar;
5899 #line 5900 "fe/idl.tab.cpp"
5900 break;
5902 case 291: /* octet_type: IDL_OCTET */
5903 #line 3085 "fe/idl.ypp"
5905 (yyval.etval) = AST_Expression::EV_octet;
5907 #line 5908 "fe/idl.tab.cpp"
5908 break;
5910 case 292: /* boolean_type: IDL_BOOLEAN */
5911 #line 3092 "fe/idl.ypp"
5913 (yyval.etval) = AST_Expression::EV_bool;
5915 #line 5916 "fe/idl.tab.cpp"
5916 break;
5918 case 293: /* any_type: IDL_ANY */
5919 #line 3099 "fe/idl.ypp"
5921 (yyval.etval) = AST_Expression::EV_any;
5923 #line 5924 "fe/idl.tab.cpp"
5924 break;
5926 case 294: /* object_type: IDL_OBJECT */
5927 #line 3106 "fe/idl.ypp"
5929 (yyval.etval) = AST_Expression::EV_object;
5931 #line 5932 "fe/idl.tab.cpp"
5932 break;
5934 case 295: /* $@65: %empty */
5935 #line 3113 "fe/idl.ypp"
5937 idl_global->set_parse_state (IDL_GlobalData::PS_StructSeen);
5939 #line 5940 "fe/idl.tab.cpp"
5940 break;
5942 case 296: /* struct_decl: IDL_STRUCT $@65 defining_id */
5943 #line 3117 "fe/idl.ypp"
5945 idl_global->set_parse_state (IDL_GlobalData::PS_StructIDSeen);
5946 (yyval.idval) = (yyvsp[0].idval);
5948 #line 5949 "fe/idl.tab.cpp"
5949 break;
5951 case 297: /* $@66: %empty */
5952 #line 3126 "fe/idl.ypp"
5954 UTL_Scope *s = idl_global->scopes ().top_non_null ();
5955 UTL_ScopedName n ((yyvsp[0].idval), 0);
5956 AST_Structure *d = 0;
5959 * Create a node representing a struct declaration. Add it
5960 * to the enclosing scope
5962 if (s != 0)
5965 idl_global->gen ()->create_structure (
5967 s->is_local (),
5968 s->is_abstract ()
5970 AST_Structure::fwd_redefinition_helper (d, s);
5971 (void) s->fe_add_structure (d);
5975 * Push the scope of the struct on the scopes stack.
5977 idl_global->scopes ().push (d);
5979 (yyvsp[0].idval)->destroy ();
5980 delete (yyvsp[0].idval);
5981 (yyvsp[0].idval) = 0;
5983 #line 5984 "fe/idl.tab.cpp"
5984 break;
5986 case 298: /* $@67: %empty */
5987 #line 3157 "fe/idl.ypp"
5989 idl_global->set_parse_state (IDL_GlobalData::PS_StructSqSeen);
5991 #line 5992 "fe/idl.tab.cpp"
5992 break;
5994 case 299: /* struct_type: struct_decl $@66 '{' $@67 struct_body */
5995 #line 3161 "fe/idl.ypp"
5998 * Done with this struct. Pop its scope off the scopes stack.
6000 (yyval.dcval) = dynamic_cast<AST_Structure*> (
6001 idl_global->scopes ().top_non_null ()
6003 idl_global->scopes ().pop ();
6005 #line 6006 "fe/idl.tab.cpp"
6006 break;
6008 case 300: /* struct_body: '}' */
6009 #line 3174 "fe/idl.ypp"
6011 if (idl_global->idl_version_ < IDL_VERSION_4)
6012 idl_global->err ()->idl_version_error (
6013 "Empty structs are not allowed in IDL versions before 4");
6015 idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
6017 #line 6018 "fe/idl.tab.cpp"
6018 break;
6020 case 302: /* $@68: %empty */
6021 #line 3186 "fe/idl.ypp"
6023 idl_global->set_parse_state (IDL_GlobalData::PS_StructBodySeen);
6025 #line 6026 "fe/idl.tab.cpp"
6026 break;
6028 case 303: /* struct_body_with_members: member members $@68 '}' */
6029 #line 3190 "fe/idl.ypp"
6031 idl_global->set_parse_state (IDL_GlobalData::PS_StructQsSeen);
6033 #line 6034 "fe/idl.tab.cpp"
6034 break;
6036 case 306: /* member: annotations_maybe member_i */
6037 #line 3202 "fe/idl.ypp"
6039 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
6040 AST_Decls *members = (yyvsp[0].decls_val);
6041 if (annotations && members)
6043 for (size_t i = 0; i < members->size (); i++)
6045 (*members)[i]->annotation_appls (*annotations);
6048 delete annotations;
6049 delete members;
6051 #line 6052 "fe/idl.tab.cpp"
6052 break;
6054 case 307: /* $@69: %empty */
6055 #line 3219 "fe/idl.ypp"
6057 idl_global->set_parse_state (IDL_GlobalData::PS_MemberTypeSeen);
6059 #line 6060 "fe/idl.tab.cpp"
6060 break;
6062 case 308: /* $@70: %empty */
6063 #line 3223 "fe/idl.ypp"
6065 idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsSeen);
6067 #line 6068 "fe/idl.tab.cpp"
6068 break;
6070 case 309: /* member_i: type_spec $@69 at_least_one_declarator $@70 ';' */
6071 #line 3227 "fe/idl.ypp"
6073 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6074 FE_Declarator *d = 0;
6075 AST_Field *f = 0;
6076 idl_global->set_parse_state (IDL_GlobalData::PS_MemberDeclsCompleted);
6077 AST_Decls *members = 0;
6080 * Check for illegal recursive use of type.
6082 if ((yyvsp[-4].dcval) != 0
6083 && AST_illegal_recursive_type ((yyvsp[-4].dcval)))
6085 idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE,
6086 (yyvsp[-4].dcval));
6089 * Create a node representing a struct or exception member
6090 * Add it to the enclosing scope.
6092 else if (s && (yyvsp[-4].dcval) && (yyvsp[-2].dlval))
6094 members = new AST_Decls;
6095 for (UTL_DecllistActiveIterator l ((yyvsp[-2].dlval));
6096 !l.is_done ();
6097 l.next ())
6099 d = l.item ();
6101 if (d == 0)
6103 continue;
6106 AST_Type *tp = d->compose ((yyvsp[-4].dcval));
6108 if (tp == 0)
6110 continue;
6113 f = idl_global->gen ()->create_field (tp, d->name ());
6114 members->push_back (f);
6115 (void) s->fe_add_field (f);
6119 (yyvsp[-2].dlval)->destroy ();
6120 delete (yyvsp[-2].dlval);
6121 (yyvsp[-2].dlval) = 0;
6123 (yyval.decls_val) = members;
6125 #line 6126 "fe/idl.tab.cpp"
6126 break;
6128 case 310: /* $@71: %empty */
6129 #line 3281 "fe/idl.ypp"
6131 idl_global->err ()->syntax_error (idl_global->parse_state ());
6133 #line 6134 "fe/idl.tab.cpp"
6134 break;
6136 case 311: /* member_i: error $@71 ';' */
6137 #line 3285 "fe/idl.ypp"
6139 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
6140 yyerrok;
6142 #line 6143 "fe/idl.tab.cpp"
6143 break;
6145 case 312: /* $@72: %empty */
6146 #line 3293 "fe/idl.ypp"
6148 idl_global->set_parse_state (IDL_GlobalData::PS_UnionSeen);
6150 #line 6151 "fe/idl.tab.cpp"
6151 break;
6153 case 313: /* union_decl: IDL_UNION $@72 defining_id */
6154 #line 3297 "fe/idl.ypp"
6156 idl_global->set_parse_state (IDL_GlobalData::PS_UnionIDSeen);
6157 (yyval.idval) = (yyvsp[0].idval);
6159 #line 6160 "fe/idl.tab.cpp"
6160 break;
6162 case 314: /* $@73: %empty */
6163 #line 3305 "fe/idl.ypp"
6165 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchSeen);
6167 #line 6168 "fe/idl.tab.cpp"
6168 break;
6170 case 315: /* $@74: %empty */
6171 #line 3309 "fe/idl.ypp"
6173 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6174 UTL_ScopedName n ((yyvsp[-3].idval), 0);
6175 AST_Union *u = 0;
6176 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchOpenParSeen);
6179 * Create a node representing an empty union. Add it to its enclosing
6180 * scope.
6182 if (s != 0)
6184 u = idl_global->gen ()->create_union (0,
6186 s->is_local (),
6187 s->is_abstract ());
6189 AST_Structure *st = dynamic_cast<AST_Structure*> (u);
6190 AST_Structure::fwd_redefinition_helper (st, s);
6191 u = dynamic_cast<AST_Union*> (st);
6192 (void) s->fe_add_union (u);
6196 * Push the scope of the union on the scopes stack
6198 idl_global->scopes ().push (u);
6201 * Don't delete $1 yet; we'll need it a bit later.
6204 #line 6205 "fe/idl.tab.cpp"
6205 break;
6207 case 316: /* $@75: %empty */
6208 #line 3342 "fe/idl.ypp"
6210 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchTypeSeen);
6212 #line 6213 "fe/idl.tab.cpp"
6213 break;
6215 case 317: /* $@76: %empty */
6216 #line 3346 "fe/idl.ypp"
6219 * The top of the scopes must be an empty union we added after we
6220 * encountered 'union <id> switch ('. Now we are ready to add a
6221 * correct one. Temporarily remove the top so that we setup the
6222 * correct union in a right scope.
6224 UTL_Scope *top = idl_global->scopes ().top_non_null ();
6225 idl_global->scopes ().pop ();
6226 AST_Annotation_Appls *disc_annotations = (yyvsp[-3].annotations_val);
6228 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6229 UTL_ScopedName n ((yyvsp[-8].idval), 0);
6230 idl_global->set_parse_state (IDL_GlobalData::PS_SwitchCloseParSeen);
6233 * Create a node representing a union.
6235 if ((yyvsp[-2].dcval) != 0 && s != 0)
6237 AST_ConcreteType *tp =
6238 dynamic_cast<AST_ConcreteType*> ((yyvsp[-2].dcval));
6240 if (tp == 0)
6242 idl_global->err ()->not_a_type ((yyvsp[-2].dcval));
6244 else
6246 /* Create a union with a correct discriminator. */
6247 AST_Union *u = 0;
6248 u = idl_global->gen ()->create_union (tp,
6250 s->is_local (),
6251 s->is_abstract ());
6253 /* Narrow the enclosing scope. */
6254 AST_Union *e = dynamic_cast<AST_Union*> (top);
6256 e->redefine (u);
6257 e->disc_annotations (*disc_annotations); // Set Discriminator Annotations
6259 u->destroy ();
6260 delete u;
6265 * Restore the top.
6267 idl_global->scopes ().push (top);
6269 (yyvsp[-8].idval)->destroy ();
6270 delete (yyvsp[-8].idval);
6271 (yyvsp[-8].idval) = 0;
6273 delete disc_annotations;
6275 #line 6276 "fe/idl.tab.cpp"
6276 break;
6278 case 318: /* $@77: %empty */
6279 #line 3405 "fe/idl.ypp"
6281 idl_global->set_parse_state (IDL_GlobalData::PS_UnionSqSeen);
6283 #line 6284 "fe/idl.tab.cpp"
6284 break;
6286 case 319: /* $@78: %empty */
6287 #line 3409 "fe/idl.ypp"
6289 idl_global->set_parse_state (IDL_GlobalData::PS_UnionBodySeen);
6291 #line 6292 "fe/idl.tab.cpp"
6292 break;
6294 case 320: /* union_type: union_decl IDL_SWITCH $@73 '(' $@74 annotations_maybe switch_type_spec $@75 ')' $@76 '{' $@77 at_least_one_case_branch $@78 '}' */
6295 #line 3413 "fe/idl.ypp"
6297 idl_global->set_parse_state (IDL_GlobalData::PS_UnionQsSeen);
6300 * Done with this union. Pop its scope from the scopes stack.
6302 (yyval.dcval) = dynamic_cast<AST_Union*> (
6303 idl_global->scopes ().top_non_null ()
6306 if ((yyval.dcval) != 0)
6308 idl_global->scopes ().pop ();
6311 #line 6312 "fe/idl.tab.cpp"
6312 break;
6314 case 321: /* switch_type_spec: integer_type */
6315 #line 3432 "fe/idl.ypp"
6317 (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ((yyvsp[0].etval));
6319 #line 6320 "fe/idl.tab.cpp"
6320 break;
6322 case 322: /* switch_type_spec: char_type */
6323 #line 3436 "fe/idl.ypp"
6325 if ((yyvsp[0].etval) == AST_Expression::EV_wchar && idl_global->idl_version_ < IDL_VERSION_4)
6326 idl_global->err ()->idl_version_error (
6327 "Using wchar as a union discriminator isn't allowed in IDL versions before 4");
6329 (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ((yyvsp[0].etval));
6331 #line 6332 "fe/idl.tab.cpp"
6332 break;
6334 case 323: /* switch_type_spec: octet_type */
6335 #line 3444 "fe/idl.ypp"
6337 if (idl_global->idl_version_ < IDL_VERSION_4)
6338 idl_global->err ()->idl_version_error (
6339 "Using octet as a union discriminator isn't allowed in IDL versions before 4");
6341 (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ((yyvsp[0].etval));
6343 #line 6344 "fe/idl.tab.cpp"
6344 break;
6346 case 324: /* switch_type_spec: boolean_type */
6347 #line 3452 "fe/idl.ypp"
6349 (yyval.dcval) = idl_global->scopes ().bottom ()->lookup_primitive_type ((yyvsp[0].etval));
6351 #line 6352 "fe/idl.tab.cpp"
6352 break;
6354 case 326: /* switch_type_spec: scoped_name */
6355 #line 3457 "fe/idl.ypp"
6357 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6358 AST_Decl *d = 0;
6359 AST_PredefinedType *p = 0;
6360 AST_Typedef *t = 0;
6361 bool found = false;
6364 * The discriminator is a scoped name. Try to resolve to
6365 * one of the scalar types or to an enum. Thread through
6366 * typedef's to arrive at the base type at the end of the
6367 * chain.
6369 d = s->lookup_by_name ((yyvsp[0].idlist));
6371 if (s != 0 && d != 0)
6373 while (!found)
6375 switch (d->node_type ())
6377 case AST_Decl::NT_enum:
6378 (yyval.dcval) = d;
6379 found = true;
6380 break;
6381 case AST_Decl::NT_pre_defined:
6382 p = dynamic_cast<AST_PredefinedType*> (d);
6384 if (p != 0)
6386 switch (p->pt ())
6388 case AST_PredefinedType::PT_long:
6389 case AST_PredefinedType::PT_ulong:
6390 case AST_PredefinedType::PT_longlong:
6391 case AST_PredefinedType::PT_ulonglong:
6392 case AST_PredefinedType::PT_short:
6393 case AST_PredefinedType::PT_ushort:
6394 case AST_PredefinedType::PT_int8:
6395 case AST_PredefinedType::PT_uint8:
6396 case AST_PredefinedType::PT_char:
6397 case AST_PredefinedType::PT_boolean:
6398 (yyval.dcval) = p;
6399 found = true;
6400 break;
6401 case AST_PredefinedType::PT_wchar:
6402 case AST_PredefinedType::PT_octet:
6403 if (idl_global->idl_version_ < IDL_VERSION_4)
6404 idl_global->err ()->idl_version_error (
6405 "Using octet or wchar as a union discriminator isn't allowed in IDL versions before 4");
6406 (yyval.dcval) = p;
6407 found = true;
6408 break;
6409 default:
6410 (yyval.dcval) = 0;
6411 found = true;
6412 break;
6415 else
6417 (yyval.dcval) = 0;
6418 found = true;
6421 break;
6422 case AST_Decl::NT_typedef:
6423 t = dynamic_cast<AST_Typedef*> (d);
6425 if (t != 0)
6427 d = t->base_type ();
6430 break;
6431 default:
6432 (yyval.dcval) = 0;
6433 found = true;
6434 break;
6438 else
6440 (yyval.dcval) = 0;
6443 if ((yyval.dcval) == 0)
6445 idl_global->err ()->lookup_error ((yyvsp[0].idlist));
6447 (yyvsp[0].idlist)->destroy ();
6448 delete (yyvsp[0].idlist);
6449 (yyvsp[0].idlist) = 0;
6451 /* If we don't return here, we'll crash later.*/
6452 if (!idl_global->ignore_lookup_errors_)
6454 return 1;
6458 (yyvsp[0].idlist)->destroy ();
6459 delete (yyvsp[0].idlist);
6460 (yyvsp[0].idlist) = 0;
6462 #line 6463 "fe/idl.tab.cpp"
6463 break;
6465 case 330: /* $@79: %empty */
6466 #line 3574 "fe/idl.ypp"
6468 idl_global->set_parse_state (IDL_GlobalData::PS_UnionLabelSeen);
6470 #line 6471 "fe/idl.tab.cpp"
6471 break;
6473 case 331: /* $@80: %empty */
6474 #line 3578 "fe/idl.ypp"
6476 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemSeen);
6478 #line 6479 "fe/idl.tab.cpp"
6479 break;
6481 case 332: /* case_branch: at_least_one_case_label $@79 annotations_maybe element_spec $@80 ';' */
6482 #line 3582 "fe/idl.ypp"
6484 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6485 AST_UnionBranch *b = 0;
6486 AST_Annotation_Appls *annotations = (yyvsp[-3].annotations_val);
6487 AST_Field *f = (yyvsp[-2].ffval);
6488 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemCompleted);
6491 * Create several nodes representing branches of a union.
6492 * Add them to the enclosing scope (the union scope)
6494 if (s != 0 && (yyvsp[-5].llval) != 0 && (yyvsp[-2].ffval) != 0)
6497 idl_global->gen ()->create_union_branch (
6498 (yyvsp[-5].llval),
6499 f->field_type (),
6500 f->name ()
6502 b->annotation_appls (*annotations);
6503 (void) s->fe_add_union_branch (b);
6505 // f has passed its field type to the union branch,
6506 // but the rest still needs to be cleaned up.
6507 f->AST_Decl::destroy ();
6508 delete f;
6509 f = 0;
6512 delete annotations;
6514 #line 6515 "fe/idl.tab.cpp"
6515 break;
6517 case 333: /* $@81: %empty */
6518 #line 3614 "fe/idl.ypp"
6520 idl_global->err ()->syntax_error (idl_global->parse_state ());
6522 #line 6523 "fe/idl.tab.cpp"
6523 break;
6525 case 334: /* case_branch: error $@81 ';' */
6526 #line 3618 "fe/idl.ypp"
6528 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
6529 yyerrok;
6531 #line 6532 "fe/idl.tab.cpp"
6532 break;
6534 case 335: /* at_least_one_case_label: case_label case_labels */
6535 #line 3626 "fe/idl.ypp"
6537 ACE_NEW_RETURN ((yyval.llval),
6538 UTL_LabelList ((yyvsp[-1].ulval),
6539 (yyvsp[0].llval)),
6542 #line 6543 "fe/idl.tab.cpp"
6543 break;
6545 case 336: /* case_labels: case_labels case_label */
6546 #line 3636 "fe/idl.ypp"
6548 UTL_LabelList *ll = 0;
6549 ACE_NEW_RETURN (ll,
6550 UTL_LabelList ((yyvsp[0].ulval),
6554 if ((yyvsp[-1].llval) == 0)
6556 (yyval.llval) = ll;
6558 else
6560 (yyvsp[-1].llval)->nconc (ll);
6561 (yyval.llval) = (yyvsp[-1].llval);
6564 #line 6565 "fe/idl.tab.cpp"
6565 break;
6567 case 337: /* case_labels: %empty */
6568 #line 3654 "fe/idl.ypp"
6570 (yyval.llval) = 0;
6572 #line 6573 "fe/idl.tab.cpp"
6573 break;
6575 case 338: /* $@82: %empty */
6576 #line 3661 "fe/idl.ypp"
6578 idl_global->set_parse_state (IDL_GlobalData::PS_DefaultSeen);
6580 #line 6581 "fe/idl.tab.cpp"
6581 break;
6583 case 339: /* case_label: IDL_DEFAULT $@82 ':' */
6584 #line 3665 "fe/idl.ypp"
6586 idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
6588 (yyval.ulval) = idl_global->gen ()->create_union_label (
6589 AST_UnionLabel::UL_default,
6593 #line 6594 "fe/idl.tab.cpp"
6594 break;
6596 case 340: /* $@83: %empty */
6597 #line 3674 "fe/idl.ypp"
6599 idl_global->set_parse_state (IDL_GlobalData::PS_CaseSeen);
6601 #line 6602 "fe/idl.tab.cpp"
6602 break;
6604 case 341: /* $@84: %empty */
6605 #line 3678 "fe/idl.ypp"
6607 idl_global->set_parse_state (IDL_GlobalData::PS_LabelExprSeen);
6609 #line 6610 "fe/idl.tab.cpp"
6610 break;
6612 case 342: /* case_label: IDL_CASE $@83 const_expr $@84 ':' */
6613 #line 3682 "fe/idl.ypp"
6615 idl_global->set_parse_state (IDL_GlobalData::PS_LabelColonSeen);
6617 (yyval.ulval) = idl_global->gen ()->create_union_label (
6618 AST_UnionLabel::UL_label,
6619 (yyvsp[-2].exval)
6622 #line 6623 "fe/idl.tab.cpp"
6623 break;
6625 case 343: /* $@85: %empty */
6626 #line 3694 "fe/idl.ypp"
6628 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemTypeSeen);
6630 #line 6631 "fe/idl.tab.cpp"
6631 break;
6633 case 344: /* element_spec: type_spec $@85 declarator */
6634 #line 3698 "fe/idl.ypp"
6636 idl_global->set_parse_state (IDL_GlobalData::PS_UnionElemDeclSeen);
6639 * Check for illegal recursive use of type
6641 if ((yyvsp[-2].dcval) != 0
6642 && AST_illegal_recursive_type ((yyvsp[-2].dcval)))
6644 idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, (yyvsp[-2].dcval));
6646 (yyval.ffval) = 0;
6649 * Create a field in a union branch
6651 else if ((yyvsp[-2].dcval) == 0
6652 || (yyvsp[0].deval) == 0)
6654 (yyval.ffval) = 0;
6656 else
6658 AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval));
6660 if (tp == 0)
6662 (yyval.ffval) = 0;
6664 else
6666 (yyval.ffval) = idl_global->gen ()->create_field (
6668 (yyvsp[0].deval)->name ()
6672 (yyvsp[0].deval)->destroy ();
6673 delete (yyvsp[0].deval);
6674 (yyvsp[0].deval) = 0;
6677 #line 6678 "fe/idl.tab.cpp"
6678 break;
6680 case 345: /* struct_forward_type: struct_decl */
6681 #line 3744 "fe/idl.ypp"
6683 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6684 UTL_ScopedName n ((yyvsp[0].idval),
6686 AST_StructureFwd *d = 0;
6689 * Create a node representing a forward declaration of a struct.
6691 if (s != 0)
6693 d = idl_global->gen ()->create_structure_fwd (&n);
6694 (void) s->fe_add_structure_fwd (d);
6697 (yyvsp[0].idval)->destroy ();
6698 delete (yyvsp[0].idval);
6699 (yyvsp[0].idval) = 0;
6701 (yyval.dcval) = d;
6703 #line 6704 "fe/idl.tab.cpp"
6704 break;
6706 case 346: /* union_forward_type: union_decl */
6707 #line 3769 "fe/idl.ypp"
6709 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6710 UTL_ScopedName n ((yyvsp[0].idval),
6712 AST_UnionFwd *u = 0;
6715 * Create a node representing a forward declaration of a union.
6717 if (s != 0)
6719 u = idl_global->gen ()->create_union_fwd (&n);
6720 (void) s->fe_add_union_fwd (u);
6723 (yyvsp[0].idval)->destroy ();
6724 delete (yyvsp[0].idval);
6725 (yyvsp[0].idval) = 0;
6727 #line 6728 "fe/idl.tab.cpp"
6728 break;
6730 case 347: /* $@86: %empty */
6731 #line 3792 "fe/idl.ypp"
6733 idl_global->set_parse_state (IDL_GlobalData::PS_EnumSeen);
6735 #line 6736 "fe/idl.tab.cpp"
6736 break;
6738 case 348: /* $@87: %empty */
6739 #line 3796 "fe/idl.ypp"
6741 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6742 UTL_ScopedName n ((yyvsp[0].idval), 0);
6743 AST_Enum *e = 0;
6744 idl_global->set_parse_state (IDL_GlobalData::PS_EnumIDSeen);
6747 * Create a node representing an enum and add it to its
6748 * enclosing scope.
6750 if (s != 0)
6752 e = idl_global->gen ()->create_enum (&n,
6753 s->is_local (),
6754 s->is_abstract ());
6756 * Add it to its defining scope
6758 (void) s->fe_add_enum (e);
6762 * Push the enum scope on the scopes stack.
6764 idl_global->scopes ().push (e);
6766 (yyvsp[0].idval)->destroy ();
6767 delete (yyvsp[0].idval);
6768 (yyvsp[0].idval) = 0;
6770 #line 6771 "fe/idl.tab.cpp"
6771 break;
6773 case 349: /* $@88: %empty */
6774 #line 3827 "fe/idl.ypp"
6776 idl_global->set_parse_state (IDL_GlobalData::PS_EnumSqSeen);
6778 #line 6779 "fe/idl.tab.cpp"
6779 break;
6781 case 350: /* $@89: %empty */
6782 #line 3831 "fe/idl.ypp"
6784 idl_global->set_parse_state (IDL_GlobalData::PS_EnumBodySeen);
6786 #line 6787 "fe/idl.tab.cpp"
6787 break;
6789 case 351: /* enum_type: IDL_ENUM $@86 defining_id $@87 '{' $@88 at_least_one_enumerator $@89 '}' */
6790 #line 3835 "fe/idl.ypp"
6792 idl_global->set_parse_state (IDL_GlobalData::PS_EnumQsSeen);
6795 * Done with this enum. Pop its scope from the scopes stack.
6797 if (idl_global->scopes ().top () == 0)
6799 (yyval.dcval) = 0;
6801 else
6803 (yyval.dcval) = dynamic_cast<AST_Enum*> (
6804 idl_global->scopes ().top_non_null ()
6806 idl_global->scopes ().pop ();
6809 #line 6810 "fe/idl.tab.cpp"
6810 break;
6812 case 353: /* $@90: %empty */
6813 #line 3860 "fe/idl.ypp"
6815 idl_global->set_parse_state (IDL_GlobalData::PS_EnumCommaSeen);
6817 #line 6818 "fe/idl.tab.cpp"
6818 break;
6820 case 356: /* enumerator: annotations_maybe IDENTIFIER */
6821 #line 3869 "fe/idl.ypp"
6823 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6824 AST_Annotation_Appls *annotations = (yyvsp[-1].annotations_val);
6825 Identifier id ((yyvsp[0].strval));
6826 ACE::strdelete ((yyvsp[0].strval));
6827 (yyvsp[0].strval) = 0;
6828 UTL_ScopedName n (&id, 0);
6829 AST_EnumVal *e = 0;
6830 AST_Enum *c = 0;
6833 * Create a node representing one enumerator in an enum
6834 * Add it to the enclosing scope (the enum scope)
6836 if (s != 0
6837 && s->scope_node_type () == AST_Decl::NT_enum)
6839 c = dynamic_cast<AST_Enum*> (s);
6841 if (c != 0)
6843 e = idl_global->gen ()->create_enum_val (
6844 c->next_enum_val (),
6847 e->enum_parent (c);
6848 e->annotation_appls (*annotations);
6851 (void) s->fe_add_enum_val (e);
6854 delete annotations;
6856 #line 6857 "fe/idl.tab.cpp"
6857 break;
6859 case 357: /* map_type_spec: map_head '>' */
6860 #line 3908 "fe/idl.ypp"
6862 AST_Map *map = 0;
6863 Decl_Annotations_Pair_Pair* type_pair = (yyvsp[-1].decl_annotations_pair_val_pair);
6864 Decl_Annotations_Pair *key_type = type_pair->first;
6865 Decl_Annotations_Pair *val_type = type_pair->second;
6868 * Remove map marker from scopes stack.
6870 if (idl_global->scopes ().top () == 0)
6872 idl_global->scopes ().pop ();
6875 UTL_Scope *s = idl_global->scopes ().top_non_null ();
6878 * Create a node representing a map.
6880 if (key_type && val_type)
6882 AST_Type *ktp = dynamic_cast<AST_Type*> (key_type->decl);
6883 AST_Type *vtp = dynamic_cast<AST_Type*> (val_type->decl);
6885 if (ktp == 0 || vtp == 0)
6887 ; // Error will be caught in FE_Declarator.
6889 else
6891 Identifier id ("map");
6892 UTL_ScopedName sn (&id, 0);
6893 ACE_CDR::ULong bound = 0UL;
6895 map =
6896 idl_global->gen ()->create_map (
6897 idl_global->gen ()->create_expr (
6898 bound,
6899 AST_Expression::EV_ulong
6901 ktp,
6902 vtp,
6903 &sn,
6904 s->is_local (),
6905 s->is_abstract ()
6907 map->key_type_annotations (*key_type->annotations);
6908 map->value_type_annotations (*val_type->annotations);
6910 idl_global->err ()->anonymous_type_diagnostic ();
6914 delete key_type->annotations;
6915 delete val_type->annotations;
6916 delete type_pair;
6917 (yyval.dcval) = map;
6919 #line 6920 "fe/idl.tab.cpp"
6920 break;
6922 case 358: /* $@91: %empty */
6923 #line 3970 "fe/idl.ypp"
6925 idl_global->set_parse_state (IDL_GlobalData::PS_MapSeen);
6928 * Push a map marker on scopes stack.
6930 idl_global->scopes ().push (0);
6932 #line 6933 "fe/idl.tab.cpp"
6933 break;
6935 case 359: /* $@92: %empty */
6936 #line 3980 "fe/idl.ypp"
6938 idl_global->set_parse_state(IDL_GlobalData::PS_MapKeyTypeSeen);
6940 #line 6941 "fe/idl.tab.cpp"
6941 break;
6943 case 360: /* map_head: IDL_MAP $@91 '<' annotations_maybe simple_type_spec $@92 ',' annotations_maybe simple_type_spec */
6944 #line 3985 "fe/idl.ypp"
6946 idl_global->set_parse_state(IDL_GlobalData::PS_MapValueTypeSeen);
6947 Decl_Annotations_Pair *key = new Decl_Annotations_Pair;
6948 key->decl = (yyvsp[-4].dcval);
6949 key->annotations = (yyvsp[-5].annotations_val);
6951 Decl_Annotations_Pair *value = new Decl_Annotations_Pair;
6952 value->decl = (yyvsp[0].dcval);
6953 value->annotations = (yyvsp[-1].annotations_val);
6955 Decl_Annotations_Pair_Pair* pairs = new Decl_Annotations_Pair_Pair;
6956 pairs->first = key;
6957 pairs->second = value;
6958 (yyval.decl_annotations_pair_val_pair) = pairs;
6960 #line 6961 "fe/idl.tab.cpp"
6961 break;
6963 case 361: /* $@93: %empty */
6964 #line 4005 "fe/idl.ypp"
6966 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceCommaSeen);
6968 #line 6969 "fe/idl.tab.cpp"
6969 break;
6971 case 362: /* $@94: %empty */
6972 #line 4009 "fe/idl.ypp"
6974 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceExprSeen);
6976 #line 6977 "fe/idl.tab.cpp"
6977 break;
6979 case 363: /* sequence_type_spec: seq_head ',' $@93 positive_int_expr $@94 '>' */
6980 #line 4013 "fe/idl.ypp"
6982 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
6984 AST_Sequence *seq = 0;
6985 Decl_Annotations_Pair *seq_head = (yyvsp[-5].decl_annotations_pair_val);
6986 AST_Decl *type = 0;
6987 AST_Annotation_Appls *type_annotations = 0;
6988 if (seq_head)
6990 type = seq_head->decl;
6991 type_annotations = seq_head->annotations;
6993 delete seq_head;
6996 * Remove sequence marker from scopes stack.
6998 if (idl_global->scopes ().top () == 0)
7000 idl_global->scopes ().pop ();
7003 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7006 * Create a node representing a sequence
7008 AST_Expression::AST_ExprValue *ev = 0;
7009 AST_Param_Holder *param_holder = 0;
7011 if ((yyvsp[-2].exval) != 0)
7013 param_holder =
7014 (yyvsp[-2].exval)->param_holder ();
7016 ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7019 // If the expression corresponds to a template parameter,
7020 // it's ok for the coercion to fail at this point. We check
7021 // for a type mismatch below.
7022 if (0 == (yyvsp[-2].exval)
7023 || (0 == ev && 0 == param_holder))
7025 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7026 AST_Expression::EV_ulong);
7028 else if (type)
7030 AST_Type *tp = dynamic_cast<AST_Type*> (type);
7032 if (0 == tp)
7034 ; // Error will be caught in FE_Declarator.
7036 else
7038 Identifier id ("sequence");
7039 UTL_ScopedName sn (&id,
7042 seq =
7043 idl_global->gen ()->create_sequence (
7044 (yyvsp[-2].exval),
7046 &sn,
7047 s->is_local (),
7048 s->is_abstract ()
7050 seq->base_type_annotations (*type_annotations);
7052 idl_global->err ()->anonymous_type_diagnostic ();
7056 delete type_annotations;
7057 delete ev;
7058 ev = 0;
7059 (yyval.dcval) = seq;
7061 #line 7062 "fe/idl.tab.cpp"
7062 break;
7064 case 364: /* sequence_type_spec: seq_head '>' */
7065 #line 4095 "fe/idl.ypp"
7067 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceQsSeen);
7069 AST_Sequence *seq = 0;
7070 Decl_Annotations_Pair *seq_head = (yyvsp[-1].decl_annotations_pair_val);
7071 AST_Decl *type = 0;
7072 AST_Annotation_Appls *type_annotations = 0;
7073 if (seq_head)
7075 type = seq_head->decl;
7076 type_annotations = seq_head->annotations;
7078 delete seq_head;
7081 * Remove sequence marker from scopes stack.
7083 if (idl_global->scopes ().top () == 0)
7085 idl_global->scopes ().pop ();
7088 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7091 * Create a node representing a sequence.
7093 if (type)
7095 AST_Type *tp = dynamic_cast<AST_Type*> (type);
7097 if (tp == 0)
7099 ; // Error will be caught in FE_Declarator.
7101 else
7103 Identifier id ("sequence");
7104 UTL_ScopedName sn (&id, 0);
7105 ACE_CDR::ULong bound = 0UL;
7107 seq =
7108 idl_global->gen ()->create_sequence (
7109 idl_global->gen ()->create_expr (
7110 bound,
7111 AST_Expression::EV_ulong
7114 &sn,
7115 s->is_local (),
7116 s->is_abstract ()
7118 seq->base_type_annotations (*type_annotations);
7120 idl_global->err ()->anonymous_type_diagnostic ();
7124 delete type_annotations;
7125 (yyval.dcval) = seq;
7127 #line 7128 "fe/idl.tab.cpp"
7128 break;
7130 case 365: /* $@95: %empty */
7131 #line 4160 "fe/idl.ypp"
7133 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSeen);
7136 * Push a sequence marker on scopes stack.
7138 idl_global->scopes ().push (0);
7140 #line 7141 "fe/idl.tab.cpp"
7141 break;
7143 case 366: /* $@96: %empty */
7144 #line 4169 "fe/idl.ypp"
7146 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceSqSeen);
7148 #line 7149 "fe/idl.tab.cpp"
7149 break;
7151 case 367: /* seq_head: IDL_SEQUENCE $@95 '<' $@96 annotations_maybe simple_type_spec */
7152 #line 4173 "fe/idl.ypp"
7154 idl_global->set_parse_state (IDL_GlobalData::PS_SequenceTypeSeen);
7155 Decl_Annotations_Pair *seq_head = new Decl_Annotations_Pair;
7156 seq_head->decl = (yyvsp[0].dcval);
7157 seq_head->annotations = (yyvsp[-1].annotations_val);
7158 (yyval.decl_annotations_pair_val) = seq_head;
7160 #line 7161 "fe/idl.tab.cpp"
7161 break;
7163 case 368: /* fixed_type_spec: IDL_FIXED '<' positive_int_expr ',' const_expr '>' */
7164 #line 4184 "fe/idl.ypp"
7166 (yyvsp[-1].exval)->evaluate (AST_Expression::EK_positive_int);
7167 (yyval.dcval) = idl_global->gen ()->create_fixed ((yyvsp[-3].exval), (yyvsp[-1].exval));
7169 #line 7170 "fe/idl.tab.cpp"
7170 break;
7172 case 369: /* $@97: %empty */
7173 #line 4193 "fe/idl.ypp"
7175 idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
7177 #line 7178 "fe/idl.tab.cpp"
7178 break;
7180 case 370: /* $@98: %empty */
7181 #line 4197 "fe/idl.ypp"
7183 idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
7185 #line 7186 "fe/idl.tab.cpp"
7186 break;
7188 case 371: /* string_type_spec: string_head '<' $@97 positive_int_expr $@98 '>' */
7189 #line 4201 "fe/idl.ypp"
7191 idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
7194 * Create a node representing a string.
7196 AST_Expression::AST_ExprValue *ev = 0;
7198 if ((yyvsp[-2].exval) != 0)
7200 ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7203 if (0 == (yyvsp[-2].exval) || 0 == ev)
7205 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7206 AST_Expression::EV_ulong);
7207 (yyval.dcval) = 0;
7209 else
7211 tao_string_decl = idl_global->gen ()->create_string ((yyvsp[-2].exval));
7214 * Add this AST_String to the types defined in the global scope.
7216 idl_global->root ()->fe_add_string (
7217 dynamic_cast<AST_String*> (
7218 tao_string_decl));
7220 idl_global->err ()->anonymous_type_diagnostic ();
7222 (yyval.dcval) = tao_string_decl;
7225 delete ev;
7226 ev = 0;
7228 #line 7229 "fe/idl.tab.cpp"
7229 break;
7231 case 372: /* string_type_spec: string_head */
7232 #line 4240 "fe/idl.ypp"
7234 idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
7237 * Create a node representing a string.
7239 ACE_CDR::ULong bound = 0UL;
7240 tao_string_decl =
7241 idl_global->gen ()->create_string (
7242 idl_global->gen ()->create_expr (bound,
7243 AST_Expression::EV_ulong)
7247 * Add this AST_String to the types defined in the global scope.
7249 idl_global->root ()->fe_add_string (
7250 dynamic_cast<AST_String*> (
7251 tao_string_decl));
7253 (yyval.dcval) = tao_string_decl;
7255 #line 7256 "fe/idl.tab.cpp"
7256 break;
7258 case 373: /* string_head: IDL_STRING */
7259 #line 4266 "fe/idl.ypp"
7261 idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
7263 #line 7264 "fe/idl.tab.cpp"
7264 break;
7266 case 374: /* $@99: %empty */
7267 #line 4274 "fe/idl.ypp"
7269 idl_global->set_parse_state (IDL_GlobalData::PS_StringSqSeen);
7271 #line 7272 "fe/idl.tab.cpp"
7272 break;
7274 case 375: /* $@100: %empty */
7275 #line 4278 "fe/idl.ypp"
7277 idl_global->set_parse_state (IDL_GlobalData::PS_StringExprSeen);
7279 #line 7280 "fe/idl.tab.cpp"
7280 break;
7282 case 376: /* wstring_type_spec: wstring_head '<' $@99 positive_int_expr $@100 '>' */
7283 #line 4282 "fe/idl.ypp"
7285 idl_global->set_parse_state (IDL_GlobalData::PS_StringQsSeen);
7288 * Create a node representing a string.
7290 AST_Expression::AST_ExprValue *ev = 0;
7292 if ((yyvsp[-2].exval) != 0)
7294 ev = (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7297 if (0 == (yyvsp[-2].exval) || 0 == ev)
7299 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7300 AST_Expression::EV_ulong);
7301 (yyval.dcval) = 0;
7303 else
7305 AST_String *string = idl_global->gen ()->create_wstring ((yyvsp[-2].exval));
7308 * Add this AST_String to the types defined in the global scope.
7310 idl_global->root ()->fe_add_string (
7311 dynamic_cast<AST_String*> (
7312 string));
7314 idl_global->err ()->anonymous_type_diagnostic ();
7316 (yyval.dcval) = string;
7319 delete ev;
7320 ev = 0;
7322 #line 7323 "fe/idl.tab.cpp"
7323 break;
7325 case 377: /* wstring_type_spec: wstring_head */
7326 #line 4321 "fe/idl.ypp"
7328 idl_global->set_parse_state (IDL_GlobalData::PS_StringCompleted);
7331 * Create a node representing a wstring.
7333 ACE_CDR::ULong bound = 0UL;
7334 AST_String *string =
7335 idl_global->gen ()->create_wstring (
7336 idl_global->gen ()->create_expr (bound,
7337 AST_Expression::EV_ulong)
7341 * Add this AST_String to the types defined in the global scope.
7343 idl_global->root ()->fe_add_string (
7344 dynamic_cast<AST_String*> (
7345 string));
7347 (yyval.dcval) = string;
7349 #line 7350 "fe/idl.tab.cpp"
7350 break;
7352 case 378: /* wstring_head: IDL_WSTRING */
7353 #line 4347 "fe/idl.ypp"
7355 idl_global->set_parse_state (IDL_GlobalData::PS_StringSeen);
7357 #line 7358 "fe/idl.tab.cpp"
7358 break;
7360 case 379: /* $@101: %empty */
7361 #line 4354 "fe/idl.ypp"
7363 idl_global->set_parse_state (IDL_GlobalData::PS_ArrayIDSeen);
7365 #line 7366 "fe/idl.tab.cpp"
7366 break;
7368 case 380: /* array_declarator: defining_id $@101 annotations_maybe at_least_one_array_dim */
7369 #line 4358 "fe/idl.ypp"
7371 idl_global->set_parse_state (IDL_GlobalData::PS_ArrayCompleted);
7373 AST_Array *array = 0;
7374 AST_Annotation_Appls *base_type_annotations = (yyvsp[-1].annotations_val);
7375 UTL_ExprList *array_dims = (yyvsp[0].elval);
7378 * Create a node representing an array.
7380 if (array_dims)
7382 UTL_ScopedName sn ((yyvsp[-3].idval),
7384 array =
7385 idl_global->gen ()->create_array (
7386 &sn,
7387 array_dims->length (),
7388 array_dims,
7392 array->base_type_annotations (*base_type_annotations);
7393 sn.destroy ();
7395 idl_global->err ()->anonymous_type_diagnostic ();
7398 array_dims->destroy ();
7399 delete array_dims;
7401 delete base_type_annotations;
7403 (yyval.dcval) = array;
7405 #line 7406 "fe/idl.tab.cpp"
7406 break;
7408 case 381: /* at_least_one_array_dim: array_dim array_dims */
7409 #line 4397 "fe/idl.ypp"
7411 ACE_NEW_RETURN ((yyval.elval),
7412 UTL_ExprList ((yyvsp[-1].exval),
7413 (yyvsp[0].elval)),
7416 #line 7417 "fe/idl.tab.cpp"
7417 break;
7419 case 382: /* array_dims: array_dims array_dim */
7420 #line 4407 "fe/idl.ypp"
7422 UTL_ExprList *el = 0;
7423 ACE_NEW_RETURN (el,
7424 UTL_ExprList ((yyvsp[0].exval),
7428 if ((yyvsp[-1].elval) == 0)
7430 (yyval.elval) = el;
7432 else
7434 (yyvsp[-1].elval)->nconc (el);
7435 (yyval.elval) = (yyvsp[-1].elval);
7438 #line 7439 "fe/idl.tab.cpp"
7439 break;
7441 case 383: /* array_dims: %empty */
7442 #line 4425 "fe/idl.ypp"
7444 (yyval.elval) = 0;
7446 #line 7447 "fe/idl.tab.cpp"
7447 break;
7449 case 384: /* $@102: %empty */
7450 #line 4432 "fe/idl.ypp"
7452 idl_global->set_parse_state (IDL_GlobalData::PS_DimSqSeen);
7454 #line 7455 "fe/idl.tab.cpp"
7455 break;
7457 case 385: /* $@103: %empty */
7458 #line 4436 "fe/idl.ypp"
7460 idl_global->set_parse_state (IDL_GlobalData::PS_DimExprSeen);
7462 #line 7463 "fe/idl.tab.cpp"
7463 break;
7465 case 386: /* array_dim: '[' $@102 positive_int_expr $@103 ']' */
7466 #line 4440 "fe/idl.ypp"
7468 idl_global->set_parse_state (IDL_GlobalData::PS_DimQsSeen);
7471 * Array dimensions are expressions which must be coerced to
7472 * positive integers.
7474 AST_Expression::AST_ExprValue *ev = 0;
7475 AST_Param_Holder *param_holder = 0;
7477 if ((yyvsp[-2].exval) != 0)
7479 param_holder =
7480 (yyvsp[-2].exval)->param_holder ();
7482 ev =
7483 (yyvsp[-2].exval)->coerce (AST_Expression::EV_ulong);
7486 if (0 == (yyvsp[-2].exval)
7487 || (ev == 0 && param_holder == 0))
7489 idl_global->err ()->coercion_error ((yyvsp[-2].exval),
7490 AST_Expression::EV_ulong);
7491 (yyval.exval) = 0;
7493 else
7495 if (param_holder != 0)
7497 AST_Expression::ExprType et =
7498 param_holder->info ()->const_type_;
7500 // If the bound expression represents a
7501 // template parameter, it must be a const
7502 // and of type unsigned long.
7503 if (et != AST_Expression::EV_ulong)
7505 idl_global->err ()->mismatched_template_param (
7506 param_holder->info ()->name_.c_str ());
7508 delete ev;
7509 ev = 0;
7510 return 1;
7514 (yyval.exval) = (yyvsp[-2].exval);
7517 delete ev;
7518 ev = 0;
7520 #line 7521 "fe/idl.tab.cpp"
7521 break;
7523 case 389: /* $@104: %empty */
7524 #line 4502 "fe/idl.ypp"
7526 idl_global->set_parse_state (IDL_GlobalData::PS_AttrROSeen);
7528 #line 7529 "fe/idl.tab.cpp"
7529 break;
7531 case 390: /* $@105: %empty */
7532 #line 4506 "fe/idl.ypp"
7534 idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
7536 #line 7537 "fe/idl.tab.cpp"
7537 break;
7539 case 391: /* $@106: %empty */
7540 #line 4510 "fe/idl.ypp"
7542 idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
7544 #line 7545 "fe/idl.tab.cpp"
7545 break;
7547 case 392: /* $@107: %empty */
7548 #line 4514 "fe/idl.ypp"
7550 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
7552 #line 7553 "fe/idl.tab.cpp"
7553 break;
7555 case 393: /* attribute_readonly: IDL_READONLY $@104 IDL_ATTRIBUTE $@105 param_type_spec $@106 at_least_one_simple_declarator $@107 opt_raises */
7556 #line 4518 "fe/idl.ypp"
7558 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7559 AST_Attribute *a = 0;
7560 FE_Declarator *d = 0;
7562 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
7565 * Create nodes representing attributes and add them to the
7566 * enclosing scope.
7568 if (s != 0 && (yyvsp[-4].dcval) != 0 && (yyvsp[-2].dlval) != 0)
7570 for (UTL_DecllistActiveIterator l ((yyvsp[-2].dlval)); !l.is_done (); l.next ())
7572 d = l.item ();
7574 if (d == 0)
7576 continue;
7579 AST_Type *tp = d->compose ((yyvsp[-4].dcval));
7581 if (tp == 0)
7583 continue;
7586 a = idl_global->gen ()->create_attribute (
7587 true, tp, d->name (), s->is_local (), s->is_abstract ());
7589 if ((yyvsp[0].nlval) != 0)
7591 (void) a->fe_add_get_exceptions ((yyvsp[0].nlval));
7593 (yyvsp[0].nlval)->destroy ();
7594 delete (yyvsp[0].nlval);
7595 (yyvsp[0].nlval) = 0;
7598 (void) s->fe_add_attribute (a);
7602 (yyvsp[-2].dlval)->destroy ();
7603 delete (yyvsp[-2].dlval);
7604 (yyvsp[-2].dlval) = 0;
7606 (yyval.dcval) = a;
7608 #line 7609 "fe/idl.tab.cpp"
7609 break;
7611 case 394: /* $@108: %empty */
7612 #line 4573 "fe/idl.ypp"
7614 idl_global->set_parse_state (IDL_GlobalData::PS_AttrSeen);
7616 #line 7617 "fe/idl.tab.cpp"
7617 break;
7619 case 395: /* $@109: %empty */
7620 #line 4577 "fe/idl.ypp"
7622 idl_global->set_parse_state (IDL_GlobalData::PS_AttrTypeSeen);
7624 #line 7625 "fe/idl.tab.cpp"
7625 break;
7627 case 396: /* $@110: %empty */
7628 #line 4581 "fe/idl.ypp"
7630 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclsSeen);
7632 #line 7633 "fe/idl.tab.cpp"
7633 break;
7635 case 397: /* $@111: %empty */
7636 #line 4585 "fe/idl.ypp"
7638 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseCompleted);
7640 #line 7641 "fe/idl.tab.cpp"
7641 break;
7643 case 398: /* attribute_readwrite: IDL_ATTRIBUTE $@108 param_type_spec $@109 at_least_one_simple_declarator $@110 opt_getraises $@111 opt_setraises */
7644 #line 4589 "fe/idl.ypp"
7646 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7647 AST_Attribute *a = 0;
7648 FE_Declarator *d = 0;
7650 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseCompleted);
7653 * Create nodes representing attributes and add them to the
7654 * enclosing scope.
7656 if (s != 0 && (yyvsp[-6].dcval) != 0 && (yyvsp[-4].dlval) != 0)
7658 for (UTL_DecllistActiveIterator l ((yyvsp[-4].dlval)); !l.is_done (); l.next ())
7660 d = l.item ();
7662 if (d == 0)
7664 continue;
7667 AST_Type *tp = d->compose ((yyvsp[-6].dcval));
7669 if (tp == 0)
7671 continue;
7674 a = idl_global->gen ()->create_attribute (
7675 false, tp, d->name (), s->is_local (), s->is_abstract ());
7677 if ((yyvsp[-2].nlval) != 0)
7679 (void) a->fe_add_get_exceptions ((yyvsp[-2].nlval));
7681 (yyvsp[-2].nlval)->destroy ();
7682 delete (yyvsp[-2].nlval);
7683 (yyvsp[-2].nlval) = 0;
7686 if ((yyvsp[0].nlval) != 0)
7688 (void) a->fe_add_set_exceptions ((yyvsp[0].nlval));
7690 (yyvsp[0].nlval)->destroy ();
7691 delete (yyvsp[0].nlval);
7692 (yyvsp[0].nlval) = 0;
7695 (void) s->fe_add_attribute (a);
7699 (yyvsp[-4].dlval)->destroy ();
7700 delete (yyvsp[-4].dlval);
7701 (yyvsp[-4].dlval) = 0;
7703 (yyval.dcval) = a;
7705 #line 7706 "fe/idl.tab.cpp"
7706 break;
7708 case 399: /* $@112: %empty */
7709 #line 4653 "fe/idl.ypp"
7711 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSeen);
7713 #line 7714 "fe/idl.tab.cpp"
7714 break;
7716 case 400: /* @113: %empty */
7717 #line 4657 "fe/idl.ypp"
7719 Identifier *&id = (yyvsp[0].idval);
7720 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
7721 UTL_ScopedName scoped_name (id, 0);
7722 AST_Exception *exception = 0;
7723 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptIDSeen);
7726 * Create a node representing an exception and add it to
7727 * the enclosing scope.
7729 if (scope)
7731 exception = idl_global->gen ()->create_exception (
7732 &scoped_name,
7733 scope->is_local (),
7734 scope->is_abstract ());
7735 scope->fe_add_exception (exception);
7739 * Push the exception scope on the scope stack.
7741 idl_global->scopes ().push (exception);
7743 id->destroy ();
7744 delete id;
7745 id = 0;
7747 (yyval.dcval) = exception;
7749 #line 7750 "fe/idl.tab.cpp"
7750 break;
7752 case 401: /* $@114: %empty */
7753 #line 4689 "fe/idl.ypp"
7755 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptSqSeen);
7757 #line 7758 "fe/idl.tab.cpp"
7758 break;
7760 case 402: /* $@115: %empty */
7761 #line 4693 "fe/idl.ypp"
7763 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptBodySeen);
7765 #line 7766 "fe/idl.tab.cpp"
7766 break;
7768 case 403: /* exception: IDL_EXCEPTION $@112 defining_id @113 '{' $@114 members $@115 '}' */
7769 #line 4697 "fe/idl.ypp"
7771 idl_global->set_parse_state (IDL_GlobalData::PS_ExceptQsSeen);
7773 * Done with this exception. Pop its scope from the scope stack.
7775 idl_global->scopes ().pop ();
7777 (yyval.dcval) = (yyvsp[-5].dcval);
7779 #line 7780 "fe/idl.tab.cpp"
7780 break;
7782 case 404: /* $@116: %empty */
7783 #line 4710 "fe/idl.ypp"
7785 idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
7787 #line 7788 "fe/idl.tab.cpp"
7788 break;
7790 case 405: /* $@117: %empty */
7791 #line 4714 "fe/idl.ypp"
7793 AST_Operation *op = 0;
7794 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
7796 AST_Operation::Flags op_flags = (yyvsp[-3].ofval);
7797 AST_Decl *type_node = (yyvsp[-2].dcval);
7798 (yyvsp[-2].dcval) = 0;
7799 Identifier id ((yyvsp[0].strval));
7800 ACE::strdelete ((yyvsp[0].strval));
7801 (yyvsp[0].strval) = 0;
7803 UTL_ScopedName name (&id, 0);
7804 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
7807 * Create a node representing an operation on an interface
7808 * and add it to its enclosing scope.
7810 if (scope != 0 && type_node != 0)
7812 AST_Type *type = dynamic_cast<AST_Type*> (type_node);
7814 if (type == 0)
7816 idl_global->err ()->not_a_type (type_node);
7818 else if (type->node_type () == AST_Decl::NT_except)
7820 idl_global->err ()->not_a_type (type_node);
7822 else
7824 AST_Decl *d = ScopeAsDecl (scope);
7825 AST_Decl::NodeType nt = d->node_type ();
7826 const bool local = scope->is_local ()
7827 || nt == AST_Decl::NT_valuetype
7828 || nt == AST_Decl::NT_eventtype;
7830 op = idl_global->gen ()->create_operation (
7831 type, op_flags, &name, local, scope->is_abstract ());
7833 if (!local && type->is_local ())
7835 idl_global->err ()->local_remote_mismatch (type, op);
7836 op->destroy ();
7837 delete op;
7838 op = 0;
7840 else
7842 scope->fe_add_operation (op);
7848 * Push the operation scope onto the scopes stack.
7850 idl_global->scopes ().push (op);
7852 #line 7853 "fe/idl.tab.cpp"
7853 break;
7855 case 406: /* $@118: %empty */
7856 #line 4775 "fe/idl.ypp"
7858 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
7860 #line 7861 "fe/idl.tab.cpp"
7861 break;
7863 case 407: /* $@119: %empty */
7864 #line 4779 "fe/idl.ypp"
7866 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
7868 #line 7869 "fe/idl.tab.cpp"
7869 break;
7871 case 408: /* operation: opt_op_attribute op_type_spec $@116 IDENTIFIER $@117 parameter_list $@118 opt_raises $@119 opt_context */
7872 #line 4783 "fe/idl.ypp"
7874 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7875 AST_Operation *o = 0;
7876 idl_global->set_parse_state (IDL_GlobalData::PS_OpCompleted);
7879 * Add exceptions and context to the operation.
7881 if (s != 0 && s->scope_node_type () == AST_Decl::NT_op)
7883 o = dynamic_cast<AST_Operation*> (s);
7885 if ((yyvsp[-2].nlval) != 0 && o != 0)
7887 (void) o->fe_add_exceptions ((yyvsp[-2].nlval));
7890 if ((yyvsp[0].slval) != 0)
7892 (void) o->fe_add_context ((yyvsp[0].slval));
7897 * Done with this operation. Pop its scope from the scopes stack.
7899 idl_global->scopes ().pop ();
7901 (yyval.dcval) = o;
7903 #line 7904 "fe/idl.tab.cpp"
7904 break;
7906 case 409: /* opt_op_attribute: IDL_ONEWAY */
7907 #line 4817 "fe/idl.ypp"
7909 idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
7910 (yyval.ofval) = AST_Operation::OP_oneway;
7912 #line 7913 "fe/idl.tab.cpp"
7913 break;
7915 case 410: /* opt_op_attribute: IDL_IDEMPOTENT */
7916 #line 4822 "fe/idl.ypp"
7918 idl_global->set_parse_state (IDL_GlobalData::PS_OpAttrSeen);
7919 (yyval.ofval) = AST_Operation::OP_idempotent;
7921 #line 7922 "fe/idl.tab.cpp"
7922 break;
7924 case 411: /* opt_op_attribute: %empty */
7925 #line 4827 "fe/idl.ypp"
7927 (yyval.ofval) = AST_Operation::OP_noflags;
7929 #line 7930 "fe/idl.tab.cpp"
7930 break;
7932 case 413: /* op_type_spec: IDL_VOID */
7933 #line 4835 "fe/idl.ypp"
7935 (yyval.dcval) =
7936 idl_global->scopes ().bottom ()->lookup_primitive_type (
7937 AST_Expression::EV_void
7940 #line 7941 "fe/idl.tab.cpp"
7941 break;
7943 case 414: /* $@120: %empty */
7944 #line 4845 "fe/idl.ypp"
7946 //@@ PS_FactorySeen?
7947 idl_global->set_parse_state (IDL_GlobalData::PS_OpTypeSeen);
7949 #line 7950 "fe/idl.tab.cpp"
7950 break;
7952 case 415: /* @121: %empty */
7953 #line 4850 "fe/idl.ypp"
7955 UTL_Scope *s = idl_global->scopes ().top_non_null ();
7957 if (s->is_abstract ())
7959 //@@ Fire error
7960 ACE_ERROR ((LM_ERROR,
7961 ACE_TEXT ("error in %C line %d:\n")
7962 ACE_TEXT ("Abstract valuetype can't have a ")
7963 ACE_TEXT ("factory construct.\n"),
7964 idl_global->filename ()->get_string (),
7965 idl_global->lineno ()));
7967 idl_global->set_err_count (idl_global->err_count () + 1);
7970 Identifier id ((yyvsp[0].strval));
7971 ACE::strdelete ((yyvsp[0].strval));
7972 (yyvsp[0].strval) = 0;
7974 UTL_ScopedName n (&id,
7976 AST_Factory *factory = 0;
7977 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
7980 * Create a node representing an factory construct
7981 * and add it to its enclosing scope
7983 if (s != 0)
7985 factory = idl_global->gen ()->create_factory (&n);
7986 (void) s->fe_add_factory (factory);
7990 * Push the operation scope onto the scopes stack.
7992 idl_global->scopes ().push (factory);
7994 (yyval.dcval) = factory;
7996 #line 7997 "fe/idl.tab.cpp"
7997 break;
7999 case 416: /* $@122: %empty */
8000 #line 4893 "fe/idl.ypp"
8002 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
8004 #line 8005 "fe/idl.tab.cpp"
8005 break;
8007 case 417: /* init_decl: IDL_FACTORY $@120 IDENTIFIER @121 init_parameter_list $@122 opt_raises */
8008 #line 4897 "fe/idl.ypp"
8010 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
8012 if ((yyvsp[0].nlval))
8014 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8015 AST_Factory *f = dynamic_cast<AST_Factory*> (s);
8016 (void) f->fe_add_exceptions ((yyvsp[0].nlval));
8019 idl_global->scopes ().pop ();
8021 (yyval.dcval) = (yyvsp[-3].dcval);
8023 #line 8024 "fe/idl.tab.cpp"
8024 break;
8026 case 418: /* $@123: %empty */
8027 #line 4915 "fe/idl.ypp"
8029 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8031 #line 8032 "fe/idl.tab.cpp"
8032 break;
8034 case 419: /* init_parameter_list: '(' $@123 ')' */
8035 #line 4919 "fe/idl.ypp"
8037 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8039 #line 8040 "fe/idl.tab.cpp"
8040 break;
8042 case 420: /* $@124: %empty */
8043 #line 4923 "fe/idl.ypp"
8045 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8047 #line 8048 "fe/idl.tab.cpp"
8048 break;
8050 case 421: /* init_parameter_list: '(' $@124 at_least_one_in_parameter ')' */
8051 #line 4928 "fe/idl.ypp"
8053 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8055 #line 8056 "fe/idl.tab.cpp"
8056 break;
8058 case 423: /* $@125: %empty */
8059 #line 4938 "fe/idl.ypp"
8061 idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
8063 #line 8064 "fe/idl.tab.cpp"
8064 break;
8066 case 426: /* $@126: %empty */
8067 #line 4947 "fe/idl.ypp"
8069 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
8071 #line 8072 "fe/idl.tab.cpp"
8072 break;
8074 case 427: /* $@127: %empty */
8075 #line 4951 "fe/idl.ypp"
8077 idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
8079 #line 8080 "fe/idl.tab.cpp"
8080 break;
8082 case 428: /* in_parameter: IDL_IN $@126 param_type_spec $@127 declarator */
8083 #line 4955 "fe/idl.ypp"
8085 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8086 AST_Argument *a = 0;
8087 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
8090 * Create a node representing an argument to an operation
8091 * Add it to the enclosing scope (the operation scope).
8093 if ((yyvsp[-2].dcval) != 0
8094 && (yyvsp[0].deval) != 0 &&
8095 s != 0)
8097 AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval));
8099 if (tp != 0)
8101 a = idl_global->gen ()->create_argument (
8102 AST_Argument::dir_IN,
8104 (yyvsp[0].deval)->name ()
8107 (void) s->fe_add_argument (a);
8111 (yyvsp[0].deval)->destroy ();
8112 delete (yyvsp[0].deval);
8113 (yyvsp[0].deval) = 0;
8115 #line 8116 "fe/idl.tab.cpp"
8116 break;
8118 case 429: /* $@128: %empty */
8119 #line 4990 "fe/idl.ypp"
8121 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8123 #line 8124 "fe/idl.tab.cpp"
8124 break;
8126 case 430: /* parameter_list: '(' $@128 ')' */
8127 #line 4994 "fe/idl.ypp"
8129 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8131 #line 8132 "fe/idl.tab.cpp"
8132 break;
8134 case 431: /* $@129: %empty */
8135 #line 4998 "fe/idl.ypp"
8137 idl_global->set_parse_state (IDL_GlobalData::PS_OpSqSeen);
8139 #line 8140 "fe/idl.tab.cpp"
8140 break;
8142 case 432: /* parameter_list: '(' $@129 at_least_one_parameter ')' */
8143 #line 5003 "fe/idl.ypp"
8145 idl_global->set_parse_state (IDL_GlobalData::PS_OpQsSeen);
8147 #line 8148 "fe/idl.tab.cpp"
8148 break;
8150 case 434: /* $@130: %empty */
8151 #line 5013 "fe/idl.ypp"
8153 idl_global->set_parse_state (IDL_GlobalData::PS_OpParCommaSeen);
8155 #line 8156 "fe/idl.tab.cpp"
8156 break;
8158 case 437: /* $@131: %empty */
8159 #line 5022 "fe/idl.ypp"
8161 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDirSeen);
8163 #line 8164 "fe/idl.tab.cpp"
8164 break;
8166 case 438: /* $@132: %empty */
8167 #line 5026 "fe/idl.ypp"
8169 idl_global->set_parse_state (IDL_GlobalData::PS_OpParTypeSeen);
8171 #line 8172 "fe/idl.tab.cpp"
8172 break;
8174 case 439: /* parameter: direction $@131 param_type_spec $@132 declarator */
8175 #line 5030 "fe/idl.ypp"
8177 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8178 AST_Argument *a = 0;
8179 idl_global->set_parse_state (IDL_GlobalData::PS_OpParDeclSeen);
8182 * Create a node representing an argument to an operation
8183 * Add it to the enclosing scope (the operation scope).
8185 if ((yyvsp[-2].dcval) != 0
8186 && (yyvsp[0].deval) != 0
8187 && s != 0)
8189 AST_Type *tp = (yyvsp[0].deval)->compose ((yyvsp[-2].dcval));
8191 if (tp != 0)
8193 if (!s->is_local () && tp->is_local ())
8195 idl_global->err ()->local_remote_mismatch (tp, s);
8197 else
8200 idl_global->gen ()->create_argument (
8201 (yyvsp[-4].dival),
8203 (yyvsp[0].deval)->name ()
8205 (void) s->fe_add_argument (a);
8210 (yyvsp[0].deval)->destroy ();
8211 delete (yyvsp[0].deval);
8212 (yyvsp[0].deval) = 0;
8214 #line 8215 "fe/idl.tab.cpp"
8215 break;
8217 case 440: /* param_type_spec: base_type_spec */
8218 #line 5072 "fe/idl.ypp"
8220 (yyval.dcval) =
8221 idl_global->scopes ().bottom ()->lookup_primitive_type (
8222 (yyvsp[0].etval)
8225 #line 8226 "fe/idl.tab.cpp"
8226 break;
8228 case 443: /* param_type_spec: scoped_name */
8229 #line 5081 "fe/idl.ypp"
8231 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8232 AST_Decl *d = 0;
8233 UTL_ScopedName *n = (yyvsp[0].idlist);
8235 if (s != 0)
8237 d = s->lookup_by_name (n, false, false);
8240 if (d == 0)
8242 idl_global->err ()->lookup_error (n);
8243 (yyvsp[0].idlist)->destroy ();
8244 (yyvsp[0].idlist) = 0;
8246 /* If we don't return here, we'll crash later.*/
8247 return 1;
8249 else
8251 d->last_referenced_as ((yyvsp[0].idlist));
8252 AST_Decl::NodeType nt = d->node_type ();
8253 AST_Type *t = dynamic_cast<AST_Type*> (d);
8254 AST_Typedef *td = 0;
8255 bool can_be_undefined = false;
8257 if (nt == AST_Decl::NT_typedef)
8259 // This code block ensures that a sequence of
8260 // as-yet-undefined struct or union isn't used
8261 // as a return type or argument.
8262 td = dynamic_cast<AST_Typedef*> (d);
8263 AST_Type *pbt = td->primitive_base_type ();
8265 if (pbt->node_type () == AST_Decl::NT_sequence)
8267 t = pbt;
8268 AST_Sequence *seq_type =
8269 dynamic_cast<AST_Sequence*> (pbt);
8270 AST_Type *elem_type =
8271 seq_type->base_type ();
8272 AST_Decl::NodeType elem_nt =
8273 elem_type->node_type ();
8275 if (elem_nt == AST_Decl::NT_typedef)
8277 AST_Typedef *elem_td =
8278 dynamic_cast<AST_Typedef*> (elem_type);
8279 elem_type = elem_td->primitive_base_type ();
8280 elem_nt = elem_type->node_type ();
8283 if (elem_nt == AST_Decl::NT_interface
8284 || elem_nt == AST_Decl::NT_interface_fwd
8285 || elem_nt == AST_Decl::NT_valuetype
8286 || elem_nt == AST_Decl::NT_valuetype_fwd
8287 || elem_nt == AST_Decl::NT_component
8288 || elem_nt == AST_Decl::NT_component_fwd)
8290 can_be_undefined = true;
8294 if (pbt->node_type() == AST_Decl::NT_map)
8296 t = pbt;
8297 AST_Map *map_type =
8298 dynamic_cast<AST_Map*> (pbt);
8299 AST_Type *key_type =
8300 map_type->key_type ();
8301 AST_Type *val_type =
8302 map_type->value_type ();
8304 AST_Decl::NodeType key_nt =
8305 key_type->node_type ();
8306 AST_Decl::NodeType val_nt =
8307 val_type->node_type ();
8309 if (key_nt == AST_Decl::NT_typedef)
8311 AST_Typedef *key_td =
8312 dynamic_cast<AST_Typedef*> (key_type);
8313 key_type = key_td->primitive_base_type ();
8314 key_nt = key_type->node_type ();
8317 if (val_nt == AST_Decl::NT_typedef)
8319 AST_Typedef *val_td =
8320 dynamic_cast<AST_Typedef*> (val_type);
8321 val_type = val_td->primitive_base_type ();
8322 val_nt = val_type->node_type ();
8325 if (key_nt == AST_Decl::NT_interface
8326 || key_nt == AST_Decl::NT_interface_fwd
8327 || key_nt == AST_Decl::NT_valuetype
8328 || key_nt == AST_Decl::NT_valuetype_fwd
8329 || key_nt == AST_Decl::NT_component
8330 || key_nt == AST_Decl::NT_component_fwd
8331 || val_nt == AST_Decl::NT_interface
8332 || val_nt == AST_Decl::NT_interface_fwd
8333 || val_nt == AST_Decl::NT_valuetype
8334 || val_nt == AST_Decl::NT_valuetype_fwd
8335 || val_nt == AST_Decl::NT_component
8336 || val_nt == AST_Decl::NT_component_fwd)
8338 can_be_undefined = true;
8342 if (! t->is_defined () && ! can_be_undefined)
8344 idl_global->err ()->error1 (
8345 UTL_Error::EIDL_ILLEGAL_ADD,
8346 (nt == AST_Decl::NT_typedef ? td : t));
8348 /* If we don't return here, we'll crash later.*/
8349 return 1;
8352 else
8354 // For forward declared structs and unions, we
8355 // want the full definition, but we need to
8356 // check that it's been fully defined.
8357 AST_StructureFwd *fwd =
8358 dynamic_cast<AST_StructureFwd*> (d);
8360 if (fwd != 0)
8362 t = fwd->full_definition ();
8364 if (! t->is_defined ())
8366 idl_global->err ()->error1 (
8367 UTL_Error::EIDL_ILLEGAL_ADD,
8370 /* If we don't return here, we'll crash later.*/
8371 return 1;
8374 d = t;
8379 (yyval.dcval) = d;
8381 #line 8382 "fe/idl.tab.cpp"
8382 break;
8384 case 444: /* direction: IDL_IN */
8385 #line 5236 "fe/idl.ypp"
8387 (yyval.dival) = AST_Argument::dir_IN;
8389 #line 8390 "fe/idl.tab.cpp"
8390 break;
8392 case 445: /* direction: IDL_OUT */
8393 #line 5240 "fe/idl.ypp"
8395 (yyval.dival) = AST_Argument::dir_OUT;
8397 #line 8398 "fe/idl.tab.cpp"
8398 break;
8400 case 446: /* direction: IDL_INOUT */
8401 #line 5244 "fe/idl.ypp"
8403 (yyval.dival) = AST_Argument::dir_INOUT;
8405 #line 8406 "fe/idl.tab.cpp"
8406 break;
8408 case 447: /* $@133: %empty */
8409 #line 5251 "fe/idl.ypp"
8411 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSeen);
8413 #line 8414 "fe/idl.tab.cpp"
8414 break;
8416 case 448: /* $@134: %empty */
8417 #line 5255 "fe/idl.ypp"
8419 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseSqSeen);
8421 #line 8422 "fe/idl.tab.cpp"
8422 break;
8424 case 449: /* opt_raises: IDL_RAISES $@133 '(' $@134 at_least_one_scoped_name ')' */
8425 #line 5260 "fe/idl.ypp"
8427 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseQsSeen);
8428 (yyval.nlval) = (yyvsp[-1].nlval);
8430 #line 8431 "fe/idl.tab.cpp"
8431 break;
8433 case 450: /* opt_raises: %empty */
8434 #line 5265 "fe/idl.ypp"
8436 (yyval.nlval) = 0;
8438 #line 8439 "fe/idl.tab.cpp"
8439 break;
8441 case 451: /* $@135: %empty */
8442 #line 5272 "fe/idl.ypp"
8444 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSeen);
8446 #line 8447 "fe/idl.tab.cpp"
8447 break;
8449 case 452: /* $@136: %empty */
8450 #line 5276 "fe/idl.ypp"
8452 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseSqSeen);
8454 #line 8455 "fe/idl.tab.cpp"
8455 break;
8457 case 453: /* opt_getraises: IDL_GETRAISES $@135 '(' $@136 at_least_one_scoped_name ')' */
8458 #line 5281 "fe/idl.ypp"
8460 idl_global->set_parse_state (IDL_GlobalData::PS_OpGetRaiseQsSeen);
8461 (yyval.nlval) = (yyvsp[-1].nlval);
8463 #line 8464 "fe/idl.tab.cpp"
8464 break;
8466 case 454: /* opt_getraises: %empty */
8467 #line 5286 "fe/idl.ypp"
8469 (yyval.nlval) = 0;
8471 #line 8472 "fe/idl.tab.cpp"
8472 break;
8474 case 455: /* $@137: %empty */
8475 #line 5293 "fe/idl.ypp"
8477 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSeen);
8479 #line 8480 "fe/idl.tab.cpp"
8480 break;
8482 case 456: /* $@138: %empty */
8483 #line 5297 "fe/idl.ypp"
8485 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseSqSeen);
8487 #line 8488 "fe/idl.tab.cpp"
8488 break;
8490 case 457: /* opt_setraises: IDL_SETRAISES $@137 '(' $@138 at_least_one_scoped_name ')' */
8491 #line 5302 "fe/idl.ypp"
8493 idl_global->set_parse_state (IDL_GlobalData::PS_OpSetRaiseQsSeen);
8494 (yyval.nlval) = (yyvsp[-1].nlval);
8496 #line 8497 "fe/idl.tab.cpp"
8497 break;
8499 case 458: /* opt_setraises: %empty */
8500 #line 5307 "fe/idl.ypp"
8502 (yyval.nlval) = 0;
8504 #line 8505 "fe/idl.tab.cpp"
8505 break;
8507 case 459: /* $@139: %empty */
8508 #line 5314 "fe/idl.ypp"
8510 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSeen);
8512 #line 8513 "fe/idl.tab.cpp"
8513 break;
8515 case 460: /* $@140: %empty */
8516 #line 5318 "fe/idl.ypp"
8518 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextSqSeen);
8520 #line 8521 "fe/idl.tab.cpp"
8521 break;
8523 case 461: /* opt_context: IDL_CONTEXT $@139 '(' $@140 at_least_one_string_literal ')' */
8524 #line 5323 "fe/idl.ypp"
8526 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextQsSeen);
8527 (yyval.slval) = (yyvsp[-1].slval);
8529 #line 8530 "fe/idl.tab.cpp"
8530 break;
8532 case 462: /* opt_context: %empty */
8533 #line 5328 "fe/idl.ypp"
8535 (yyval.slval) = 0;
8537 #line 8538 "fe/idl.tab.cpp"
8538 break;
8540 case 463: /* at_least_one_string_literal: IDL_STRING_LITERAL string_literals */
8541 #line 5335 "fe/idl.ypp"
8543 ACE_NEW_RETURN ((yyval.slval),
8544 UTL_StrList ((yyvsp[-1].sval),
8545 (yyvsp[0].slval)),
8548 #line 8549 "fe/idl.tab.cpp"
8549 break;
8551 case 464: /* $@141: %empty */
8552 #line 5346 "fe/idl.ypp"
8554 idl_global->set_parse_state (IDL_GlobalData::PS_OpContextCommaSeen);
8556 #line 8557 "fe/idl.tab.cpp"
8557 break;
8559 case 465: /* string_literals: string_literals ',' $@141 IDL_STRING_LITERAL */
8560 #line 5350 "fe/idl.ypp"
8562 UTL_StrList *sl = 0;
8563 ACE_NEW_RETURN (sl,
8564 UTL_StrList ((yyvsp[0].sval),
8568 if ((yyvsp[-3].slval) == 0)
8570 (yyval.slval) = sl;
8572 else
8574 (yyvsp[-3].slval)->nconc (sl);
8575 (yyval.slval) = (yyvsp[-3].slval);
8578 #line 8579 "fe/idl.tab.cpp"
8579 break;
8581 case 466: /* string_literals: %empty */
8582 #line 5368 "fe/idl.ypp"
8584 (yyval.slval) = 0;
8586 #line 8587 "fe/idl.tab.cpp"
8587 break;
8589 case 467: /* typeid_dcl: IDL_TYPEID scoped_name IDL_STRING_LITERAL */
8590 #line 5375 "fe/idl.ypp"
8592 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8593 AST_Decl *d =
8594 s->lookup_by_name ((yyvsp[-1].idlist));
8596 if (d == 0)
8598 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
8600 else
8602 d->set_id_with_typeid (
8603 (yyvsp[0].sval)->get_string ()
8607 (yyvsp[-1].idlist)->destroy ();
8608 delete (yyvsp[-1].idlist);
8609 (yyvsp[-1].idlist) = 0;
8611 (yyvsp[0].sval)->destroy ();
8612 delete (yyvsp[0].sval);
8613 (yyvsp[0].sval) = 0;
8615 (yyval.dcval) = 0;
8617 #line 8618 "fe/idl.tab.cpp"
8618 break;
8620 case 468: /* typeprefix_dcl: IDL_TYPEPREFIX scoped_name IDL_STRING_LITERAL */
8621 #line 5405 "fe/idl.ypp"
8623 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8624 AST_Decl *d = ScopeAsDecl (s);
8626 // If we are in a module, we want to avoid a lookup unless the
8627 // typeprefix is to be applied to some other scope, since we
8628 // might get a previous opening of the module, and the prefix
8629 // of this opening would never get checked or set.
8630 if (d->name ()->compare ((yyvsp[-1].idlist)) != 0)
8633 s->lookup_by_name ((yyvsp[-1].idlist));
8636 if (d == 0)
8638 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
8640 else
8642 d->set_prefix_with_typeprefix (
8643 (yyvsp[0].sval)->get_string ()
8647 (yyvsp[-1].idlist)->destroy ();
8648 delete (yyvsp[-1].idlist);
8649 (yyvsp[-1].idlist) = 0;
8651 (yyvsp[0].sval)->destroy ();
8652 delete (yyvsp[0].sval);
8653 (yyvsp[0].sval) = 0;
8655 (yyval.dcval) = 0;
8657 #line 8658 "fe/idl.tab.cpp"
8658 break;
8660 case 471: /* component_forward_decl: IDL_COMPONENT defining_id */
8661 #line 5450 "fe/idl.ypp"
8663 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8664 UTL_ScopedName n ((yyvsp[0].idval),
8666 AST_ComponentFwd *f = 0;
8667 idl_global->set_parse_state (
8668 IDL_GlobalData::PS_ComponentForwardSeen
8672 * Create a node representing a forward declaration of a
8673 * component. Store it in the enclosing scope.
8675 if (s != 0)
8677 f = idl_global->gen ()->create_component_fwd (&n);
8678 (void) s->fe_add_component_fwd (f);
8681 (yyvsp[0].idval)->destroy ();
8682 delete (yyvsp[0].idval);
8683 (yyvsp[0].idval) = 0;
8685 (yyval.dcval) = 0;
8687 #line 8688 "fe/idl.tab.cpp"
8688 break;
8690 case 472: /* @142: %empty */
8691 #line 5479 "fe/idl.ypp"
8693 FE_ComponentHeader *&component_header = (yyvsp[0].chval);
8694 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
8695 AST_Component *component = 0;
8698 * Make a new component node and add it to the enclosing scope.
8700 if (scope && component_header)
8702 component = idl_global->gen ()->create_component (
8703 component_header->name (),
8704 component_header->base_component (),
8705 component_header->supports (),
8706 component_header->n_supports (),
8707 component_header->supports_flat (),
8708 component_header->n_supports_flat ());
8709 AST_Interface *component_as_interface =
8710 dynamic_cast<AST_Interface *> (component);
8711 AST_Interface::fwd_redefinition_helper (
8712 component_as_interface, scope);
8713 component = dynamic_cast<AST_Component *> (component_as_interface);
8716 * Add the component to its definition scope.
8718 scope->fe_add_component (component);
8720 // This FE_ComponentHeader class isn't destroyed with the AST.
8721 component_header->destroy ();
8722 delete component_header;
8723 component_header = 0;
8727 * Push it on the scope stack.
8729 idl_global->scopes ().push (component);
8731 (yyval.dcval) = component;
8733 #line 8734 "fe/idl.tab.cpp"
8734 break;
8736 case 473: /* $@143: %empty */
8737 #line 5521 "fe/idl.ypp"
8739 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentSqSeen);
8741 #line 8742 "fe/idl.tab.cpp"
8742 break;
8744 case 474: /* $@144: %empty */
8745 #line 5525 "fe/idl.ypp"
8747 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentBodySeen);
8749 #line 8750 "fe/idl.tab.cpp"
8750 break;
8752 case 475: /* component_decl: component_header @142 '{' $@143 component_exports $@144 '}' */
8753 #line 5529 "fe/idl.ypp"
8755 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentQsSeen);
8758 * Done with this component - pop it off the scopes stack.
8760 idl_global->scopes ().pop ();
8762 (yyval.dcval) = (yyvsp[-5].dcval);
8764 #line 8765 "fe/idl.tab.cpp"
8765 break;
8767 case 476: /* $@145: %empty */
8768 #line 5544 "fe/idl.ypp"
8770 idl_global->set_parse_state (IDL_GlobalData::PS_ComponentIDSeen);
8772 #line 8773 "fe/idl.tab.cpp"
8773 break;
8775 case 477: /* $@146: %empty */
8776 #line 5548 "fe/idl.ypp"
8778 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
8780 #line 8781 "fe/idl.tab.cpp"
8781 break;
8783 case 478: /* component_header: IDL_COMPONENT defining_id $@145 component_inheritance_spec $@146 supports_spec */
8784 #line 5552 "fe/idl.ypp"
8786 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
8789 * Create an AST representation of the information in the header
8790 * part of a component.
8792 UTL_ScopedName *n = 0;
8793 ACE_NEW_RETURN (n,
8794 UTL_ScopedName ((yyvsp[-4].idval),
8797 ACE_NEW_RETURN ((yyval.chval),
8798 FE_ComponentHeader (n,
8799 (yyvsp[-2].idlist),
8800 (yyvsp[0].nlval),
8801 false),
8804 if (0 != (yyvsp[0].nlval))
8806 (yyvsp[0].nlval)->destroy ();
8807 delete (yyvsp[0].nlval);
8808 (yyvsp[0].nlval) = 0;
8811 if (0 != (yyvsp[-2].idlist))
8813 (yyvsp[-2].idlist)->destroy ();
8814 delete (yyvsp[-2].idlist);
8815 (yyvsp[-2].idlist) = 0;
8818 #line 8819 "fe/idl.tab.cpp"
8819 break;
8821 case 479: /* $@147: %empty */
8822 #line 5589 "fe/idl.ypp"
8824 idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
8826 #line 8827 "fe/idl.tab.cpp"
8827 break;
8829 case 480: /* component_inheritance_spec: ':' $@147 scoped_name */
8830 #line 5593 "fe/idl.ypp"
8832 (yyval.idlist) = (yyvsp[0].idlist);
8834 #line 8835 "fe/idl.tab.cpp"
8835 break;
8837 case 481: /* component_inheritance_spec: %empty */
8838 #line 5597 "fe/idl.ypp"
8840 (yyval.idlist) = 0;
8842 #line 8843 "fe/idl.tab.cpp"
8843 break;
8845 case 482: /* component_exports: component_exports at_least_one_annotation component_export */
8846 #line 5604 "fe/idl.ypp"
8848 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
8849 AST_Decl *&node = (yyvsp[0].dcval);
8850 if (node)
8852 node->annotation_appls (*annotations);
8854 else
8856 idl_global->err ()-> unsupported_warning (
8857 "Annotating this is not supported");
8859 delete annotations;
8861 #line 8862 "fe/idl.tab.cpp"
8862 break;
8864 case 485: /* $@148: %empty */
8865 #line 5624 "fe/idl.ypp"
8867 idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
8869 #line 8870 "fe/idl.tab.cpp"
8870 break;
8872 case 486: /* component_export: provides_decl $@148 ';' */
8873 #line 5628 "fe/idl.ypp"
8875 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8876 (yyval.dcval) = (yyvsp[-2].dcval);
8878 #line 8879 "fe/idl.tab.cpp"
8879 break;
8881 case 487: /* $@149: %empty */
8882 #line 5633 "fe/idl.ypp"
8884 idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
8886 #line 8887 "fe/idl.tab.cpp"
8887 break;
8889 case 488: /* component_export: uses_decl $@149 ';' */
8890 #line 5637 "fe/idl.ypp"
8892 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8893 (yyval.dcval) = (yyvsp[-2].dcval);
8895 #line 8896 "fe/idl.tab.cpp"
8896 break;
8898 case 489: /* $@150: %empty */
8899 #line 5642 "fe/idl.ypp"
8901 idl_global->set_parse_state (IDL_GlobalData::PS_EmitsDeclSeen);
8903 #line 8904 "fe/idl.tab.cpp"
8904 break;
8906 case 490: /* component_export: emits_decl $@150 ';' */
8907 #line 5646 "fe/idl.ypp"
8909 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8910 (yyval.dcval) = (yyvsp[-2].dcval);
8912 #line 8913 "fe/idl.tab.cpp"
8913 break;
8915 case 491: /* $@151: %empty */
8916 #line 5651 "fe/idl.ypp"
8918 idl_global->set_parse_state (IDL_GlobalData::PS_PublishesDeclSeen);
8920 #line 8921 "fe/idl.tab.cpp"
8921 break;
8923 case 492: /* component_export: publishes_decl $@151 ';' */
8924 #line 5655 "fe/idl.ypp"
8926 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8927 (yyval.dcval) = (yyvsp[-2].dcval);
8929 #line 8930 "fe/idl.tab.cpp"
8930 break;
8932 case 493: /* $@152: %empty */
8933 #line 5660 "fe/idl.ypp"
8935 idl_global->set_parse_state (IDL_GlobalData::PS_ConsumesDeclSeen);
8937 #line 8938 "fe/idl.tab.cpp"
8938 break;
8940 case 494: /* component_export: consumes_decl $@152 ';' */
8941 #line 5664 "fe/idl.ypp"
8943 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8944 (yyval.dcval) = (yyvsp[-2].dcval);
8946 #line 8947 "fe/idl.tab.cpp"
8947 break;
8949 case 495: /* $@153: %empty */
8950 #line 5669 "fe/idl.ypp"
8952 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
8954 #line 8955 "fe/idl.tab.cpp"
8955 break;
8957 case 496: /* component_export: attribute $@153 ';' */
8958 #line 5673 "fe/idl.ypp"
8960 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8961 (yyval.dcval) = (yyvsp[-2].dcval);
8963 #line 8964 "fe/idl.tab.cpp"
8964 break;
8966 case 497: /* $@154: %empty */
8967 #line 5678 "fe/idl.ypp"
8969 idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
8971 #line 8972 "fe/idl.tab.cpp"
8972 break;
8974 case 498: /* component_export: extended_port_decl $@154 ';' */
8975 #line 5682 "fe/idl.ypp"
8977 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
8978 (yyval.dcval) = (yyvsp[-2].dcval);
8980 #line 8981 "fe/idl.tab.cpp"
8981 break;
8983 case 499: /* provides_decl: IDL_PROVIDES interface_type id */
8984 #line 5689 "fe/idl.ypp"
8986 UTL_Scope *s = idl_global->scopes ().top_non_null ();
8987 bool so_far_so_good = true;
8988 AST_Decl::NodeType nt = AST_Decl::NT_type;
8989 AST_Param_Holder *ph = 0;
8991 AST_Decl *d =
8992 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
8994 if (d == 0)
8996 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
8997 so_far_so_good = false;
8999 else
9001 int compare = 0;
9002 nt = d->node_type ();
9004 switch (nt)
9006 case AST_Decl::NT_interface:
9007 break;
9008 case AST_Decl::NT_param_holder:
9009 ph = dynamic_cast<AST_Param_Holder*> (d);
9010 nt = ph->info ()->type_;
9012 if (nt != AST_Decl::NT_type
9013 && nt != AST_Decl::NT_interface)
9015 idl_global->err ()->mismatched_template_param (
9016 ph->info ()->name_.c_str ());
9018 so_far_so_good = false;
9021 break;
9022 case AST_Decl::NT_pre_defined:
9023 // Nothing else but CORBA::Object can have
9024 // this identifier.
9025 compare =
9026 ACE_OS::strcmp (d->local_name ()->get_string (),
9027 "Object");
9029 // Simple provides port must use IDL interface
9030 // or CORBA::Object.
9031 if (compare != 0)
9033 idl_global->err ()->interface_expected (d);
9034 so_far_so_good = false;
9037 break;
9038 default:
9039 idl_global->err ()->interface_expected (d);
9040 so_far_so_good = false;
9041 break;
9045 AST_Provides *provides = 0;
9047 if (so_far_so_good)
9049 AST_Type *port_interface_type =
9050 dynamic_cast<AST_Type*> (d);
9052 // Strip off _cxx_, if any, for port name.
9053 FE_Utils::original_local_name ((yyvsp[0].idval));
9055 UTL_ScopedName sn ((yyvsp[0].idval),
9058 provides = idl_global->gen ()->create_provides (
9059 &sn, port_interface_type);
9061 (void) s->fe_add_provides (provides);
9064 (yyvsp[-1].idlist)->destroy ();
9065 delete (yyvsp[-1].idlist);
9066 (yyvsp[-1].idlist) = 0;
9068 (yyvsp[0].idval)->destroy ();
9069 delete (yyvsp[0].idval);
9070 (yyvsp[0].idval) = 0;
9072 (yyval.dcval) = dynamic_cast<AST_Decl *> (provides);
9074 #line 9075 "fe/idl.tab.cpp"
9075 break;
9077 case 500: /* interface_type: scoped_name */
9078 #line 5782 "fe/idl.ypp"
9080 // Lookups and checking are done where the 'interface_type'
9081 // token is used, in 'provides_decl' and 'uses_decl'.
9082 (yyval.idlist) = (yyvsp[0].idlist);
9084 #line 9085 "fe/idl.tab.cpp"
9085 break;
9087 case 501: /* interface_type: IDL_OBJECT */
9088 #line 5788 "fe/idl.ypp"
9090 Identifier *corba_id = 0;
9092 ACE_NEW_RETURN (corba_id,
9093 Identifier ("Object"),
9096 UTL_IdList *conc_name = 0;
9097 ACE_NEW_RETURN (conc_name,
9098 UTL_IdList (corba_id,
9102 ACE_NEW_RETURN (corba_id,
9103 Identifier ("CORBA"),
9106 ACE_NEW_RETURN ((yyval.idlist),
9107 UTL_IdList (corba_id,
9108 conc_name),
9111 #line 9112 "fe/idl.tab.cpp"
9112 break;
9114 case 502: /* uses_decl: uses_opt_multiple interface_type id */
9115 #line 5813 "fe/idl.ypp"
9117 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9118 bool so_far_so_good = true;
9119 AST_Decl::NodeType nt = AST_Decl::NT_type;
9120 AST_Param_Holder *ph = 0;
9122 AST_Decl *d =
9123 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9125 if (d == 0)
9127 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9128 so_far_so_good = false;
9130 else
9132 int compare = 0;
9133 nt = d->node_type ();
9135 switch (nt)
9137 case AST_Decl::NT_interface:
9138 break;
9139 case AST_Decl::NT_param_holder:
9140 ph = dynamic_cast<AST_Param_Holder*> (d);
9141 nt = ph->info ()->type_;
9143 if (nt != AST_Decl::NT_type
9144 && nt != AST_Decl::NT_interface)
9146 idl_global->err ()->mismatched_template_param (
9147 ph->info ()->name_.c_str ());
9149 so_far_so_good = false;
9152 break;
9153 case AST_Decl::NT_pre_defined:
9154 // Nothing else but CORBA::Object can have
9155 // this identifier.
9156 compare =
9157 ACE_OS::strcmp (d->local_name ()->get_string (),
9158 "Object");
9160 // Simple provides port must use IDL interface
9161 // or CORBA::Object.
9162 if (compare != 0)
9164 idl_global->err ()->interface_expected (d);
9165 so_far_so_good = false;
9168 break;
9169 default:
9170 idl_global->err ()->interface_expected (d);
9171 so_far_so_good = false;
9172 break;
9176 AST_Uses *uses = 0;
9178 if (so_far_so_good)
9180 AST_Type *port_interface_type =
9181 dynamic_cast<AST_Type*> (d);
9183 // Strip off _cxx_, if any, for port name.
9184 FE_Utils::original_local_name ((yyvsp[0].idval));
9186 UTL_ScopedName sn ((yyvsp[0].idval),
9189 uses = idl_global->gen ()->create_uses (
9190 &sn, port_interface_type, (yyvsp[-2].bval));
9191 s->fe_add_uses (uses);
9193 AST_Component *c =
9194 dynamic_cast<AST_Component*> (s);
9196 if (c != 0
9197 && uses->is_multiple ()
9198 && !idl_global->using_ifr_backend ()
9199 && !idl_global->ignore_idl3 ()
9200 && nt != AST_Decl::NT_param_holder)
9202 // These datatypes must be created in the
9203 // front end so they can be looked up
9204 // when compiling the generated executor IDL.
9205 FE_Utils::create_uses_multiple_stuff (c, uses);
9209 (yyvsp[-1].idlist)->destroy ();
9210 delete (yyvsp[-1].idlist);
9211 (yyvsp[-1].idlist) = 0;
9213 (yyvsp[0].idval)->destroy ();
9214 delete (yyvsp[0].idval);
9215 (yyvsp[0].idval) = 0;
9217 (yyval.dcval) = uses;
9219 #line 9220 "fe/idl.tab.cpp"
9220 break;
9222 case 503: /* uses_opt_multiple: IDL_USES opt_multiple */
9223 #line 5920 "fe/idl.ypp"
9225 // We use this extra rule here to use in both uses_decl and
9226 // extended_uses_decl, so the LALR(1) parser can avoid conflicts.
9227 (yyval.bval) = (yyvsp[0].bval);
9229 #line 9230 "fe/idl.tab.cpp"
9230 break;
9232 case 504: /* opt_multiple: IDL_MULTIPLE */
9233 #line 5929 "fe/idl.ypp"
9235 (yyval.bval) = true;
9237 #line 9238 "fe/idl.tab.cpp"
9238 break;
9240 case 505: /* opt_multiple: %empty */
9241 #line 5933 "fe/idl.ypp"
9243 (yyval.bval) = false;
9245 #line 9246 "fe/idl.tab.cpp"
9246 break;
9248 case 506: /* emits_decl: IDL_EMITS scoped_name id */
9249 #line 5940 "fe/idl.ypp"
9251 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9252 bool so_far_so_good = true;
9253 AST_Decl::NodeType nt = AST_Decl::NT_type;
9254 AST_Param_Holder *ph = 0;
9256 AST_Decl *d =
9257 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9259 if (0 == d)
9261 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9262 so_far_so_good = false;
9264 else
9266 nt = d->node_type ();
9268 switch (nt)
9270 case AST_Decl::NT_eventtype:
9271 break;
9272 case AST_Decl::NT_param_holder:
9273 ph = dynamic_cast<AST_Param_Holder*> (d);
9274 nt = ph->info ()->type_;
9276 if (nt != AST_Decl::NT_type
9277 && nt != AST_Decl::NT_eventtype)
9279 idl_global->err ()->mismatched_template_param (
9280 ph->info ()->name_.c_str ());
9282 so_far_so_good = false;
9285 break;
9286 default:
9287 idl_global->err ()->eventtype_expected (d);
9288 so_far_so_good = false;
9289 break;
9293 AST_Emits *e = 0;
9295 if (so_far_so_good)
9297 AST_Type *event_type =
9298 dynamic_cast<AST_Type*> (d);
9300 // Strip off _cxx_, if any, for port name.
9301 FE_Utils::original_local_name ((yyvsp[0].idval));
9303 UTL_ScopedName sn ((yyvsp[0].idval),
9306 e = idl_global->gen ()->create_emits (&sn, event_type);
9308 (void) s->fe_add_emits (e);
9311 (yyvsp[-1].idlist)->destroy ();
9312 delete (yyvsp[-1].idlist);
9313 (yyvsp[-1].idlist) = 0;
9315 (yyvsp[0].idval)->destroy ();
9316 delete (yyvsp[0].idval);
9317 (yyvsp[0].idval) = 0;
9319 (yyval.dcval) = e;
9321 #line 9322 "fe/idl.tab.cpp"
9322 break;
9324 case 507: /* publishes_decl: IDL_PUBLISHES scoped_name id */
9325 #line 6015 "fe/idl.ypp"
9327 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9328 bool so_far_so_good = true;
9329 AST_Decl::NodeType nt = AST_Decl::NT_type;
9330 AST_Param_Holder *ph = 0;
9332 AST_Decl *d =
9333 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9335 if (0 == d)
9337 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9338 so_far_so_good = false;
9340 else
9342 nt = d->node_type ();
9344 switch (nt)
9346 case AST_Decl::NT_eventtype:
9347 break;
9348 case AST_Decl::NT_param_holder:
9349 ph = dynamic_cast<AST_Param_Holder*> (d);
9350 nt = ph->info ()->type_;
9352 if (nt != AST_Decl::NT_type
9353 && nt != AST_Decl::NT_eventtype)
9355 idl_global->err ()->mismatched_template_param (
9356 ph->info ()->name_.c_str ());
9358 so_far_so_good = false;
9361 break;
9362 default:
9363 idl_global->err ()->eventtype_expected (d);
9364 so_far_so_good = false;
9365 break;
9369 AST_Publishes *p = 0;
9371 if (so_far_so_good)
9373 AST_Type *event_type =
9374 dynamic_cast<AST_Type*> (d);
9376 // Strip off _cxx_, if any, for port name.
9377 FE_Utils::original_local_name ((yyvsp[0].idval));
9379 UTL_ScopedName sn ((yyvsp[0].idval), 0);
9380 p = idl_global->gen ()->create_publishes (&sn, event_type);
9381 s->fe_add_publishes (p);
9384 (yyvsp[-1].idlist)->destroy ();
9385 delete (yyvsp[-1].idlist);
9386 (yyvsp[-1].idlist) = 0;
9388 (yyvsp[0].idval)->destroy ();
9389 delete (yyvsp[0].idval);
9390 (yyvsp[0].idval) = 0;
9392 (yyval.dcval) = p;
9394 #line 9395 "fe/idl.tab.cpp"
9395 break;
9397 case 508: /* consumes_decl: IDL_CONSUMES scoped_name id */
9398 #line 6087 "fe/idl.ypp"
9400 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9401 bool so_far_so_good = true;
9402 AST_Decl::NodeType nt = AST_Decl::NT_type;
9403 AST_Param_Holder *ph = 0;
9405 AST_Decl *d =
9406 s->lookup_by_name ((yyvsp[-1].idlist), true, false);
9408 if (0 == d)
9410 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
9411 so_far_so_good = false;
9413 else
9415 nt = d->node_type ();
9417 switch (nt)
9419 case AST_Decl::NT_eventtype:
9420 break;
9421 case AST_Decl::NT_param_holder:
9422 ph = dynamic_cast<AST_Param_Holder*> (d);
9423 nt = ph->info ()->type_;
9425 if (nt != AST_Decl::NT_type
9426 && nt != AST_Decl::NT_eventtype)
9428 idl_global->err ()->mismatched_template_param (
9429 ph->info ()->name_.c_str ());
9431 so_far_so_good = false;
9434 break;
9435 default:
9436 idl_global->err ()->eventtype_expected (d);
9437 so_far_so_good = false;
9438 break;
9442 AST_Consumes *c = 0;
9444 if (so_far_so_good)
9446 AST_Type *event_type =
9447 dynamic_cast<AST_Type*> (d);
9449 // Strip off _cxx_, if any, for port name.
9450 FE_Utils::original_local_name ((yyvsp[0].idval));
9452 UTL_ScopedName sn ((yyvsp[0].idval),
9455 c = idl_global->gen ()->create_consumes (&sn, event_type);
9457 (void) s->fe_add_consumes (c);
9460 (yyvsp[-1].idlist)->destroy ();
9461 delete (yyvsp[-1].idlist);
9462 (yyvsp[-1].idlist) = 0;
9464 (yyvsp[0].idval)->destroy ();
9465 delete (yyvsp[0].idval);
9466 (yyvsp[0].idval) = 0;
9468 (yyval.dcval) = c;
9470 #line 9471 "fe/idl.tab.cpp"
9471 break;
9473 case 509: /* $@155: %empty */
9474 #line 6162 "fe/idl.ypp"
9476 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9477 AST_Home *h = 0;
9480 * Make a new home node and add it to the enclosing scope.
9482 if (s != 0 && (yyvsp[0].hhval) != 0)
9485 idl_global->gen ()->create_home (
9486 (yyvsp[0].hhval)->name (),
9487 (yyvsp[0].hhval)->base_home (),
9488 (yyvsp[0].hhval)->managed_component (),
9489 (yyvsp[0].hhval)->primary_key (),
9490 (yyvsp[0].hhval)->supports (),
9491 (yyvsp[0].hhval)->n_supports (),
9492 (yyvsp[0].hhval)->supports_flat (),
9493 (yyvsp[0].hhval)->n_supports_flat ()
9496 * Add the home to its definition scope.
9498 (void) s->fe_add_home (h);
9500 // This FE_HomeHeader class isn't destroyed with the AST.
9501 (yyvsp[0].hhval)->destroy ();
9502 delete (yyvsp[0].hhval);
9503 (yyvsp[0].hhval) = 0;
9507 * Push it on the scope stack.
9509 idl_global->scopes ().push (h);
9511 #line 9512 "fe/idl.tab.cpp"
9512 break;
9514 case 510: /* home_decl: home_header $@155 home_body */
9515 #line 6199 "fe/idl.ypp"
9518 * Done with this component - pop it off the scopes stack.
9520 idl_global->scopes ().pop ();
9522 (yyval.dcval) = 0;
9524 #line 9525 "fe/idl.tab.cpp"
9525 break;
9527 case 511: /* $@156: %empty */
9528 #line 6211 "fe/idl.ypp"
9530 idl_global->set_parse_state (IDL_GlobalData::PS_HomeSeen);
9532 #line 9533 "fe/idl.tab.cpp"
9533 break;
9535 case 512: /* $@157: %empty */
9536 #line 6215 "fe/idl.ypp"
9538 idl_global->set_parse_state (IDL_GlobalData::PS_HomeIDSeen);
9540 #line 9541 "fe/idl.tab.cpp"
9541 break;
9543 case 513: /* $@158: %empty */
9544 #line 6219 "fe/idl.ypp"
9546 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
9548 #line 9549 "fe/idl.tab.cpp"
9549 break;
9551 case 514: /* $@159: %empty */
9552 #line 6223 "fe/idl.ypp"
9554 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
9556 #line 9557 "fe/idl.tab.cpp"
9557 break;
9559 case 515: /* $@160: %empty */
9560 #line 6227 "fe/idl.ypp"
9562 idl_global->set_parse_state (IDL_GlobalData::PS_ManagesSeen);
9564 #line 9565 "fe/idl.tab.cpp"
9565 break;
9567 case 516: /* $@161: %empty */
9568 #line 6231 "fe/idl.ypp"
9570 idl_global->set_parse_state (IDL_GlobalData::PS_ManagesIDSeen);
9572 #line 9573 "fe/idl.tab.cpp"
9573 break;
9575 case 517: /* home_header: IDL_HOME $@156 defining_id $@157 home_inheritance_spec $@158 supports_spec $@159 IDL_MANAGES $@160 scoped_name $@161 primary_key_spec */
9576 #line 6235 "fe/idl.ypp"
9578 idl_global->set_parse_state (IDL_GlobalData::PS_PrimaryKeySpecSeen);
9581 * Create an AST representation of the information in the header
9582 * part of a component home.
9584 UTL_ScopedName *n = 0;
9585 ACE_NEW_RETURN (n,
9586 UTL_ScopedName ((yyvsp[-10].idval), 0),
9589 ACE_NEW_RETURN ((yyval.hhval),
9590 FE_HomeHeader (n,
9591 (yyvsp[-8].idlist),
9592 (yyvsp[-6].nlval),
9593 (yyvsp[-2].idlist),
9594 (yyvsp[0].idlist)),
9597 (yyvsp[-2].idlist)->destroy ();
9598 delete (yyvsp[-2].idlist);
9599 (yyvsp[-2].idlist) = 0;
9601 if (0 != (yyvsp[-8].idlist))
9603 (yyvsp[-8].idlist)->destroy ();
9604 delete (yyvsp[-8].idlist);
9605 (yyvsp[-8].idlist) = 0;
9608 if (0 != (yyvsp[0].idlist))
9610 (yyvsp[0].idlist)->destroy ();
9611 delete (yyvsp[0].idlist);
9612 (yyvsp[0].idlist) = 0;
9615 if (0 != (yyvsp[-6].nlval))
9617 (yyvsp[-6].nlval)->destroy ();
9618 delete (yyvsp[-6].nlval);
9619 (yyvsp[-6].nlval) = 0;
9622 #line 9623 "fe/idl.tab.cpp"
9623 break;
9625 case 518: /* $@162: %empty */
9626 #line 6284 "fe/idl.ypp"
9628 idl_global->set_parse_state (IDL_GlobalData::PS_InheritColonSeen);
9630 #line 9631 "fe/idl.tab.cpp"
9631 break;
9633 case 519: /* home_inheritance_spec: ':' $@162 scoped_name */
9634 #line 6288 "fe/idl.ypp"
9636 (yyval.idlist) = (yyvsp[0].idlist);
9638 #line 9639 "fe/idl.tab.cpp"
9639 break;
9641 case 520: /* home_inheritance_spec: %empty */
9642 #line 6292 "fe/idl.ypp"
9644 (yyval.idlist) = 0;
9646 #line 9647 "fe/idl.tab.cpp"
9647 break;
9649 case 521: /* primary_key_spec: IDL_PRIMARYKEY scoped_name */
9650 #line 6300 "fe/idl.ypp"
9652 (yyval.idlist) = (yyvsp[0].idlist);
9654 #line 9655 "fe/idl.tab.cpp"
9655 break;
9657 case 522: /* primary_key_spec: %empty */
9658 #line 6304 "fe/idl.ypp"
9660 (yyval.idlist) = 0;
9662 #line 9663 "fe/idl.tab.cpp"
9663 break;
9665 case 523: /* $@163: %empty */
9666 #line 6311 "fe/idl.ypp"
9668 idl_global->set_parse_state (IDL_GlobalData::PS_HomeSqSeen);
9670 #line 9671 "fe/idl.tab.cpp"
9671 break;
9673 case 524: /* $@164: %empty */
9674 #line 6315 "fe/idl.ypp"
9676 idl_global->set_parse_state (IDL_GlobalData::PS_HomeBodySeen);
9678 #line 9679 "fe/idl.tab.cpp"
9679 break;
9681 case 525: /* home_body: '{' $@163 home_exports $@164 '}' */
9682 #line 6319 "fe/idl.ypp"
9684 idl_global->set_parse_state (IDL_GlobalData::PS_HomeQsSeen);
9686 #line 9687 "fe/idl.tab.cpp"
9687 break;
9689 case 529: /* $@165: %empty */
9690 #line 6332 "fe/idl.ypp"
9692 idl_global->set_parse_state (IDL_GlobalData::PS_FactoryDeclSeen);
9694 #line 9695 "fe/idl.tab.cpp"
9695 break;
9697 case 530: /* home_export: factory_decl $@165 ';' */
9698 #line 6336 "fe/idl.ypp"
9700 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
9702 #line 9703 "fe/idl.tab.cpp"
9703 break;
9705 case 531: /* $@166: %empty */
9706 #line 6340 "fe/idl.ypp"
9708 idl_global->set_parse_state (IDL_GlobalData::PS_FinderDeclSeen);
9710 #line 9711 "fe/idl.tab.cpp"
9711 break;
9713 case 532: /* home_export: finder_decl $@166 ';' */
9714 #line 6344 "fe/idl.ypp"
9716 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
9718 #line 9719 "fe/idl.tab.cpp"
9719 break;
9721 case 533: /* $@167: %empty */
9722 #line 6352 "fe/idl.ypp"
9724 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9725 UTL_ScopedName n ((yyvsp[0].idval),
9727 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
9730 * Create a node representing a factory operation
9731 * and add it to the enclosing scope.
9733 AST_Factory *f = idl_global->gen ()->create_factory (&n);
9734 (void) s->fe_add_factory (f);
9736 (yyvsp[0].idval)->destroy ();
9737 delete (yyvsp[0].idval);
9738 (yyvsp[0].idval) = 0;
9741 * Push the factory scope onto the scopes stack.
9743 idl_global->scopes ().push (f);
9745 #line 9746 "fe/idl.tab.cpp"
9746 break;
9748 case 534: /* $@168: %empty */
9749 #line 6375 "fe/idl.ypp"
9751 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
9753 #line 9754 "fe/idl.tab.cpp"
9754 break;
9756 case 535: /* factory_decl: IDL_FACTORY defining_id $@167 init_parameter_list $@168 opt_raises */
9757 #line 6379 "fe/idl.ypp"
9759 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9760 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
9763 * Add exceptions and context to the factory.
9765 if ((yyvsp[0].nlval) != 0)
9767 (void) s->fe_add_exceptions ((yyvsp[0].nlval));
9771 * Done with this factory. Pop its scope from the scopes stack.
9773 idl_global->scopes ().pop ();
9775 #line 9776 "fe/idl.tab.cpp"
9776 break;
9778 case 536: /* $@169: %empty */
9779 #line 6401 "fe/idl.ypp"
9781 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9782 UTL_ScopedName n ((yyvsp[0].idval),
9785 idl_global->set_parse_state (IDL_GlobalData::PS_OpIDSeen);
9788 * Create a node representing a home finder
9789 * and add it to the enclosing scope.
9791 AST_Finder *f =
9792 idl_global->gen ()->create_finder (&n);
9794 (void) s->fe_add_finder (f);
9797 (yyvsp[0].idval)->destroy ();
9798 delete (yyvsp[0].idval);
9799 (yyvsp[0].idval) = 0;
9802 * Push the operation scope onto the scopes stack.
9804 idl_global->scopes ().push (f);
9806 #line 9807 "fe/idl.tab.cpp"
9807 break;
9809 case 537: /* $@170: %empty */
9810 #line 6428 "fe/idl.ypp"
9812 idl_global->set_parse_state (IDL_GlobalData::PS_OpParsCompleted);
9814 #line 9815 "fe/idl.tab.cpp"
9815 break;
9817 case 538: /* finder_decl: IDL_FINDER defining_id $@169 init_parameter_list $@170 opt_raises */
9818 #line 6432 "fe/idl.ypp"
9820 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9821 idl_global->set_parse_state (IDL_GlobalData::PS_OpRaiseCompleted);
9824 * Add exceptions and context to the finder.
9826 if ((yyvsp[0].nlval) != 0)
9828 (void) s->fe_add_exceptions ((yyvsp[0].nlval));
9832 * Done with this operation. Pop its scope from the scopes stack.
9834 idl_global->scopes ().pop ();
9836 #line 9837 "fe/idl.tab.cpp"
9837 break;
9839 case 544: /* event_concrete_forward_decl: IDL_EVENTTYPE defining_id */
9840 #line 6465 "fe/idl.ypp"
9842 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9843 UTL_ScopedName n ((yyvsp[0].idval),
9845 AST_EventTypeFwd *f = 0;
9846 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeForwardSeen);
9849 * Create a node representing a forward declaration of an
9850 * eventtype. Store it in the enclosing scope
9852 if (s != 0)
9854 f = idl_global->gen ()->create_eventtype_fwd (&n,
9855 false);
9856 (void) s->fe_add_valuetype_fwd (f);
9859 (yyvsp[0].idval)->destroy ();
9860 delete (yyvsp[0].idval);
9861 (yyvsp[0].idval) = 0;
9863 (yyval.dcval) = 0;
9865 #line 9866 "fe/idl.tab.cpp"
9866 break;
9868 case 545: /* event_abs_forward_decl: IDL_ABSTRACT IDL_EVENTTYPE defining_id */
9869 #line 6495 "fe/idl.ypp"
9871 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9872 UTL_ScopedName n ((yyvsp[0].idval),
9874 AST_EventTypeFwd *f = 0;
9875 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeForwardSeen);
9878 * Create a node representing a forward declaration of an
9879 * eventtype. Store it in the enclosing scope
9881 if (s != 0)
9883 f = idl_global->gen ()->create_eventtype_fwd (&n,
9884 true);
9885 (void) s->fe_add_valuetype_fwd (f);
9888 (yyvsp[0].idval)->destroy ();
9889 delete (yyvsp[0].idval);
9890 (yyvsp[0].idval) = 0;
9892 (yyval.dcval) = 0;
9894 #line 9895 "fe/idl.tab.cpp"
9895 break;
9897 case 546: /* $@171: %empty */
9898 #line 6524 "fe/idl.ypp"
9900 UTL_Scope *s = idl_global->scopes ().top_non_null ();
9901 AST_EventType *e = 0;
9902 AST_Interface *i = 0;
9904 if (s != 0 && (yyvsp[-1].idval) != 0)
9906 UTL_ScopedName sn ((yyvsp[-1].idval),
9909 idl_global->gen ()->create_eventtype (
9910 &sn,
9911 (yyvsp[0].vhval)->inherits (),
9912 (yyvsp[0].vhval)->n_inherits (),
9913 (yyvsp[0].vhval)->inherits_concrete (),
9914 (yyvsp[0].vhval)->inherits_flat (),
9915 (yyvsp[0].vhval)->n_inherits_flat (),
9916 (yyvsp[0].vhval)->supports (),
9917 (yyvsp[0].vhval)->n_supports (),
9918 (yyvsp[0].vhval)->supports_concrete (),
9919 true,
9920 false,
9921 false
9923 i = dynamic_cast<AST_Interface*> (e);
9924 AST_Interface::fwd_redefinition_helper (i,
9927 * Add the eventetype to its definition scope
9929 e = dynamic_cast<AST_EventType*> (i);
9930 (void) s->fe_add_eventtype (e);
9934 * Push it on the scope stack.
9936 idl_global->scopes ().push (e);
9938 (yyvsp[-1].idval)->destroy ();
9939 delete (yyvsp[-1].idval);
9940 (yyvsp[-1].idval) = 0;
9942 #line 9943 "fe/idl.tab.cpp"
9943 break;
9945 case 547: /* $@172: %empty */
9946 #line 6568 "fe/idl.ypp"
9948 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
9950 #line 9951 "fe/idl.tab.cpp"
9951 break;
9953 case 548: /* $@173: %empty */
9954 #line 6572 "fe/idl.ypp"
9956 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
9958 #line 9959 "fe/idl.tab.cpp"
9959 break;
9961 case 549: /* event_abs_decl: event_abs_header event_rest_of_header $@171 '{' $@172 exports $@173 '}' */
9962 #line 6576 "fe/idl.ypp"
9964 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
9967 * Done with this eventtype - pop it off the scopes stack.
9969 idl_global->scopes ().pop ();
9971 (yyval.dcval) = 0;
9973 #line 9974 "fe/idl.tab.cpp"
9974 break;
9976 case 550: /* event_abs_header: IDL_ABSTRACT IDL_EVENTTYPE defining_id */
9977 #line 6592 "fe/idl.ypp"
9979 (yyval.idval) = (yyvsp[0].idval);
9981 #line 9982 "fe/idl.tab.cpp"
9982 break;
9984 case 551: /* event_custom_header: IDL_CUSTOM IDL_EVENTTYPE defining_id */
9985 #line 6601 "fe/idl.ypp"
9987 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
9989 ACE_DEBUG ((LM_DEBUG,
9990 ACE_TEXT ("error in %C line %d\n"),
9991 idl_global->filename ()->get_string (),
9992 idl_global->lineno ()));
9993 ACE_DEBUG ((LM_DEBUG,
9994 ACE_TEXT ("Sorry, I (TAO_IDL) can't handle")
9995 ACE_TEXT (" custom yet\n")));
9996 (yyval.idval) = 0;
9998 #line 9999 "fe/idl.tab.cpp"
9999 break;
10001 case 552: /* event_plain_header: IDL_EVENTTYPE defining_id */
10002 #line 6618 "fe/idl.ypp"
10004 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeIDSeen);
10006 (yyval.idval) = (yyvsp[0].idval);
10008 #line 10009 "fe/idl.tab.cpp"
10009 break;
10011 case 553: /* $@174: %empty */
10012 #line 6627 "fe/idl.ypp"
10014 idl_global->set_parse_state (IDL_GlobalData::PS_InheritSpecSeen);
10016 #line 10017 "fe/idl.tab.cpp"
10017 break;
10019 case 554: /* event_rest_of_header: inheritance_spec $@174 supports_spec */
10020 #line 6631 "fe/idl.ypp"
10022 idl_global->set_parse_state (IDL_GlobalData::PS_SupportSpecSeen);
10024 ACE_NEW_RETURN ((yyval.vhval),
10025 FE_OBVHeader (
10027 (yyvsp[-2].nlval),
10028 (yyvsp[0].nlval),
10029 (yyvsp[-2].nlval)
10030 ? (yyvsp[-2].nlval)->truncatable ()
10031 : false,
10032 true),
10035 if (0 != (yyvsp[0].nlval))
10037 (yyvsp[0].nlval)->destroy ();
10038 delete (yyvsp[0].nlval);
10039 (yyvsp[0].nlval) = 0;
10042 if (0 != (yyvsp[-2].nlval))
10044 (yyvsp[-2].nlval)->destroy ();
10045 delete (yyvsp[-2].nlval);
10046 (yyvsp[-2].nlval) = 0;
10049 #line 10050 "fe/idl.tab.cpp"
10050 break;
10052 case 555: /* @175: %empty */
10053 #line 6664 "fe/idl.ypp"
10055 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
10056 Identifier *&event_id = (yyvsp[-1].idval);
10057 FE_OBVHeader *&event_header = (yyvsp[0].vhval);
10058 AST_EventType *eventtype = 0;
10060 if (scope && event_header)
10062 // We create the scoped name here instead of with the
10063 // FE_OBVHeader because there is a token for it only here.
10064 UTL_ScopedName sn (event_id, 0);
10065 eventtype = idl_global->gen ()->create_eventtype (
10066 &sn,
10067 event_header->inherits (),
10068 event_header->n_inherits (),
10069 event_header->inherits_concrete (),
10070 event_header->inherits_flat (),
10071 event_header->n_inherits_flat (),
10072 event_header->supports (),
10073 event_header->n_supports (),
10074 event_header->supports_concrete (),
10075 false,
10076 event_header->truncatable (),
10077 false);
10078 AST_Interface *eventtype_as_interface =
10079 dynamic_cast<AST_Interface *> (eventtype);
10080 AST_Interface::fwd_redefinition_helper (
10081 eventtype_as_interface, scope);
10082 eventtype = dynamic_cast<AST_EventType *> (eventtype_as_interface);
10085 * Add the eventetype to its definition scope
10087 scope->fe_add_eventtype (eventtype);
10089 // FE_OBVHeader is not automatically destroyed in the AST
10090 event_header->destroy ();
10091 delete event_header;
10092 event_header = 0;
10094 sn.destroy ();
10098 * Push it on the scope stack.
10100 idl_global->scopes ().push (eventtype);
10102 (yyval.dcval) = eventtype;
10104 #line 10105 "fe/idl.tab.cpp"
10105 break;
10107 case 556: /* $@176: %empty */
10108 #line 6715 "fe/idl.ypp"
10110 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeSqSeen);
10112 #line 10113 "fe/idl.tab.cpp"
10113 break;
10115 case 557: /* $@177: %empty */
10116 #line 6719 "fe/idl.ypp"
10118 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeBodySeen);
10120 #line 10121 "fe/idl.tab.cpp"
10121 break;
10123 case 558: /* event_decl: event_header event_rest_of_header @175 '{' $@176 value_elements $@177 '}' */
10124 #line 6723 "fe/idl.ypp"
10126 idl_global->set_parse_state (IDL_GlobalData::PS_EventTypeQsSeen);
10129 * Done with this eventtype - pop it off the scopes stack.
10131 idl_global->scopes ().pop ();
10133 (yyval.dcval) = (yyvsp[-5].dcval);
10135 #line 10136 "fe/idl.tab.cpp"
10136 break;
10138 case 559: /* event_header: event_custom_header */
10139 #line 6737 "fe/idl.ypp"
10141 (yyval.idval) = (yyvsp[0].idval);
10143 #line 10144 "fe/idl.tab.cpp"
10144 break;
10146 case 560: /* event_header: event_plain_header */
10147 #line 6741 "fe/idl.ypp"
10149 (yyval.idval) = (yyvsp[0].idval);
10151 #line 10152 "fe/idl.tab.cpp"
10152 break;
10154 case 561: /* formal_parameter_type: IDL_TYPENAME */
10155 #line 6748 "fe/idl.ypp"
10157 (yyval.ntval) = AST_Decl::NT_type;
10159 #line 10160 "fe/idl.tab.cpp"
10160 break;
10162 case 562: /* formal_parameter_type: IDL_STRUCT */
10163 #line 6752 "fe/idl.ypp"
10165 (yyval.ntval) = AST_Decl::NT_struct;
10167 #line 10168 "fe/idl.tab.cpp"
10168 break;
10170 case 563: /* formal_parameter_type: IDL_UNION */
10171 #line 6756 "fe/idl.ypp"
10173 (yyval.ntval) = AST_Decl::NT_union;
10175 #line 10176 "fe/idl.tab.cpp"
10176 break;
10178 case 564: /* formal_parameter_type: IDL_EVENTTYPE */
10179 #line 6760 "fe/idl.ypp"
10181 (yyval.ntval) = AST_Decl::NT_eventtype;
10183 #line 10184 "fe/idl.tab.cpp"
10184 break;
10186 case 565: /* formal_parameter_type: IDL_SEQUENCE */
10187 #line 6764 "fe/idl.ypp"
10189 (yyval.ntval) = AST_Decl::NT_sequence;
10191 #line 10192 "fe/idl.tab.cpp"
10192 break;
10194 case 566: /* formal_parameter_type: IDL_MAP */
10195 #line 6768 "fe/idl.ypp"
10197 (yyval.ntval) = AST_Decl::NT_map;
10199 #line 10200 "fe/idl.tab.cpp"
10200 break;
10202 case 567: /* formal_parameter_type: IDL_INTERFACE */
10203 #line 6772 "fe/idl.ypp"
10205 (yyval.ntval) = AST_Decl::NT_interface;
10207 #line 10208 "fe/idl.tab.cpp"
10208 break;
10210 case 568: /* formal_parameter_type: IDL_VALUETYPE */
10211 #line 6776 "fe/idl.ypp"
10213 (yyval.ntval) = AST_Decl::NT_valuetype;
10215 #line 10216 "fe/idl.tab.cpp"
10216 break;
10218 case 569: /* formal_parameter_type: IDL_ENUM */
10219 #line 6780 "fe/idl.ypp"
10221 (yyval.ntval) = AST_Decl::NT_enum;
10223 #line 10224 "fe/idl.tab.cpp"
10224 break;
10226 case 570: /* formal_parameter_type: IDL_EXCEPTION */
10227 #line 6784 "fe/idl.ypp"
10229 (yyval.ntval) = AST_Decl::NT_except;
10231 #line 10232 "fe/idl.tab.cpp"
10232 break;
10234 case 571: /* formal_parameter_type: IDL_CONST const_type */
10235 #line 6788 "fe/idl.ypp"
10237 (yyval.ntval) = AST_Decl::NT_const;
10238 t_param_const_type = (yyvsp[0].etval);
10240 #line 10241 "fe/idl.tab.cpp"
10241 break;
10243 case 572: /* at_least_one_formal_parameter: formal_parameter formal_parameters */
10244 #line 6796 "fe/idl.ypp"
10246 if ((yyvsp[0].plval) == 0)
10248 ACE_NEW_RETURN ((yyvsp[0].plval), FE_Utils::T_PARAMLIST_INFO, 1);
10251 (yyvsp[0].plval)->enqueue_head (*(yyvsp[-1].pival));
10252 delete (yyvsp[-1].pival);
10253 (yyvsp[-1].pival) = 0;
10255 // The param added above is always the last one parsed,
10256 // so we check for matches between sequence<T> & T here.
10257 ACE_CString bad_id =
10258 FE_Utils::check_for_seq_of_param (
10259 (yyvsp[0].plval));
10261 if (!bad_id.empty ())
10263 delete (yyvsp[0].plval);
10264 (yyvsp[0].plval) = 0;
10266 idl_global->err ()->mismatch_seq_of_param (bad_id.c_str ());
10267 return 1;
10270 (yyval.plval) = (yyvsp[0].plval);
10272 #line 10273 "fe/idl.tab.cpp"
10273 break;
10275 case 573: /* formal_parameters: formal_parameters ',' formal_parameter */
10276 #line 6827 "fe/idl.ypp"
10278 if ((yyvsp[-2].plval) == 0)
10280 ACE_NEW_RETURN ((yyvsp[-2].plval), FE_Utils::T_PARAMLIST_INFO, 1);
10283 (yyvsp[-2].plval)->enqueue_tail (*(yyvsp[0].pival));
10284 (yyval.plval) = (yyvsp[-2].plval);
10286 delete (yyvsp[0].pival);
10287 (yyvsp[0].pival) = 0;
10289 #line 10290 "fe/idl.tab.cpp"
10290 break;
10292 case 574: /* formal_parameters: %empty */
10293 #line 6840 "fe/idl.ypp"
10295 (yyval.plval) = 0;
10297 #line 10298 "fe/idl.tab.cpp"
10298 break;
10300 case 575: /* formal_parameter: formal_parameter_type IDENTIFIER */
10301 #line 6847 "fe/idl.ypp"
10304 ACE_NEW_RETURN ((yyval.pival),
10305 FE_Utils::T_Param_Info,
10308 AST_Decl::NodeType nt = (yyvsp[-1].ntval);
10310 (yyval.pival)->type_ = nt;
10311 (yyval.pival)->name_ = (yyvsp[0].strval);
10312 ACE::strdelete ((yyvsp[0].strval));
10313 (yyvsp[0].strval) = 0;
10315 if (nt == AST_Decl::NT_const)
10317 (yyval.pival)->const_type_ = t_param_const_type;
10318 (yyval.pival)->enum_const_type_decl_ =
10319 tao_enum_constant_decl;
10321 // Reset these values.
10322 t_param_const_type = AST_Expression::EV_none;
10323 tao_enum_constant_decl = 0;
10326 #line 10327 "fe/idl.tab.cpp"
10327 break;
10329 case 576: /* formal_parameter: IDL_SEQUENCE '<' IDENTIFIER '>' IDENTIFIER */
10330 #line 6872 "fe/idl.ypp"
10332 ACE_NEW_RETURN ((yyval.pival),
10333 FE_Utils::T_Param_Info,
10336 (yyval.pival)->type_ = AST_Decl::NT_sequence;
10337 (yyval.pival)->seq_param_ref_ = (yyvsp[-2].strval);
10338 (yyval.pival)->name_ += (yyvsp[0].strval);
10340 ACE::strdelete ((yyvsp[-2].strval));
10341 (yyvsp[-2].strval) = 0;
10342 ACE::strdelete ((yyvsp[0].strval));
10343 (yyvsp[0].strval) = 0;
10345 #line 10346 "fe/idl.tab.cpp"
10346 break;
10348 case 577: /* at_least_one_formal_parameter_name: formal_parameter_name formal_parameter_names */
10349 #line 6890 "fe/idl.ypp"
10351 ACE_NEW_RETURN ((yyval.slval), UTL_StrList ((yyvsp[-1].sval), (yyvsp[0].slval)), 1);
10353 #line 10354 "fe/idl.tab.cpp"
10354 break;
10356 case 578: /* formal_parameter_names: formal_parameter_names ',' formal_parameter_name */
10357 #line 6897 "fe/idl.ypp"
10359 UTL_StrList *sl = 0;
10360 ACE_NEW_RETURN (sl, UTL_StrList ((yyvsp[0].sval), 0), 1);
10362 if ((yyvsp[-2].slval) == 0)
10364 (yyval.slval) = sl;
10366 else
10368 (yyvsp[-2].slval)->nconc (sl);
10369 (yyval.slval) = (yyvsp[-2].slval);
10372 #line 10373 "fe/idl.tab.cpp"
10373 break;
10375 case 579: /* formal_parameter_names: %empty */
10376 #line 6912 "fe/idl.ypp"
10378 (yyval.slval) = 0;
10380 #line 10381 "fe/idl.tab.cpp"
10381 break;
10383 case 580: /* formal_parameter_name: IDENTIFIER */
10384 #line 6919 "fe/idl.ypp"
10386 ACE_NEW_RETURN ((yyval.sval),
10387 UTL_String ((yyvsp[0].strval), true),
10390 #line 10391 "fe/idl.tab.cpp"
10391 break;
10393 case 581: /* $@178: %empty */
10394 #line 6928 "fe/idl.ypp"
10396 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSeen);
10398 #line 10399 "fe/idl.tab.cpp"
10399 break;
10401 case 582: /* @179: %empty */
10402 #line 6932 "fe/idl.ypp"
10404 char *&id_value = (yyvsp[0].strval);
10405 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeIDSeen);
10406 UTL_Scope *scope = idl_global->scopes ().top_non_null ();
10408 Identifier id (id_value);
10409 ACE::strdelete (id_value);
10410 id_value = 0;
10412 UTL_ScopedName scoped_name (&id, 0);
10413 AST_PortType *porttype = idl_global->gen ()->create_porttype (
10414 &scoped_name);
10415 scope->fe_add_porttype (porttype);
10416 (yyval.dcval) = porttype;
10418 // Push it on the scopes stack.
10419 idl_global->scopes ().push (porttype);
10421 #line 10422 "fe/idl.tab.cpp"
10422 break;
10424 case 583: /* $@180: %empty */
10425 #line 6951 "fe/idl.ypp"
10427 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeSqSeen);
10429 #line 10430 "fe/idl.tab.cpp"
10430 break;
10432 case 584: /* $@181: %empty */
10433 #line 6959 "fe/idl.ypp"
10435 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeBodySeen);
10437 #line 10438 "fe/idl.tab.cpp"
10438 break;
10440 case 585: /* porttype_decl: IDL_PORTTYPE $@178 IDENTIFIER @179 '{' $@180 at_least_one_port_export $@181 '}' */
10441 #line 6963 "fe/idl.ypp"
10443 idl_global->set_parse_state (IDL_GlobalData::PS_PorttypeQsSeen);
10445 // Done with this port type - pop it off the scopes stack.
10446 idl_global->scopes ().pop ();
10448 (yyval.dcval) = (yyvsp[-5].dcval);
10450 #line 10451 "fe/idl.tab.cpp"
10451 break;
10453 case 586: /* at_least_one_port_export: port_exports at_least_one_annotation port_export */
10454 #line 6975 "fe/idl.ypp"
10456 AST_Annotation_Appls *&annotations = (yyvsp[-1].annotations_val);
10457 AST_Decl *&node = (yyvsp[0].dcval);
10458 if (node)
10460 node->annotation_appls (*annotations);
10462 else
10464 idl_global->err ()-> unsupported_warning (
10465 "Annotating this is not supported");
10467 delete annotations;
10469 #line 10470 "fe/idl.tab.cpp"
10470 break;
10472 case 592: /* $@182: %empty */
10473 #line 7001 "fe/idl.ypp"
10475 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
10477 #line 10478 "fe/idl.tab.cpp"
10478 break;
10480 case 593: /* port_export: attribute $@182 ';' */
10481 #line 7005 "fe/idl.ypp"
10483 (yyval.dcval) = (yyvsp[-2].dcval);
10485 #line 10486 "fe/idl.tab.cpp"
10486 break;
10488 case 594: /* extended_port_decl: IDL_PORT scoped_name IDENTIFIER */
10489 #line 7012 "fe/idl.ypp"
10491 idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
10492 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10493 AST_Decl *d =
10494 s->lookup_by_name ((yyvsp[-1].idlist));
10495 AST_PortType *pt = 0;
10496 bool so_far_so_good = true;
10498 if (d == 0)
10500 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
10501 so_far_so_good = false;
10503 else
10505 pt = dynamic_cast<AST_PortType*> (d);
10507 if (pt == 0)
10509 idl_global->err ()->error1 (UTL_Error::EIDL_PORTTYPE_EXPECTED,
10511 so_far_so_good = false;
10515 AST_Extended_Port *ep = 0;
10517 if (so_far_so_good)
10519 Identifier id ((yyvsp[0].strval));
10520 ACE::strdelete ((yyvsp[0].strval));
10521 (yyvsp[0].strval) = 0;
10523 UTL_ScopedName sn (&id, 0);
10524 ep = idl_global->gen ()->create_extended_port (&sn, pt);
10525 s->fe_add_extended_port (ep);
10527 // Create (in the AST) the struct(s) and sequence(s)
10528 // needed for multiplex uses ports, if any.
10529 for (UTL_ScopeActiveIterator i (pt, UTL_Scope::IK_decls);
10530 !i.is_done ();
10531 i.next ())
10533 d = i.item ();
10535 AST_Uses *u = dynamic_cast<AST_Uses*> (d);
10537 if (u != 0 && u->is_multiple ())
10539 AST_Component *c =
10540 dynamic_cast<AST_Component*> (s);
10542 FE_Utils::create_uses_multiple_stuff (
10545 id.get_string ());
10550 (yyvsp[-1].idlist)->destroy ();
10551 delete (yyvsp[-1].idlist);
10552 (yyvsp[-1].idlist) = 0;
10554 (yyval.dcval) = ep;
10556 #line 10557 "fe/idl.tab.cpp"
10557 break;
10559 case 595: /* extended_port_decl: IDL_MIRRORPORT scoped_name IDENTIFIER */
10560 #line 7079 "fe/idl.ypp"
10562 idl_global->set_parse_state (IDL_GlobalData::PS_MirrorPortDeclSeen);
10563 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10564 AST_Decl *d =
10565 s->lookup_by_name ((yyvsp[-1].idlist));
10566 AST_PortType *pt = 0;
10567 bool so_far_so_good = true;
10569 if (d == 0)
10571 idl_global->err ()->lookup_error ((yyvsp[-1].idlist));
10572 so_far_so_good = false;
10574 else
10576 pt = dynamic_cast<AST_PortType*> (d);
10578 if (pt == 0)
10580 idl_global->err ()->error1 (UTL_Error::EIDL_PORTTYPE_EXPECTED,
10582 so_far_so_good = false;
10586 AST_Mirror_Port *mp = 0;
10588 if (so_far_so_good)
10590 Identifier id ((yyvsp[0].strval));
10591 ACE::strdelete ((yyvsp[0].strval));
10592 (yyvsp[0].strval) = 0;
10594 UTL_ScopedName sn (&id, 0);
10595 mp = idl_global->gen ()->create_mirror_port (&sn, pt);
10596 s->fe_add_mirror_port (mp);
10599 (yyvsp[-1].idlist)->destroy ();
10600 delete (yyvsp[-1].idlist);
10601 (yyvsp[-1].idlist) = 0;
10603 (yyval.dcval) = mp;
10605 #line 10606 "fe/idl.tab.cpp"
10606 break;
10608 case 596: /* at_least_one_actual_parameter: annotations_maybe actual_parameter actual_parameters */
10609 #line 7127 "fe/idl.ypp"
10611 if ((yyvsp[0].alval) == 0)
10613 ACE_NEW_RETURN ((yyvsp[0].alval),
10614 FE_Utils::T_ARGLIST,
10618 delete (yyvsp[-2].annotations_val);
10619 (yyvsp[0].alval)->enqueue_head ((yyvsp[-1].dcval));
10620 (yyval.alval) = (yyvsp[0].alval);
10622 #line 10623 "fe/idl.tab.cpp"
10623 break;
10625 case 597: /* actual_parameters: actual_parameters ',' annotations_maybe actual_parameter */
10626 #line 7143 "fe/idl.ypp"
10628 if ((yyvsp[-3].alval) == 0)
10630 ACE_NEW_RETURN ((yyvsp[-3].alval),
10631 FE_Utils::T_ARGLIST,
10635 delete (yyvsp[-1].annotations_val);
10636 (yyvsp[-3].alval)->enqueue_tail ((yyvsp[0].dcval));
10637 (yyval.alval) = (yyvsp[-3].alval);
10639 #line 10640 "fe/idl.tab.cpp"
10640 break;
10642 case 598: /* actual_parameters: %empty */
10643 #line 7156 "fe/idl.ypp"
10645 (yyval.alval) = 0;
10647 #line 10648 "fe/idl.tab.cpp"
10648 break;
10650 case 599: /* actual_parameter: expression */
10651 #line 7163 "fe/idl.ypp"
10653 // To avoid grammar conflicts with this LALR(1) parser,
10654 // we take advantage of the fact that an expression can
10655 // be a scoped name. At that lower level, we create an
10656 // expression containing the scoped name, and at a
10657 // higher lever, deduce that it's not supposed to be
10658 // a constant and look up the type to add to the template
10659 // arg list.
10660 AST_Expression *ex = (yyvsp[0].exval);
10661 UTL_ScopedName *sn = ex->n ();
10662 AST_Decl *d = 0;
10663 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10665 if (sn != 0)
10667 d = s->lookup_by_name (sn);
10669 if (d == 0)
10671 idl_global->err ()->lookup_error (sn);
10672 return 1;
10674 else
10676 AST_Decl::NodeType nt = d->node_type ();
10678 if (nt == AST_Decl::NT_enum_val)
10680 (yyvsp[0].exval)->evaluate (
10681 AST_Expression::EK_const);
10683 (yyval.dcval) =
10684 idl_global->gen ()->create_constant (
10685 (yyvsp[0].exval)->ev ()->et,
10686 (yyvsp[0].exval),
10687 sn);
10689 else
10691 (yyval.dcval) = d;
10695 else
10697 (yyvsp[0].exval)->evaluate (
10698 AST_Expression::EK_const);
10700 (yyval.dcval) =
10701 idl_global->gen ()->create_constant (
10702 (yyvsp[0].exval)->ev ()->et,
10703 (yyvsp[0].exval),
10707 #line 10708 "fe/idl.tab.cpp"
10708 break;
10710 case 600: /* connector_decl: connector_header connector_body */
10711 #line 7222 "fe/idl.ypp"
10713 (yyval.dcval) = 0;
10715 #line 10716 "fe/idl.tab.cpp"
10716 break;
10718 case 601: /* $@183: %empty */
10719 #line 7229 "fe/idl.ypp"
10721 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSeen);
10723 #line 10724 "fe/idl.tab.cpp"
10724 break;
10726 case 602: /* $@184: %empty */
10727 #line 7233 "fe/idl.ypp"
10729 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorIDSeen);
10731 #line 10732 "fe/idl.tab.cpp"
10732 break;
10734 case 603: /* connector_header: IDL_CONNECTOR $@183 annotations_maybe IDENTIFIER $@184 component_inheritance_spec */
10735 #line 7237 "fe/idl.ypp"
10737 UTL_Scope *s = idl_global->scopes ().top_non_null ();
10738 AST_Connector *parent = 0;
10739 bool so_far_so_good = true;
10741 Identifier id ((yyvsp[-2].strval));
10742 ACE::strdelete ((yyvsp[-2].strval));
10743 (yyvsp[-2].strval) = 0;
10745 UTL_ScopedName sn (&id, 0);
10747 if ((yyvsp[0].idlist) != 0)
10749 AST_Decl *d =
10750 s->lookup_by_name ((yyvsp[0].idlist));
10752 if (d == 0)
10754 idl_global->err ()->lookup_error ((yyvsp[0].idlist));
10755 so_far_so_good = false;
10758 parent =
10759 dynamic_cast<AST_Connector*> (d);
10761 if (parent == 0)
10763 idl_global->err ()->error1 (
10764 UTL_Error::EIDL_CONNECTOR_EXPECTED,
10767 so_far_so_good = false;
10770 (yyvsp[0].idlist)->destroy ();
10771 delete (yyvsp[0].idlist);
10772 (yyvsp[0].idlist) = 0;
10775 if (so_far_so_good)
10777 AST_Connector *c =
10778 idl_global->gen ()->create_connector (&sn,
10779 parent);
10781 (void) s->fe_add_connector (c);
10783 // Push it on the scopes stack.
10784 idl_global->scopes ().push (c);
10787 delete (yyvsp[-3].annotations_val);
10789 #line 10790 "fe/idl.tab.cpp"
10790 break;
10792 case 604: /* $@185: %empty */
10793 #line 7294 "fe/idl.ypp"
10795 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorSqSeen);
10797 #line 10798 "fe/idl.tab.cpp"
10798 break;
10800 case 605: /* $@186: %empty */
10801 #line 7298 "fe/idl.ypp"
10803 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorBodySeen);
10805 #line 10806 "fe/idl.tab.cpp"
10806 break;
10808 case 606: /* connector_body: '{' $@185 connector_exports $@186 '}' */
10809 #line 7302 "fe/idl.ypp"
10811 idl_global->set_parse_state (IDL_GlobalData::PS_ConnectorQsSeen);
10813 // Done with this connector - pop it off the scope stack.
10814 idl_global->scopes ().pop ();
10816 #line 10817 "fe/idl.tab.cpp"
10817 break;
10819 case 609: /* $@187: %empty */
10820 #line 7317 "fe/idl.ypp"
10822 idl_global->set_parse_state (IDL_GlobalData::PS_ProvidesDeclSeen);
10824 #line 10825 "fe/idl.tab.cpp"
10825 break;
10827 case 610: /* connector_export: provides_decl $@187 ';' */
10828 #line 7321 "fe/idl.ypp"
10830 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10832 #line 10833 "fe/idl.tab.cpp"
10833 break;
10835 case 611: /* $@188: %empty */
10836 #line 7325 "fe/idl.ypp"
10838 idl_global->set_parse_state (IDL_GlobalData::PS_UsesDeclSeen);
10840 #line 10841 "fe/idl.tab.cpp"
10841 break;
10843 case 612: /* connector_export: uses_decl $@188 ';' */
10844 #line 7329 "fe/idl.ypp"
10846 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10848 #line 10849 "fe/idl.tab.cpp"
10849 break;
10851 case 613: /* $@189: %empty */
10852 #line 7333 "fe/idl.ypp"
10854 idl_global->set_parse_state (IDL_GlobalData::PS_AttrDeclSeen);
10856 #line 10857 "fe/idl.tab.cpp"
10857 break;
10859 case 614: /* connector_export: attribute $@189 ';' */
10860 #line 7337 "fe/idl.ypp"
10862 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10864 #line 10865 "fe/idl.tab.cpp"
10865 break;
10867 case 615: /* $@190: %empty */
10868 #line 7341 "fe/idl.ypp"
10870 idl_global->set_parse_state (IDL_GlobalData::PS_ExtendedPortDeclSeen);
10872 #line 10873 "fe/idl.tab.cpp"
10873 break;
10875 case 616: /* connector_export: extended_port_decl $@190 ';' */
10876 #line 7345 "fe/idl.ypp"
10878 idl_global->set_parse_state (IDL_GlobalData::PS_NoState);
10880 #line 10881 "fe/idl.tab.cpp"
10881 break;
10884 #line 10885 "fe/idl.tab.cpp"
10886 default: break;
10888 /* User semantic actions sometimes alter yychar, and that requires
10889 that yytoken be updated with the new translation. We take the
10890 approach of translating immediately before every use of yytoken.
10891 One alternative is translating here after every semantic action,
10892 but that translation would be missed if the semantic action invokes
10893 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
10894 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
10895 incorrect destructor might then be invoked immediately. In the
10896 case of YYERROR or YYBACKUP, subsequent parser actions might lead
10897 to an incorrect destructor call or verbose syntax error message
10898 before the lookahead is translated. */
10899 YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
10901 YYPOPSTACK (yylen);
10902 yylen = 0;
10904 *++yyvsp = yyval;
10906 /* Now 'shift' the result of the reduction. Determine what state
10907 that goes to, based on the state we popped back to and the rule
10908 number reduced by. */
10910 const int yylhs = yyr1[yyn] - YYNTOKENS;
10911 const int yyi = yypgoto[yylhs] + *yyssp;
10912 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
10913 ? yytable[yyi]
10914 : yydefgoto[yylhs]);
10917 goto yynewstate;
10920 /*--------------------------------------.
10921 | yyerrlab -- here on detecting error. |
10922 `--------------------------------------*/
10923 yyerrlab:
10924 /* Make sure we have latest lookahead translation. See comments at
10925 user semantic actions for why this is necessary. */
10926 yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
10927 /* If not already recovering from an error, report this error. */
10928 if (!yyerrstatus)
10930 ++yynerrs;
10931 yyerror (YY_("syntax error"));
10934 if (yyerrstatus == 3)
10936 /* If just tried and failed to reuse lookahead token after an
10937 error, discard it. */
10939 if (yychar <= YYEOF)
10941 /* Return failure if at end of input. */
10942 if (yychar == YYEOF)
10943 YYABORT;
10945 else
10947 yydestruct ("Error: discarding",
10948 yytoken, &yylval);
10949 yychar = YYEMPTY;
10953 /* Else will try to reuse lookahead token after shifting the error
10954 token. */
10955 goto yyerrlab1;
10958 /*---------------------------------------------------.
10959 | yyerrorlab -- error raised explicitly by YYERROR. |
10960 `---------------------------------------------------*/
10961 yyerrorlab:
10962 /* Pacify compilers when the user code never invokes YYERROR and the
10963 label yyerrorlab therefore never appears in user code. */
10964 if (0)
10965 YYERROR;
10966 ++yynerrs;
10968 /* Do not reclaim the symbols of the rule whose action triggered
10969 this YYERROR. */
10970 YYPOPSTACK (yylen);
10971 yylen = 0;
10972 YY_STACK_PRINT (yyss, yyssp);
10973 yystate = *yyssp;
10974 goto yyerrlab1;
10977 /*-------------------------------------------------------------.
10978 | yyerrlab1 -- common code for both syntax error and YYERROR. |
10979 `-------------------------------------------------------------*/
10980 yyerrlab1:
10981 yyerrstatus = 3; /* Each real token shifted decrements this. */
10983 /* Pop stack until we find a state that shifts the error token. */
10984 for (;;)
10986 yyn = yypact[yystate];
10987 if (!yypact_value_is_default (yyn))
10989 yyn += YYSYMBOL_YYerror;
10990 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
10992 yyn = yytable[yyn];
10993 if (0 < yyn)
10994 break;
10998 /* Pop the current state because it cannot handle the error token. */
10999 if (yyssp == yyss)
11000 YYABORT;
11003 yydestruct ("Error: popping",
11004 YY_ACCESSING_SYMBOL (yystate), yyvsp);
11005 YYPOPSTACK (1);
11006 yystate = *yyssp;
11007 YY_STACK_PRINT (yyss, yyssp);
11010 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
11011 *++yyvsp = yylval;
11012 YY_IGNORE_MAYBE_UNINITIALIZED_END
11015 /* Shift the error token. */
11016 YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
11018 yystate = yyn;
11019 goto yynewstate;
11022 /*-------------------------------------.
11023 | yyacceptlab -- YYACCEPT comes here. |
11024 `-------------------------------------*/
11025 yyacceptlab:
11026 yyresult = 0;
11027 goto yyreturnlab;
11030 /*-----------------------------------.
11031 | yyabortlab -- YYABORT comes here. |
11032 `-----------------------------------*/
11033 yyabortlab:
11034 yyresult = 1;
11035 goto yyreturnlab;
11038 /*-----------------------------------------------------------.
11039 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
11040 `-----------------------------------------------------------*/
11041 yyexhaustedlab:
11042 yyerror (YY_("memory exhausted"));
11043 yyresult = 2;
11044 goto yyreturnlab;
11047 /*----------------------------------------------------------.
11048 | yyreturnlab -- parsing is finished, clean up and return. |
11049 `----------------------------------------------------------*/
11050 yyreturnlab:
11051 if (yychar != YYEMPTY)
11053 /* Make sure we have latest lookahead translation. See comments at
11054 user semantic actions for why this is necessary. */
11055 yytoken = YYTRANSLATE (yychar);
11056 yydestruct ("Cleanup: discarding lookahead",
11057 yytoken, &yylval);
11059 /* Do not reclaim the symbols of the rule whose action triggered
11060 this YYABORT or YYACCEPT. */
11061 YYPOPSTACK (yylen);
11062 YY_STACK_PRINT (yyss, yyssp);
11063 while (yyssp != yyss)
11065 yydestruct ("Cleanup: popping",
11066 YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
11067 YYPOPSTACK (1);
11069 #ifndef yyoverflow
11070 if (yyss != yyssa)
11071 YYSTACK_FREE (yyss);
11072 #endif
11074 return yyresult;
11077 #line 7350 "fe/idl.ypp"
11079 /* programs */
11082 * ???
11085 tao_yywrap (void)
11087 return 1;
11091 * Report an error situation discovered in a production
11093 void
11094 tao_yyerror (const char *msg)
11096 ACE_ERROR ((LM_ERROR, "%C\n", msg));