Line data Source code
1 : /* A Bison parser, made by GNU Bison 2.6.4. */
2 :
3 : /* Bison implementation for Yacc-like parsers in C
4 :
5 : Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6 :
7 : This program is free software: you can redistribute it and/or modify
8 : it under the terms of the GNU General Public License as published by
9 : the Free Software Foundation, either version 3 of the License, or
10 : (at your option) any later version.
11 :
12 : This program is distributed in the hope that it will be useful,
13 : but WITHOUT ANY WARRANTY; without even the implied warranty of
14 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 : GNU General Public License for more details.
16 :
17 : You should have received a copy of the GNU General Public License
18 : along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 :
20 : /* As a special exception, you may create a larger work that contains
21 : part or all of the Bison parser skeleton and distribute that work
22 : under terms of your choice, so long as that work isn't itself a
23 : parser generator using the skeleton or a modified version thereof
24 : as a parser skeleton. Alternatively, if you modify or redistribute
25 : the parser skeleton itself, you may (at your option) remove this
26 : special exception, which will cause the skeleton and the resulting
27 : Bison output files to be licensed under the GNU General Public
28 : License without this special exception.
29 :
30 : This special exception was added by the Free Software Foundation in
31 : version 2.2 of Bison. */
32 :
33 : /* C LALR(1) parser skeleton written by Richard Stallman, by
34 : simplifying the original so-called "semantic" parser. */
35 :
36 : /* All symbols defined below should begin with yy or YY, to avoid
37 : infringing on user name space. This should be done even for local
38 : variables, as they might otherwise be expanded by user macros.
39 : There are some unavoidable exceptions within include files to
40 : define necessary library symbols; they are noted "INFRINGES ON
41 : USER NAME SPACE" below. */
42 :
43 : /* Identify Bison output. */
44 : #define YYBISON 1
45 :
46 : /* Bison version. */
47 : #define YYBISON_VERSION "2.6.4"
48 :
49 : /* Skeleton name. */
50 : #define YYSKELETON_NAME "yacc.c"
51 :
52 : /* Pure parsers. */
53 : #define YYPURE 0
54 :
55 : /* Push parsers. */
56 : #define YYPUSH 0
57 :
58 : /* Pull parsers. */
59 : #define YYPULL 1
60 :
61 :
62 :
63 :
64 : /* Copy the first part of user declarations. */
65 : /* Line 358 of yacc.c */
66 : #line 23 "/usr/local/src/libreoffice/idlc/source/parser.y"
67 :
68 : #include <string.h>
69 :
70 : #include <idlc/idlc.hxx>
71 : #include <idlc/errorhandler.hxx>
72 : #include <idlc/fehelper.hxx>
73 : #include <idlc/astexpression.hxx>
74 : #include <idlc/astconstants.hxx>
75 : #include <idlc/astconstant.hxx>
76 : #include <idlc/astarray.hxx>
77 : #include <idlc/astbasetype.hxx>
78 : #include <idlc/asttypedef.hxx>
79 : #include <idlc/astexception.hxx>
80 : #include <idlc/astmember.hxx>
81 : #include <idlc/astenum.hxx>
82 : #include <idlc/astsequence.hxx>
83 : #include <idlc/astattribute.hxx>
84 : #include <idlc/astoperation.hxx>
85 : #include <idlc/astparameter.hxx>
86 : #include <idlc/astinterfacemember.hxx>
87 : #include <idlc/astservicemember.hxx>
88 : #include <idlc/astobserves.hxx>
89 : #include <idlc/astneeds.hxx>
90 : #include <idlc/astunion.hxx>
91 :
92 : #include "idlc/aststructinstance.hxx"
93 :
94 : #include "attributeexceptions.hxx"
95 :
96 : #include "rtl/strbuf.hxx"
97 :
98 : #include <algorithm>
99 : #include <vector>
100 :
101 :
102 : #define YYDEBUG 1
103 : #if !(defined MACOSX && defined PPC)
104 : #define YYERROR_VERBOSE 1
105 : #endif
106 :
107 : using ::rtl::OUString;
108 : using ::rtl::OString;
109 : using ::rtl::OStringToOUString;
110 : using ::rtl::OStringBuffer;
111 :
112 : extern int yylex(void);
113 : void yyerror(char const *);
114 :
115 : void checkIdentifier(::rtl::OString* id)
116 : {
117 : static short check = 0;
118 : if (check == 0) {
119 : if (idlc()->getOptions()->isValid("-cid"))
120 : check = 1;
121 : else
122 : check = 2;
123 : }
124 :
125 : if ( id->indexOf('_') >= 0 )
126 : if ( (id->pData->buffer[0] >= 97 && id->pData->buffer[0] <= 122)
127 : || id->pData->buffer[0] == '_') {
128 : if (check == 1) {
129 : ::rtl::OStringBuffer msg(25 + id->getLength());
130 : msg.append("mismatched identifier '");
131 : msg.append(*id);
132 : msg.append("'");
133 : idlc()->error()->syntaxError(idlc()->getParseState(),
134 : idlc()->getLineNumber(),
135 : msg.getStr());
136 : }
137 : else
138 : idlc()->error()->warning0(WIDL_WRONG_NAMING_CONV, id->getStr());
139 : }
140 : }
141 :
142 : void reportDoubleMemberDeclarations(
143 : AstInterface::DoubleMemberDeclarations const & doubleMembers)
144 : {
145 : for (AstInterface::DoubleMemberDeclarations::const_iterator i(
146 : doubleMembers.begin());
147 : i != doubleMembers.end(); ++i)
148 : {
149 : idlc()->error()->error2(EIDL_DOUBLE_MEMBER, i->first, i->second);
150 : }
151 : }
152 :
153 : void addInheritedInterface(
154 : AstInterface * ifc, rtl::OString const & name, bool optional,
155 : rtl::OUString const & documentation)
156 : {
157 : AstDeclaration * decl = ifc->lookupByName(name);
158 : AstDeclaration const * resolved = resolveTypedefs(decl);
159 : if (resolved != 0 && resolved->getNodeType() == NT_interface) {
160 : if (idlc()->error()->checkPublished(decl)) {
161 : if (!static_cast< AstInterface const * >(resolved)->isDefined()) {
162 : idlc()->error()->inheritanceError(
163 : NT_interface, &ifc->getScopedName(), decl);
164 : } else {
165 : AstInterface::DoubleDeclarations doubleDecls(
166 : ifc->checkInheritedInterfaceClashes(
167 : static_cast< AstInterface const * >(resolved),
168 : optional));
169 : if (doubleDecls.interfaces.empty()
170 : && doubleDecls.members.empty())
171 : {
172 : ifc->addInheritedInterface(
173 : static_cast< AstType * >(decl), optional,
174 : documentation);
175 : } else {
176 : for (AstInterface::DoubleInterfaceDeclarations::iterator i(
177 : doubleDecls.interfaces.begin());
178 : i != doubleDecls.interfaces.end(); ++i)
179 : {
180 : idlc()->error()->error1(
181 : EIDL_DOUBLE_INHERITANCE, *i);
182 : }
183 : reportDoubleMemberDeclarations(doubleDecls.members);
184 : }
185 : }
186 : }
187 : } else {
188 : idlc()->error()->lookupError(
189 : EIDL_INTERFACEMEMBER_LOOKUP, name, scopeAsDecl(ifc));
190 : }
191 : }
192 :
193 : AstDeclaration const * createNamedType(
194 : rtl::OString const * scopedName, DeclList const * typeArgs)
195 : {
196 : AstDeclaration * decl = idlc()->scopes()->topNonNull()->lookupByName(
197 : *scopedName);
198 : AstDeclaration const * resolved = resolveTypedefs(decl);
199 : if (decl == 0) {
200 : idlc()->error()->lookupError(*scopedName);
201 : } else if (!idlc()->error()->checkPublished(decl)) {
202 : decl = 0;
203 : } else if (resolved->getNodeType() == NT_struct) {
204 : if (static_cast< AstStruct const * >(resolved)->getTypeParameterCount()
205 : != (typeArgs == 0 ? 0 : typeArgs->size()))
206 : {
207 : idlc()->error()->error0(EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS);
208 : decl = 0;
209 : } else if (typeArgs != 0) {
210 : AstScope * global = idlc()->scopes()->bottom();
211 : AstDeclaration * inst = new AstStructInstance(
212 : static_cast< AstType * >(decl), typeArgs, global);
213 : decl = global->addDeclaration(inst);
214 : if (decl != inst) {
215 : delete inst;
216 : }
217 : }
218 : } else if (decl->isType()) {
219 : if (typeArgs != 0) {
220 : idlc()->error()->error0(EIDL_WRONG_NUMBER_OF_TYPE_ARGUMENTS);
221 : decl = 0;
222 : }
223 : } else {
224 : idlc()->error()->noTypeError(decl);
225 : decl = 0;
226 : }
227 : delete scopedName;
228 : delete typeArgs;
229 : return decl;
230 : }
231 :
232 : bool includes(AstDeclaration const * type1, AstDeclaration const * type2) {
233 : OSL_ASSERT(type2 != 0);
234 : if (type1 != 0) {
235 : if (type1->getNodeType() == NT_instantiated_struct) {
236 : AstStructInstance const * inst
237 : = static_cast< AstStructInstance const * >(type1);
238 : if (inst->getTypeTemplate() == type2) {
239 : return true;
240 : }
241 : for (DeclList::const_iterator i(inst->getTypeArgumentsBegin());
242 : i != inst->getTypeArgumentsEnd(); ++i)
243 : {
244 : if (includes(*i, type2)) {
245 : return true;
246 : }
247 : }
248 : } else if (type1 == type2) {
249 : return true;
250 : }
251 : }
252 : return false;
253 : }
254 :
255 : // Suppress any warnings from generated code:
256 : #if defined __SUNPRO_CC
257 : #pragma disable_warn
258 : #elif defined _MSC_VER
259 : #pragma warning(push, 1)
260 : #pragma warning(disable: 4273 4701 4702 4706)
261 : #endif
262 :
263 : /* Line 358 of yacc.c */
264 : #line 265 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
265 :
266 : # ifndef YY_NULL
267 : # if defined __cplusplus && 201103L <= __cplusplus
268 : # define YY_NULL nullptr
269 : # else
270 : # define YY_NULL 0
271 : # endif
272 : # endif
273 :
274 : /* Enabling verbose error messages. */
275 : #ifdef YYERROR_VERBOSE
276 : # undef YYERROR_VERBOSE
277 : # define YYERROR_VERBOSE 1
278 : #else
279 : # define YYERROR_VERBOSE 0
280 : #endif
281 :
282 : /* In a future release of Bison, this section will be replaced
283 : by #include "parser.hxx". */
284 : #ifndef YY_YY_USR_LOCAL_SRC_LIBREOFFICE_WORKDIR_UNXLNGI6_PRO_YACCTARGET_IDLC_SOURCE_PARSER_HXX_INCLUDED
285 : # define YY_YY_USR_LOCAL_SRC_LIBREOFFICE_WORKDIR_UNXLNGI6_PRO_YACCTARGET_IDLC_SOURCE_PARSER_HXX_INCLUDED
286 : /* Enabling traces. */
287 : #ifndef YYDEBUG
288 : # define YYDEBUG 0
289 : #endif
290 : #if YYDEBUG
291 : extern int yydebug;
292 : #endif
293 :
294 : /* Tokens. */
295 : #ifndef YYTOKENTYPE
296 : # define YYTOKENTYPE
297 : /* Put the tokens into the symbol table, so that GDB and other debuggers
298 : know about them. */
299 : enum yytokentype {
300 : IDL_IDENTIFIER = 258,
301 : IDL_ATTRIBUTE = 259,
302 : IDL_BOUND = 260,
303 : IDL_CASE = 261,
304 : IDL_CONST = 262,
305 : IDL_CONSTANTS = 263,
306 : IDL_CONSTRAINED = 264,
307 : IDL_DEFAULT = 265,
308 : IDL_ENUM = 266,
309 : IDL_EXCEPTION = 267,
310 : IDL_INTERFACE = 268,
311 : IDL_MAYBEAMBIGUOUS = 269,
312 : IDL_MAYBEDEFAULT = 270,
313 : IDL_MAYBEVOID = 271,
314 : IDL_MODULE = 272,
315 : IDL_NEEDS = 273,
316 : IDL_OBSERVES = 274,
317 : IDL_OPTIONAL = 275,
318 : IDL_PROPERTY = 276,
319 : IDL_RAISES = 277,
320 : IDL_READONLY = 278,
321 : IDL_REMOVABLE = 279,
322 : IDL_SERVICE = 280,
323 : IDL_SEQUENCE = 281,
324 : IDL_SINGLETON = 282,
325 : IDL_STRUCT = 283,
326 : IDL_SWITCH = 284,
327 : IDL_TYPEDEF = 285,
328 : IDL_TRANSIENT = 286,
329 : IDL_UNION = 287,
330 : IDL_ANY = 288,
331 : IDL_CHAR = 289,
332 : IDL_BOOLEAN = 290,
333 : IDL_BYTE = 291,
334 : IDL_DOUBLE = 292,
335 : IDL_FLOAT = 293,
336 : IDL_HYPER = 294,
337 : IDL_LONG = 295,
338 : IDL_SHORT = 296,
339 : IDL_VOID = 297,
340 : IDL_STRING = 298,
341 : IDL_TYPE = 299,
342 : IDL_UNSIGNED = 300,
343 : IDL_TRUE = 301,
344 : IDL_FALSE = 302,
345 : IDL_IN = 303,
346 : IDL_OUT = 304,
347 : IDL_INOUT = 305,
348 : IDL_GET = 306,
349 : IDL_SET = 307,
350 : IDL_PUBLISHED = 308,
351 : IDL_ELLIPSIS = 309,
352 : IDL_LEFTSHIFT = 310,
353 : IDL_RIGHTSHIFT = 311,
354 : IDL_SCOPESEPARATOR = 312,
355 : IDL_INTEGER_LITERAL = 313,
356 : IDL_INTEGER_ULITERAL = 314,
357 : IDL_FLOATING_PT_LITERAL = 315
358 : };
359 : #endif
360 :
361 :
362 : #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
363 : typedef union YYSTYPE
364 : {
365 : /* Line 374 of yacc.c */
366 : #line 222 "/usr/local/src/libreoffice/idlc/source/parser.y"
367 :
368 : ExprType etval; /* Expression type */
369 : AstDeclaration* dclval; /* Declaration */
370 : AstDeclaration const * cdclval;
371 : DeclList * dclsval;
372 : AstExpression* exval; /* expression value */
373 : ExprList* exlval; /* expression list value */
374 : FeDeclarator* fdval; /* declarator value */
375 : FeDeclList* dlval; /* declarator list value */
376 : FeInheritanceHeader* ihval; /* inheritance header value */
377 : ::rtl::OString* sval; /* OString value */
378 : std::vector< rtl::OString > * svals;
379 : sal_Char* strval; /* sal_Char* value */
380 : bool bval; /* sal_Boolean* value */
381 : sal_Int64 ival; /* sal_Int64 value */
382 : sal_uInt64 uval; /* sal_uInt64 value */
383 : sal_uInt32 ulval; /* sal_uInt32 value */
384 : double dval; /* double value */
385 : float fval; /* float value */
386 : StringList* slval; /* StringList value */
387 : LabelList* llval; /* LabelList value */
388 : AstUnionLabel* lbval; /* union label value */
389 : AstMember* mval; /* member value */
390 : AttributeExceptions::Part attexcpval;
391 : AttributeExceptions attexcval;
392 :
393 :
394 : /* Line 374 of yacc.c */
395 : #line 396 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
396 : } YYSTYPE;
397 : # define YYSTYPE_IS_TRIVIAL 1
398 : # define yystype YYSTYPE /* obsolescent; will be withdrawn */
399 : # define YYSTYPE_IS_DECLARED 1
400 : #endif
401 :
402 : extern YYSTYPE yylval;
403 :
404 : #ifdef YYPARSE_PARAM
405 : #if defined __STDC__ || defined __cplusplus
406 : int yyparse (void *YYPARSE_PARAM);
407 : #else
408 : int yyparse ();
409 : #endif
410 : #else /* ! YYPARSE_PARAM */
411 : #if defined __STDC__ || defined __cplusplus
412 : int yyparse (void);
413 : #else
414 : int yyparse ();
415 : #endif
416 : #endif /* ! YYPARSE_PARAM */
417 :
418 : #endif /* !YY_YY_USR_LOCAL_SRC_LIBREOFFICE_WORKDIR_UNXLNGI6_PRO_YACCTARGET_IDLC_SOURCE_PARSER_HXX_INCLUDED */
419 :
420 : /* Copy the second part of user declarations. */
421 :
422 : /* Line 377 of yacc.c */
423 : #line 424 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
424 :
425 : #ifdef short
426 : # undef short
427 : #endif
428 :
429 : #ifdef YYTYPE_UINT8
430 : typedef YYTYPE_UINT8 yytype_uint8;
431 : #else
432 : typedef unsigned char yytype_uint8;
433 : #endif
434 :
435 : #ifdef YYTYPE_INT8
436 : typedef YYTYPE_INT8 yytype_int8;
437 : #elif (defined __STDC__ || defined __C99__FUNC__ \
438 : || defined __cplusplus || defined _MSC_VER)
439 : typedef signed char yytype_int8;
440 : #else
441 : typedef short int yytype_int8;
442 : #endif
443 :
444 : #ifdef YYTYPE_UINT16
445 : typedef YYTYPE_UINT16 yytype_uint16;
446 : #else
447 : typedef unsigned short int yytype_uint16;
448 : #endif
449 :
450 : #ifdef YYTYPE_INT16
451 : typedef YYTYPE_INT16 yytype_int16;
452 : #else
453 : typedef short int yytype_int16;
454 : #endif
455 :
456 : #ifndef YYSIZE_T
457 : # ifdef __SIZE_TYPE__
458 : # define YYSIZE_T __SIZE_TYPE__
459 : # elif defined size_t
460 : # define YYSIZE_T size_t
461 : # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
462 : || defined __cplusplus || defined _MSC_VER)
463 : # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
464 : # define YYSIZE_T size_t
465 : # else
466 : # define YYSIZE_T unsigned int
467 : # endif
468 : #endif
469 :
470 : #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
471 :
472 : #ifndef YY_
473 : # if defined YYENABLE_NLS && YYENABLE_NLS
474 : # if ENABLE_NLS
475 : # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
476 : # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
477 : # endif
478 : # endif
479 : # ifndef YY_
480 : # define YY_(Msgid) Msgid
481 : # endif
482 : #endif
483 :
484 : /* Suppress unused-variable warnings by "using" E. */
485 : #if ! defined lint || defined __GNUC__
486 : # define YYUSE(E) ((void) (E))
487 : #else
488 : # define YYUSE(E) /* empty */
489 : #endif
490 :
491 : /* Identity function, used to suppress warnings about constant conditions. */
492 : #ifndef lint
493 : # define YYID(N) (N)
494 : #else
495 : #if (defined __STDC__ || defined __C99__FUNC__ \
496 : || defined __cplusplus || defined _MSC_VER)
497 : static int
498 : YYID (int yyi)
499 : #else
500 : static int
501 : YYID (yyi)
502 : int yyi;
503 : #endif
504 : {
505 : return yyi;
506 : }
507 : #endif
508 :
509 : #if ! defined yyoverflow || YYERROR_VERBOSE
510 :
511 : /* The parser invokes alloca or malloc; define the necessary symbols. */
512 :
513 : # ifdef YYSTACK_USE_ALLOCA
514 : # if YYSTACK_USE_ALLOCA
515 : # ifdef __GNUC__
516 : # define YYSTACK_ALLOC __builtin_alloca
517 : # elif defined __BUILTIN_VA_ARG_INCR
518 : # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
519 : # elif defined _AIX
520 : # define YYSTACK_ALLOC __alloca
521 : # elif defined _MSC_VER
522 : # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
523 : # define alloca _alloca
524 : # else
525 : # define YYSTACK_ALLOC alloca
526 : # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
527 : || defined __cplusplus || defined _MSC_VER)
528 : # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
529 : /* Use EXIT_SUCCESS as a witness for stdlib.h. */
530 : # ifndef EXIT_SUCCESS
531 : # define EXIT_SUCCESS 0
532 : # endif
533 : # endif
534 : # endif
535 : # endif
536 : # endif
537 :
538 : # ifdef YYSTACK_ALLOC
539 : /* Pacify GCC's `empty if-body' warning. */
540 : # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
541 : # ifndef YYSTACK_ALLOC_MAXIMUM
542 : /* The OS might guarantee only one guard page at the bottom of the stack,
543 : and a page size can be as small as 4096 bytes. So we cannot safely
544 : invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
545 : to allow for a few compiler-allocated temporary stack slots. */
546 : # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
547 : # endif
548 : # else
549 : # define YYSTACK_ALLOC YYMALLOC
550 : # define YYSTACK_FREE YYFREE
551 : # ifndef YYSTACK_ALLOC_MAXIMUM
552 : # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
553 : # endif
554 : # if (defined __cplusplus && ! defined EXIT_SUCCESS \
555 : && ! ((defined YYMALLOC || defined malloc) \
556 : && (defined YYFREE || defined free)))
557 : # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
558 : # ifndef EXIT_SUCCESS
559 : # define EXIT_SUCCESS 0
560 : # endif
561 : # endif
562 : # ifndef YYMALLOC
563 : # define YYMALLOC malloc
564 : # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
565 : || defined __cplusplus || defined _MSC_VER)
566 : void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
567 : # endif
568 : # endif
569 : # ifndef YYFREE
570 : # define YYFREE free
571 : # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
572 : || defined __cplusplus || defined _MSC_VER)
573 : void free (void *); /* INFRINGES ON USER NAME SPACE */
574 : # endif
575 : # endif
576 : # endif
577 : #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
578 :
579 :
580 : #if (! defined yyoverflow \
581 : && (! defined __cplusplus \
582 : || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
583 :
584 : /* A type that is properly aligned for any stack member. */
585 : union yyalloc
586 : {
587 : yytype_int16 yyss_alloc;
588 : YYSTYPE yyvs_alloc;
589 : };
590 :
591 : /* The size of the maximum gap between one aligned stack and the next. */
592 : # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
593 :
594 : /* The size of an array large to enough to hold all stacks, each with
595 : N elements. */
596 : # define YYSTACK_BYTES(N) \
597 : ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
598 : + YYSTACK_GAP_MAXIMUM)
599 :
600 : # define YYCOPY_NEEDED 1
601 :
602 : /* Relocate STACK from its old location to the new one. The
603 : local variables YYSIZE and YYSTACKSIZE give the old and new number of
604 : elements in the stack, and YYPTR gives the new location of the
605 : stack. Advance YYPTR to a properly aligned location for the next
606 : stack. */
607 : # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
608 : do \
609 : { \
610 : YYSIZE_T yynewbytes; \
611 : YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
612 : Stack = &yyptr->Stack_alloc; \
613 : yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
614 : yyptr += yynewbytes / sizeof (*yyptr); \
615 : } \
616 : while (YYID (0))
617 :
618 : #endif
619 :
620 : #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
621 : /* Copy COUNT objects from SRC to DST. The source and destination do
622 : not overlap. */
623 : # ifndef YYCOPY
624 : # if defined __GNUC__ && 1 < __GNUC__
625 : # define YYCOPY(Dst, Src, Count) \
626 : __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
627 : # else
628 : # define YYCOPY(Dst, Src, Count) \
629 : do \
630 : { \
631 : YYSIZE_T yyi; \
632 : for (yyi = 0; yyi < (Count); yyi++) \
633 : (Dst)[yyi] = (Src)[yyi]; \
634 : } \
635 : while (YYID (0))
636 : # endif
637 : # endif
638 : #endif /* !YYCOPY_NEEDED */
639 :
640 : /* YYFINAL -- State number of the termination state. */
641 : #define YYFINAL 11
642 : /* YYLAST -- Last index in YYTABLE. */
643 : #define YYLAST 786
644 :
645 : /* YYNTOKENS -- Number of terminals. */
646 : #define YYNTOKENS 82
647 : /* YYNNTS -- Number of nonterminals. */
648 : #define YYNNTS 225
649 : /* YYNRULES -- Number of rules. */
650 : #define YYNRULES 355
651 : /* YYNRULES -- Number of states. */
652 : #define YYNSTATES 511
653 :
654 : /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
655 : #define YYUNDEFTOK 2
656 : #define YYMAXUTOK 315
657 :
658 : #define YYTRANSLATE(YYX) \
659 : ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
660 :
661 : /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
662 : static const yytype_uint8 yytranslate[] =
663 : {
664 : 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
665 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
666 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
667 : 2, 2, 2, 2, 2, 2, 2, 78, 73, 2,
668 : 68, 69, 76, 74, 67, 75, 2, 77, 2, 2,
669 : 2, 2, 2, 2, 2, 2, 2, 2, 64, 61,
670 : 80, 70, 81, 2, 2, 2, 2, 2, 2, 2,
671 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
672 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
673 : 2, 65, 2, 66, 72, 2, 2, 2, 2, 2,
674 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
675 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
676 : 2, 2, 2, 62, 71, 63, 79, 2, 2, 2,
677 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
678 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
679 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
680 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
681 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
682 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
683 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
684 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
685 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
686 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
687 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
688 : 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
689 : 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
690 : 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
691 : 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
692 : 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
693 : 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
694 : 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
695 : 55, 56, 57, 58, 59, 60
696 : };
697 :
698 : #if YYDEBUG
699 : /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
700 : YYRHS. */
701 : static const yytype_uint16 yyprhs[] =
702 : {
703 : 0, 0, 3, 5, 8, 9, 12, 13, 17, 20,
704 : 22, 23, 24, 28, 29, 33, 34, 38, 39, 43,
705 : 44, 48, 49, 53, 54, 55, 56, 57, 67, 69,
706 : 71, 72, 76, 78, 79, 80, 81, 89, 92, 95,
707 : 96, 100, 101, 104, 105, 106, 110, 111, 115, 116,
708 : 120, 121, 122, 129, 133, 137, 139, 141, 143, 145,
709 : 147, 149, 151, 153, 155, 157, 159, 161, 164, 167,
710 : 168, 171, 174, 177, 180, 181, 183, 184, 188, 190,
711 : 191, 192, 197, 198, 199, 200, 201, 202, 214, 216,
712 : 218, 220, 221, 226, 227, 230, 231, 232, 241, 244,
713 : 246, 248, 250, 252, 253, 255, 256, 257, 258, 265,
714 : 267, 271, 273, 274, 279, 283, 284, 287, 288, 289,
715 : 290, 291, 292, 293, 305, 306, 307, 308, 309, 319,
716 : 321, 323, 325, 329, 331, 335, 337, 341, 343, 347,
717 : 351, 353, 357, 361, 363, 367, 371, 375, 377, 380,
718 : 383, 386, 388, 390, 394, 396, 398, 400, 402, 404,
719 : 406, 408, 410, 412, 414, 416, 417, 418, 424, 425,
720 : 426, 427, 435, 436, 441, 444, 447, 448, 452, 456,
721 : 460, 464, 467, 469, 472, 474, 477, 478, 479, 485,
722 : 487, 489, 490, 495, 497, 498, 502, 505, 506, 507,
723 : 508, 517, 518, 519, 525, 527, 529, 532, 533, 534,
724 : 540, 541, 545, 547, 549, 551, 552, 556, 559, 560,
725 : 565, 566, 568, 570, 572, 574, 575, 579, 582, 585,
726 : 586, 587, 588, 594, 597, 598, 603, 604, 606, 607,
727 : 611, 612, 617, 619, 621, 623, 626, 628, 630, 634,
728 : 635, 637, 641, 643, 645, 647, 649, 651, 653, 655,
729 : 657, 659, 661, 663, 665, 667, 669, 672, 675, 678,
730 : 680, 682, 684, 686, 688, 690, 692, 694, 696, 698,
731 : 700, 702, 704, 705, 709, 710, 711, 712, 720, 723,
732 : 724, 725, 726, 734, 735, 736, 743, 747, 748, 750,
733 : 754, 757, 760, 761, 762, 763, 769, 772, 774, 777,
734 : 778, 779, 780, 781, 791, 794, 795, 800, 801, 804,
735 : 806, 810, 811, 812, 813, 814, 815, 816, 817, 818,
736 : 836, 838, 840, 842, 844, 846, 849, 852, 853, 854,
737 : 858, 861, 864, 865, 866, 870, 871, 872, 878, 879,
738 : 880, 886, 889, 891, 893, 895
739 : };
740 :
741 : /* YYRHS -- A `-1'-separated list of the rules' RHS. */
742 : static const yytype_int16 yyrhs[] =
743 : {
744 : 83, 0, -1, 84, -1, 85, 84, -1, -1, 87,
745 : 88, -1, -1, 95, 86, 61, -1, 1, 61, -1,
746 : 53, -1, -1, -1, 211, 89, 61, -1, -1, 181,
747 : 90, 61, -1, -1, 100, 91, 61, -1, -1, 191,
748 : 92, 61, -1, -1, 203, 93, 61, -1, -1, 160,
749 : 94, 61, -1, -1, -1, -1, -1, 17, 96, 306,
750 : 97, 62, 98, 84, 99, 63, -1, 104, -1, 103,
751 : -1, -1, 13, 102, 306, -1, 101, -1, -1, -1,
752 : -1, 108, 105, 62, 106, 111, 107, 63, -1, 1,
753 : 63, -1, 101, 109, -1, -1, 64, 110, 231, -1,
754 : -1, 111, 112, -1, -1, -1, 116, 113, 61, -1,
755 : -1, 130, 114, 61, -1, -1, 150, 115, 61, -1,
756 : -1, -1, 119, 235, 117, 219, 118, 122, -1, 65,
757 : 120, 66, -1, 120, 67, 121, -1, 121, -1, 4,
758 : -1, 21, -1, 23, -1, 20, -1, 16, -1, 5,
759 : -1, 9, -1, 31, -1, 14, -1, 15, -1, 24,
760 : -1, 1, 66, -1, 62, 123, -1, -1, 124, 63,
761 : -1, 1, 63, -1, 126, 127, -1, 128, 125, -1,
762 : -1, 126, -1, -1, 51, 145, 61, -1, 128, -1,
763 : -1, -1, 52, 129, 145, 61, -1, -1, -1, -1,
764 : -1, -1, 136, 131, 306, 132, 68, 133, 137, 134,
765 : 69, 135, 144, -1, 235, -1, 42, -1, 139, -1,
766 : -1, 137, 67, 138, 139, -1, -1, 1, 67, -1,
767 : -1, -1, 65, 142, 66, 140, 235, 141, 143, 218,
768 : -1, 1, 235, -1, 48, -1, 49, -1, 50, -1,
769 : 54, -1, -1, 145, -1, -1, -1, -1, 22, 146,
770 : 68, 147, 148, 69, -1, 149, -1, 148, 67, 149,
771 : -1, 231, -1, -1, 152, 13, 151, 231, -1, 65,
772 : 20, 66, -1, -1, 154, 153, -1, -1, -1, -1,
773 : -1, -1, -1, 7, 155, 177, 156, 306, 157, 70,
774 : 158, 165, 159, 61, -1, -1, -1, -1, -1, 8,
775 : 161, 306, 162, 62, 163, 153, 164, 63, -1, 166,
776 : -1, 167, -1, 168, -1, 167, 71, 168, -1, 169,
777 : -1, 168, 72, 169, -1, 170, -1, 169, 73, 170,
778 : -1, 171, -1, 170, 55, 171, -1, 170, 56, 171,
779 : -1, 172, -1, 171, 74, 172, -1, 171, 75, 172,
780 : -1, 173, -1, 172, 76, 173, -1, 172, 77, 173,
781 : -1, 172, 78, 173, -1, 174, -1, 74, 174, -1,
782 : 75, 174, -1, 79, 174, -1, 231, -1, 175, -1,
783 : 68, 166, 69, -1, 58, -1, 59, -1, 60, -1,
784 : 46, -1, 47, -1, 166, -1, 241, -1, 246, -1,
785 : 247, -1, 244, -1, 231, -1, -1, -1, 12, 179,
786 : 306, 180, 109, -1, -1, -1, -1, 178, 182, 62,
787 : 183, 269, 184, 63, -1, -1, 119, 235, 186, 215,
788 : -1, 1, 61, -1, 187, 188, -1, -1, 189, 228,
789 : 61, -1, 190, 228, 61, -1, 19, 228, 61, -1,
790 : 18, 228, 61, -1, 185, 61, -1, 13, -1, 119,
791 : 13, -1, 25, -1, 119, 25, -1, -1, -1, 25,
792 : 192, 306, 193, 194, -1, 195, -1, 208, -1, -1,
793 : 64, 231, 196, 197, -1, 198, -1, -1, 62, 199,
794 : 63, -1, 199, 200, -1, -1, -1, -1, 306, 201,
795 : 68, 137, 69, 144, 202, 61, -1, -1, -1, 27,
796 : 204, 306, 205, 206, -1, 207, -1, 208, -1, 64,
797 : 231, -1, -1, -1, 62, 209, 187, 210, 63, -1,
798 : -1, 30, 212, 213, -1, 259, -1, 283, -1, 274,
799 : -1, -1, 234, 214, 215, -1, 218, 216, -1, -1,
800 : 216, 67, 217, 218, -1, -1, 219, -1, 220, -1,
801 : 306, -1, 221, -1, -1, 306, 222, 223, -1, 225,
802 : 224, -1, 224, 225, -1, -1, -1, -1, 65, 226,
803 : 176, 227, 66, -1, 231, 229, -1, -1, 229, 67,
804 : 230, 231, -1, -1, 306, -1, -1, 57, 232, 306,
805 : -1, -1, 231, 57, 233, 306, -1, 235, -1, 252,
806 : -1, 236, -1, 231, 237, -1, 240, -1, 251, -1,
807 : 80, 238, 81, -1, -1, 239, -1, 238, 67, 239,
808 : -1, 235, -1, 241, -1, 244, -1, 245, -1, 247,
809 : -1, 246, -1, 248, -1, 249, -1, 250, -1, 242,
810 : -1, 243, -1, 40, -1, 39, -1, 41, -1, 45,
811 : 40, -1, 45, 39, -1, 45, 41, -1, 37, -1,
812 : 38, -1, 34, -1, 36, -1, 35, -1, 33, -1,
813 : 44, -1, 43, -1, 255, -1, 253, -1, 259, -1,
814 : 283, -1, 274, -1, -1, 235, 254, 223, -1, -1,
815 : -1, -1, 26, 256, 80, 257, 235, 258, 81, -1,
816 : 1, 81, -1, -1, -1, -1, 263, 260, 62, 261,
817 : 268, 262, 63, -1, -1, -1, 28, 264, 306, 265,
818 : 266, 109, -1, 80, 267, 81, -1, -1, 306, -1,
819 : 267, 67, 306, -1, 270, 269, -1, 269, 270, -1,
820 : -1, -1, -1, 273, 271, 215, 272, 61, -1, 1,
821 : 61, -1, 236, -1, 231, 237, -1, -1, -1, -1,
822 : -1, 11, 275, 306, 276, 62, 277, 279, 278, 63,
823 : -1, 282, 280, -1, -1, 280, 67, 281, 282, -1,
824 : -1, 1, 67, -1, 306, -1, 306, 70, 166, -1,
825 : -1, -1, -1, -1, -1, -1, -1, -1, 32, 284,
826 : 306, 285, 29, 286, 68, 287, 292, 288, 69, 289,
827 : 62, 290, 293, 291, 63, -1, 241, -1, 245, -1,
828 : 247, -1, 274, -1, 231, -1, 295, 294, -1, 294,
829 : 295, -1, -1, -1, 297, 296, 303, -1, 299, 298,
830 : -1, 298, 299, -1, -1, -1, 10, 300, 64, -1,
831 : -1, -1, 6, 301, 166, 302, 64, -1, -1, -1,
832 : 234, 304, 218, 305, 61, -1, 1, 61, -1, 3,
833 : -1, 51, -1, 52, -1, 53, -1
834 : };
835 :
836 : /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
837 : static const yytype_uint16 yyrline[] =
838 : {
839 : 0, 372, 372, 375, 376, 380, 382, 381, 389, 397,
840 : 398, 403, 402, 411, 410, 419, 418, 427, 426, 435,
841 : 434, 443, 442, 454, 459, 494, 498, 453, 512, 513,
842 : 518, 517, 530, 570, 650, 654, 569, 675, 683, 694,
843 : 693, 702, 708, 709, 714, 713, 722, 721, 730, 729,
844 : 742, 746, 740, 779, 787, 794, 801, 806, 811, 816,
845 : 821, 826, 831, 836, 841, 846, 851, 856, 864, 866,
846 : 875, 876, 888, 894, 901, 910, 911, 915, 925, 926,
847 : 931, 930, 949, 953, 991, 995, 999, 948, 1025, 1026,
848 : 1033, 1036, 1034, 1040, 1041, 1052, 1056, 1049, 1116, 1125,
849 : 1129, 1133, 1140, 1145, 1151, 1153, 1160, 1164, 1159, 1176,
850 : 1181, 1189, 1212, 1210, 1232, 1233, 1237, 1238, 1243, 1247,
851 : 1251, 1256, 1260, 1242, 1286, 1290, 1295, 1319, 1285, 1332,
852 : 1334, 1337, 1338, 1345, 1346, 1353, 1354, 1361, 1362, 1366,
853 : 1373, 1374, 1378, 1385, 1386, 1390, 1394, 1401, 1402, 1406,
854 : 1410, 1416, 1425, 1426, 1433, 1437, 1441, 1445, 1449, 1456,
855 : 1469, 1470, 1471, 1472, 1473, 1504, 1508, 1503, 1523, 1543,
856 : 1547, 1522, 1561, 1559, 1623, 1631, 1632, 1636, 1686, 1728,
857 : 1770, 1812, 1820, 1825, 1836, 1841, 1853, 1857, 1852, 1886,
858 : 1887, 1892, 1891, 1917, 1918, 1922, 1928, 1929, 1934, 1946,
859 : 1933, 1962, 1966, 1961, 1995, 1996, 2000, 2019, 2025, 2018,
860 : 2040, 2039, 2044, 2045, 2046, 2051, 2050, 2105, 2123, 2121,
861 : 2141, 2147, 2148, 2152, 2171, 2179, 2178, 2192, 2208, 2222,
862 : 2229, 2233, 2228, 2253, 2272, 2270, 2291, 2297, 2304, 2303,
863 : 2317, 2315, 2330, 2331, 2335, 2336, 2343, 2347, 2351, 2352,
864 : 2356, 2361, 2369, 2379, 2380, 2381, 2382, 2383, 2384, 2385,
865 : 2386, 2390, 2391, 2395, 2399, 2403, 2410, 2414, 2418, 2425,
866 : 2429, 2436, 2443, 2450, 2457, 2464, 2471, 2478, 2479, 2483,
867 : 2484, 2485, 2490, 2489, 2521, 2529, 2533, 2520, 2571, 2581,
868 : 2601, 2605, 2580, 2618, 2622, 2617, 2654, 2655, 2659, 2665,
869 : 2676, 2679, 2680, 2685, 2689, 2684, 2739, 2747, 2748, 2772,
870 : 2776, 2803, 2807, 2771, 2826, 2831, 2829, 2835, 2836, 2844,
871 : 2868, 2905, 2909, 2914, 2918, 2922, 2926, 2955, 2959, 2904,
872 : 2971, 2975, 2979, 2983, 2984, 3052, 3055, 3056, 3061, 3060,
873 : 3099, 3115, 3129, 3136, 3135, 3145, 3149, 3144, 3161, 3165,
874 : 3160, 3193, 3201, 3202, 3203, 3204
875 : };
876 : #endif
877 :
878 : #if YYDEBUG || YYERROR_VERBOSE || 0
879 : /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
880 : First, the terminals, then, starting at YYNTOKENS, nonterminals. */
881 : static const char *const yytname[] =
882 : {
883 : "$end", "error", "$undefined", "IDL_IDENTIFIER", "IDL_ATTRIBUTE",
884 : "IDL_BOUND", "IDL_CASE", "IDL_CONST", "IDL_CONSTANTS", "IDL_CONSTRAINED",
885 : "IDL_DEFAULT", "IDL_ENUM", "IDL_EXCEPTION", "IDL_INTERFACE",
886 : "IDL_MAYBEAMBIGUOUS", "IDL_MAYBEDEFAULT", "IDL_MAYBEVOID", "IDL_MODULE",
887 : "IDL_NEEDS", "IDL_OBSERVES", "IDL_OPTIONAL", "IDL_PROPERTY",
888 : "IDL_RAISES", "IDL_READONLY", "IDL_REMOVABLE", "IDL_SERVICE",
889 : "IDL_SEQUENCE", "IDL_SINGLETON", "IDL_STRUCT", "IDL_SWITCH",
890 : "IDL_TYPEDEF", "IDL_TRANSIENT", "IDL_UNION", "IDL_ANY", "IDL_CHAR",
891 : "IDL_BOOLEAN", "IDL_BYTE", "IDL_DOUBLE", "IDL_FLOAT", "IDL_HYPER",
892 : "IDL_LONG", "IDL_SHORT", "IDL_VOID", "IDL_STRING", "IDL_TYPE",
893 : "IDL_UNSIGNED", "IDL_TRUE", "IDL_FALSE", "IDL_IN", "IDL_OUT",
894 : "IDL_INOUT", "IDL_GET", "IDL_SET", "IDL_PUBLISHED", "IDL_ELLIPSIS",
895 : "IDL_LEFTSHIFT", "IDL_RIGHTSHIFT", "IDL_SCOPESEPARATOR",
896 : "IDL_INTEGER_LITERAL", "IDL_INTEGER_ULITERAL", "IDL_FLOATING_PT_LITERAL",
897 : "';'", "'{'", "'}'", "':'", "'['", "']'", "','", "'('", "')'", "'='",
898 : "'|'", "'^'", "'&'", "'+'", "'-'", "'*'", "'/'", "'%'", "'~'", "'<'",
899 : "'>'", "$accept", "start", "definitions", "definition", "$@1",
900 : "opt_published", "publishable_definition", "$@2", "$@3", "$@4", "$@5",
901 : "$@6", "$@7", "module_dcl", "$@8", "$@9", "$@10", "$@11", "interface",
902 : "interface_decl", "$@12", "forward_dcl", "interface_dcl", "$@13", "$@14",
903 : "$@15", "interfaceheader", "inheritance_spec", "$@16", "exports",
904 : "export", "$@17", "$@18", "$@19", "attribute", "$@20", "$@21",
905 : "flag_header", "opt_attrflags", "opt_attrflag", "opt_attribute_block",
906 : "attribute_block_rest", "opt_attribute_raises",
907 : "opt_attribute_get_raises", "attribute_get_raises",
908 : "opt_attribute_set_raises", "attribute_set_raises", "$@22", "operation",
909 : "$@23", "$@24", "$@25", "$@26", "$@27", "op_type_spec", "parameters",
910 : "$@28", "parameter", "$@29", "$@30", "direction", "opt_rest",
911 : "opt_raises", "raises", "$@31", "$@32", "exception_list",
912 : "exception_name", "interface_inheritance_decl", "$@33",
913 : "optional_inherited_interface", "constants_exports", "constants_export",
914 : "$@34", "$@35", "$@36", "$@37", "$@38", "constants_dcl", "$@39", "$@40",
915 : "$@41", "$@42", "expression", "const_expr", "or_expr", "xor_expr",
916 : "and_expr", "shift_expr", "add_expr", "mult_expr", "unary_expr",
917 : "primary_expr", "literal", "positive_int_expr", "const_type",
918 : "exception_header", "$@43", "$@44", "exception_dcl", "$@45", "$@46",
919 : "$@47", "property", "$@48", "service_exports", "service_export",
920 : "service_interface_header", "service_service_header", "service_dcl",
921 : "$@49", "$@50", "service_dfn", "service_interface_dfn", "$@51",
922 : "opt_service_body", "service_body", "constructors", "constructor",
923 : "$@52", "$@53", "singleton_dcl", "$@54", "$@55", "singleton_dfn",
924 : "singleton_interface_dfn", "service_obsolete_dfn", "$@56", "$@57",
925 : "type_dcl", "$@58", "type_declarator", "$@59", "at_least_one_declarator",
926 : "declarators", "$@60", "declarator", "simple_declarator",
927 : "complex_declarator", "array_declarator", "$@61",
928 : "at_least_one_array_dim", "array_dims", "array_dim", "$@62", "$@63",
929 : "at_least_one_scoped_name", "scoped_names", "$@64", "scoped_name",
930 : "$@65", "$@66", "type_spec", "simple_type_spec", "fundamental_type",
931 : "opt_type_args", "type_args", "type_arg", "base_type_spec",
932 : "integer_type", "signed_int", "unsigned_int", "floating_pt_type",
933 : "char_type", "byte_type", "boolean_type", "any_type", "type_type",
934 : "string_type", "template_type_spec", "constructed_type_spec",
935 : "array_type", "$@67", "sequence_type_spec", "$@68", "$@69", "$@70",
936 : "struct_type", "$@71", "$@72", "$@73", "structure_header", "$@74",
937 : "$@75", "opt_type_params", "type_params", "at_least_one_member",
938 : "members", "member", "$@76", "$@77", "type_or_parameter", "enum_type",
939 : "$@78", "$@79", "$@80", "$@81", "at_least_one_enumerator", "enumerators",
940 : "$@82", "enumerator", "union_type", "$@83", "$@84", "$@85", "$@86",
941 : "$@87", "$@88", "$@89", "$@90", "switch_type_spec",
942 : "at_least_one_case_branch", "case_branches", "case_branch", "$@91",
943 : "at_least_one_case_label", "case_labels", "case_label", "$@92", "$@93",
944 : "$@94", "element_spec", "$@95", "$@96", "identifier", YY_NULL
945 : };
946 : #endif
947 :
948 : # ifdef YYPRINT
949 : /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
950 : token YYLEX-NUM. */
951 : static const yytype_uint16 yytoknum[] =
952 : {
953 : 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
954 : 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
955 : 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
956 : 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
957 : 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
958 : 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
959 : 315, 59, 123, 125, 58, 91, 93, 44, 40, 41,
960 : 61, 124, 94, 38, 43, 45, 42, 47, 37, 126,
961 : 60, 62
962 : };
963 : # endif
964 :
965 : /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
966 : static const yytype_uint16 yyr1[] =
967 : {
968 : 0, 82, 83, 84, 84, 85, 86, 85, 85, 87,
969 : 87, 89, 88, 90, 88, 91, 88, 92, 88, 93,
970 : 88, 94, 88, 96, 97, 98, 99, 95, 100, 100,
971 : 102, 101, 103, 105, 106, 107, 104, 104, 108, 110,
972 : 109, 109, 111, 111, 113, 112, 114, 112, 115, 112,
973 : 117, 118, 116, 119, 120, 120, 121, 121, 121, 121,
974 : 121, 121, 121, 121, 121, 121, 121, 121, 122, 122,
975 : 123, 123, 124, 124, 124, 125, 125, 126, 127, 127,
976 : 129, 128, 131, 132, 133, 134, 135, 130, 136, 136,
977 : 137, 138, 137, 137, 137, 140, 141, 139, 139, 142,
978 : 142, 142, 143, 143, 144, 144, 146, 147, 145, 148,
979 : 148, 149, 151, 150, 152, 152, 153, 153, 155, 156,
980 : 157, 158, 159, 154, 161, 162, 163, 164, 160, 165,
981 : 166, 167, 167, 168, 168, 169, 169, 170, 170, 170,
982 : 171, 171, 171, 172, 172, 172, 172, 173, 173, 173,
983 : 173, 174, 174, 174, 175, 175, 175, 175, 175, 176,
984 : 177, 177, 177, 177, 177, 179, 180, 178, 182, 183,
985 : 184, 181, 186, 185, 185, 187, 187, 188, 188, 188,
986 : 188, 188, 189, 189, 190, 190, 192, 193, 191, 194,
987 : 194, 196, 195, 197, 197, 198, 199, 199, 201, 202,
988 : 200, 204, 205, 203, 206, 206, 207, 209, 210, 208,
989 : 212, 211, 211, 211, 211, 214, 213, 215, 217, 216,
990 : 216, 218, 218, 219, 220, 222, 221, 223, 224, 224,
991 : 226, 227, 225, 228, 230, 229, 229, 231, 232, 231,
992 : 233, 231, 234, 234, 235, 235, 236, 236, 237, 237,
993 : 238, 238, 239, 240, 240, 240, 240, 240, 240, 240,
994 : 240, 241, 241, 242, 242, 242, 243, 243, 243, 244,
995 : 244, 245, 246, 247, 248, 249, 250, 251, 251, 252,
996 : 252, 252, 254, 253, 256, 257, 258, 255, 255, 260,
997 : 261, 262, 259, 264, 265, 263, 266, 266, 267, 267,
998 : 268, 269, 269, 271, 272, 270, 270, 273, 273, 275,
999 : 276, 277, 278, 274, 279, 281, 280, 280, 280, 282,
1000 : 282, 284, 285, 286, 287, 288, 289, 290, 291, 283,
1001 : 292, 292, 292, 292, 292, 293, 294, 294, 296, 295,
1002 : 297, 298, 298, 300, 299, 301, 302, 299, 304, 305,
1003 : 303, 303, 306, 306, 306, 306
1004 : };
1005 :
1006 : /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1007 : static const yytype_uint8 yyr2[] =
1008 : {
1009 : 0, 2, 1, 2, 0, 2, 0, 3, 2, 1,
1010 : 0, 0, 3, 0, 3, 0, 3, 0, 3, 0,
1011 : 3, 0, 3, 0, 0, 0, 0, 9, 1, 1,
1012 : 0, 3, 1, 0, 0, 0, 7, 2, 2, 0,
1013 : 3, 0, 2, 0, 0, 3, 0, 3, 0, 3,
1014 : 0, 0, 6, 3, 3, 1, 1, 1, 1, 1,
1015 : 1, 1, 1, 1, 1, 1, 1, 2, 2, 0,
1016 : 2, 2, 2, 2, 0, 1, 0, 3, 1, 0,
1017 : 0, 4, 0, 0, 0, 0, 0, 11, 1, 1,
1018 : 1, 0, 4, 0, 2, 0, 0, 8, 2, 1,
1019 : 1, 1, 1, 0, 1, 0, 0, 0, 6, 1,
1020 : 3, 1, 0, 4, 3, 0, 2, 0, 0, 0,
1021 : 0, 0, 0, 11, 0, 0, 0, 0, 9, 1,
1022 : 1, 1, 3, 1, 3, 1, 3, 1, 3, 3,
1023 : 1, 3, 3, 1, 3, 3, 3, 1, 2, 2,
1024 : 2, 1, 1, 3, 1, 1, 1, 1, 1, 1,
1025 : 1, 1, 1, 1, 1, 0, 0, 5, 0, 0,
1026 : 0, 7, 0, 4, 2, 2, 0, 3, 3, 3,
1027 : 3, 2, 1, 2, 1, 2, 0, 0, 5, 1,
1028 : 1, 0, 4, 1, 0, 3, 2, 0, 0, 0,
1029 : 8, 0, 0, 5, 1, 1, 2, 0, 0, 5,
1030 : 0, 3, 1, 1, 1, 0, 3, 2, 0, 4,
1031 : 0, 1, 1, 1, 1, 0, 3, 2, 2, 0,
1032 : 0, 0, 5, 2, 0, 4, 0, 1, 0, 3,
1033 : 0, 4, 1, 1, 1, 2, 1, 1, 3, 0,
1034 : 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1035 : 1, 1, 1, 1, 1, 1, 2, 2, 2, 1,
1036 : 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1037 : 1, 1, 0, 3, 0, 0, 0, 7, 2, 0,
1038 : 0, 0, 7, 0, 0, 6, 3, 0, 1, 3,
1039 : 2, 2, 0, 0, 0, 5, 2, 1, 2, 0,
1040 : 0, 0, 0, 9, 2, 0, 4, 0, 2, 1,
1041 : 3, 0, 0, 0, 0, 0, 0, 0, 0, 17,
1042 : 1, 1, 1, 1, 1, 2, 2, 0, 0, 3,
1043 : 2, 2, 0, 0, 3, 0, 0, 5, 0, 0,
1044 : 5, 2, 1, 1, 1, 1
1045 : };
1046 :
1047 : /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
1048 : Performed when YYTABLE doesn't specify something else to do. Zero
1049 : means the default is an error. */
1050 : static const yytype_uint16 yydefact[] =
1051 : {
1052 : 0, 0, 23, 9, 0, 2, 0, 0, 6, 8,
1053 : 0, 1, 3, 0, 124, 309, 165, 30, 186, 201,
1054 : 293, 210, 321, 5, 15, 32, 29, 28, 33, 21,
1055 : 168, 13, 17, 19, 11, 212, 289, 214, 213, 0,
1056 : 352, 353, 354, 355, 24, 37, 0, 0, 0, 0,
1057 : 0, 0, 0, 0, 0, 0, 39, 38, 0, 0,
1058 : 0, 0, 0, 0, 0, 0, 7, 0, 125, 310,
1059 : 166, 31, 187, 202, 294, 0, 284, 274, 271, 273,
1060 : 272, 269, 270, 264, 263, 265, 276, 275, 0, 238,
1061 : 211, 249, 215, 242, 244, 246, 253, 261, 262, 254,
1062 : 255, 257, 256, 258, 259, 260, 247, 243, 278, 277,
1063 : 279, 281, 280, 237, 322, 16, 0, 34, 22, 169,
1064 : 14, 18, 20, 12, 290, 25, 0, 0, 41, 0,
1065 : 0, 297, 288, 0, 267, 266, 268, 0, 240, 0,
1066 : 245, 0, 0, 0, 40, 43, 302, 0, 0, 126,
1067 : 311, 167, 207, 0, 188, 189, 190, 0, 203, 204,
1068 : 205, 0, 41, 285, 239, 0, 252, 0, 250, 216,
1069 : 220, 221, 222, 224, 223, 230, 283, 229, 323, 0,
1070 : 0, 0, 249, 282, 307, 291, 302, 303, 26, 117,
1071 : 0, 176, 191, 206, 0, 298, 295, 0, 241, 0,
1072 : 248, 217, 0, 0, 227, 0, 89, 0, 0, 42,
1073 : 44, 0, 46, 82, 48, 0, 88, 0, 301, 306,
1074 : 308, 0, 0, 0, 0, 118, 127, 117, 312, 0,
1075 : 319, 0, 194, 0, 296, 282, 251, 218, 226, 157,
1076 : 158, 154, 155, 156, 0, 0, 0, 0, 159, 130,
1077 : 131, 133, 135, 137, 140, 143, 147, 152, 231, 151,
1078 : 228, 324, 0, 56, 61, 62, 64, 65, 60, 59,
1079 : 57, 58, 66, 63, 0, 55, 36, 0, 50, 0,
1080 : 0, 0, 112, 171, 292, 304, 27, 0, 0, 116,
1081 : 0, 0, 314, 0, 0, 182, 0, 0, 184, 0,
1082 : 0, 0, 175, 0, 0, 0, 197, 192, 193, 299,
1083 : 0, 0, 0, 148, 149, 150, 0, 0, 0, 0,
1084 : 0, 0, 0, 0, 0, 0, 0, 0, 67, 114,
1085 : 53, 0, 45, 0, 47, 83, 49, 0, 0, 119,
1086 : 164, 160, 163, 161, 162, 128, 313, 318, 315, 320,
1087 : 174, 0, 236, 0, 59, 183, 185, 172, 181, 0,
1088 : 0, 209, 0, 287, 219, 153, 132, 134, 136, 138,
1089 : 139, 141, 142, 144, 145, 146, 232, 334, 330, 331,
1090 : 332, 333, 325, 54, 51, 223, 0, 113, 305, 0,
1091 : 0, 180, 233, 179, 0, 177, 178, 195, 196, 198,
1092 : 0, 69, 84, 120, 316, 234, 173, 0, 326, 0,
1093 : 52, 0, 0, 0, 0, 0, 0, 0, 80, 68,
1094 : 0, 79, 76, 0, 0, 85, 90, 121, 235, 0,
1095 : 327, 71, 106, 0, 0, 70, 72, 78, 73, 75,
1096 : 94, 98, 99, 100, 101, 0, 91, 0, 0, 105,
1097 : 0, 0, 77, 0, 95, 0, 86, 122, 129, 199,
1098 : 104, 345, 343, 328, 337, 338, 342, 107, 81, 0,
1099 : 0, 92, 105, 0, 0, 0, 0, 0, 335, 0,
1100 : 340, 0, 96, 87, 123, 200, 346, 344, 329, 336,
1101 : 0, 348, 339, 341, 0, 109, 111, 103, 0, 351,
1102 : 0, 0, 108, 102, 0, 347, 349, 110, 97, 0,
1103 : 350
1104 : };
1105 :
1106 : /* YYDEFGOTO[NTERM-NUM]. */
1107 : static const yytype_int16 yydefgoto[] =
1108 : {
1109 : -1, 4, 5, 6, 39, 7, 23, 64, 61, 55,
1110 : 62, 63, 59, 8, 10, 67, 148, 224, 24, 25,
1111 : 49, 26, 27, 58, 145, 208, 28, 57, 116, 179,
1112 : 209, 277, 279, 281, 210, 333, 401, 211, 274, 275,
1113 : 410, 419, 420, 438, 421, 436, 422, 434, 212, 280,
1114 : 386, 411, 447, 472, 213, 425, 455, 426, 469, 497,
1115 : 445, 504, 459, 460, 451, 481, 494, 495, 214, 337,
1116 : 215, 226, 227, 287, 389, 412, 448, 473, 29, 46,
1117 : 126, 189, 288, 457, 248, 249, 250, 251, 252, 253,
1118 : 254, 255, 256, 257, 258, 339, 30, 48, 128, 31,
1119 : 60, 146, 217, 301, 394, 231, 302, 303, 304, 32,
1120 : 50, 129, 154, 155, 232, 307, 308, 362, 398, 407,
1121 : 474, 33, 51, 130, 158, 159, 156, 191, 305, 34,
1122 : 53, 90, 141, 169, 201, 311, 170, 171, 172, 173,
1123 : 202, 176, 204, 177, 203, 326, 351, 392, 413, 259,
1124 : 137, 165, 92, 183, 94, 140, 167, 168, 95, 96,
1125 : 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
1126 : 107, 108, 142, 109, 133, 197, 310, 110, 65, 147,
1127 : 221, 36, 52, 131, 162, 194, 185, 180, 218, 223,
1128 : 338, 187, 111, 47, 127, 190, 290, 228, 292, 390,
1129 : 229, 112, 54, 143, 205, 327, 400, 415, 450, 477,
1130 : 382, 463, 478, 464, 479, 465, 480, 466, 476, 475,
1131 : 498, 492, 500, 509, 113
1132 : };
1133 :
1134 : /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1135 : STATE-NUM. */
1136 : #define YYPACT_NINF -402
1137 : static const yytype_int16 yypact[] =
1138 : {
1139 : 700, -42, -402, -402, 24, -402, 156, 321, -402, -402,
1140 : 61, -402, -402, -36, -402, -402, -402, -402, -402, -402,
1141 : -402, -402, -402, -402, -402, 25, -402, -402, -402, -402,
1142 : -402, -402, -402, -402, -402, -402, -402, -402, -402, -31,
1143 : -402, -402, -402, -402, -402, -402, 61, 61, 61, 61,
1144 : 61, 61, 61, 482, 61, -27, -402, -402, 33, 30,
1145 : 68, 72, 89, 104, 117, 82, -402, 91, -402, -402,
1146 : -402, -402, -402, -402, -402, 101, -402, -402, -402, -402,
1147 : -402, -402, -402, -402, -402, -402, -402, -402, 79, -402,
1148 : -402, -35, -402, 120, -402, -402, -402, -402, -402, -402,
1149 : -402, -402, -402, -402, -402, -402, -402, -402, -402, -402,
1150 : -402, -402, -402, -402, -402, -402, 48, -402, -402, -402,
1151 : -402, -402, -402, -402, -402, -402, 125, 127, 128, 83,
1152 : 108, 111, -402, 114, -402, -402, -402, 61, -402, 600,
1153 : -402, 61, 130, 167, 142, -402, -402, 629, 450, -402,
1154 : -402, -402, -402, 48, -402, -402, -402, 48, -402, -402,
1155 : -402, 61, 128, -402, -402, 61, 120, -50, -402, -402,
1156 : -402, -402, -402, -402, 135, -402, -402, -402, -402, 274,
1157 : 357, -13, -35, -402, 136, -402, -402, -402, -402, 195,
1158 : 61, -402, 142, 142, -49, -402, -402, 600, -402, 600,
1159 : -402, 137, 130, 3, 130, 138, -402, 734, 140, -402,
1160 : -402, 600, -402, -402, -402, 192, 120, 145, -402, -402,
1161 : 146, 147, 403, 61, 149, -402, -402, 195, -402, 13,
1162 : 144, 10, 153, 61, -402, 139, -402, -402, -402, -402,
1163 : -402, -402, -402, -402, 3, 64, 64, 64, -402, 154,
1164 : 152, 143, 52, 29, 59, -402, -402, -402, -402, 142,
1165 : -402, -402, 151, -402, -402, -402, -402, -402, -402, 164,
1166 : -402, -402, -402, -402, 92, -402, -402, 157, 120, 172,
1167 : 61, 174, -402, -402, -402, -402, -402, 653, 178, -402,
1168 : 179, 170, 176, 3, 186, -402, 48, 48, -402, 755,
1169 : 572, 189, -402, 48, 48, 185, -402, -402, -402, -402,
1170 : 175, 61, 182, -402, -402, -402, 3, 3, 3, 3,
1171 : 3, 3, 3, 3, 3, 3, 191, 187, -402, -402,
1172 : -402, 755, -402, 61, -402, -402, -402, 48, 197, -402,
1173 : 142, -402, -402, -402, -402, -402, -402, -402, -402, -402,
1174 : -402, 198, 142, 199, -402, -402, -402, 120, -402, 213,
1175 : 217, -402, 6, -402, -402, -402, 152, 143, 52, 29,
1176 : 29, 59, 59, -402, -402, -402, -402, 142, -402, -402,
1177 : -402, -402, -402, -402, -402, -402, 214, 142, -402, 61,
1178 : 61, -402, 216, -402, 61, -402, -402, -402, -402, -402,
1179 : 215, 226, -402, -402, -402, -402, -402, 221, -402, 46,
1180 : -402, 14, 220, 48, 14, 229, 230, 270, -402, -402,
1181 : 231, 244, 246, 228, 90, 232, -402, -402, 142, 5,
1182 : -402, -402, -402, 237, 270, -402, -402, -402, -402, -402,
1183 : -402, 120, -402, -402, -402, 236, -402, 234, 3, 270,
1184 : 15, 238, -402, 243, -402, 19, -402, -402, -402, -402,
1185 : -402, -402, -402, -402, -402, -402, -402, -402, -402, 600,
1186 : 600, -402, 270, 259, 263, 3, 241, 265, 15, 527,
1187 : 15, 48, 120, -402, -402, -402, -402, -402, -402, -402,
1188 : 9, -402, -402, -402, 110, -402, 142, 276, 271, -402,
1189 : 61, 48, -402, -402, 61, -402, -402, -402, -402, 275,
1190 : -402
1191 : };
1192 :
1193 : /* YYPGOTO[NTERM-NUM]. */
1194 : static const yytype_int16 yypgoto[] =
1195 : {
1196 : -402, -402, 1, -402, -402, -402, -402, -402, -402, -402,
1197 : -402, -402, -402, -402, -402, -402, -402, -402, -402, -402,
1198 : -402, -402, -402, -402, -402, -402, -402, -116, -402, -402,
1199 : -402, -402, -402, -402, -402, -402, -402, 107, -402, 11,
1200 : -402, -402, -402, -402, -82, -402, -80, -402, -402, -402,
1201 : -402, -402, -402, -402, -402, -71, -402, -111, -402, -402,
1202 : -402, -402, -127, -401, -402, -402, -402, -154, -402, -402,
1203 : -402, 123, -402, -402, -402, -402, -402, -402, -402, -402,
1204 : -402, -402, -402, -402, -241, -402, 38, 39, 37, -194,
1205 : -147, -182, -84, -402, -402, -402, -402, -402, -402, -402,
1206 : -402, -402, -402, -402, -402, -402, -402, -402, -402, -402,
1207 : -402, -402, -402, -402, -402, -402, -402, -402, -402, -402,
1208 : -402, -402, -402, -402, -402, -402, 227, -402, -402, -402,
1209 : -402, -402, -402, -218, -402, -402, -307, 26, -402, -402,
1210 : -402, 159, -402, 160, -402, -402, -211, -402, -402, -51,
1211 : -402, -402, -114, -45, -137, 181, -402, 168, -402, -274,
1212 : -402, -402, 81, 42, 84, -261, -402, -402, -402, -402,
1213 : -402, -402, -402, -402, -402, -402, -402, 359, -402, -402,
1214 : -402, -402, -402, -402, -402, -402, -402, 184, 235, -402,
1215 : -402, -402, -6, -402, -402, -402, -402, -402, -402, -402,
1216 : -17, 367, -402, -402, -402, -402, -402, -402, -402, -402,
1217 : -402, -402, -402, -103, -402, -402, -402, -104, -402, -402,
1218 : -402, -402, -402, -402, -10
1219 : };
1220 :
1221 : /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1222 : positive, shift that token. If negative, reduce the rule which
1223 : number is the opposite. If YYTABLE_NINF, syntax error. */
1224 : #define YYTABLE_NINF -318
1225 : static const yytype_int16 yytable[] =
1226 : {
1227 : 44, 37, 91, 312, 364, 285, 40, 12, 93, 40,
1228 : 184, 294, 151, 341, 291, 423, 433, 199, 233, 9,
1229 : 470, 461, 138, 295, 11, 462, 344, 45, 296, 297,
1230 : 66, 200, 234, 453, 115, 298, 68, 69, 70, 71,
1231 : 72, 73, 74, 184, 114, 139, 196, 416, 219, 239,
1232 : 240, 40, 349, 378, 41, 42, 43, 41, 42, 43,
1233 : 89, 241, 242, 243, 40, 144, 380, 40, 132, 397,
1234 : 499, 244, 446, -208, 449, 299, -317, 245, 246, 424,
1235 : -317, -93, 247, -93, 424, 184, 353, -41, 91, 56,
1236 : 132, 118, 359, 360, 166, 117, 182, 417, 418, 41,
1237 : 42, 43, 192, 321, 322, 89, 193, 319, 320, -74,
1238 : 239, 240, 41, 42, 43, 41, 42, 43, 134, 135,
1239 : 136, 89, 241, 242, 243, 369, 370, 164, 91, 182,
1240 : 119, 174, 244, 120, 216, 323, 324, 325, 442, 443,
1241 : 444, 373, 374, 375, 124, 152, 91, 153, 91, 188,
1242 : 121, 195, 235, 125, 166, 198, -4, 1, 330, 331,
1243 : 91, 313, 314, 315, -10, 122, 278, -10, -10, -10,
1244 : 152, 182, 157, 2, 371, 372, 406, 501, 123, 502,
1245 : 230, -10, 132, -10, -10, -282, -10, 149, -10, 150,
1246 : 40, 161, 56, 506, 163, 175, 178, 508, 15, 138,
1247 : -225, -244, 225, 276, 237, 282, 261, 458, 283, 3,
1248 : 284, -245, 286, 174, 293, 306, 318, 328, 332, -4,
1249 : -286, 78, 79, 309, 317, 316, 83, 84, 85, 75,
1250 : 329, 40, 88, 334, 486, 336, 340, 347, 41, 42,
1251 : 43, 345, 346, 348, 89, 352, 352, 350, 361, 91,
1252 : 358, 365, 352, 352, 76, 357, 363, 376, 388, 391,
1253 : 393, 77, 78, 79, 80, 81, 82, 83, 84, 85,
1254 : 335, 86, 87, 88, 395, 75, 377, 40, 396, 41,
1255 : 42, 43, 402, 405, 408, 89, 387, -115, 409, 414,
1256 : 427, 430, 432, 431, 435, 440, 418, 417, 452, 446,
1257 : 76, 174, 454, 456, 468, 487, 467, 77, 78, 79,
1258 : 80, 81, 82, 83, 84, 85, 206, 86, 87, 88,
1259 : 484, 381, 13, 385, 485, 41, 42, 43, 488, 14,
1260 : 503, 89, 15, 16, 17, 505, 510, -35, 300, 207,
1261 : 439, 437, 383, 429, 471, 483, 18, 507, 19, 20,
1262 : 289, 21, 399, 22, 366, 368, 367, 160, 181, 384,
1263 : 40, 238, 428, 220, 260, 491, 35, 236, 342, 379,
1264 : 222, 343, 91, 404, 38, 489, 493, 0, 441, 403,
1265 : 230, 0, 186, 76, 174, 0, 0, 0, 0, 0,
1266 : 77, 78, 79, 80, 81, 82, 83, 84, 85, 0,
1267 : 86, 87, 88, 0, 181, 0, 40, 0, 41, 42,
1268 : 43, 0, 0, 0, 89, 0, 0, 0, 91, 91,
1269 : -170, 0, 0, 0, 482, 441, 0, 0, 91, 76,
1270 : 496, 0, 0, 0, 93, 0, 77, 78, 79, 80,
1271 : 81, 82, 83, 84, 85, 0, 86, 87, 88, 0,
1272 : 496, 1, 0, 0, 41, 42, 43, 0, -10, 0,
1273 : 89, -10, -10, -10, 0, 0, -300, 2, 0, 0,
1274 : 0, 0, 0, 0, 0, -10, 0, -10, -10, 0,
1275 : -10, 0, -10, 75, 0, 40, 0, 0, 0, 0,
1276 : 174, 0, 0, 15, 174, 0, 0, 0, 0, 0,
1277 : 0, 0, 0, 3, 0, 0, 0, 0, 76, 0,
1278 : 20, 0, 0, -4, 22, 77, 78, 79, 80, 81,
1279 : 82, 83, 84, 85, 0, 86, 87, 88, 490, 0,
1280 : 40, 0, 0, 41, 42, 43, 0, 0, 15, 89,
1281 : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1282 : 0, 0, 0, 76, 0, 20, 0, 0, 0, 22,
1283 : 77, 78, 79, 80, 81, 82, 83, 84, 85, 0,
1284 : 86, 87, 88, 75, 0, 40, 0, 0, 41, 42,
1285 : 43, 0, 0, 0, 89, 355, 0, 0, 0, 0,
1286 : 0, 0, 0, 0, 0, 0, 0, 356, 76, 0,
1287 : 0, 75, 0, 40, 0, 77, 78, 79, 80, 81,
1288 : 82, 83, 84, 85, 0, 86, 87, 88, 0, 0,
1289 : 0, 0, 0, 41, 42, 43, 76, 0, 0, 89,
1290 : 181, 0, 40, 77, 78, 79, 80, 81, 82, 83,
1291 : 84, 85, 0, 86, 87, 88, 0, 0, 0, 0,
1292 : 0, 41, 42, 43, 0, 76, 40, 89, 0, 0,
1293 : 0, 0, 77, 78, 79, 80, 81, 82, 83, 84,
1294 : 85, 0, 86, 87, 88, 0, 0, 0, 0, 0,
1295 : 41, 42, 43, 0, 0, 0, 89, 0, 79, 80,
1296 : 81, 82, 83, 84, 85, 0, 0, 0, 88, 0,
1297 : -4, 1, 0, 0, 41, 42, 43, 0, -10, 0,
1298 : 89, -10, -10, -10, 0, 0, 0, 2, 0, 0,
1299 : 0, 0, 0, 0, 0, -10, 0, -10, -10, 0,
1300 : -10, 0, -10, 0, 0, 262, 0, 0, 263, 264,
1301 : 0, 0, 0, 265, 0, 0, 0, 0, 266, 267,
1302 : 268, 0, 0, 3, 269, 270, 262, 271, 272, 263,
1303 : 264, 0, 0, 0, 265, 273, 0, 0, 0, 266,
1304 : 267, 268, 0, 0, 0, 354, 270, 0, 271, 272,
1305 : 0, 0, 0, 0, 0, 0, 273
1306 : };
1307 :
1308 : #define yypact_value_is_default(Yystate) \
1309 : (!!((Yystate) == (-402)))
1310 :
1311 : #define yytable_value_is_error(Yytable_value) \
1312 : YYID (0)
1313 :
1314 : static const yytype_int16 yycheck[] =
1315 : {
1316 : 10, 7, 53, 244, 311, 223, 3, 6, 53, 3,
1317 : 147, 1, 128, 287, 1, 1, 417, 67, 67, 61,
1318 : 1, 6, 57, 13, 0, 10, 287, 63, 18, 19,
1319 : 61, 81, 81, 434, 61, 25, 46, 47, 48, 49,
1320 : 50, 51, 52, 180, 54, 80, 162, 1, 61, 46,
1321 : 47, 3, 293, 327, 51, 52, 53, 51, 52, 53,
1322 : 57, 58, 59, 60, 3, 116, 327, 3, 81, 63,
1323 : 61, 68, 67, 63, 69, 65, 63, 74, 75, 65,
1324 : 67, 67, 79, 69, 65, 222, 297, 62, 139, 64,
1325 : 81, 61, 303, 304, 139, 62, 147, 51, 52, 51,
1326 : 52, 53, 153, 74, 75, 57, 157, 55, 56, 63,
1327 : 46, 47, 51, 52, 53, 51, 52, 53, 39, 40,
1328 : 41, 57, 58, 59, 60, 319, 320, 137, 179, 180,
1329 : 62, 141, 68, 61, 179, 76, 77, 78, 48, 49,
1330 : 50, 323, 324, 325, 62, 62, 197, 64, 199, 148,
1331 : 61, 161, 197, 62, 199, 165, 0, 1, 66, 67,
1332 : 211, 245, 246, 247, 8, 61, 211, 11, 12, 13,
1333 : 62, 222, 64, 17, 321, 322, 394, 67, 61, 69,
1334 : 190, 25, 81, 27, 28, 65, 30, 62, 32, 62,
1335 : 3, 80, 64, 500, 80, 65, 29, 504, 11, 57,
1336 : 65, 65, 7, 63, 67, 13, 68, 448, 63, 53,
1337 : 63, 65, 63, 223, 70, 62, 73, 66, 61, 63,
1338 : 81, 34, 35, 233, 72, 71, 39, 40, 41, 1,
1339 : 66, 3, 45, 61, 475, 61, 287, 67, 51, 52,
1340 : 53, 63, 63, 67, 57, 296, 297, 61, 63, 300,
1341 : 61, 69, 303, 304, 26, 300, 81, 66, 61, 61,
1342 : 61, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1343 : 280, 43, 44, 45, 61, 1, 327, 3, 61, 51,
1344 : 52, 53, 68, 67, 69, 57, 337, 13, 62, 68,
1345 : 70, 62, 22, 63, 63, 67, 52, 51, 61, 67,
1346 : 26, 311, 66, 69, 61, 64, 68, 33, 34, 35,
1347 : 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1348 : 61, 327, 1, 333, 61, 51, 52, 53, 63, 8,
1349 : 54, 57, 11, 12, 13, 64, 61, 63, 231, 65,
1350 : 422, 421, 331, 414, 455, 472, 25, 501, 27, 28,
1351 : 227, 30, 362, 32, 316, 318, 317, 130, 1, 333,
1352 : 3, 202, 413, 182, 204, 479, 7, 199, 287, 327,
1353 : 186, 287, 423, 390, 7, 478, 480, -1, 423, 389,
1354 : 390, -1, 147, 26, 394, -1, -1, -1, -1, -1,
1355 : 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1356 : 43, 44, 45, -1, 1, -1, 3, -1, 51, 52,
1357 : 53, -1, -1, -1, 57, -1, -1, -1, 469, 470,
1358 : 63, -1, -1, -1, 469, 470, -1, -1, 479, 26,
1359 : 481, -1, -1, -1, 479, -1, 33, 34, 35, 36,
1360 : 37, 38, 39, 40, 41, -1, 43, 44, 45, -1,
1361 : 501, 1, -1, -1, 51, 52, 53, -1, 8, -1,
1362 : 57, 11, 12, 13, -1, -1, 63, 17, -1, -1,
1363 : -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
1364 : 30, -1, 32, 1, -1, 3, -1, -1, -1, -1,
1365 : 500, -1, -1, 11, 504, -1, -1, -1, -1, -1,
1366 : -1, -1, -1, 53, -1, -1, -1, -1, 26, -1,
1367 : 28, -1, -1, 63, 32, 33, 34, 35, 36, 37,
1368 : 38, 39, 40, 41, -1, 43, 44, 45, 1, -1,
1369 : 3, -1, -1, 51, 52, 53, -1, -1, 11, 57,
1370 : -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1371 : -1, -1, -1, 26, -1, 28, -1, -1, -1, 32,
1372 : 33, 34, 35, 36, 37, 38, 39, 40, 41, -1,
1373 : 43, 44, 45, 1, -1, 3, -1, -1, 51, 52,
1374 : 53, -1, -1, -1, 57, 13, -1, -1, -1, -1,
1375 : -1, -1, -1, -1, -1, -1, -1, 25, 26, -1,
1376 : -1, 1, -1, 3, -1, 33, 34, 35, 36, 37,
1377 : 38, 39, 40, 41, -1, 43, 44, 45, -1, -1,
1378 : -1, -1, -1, 51, 52, 53, 26, -1, -1, 57,
1379 : 1, -1, 3, 33, 34, 35, 36, 37, 38, 39,
1380 : 40, 41, -1, 43, 44, 45, -1, -1, -1, -1,
1381 : -1, 51, 52, 53, -1, 26, 3, 57, -1, -1,
1382 : -1, -1, 33, 34, 35, 36, 37, 38, 39, 40,
1383 : 41, -1, 43, 44, 45, -1, -1, -1, -1, -1,
1384 : 51, 52, 53, -1, -1, -1, 57, -1, 35, 36,
1385 : 37, 38, 39, 40, 41, -1, -1, -1, 45, -1,
1386 : 0, 1, -1, -1, 51, 52, 53, -1, 8, -1,
1387 : 57, 11, 12, 13, -1, -1, -1, 17, -1, -1,
1388 : -1, -1, -1, -1, -1, 25, -1, 27, 28, -1,
1389 : 30, -1, 32, -1, -1, 1, -1, -1, 4, 5,
1390 : -1, -1, -1, 9, -1, -1, -1, -1, 14, 15,
1391 : 16, -1, -1, 53, 20, 21, 1, 23, 24, 4,
1392 : 5, -1, -1, -1, 9, 31, -1, -1, -1, 14,
1393 : 15, 16, -1, -1, -1, 20, 21, -1, 23, 24,
1394 : -1, -1, -1, -1, -1, -1, 31
1395 : };
1396 :
1397 : /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1398 : symbol of state STATE-NUM. */
1399 : static const yytype_uint16 yystos[] =
1400 : {
1401 : 0, 1, 17, 53, 83, 84, 85, 87, 95, 61,
1402 : 96, 0, 84, 1, 8, 11, 12, 13, 25, 27,
1403 : 28, 30, 32, 88, 100, 101, 103, 104, 108, 160,
1404 : 178, 181, 191, 203, 211, 259, 263, 274, 283, 86,
1405 : 3, 51, 52, 53, 306, 63, 161, 275, 179, 102,
1406 : 192, 204, 264, 212, 284, 91, 64, 109, 105, 94,
1407 : 182, 90, 92, 93, 89, 260, 61, 97, 306, 306,
1408 : 306, 306, 306, 306, 306, 1, 26, 33, 34, 35,
1409 : 36, 37, 38, 39, 40, 41, 43, 44, 45, 57,
1410 : 213, 231, 234, 235, 236, 240, 241, 242, 243, 244,
1411 : 245, 246, 247, 248, 249, 250, 251, 252, 253, 255,
1412 : 259, 274, 283, 306, 306, 61, 110, 62, 61, 62,
1413 : 61, 61, 61, 61, 62, 62, 162, 276, 180, 193,
1414 : 205, 265, 81, 256, 39, 40, 41, 232, 57, 80,
1415 : 237, 214, 254, 285, 231, 106, 183, 261, 98, 62,
1416 : 62, 109, 62, 64, 194, 195, 208, 64, 206, 207,
1417 : 208, 80, 266, 80, 306, 233, 235, 238, 239, 215,
1418 : 218, 219, 220, 221, 306, 65, 223, 225, 29, 111,
1419 : 269, 1, 231, 235, 236, 268, 270, 273, 84, 163,
1420 : 277, 209, 231, 231, 267, 306, 109, 257, 306, 67,
1421 : 81, 216, 222, 226, 224, 286, 42, 65, 107, 112,
1422 : 116, 119, 130, 136, 150, 152, 235, 184, 270, 61,
1423 : 237, 262, 269, 271, 99, 7, 153, 154, 279, 282,
1424 : 306, 187, 196, 67, 81, 235, 239, 67, 223, 46,
1425 : 47, 58, 59, 60, 68, 74, 75, 79, 166, 167,
1426 : 168, 169, 170, 171, 172, 173, 174, 175, 176, 231,
1427 : 225, 68, 1, 4, 5, 9, 14, 15, 16, 20,
1428 : 21, 23, 24, 31, 120, 121, 63, 113, 235, 114,
1429 : 131, 115, 13, 63, 63, 215, 63, 155, 164, 153,
1430 : 278, 1, 280, 70, 1, 13, 18, 19, 25, 65,
1431 : 119, 185, 188, 189, 190, 210, 62, 197, 198, 306,
1432 : 258, 217, 166, 174, 174, 174, 71, 72, 73, 55,
1433 : 56, 74, 75, 76, 77, 78, 227, 287, 66, 66,
1434 : 66, 67, 61, 117, 61, 306, 61, 151, 272, 177,
1435 : 231, 241, 244, 246, 247, 63, 63, 67, 67, 166,
1436 : 61, 228, 231, 228, 20, 13, 25, 235, 61, 228,
1437 : 228, 63, 199, 81, 218, 69, 168, 169, 170, 171,
1438 : 171, 172, 172, 173, 173, 173, 66, 231, 241, 245,
1439 : 247, 274, 292, 121, 219, 306, 132, 231, 61, 156,
1440 : 281, 61, 229, 61, 186, 61, 61, 63, 200, 306,
1441 : 288, 118, 68, 306, 282, 67, 215, 201, 69, 62,
1442 : 122, 133, 157, 230, 68, 289, 1, 51, 52, 123,
1443 : 124, 126, 128, 1, 65, 137, 139, 70, 231, 137,
1444 : 62, 63, 22, 145, 129, 63, 127, 128, 125, 126,
1445 : 67, 235, 48, 49, 50, 142, 67, 134, 158, 69,
1446 : 290, 146, 61, 145, 66, 138, 69, 165, 166, 144,
1447 : 145, 6, 10, 293, 295, 297, 299, 68, 61, 140,
1448 : 1, 139, 135, 159, 202, 301, 300, 291, 294, 296,
1449 : 298, 147, 235, 144, 61, 61, 166, 64, 63, 295,
1450 : 1, 234, 303, 299, 148, 149, 231, 141, 302, 61,
1451 : 304, 67, 69, 54, 143, 64, 218, 149, 218, 305,
1452 : 61
1453 : };
1454 :
1455 : #define yyerrok (yyerrstatus = 0)
1456 : #define yyclearin (yychar = YYEMPTY)
1457 : #define YYEMPTY (-2)
1458 : #define YYEOF 0
1459 :
1460 : #define YYACCEPT goto yyacceptlab
1461 : #define YYABORT goto yyabortlab
1462 : #define YYERROR goto yyerrorlab
1463 :
1464 :
1465 : /* Like YYERROR except do call yyerror. This remains here temporarily
1466 : to ease the transition to the new meaning of YYERROR, for GCC.
1467 : Once GCC version 2 has supplanted version 1, this can go. However,
1468 : YYFAIL appears to be in use. Nevertheless, it is formally deprecated
1469 : in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1470 : discussed. */
1471 :
1472 : #define YYFAIL goto yyerrlab
1473 : #if defined YYFAIL
1474 : /* This is here to suppress warnings from the GCC cpp's
1475 : -Wunused-macros. Normally we don't worry about that warning, but
1476 : some users do, and we want to make it easy for users to remove
1477 : YYFAIL uses, which will produce warnings from Bison 2.5. */
1478 : #endif
1479 :
1480 : #define YYRECOVERING() (!!yyerrstatus)
1481 :
1482 : #define YYBACKUP(Token, Value) \
1483 : do \
1484 : if (yychar == YYEMPTY) \
1485 : { \
1486 : yychar = (Token); \
1487 : yylval = (Value); \
1488 : YYPOPSTACK (yylen); \
1489 : yystate = *yyssp; \
1490 : goto yybackup; \
1491 : } \
1492 : else \
1493 : { \
1494 : yyerror (YY_("syntax error: cannot back up")); \
1495 : YYERROR; \
1496 : } \
1497 : while (YYID (0))
1498 :
1499 :
1500 : #define YYTERROR 1
1501 : #define YYERRCODE 256
1502 :
1503 : /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1504 : If N is 0, then set CURRENT to the empty location which ends
1505 : the previous symbol: RHS[0] (always defined). */
1506 :
1507 : #ifndef YYLLOC_DEFAULT
1508 : # define YYLLOC_DEFAULT(Current, Rhs, N) \
1509 : do \
1510 : if (YYID (N)) \
1511 : { \
1512 : (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1513 : (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1514 : (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1515 : (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1516 : } \
1517 : else \
1518 : { \
1519 : (Current).first_line = (Current).last_line = \
1520 : YYRHSLOC (Rhs, 0).last_line; \
1521 : (Current).first_column = (Current).last_column = \
1522 : YYRHSLOC (Rhs, 0).last_column; \
1523 : } \
1524 : while (YYID (0))
1525 : #endif
1526 :
1527 : #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1528 :
1529 :
1530 :
1531 : /* This macro is provided for backward compatibility. */
1532 :
1533 : #ifndef YY_LOCATION_PRINT
1534 : # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1535 : #endif
1536 :
1537 :
1538 : /* YYLEX -- calling `yylex' with the right arguments. */
1539 :
1540 : #ifdef YYLEX_PARAM
1541 : # define YYLEX yylex (YYLEX_PARAM)
1542 : #else
1543 : # define YYLEX yylex ()
1544 : #endif
1545 :
1546 : /* Enable debugging if requested. */
1547 : #if YYDEBUG
1548 :
1549 : # ifndef YYFPRINTF
1550 : # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1551 : # define YYFPRINTF fprintf
1552 : # endif
1553 :
1554 : # define YYDPRINTF(Args) \
1555 : do { \
1556 : if (yydebug) \
1557 : YYFPRINTF Args; \
1558 : } while (YYID (0))
1559 :
1560 : # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1561 : do { \
1562 : if (yydebug) \
1563 : { \
1564 : YYFPRINTF (stderr, "%s ", Title); \
1565 : yy_symbol_print (stderr, \
1566 : Type, Value); \
1567 : YYFPRINTF (stderr, "\n"); \
1568 : } \
1569 : } while (YYID (0))
1570 :
1571 :
1572 : /*--------------------------------.
1573 : | Print this symbol on YYOUTPUT. |
1574 : `--------------------------------*/
1575 :
1576 : /*ARGSUSED*/
1577 : #if (defined __STDC__ || defined __C99__FUNC__ \
1578 : || defined __cplusplus || defined _MSC_VER)
1579 : static void
1580 0 : yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1581 : #else
1582 : static void
1583 : yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1584 : FILE *yyoutput;
1585 : int yytype;
1586 : YYSTYPE const * const yyvaluep;
1587 : #endif
1588 : {
1589 0 : FILE *yyo = yyoutput;
1590 : YYUSE (yyo);
1591 0 : if (!yyvaluep)
1592 0 : return;
1593 : # ifdef YYPRINT
1594 : if (yytype < YYNTOKENS)
1595 : YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1596 : # else
1597 : YYUSE (yyoutput);
1598 : # endif
1599 : switch (yytype)
1600 : {
1601 : default:
1602 0 : break;
1603 : }
1604 : }
1605 :
1606 :
1607 : /*--------------------------------.
1608 : | Print this symbol on YYOUTPUT. |
1609 : `--------------------------------*/
1610 :
1611 : #if (defined __STDC__ || defined __C99__FUNC__ \
1612 : || defined __cplusplus || defined _MSC_VER)
1613 : static void
1614 0 : yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1615 : #else
1616 : static void
1617 : yy_symbol_print (yyoutput, yytype, yyvaluep)
1618 : FILE *yyoutput;
1619 : int yytype;
1620 : YYSTYPE const * const yyvaluep;
1621 : #endif
1622 : {
1623 0 : if (yytype < YYNTOKENS)
1624 0 : YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1625 : else
1626 0 : YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1627 :
1628 0 : yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1629 0 : YYFPRINTF (yyoutput, ")");
1630 0 : }
1631 :
1632 : /*------------------------------------------------------------------.
1633 : | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1634 : | TOP (included). |
1635 : `------------------------------------------------------------------*/
1636 :
1637 : #if (defined __STDC__ || defined __C99__FUNC__ \
1638 : || defined __cplusplus || defined _MSC_VER)
1639 : static void
1640 0 : yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1641 : #else
1642 : static void
1643 : yy_stack_print (yybottom, yytop)
1644 : yytype_int16 *yybottom;
1645 : yytype_int16 *yytop;
1646 : #endif
1647 : {
1648 0 : YYFPRINTF (stderr, "Stack now");
1649 0 : for (; yybottom <= yytop; yybottom++)
1650 : {
1651 0 : int yybot = *yybottom;
1652 0 : YYFPRINTF (stderr, " %d", yybot);
1653 : }
1654 0 : YYFPRINTF (stderr, "\n");
1655 0 : }
1656 :
1657 : # define YY_STACK_PRINT(Bottom, Top) \
1658 : do { \
1659 : if (yydebug) \
1660 : yy_stack_print ((Bottom), (Top)); \
1661 : } while (YYID (0))
1662 :
1663 :
1664 : /*------------------------------------------------.
1665 : | Report that the YYRULE is going to be reduced. |
1666 : `------------------------------------------------*/
1667 :
1668 : #if (defined __STDC__ || defined __C99__FUNC__ \
1669 : || defined __cplusplus || defined _MSC_VER)
1670 : static void
1671 0 : yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1672 : #else
1673 : static void
1674 : yy_reduce_print (yyvsp, yyrule)
1675 : YYSTYPE *yyvsp;
1676 : int yyrule;
1677 : #endif
1678 : {
1679 0 : int yynrhs = yyr2[yyrule];
1680 : int yyi;
1681 0 : unsigned long int yylno = yyrline[yyrule];
1682 : YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1683 0 : yyrule - 1, yylno);
1684 : /* The symbols being reduced. */
1685 0 : for (yyi = 0; yyi < yynrhs; yyi++)
1686 : {
1687 0 : YYFPRINTF (stderr, " $%d = ", yyi + 1);
1688 0 : yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1689 0 : &(yyvsp[(yyi + 1) - (yynrhs)])
1690 0 : );
1691 0 : YYFPRINTF (stderr, "\n");
1692 : }
1693 0 : }
1694 :
1695 : # define YY_REDUCE_PRINT(Rule) \
1696 : do { \
1697 : if (yydebug) \
1698 : yy_reduce_print (yyvsp, Rule); \
1699 : } while (YYID (0))
1700 :
1701 : /* Nonzero means print parse trace. It is left uninitialized so that
1702 : multiple parsers can coexist. */
1703 : int yydebug;
1704 : #else /* !YYDEBUG */
1705 : # define YYDPRINTF(Args)
1706 : # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1707 : # define YY_STACK_PRINT(Bottom, Top)
1708 : # define YY_REDUCE_PRINT(Rule)
1709 : #endif /* !YYDEBUG */
1710 :
1711 :
1712 : /* YYINITDEPTH -- initial size of the parser's stacks. */
1713 : #ifndef YYINITDEPTH
1714 : # define YYINITDEPTH 200
1715 : #endif
1716 :
1717 : /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1718 : if the built-in stack extension method is used).
1719 :
1720 : Do not make this value too large; the results are undefined if
1721 : YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1722 : evaluated with infinite-precision integer arithmetic. */
1723 :
1724 : #ifndef YYMAXDEPTH
1725 : # define YYMAXDEPTH 10000
1726 : #endif
1727 :
1728 :
1729 : #if YYERROR_VERBOSE
1730 :
1731 : # ifndef yystrlen
1732 : # if defined __GLIBC__ && defined _STRING_H
1733 : # define yystrlen strlen
1734 : # else
1735 : /* Return the length of YYSTR. */
1736 : #if (defined __STDC__ || defined __C99__FUNC__ \
1737 : || defined __cplusplus || defined _MSC_VER)
1738 : static YYSIZE_T
1739 : yystrlen (const char *yystr)
1740 : #else
1741 : static YYSIZE_T
1742 : yystrlen (yystr)
1743 : const char *yystr;
1744 : #endif
1745 : {
1746 : YYSIZE_T yylen;
1747 : for (yylen = 0; yystr[yylen]; yylen++)
1748 : continue;
1749 : return yylen;
1750 : }
1751 : # endif
1752 : # endif
1753 :
1754 : # ifndef yystpcpy
1755 : # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1756 : # define yystpcpy stpcpy
1757 : # else
1758 : /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1759 : YYDEST. */
1760 : #if (defined __STDC__ || defined __C99__FUNC__ \
1761 : || defined __cplusplus || defined _MSC_VER)
1762 : static char *
1763 : yystpcpy (char *yydest, const char *yysrc)
1764 : #else
1765 : static char *
1766 : yystpcpy (yydest, yysrc)
1767 : char *yydest;
1768 : const char *yysrc;
1769 : #endif
1770 : {
1771 : char *yyd = yydest;
1772 : const char *yys = yysrc;
1773 :
1774 : while ((*yyd++ = *yys++) != '\0')
1775 : continue;
1776 :
1777 : return yyd - 1;
1778 : }
1779 : # endif
1780 : # endif
1781 :
1782 : # ifndef yytnamerr
1783 : /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1784 : quotes and backslashes, so that it's suitable for yyerror. The
1785 : heuristic is that double-quoting is unnecessary unless the string
1786 : contains an apostrophe, a comma, or backslash (other than
1787 : backslash-backslash). YYSTR is taken from yytname. If YYRES is
1788 : null, do not copy; instead, return the length of what the result
1789 : would have been. */
1790 : static YYSIZE_T
1791 196 : yytnamerr (char *yyres, const char *yystr)
1792 : {
1793 196 : if (*yystr == '"')
1794 : {
1795 0 : YYSIZE_T yyn = 0;
1796 0 : char const *yyp = yystr;
1797 :
1798 : for (;;)
1799 0 : switch (*++yyp)
1800 : {
1801 : case '\'':
1802 : case ',':
1803 0 : goto do_not_strip_quotes;
1804 :
1805 : case '\\':
1806 0 : if (*++yyp != '\\')
1807 0 : goto do_not_strip_quotes;
1808 : /* Fall through. */
1809 : default:
1810 0 : if (yyres)
1811 0 : yyres[yyn] = *yyp;
1812 0 : yyn++;
1813 0 : break;
1814 :
1815 : case '"':
1816 0 : if (yyres)
1817 0 : yyres[yyn] = '\0';
1818 0 : return yyn;
1819 : }
1820 0 : do_not_strip_quotes: ;
1821 : }
1822 :
1823 196 : if (! yyres)
1824 146 : return yystrlen (yystr);
1825 :
1826 50 : return yystpcpy (yyres, yystr) - yyres;
1827 : }
1828 : # endif
1829 :
1830 : /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1831 : about the unexpected token YYTOKEN for the state stack whose top is
1832 : YYSSP.
1833 :
1834 : Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1835 : not large enough to hold the message. In that case, also set
1836 : *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1837 : required number of bytes is too large to store. */
1838 : static int
1839 35 : yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1840 : yytype_int16 *yyssp, int yytoken)
1841 : {
1842 35 : YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1843 35 : YYSIZE_T yysize = yysize0;
1844 : YYSIZE_T yysize1;
1845 : enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1846 : /* Internationalized format string. */
1847 35 : const char *yyformat = YY_NULL;
1848 : /* Arguments of yyformat. */
1849 : char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1850 : /* Number of reported tokens (one for the "unexpected", one per
1851 : "expected"). */
1852 35 : int yycount = 0;
1853 :
1854 : /* There are many possibilities here to consider:
1855 : - Assume YYFAIL is not used. It's too flawed to consider. See
1856 : <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1857 : for details. YYERROR is fine as it does not invoke this
1858 : function.
1859 : - If this state is a consistent state with a default action, then
1860 : the only way this function was invoked is if the default action
1861 : is an error action. In that case, don't check for expected
1862 : tokens because there are none.
1863 : - The only way there can be no lookahead present (in yychar) is if
1864 : this state is a consistent state with a default action. Thus,
1865 : detecting the absence of a lookahead is sufficient to determine
1866 : that there is no unexpected or expected token to report. In that
1867 : case, just report a simple "syntax error".
1868 : - Don't assume there isn't a lookahead just because this state is a
1869 : consistent state with a default action. There might have been a
1870 : previous inconsistent state, consistent state with a non-default
1871 : action, or user semantic action that manipulated yychar.
1872 : - Of course, the expected token list depends on states to have
1873 : correct lookahead information, and it depends on the parser not
1874 : to perform extra reductions after fetching a lookahead from the
1875 : scanner and before detecting a syntax error. Thus, state merging
1876 : (from LALR or IELR) and default reductions corrupt the expected
1877 : token list. However, the list is correct for canonical LR with
1878 : one exception: it will still contain any token that will not be
1879 : accepted due to an error action in a later state.
1880 : */
1881 35 : if (yytoken != YYEMPTY)
1882 : {
1883 35 : int yyn = yypact[*yyssp];
1884 35 : yyarg[yycount++] = yytname[yytoken];
1885 35 : if (!yypact_value_is_default (yyn))
1886 : {
1887 : /* Start YYX at -YYN if negative to avoid negative indexes in
1888 : YYCHECK. In other words, skip the first -YYN actions for
1889 : this state because they are default actions. */
1890 35 : int yyxbegin = yyn < 0 ? -yyn : 0;
1891 : /* Stay within bounds of both yycheck and yytname. */
1892 35 : int yychecklim = YYLAST - yyn + 1;
1893 35 : int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1894 : int yyx;
1895 :
1896 1422 : for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1897 1411 : if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1898 155 : && !yytable_value_is_error (yytable[yyx + yyn]))
1899 : {
1900 135 : if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1901 : {
1902 24 : yycount = 1;
1903 24 : yysize = yysize0;
1904 24 : break;
1905 : }
1906 111 : yyarg[yycount++] = yytname[yyx];
1907 111 : yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1908 111 : if (! (yysize <= yysize1
1909 : && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1910 0 : return 2;
1911 111 : yysize = yysize1;
1912 : }
1913 : }
1914 : }
1915 :
1916 35 : switch (yycount)
1917 : {
1918 : # define YYCASE_(N, S) \
1919 : case N: \
1920 : yyformat = S; \
1921 : break
1922 0 : YYCASE_(0, YY_("syntax error"));
1923 24 : YYCASE_(1, YY_("syntax error, unexpected %s"));
1924 7 : YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1925 4 : YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1926 0 : YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1927 0 : YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1928 : # undef YYCASE_
1929 : }
1930 :
1931 35 : yysize1 = yysize + yystrlen (yyformat);
1932 35 : if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1933 0 : return 2;
1934 35 : yysize = yysize1;
1935 :
1936 35 : if (*yymsg_alloc < yysize)
1937 : {
1938 0 : *yymsg_alloc = 2 * yysize;
1939 0 : if (! (yysize <= *yymsg_alloc
1940 0 : && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1941 0 : *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1942 0 : return 1;
1943 : }
1944 :
1945 : /* Avoid sprintf, as that infringes on the user's name space.
1946 : Don't have undefined behavior even if the translation
1947 : produced a string with the wrong number of "%s"s. */
1948 : {
1949 35 : char *yyp = *yymsg;
1950 35 : int yyi = 0;
1951 1143 : while ((*yyp = *yyformat) != '\0')
1952 1073 : if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1953 : {
1954 50 : yyp += yytnamerr (yyp, yyarg[yyi++]);
1955 50 : yyformat += 2;
1956 : }
1957 : else
1958 : {
1959 1023 : yyp++;
1960 1023 : yyformat++;
1961 : }
1962 : }
1963 35 : return 0;
1964 : }
1965 : #endif /* YYERROR_VERBOSE */
1966 :
1967 : /*-----------------------------------------------.
1968 : | Release the memory associated to this symbol. |
1969 : `-----------------------------------------------*/
1970 :
1971 : /*ARGSUSED*/
1972 : #if (defined __STDC__ || defined __C99__FUNC__ \
1973 : || defined __cplusplus || defined _MSC_VER)
1974 : static void
1975 11608 : yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1976 : #else
1977 : static void
1978 : yydestruct (yymsg, yytype, yyvaluep)
1979 : const char *yymsg;
1980 : int yytype;
1981 : YYSTYPE *yyvaluep;
1982 : #endif
1983 : {
1984 : YYUSE (yyvaluep);
1985 :
1986 11608 : if (!yymsg)
1987 0 : yymsg = "Deleting";
1988 11608 : YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1989 :
1990 : switch (yytype)
1991 : {
1992 :
1993 : default:
1994 11608 : break;
1995 : }
1996 11608 : }
1997 :
1998 :
1999 :
2000 :
2001 : /* The lookahead symbol. */
2002 : int yychar;
2003 :
2004 :
2005 : #ifndef YYLVAL_INITIALIZE
2006 : # define YYLVAL_INITIALIZE()
2007 : #endif
2008 : #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2009 : # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2010 : # define YY_IGNORE_MAYBE_UNINITIALIZED_END
2011 : #endif
2012 :
2013 : /* The semantic value of the lookahead symbol. */
2014 : YYSTYPE yylval;
2015 :
2016 : /* Number of syntax errors so far. */
2017 : int yynerrs;
2018 :
2019 :
2020 : /*----------.
2021 : | yyparse. |
2022 : `----------*/
2023 :
2024 : #ifdef YYPARSE_PARAM
2025 : #if (defined __STDC__ || defined __C99__FUNC__ \
2026 : || defined __cplusplus || defined _MSC_VER)
2027 : int
2028 : yyparse (void *YYPARSE_PARAM)
2029 : #else
2030 : int
2031 : yyparse (YYPARSE_PARAM)
2032 : void *YYPARSE_PARAM;
2033 : #endif
2034 : #else /* ! YYPARSE_PARAM */
2035 : #if (defined __STDC__ || defined __C99__FUNC__ \
2036 : || defined __cplusplus || defined _MSC_VER)
2037 : int
2038 5600 : yyparse (void)
2039 : #else
2040 : int
2041 : yyparse ()
2042 :
2043 : #endif
2044 : #endif
2045 : {
2046 : int yystate;
2047 : /* Number of tokens to shift before error messages enabled. */
2048 : int yyerrstatus;
2049 :
2050 : /* The stacks and their tools:
2051 : `yyss': related to states.
2052 : `yyvs': related to semantic values.
2053 :
2054 : Refer to the stacks through separate pointers, to allow yyoverflow
2055 : to reallocate them elsewhere. */
2056 :
2057 : /* The state stack. */
2058 : yytype_int16 yyssa[YYINITDEPTH];
2059 : yytype_int16 *yyss;
2060 : yytype_int16 *yyssp;
2061 :
2062 : /* The semantic value stack. */
2063 : YYSTYPE yyvsa[YYINITDEPTH];
2064 : YYSTYPE *yyvs;
2065 : YYSTYPE *yyvsp;
2066 :
2067 : YYSIZE_T yystacksize;
2068 :
2069 : int yyn;
2070 : int yyresult;
2071 : /* Lookahead token as an internal (translated) token number. */
2072 5600 : int yytoken = 0;
2073 : /* The variables used to return semantic value and location from the
2074 : action routines. */
2075 : YYSTYPE yyval;
2076 :
2077 : #if YYERROR_VERBOSE
2078 : /* Buffer for error messages, and its allocated size. */
2079 : char yymsgbuf[128];
2080 5600 : char *yymsg = yymsgbuf;
2081 5600 : YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2082 : #endif
2083 :
2084 : #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2085 :
2086 : /* The number of symbols on the RHS of the reduced rule.
2087 : Keep to zero when no symbol should be popped. */
2088 5600 : int yylen = 0;
2089 :
2090 5600 : yyss = yyssa;
2091 5600 : yyvs = yyvsa;
2092 5600 : yystacksize = YYINITDEPTH;
2093 :
2094 5600 : YYDPRINTF ((stderr, "Starting parse\n"));
2095 :
2096 5600 : yystate = 0;
2097 5600 : yyerrstatus = 0;
2098 5600 : yynerrs = 0;
2099 5600 : yychar = YYEMPTY; /* Cause a token to be read. */
2100 :
2101 : /* Initialize stack pointers.
2102 : Waste one element of value and location stack
2103 : so that they stay on the same level as the state stack.
2104 : The wasted elements are never initialized. */
2105 5600 : yyssp = yyss;
2106 5600 : yyvsp = yyvs;
2107 :
2108 : YYLVAL_INITIALIZE ();
2109 5600 : goto yysetstate;
2110 :
2111 : /*------------------------------------------------------------.
2112 : | yynewstate -- Push a new state, which is found in yystate. |
2113 : `------------------------------------------------------------*/
2114 : yynewstate:
2115 : /* In all cases, when you get here, the value and location stacks
2116 : have just been pushed. So pushing a state here evens the stacks. */
2117 14909089 : yyssp++;
2118 :
2119 : yysetstate:
2120 14914689 : *yyssp = yystate;
2121 :
2122 14914689 : if (yyss + yystacksize - 1 <= yyssp)
2123 : {
2124 : /* Get the current used size of the three stacks, in elements. */
2125 11 : YYSIZE_T yysize = yyssp - yyss + 1;
2126 :
2127 : #ifdef yyoverflow
2128 : {
2129 : /* Give user a chance to reallocate the stack. Use copies of
2130 : these so that the &'s don't force the real ones into
2131 : memory. */
2132 : YYSTYPE *yyvs1 = yyvs;
2133 : yytype_int16 *yyss1 = yyss;
2134 :
2135 : /* Each stack pointer address is followed by the size of the
2136 : data in use in that stack, in bytes. This used to be a
2137 : conditional around just the two extra args, but that might
2138 : be undefined if yyoverflow is a macro. */
2139 : yyoverflow (YY_("memory exhausted"),
2140 : &yyss1, yysize * sizeof (*yyssp),
2141 : &yyvs1, yysize * sizeof (*yyvsp),
2142 : &yystacksize);
2143 :
2144 : yyss = yyss1;
2145 : yyvs = yyvs1;
2146 : }
2147 : #else /* no yyoverflow */
2148 : # ifndef YYSTACK_RELOCATE
2149 : goto yyexhaustedlab;
2150 : # else
2151 : /* Extend the stack our own way. */
2152 11 : if (YYMAXDEPTH <= yystacksize)
2153 0 : goto yyexhaustedlab;
2154 11 : yystacksize *= 2;
2155 11 : if (YYMAXDEPTH < yystacksize)
2156 0 : yystacksize = YYMAXDEPTH;
2157 :
2158 : {
2159 11 : yytype_int16 *yyss1 = yyss;
2160 : union yyalloc *yyptr =
2161 11 : (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2162 11 : if (! yyptr)
2163 0 : goto yyexhaustedlab;
2164 11 : YYSTACK_RELOCATE (yyss_alloc, yyss);
2165 11 : YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2166 : # undef YYSTACK_RELOCATE
2167 11 : if (yyss1 != yyssa)
2168 1 : YYSTACK_FREE (yyss1);
2169 : }
2170 : # endif
2171 : #endif /* no yyoverflow */
2172 :
2173 11 : yyssp = yyss + yysize - 1;
2174 11 : yyvsp = yyvs + yysize - 1;
2175 :
2176 11 : YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2177 : (unsigned long int) yystacksize));
2178 :
2179 11 : if (yyss + yystacksize - 1 <= yyssp)
2180 0 : YYABORT;
2181 : }
2182 :
2183 14914689 : YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2184 :
2185 14914689 : if (yystate == YYFINAL)
2186 5594 : YYACCEPT;
2187 :
2188 14909095 : goto yybackup;
2189 :
2190 : /*-----------.
2191 : | yybackup. |
2192 : `-----------*/
2193 : yybackup:
2194 :
2195 : /* Do appropriate processing given the current state. Read a
2196 : lookahead token if we need one and don't already have one. */
2197 :
2198 : /* First try to decide what to do without reference to lookahead token. */
2199 14909095 : yyn = yypact[yystate];
2200 14909095 : if (yypact_value_is_default (yyn))
2201 8773428 : goto yydefault;
2202 :
2203 : /* Not known => get a lookahead token if don't already have one. */
2204 :
2205 : /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2206 6135667 : if (yychar == YYEMPTY)
2207 : {
2208 4614253 : YYDPRINTF ((stderr, "Reading a token: "));
2209 4614253 : yychar = YYLEX;
2210 : }
2211 :
2212 6135667 : if (yychar <= YYEOF)
2213 : {
2214 11194 : yychar = yytoken = YYEOF;
2215 11194 : YYDPRINTF ((stderr, "Now at end of input.\n"));
2216 : }
2217 : else
2218 : {
2219 6124473 : yytoken = YYTRANSLATE (yychar);
2220 6124473 : YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2221 : }
2222 :
2223 : /* If the proper action on seeing token YYTOKEN is to reduce or to
2224 : detect an error, take that action. */
2225 6135667 : yyn += yytoken;
2226 6135667 : if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2227 : goto yydefault;
2228 5016690 : yyn = yytable[yyn];
2229 5016690 : if (yyn <= 0)
2230 : {
2231 : if (yytable_value_is_error (yyn))
2232 : goto yyerrlab;
2233 402598 : yyn = -yyn;
2234 402598 : goto yyreduce;
2235 : }
2236 :
2237 : /* Count tokens shifted since error; after three, turn off error
2238 : status. */
2239 4614092 : if (yyerrstatus)
2240 29 : yyerrstatus--;
2241 :
2242 : /* Shift the lookahead token. */
2243 4614092 : YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2244 :
2245 : /* Discard the shifted token. */
2246 4614092 : yychar = YYEMPTY;
2247 :
2248 4614092 : yystate = yyn;
2249 : YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2250 4614092 : *++yyvsp = yylval;
2251 : YY_IGNORE_MAYBE_UNINITIALIZED_END
2252 :
2253 4614092 : goto yynewstate;
2254 :
2255 :
2256 : /*-----------------------------------------------------------.
2257 : | yydefault -- do the default action for the current state. |
2258 : `-----------------------------------------------------------*/
2259 : yydefault:
2260 9892405 : yyn = yydefact[yystate];
2261 9892405 : if (yyn == 0)
2262 196 : goto yyerrlab;
2263 9892209 : goto yyreduce;
2264 :
2265 :
2266 : /*-----------------------------.
2267 : | yyreduce -- Do a reduction. |
2268 : `-----------------------------*/
2269 : yyreduce:
2270 : /* yyn is the number of a rule to reduce with. */
2271 10294807 : yylen = yyr2[yyn];
2272 :
2273 : /* If YYLEN is nonzero, implement the default value of the action:
2274 : `$$ = $1'.
2275 :
2276 : Otherwise, the following line sets YYVAL to garbage.
2277 : This behavior is undocumented and Bison
2278 : users should not rely upon it. Assigning to YYVAL
2279 : unconditionally makes the parser a bit smaller, and it avoids a
2280 : GCC warning that YYVAL may be used uninitialized. */
2281 10294807 : yyval = yyvsp[1-yylen];
2282 :
2283 :
2284 10294807 : YY_REDUCE_PRINT (yyn);
2285 10294807 : switch (yyn)
2286 : {
2287 : case 6:
2288 : /* Line 1813 of yacc.c */
2289 : #line 382 "/usr/local/src/libreoffice/idlc/source/parser.y"
2290 : {
2291 : idlc()->setParseState(PS_ModuleDeclSeen);
2292 : }
2293 : break;
2294 :
2295 : case 7:
2296 : /* Line 1813 of yacc.c */
2297 : #line 386 "/usr/local/src/libreoffice/idlc/source/parser.y"
2298 : {
2299 : idlc()->setParseState(PS_NoState);
2300 : }
2301 : break;
2302 :
2303 : case 8:
2304 : /* Line 1813 of yacc.c */
2305 : #line 390 "/usr/local/src/libreoffice/idlc/source/parser.y"
2306 : {
2307 : yyerror("definitions");
2308 : yyerrok;
2309 : }
2310 : break;
2311 :
2312 : case 9:
2313 : /* Line 1813 of yacc.c */
2314 : #line 397 "/usr/local/src/libreoffice/idlc/source/parser.y"
2315 : { idlc()->setPublished(true); }
2316 : break;
2317 :
2318 : case 10:
2319 : /* Line 1813 of yacc.c */
2320 : #line 398 "/usr/local/src/libreoffice/idlc/source/parser.y"
2321 : { idlc()->setPublished(false); }
2322 : break;
2323 :
2324 : case 11:
2325 : /* Line 1813 of yacc.c */
2326 : #line 403 "/usr/local/src/libreoffice/idlc/source/parser.y"
2327 : {
2328 : idlc()->setParseState(PS_TypeDeclSeen);
2329 : }
2330 : break;
2331 :
2332 : case 12:
2333 : /* Line 1813 of yacc.c */
2334 : #line 407 "/usr/local/src/libreoffice/idlc/source/parser.y"
2335 : {
2336 : idlc()->setParseState(PS_NoState);
2337 : }
2338 : break;
2339 :
2340 : case 13:
2341 : /* Line 1813 of yacc.c */
2342 : #line 411 "/usr/local/src/libreoffice/idlc/source/parser.y"
2343 : {
2344 : idlc()->setParseState(PS_ExceptionDeclSeen);
2345 : }
2346 : break;
2347 :
2348 : case 14:
2349 : /* Line 1813 of yacc.c */
2350 : #line 415 "/usr/local/src/libreoffice/idlc/source/parser.y"
2351 : {
2352 : idlc()->setParseState(PS_NoState);
2353 : }
2354 : break;
2355 :
2356 : case 15:
2357 : /* Line 1813 of yacc.c */
2358 : #line 419 "/usr/local/src/libreoffice/idlc/source/parser.y"
2359 : {
2360 : idlc()->setParseState(PS_InterfaceDeclSeen);
2361 : }
2362 : break;
2363 :
2364 : case 16:
2365 : /* Line 1813 of yacc.c */
2366 : #line 423 "/usr/local/src/libreoffice/idlc/source/parser.y"
2367 : {
2368 : idlc()->setParseState(PS_NoState);
2369 : }
2370 : break;
2371 :
2372 : case 17:
2373 : /* Line 1813 of yacc.c */
2374 : #line 427 "/usr/local/src/libreoffice/idlc/source/parser.y"
2375 : {
2376 : idlc()->setParseState(PS_ServiceDeclSeen);
2377 : }
2378 : break;
2379 :
2380 : case 18:
2381 : /* Line 1813 of yacc.c */
2382 : #line 431 "/usr/local/src/libreoffice/idlc/source/parser.y"
2383 : {
2384 : idlc()->setParseState(PS_NoState);
2385 : }
2386 : break;
2387 :
2388 : case 19:
2389 : /* Line 1813 of yacc.c */
2390 : #line 435 "/usr/local/src/libreoffice/idlc/source/parser.y"
2391 : {
2392 : idlc()->setParseState(PS_SingletonDeclSeen);
2393 : }
2394 : break;
2395 :
2396 : case 20:
2397 : /* Line 1813 of yacc.c */
2398 : #line 439 "/usr/local/src/libreoffice/idlc/source/parser.y"
2399 : {
2400 : idlc()->setParseState(PS_NoState);
2401 : }
2402 : break;
2403 :
2404 : case 21:
2405 : /* Line 1813 of yacc.c */
2406 : #line 443 "/usr/local/src/libreoffice/idlc/source/parser.y"
2407 : {
2408 : idlc()->setParseState(PS_ConstantsDeclSeen);
2409 : }
2410 : break;
2411 :
2412 : case 22:
2413 : /* Line 1813 of yacc.c */
2414 : #line 447 "/usr/local/src/libreoffice/idlc/source/parser.y"
2415 : {
2416 : idlc()->setParseState(PS_NoState);
2417 : }
2418 : break;
2419 :
2420 : case 23:
2421 : /* Line 1813 of yacc.c */
2422 : #line 454 "/usr/local/src/libreoffice/idlc/source/parser.y"
2423 : {
2424 : idlc()->setParseState(PS_ModuleSeen);
2425 : idlc()->setPublished(false);
2426 : }
2427 : break;
2428 :
2429 : case 24:
2430 : /* Line 1813 of yacc.c */
2431 : #line 459 "/usr/local/src/libreoffice/idlc/source/parser.y"
2432 : {
2433 : idlc()->setParseState(PS_ModuleIDSeen);
2434 : checkIdentifier((yyvsp[(3) - (3)].sval));
2435 :
2436 : AstScope* pScope = idlc()->scopes()->topNonNull();
2437 : AstModule* pModule = NULL;
2438 : AstDeclaration* pExists = NULL;
2439 :
2440 : if ( pScope )
2441 : {
2442 : pModule = new AstModule(*(yyvsp[(3) - (3)].sval), pScope);
2443 : if( (pExists = pScope->lookupForAdd(pModule)) )
2444 : {
2445 : pExists->setInMainfile(idlc()->isInMainFile());
2446 : pExists->setFileName(pModule->getFileName());
2447 : if (pExists->isPredefined())
2448 : {
2449 : pExists->setPredefined(false);
2450 : if (pExists->getDocumentation().getLength() == 0 &&
2451 : pModule->getDocumentation().getLength() > 0)
2452 : {
2453 : pExists->setDocumentation(pModule->getDocumentation());
2454 : }
2455 : }
2456 : delete(pModule);
2457 : pModule = (AstModule*)pExists;
2458 : } else
2459 : {
2460 : pScope->addDeclaration(pModule);
2461 : }
2462 : idlc()->scopes()->push(pModule);
2463 : }
2464 : delete (yyvsp[(3) - (3)].sval);
2465 : }
2466 : break;
2467 :
2468 : case 25:
2469 : /* Line 1813 of yacc.c */
2470 : #line 494 "/usr/local/src/libreoffice/idlc/source/parser.y"
2471 : {
2472 : idlc()->setParseState(PS_ModuleSqSeen);
2473 : }
2474 : break;
2475 :
2476 : case 26:
2477 : /* Line 1813 of yacc.c */
2478 : #line 498 "/usr/local/src/libreoffice/idlc/source/parser.y"
2479 : {
2480 : idlc()->setParseState(PS_ModuleBodySeen);
2481 : }
2482 : break;
2483 :
2484 : case 27:
2485 : /* Line 1813 of yacc.c */
2486 : #line 502 "/usr/local/src/libreoffice/idlc/source/parser.y"
2487 : {
2488 : idlc()->setParseState(PS_ModuleQsSeen);
2489 : /*
2490 : * Finished with this module - pop it from the scope stack
2491 : */
2492 : idlc()->scopes()->pop();
2493 : }
2494 : break;
2495 :
2496 : case 30:
2497 : /* Line 1813 of yacc.c */
2498 : #line 518 "/usr/local/src/libreoffice/idlc/source/parser.y"
2499 : {
2500 : idlc()->setParseState(PS_InterfaceSeen);
2501 : }
2502 : break;
2503 :
2504 : case 31:
2505 : /* Line 1813 of yacc.c */
2506 : #line 522 "/usr/local/src/libreoffice/idlc/source/parser.y"
2507 : {
2508 : idlc()->setParseState(PS_InterfaceIDSeen);
2509 : checkIdentifier((yyvsp[(3) - (3)].sval));
2510 : (yyval.sval) = (yyvsp[(3) - (3)].sval);
2511 : }
2512 : break;
2513 :
2514 : case 32:
2515 : /* Line 1813 of yacc.c */
2516 : #line 531 "/usr/local/src/libreoffice/idlc/source/parser.y"
2517 : {
2518 : idlc()->setParseState(PS_ForwardDeclSeen);
2519 :
2520 : AstScope* pScope = idlc()->scopes()->topNonNull();
2521 : AstInterface* pForward = NULL;
2522 : AstDeclaration* pDecl = NULL;
2523 :
2524 : /*
2525 : * Make a new forward interface node and add it to its enclosing scope
2526 : */
2527 : if ( pScope && (yyvsp[(1) - (1)].sval) )
2528 : {
2529 : pForward = new AstInterface(*(yyvsp[(1) - (1)].sval), NULL, pScope);
2530 :
2531 : pDecl = pScope->lookupByName(pForward->getScopedName());
2532 : if ( pDecl )
2533 : {
2534 : if ( (pDecl != pForward) &&
2535 : (pDecl->getNodeType() == NT_interface) )
2536 : {
2537 : delete pForward;
2538 : } else
2539 : {
2540 : idlc()->error()->error2(EIDL_REDEF_SCOPE, scopeAsDecl(pScope), pDecl);
2541 : }
2542 : } else
2543 : {
2544 : /*
2545 : * Add the interface to its definition scope
2546 : */
2547 : pScope->addDeclaration(pForward);
2548 : }
2549 : }
2550 : delete (yyvsp[(1) - (1)].sval);
2551 : }
2552 : break;
2553 :
2554 : case 33:
2555 : /* Line 1813 of yacc.c */
2556 : #line 570 "/usr/local/src/libreoffice/idlc/source/parser.y"
2557 : {
2558 : idlc()->setParseState(PS_InterfaceHeadSeen);
2559 :
2560 : AstScope* pScope = idlc()->scopes()->topNonNull();
2561 : AstInterface* pInterface = NULL;
2562 : AstInterface* pForward = NULL;
2563 : AstDeclaration* pDecl = NULL;
2564 :
2565 : /*
2566 : * Make a new interface node and add it to its enclosing scope
2567 : */
2568 : if ( pScope && (yyvsp[(1) - (1)].ihval) )
2569 : {
2570 : pInterface = new AstInterface(
2571 : *(yyvsp[(1) - (1)].ihval)->getName(),
2572 : static_cast< AstInterface * >((yyvsp[(1) - (1)].ihval)->getInherits()), pScope);
2573 : if ( pInterface &&
2574 : (pDecl = pScope->lookupByName(pInterface->getScopedName())) )
2575 : {
2576 : /*
2577 : * See if we're defining a forward declared interface.
2578 : */
2579 : if (pDecl->getNodeType() == NT_interface)
2580 : {
2581 : pForward = (AstInterface*)pDecl;
2582 : if ( !pForward->isDefined() )
2583 : {
2584 : /*
2585 : * Check if redefining in same scope
2586 : */
2587 : if ( pForward->getScope() != pScope )
2588 : {
2589 : if ( pForward->getScopedName() != pInterface->getScopedName() )
2590 : {
2591 : idlc()->error()->error3(EIDL_SCOPE_CONFLICT,
2592 : pInterface, pForward, scopeAsDecl(pScope));
2593 : }
2594 : }
2595 : else if ( !pInterface->isPublished()
2596 : && pForward->isPublished() )
2597 : {
2598 : idlc()->error()->error0(EIDL_PUBLISHED_FORWARD);
2599 : }
2600 : /*
2601 : * All OK, set full definition
2602 : */
2603 : else
2604 : {
2605 : pForward->forwardDefined(*pInterface);
2606 : delete pInterface;
2607 : pInterface = pForward;
2608 : }
2609 : } else {
2610 : // special handling for XInterface because it is predefined
2611 : if ( pForward->isPredefined() &&
2612 : pForward->getScopedName() == "com::sun::star::uno::XInterface")
2613 : {
2614 : /* replace the predefined XInterface */
2615 : *pForward = *pInterface;
2616 : delete pInterface;
2617 : pInterface = pForward;
2618 : }
2619 :
2620 : }
2621 : }
2622 : } else
2623 : {
2624 : /*
2625 : * Add the interface to its definition scope
2626 : */
2627 : pScope->addDeclaration(pInterface);
2628 : }
2629 : }
2630 : /*
2631 : * Push it on the scope stack
2632 : */
2633 : idlc()->scopes()->push(pInterface);
2634 : delete((yyvsp[(1) - (1)].ihval));
2635 : }
2636 : break;
2637 :
2638 : case 34:
2639 : /* Line 1813 of yacc.c */
2640 : #line 650 "/usr/local/src/libreoffice/idlc/source/parser.y"
2641 : {
2642 : idlc()->setParseState(PS_InterfaceSqSeen);
2643 : }
2644 : break;
2645 :
2646 : case 35:
2647 : /* Line 1813 of yacc.c */
2648 : #line 654 "/usr/local/src/libreoffice/idlc/source/parser.y"
2649 : {
2650 : AstInterface * ifc = static_cast< AstInterface * >(
2651 : idlc()->scopes()->topNonNull());
2652 : if (!ifc->hasMandatoryInheritedInterfaces()
2653 : && ifc->getScopedName() != "com::sun::star::uno::XInterface")
2654 : {
2655 : addInheritedInterface(
2656 : ifc, rtl::OString("::com::sun::star::uno::XInterface"), false,
2657 : rtl::OUString());
2658 : }
2659 : ifc->setDefined();
2660 : idlc()->setParseState(PS_InterfaceBodySeen);
2661 : }
2662 : break;
2663 :
2664 : case 36:
2665 : /* Line 1813 of yacc.c */
2666 : #line 668 "/usr/local/src/libreoffice/idlc/source/parser.y"
2667 : {
2668 : idlc()->setParseState(PS_InterfaceQsSeen);
2669 : /*
2670 : * Done with this interface - pop it off the scopes stack
2671 : */
2672 : idlc()->scopes()->pop();
2673 : }
2674 : break;
2675 :
2676 : case 37:
2677 : /* Line 1813 of yacc.c */
2678 : #line 676 "/usr/local/src/libreoffice/idlc/source/parser.y"
2679 : {
2680 : yyerror("interface definition");
2681 : yyerrok;
2682 : }
2683 : break;
2684 :
2685 : case 38:
2686 : /* Line 1813 of yacc.c */
2687 : #line 684 "/usr/local/src/libreoffice/idlc/source/parser.y"
2688 : {
2689 : idlc()->setParseState(PS_InheritSpecSeen);
2690 :
2691 : (yyval.ihval) = new FeInheritanceHeader(NT_interface, (yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].sval), 0);
2692 : delete (yyvsp[(2) - (2)].sval);
2693 : }
2694 : break;
2695 :
2696 : case 39:
2697 : /* Line 1813 of yacc.c */
2698 : #line 694 "/usr/local/src/libreoffice/idlc/source/parser.y"
2699 : {
2700 : idlc()->setParseState(PS_InheritColonSeen);
2701 : }
2702 : break;
2703 :
2704 : case 40:
2705 : /* Line 1813 of yacc.c */
2706 : #line 698 "/usr/local/src/libreoffice/idlc/source/parser.y"
2707 : {
2708 : (yyval.sval) = (yyvsp[(3) - (3)].sval);
2709 : }
2710 : break;
2711 :
2712 : case 41:
2713 : /* Line 1813 of yacc.c */
2714 : #line 702 "/usr/local/src/libreoffice/idlc/source/parser.y"
2715 : {
2716 : (yyval.sval) = NULL;
2717 : }
2718 : break;
2719 :
2720 : case 44:
2721 : /* Line 1813 of yacc.c */
2722 : #line 714 "/usr/local/src/libreoffice/idlc/source/parser.y"
2723 : {
2724 : idlc()->setParseState(PS_AttributeDeclSeen);
2725 : }
2726 : break;
2727 :
2728 : case 45:
2729 : /* Line 1813 of yacc.c */
2730 : #line 718 "/usr/local/src/libreoffice/idlc/source/parser.y"
2731 : {
2732 : idlc()->setParseState(PS_NoState);
2733 : }
2734 : break;
2735 :
2736 : case 46:
2737 : /* Line 1813 of yacc.c */
2738 : #line 722 "/usr/local/src/libreoffice/idlc/source/parser.y"
2739 : {
2740 : idlc()->setParseState(PS_OperationDeclSeen);
2741 : }
2742 : break;
2743 :
2744 : case 47:
2745 : /* Line 1813 of yacc.c */
2746 : #line 726 "/usr/local/src/libreoffice/idlc/source/parser.y"
2747 : {
2748 : idlc()->setParseState(PS_NoState);
2749 : }
2750 : break;
2751 :
2752 : case 48:
2753 : /* Line 1813 of yacc.c */
2754 : #line 730 "/usr/local/src/libreoffice/idlc/source/parser.y"
2755 : {
2756 : idlc()->setParseState(PS_InterfaceInheritanceDeclSeen);
2757 : }
2758 : break;
2759 :
2760 : case 49:
2761 : /* Line 1813 of yacc.c */
2762 : #line 734 "/usr/local/src/libreoffice/idlc/source/parser.y"
2763 : {
2764 : idlc()->setParseState(PS_NoState);
2765 : }
2766 : break;
2767 :
2768 : case 50:
2769 : /* Line 1813 of yacc.c */
2770 : #line 742 "/usr/local/src/libreoffice/idlc/source/parser.y"
2771 : {
2772 : idlc()->setParseState(PS_AttrTypeSeen);
2773 : }
2774 : break;
2775 :
2776 : case 51:
2777 : /* Line 1813 of yacc.c */
2778 : #line 746 "/usr/local/src/libreoffice/idlc/source/parser.y"
2779 : {
2780 : idlc()->setParseState(PS_AttrCompleted);
2781 : if (((yyvsp[(1) - (4)].ulval) & ~(AF_BOUND | AF_READONLY)) != AF_ATTRIBUTE) {
2782 : idlc()->error()->flagError(EIDL_BAD_ATTRIBUTE_FLAGS, (yyvsp[(1) - (4)].ulval));
2783 : }
2784 : AstInterface * scope = static_cast< AstInterface * >(
2785 : idlc()->scopes()->top());
2786 : AstAttribute * attr = new AstAttribute(
2787 : (yyvsp[(1) - (4)].ulval), (yyvsp[(4) - (4)].fdval)->compose((yyvsp[(2) - (4)].cdclval)), (yyvsp[(4) - (4)].fdval)->getName(), scope);
2788 : delete (yyvsp[(4) - (4)].fdval);
2789 : AstInterface::DoubleMemberDeclarations doubleMembers(
2790 : scope->checkMemberClashes(attr));
2791 : if (doubleMembers.empty()) {
2792 : scope->addMember(attr);
2793 : } else {
2794 : reportDoubleMemberDeclarations(doubleMembers);
2795 : }
2796 : idlc()->scopes()->push(attr);
2797 : }
2798 : break;
2799 :
2800 : case 52:
2801 : /* Line 1813 of yacc.c */
2802 : #line 766 "/usr/local/src/libreoffice/idlc/source/parser.y"
2803 : {
2804 : static_cast< AstAttribute * >(idlc()->scopes()->top())->setExceptions(
2805 : (yyvsp[(6) - (6)].attexcval).get.documentation, (yyvsp[(6) - (6)].attexcval).get.exceptions, (yyvsp[(6) - (6)].attexcval).set.documentation,
2806 : (yyvsp[(6) - (6)].attexcval).set.exceptions);
2807 : delete (yyvsp[(6) - (6)].attexcval).get.documentation;
2808 : delete (yyvsp[(6) - (6)].attexcval).get.exceptions;
2809 : delete (yyvsp[(6) - (6)].attexcval).set.documentation;
2810 : delete (yyvsp[(6) - (6)].attexcval).set.exceptions;
2811 : idlc()->scopes()->pop();
2812 : }
2813 : break;
2814 :
2815 : case 53:
2816 : /* Line 1813 of yacc.c */
2817 : #line 780 "/usr/local/src/libreoffice/idlc/source/parser.y"
2818 : {
2819 : idlc()->setParseState(PS_FlagHeaderSeen);
2820 : (yyval.ulval) = (yyvsp[(2) - (3)].ulval);
2821 : }
2822 : break;
2823 :
2824 : case 54:
2825 : /* Line 1813 of yacc.c */
2826 : #line 788 "/usr/local/src/libreoffice/idlc/source/parser.y"
2827 : {
2828 : if ( ((yyvsp[(1) - (3)].ulval) & (yyvsp[(3) - (3)].ulval)) == (yyvsp[(3) - (3)].ulval) )
2829 : idlc()->error()->flagError(EIDL_DEFINED_ATTRIBUTEFLAG, (yyvsp[(3) - (3)].ulval));
2830 :
2831 : (yyval.ulval) = (yyvsp[(1) - (3)].ulval) | (yyvsp[(3) - (3)].ulval);
2832 : }
2833 : break;
2834 :
2835 : case 55:
2836 : /* Line 1813 of yacc.c */
2837 : #line 795 "/usr/local/src/libreoffice/idlc/source/parser.y"
2838 : {
2839 : (yyval.ulval) = (yyvsp[(1) - (1)].ulval);
2840 : }
2841 : break;
2842 :
2843 : case 56:
2844 : /* Line 1813 of yacc.c */
2845 : #line 802 "/usr/local/src/libreoffice/idlc/source/parser.y"
2846 : {
2847 : idlc()->setParseState(PS_AttrSeen);
2848 : (yyval.ulval) = AF_ATTRIBUTE;
2849 : }
2850 : break;
2851 :
2852 : case 57:
2853 : /* Line 1813 of yacc.c */
2854 : #line 807 "/usr/local/src/libreoffice/idlc/source/parser.y"
2855 : {
2856 : idlc()->setParseState(PS_PropertySeen);
2857 : (yyval.ulval) = AF_PROPERTY;
2858 : }
2859 : break;
2860 :
2861 : case 58:
2862 : /* Line 1813 of yacc.c */
2863 : #line 812 "/usr/local/src/libreoffice/idlc/source/parser.y"
2864 : {
2865 : idlc()->setParseState(PS_ReadOnlySeen);
2866 : (yyval.ulval) = AF_READONLY;
2867 : }
2868 : break;
2869 :
2870 : case 59:
2871 : /* Line 1813 of yacc.c */
2872 : #line 817 "/usr/local/src/libreoffice/idlc/source/parser.y"
2873 : {
2874 : idlc()->setParseState(PS_OptionalSeen);
2875 : (yyval.ulval) = AF_OPTIONAL;
2876 : }
2877 : break;
2878 :
2879 : case 60:
2880 : /* Line 1813 of yacc.c */
2881 : #line 822 "/usr/local/src/libreoffice/idlc/source/parser.y"
2882 : {
2883 : idlc()->setParseState(PS_MayBeVoidSeen);
2884 : (yyval.ulval) = AF_MAYBEVOID;
2885 : }
2886 : break;
2887 :
2888 : case 61:
2889 : /* Line 1813 of yacc.c */
2890 : #line 827 "/usr/local/src/libreoffice/idlc/source/parser.y"
2891 : {
2892 : idlc()->setParseState(PS_BoundSeen);
2893 : (yyval.ulval) = AF_BOUND;
2894 : }
2895 : break;
2896 :
2897 : case 62:
2898 : /* Line 1813 of yacc.c */
2899 : #line 832 "/usr/local/src/libreoffice/idlc/source/parser.y"
2900 : {
2901 : idlc()->setParseState(PS_ConstrainedSeen);
2902 : (yyval.ulval) = AF_CONSTRAINED;
2903 : }
2904 : break;
2905 :
2906 : case 63:
2907 : /* Line 1813 of yacc.c */
2908 : #line 837 "/usr/local/src/libreoffice/idlc/source/parser.y"
2909 : {
2910 : idlc()->setParseState(PS_TransientSeen);
2911 : (yyval.ulval) = AF_TRANSIENT;
2912 : }
2913 : break;
2914 :
2915 : case 64:
2916 : /* Line 1813 of yacc.c */
2917 : #line 842 "/usr/local/src/libreoffice/idlc/source/parser.y"
2918 : {
2919 : idlc()->setParseState(PS_MayBeAmbigiousSeen);
2920 : (yyval.ulval) = AF_MAYBEAMBIGUOUS;
2921 : }
2922 : break;
2923 :
2924 : case 65:
2925 : /* Line 1813 of yacc.c */
2926 : #line 847 "/usr/local/src/libreoffice/idlc/source/parser.y"
2927 : {
2928 : idlc()->setParseState(PS_MayBeDefaultSeen);
2929 : (yyval.ulval) = AF_MAYBEDEFAULT;
2930 : }
2931 : break;
2932 :
2933 : case 66:
2934 : /* Line 1813 of yacc.c */
2935 : #line 852 "/usr/local/src/libreoffice/idlc/source/parser.y"
2936 : {
2937 : idlc()->setParseState(PS_RemoveableSeen);
2938 : (yyval.ulval) = AF_REMOVABLE;
2939 : }
2940 : break;
2941 :
2942 : case 67:
2943 : /* Line 1813 of yacc.c */
2944 : #line 857 "/usr/local/src/libreoffice/idlc/source/parser.y"
2945 : {
2946 : yyerror("unknown property|attribute flag");
2947 : yyerrok;
2948 : }
2949 : break;
2950 :
2951 : case 68:
2952 : /* Line 1813 of yacc.c */
2953 : #line 864 "/usr/local/src/libreoffice/idlc/source/parser.y"
2954 : { (yyval.attexcval) = (yyvsp[(2) - (2)].attexcval); }
2955 : break;
2956 :
2957 : case 69:
2958 : /* Line 1813 of yacc.c */
2959 : #line 866 "/usr/local/src/libreoffice/idlc/source/parser.y"
2960 : {
2961 : (yyval.attexcval).get.documentation = 0;
2962 : (yyval.attexcval).get.exceptions = 0;
2963 : (yyval.attexcval).set.documentation = 0;
2964 : (yyval.attexcval).set.exceptions = 0;
2965 : }
2966 : break;
2967 :
2968 : case 71:
2969 : /* Line 1813 of yacc.c */
2970 : #line 877 "/usr/local/src/libreoffice/idlc/source/parser.y"
2971 : {
2972 : yyerror("bad attribute raises block");
2973 : yyerrok;
2974 : (yyval.attexcval).get.documentation = 0;
2975 : (yyval.attexcval).get.exceptions = 0;
2976 : (yyval.attexcval).set.documentation = 0;
2977 : (yyval.attexcval).set.exceptions = 0;
2978 : }
2979 : break;
2980 :
2981 : case 72:
2982 : /* Line 1813 of yacc.c */
2983 : #line 890 "/usr/local/src/libreoffice/idlc/source/parser.y"
2984 : {
2985 : (yyval.attexcval).get = (yyvsp[(1) - (2)].attexcpval);
2986 : (yyval.attexcval).set = (yyvsp[(2) - (2)].attexcpval);
2987 : }
2988 : break;
2989 :
2990 : case 73:
2991 : /* Line 1813 of yacc.c */
2992 : #line 896 "/usr/local/src/libreoffice/idlc/source/parser.y"
2993 : {
2994 : (yyval.attexcval).get = (yyvsp[(2) - (2)].attexcpval);
2995 : (yyval.attexcval).set = (yyvsp[(1) - (2)].attexcpval);
2996 : }
2997 : break;
2998 :
2999 : case 74:
3000 : /* Line 1813 of yacc.c */
3001 : #line 901 "/usr/local/src/libreoffice/idlc/source/parser.y"
3002 : {
3003 : (yyval.attexcval).get.documentation = 0;
3004 : (yyval.attexcval).get.exceptions = 0;
3005 : (yyval.attexcval).set.documentation = 0;
3006 : (yyval.attexcval).set.exceptions = 0;
3007 : }
3008 : break;
3009 :
3010 : case 76:
3011 : /* Line 1813 of yacc.c */
3012 : #line 911 "/usr/local/src/libreoffice/idlc/source/parser.y"
3013 : { (yyval.attexcpval).documentation = 0; (yyval.attexcpval).exceptions = 0; }
3014 : break;
3015 :
3016 : case 77:
3017 : /* Line 1813 of yacc.c */
3018 : #line 916 "/usr/local/src/libreoffice/idlc/source/parser.y"
3019 : {
3020 : (yyval.attexcpval).documentation = new rtl::OUString(
3021 : rtl::OStringToOUString(
3022 : idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
3023 : (yyval.attexcpval).exceptions = (yyvsp[(2) - (3)].dclsval);
3024 : }
3025 : break;
3026 :
3027 : case 79:
3028 : /* Line 1813 of yacc.c */
3029 : #line 926 "/usr/local/src/libreoffice/idlc/source/parser.y"
3030 : { (yyval.attexcpval).documentation = 0; (yyval.attexcpval).exceptions = 0; }
3031 : break;
3032 :
3033 : case 80:
3034 : /* Line 1813 of yacc.c */
3035 : #line 931 "/usr/local/src/libreoffice/idlc/source/parser.y"
3036 : {
3037 : if (static_cast< AstAttribute * >(idlc()->scopes()->top())->
3038 : isReadonly())
3039 : {
3040 : idlc()->error()->error0(EIDL_READONLY_ATTRIBUTE_SET_EXCEPTIONS);
3041 : }
3042 : }
3043 : break;
3044 :
3045 : case 81:
3046 : /* Line 1813 of yacc.c */
3047 : #line 939 "/usr/local/src/libreoffice/idlc/source/parser.y"
3048 : {
3049 : (yyval.attexcpval).documentation = new rtl::OUString(
3050 : rtl::OStringToOUString(
3051 : idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
3052 : (yyval.attexcpval).exceptions = (yyvsp[(3) - (4)].dclsval);
3053 : }
3054 : break;
3055 :
3056 : case 82:
3057 : /* Line 1813 of yacc.c */
3058 : #line 949 "/usr/local/src/libreoffice/idlc/source/parser.y"
3059 : {
3060 : idlc()->setParseState(PS_OpTypeSeen);
3061 : }
3062 : break;
3063 :
3064 : case 83:
3065 : /* Line 1813 of yacc.c */
3066 : #line 953 "/usr/local/src/libreoffice/idlc/source/parser.y"
3067 : {
3068 : idlc()->setParseState(PS_OpIDSeen);
3069 : checkIdentifier((yyvsp[(3) - (3)].sval));
3070 :
3071 : AstInterface * pScope = static_cast< AstInterface * >(
3072 : idlc()->scopes()->top());
3073 : AstOperation* pOp = NULL;
3074 :
3075 : /*
3076 : * Create a node representing an operation on an interface
3077 : * and add it to its enclosing scope
3078 : */
3079 : if ( pScope && (yyvsp[(1) - (3)].cdclval) )
3080 : {
3081 : AstType *pType = (AstType*)(yyvsp[(1) - (3)].cdclval);
3082 : if ( !pType || (pType->getNodeType() == NT_exception) )
3083 : {
3084 : // type ERROR
3085 : } else
3086 : {
3087 : pOp = new AstOperation(pType, *(yyvsp[(3) - (3)].sval), pScope);
3088 :
3089 : AstInterface::DoubleMemberDeclarations doubleMembers(
3090 : pScope->checkMemberClashes(pOp));
3091 : if (doubleMembers.empty()) {
3092 : pScope->addMember(pOp);
3093 : } else {
3094 : reportDoubleMemberDeclarations(doubleMembers);
3095 : }
3096 : }
3097 : }
3098 : delete (yyvsp[(3) - (3)].sval);
3099 : /*
3100 : * Push the operation scope onto the scopes stack
3101 : */
3102 : idlc()->scopes()->push(pOp);
3103 : }
3104 : break;
3105 :
3106 : case 84:
3107 : /* Line 1813 of yacc.c */
3108 : #line 991 "/usr/local/src/libreoffice/idlc/source/parser.y"
3109 : {
3110 : idlc()->setParseState(PS_OpSqSeen);
3111 : }
3112 : break;
3113 :
3114 : case 85:
3115 : /* Line 1813 of yacc.c */
3116 : #line 995 "/usr/local/src/libreoffice/idlc/source/parser.y"
3117 : {
3118 : idlc()->setParseState(PS_OpParsCompleted);
3119 : }
3120 : break;
3121 :
3122 : case 86:
3123 : /* Line 1813 of yacc.c */
3124 : #line 999 "/usr/local/src/libreoffice/idlc/source/parser.y"
3125 : {
3126 : idlc()->setParseState(PS_OpQsSeen);
3127 : }
3128 : break;
3129 :
3130 : case 87:
3131 : /* Line 1813 of yacc.c */
3132 : #line 1003 "/usr/local/src/libreoffice/idlc/source/parser.y"
3133 : {
3134 : AstScope* pScope = idlc()->scopes()->topNonNull();
3135 : AstOperation* pOp = NULL;
3136 : /*
3137 : * Add exceptions and context to the operation
3138 : */
3139 : if ( pScope && pScope->getScopeNodeType() == NT_operation)
3140 : {
3141 : pOp = (AstOperation*)pScope;
3142 :
3143 : if ( pOp )
3144 : pOp->setExceptions((yyvsp[(11) - (11)].dclsval));
3145 : }
3146 : delete (yyvsp[(11) - (11)].dclsval);
3147 : /*
3148 : * Done with this operation. Pop its scope from the scopes stack
3149 : */
3150 : idlc()->scopes()->pop();
3151 : }
3152 : break;
3153 :
3154 : case 89:
3155 : /* Line 1813 of yacc.c */
3156 : #line 1027 "/usr/local/src/libreoffice/idlc/source/parser.y"
3157 : {
3158 : (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType(ET_void);
3159 : }
3160 : break;
3161 :
3162 : case 91:
3163 : /* Line 1813 of yacc.c */
3164 : #line 1036 "/usr/local/src/libreoffice/idlc/source/parser.y"
3165 : {
3166 : idlc()->setParseState(PS_OpParCommaSeen);
3167 : }
3168 : break;
3169 :
3170 : case 94:
3171 : /* Line 1813 of yacc.c */
3172 : #line 1042 "/usr/local/src/libreoffice/idlc/source/parser.y"
3173 : {
3174 : yyerror("parameter definition");
3175 : yyerrok;
3176 : }
3177 : break;
3178 :
3179 : case 95:
3180 : /* Line 1813 of yacc.c */
3181 : #line 1052 "/usr/local/src/libreoffice/idlc/source/parser.y"
3182 : {
3183 : idlc()->setParseState(PS_OpParDirSeen);
3184 : }
3185 : break;
3186 :
3187 : case 96:
3188 : /* Line 1813 of yacc.c */
3189 : #line 1056 "/usr/local/src/libreoffice/idlc/source/parser.y"
3190 : {
3191 : idlc()->setParseState(PS_OpParTypeSeen);
3192 : }
3193 : break;
3194 :
3195 : case 97:
3196 : /* Line 1813 of yacc.c */
3197 : #line 1061 "/usr/local/src/libreoffice/idlc/source/parser.y"
3198 : {
3199 : idlc()->setParseState(PS_OpParDeclSeen);
3200 :
3201 : AstOperation * pScope = static_cast< AstOperation * >(
3202 : idlc()->scopes()->top());
3203 : AstParameter* pParam = NULL;
3204 :
3205 : /*
3206 : * Create a node representing an argument to an operation
3207 : * Add it to the enclosing scope (the operation scope)
3208 : */
3209 : if ( pScope && (yyvsp[(5) - (8)].cdclval) && (yyvsp[(8) - (8)].fdval) )
3210 : {
3211 : AstType const * pType = (yyvsp[(8) - (8)].fdval)->compose((yyvsp[(5) - (8)].cdclval));
3212 : if ( pType )
3213 : {
3214 : if (pScope->isConstructor() && (yyvsp[(2) - (8)].ulval) != DIR_IN) {
3215 : idlc()->error()->error0(EIDL_CONSTRUCTOR_PARAMETER_NOT_IN);
3216 : }
3217 : if (pScope->isVariadic()) {
3218 : idlc()->error()->error0(EIDL_REST_PARAMETER_NOT_LAST);
3219 : }
3220 : if ((yyvsp[(7) - (8)].bval)) {
3221 : AstDeclaration const * type = resolveTypedefs(pType);
3222 : if (type->getNodeType() != NT_predefined
3223 : || (static_cast< AstBaseType const * >(type)->
3224 : getExprType() != ET_any))
3225 : {
3226 : idlc()->error()->error0(EIDL_REST_PARAMETER_NOT_ANY);
3227 : }
3228 : if (pScope->isConstructor()) {
3229 : if (pScope->getIteratorBegin()
3230 : != pScope->getIteratorEnd())
3231 : {
3232 : idlc()->error()->error0(
3233 : EIDL_CONSTRUCTOR_REST_PARAMETER_NOT_FIRST);
3234 : }
3235 : } else {
3236 : idlc()->error()->error0(EIDL_METHOD_HAS_REST_PARAMETER);
3237 : }
3238 : }
3239 :
3240 : pParam = new AstParameter(
3241 : static_cast< Direction >((yyvsp[(2) - (8)].ulval)), (yyvsp[(7) - (8)].bval), pType, (yyvsp[(8) - (8)].fdval)->getName(),
3242 : pScope);
3243 :
3244 : if ( !(yyvsp[(8) - (8)].fdval)->checkType((yyvsp[(5) - (8)].cdclval)) )
3245 : {
3246 : // WARNING
3247 : }
3248 :
3249 : pScope->addDeclaration(pParam);
3250 : }
3251 : }
3252 : }
3253 : break;
3254 :
3255 : case 98:
3256 : /* Line 1813 of yacc.c */
3257 : #line 1118 "/usr/local/src/libreoffice/idlc/source/parser.y"
3258 : {
3259 : idlc()->setParseState(PS_NoState);
3260 : yyerrok;
3261 : }
3262 : break;
3263 :
3264 : case 99:
3265 : /* Line 1813 of yacc.c */
3266 : #line 1126 "/usr/local/src/libreoffice/idlc/source/parser.y"
3267 : {
3268 : (yyval.ulval) = DIR_IN;
3269 : }
3270 : break;
3271 :
3272 : case 100:
3273 : /* Line 1813 of yacc.c */
3274 : #line 1130 "/usr/local/src/libreoffice/idlc/source/parser.y"
3275 : {
3276 : (yyval.ulval) = DIR_OUT;
3277 : }
3278 : break;
3279 :
3280 : case 101:
3281 : /* Line 1813 of yacc.c */
3282 : #line 1134 "/usr/local/src/libreoffice/idlc/source/parser.y"
3283 : {
3284 : (yyval.ulval) = DIR_INOUT;
3285 : }
3286 : break;
3287 :
3288 : case 102:
3289 : /* Line 1813 of yacc.c */
3290 : #line 1141 "/usr/local/src/libreoffice/idlc/source/parser.y"
3291 : {
3292 : (yyval.bval) = true;
3293 : }
3294 : break;
3295 :
3296 : case 103:
3297 : /* Line 1813 of yacc.c */
3298 : #line 1145 "/usr/local/src/libreoffice/idlc/source/parser.y"
3299 : {
3300 : (yyval.bval) = false;
3301 : }
3302 : break;
3303 :
3304 : case 105:
3305 : /* Line 1813 of yacc.c */
3306 : #line 1153 "/usr/local/src/libreoffice/idlc/source/parser.y"
3307 : {
3308 : (yyval.dclsval) = 0;
3309 : }
3310 : break;
3311 :
3312 : case 106:
3313 : /* Line 1813 of yacc.c */
3314 : #line 1160 "/usr/local/src/libreoffice/idlc/source/parser.y"
3315 : {
3316 : idlc()->setParseState(PS_RaiseSeen);
3317 : }
3318 : break;
3319 :
3320 : case 107:
3321 : /* Line 1813 of yacc.c */
3322 : #line 1164 "/usr/local/src/libreoffice/idlc/source/parser.y"
3323 : {
3324 : idlc()->setParseState(PS_RaiseSqSeen);
3325 : }
3326 : break;
3327 :
3328 : case 108:
3329 : /* Line 1813 of yacc.c */
3330 : #line 1169 "/usr/local/src/libreoffice/idlc/source/parser.y"
3331 : {
3332 : idlc()->setParseState(PS_RaiseQsSeen);
3333 : (yyval.dclsval) = (yyvsp[(5) - (6)].dclsval);
3334 : }
3335 : break;
3336 :
3337 : case 109:
3338 : /* Line 1813 of yacc.c */
3339 : #line 1177 "/usr/local/src/libreoffice/idlc/source/parser.y"
3340 : {
3341 : (yyval.dclsval) = new DeclList;
3342 : (yyval.dclsval)->push_back((yyvsp[(1) - (1)].dclval));
3343 : }
3344 : break;
3345 :
3346 : case 110:
3347 : /* Line 1813 of yacc.c */
3348 : #line 1182 "/usr/local/src/libreoffice/idlc/source/parser.y"
3349 : {
3350 : (yyvsp[(1) - (3)].dclsval)->push_back((yyvsp[(3) - (3)].dclval));
3351 : (yyval.dclsval) = (yyvsp[(1) - (3)].dclsval);
3352 : }
3353 : break;
3354 :
3355 : case 111:
3356 : /* Line 1813 of yacc.c */
3357 : #line 1190 "/usr/local/src/libreoffice/idlc/source/parser.y"
3358 : {
3359 : // The topmost scope is either an AstOperation (for interface methods
3360 : // and service constructors) or an AstAttribute (for interface
3361 : // attributes), so look up exception names in the next-to-topmost scope:
3362 : AstDeclaration * decl = idlc()->scopes()->nextToTop()->lookupByName(
3363 : *(yyvsp[(1) - (1)].sval));
3364 : if (decl == 0) {
3365 : idlc()->error()->lookupError(*(yyvsp[(1) - (1)].sval));
3366 : } else if (!idlc()->error()->checkPublished(decl)) {
3367 : decl = 0;
3368 : } else if (decl->getNodeType() != NT_exception) {
3369 : idlc()->error()->error1(EIDL_ILLEGAL_RAISES, decl);
3370 : decl = 0;
3371 : }
3372 : delete (yyvsp[(1) - (1)].sval);
3373 : (yyval.dclval) = decl;
3374 : }
3375 : break;
3376 :
3377 : case 112:
3378 : /* Line 1813 of yacc.c */
3379 : #line 1212 "/usr/local/src/libreoffice/idlc/source/parser.y"
3380 : {
3381 : idlc()->setParseState(PS_ServiceIFHeadSeen);
3382 : }
3383 : break;
3384 :
3385 : case 113:
3386 : /* Line 1813 of yacc.c */
3387 : #line 1216 "/usr/local/src/libreoffice/idlc/source/parser.y"
3388 : {
3389 : AstInterface * ifc = static_cast< AstInterface * >(
3390 : idlc()->scopes()->top());
3391 : if (ifc->usesSingleInheritance()) {
3392 : idlc()->error()->error0(EIDL_MIXED_INHERITANCE);
3393 : } else {
3394 : addInheritedInterface(
3395 : ifc, *(yyvsp[(4) - (4)].sval), (yyvsp[(1) - (4)].bval),
3396 : rtl::OStringToOUString(
3397 : idlc()->getDocumentation(), RTL_TEXTENCODING_UTF8));
3398 : }
3399 : delete (yyvsp[(4) - (4)].sval);
3400 : }
3401 : break;
3402 :
3403 : case 114:
3404 : /* Line 1813 of yacc.c */
3405 : #line 1232 "/usr/local/src/libreoffice/idlc/source/parser.y"
3406 : { (yyval.bval) = true; }
3407 : break;
3408 :
3409 : case 115:
3410 : /* Line 1813 of yacc.c */
3411 : #line 1233 "/usr/local/src/libreoffice/idlc/source/parser.y"
3412 : { (yyval.bval) = false; }
3413 : break;
3414 :
3415 : case 118:
3416 : /* Line 1813 of yacc.c */
3417 : #line 1243 "/usr/local/src/libreoffice/idlc/source/parser.y"
3418 : {
3419 : idlc()->setParseState(PS_ConstSeen);
3420 : }
3421 : break;
3422 :
3423 : case 119:
3424 : /* Line 1813 of yacc.c */
3425 : #line 1247 "/usr/local/src/libreoffice/idlc/source/parser.y"
3426 : {
3427 : idlc()->setParseState(PS_ConstTypeSeen);
3428 : }
3429 : break;
3430 :
3431 : case 120:
3432 : /* Line 1813 of yacc.c */
3433 : #line 1251 "/usr/local/src/libreoffice/idlc/source/parser.y"
3434 : {
3435 : idlc()->setParseState(PS_ConstIDSeen);
3436 : checkIdentifier((yyvsp[(5) - (5)].sval));
3437 : }
3438 : break;
3439 :
3440 : case 121:
3441 : /* Line 1813 of yacc.c */
3442 : #line 1256 "/usr/local/src/libreoffice/idlc/source/parser.y"
3443 : {
3444 : idlc()->setParseState(PS_ConstAssignSeen);
3445 : }
3446 : break;
3447 :
3448 : case 122:
3449 : /* Line 1813 of yacc.c */
3450 : #line 1260 "/usr/local/src/libreoffice/idlc/source/parser.y"
3451 : {
3452 : idlc()->setParseState(PS_ConstExprSeen);
3453 :
3454 : AstScope* pScope = idlc()->scopes()->topNonNull();
3455 : AstConstant* pConstant = NULL;
3456 :
3457 : if ( (yyvsp[(9) - (9)].exval) && pScope )
3458 : {
3459 : if ( !(yyvsp[(9) - (9)].exval)->coerce((yyvsp[(3) - (9)].etval)) )
3460 : {
3461 : idlc()->error()->coercionError((yyvsp[(9) - (9)].exval), (yyvsp[(3) - (9)].etval));
3462 : } else
3463 : {
3464 : pConstant = new AstConstant((yyvsp[(3) - (9)].etval), (yyvsp[(9) - (9)].exval), *(yyvsp[(5) - (9)].sval), pScope);
3465 : pScope->addDeclaration(pConstant);
3466 : }
3467 : }
3468 : delete (yyvsp[(5) - (9)].sval);
3469 :
3470 : idlc()->setParseState(PS_ConstantDeclSeen);
3471 : }
3472 : break;
3473 :
3474 : case 123:
3475 : /* Line 1813 of yacc.c */
3476 : #line 1281 "/usr/local/src/libreoffice/idlc/source/parser.y"
3477 : {}
3478 : break;
3479 :
3480 : case 124:
3481 : /* Line 1813 of yacc.c */
3482 : #line 1286 "/usr/local/src/libreoffice/idlc/source/parser.y"
3483 : {
3484 : idlc()->setParseState(PS_ConstantsSeen);
3485 : }
3486 : break;
3487 :
3488 : case 125:
3489 : /* Line 1813 of yacc.c */
3490 : #line 1290 "/usr/local/src/libreoffice/idlc/source/parser.y"
3491 : {
3492 : idlc()->setParseState(PS_ConstantsIDSeen);
3493 : checkIdentifier((yyvsp[(3) - (3)].sval));
3494 : }
3495 : break;
3496 :
3497 : case 126:
3498 : /* Line 1813 of yacc.c */
3499 : #line 1295 "/usr/local/src/libreoffice/idlc/source/parser.y"
3500 : {
3501 : idlc()->setParseState(PS_ConstantsSqSeen);
3502 :
3503 : AstScope* pScope = idlc()->scopes()->topNonNull();
3504 : AstConstants* pConstants = NULL;
3505 : AstDeclaration* pExists = NULL;
3506 :
3507 : if ( pScope )
3508 : {
3509 : pConstants = new AstConstants(*(yyvsp[(3) - (5)].sval), pScope);
3510 : if( (pExists = pScope->lookupForAdd(pConstants)) )
3511 : {
3512 : pExists->setInMainfile(idlc()->isInMainFile());
3513 : delete(pConstants);
3514 : pConstants = (AstConstants*)pExists;
3515 : } else
3516 : {
3517 : pScope->addDeclaration(pConstants);
3518 : }
3519 : idlc()->scopes()->push(pConstants);
3520 : }
3521 : delete (yyvsp[(3) - (5)].sval);
3522 : }
3523 : break;
3524 :
3525 : case 127:
3526 : /* Line 1813 of yacc.c */
3527 : #line 1319 "/usr/local/src/libreoffice/idlc/source/parser.y"
3528 : {
3529 : idlc()->setParseState(PS_ConstantsBodySeen);
3530 : }
3531 : break;
3532 :
3533 : case 128:
3534 : /* Line 1813 of yacc.c */
3535 : #line 1323 "/usr/local/src/libreoffice/idlc/source/parser.y"
3536 : {
3537 : idlc()->setParseState(PS_ConstantsQsSeen);
3538 : /*
3539 : * Finished with this constants - pop it from the scope stack
3540 : */
3541 : idlc()->scopes()->pop();
3542 : }
3543 : break;
3544 :
3545 : case 132:
3546 : /* Line 1813 of yacc.c */
3547 : #line 1339 "/usr/local/src/libreoffice/idlc/source/parser.y"
3548 : {
3549 : (yyval.exval) = new AstExpression(EC_or, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3550 : }
3551 : break;
3552 :
3553 : case 134:
3554 : /* Line 1813 of yacc.c */
3555 : #line 1347 "/usr/local/src/libreoffice/idlc/source/parser.y"
3556 : {
3557 : (yyval.exval) = new AstExpression(EC_xor, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3558 : }
3559 : break;
3560 :
3561 : case 136:
3562 : /* Line 1813 of yacc.c */
3563 : #line 1355 "/usr/local/src/libreoffice/idlc/source/parser.y"
3564 : {
3565 : (yyval.exval) = new AstExpression(EC_and, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3566 : }
3567 : break;
3568 :
3569 : case 138:
3570 : /* Line 1813 of yacc.c */
3571 : #line 1363 "/usr/local/src/libreoffice/idlc/source/parser.y"
3572 : {
3573 : (yyval.exval) = new AstExpression(EC_left, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3574 : }
3575 : break;
3576 :
3577 : case 139:
3578 : /* Line 1813 of yacc.c */
3579 : #line 1367 "/usr/local/src/libreoffice/idlc/source/parser.y"
3580 : {
3581 : (yyval.exval) = new AstExpression(EC_right, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3582 : }
3583 : break;
3584 :
3585 : case 141:
3586 : /* Line 1813 of yacc.c */
3587 : #line 1375 "/usr/local/src/libreoffice/idlc/source/parser.y"
3588 : {
3589 : (yyval.exval) = new AstExpression(EC_add, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3590 : }
3591 : break;
3592 :
3593 : case 142:
3594 : /* Line 1813 of yacc.c */
3595 : #line 1379 "/usr/local/src/libreoffice/idlc/source/parser.y"
3596 : {
3597 : (yyval.exval) = new AstExpression(EC_minus, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3598 : }
3599 : break;
3600 :
3601 : case 144:
3602 : /* Line 1813 of yacc.c */
3603 : #line 1387 "/usr/local/src/libreoffice/idlc/source/parser.y"
3604 : {
3605 : (yyval.exval) = new AstExpression(EC_mul, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3606 : }
3607 : break;
3608 :
3609 : case 145:
3610 : /* Line 1813 of yacc.c */
3611 : #line 1391 "/usr/local/src/libreoffice/idlc/source/parser.y"
3612 : {
3613 : (yyval.exval) = new AstExpression(EC_div, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3614 : }
3615 : break;
3616 :
3617 : case 146:
3618 : /* Line 1813 of yacc.c */
3619 : #line 1395 "/usr/local/src/libreoffice/idlc/source/parser.y"
3620 : {
3621 : (yyval.exval) = new AstExpression(EC_mod, (yyvsp[(1) - (3)].exval), (yyvsp[(3) - (3)].exval));
3622 : }
3623 : break;
3624 :
3625 : case 148:
3626 : /* Line 1813 of yacc.c */
3627 : #line 1403 "/usr/local/src/libreoffice/idlc/source/parser.y"
3628 : {
3629 : (yyval.exval) = new AstExpression(EC_u_plus, (yyvsp[(2) - (2)].exval), NULL);
3630 : }
3631 : break;
3632 :
3633 : case 149:
3634 : /* Line 1813 of yacc.c */
3635 : #line 1407 "/usr/local/src/libreoffice/idlc/source/parser.y"
3636 : {
3637 : (yyval.exval) = new AstExpression(EC_u_minus, (yyvsp[(2) - (2)].exval), NULL);
3638 : }
3639 : break;
3640 :
3641 : case 150:
3642 : /* Line 1813 of yacc.c */
3643 : #line 1411 "/usr/local/src/libreoffice/idlc/source/parser.y"
3644 : {
3645 : }
3646 : break;
3647 :
3648 : case 151:
3649 : /* Line 1813 of yacc.c */
3650 : #line 1417 "/usr/local/src/libreoffice/idlc/source/parser.y"
3651 : {
3652 : /*
3653 : * An expression which is a scoped name is not resolved now,
3654 : * but only when it is evaluated (such as when it is assigned
3655 : * as a constant value)
3656 : */
3657 : (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].sval));
3658 : }
3659 : break;
3660 :
3661 : case 153:
3662 : /* Line 1813 of yacc.c */
3663 : #line 1427 "/usr/local/src/libreoffice/idlc/source/parser.y"
3664 : {
3665 : (yyval.exval) = (yyvsp[(2) - (3)].exval);
3666 : }
3667 : break;
3668 :
3669 : case 154:
3670 : /* Line 1813 of yacc.c */
3671 : #line 1434 "/usr/local/src/libreoffice/idlc/source/parser.y"
3672 : {
3673 : (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].ival));
3674 : }
3675 : break;
3676 :
3677 : case 155:
3678 : /* Line 1813 of yacc.c */
3679 : #line 1438 "/usr/local/src/libreoffice/idlc/source/parser.y"
3680 : {
3681 : (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].uval));
3682 : }
3683 : break;
3684 :
3685 : case 156:
3686 : /* Line 1813 of yacc.c */
3687 : #line 1442 "/usr/local/src/libreoffice/idlc/source/parser.y"
3688 : {
3689 : (yyval.exval) = new AstExpression((yyvsp[(1) - (1)].dval));
3690 : }
3691 : break;
3692 :
3693 : case 157:
3694 : /* Line 1813 of yacc.c */
3695 : #line 1446 "/usr/local/src/libreoffice/idlc/source/parser.y"
3696 : {
3697 : (yyval.exval) = new AstExpression((sal_Int32)1, ET_boolean);
3698 : }
3699 : break;
3700 :
3701 : case 158:
3702 : /* Line 1813 of yacc.c */
3703 : #line 1450 "/usr/local/src/libreoffice/idlc/source/parser.y"
3704 : {
3705 : (yyval.exval) = new AstExpression((sal_Int32)0, ET_boolean);
3706 : }
3707 : break;
3708 :
3709 : case 159:
3710 : /* Line 1813 of yacc.c */
3711 : #line 1457 "/usr/local/src/libreoffice/idlc/source/parser.y"
3712 : {
3713 : (yyvsp[(1) - (1)].exval)->evaluate(EK_const);
3714 : if ( !(yyvsp[(1) - (1)].exval)->coerce(ET_ulong) )
3715 : {
3716 : idlc()->error()->coercionError((yyvsp[(1) - (1)].exval), ET_ulong);
3717 : delete (yyvsp[(1) - (1)].exval);
3718 : (yyval.exval) = NULL;
3719 : }
3720 : }
3721 : break;
3722 :
3723 : case 164:
3724 : /* Line 1813 of yacc.c */
3725 : #line 1474 "/usr/local/src/libreoffice/idlc/source/parser.y"
3726 : {
3727 : AstScope* pScope = idlc()->scopes()->topNonNull();
3728 : AstDeclaration const * type = 0;
3729 :
3730 : /*
3731 : * If the constant's type is a scoped name, it must resolve
3732 : * to a scalar constant type
3733 : */
3734 : if ( pScope && (type = pScope->lookupByName(*(yyvsp[(1) - (1)].sval))) ) {
3735 : if (!idlc()->error()->checkPublished(type))
3736 : {
3737 : type = 0;
3738 : }
3739 : else
3740 : {
3741 : type = resolveTypedefs(type);
3742 : if (type->getNodeType() == NT_predefined)
3743 : {
3744 : (yyval.etval) = static_cast< AstBaseType const * >(type)->
3745 : getExprType();
3746 : } else
3747 : (yyval.etval) = ET_any;
3748 : }
3749 : } else
3750 : (yyval.etval) = ET_any;
3751 : }
3752 : break;
3753 :
3754 : case 165:
3755 : /* Line 1813 of yacc.c */
3756 : #line 1504 "/usr/local/src/libreoffice/idlc/source/parser.y"
3757 : {
3758 : idlc()->setParseState(PS_ExceptSeen);
3759 : }
3760 : break;
3761 :
3762 : case 166:
3763 : /* Line 1813 of yacc.c */
3764 : #line 1508 "/usr/local/src/libreoffice/idlc/source/parser.y"
3765 : {
3766 : idlc()->setParseState(PS_ExceptIDSeen);
3767 : checkIdentifier((yyvsp[(3) - (3)].sval));
3768 : }
3769 : break;
3770 :
3771 : case 167:
3772 : /* Line 1813 of yacc.c */
3773 : #line 1513 "/usr/local/src/libreoffice/idlc/source/parser.y"
3774 : {
3775 : idlc()->setParseState(PS_InheritSpecSeen);
3776 :
3777 : (yyval.ihval) = new FeInheritanceHeader(NT_exception, (yyvsp[(3) - (5)].sval), (yyvsp[(5) - (5)].sval), 0);
3778 : delete (yyvsp[(5) - (5)].sval);
3779 : }
3780 : break;
3781 :
3782 : case 168:
3783 : /* Line 1813 of yacc.c */
3784 : #line 1523 "/usr/local/src/libreoffice/idlc/source/parser.y"
3785 : {
3786 : idlc()->setParseState(PS_ExceptHeaderSeen);
3787 :
3788 : AstScope* pScope = idlc()->scopes()->topNonNull();
3789 : AstException* pExcept = NULL;
3790 :
3791 : if ( pScope )
3792 : {
3793 : AstException* pBase = static_cast< AstException* >(
3794 : (yyvsp[(1) - (1)].ihval)->getInherits());
3795 : pExcept = new AstException(*(yyvsp[(1) - (1)].ihval)->getName(), pBase, pScope);
3796 : pScope->addDeclaration(pExcept);
3797 : }
3798 : /*
3799 : * Push the scope of the exception on the scopes stack
3800 : */
3801 : idlc()->scopes()->push(pExcept);
3802 : delete (yyvsp[(1) - (1)].ihval);
3803 : }
3804 : break;
3805 :
3806 : case 169:
3807 : /* Line 1813 of yacc.c */
3808 : #line 1543 "/usr/local/src/libreoffice/idlc/source/parser.y"
3809 : {
3810 : idlc()->setParseState(PS_ExceptSqSeen);
3811 : }
3812 : break;
3813 :
3814 : case 170:
3815 : /* Line 1813 of yacc.c */
3816 : #line 1547 "/usr/local/src/libreoffice/idlc/source/parser.y"
3817 : {
3818 : idlc()->setParseState(PS_ExceptBodySeen);
3819 : }
3820 : break;
3821 :
3822 : case 171:
3823 : /* Line 1813 of yacc.c */
3824 : #line 1551 "/usr/local/src/libreoffice/idlc/source/parser.y"
3825 : {
3826 : idlc()->setParseState(PS_ExceptQsSeen);
3827 : /* this exception is finished, pop its scope from the stack */
3828 : idlc()->scopes()->pop();
3829 : }
3830 : break;
3831 :
3832 : case 172:
3833 : /* Line 1813 of yacc.c */
3834 : #line 1561 "/usr/local/src/libreoffice/idlc/source/parser.y"
3835 : {
3836 : idlc()->setParseState(PS_PropertyTypeSeen);
3837 : }
3838 : break;
3839 :
3840 : case 173:
3841 : /* Line 1813 of yacc.c */
3842 : #line 1565 "/usr/local/src/libreoffice/idlc/source/parser.y"
3843 : {
3844 : idlc()->setParseState(PS_PropertyCompleted);
3845 :
3846 : AstScope* pScope = idlc()->scopes()->topNonNull();
3847 : AstAttribute* pAttr = NULL;
3848 : FeDeclList* pList = (yyvsp[(4) - (4)].dlval);
3849 : FeDeclarator* pDecl = NULL;
3850 : AstType const * pType = NULL;
3851 :
3852 : if ( pScope->getScopeNodeType() == NT_singleton )
3853 : {
3854 : idlc()->error()->error0(EIDL_ILLEGAL_ADD);
3855 : } else
3856 : {
3857 : if ( ((yyvsp[(1) - (4)].ulval) & AF_ATTRIBUTE) == AF_ATTRIBUTE )
3858 : idlc()->error()->flagError(EIDL_WRONGATTRIBUTEKEYWORD, AF_ATTRIBUTE);
3859 :
3860 : if ( ((yyvsp[(1) - (4)].ulval) & AF_PROPERTY) != AF_PROPERTY )
3861 : idlc()->error()->flagError(EIDL_MISSINGATTRIBUTEKEYWORD, AF_PROPERTY);
3862 :
3863 : /*
3864 : * Create nodes representing attributes and add them to the
3865 : * enclosing scope
3866 : */
3867 : if ( pScope && (yyvsp[(2) - (4)].cdclval) && pList )
3868 : {
3869 : FeDeclList::iterator iter = pList->begin();
3870 : FeDeclList::iterator end = pList->end();
3871 :
3872 : while (iter != end)
3873 : {
3874 : pDecl = (*iter);
3875 : if ( !pDecl )
3876 : {
3877 : iter++;
3878 : continue;
3879 : }
3880 :
3881 : pType = pDecl->compose((yyvsp[(2) - (4)].cdclval));
3882 :
3883 : if ( !pType )
3884 : {
3885 : iter++;
3886 : continue;
3887 : }
3888 :
3889 : pAttr = new AstAttribute(NT_property, (yyvsp[(1) - (4)].ulval), pType, pDecl->getName(), pScope);
3890 :
3891 : pScope->addDeclaration(pAttr);
3892 : iter++;
3893 : delete pDecl;
3894 : }
3895 : }
3896 : }
3897 :
3898 : if ( pList )
3899 : delete pList;
3900 : }
3901 : break;
3902 :
3903 : case 174:
3904 : /* Line 1813 of yacc.c */
3905 : #line 1624 "/usr/local/src/libreoffice/idlc/source/parser.y"
3906 : {
3907 : yyerror("property");
3908 : yyerrok;
3909 : }
3910 : break;
3911 :
3912 : case 177:
3913 : /* Line 1813 of yacc.c */
3914 : #line 1639 "/usr/local/src/libreoffice/idlc/source/parser.y"
3915 : {
3916 : idlc()->setParseState(PS_ServiceMemberSeen);
3917 :
3918 : AstScope* pScope = idlc()->scopes()->topNonNull();
3919 : AstDeclaration* pDecl = NULL;
3920 : AstInterfaceMember* pIMember = NULL;
3921 :
3922 : if ( pScope->getScopeNodeType() == NT_singleton )
3923 : {
3924 : idlc()->error()->error0(EIDL_ILLEGAL_ADD);
3925 : } else
3926 : {
3927 : /*
3928 : * Create a node representing a class member.
3929 : * Store it in the enclosing scope
3930 : */
3931 : if ( pScope && (yyvsp[(2) - (3)].slval) )
3932 : {
3933 : StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
3934 : StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();
3935 :
3936 : while ( iter != end )
3937 : {
3938 : pDecl = pScope->lookupByName(*iter);
3939 : if ( pDecl && (pDecl->getNodeType() == NT_interface) )
3940 : {
3941 : /* we relax the strict published check and allow to add new
3942 : * interfaces if they are optional
3943 : */
3944 : bool bOptional = (((yyvsp[(1) - (3)].ulval) & AF_OPTIONAL) == AF_OPTIONAL);
3945 : if ( idlc()->error()->checkPublished(pDecl, bOptional) )
3946 : {
3947 : pIMember = new AstInterfaceMember(
3948 : (yyvsp[(1) - (3)].ulval), (AstInterface*)pDecl, *iter, pScope);
3949 : pScope->addDeclaration(pIMember);
3950 : }
3951 : } else
3952 : {
3953 : idlc()->error()->
3954 : lookupError(EIDL_INTERFACEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
3955 : }
3956 : iter++;
3957 : }
3958 : }
3959 : }
3960 : delete (yyvsp[(2) - (3)].slval);
3961 : }
3962 : break;
3963 :
3964 : case 178:
3965 : /* Line 1813 of yacc.c */
3966 : #line 1689 "/usr/local/src/libreoffice/idlc/source/parser.y"
3967 : {
3968 : idlc()->setParseState(PS_ServiceMemberSeen);
3969 :
3970 : AstScope* pScope = idlc()->scopes()->topNonNull();
3971 : AstDeclaration* pDecl = NULL;
3972 : AstServiceMember* pSMember = NULL;
3973 :
3974 : /*
3975 : * Create a node representing a class member.
3976 : * Store it in the enclosing scope
3977 : */
3978 : if ( pScope && (yyvsp[(2) - (3)].slval) )
3979 : {
3980 : StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
3981 : StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();
3982 :
3983 : while ( iter != end )
3984 : {
3985 : pDecl = pScope->lookupByName(*iter);
3986 : if ( pDecl && (pDecl->getNodeType() == NT_service) )
3987 : {
3988 : if ( static_cast< AstService * >(pDecl)->isSingleInterfaceBasedService() || (pScope->getScopeNodeType() == NT_singleton && pScope->nMembers() > 0) )
3989 : idlc()->error()->error0(EIDL_ILLEGAL_ADD);
3990 : else if ( idlc()->error()->checkPublished(pDecl) )
3991 : {
3992 : pSMember = new AstServiceMember(
3993 : (yyvsp[(1) - (3)].ulval), (AstService*)pDecl, *iter, pScope);
3994 : pScope->addDeclaration(pSMember);
3995 : }
3996 : } else
3997 : {
3998 : idlc()->error()->
3999 : lookupError(EIDL_SERVICEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
4000 : }
4001 : iter++;
4002 : }
4003 : }
4004 : delete (yyvsp[(2) - (3)].slval);
4005 : }
4006 : break;
4007 :
4008 : case 179:
4009 : /* Line 1813 of yacc.c */
4010 : #line 1731 "/usr/local/src/libreoffice/idlc/source/parser.y"
4011 : {
4012 : idlc()->setParseState(PS_ServiceMemberSeen);
4013 :
4014 : AstScope* pScope = idlc()->scopes()->topNonNull();
4015 : AstDeclaration* pDecl = NULL;
4016 : AstObserves* pObserves = NULL;
4017 :
4018 : if ( pScope->getScopeNodeType() == NT_singleton )
4019 : {
4020 : idlc()->error()->error0(EIDL_ILLEGAL_ADD);
4021 : } else
4022 : {
4023 : /*
4024 : * Create a node representing a class member.
4025 : * Store it in the enclosing scope
4026 : */
4027 : if ( pScope && (yyvsp[(2) - (3)].slval) )
4028 : {
4029 : StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
4030 : StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();
4031 :
4032 : while ( iter != end )
4033 : {
4034 : pDecl = pScope->lookupByName(*iter);
4035 : if ( pDecl && (pDecl->getNodeType() == NT_interface) )
4036 : {
4037 : pObserves = new AstObserves((AstInterface*)pDecl, *iter, pScope);
4038 : pScope->addDeclaration(pObserves);
4039 : } else
4040 : {
4041 : idlc()->error()->
4042 : lookupError(EIDL_INTERFACEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
4043 : }
4044 : iter++;
4045 : }
4046 : }
4047 : }
4048 : delete (yyvsp[(2) - (3)].slval);
4049 : }
4050 : break;
4051 :
4052 : case 180:
4053 : /* Line 1813 of yacc.c */
4054 : #line 1773 "/usr/local/src/libreoffice/idlc/source/parser.y"
4055 : {
4056 : idlc()->setParseState(PS_ServiceMemberSeen);
4057 :
4058 : AstScope* pScope = idlc()->scopes()->topNonNull();
4059 : AstDeclaration* pDecl = NULL;
4060 : AstNeeds* pNeeds = NULL;
4061 :
4062 : if ( pScope->getScopeNodeType() == NT_singleton )
4063 : {
4064 : idlc()->error()->error0(EIDL_ILLEGAL_ADD);
4065 : } else
4066 : {
4067 : /*
4068 : * Create a node representing a class member.
4069 : * Store it in the enclosing scope
4070 : */
4071 : if ( pScope && (yyvsp[(2) - (3)].slval) )
4072 : {
4073 : StringList::iterator iter = (yyvsp[(2) - (3)].slval)->begin();
4074 : StringList::iterator end = (yyvsp[(2) - (3)].slval)->end();
4075 :
4076 : while ( iter != end )
4077 : {
4078 : pDecl = pScope->lookupByName(*iter);
4079 : if ( pDecl && (pDecl->getNodeType() == NT_service) )
4080 : {
4081 : pNeeds = new AstNeeds((AstService*)pDecl, *iter, pScope);
4082 : pScope->addDeclaration(pNeeds);
4083 : } else
4084 : {
4085 : idlc()->error()->
4086 : lookupError(EIDL_SERVICEMEMBER_LOOKUP, *iter, scopeAsDecl(pScope));
4087 : }
4088 : iter++;
4089 : }
4090 : }
4091 : }
4092 : delete (yyvsp[(2) - (3)].slval);
4093 : }
4094 : break;
4095 :
4096 : case 181:
4097 : /* Line 1813 of yacc.c */
4098 : #line 1814 "/usr/local/src/libreoffice/idlc/source/parser.y"
4099 : {
4100 : idlc()->setParseState(PS_PropertyDeclSeen);
4101 : }
4102 : break;
4103 :
4104 : case 182:
4105 : /* Line 1813 of yacc.c */
4106 : #line 1821 "/usr/local/src/libreoffice/idlc/source/parser.y"
4107 : {
4108 : idlc()->setParseState(PS_ServiceIFHeadSeen);
4109 : (yyval.ulval) = AF_INVALID;
4110 : }
4111 : break;
4112 :
4113 : case 183:
4114 : /* Line 1813 of yacc.c */
4115 : #line 1827 "/usr/local/src/libreoffice/idlc/source/parser.y"
4116 : {
4117 : idlc()->setParseState(PS_ServiceIFHeadSeen);
4118 : if ( (AF_OPTIONAL != (yyvsp[(1) - (2)].ulval)) && ( AF_INVALID != (yyvsp[(1) - (2)].ulval)) )
4119 : idlc()->error()->flagError(EIDL_OPTIONALEXPECTED, (yyvsp[(1) - (2)].ulval));
4120 : (yyval.ulval) = (yyvsp[(1) - (2)].ulval);
4121 : }
4122 : break;
4123 :
4124 : case 184:
4125 : /* Line 1813 of yacc.c */
4126 : #line 1837 "/usr/local/src/libreoffice/idlc/source/parser.y"
4127 : {
4128 : idlc()->setParseState(PS_ServiceSHeadSeen);
4129 : (yyval.ulval) = AF_INVALID;
4130 : }
4131 : break;
4132 :
4133 : case 185:
4134 : /* Line 1813 of yacc.c */
4135 : #line 1843 "/usr/local/src/libreoffice/idlc/source/parser.y"
4136 : {
4137 : idlc()->setParseState(PS_ServiceSHeadSeen);
4138 : if ( (AF_OPTIONAL != (yyvsp[(1) - (2)].ulval)) && ( AF_INVALID != (yyvsp[(1) - (2)].ulval)) )
4139 : idlc()->error()->flagError(EIDL_OPTIONALEXPECTED, (yyvsp[(1) - (2)].ulval));
4140 : (yyval.ulval) = (yyvsp[(1) - (2)].ulval);
4141 : }
4142 : break;
4143 :
4144 : case 186:
4145 : /* Line 1813 of yacc.c */
4146 : #line 1853 "/usr/local/src/libreoffice/idlc/source/parser.y"
4147 : {
4148 : idlc()->setParseState(PS_ServiceSeen);
4149 : }
4150 : break;
4151 :
4152 : case 187:
4153 : /* Line 1813 of yacc.c */
4154 : #line 1857 "/usr/local/src/libreoffice/idlc/source/parser.y"
4155 : {
4156 : idlc()->setParseState(PS_ServiceIDSeen);
4157 : checkIdentifier((yyvsp[(3) - (3)].sval));
4158 :
4159 : AstScope* pScope = idlc()->scopes()->topNonNull();
4160 : AstService* pService = NULL;
4161 :
4162 : /*
4163 : * Make a new service and add it to the enclosing scope
4164 : */
4165 : if (pScope != NULL)
4166 : {
4167 : pService = new AstService(*(yyvsp[(3) - (3)].sval), pScope);
4168 : pScope->addDeclaration(pService);
4169 : }
4170 : delete (yyvsp[(3) - (3)].sval);
4171 : /*
4172 : * Push it on the stack
4173 : */
4174 : idlc()->scopes()->push(pService);
4175 : }
4176 : break;
4177 :
4178 : case 188:
4179 : /* Line 1813 of yacc.c */
4180 : #line 1879 "/usr/local/src/libreoffice/idlc/source/parser.y"
4181 : {
4182 : /* this service is finished, pop its scope from the stack */
4183 : idlc()->scopes()->pop();
4184 : }
4185 : break;
4186 :
4187 : case 191:
4188 : /* Line 1813 of yacc.c */
4189 : #line 1892 "/usr/local/src/libreoffice/idlc/source/parser.y"
4190 : {
4191 : AstScope * scope = idlc()->scopes()->nextToTop();
4192 : // skip the scope pushed by service_dcl
4193 : AstDeclaration * decl = scope->lookupByName(*(yyvsp[(2) - (2)].sval));
4194 : if (decl != 0 && resolveTypedefs(decl)->getNodeType() == NT_interface) {
4195 : if (idlc()->error()->checkPublished(decl)) {
4196 : idlc()->scopes()->top()->addDeclaration(decl);
4197 : }
4198 : } else {
4199 : idlc()->error()->lookupError(
4200 : EIDL_INTERFACEMEMBER_LOOKUP, *(yyvsp[(2) - (2)].sval), scopeAsDecl(scope));
4201 : }
4202 : delete (yyvsp[(2) - (2)].sval);
4203 : }
4204 : break;
4205 :
4206 : case 192:
4207 : /* Line 1813 of yacc.c */
4208 : #line 1907 "/usr/local/src/libreoffice/idlc/source/parser.y"
4209 : {
4210 : AstService * s = static_cast< AstService * >(idlc()->scopes()->top());
4211 : if (s != 0) {
4212 : s->setSingleInterfaceBasedService();
4213 : s->setDefaultConstructor(!(yyvsp[(4) - (4)].bval));
4214 : }
4215 : }
4216 : break;
4217 :
4218 : case 193:
4219 : /* Line 1813 of yacc.c */
4220 : #line 1917 "/usr/local/src/libreoffice/idlc/source/parser.y"
4221 : { (yyval.bval) = true; }
4222 : break;
4223 :
4224 : case 194:
4225 : /* Line 1813 of yacc.c */
4226 : #line 1918 "/usr/local/src/libreoffice/idlc/source/parser.y"
4227 : { (yyval.bval) = false; }
4228 : break;
4229 :
4230 : case 198:
4231 : /* Line 1813 of yacc.c */
4232 : #line 1934 "/usr/local/src/libreoffice/idlc/source/parser.y"
4233 : {
4234 : checkIdentifier((yyvsp[(1) - (1)].sval));
4235 : AstScope * scope = idlc()->scopes()->top();
4236 : AstOperation * ctor = new AstOperation(0, *(yyvsp[(1) - (1)].sval), scope);
4237 : delete (yyvsp[(1) - (1)].sval);
4238 : scope->addDeclaration(ctor);
4239 : idlc()->scopes()->push(ctor);
4240 : }
4241 : break;
4242 :
4243 : case 199:
4244 : /* Line 1813 of yacc.c */
4245 : #line 1946 "/usr/local/src/libreoffice/idlc/source/parser.y"
4246 : {
4247 : static_cast< AstOperation * >(idlc()->scopes()->top())->setExceptions(
4248 : (yyvsp[(6) - (6)].dclsval));
4249 : delete (yyvsp[(6) - (6)].dclsval);
4250 : idlc()->scopes()->pop();
4251 : if (static_cast< AstService * >(idlc()->scopes()->top())->
4252 : checkLastConstructor())
4253 : {
4254 : idlc()->error()->error0(EIDL_SIMILAR_CONSTRUCTORS);
4255 : }
4256 : }
4257 : break;
4258 :
4259 : case 201:
4260 : /* Line 1813 of yacc.c */
4261 : #line 1962 "/usr/local/src/libreoffice/idlc/source/parser.y"
4262 : {
4263 : idlc()->setParseState(PS_SingletonSeen);
4264 : }
4265 : break;
4266 :
4267 : case 202:
4268 : /* Line 1813 of yacc.c */
4269 : #line 1966 "/usr/local/src/libreoffice/idlc/source/parser.y"
4270 : {
4271 : idlc()->setParseState(PS_SingletonIDSeen);
4272 : checkIdentifier((yyvsp[(3) - (3)].sval));
4273 :
4274 : AstScope* pScope = idlc()->scopes()->topNonNull();
4275 : AstService* pService = NULL;
4276 :
4277 : /*
4278 : * Make a new service and add it to the enclosing scope
4279 : */
4280 : if (pScope != NULL)
4281 : {
4282 : pService = new AstService(NT_singleton, *(yyvsp[(3) - (3)].sval), pScope);
4283 : pScope->addDeclaration(pService);
4284 : }
4285 : delete (yyvsp[(3) - (3)].sval);
4286 : /*
4287 : * Push it on the stack
4288 : */
4289 : idlc()->scopes()->push(pService);
4290 : }
4291 : break;
4292 :
4293 : case 203:
4294 : /* Line 1813 of yacc.c */
4295 : #line 1988 "/usr/local/src/libreoffice/idlc/source/parser.y"
4296 : {
4297 : /* this singelton is finished, pop its scope from the stack */
4298 : idlc()->scopes()->pop();
4299 : }
4300 : break;
4301 :
4302 : case 206:
4303 : /* Line 1813 of yacc.c */
4304 : #line 2001 "/usr/local/src/libreoffice/idlc/source/parser.y"
4305 : {
4306 : AstScope * scope = idlc()->scopes()->nextToTop();
4307 : // skip the scope (needlessly) pushed by singleton_dcl
4308 : AstDeclaration * decl = scope->lookupByName(*(yyvsp[(2) - (2)].sval));
4309 : if (decl != 0 && resolveTypedefs(decl)->getNodeType() == NT_interface) {
4310 : if (idlc()->error()->checkPublished(decl)) {
4311 : idlc()->scopes()->top()->addDeclaration(decl);
4312 : }
4313 : } else {
4314 : idlc()->error()->lookupError(
4315 : EIDL_INTERFACEMEMBER_LOOKUP, *(yyvsp[(2) - (2)].sval), scopeAsDecl(scope));
4316 : }
4317 : delete (yyvsp[(2) - (2)].sval);
4318 : }
4319 : break;
4320 :
4321 : case 207:
4322 : /* Line 1813 of yacc.c */
4323 : #line 2019 "/usr/local/src/libreoffice/idlc/source/parser.y"
4324 : {
4325 : idlc()->setParseState(
4326 : idlc()->scopes()->top()->getScopeNodeType() == NT_service
4327 : ? PS_ServiceSqSeen : PS_SingletonSqSeen);
4328 : }
4329 : break;
4330 :
4331 : case 208:
4332 : /* Line 1813 of yacc.c */
4333 : #line 2025 "/usr/local/src/libreoffice/idlc/source/parser.y"
4334 : {
4335 : idlc()->setParseState(
4336 : idlc()->scopes()->top()->getScopeNodeType() == NT_service
4337 : ? PS_ServiceBodySeen : PS_SingletonBodySeen);
4338 : }
4339 : break;
4340 :
4341 : case 209:
4342 : /* Line 1813 of yacc.c */
4343 : #line 2031 "/usr/local/src/libreoffice/idlc/source/parser.y"
4344 : {
4345 : idlc()->setParseState(
4346 : idlc()->scopes()->top()->getScopeNodeType() == NT_service
4347 : ? PS_ServiceQsSeen : PS_SingletonQsSeen);
4348 : }
4349 : break;
4350 :
4351 : case 210:
4352 : /* Line 1813 of yacc.c */
4353 : #line 2040 "/usr/local/src/libreoffice/idlc/source/parser.y"
4354 : {
4355 : idlc()->setParseState(PS_TypedefSeen);
4356 : }
4357 : break;
4358 :
4359 : case 211:
4360 : /* Line 1813 of yacc.c */
4361 : #line 2043 "/usr/local/src/libreoffice/idlc/source/parser.y"
4362 : {}
4363 : break;
4364 :
4365 : case 212:
4366 : /* Line 1813 of yacc.c */
4367 : #line 2044 "/usr/local/src/libreoffice/idlc/source/parser.y"
4368 : {}
4369 : break;
4370 :
4371 : case 213:
4372 : /* Line 1813 of yacc.c */
4373 : #line 2045 "/usr/local/src/libreoffice/idlc/source/parser.y"
4374 : {}
4375 : break;
4376 :
4377 : case 214:
4378 : /* Line 1813 of yacc.c */
4379 : #line 2046 "/usr/local/src/libreoffice/idlc/source/parser.y"
4380 : {}
4381 : break;
4382 :
4383 : case 215:
4384 : /* Line 1813 of yacc.c */
4385 : #line 2051 "/usr/local/src/libreoffice/idlc/source/parser.y"
4386 : {
4387 : idlc()->setParseState(PS_TypeSpecSeen);
4388 : if ((yyvsp[(1) - (1)].cdclval) != 0 && (yyvsp[(1) - (1)].cdclval)->getNodeType() == NT_instantiated_struct) {
4389 : idlc()->error()->error0(EIDL_INSTANTIATED_STRUCT_TYPE_TYPEDEF);
4390 : }
4391 : }
4392 : break;
4393 :
4394 : case 216:
4395 : /* Line 1813 of yacc.c */
4396 : #line 2058 "/usr/local/src/libreoffice/idlc/source/parser.y"
4397 : {
4398 : idlc()->setParseState(PS_DeclaratorsSeen);
4399 :
4400 : AstScope* pScope = idlc()->scopes()->topNonNull();
4401 : AstTypeDef* pTypeDef = NULL;
4402 : FeDeclList* pList = (yyvsp[(3) - (3)].dlval);
4403 : FeDeclarator* pDecl = NULL;
4404 : AstType const * pType = NULL;
4405 :
4406 : /*
4407 : * Create nodes representing typedefs and add them to the
4408 : * enclosing scope
4409 : */
4410 : if ( pScope && (yyvsp[(1) - (3)].cdclval) && pList )
4411 : {
4412 : FeDeclList::iterator iter = pList->begin();
4413 : FeDeclList::iterator end = pList->end();
4414 :
4415 : while (iter != end)
4416 : {
4417 : pDecl = (*iter);
4418 : if ( !pDecl )
4419 : {
4420 : iter++;
4421 : continue;
4422 : }
4423 :
4424 : pType = pDecl->compose((yyvsp[(1) - (3)].cdclval));
4425 :
4426 : if ( !pType )
4427 : {
4428 : iter++;
4429 : continue;
4430 : }
4431 :
4432 : pTypeDef = new AstTypeDef(pType, pDecl->getName(), pScope);
4433 :
4434 : pScope->addDeclaration(pTypeDef);
4435 : iter++;
4436 : delete pDecl;
4437 : }
4438 : delete pList;
4439 : }
4440 : }
4441 : break;
4442 :
4443 : case 217:
4444 : /* Line 1813 of yacc.c */
4445 : #line 2106 "/usr/local/src/libreoffice/idlc/source/parser.y"
4446 : {
4447 : if ( (yyvsp[(2) - (2)].dlval) )
4448 : {
4449 : (yyvsp[(2) - (2)].dlval)->push_back((yyvsp[(1) - (2)].fdval));
4450 : (yyval.dlval) = (yyvsp[(2) - (2)].dlval);
4451 : } else
4452 : {
4453 : FeDeclList* pList = new FeDeclList();
4454 : pList->push_back((yyvsp[(1) - (2)].fdval));
4455 : (yyval.dlval) = pList;
4456 : }
4457 : }
4458 : break;
4459 :
4460 : case 218:
4461 : /* Line 1813 of yacc.c */
4462 : #line 2123 "/usr/local/src/libreoffice/idlc/source/parser.y"
4463 : {
4464 : idlc()->setParseState(PS_DeclsCommaSeen);
4465 : }
4466 : break;
4467 :
4468 : case 219:
4469 : /* Line 1813 of yacc.c */
4470 : #line 2127 "/usr/local/src/libreoffice/idlc/source/parser.y"
4471 : {
4472 : idlc()->setParseState(PS_DeclsDeclSeen);
4473 : if ( (yyvsp[(1) - (4)].dlval) )
4474 : {
4475 : (yyvsp[(1) - (4)].dlval)->push_back((yyvsp[(4) - (4)].fdval));
4476 : (yyval.dlval) = (yyvsp[(1) - (4)].dlval);
4477 : } else
4478 : {
4479 : FeDeclList* pList = new FeDeclList();
4480 : pList->push_back((yyvsp[(4) - (4)].fdval));
4481 : (yyval.dlval) = pList;
4482 : }
4483 : }
4484 : break;
4485 :
4486 : case 220:
4487 : /* Line 1813 of yacc.c */
4488 : #line 2141 "/usr/local/src/libreoffice/idlc/source/parser.y"
4489 : {
4490 : (yyval.dlval) = NULL;
4491 : }
4492 : break;
4493 :
4494 : case 223:
4495 : /* Line 1813 of yacc.c */
4496 : #line 2153 "/usr/local/src/libreoffice/idlc/source/parser.y"
4497 : {
4498 : // For historic reasons, the struct com.sun.star.uno.Uik contains
4499 : // members with illegal names (of the form "m_DataN"); avoid useless
4500 : // warnings about them:
4501 : AstScope * scope = idlc()->scopes()->top();
4502 : if (scope == 0 || scope->getScopeNodeType() != NT_struct
4503 : || (scopeAsDecl(scope)->getScopedName()
4504 : != "com::sun::star::uno::Uik"))
4505 : {
4506 : checkIdentifier((yyvsp[(1) - (1)].sval));
4507 : }
4508 :
4509 : (yyval.fdval) = new FeDeclarator(*(yyvsp[(1) - (1)].sval), FeDeclarator::FD_simple, NULL);
4510 : delete (yyvsp[(1) - (1)].sval);
4511 : }
4512 : break;
4513 :
4514 : case 224:
4515 : /* Line 1813 of yacc.c */
4516 : #line 2172 "/usr/local/src/libreoffice/idlc/source/parser.y"
4517 : {
4518 : (yyval.fdval) = new FeDeclarator((yyvsp[(1) - (1)].dclval)->getLocalName(), FeDeclarator::FD_complex, (yyvsp[(1) - (1)].dclval));
4519 : }
4520 : break;
4521 :
4522 : case 225:
4523 : /* Line 1813 of yacc.c */
4524 : #line 2179 "/usr/local/src/libreoffice/idlc/source/parser.y"
4525 : {
4526 : idlc()->setParseState(PS_ArrayIDSeen);
4527 : checkIdentifier((yyvsp[(1) - (1)].sval));
4528 : }
4529 : break;
4530 :
4531 : case 226:
4532 : /* Line 1813 of yacc.c */
4533 : #line 2184 "/usr/local/src/libreoffice/idlc/source/parser.y"
4534 : {
4535 : idlc()->setParseState(PS_ArrayCompleted);
4536 : (yyval.dclval) = new AstArray(*(yyvsp[(1) - (3)].sval), NULL, *(yyvsp[(3) - (3)].exlval), idlc()->scopes()->bottom());
4537 : delete (yyvsp[(1) - (3)].sval);
4538 : }
4539 : break;
4540 :
4541 : case 227:
4542 : /* Line 1813 of yacc.c */
4543 : #line 2193 "/usr/local/src/libreoffice/idlc/source/parser.y"
4544 : {
4545 : if( (yyvsp[(2) - (2)].exlval) )
4546 : {
4547 : (yyvsp[(2) - (2)].exlval)->push_front((yyvsp[(1) - (2)].exval));
4548 : (yyval.exlval) = (yyvsp[(2) - (2)].exlval);
4549 : } else
4550 : {
4551 : ExprList* pList = new ExprList();
4552 : pList->push_back((yyvsp[(1) - (2)].exval));
4553 : (yyval.exlval) = pList;
4554 : }
4555 : }
4556 : break;
4557 :
4558 : case 228:
4559 : /* Line 1813 of yacc.c */
4560 : #line 2209 "/usr/local/src/libreoffice/idlc/source/parser.y"
4561 : {
4562 : if( (yyvsp[(1) - (2)].exlval) )
4563 : {
4564 : (yyvsp[(1) - (2)].exlval)->push_back((yyvsp[(2) - (2)].exval));
4565 : (yyval.exlval) = (yyvsp[(1) - (2)].exlval);
4566 : } else
4567 : {
4568 : ExprList* pList = new ExprList();
4569 : pList->push_back((yyvsp[(2) - (2)].exval));
4570 : (yyval.exlval) = pList;
4571 : }
4572 : }
4573 : break;
4574 :
4575 : case 229:
4576 : /* Line 1813 of yacc.c */
4577 : #line 2222 "/usr/local/src/libreoffice/idlc/source/parser.y"
4578 : {
4579 : (yyval.exlval) = NULL;
4580 : }
4581 : break;
4582 :
4583 : case 230:
4584 : /* Line 1813 of yacc.c */
4585 : #line 2229 "/usr/local/src/libreoffice/idlc/source/parser.y"
4586 : {
4587 : idlc()->setParseState(PS_DimSqSeen);
4588 : }
4589 : break;
4590 :
4591 : case 231:
4592 : /* Line 1813 of yacc.c */
4593 : #line 2233 "/usr/local/src/libreoffice/idlc/source/parser.y"
4594 : {
4595 : idlc()->setParseState(PS_DimExprSeen);
4596 : }
4597 : break;
4598 :
4599 : case 232:
4600 : /* Line 1813 of yacc.c */
4601 : #line 2237 "/usr/local/src/libreoffice/idlc/source/parser.y"
4602 : {
4603 : idlc()->setParseState(PS_DimQsSeen);
4604 : /*
4605 : * Array dimensions are expressions which must be coerced to
4606 : * positive integers
4607 : */
4608 : if ( !(yyvsp[(3) - (5)].exval) || !(yyvsp[(3) - (5)].exval)->coerce(ET_uhyper) )
4609 : {
4610 : idlc()->error()->coercionError((yyvsp[(3) - (5)].exval), ET_uhyper);
4611 : (yyval.exval) = NULL;
4612 : } else
4613 : (yyval.exval) = (yyvsp[(3) - (5)].exval);
4614 : }
4615 : break;
4616 :
4617 : case 233:
4618 : /* Line 1813 of yacc.c */
4619 : #line 2254 "/usr/local/src/libreoffice/idlc/source/parser.y"
4620 : {
4621 : if ((yyvsp[(2) - (2)].slval))
4622 : {
4623 : (yyvsp[(2) - (2)].slval)->push_front(*(yyvsp[(1) - (2)].sval));
4624 : (yyval.slval) = (yyvsp[(2) - (2)].slval);
4625 : } else
4626 : {
4627 : StringList* pNames = new StringList();
4628 : pNames->push_back(*(yyvsp[(1) - (2)].sval));
4629 : (yyval.slval) = pNames;
4630 : }
4631 : delete((yyvsp[(1) - (2)].sval));
4632 : }
4633 : break;
4634 :
4635 : case 234:
4636 : /* Line 1813 of yacc.c */
4637 : #line 2272 "/usr/local/src/libreoffice/idlc/source/parser.y"
4638 : {
4639 : idlc()->setParseState(PS_SNListCommaSeen);
4640 : }
4641 : break;
4642 :
4643 : case 235:
4644 : /* Line 1813 of yacc.c */
4645 : #line 2276 "/usr/local/src/libreoffice/idlc/source/parser.y"
4646 : {
4647 : idlc()->setParseState(PS_ScopedNameSeen);
4648 : if ((yyvsp[(1) - (4)].slval))
4649 : {
4650 : (yyvsp[(1) - (4)].slval)->push_back(*(yyvsp[(4) - (4)].sval));
4651 : (yyval.slval) = (yyvsp[(1) - (4)].slval);
4652 : } else
4653 : {
4654 : StringList* pNames = new StringList();
4655 : pNames->push_back(*(yyvsp[(4) - (4)].sval));
4656 : (yyval.slval) = pNames;
4657 : }
4658 : delete((yyvsp[(4) - (4)].sval));
4659 : }
4660 : break;
4661 :
4662 : case 236:
4663 : /* Line 1813 of yacc.c */
4664 : #line 2291 "/usr/local/src/libreoffice/idlc/source/parser.y"
4665 : {
4666 : (yyval.slval) = NULL;
4667 : }
4668 : break;
4669 :
4670 : case 237:
4671 : /* Line 1813 of yacc.c */
4672 : #line 2298 "/usr/local/src/libreoffice/idlc/source/parser.y"
4673 : {
4674 : idlc()->setParseState(PS_SN_IDSeen);
4675 : checkIdentifier((yyvsp[(1) - (1)].sval));
4676 : (yyval.sval) = (yyvsp[(1) - (1)].sval);
4677 : }
4678 : break;
4679 :
4680 : case 238:
4681 : /* Line 1813 of yacc.c */
4682 : #line 2304 "/usr/local/src/libreoffice/idlc/source/parser.y"
4683 : {
4684 : idlc()->setParseState(PS_ScopeDelimSeen);
4685 : }
4686 : break;
4687 :
4688 : case 239:
4689 : /* Line 1813 of yacc.c */
4690 : #line 2308 "/usr/local/src/libreoffice/idlc/source/parser.y"
4691 : {
4692 : checkIdentifier((yyvsp[(3) - (3)].sval));
4693 : OString* pName = new OString("::");
4694 : *pName += *(yyvsp[(3) - (3)].sval);
4695 : delete (yyvsp[(3) - (3)].sval);
4696 : (yyval.sval) = pName;
4697 : }
4698 : break;
4699 :
4700 : case 240:
4701 : /* Line 1813 of yacc.c */
4702 : #line 2317 "/usr/local/src/libreoffice/idlc/source/parser.y"
4703 : {
4704 : }
4705 : break;
4706 :
4707 : case 241:
4708 : /* Line 1813 of yacc.c */
4709 : #line 2320 "/usr/local/src/libreoffice/idlc/source/parser.y"
4710 : {
4711 : checkIdentifier((yyvsp[(4) - (4)].sval));
4712 : *(yyvsp[(1) - (4)].sval) += ::rtl::OString("::");
4713 : *(yyvsp[(1) - (4)].sval) += *(yyvsp[(4) - (4)].sval);
4714 : delete (yyvsp[(4) - (4)].sval);
4715 : (yyval.sval) = (yyvsp[(1) - (4)].sval);
4716 : }
4717 : break;
4718 :
4719 : case 245:
4720 : /* Line 1813 of yacc.c */
4721 : #line 2337 "/usr/local/src/libreoffice/idlc/source/parser.y"
4722 : {
4723 : (yyval.cdclval) = createNamedType((yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].dclsval));
4724 : }
4725 : break;
4726 :
4727 : case 246:
4728 : /* Line 1813 of yacc.c */
4729 : #line 2344 "/usr/local/src/libreoffice/idlc/source/parser.y"
4730 : {
4731 : (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
4732 : }
4733 : break;
4734 :
4735 : case 248:
4736 : /* Line 1813 of yacc.c */
4737 : #line 2351 "/usr/local/src/libreoffice/idlc/source/parser.y"
4738 : { (yyval.dclsval) = (yyvsp[(2) - (3)].dclsval); }
4739 : break;
4740 :
4741 : case 249:
4742 : /* Line 1813 of yacc.c */
4743 : #line 2352 "/usr/local/src/libreoffice/idlc/source/parser.y"
4744 : { (yyval.dclsval) = 0; }
4745 : break;
4746 :
4747 : case 250:
4748 : /* Line 1813 of yacc.c */
4749 : #line 2357 "/usr/local/src/libreoffice/idlc/source/parser.y"
4750 : {
4751 : (yyval.dclsval) = new DeclList;
4752 : (yyval.dclsval)->push_back(const_cast< AstDeclaration * >((yyvsp[(1) - (1)].cdclval))); //TODO: const_cast
4753 : }
4754 : break;
4755 :
4756 : case 251:
4757 : /* Line 1813 of yacc.c */
4758 : #line 2362 "/usr/local/src/libreoffice/idlc/source/parser.y"
4759 : {
4760 : (yyvsp[(1) - (3)].dclsval)->push_back(const_cast< AstDeclaration * >((yyvsp[(3) - (3)].cdclval))); //TODO: const_cast
4761 : (yyval.dclsval) = (yyvsp[(1) - (3)].dclsval);
4762 : }
4763 : break;
4764 :
4765 : case 252:
4766 : /* Line 1813 of yacc.c */
4767 : #line 2370 "/usr/local/src/libreoffice/idlc/source/parser.y"
4768 : {
4769 : if ((yyvsp[(1) - (1)].cdclval) != 0 && static_cast< AstType const * >((yyvsp[(1) - (1)].cdclval))->isUnsigned()) {
4770 : idlc()->error()->error0(EIDL_UNSIGNED_TYPE_ARGUMENT);
4771 : }
4772 : (yyval.cdclval) = (yyvsp[(1) - (1)].cdclval);
4773 : }
4774 : break;
4775 :
4776 : case 263:
4777 : /* Line 1813 of yacc.c */
4778 : #line 2396 "/usr/local/src/libreoffice/idlc/source/parser.y"
4779 : {
4780 : (yyval.etval) = ET_long;
4781 : }
4782 : break;
4783 :
4784 : case 264:
4785 : /* Line 1813 of yacc.c */
4786 : #line 2400 "/usr/local/src/libreoffice/idlc/source/parser.y"
4787 : {
4788 : (yyval.etval) = ET_hyper;
4789 : }
4790 : break;
4791 :
4792 : case 265:
4793 : /* Line 1813 of yacc.c */
4794 : #line 2404 "/usr/local/src/libreoffice/idlc/source/parser.y"
4795 : {
4796 : (yyval.etval) = ET_short;
4797 : }
4798 : break;
4799 :
4800 : case 266:
4801 : /* Line 1813 of yacc.c */
4802 : #line 2411 "/usr/local/src/libreoffice/idlc/source/parser.y"
4803 : {
4804 : (yyval.etval) = ET_ulong;
4805 : }
4806 : break;
4807 :
4808 : case 267:
4809 : /* Line 1813 of yacc.c */
4810 : #line 2415 "/usr/local/src/libreoffice/idlc/source/parser.y"
4811 : {
4812 : (yyval.etval) = ET_uhyper;
4813 : }
4814 : break;
4815 :
4816 : case 268:
4817 : /* Line 1813 of yacc.c */
4818 : #line 2419 "/usr/local/src/libreoffice/idlc/source/parser.y"
4819 : {
4820 : (yyval.etval) = ET_ushort;
4821 : }
4822 : break;
4823 :
4824 : case 269:
4825 : /* Line 1813 of yacc.c */
4826 : #line 2426 "/usr/local/src/libreoffice/idlc/source/parser.y"
4827 : {
4828 : (yyval.etval) = ET_double;
4829 : }
4830 : break;
4831 :
4832 : case 270:
4833 : /* Line 1813 of yacc.c */
4834 : #line 2430 "/usr/local/src/libreoffice/idlc/source/parser.y"
4835 : {
4836 : (yyval.etval) = ET_float;
4837 : }
4838 : break;
4839 :
4840 : case 271:
4841 : /* Line 1813 of yacc.c */
4842 : #line 2437 "/usr/local/src/libreoffice/idlc/source/parser.y"
4843 : {
4844 : (yyval.etval) = ET_char;
4845 : }
4846 : break;
4847 :
4848 : case 272:
4849 : /* Line 1813 of yacc.c */
4850 : #line 2444 "/usr/local/src/libreoffice/idlc/source/parser.y"
4851 : {
4852 : (yyval.etval) = ET_byte;
4853 : }
4854 : break;
4855 :
4856 : case 273:
4857 : /* Line 1813 of yacc.c */
4858 : #line 2451 "/usr/local/src/libreoffice/idlc/source/parser.y"
4859 : {
4860 : (yyval.etval) = ET_boolean;
4861 : }
4862 : break;
4863 :
4864 : case 274:
4865 : /* Line 1813 of yacc.c */
4866 : #line 2458 "/usr/local/src/libreoffice/idlc/source/parser.y"
4867 : {
4868 : (yyval.etval) = ET_any;
4869 : }
4870 : break;
4871 :
4872 : case 275:
4873 : /* Line 1813 of yacc.c */
4874 : #line 2465 "/usr/local/src/libreoffice/idlc/source/parser.y"
4875 : {
4876 : (yyval.etval) = ET_type;
4877 : }
4878 : break;
4879 :
4880 : case 276:
4881 : /* Line 1813 of yacc.c */
4882 : #line 2472 "/usr/local/src/libreoffice/idlc/source/parser.y"
4883 : {
4884 : (yyval.etval) = ET_string;
4885 : }
4886 : break;
4887 :
4888 : case 282:
4889 : /* Line 1813 of yacc.c */
4890 : #line 2490 "/usr/local/src/libreoffice/idlc/source/parser.y"
4891 : {
4892 : idlc()->setParseState(PS_ArrayTypeSeen);
4893 : }
4894 : break;
4895 :
4896 : case 283:
4897 : /* Line 1813 of yacc.c */
4898 : #line 2494 "/usr/local/src/libreoffice/idlc/source/parser.y"
4899 : {
4900 : idlc()->setParseState(PS_ArrayCompleted);
4901 :
4902 : AstScope* pScope = idlc()->scopes()->bottom();
4903 : AstDeclaration* pDecl = NULL;
4904 : AstDeclaration* pArray = NULL;
4905 :
4906 : if ( (yyvsp[(1) - (3)].cdclval) )
4907 : {
4908 : pArray = new AstArray((AstType*)(yyvsp[(1) - (3)].cdclval), *(yyvsp[(3) - (3)].exlval), idlc()->scopes()->bottom());
4909 : if ( pScope )
4910 : {
4911 : pDecl = pScope->addDeclaration(pArray);
4912 : if ( pArray != pDecl )
4913 : {
4914 : // if array type already defined then use it
4915 : delete pArray;
4916 : pArray = pDecl;
4917 : }
4918 : }
4919 : }
4920 : (yyval.cdclval) = pArray;
4921 : }
4922 : break;
4923 :
4924 : case 284:
4925 : /* Line 1813 of yacc.c */
4926 : #line 2521 "/usr/local/src/libreoffice/idlc/source/parser.y"
4927 : {
4928 : idlc()->setParseState(PS_SequenceSeen);
4929 : /*
4930 : * Push a sequence marker on scopes stack
4931 : */
4932 : idlc()->scopes()->push(NULL);
4933 : }
4934 : break;
4935 :
4936 : case 285:
4937 : /* Line 1813 of yacc.c */
4938 : #line 2529 "/usr/local/src/libreoffice/idlc/source/parser.y"
4939 : {
4940 : idlc()->setParseState(PS_SequenceSqSeen);
4941 : }
4942 : break;
4943 :
4944 : case 286:
4945 : /* Line 1813 of yacc.c */
4946 : #line 2533 "/usr/local/src/libreoffice/idlc/source/parser.y"
4947 : {
4948 : idlc()->setParseState(PS_SequenceTypeSeen);
4949 : }
4950 : break;
4951 :
4952 : case 287:
4953 : /* Line 1813 of yacc.c */
4954 : #line 2537 "/usr/local/src/libreoffice/idlc/source/parser.y"
4955 : {
4956 : idlc()->setParseState(PS_SequenceQsSeen);
4957 : /*
4958 : * Remove sequence marker from scopes stack
4959 : */
4960 : if (idlc()->scopes()->top() == NULL)
4961 : idlc()->scopes()->pop();
4962 : /*
4963 : * Create a node representing a sequence
4964 : */
4965 : AstScope* pScope = idlc()->scopes()->bottom();
4966 : AstDeclaration* pDecl = NULL;
4967 : AstDeclaration* pSeq = NULL;
4968 :
4969 : if ( (yyvsp[(5) - (7)].cdclval) )
4970 : {
4971 : AstType *pType = (AstType*)(yyvsp[(5) - (7)].cdclval);
4972 : if ( pType )
4973 : {
4974 : pSeq = new AstSequence(pType, pScope);
4975 : /*
4976 : * Add this AstSequence to the types defined in the global scope
4977 : */
4978 : pDecl = pScope->addDeclaration(pSeq);
4979 : if ( pSeq != pDecl )
4980 : {
4981 : // if sequence type already defined then use it
4982 : delete pSeq;
4983 : pSeq = pDecl;
4984 : }
4985 : }
4986 : }
4987 : (yyval.cdclval) = pSeq;
4988 : }
4989 : break;
4990 :
4991 : case 288:
4992 : /* Line 1813 of yacc.c */
4993 : #line 2572 "/usr/local/src/libreoffice/idlc/source/parser.y"
4994 : {
4995 : yyerror("sequence declaration");
4996 : yyerrok;
4997 : (yyval.cdclval) = 0;
4998 : }
4999 : break;
5000 :
5001 : case 289:
5002 : /* Line 1813 of yacc.c */
5003 : #line 2581 "/usr/local/src/libreoffice/idlc/source/parser.y"
5004 : {
5005 : idlc()->setParseState(PS_StructHeaderSeen);
5006 :
5007 : AstScope* pScope = idlc()->scopes()->topNonNull();
5008 : AstStruct* pStruct = NULL;
5009 :
5010 : if ( pScope )
5011 : {
5012 : AstStruct* pBase= static_cast< AstStruct* >((yyvsp[(1) - (1)].ihval)->getInherits());
5013 : pStruct = new AstStruct(
5014 : *(yyvsp[(1) - (1)].ihval)->getName(), (yyvsp[(1) - (1)].ihval)->getTypeParameters(), pBase, pScope);
5015 : pScope->addDeclaration(pStruct);
5016 : }
5017 : /*
5018 : * Push the scope of the struct on the scopes stack
5019 : */
5020 : idlc()->scopes()->push(pStruct);
5021 : delete (yyvsp[(1) - (1)].ihval);
5022 : }
5023 : break;
5024 :
5025 : case 290:
5026 : /* Line 1813 of yacc.c */
5027 : #line 2601 "/usr/local/src/libreoffice/idlc/source/parser.y"
5028 : {
5029 : idlc()->setParseState(PS_StructSqSeen);
5030 : }
5031 : break;
5032 :
5033 : case 291:
5034 : /* Line 1813 of yacc.c */
5035 : #line 2605 "/usr/local/src/libreoffice/idlc/source/parser.y"
5036 : {
5037 : idlc()->setParseState(PS_StructBodySeen);
5038 : }
5039 : break;
5040 :
5041 : case 292:
5042 : /* Line 1813 of yacc.c */
5043 : #line 2609 "/usr/local/src/libreoffice/idlc/source/parser.y"
5044 : {
5045 : idlc()->setParseState(PS_StructQsSeen);
5046 : /* this exception is finished, pop its scope from the stack */
5047 : idlc()->scopes()->pop();
5048 : }
5049 : break;
5050 :
5051 : case 293:
5052 : /* Line 1813 of yacc.c */
5053 : #line 2618 "/usr/local/src/libreoffice/idlc/source/parser.y"
5054 : {
5055 : idlc()->setParseState(PS_StructSeen);
5056 : }
5057 : break;
5058 :
5059 : case 294:
5060 : /* Line 1813 of yacc.c */
5061 : #line 2622 "/usr/local/src/libreoffice/idlc/source/parser.y"
5062 : {
5063 : idlc()->setParseState(PS_StructIDSeen);
5064 : checkIdentifier((yyvsp[(3) - (3)].sval));
5065 : }
5066 : break;
5067 :
5068 : case 295:
5069 : /* Line 1813 of yacc.c */
5070 : #line 2628 "/usr/local/src/libreoffice/idlc/source/parser.y"
5071 : {
5072 : idlc()->setParseState(PS_InheritSpecSeen);
5073 :
5074 : // Polymorphic struct type templates with base types would cause various
5075 : // problems in language bindings, so forbid them here. For example,
5076 : // GCC prior to version 3.4 fails with code like
5077 : //
5078 : // struct Base { ... };
5079 : // template< typename typeparam_T > struct Derived: public Base {
5080 : // int member1 CPPU_GCC3_ALIGN(Base);
5081 : // ... };
5082 : //
5083 : // (Note that plain struct types with instantiated polymorphic struct
5084 : // type bases, which might also cause problems in language bindings, are
5085 : // already rejected on a syntactic level.)
5086 : if ((yyvsp[(5) - (6)].svals) != 0 && (yyvsp[(6) - (6)].sval) != 0) {
5087 : idlc()->error()->error0(EIDL_STRUCT_TYPE_TEMPLATE_WITH_BASE);
5088 : }
5089 :
5090 : (yyval.ihval) = new FeInheritanceHeader(NT_struct, (yyvsp[(3) - (6)].sval), (yyvsp[(6) - (6)].sval), (yyvsp[(5) - (6)].svals));
5091 : delete (yyvsp[(5) - (6)].svals);
5092 : delete (yyvsp[(6) - (6)].sval);
5093 : }
5094 : break;
5095 :
5096 : case 296:
5097 : /* Line 1813 of yacc.c */
5098 : #line 2654 "/usr/local/src/libreoffice/idlc/source/parser.y"
5099 : { (yyval.svals) = (yyvsp[(2) - (3)].svals); }
5100 : break;
5101 :
5102 : case 297:
5103 : /* Line 1813 of yacc.c */
5104 : #line 2655 "/usr/local/src/libreoffice/idlc/source/parser.y"
5105 : { (yyval.svals) = 0; }
5106 : break;
5107 :
5108 : case 298:
5109 : /* Line 1813 of yacc.c */
5110 : #line 2660 "/usr/local/src/libreoffice/idlc/source/parser.y"
5111 : {
5112 : (yyval.svals) = new std::vector< rtl::OString >;
5113 : (yyval.svals)->push_back(*(yyvsp[(1) - (1)].sval));
5114 : delete (yyvsp[(1) - (1)].sval);
5115 : }
5116 : break;
5117 :
5118 : case 299:
5119 : /* Line 1813 of yacc.c */
5120 : #line 2666 "/usr/local/src/libreoffice/idlc/source/parser.y"
5121 : {
5122 : if (std::find((yyvsp[(1) - (3)].svals)->begin(), (yyvsp[(1) - (3)].svals)->end(), *(yyvsp[(3) - (3)].sval)) != (yyvsp[(1) - (3)].svals)->end()) {
5123 : idlc()->error()->error0(EIDL_IDENTICAL_TYPE_PARAMETERS);
5124 : }
5125 : (yyvsp[(1) - (3)].svals)->push_back(*(yyvsp[(3) - (3)].sval));
5126 : delete (yyvsp[(3) - (3)].sval);
5127 : (yyval.svals) = (yyvsp[(1) - (3)].svals);
5128 : }
5129 : break;
5130 :
5131 : case 303:
5132 : /* Line 1813 of yacc.c */
5133 : #line 2685 "/usr/local/src/libreoffice/idlc/source/parser.y"
5134 : {
5135 : idlc()->setParseState(PS_MemberTypeSeen);
5136 : }
5137 : break;
5138 :
5139 : case 304:
5140 : /* Line 1813 of yacc.c */
5141 : #line 2689 "/usr/local/src/libreoffice/idlc/source/parser.y"
5142 : {
5143 : idlc()->setParseState(PS_MemberDeclsSeen);
5144 : }
5145 : break;
5146 :
5147 : case 305:
5148 : /* Line 1813 of yacc.c */
5149 : #line 2693 "/usr/local/src/libreoffice/idlc/source/parser.y"
5150 : {
5151 : idlc()->setParseState(PS_MemberDeclsCompleted);
5152 :
5153 : AstScope* pScope = idlc()->scopes()->topNonNull();
5154 : AstMember* pMember = NULL;
5155 : FeDeclList* pList = (yyvsp[(3) - (5)].dlval);
5156 : FeDeclarator* pDecl = NULL;
5157 : AstType const * pType = NULL;
5158 :
5159 : // !!! check recursive type
5160 :
5161 : if ( pScope && pList && (yyvsp[(1) - (5)].cdclval) )
5162 : {
5163 : FeDeclList::iterator iter = pList->begin();
5164 : FeDeclList::iterator end = pList->end();
5165 : while (iter != end)
5166 : {
5167 : pDecl = (*iter);
5168 : if ( !pDecl )
5169 : {
5170 : iter++;
5171 : continue;
5172 : }
5173 :
5174 : pType = pDecl->compose((yyvsp[(1) - (5)].cdclval));
5175 :
5176 : if ( !pType )
5177 : {
5178 : iter++;
5179 : continue;
5180 : }
5181 :
5182 : pMember = new AstMember(pType, pDecl->getName(), pScope);
5183 :
5184 : if ( !pDecl->checkType((yyvsp[(1) - (5)].cdclval)) )
5185 : {
5186 : // WARNING
5187 : }
5188 :
5189 : pScope->addDeclaration(pMember);
5190 : iter++;
5191 : delete pDecl;
5192 : }
5193 : delete pList;
5194 : }
5195 : }
5196 : break;
5197 :
5198 : case 306:
5199 : /* Line 1813 of yacc.c */
5200 : #line 2740 "/usr/local/src/libreoffice/idlc/source/parser.y"
5201 : {
5202 : yyerror("member definition");
5203 : yyerrok;
5204 : }
5205 : break;
5206 :
5207 : case 308:
5208 : /* Line 1813 of yacc.c */
5209 : #line 2749 "/usr/local/src/libreoffice/idlc/source/parser.y"
5210 : {
5211 : AstDeclaration const * decl = 0;
5212 : AstStruct * scope = static_cast< AstStruct * >(idlc()->scopes()->top());
5213 : if (scope != 0 && (yyvsp[(2) - (2)].dclsval) == 0) {
5214 : decl = scope->findTypeParameter(*(yyvsp[(1) - (2)].sval));
5215 : }
5216 : if (decl != 0) {
5217 : delete (yyvsp[(1) - (2)].sval);
5218 : delete (yyvsp[(2) - (2)].dclsval);
5219 : } else {
5220 : decl = createNamedType((yyvsp[(1) - (2)].sval), (yyvsp[(2) - (2)].dclsval));
5221 : if (scope != 0 && includes(decl, scopeAsDecl(scope))) {
5222 : idlc()->error()->error1(
5223 : EIDL_RECURSIVE_TYPE, scopeAsDecl(scope));
5224 : decl = 0;
5225 : }
5226 : }
5227 : (yyval.cdclval) = decl;
5228 : }
5229 : break;
5230 :
5231 : case 309:
5232 : /* Line 1813 of yacc.c */
5233 : #line 2772 "/usr/local/src/libreoffice/idlc/source/parser.y"
5234 : {
5235 : idlc()->setParseState(PS_EnumSeen);
5236 : }
5237 : break;
5238 :
5239 : case 310:
5240 : /* Line 1813 of yacc.c */
5241 : #line 2776 "/usr/local/src/libreoffice/idlc/source/parser.y"
5242 : {
5243 : idlc()->setParseState(PS_EnumIDSeen);
5244 : checkIdentifier((yyvsp[(3) - (3)].sval));
5245 :
5246 : AstScope* pScope = idlc()->scopes()->topNonNull();
5247 : AstEnum* pEnum = NULL;
5248 :
5249 : /*
5250 : * Create a node representing an enum and add it to its
5251 : * enclosing scope
5252 : */
5253 : if (pScope != NULL)
5254 : {
5255 : pEnum = new AstEnum(*(yyvsp[(3) - (3)].sval), pScope);
5256 : /*
5257 : * Add it to its defining scope
5258 : */
5259 : pScope->addDeclaration(pEnum);
5260 : }
5261 : delete (yyvsp[(3) - (3)].sval);
5262 : /*
5263 : * Push the enum scope on the scopes stack
5264 : */
5265 : idlc()->scopes()->push(pEnum);
5266 :
5267 : }
5268 : break;
5269 :
5270 : case 311:
5271 : /* Line 1813 of yacc.c */
5272 : #line 2803 "/usr/local/src/libreoffice/idlc/source/parser.y"
5273 : {
5274 : idlc()->setParseState(PS_EnumSqSeen);
5275 : }
5276 : break;
5277 :
5278 : case 312:
5279 : /* Line 1813 of yacc.c */
5280 : #line 2807 "/usr/local/src/libreoffice/idlc/source/parser.y"
5281 : {
5282 : idlc()->setParseState(PS_EnumBodySeen);
5283 : }
5284 : break;
5285 :
5286 : case 313:
5287 : /* Line 1813 of yacc.c */
5288 : #line 2811 "/usr/local/src/libreoffice/idlc/source/parser.y"
5289 : {
5290 : idlc()->setParseState(PS_EnumQsSeen);
5291 : /*
5292 : * Done with this enum. Pop its scope from the scopes stack
5293 : */
5294 : if (idlc()->scopes()->top() == NULL)
5295 : (yyval.cdclval) = NULL;
5296 : else
5297 : {
5298 : (yyval.cdclval) = (AstEnum*)idlc()->scopes()->topNonNull();
5299 : idlc()->scopes()->pop();
5300 : }
5301 : }
5302 : break;
5303 :
5304 : case 315:
5305 : /* Line 1813 of yacc.c */
5306 : #line 2831 "/usr/local/src/libreoffice/idlc/source/parser.y"
5307 : {
5308 : idlc()->setParseState(PS_EnumCommaSeen);
5309 : }
5310 : break;
5311 :
5312 : case 318:
5313 : /* Line 1813 of yacc.c */
5314 : #line 2837 "/usr/local/src/libreoffice/idlc/source/parser.y"
5315 : {
5316 : yyerror("enumerator definition");
5317 : yyerrok;
5318 : }
5319 : break;
5320 :
5321 : case 319:
5322 : /* Line 1813 of yacc.c */
5323 : #line 2845 "/usr/local/src/libreoffice/idlc/source/parser.y"
5324 : {
5325 : checkIdentifier((yyvsp[(1) - (1)].sval));
5326 :
5327 : AstScope* pScope = idlc()->scopes()->topNonNull();
5328 : AstEnum* pEnum = NULL;
5329 : AstConstant* pEnumVal = NULL;
5330 :
5331 : if ( pScope && pScope->getScopeNodeType() == NT_enum)
5332 : {
5333 : pEnum = (AstEnum*)pScope;
5334 : if (pEnum && (yyvsp[(1) - (1)].sval))
5335 : {
5336 : AstExpression* pExpr = new AstExpression(pEnum->getEnumValueCount());
5337 : pEnumVal = new AstConstant(ET_long , NT_enum_val,
5338 : pExpr, *(yyvsp[(1) - (1)].sval), pScope);
5339 : }
5340 : if ( pEnum->checkValue(pEnumVal->getConstValue()) )
5341 : idlc()->error()->error1(EIDL_EVAL_ERROR, pEnum);
5342 :
5343 : pScope->addDeclaration(pEnumVal);
5344 : }
5345 : delete (yyvsp[(1) - (1)].sval);
5346 : }
5347 : break;
5348 :
5349 : case 320:
5350 : /* Line 1813 of yacc.c */
5351 : #line 2871 "/usr/local/src/libreoffice/idlc/source/parser.y"
5352 : {
5353 : checkIdentifier((yyvsp[(1) - (3)].sval));
5354 :
5355 : AstScope* pScope = idlc()->scopes()->topNonNull();
5356 : AstEnum* pEnum = NULL;
5357 : AstConstant* pEnumVal = NULL;
5358 :
5359 : if ( (yyvsp[(3) - (3)].exval) && pScope && pScope->getScopeNodeType() == NT_enum)
5360 : {
5361 : (yyvsp[(3) - (3)].exval)->evaluate(EK_const);
5362 : if ( (yyvsp[(3) - (3)].exval)->coerce(ET_long) )
5363 : {
5364 : pEnum = (AstEnum*)pScope;
5365 : if (pEnum)
5366 : {
5367 : pEnumVal = new AstConstant(ET_long , NT_enum_val,
5368 : (yyvsp[(3) - (3)].exval), *(yyvsp[(1) - (3)].sval), pScope);
5369 : }
5370 : if ( pEnum->checkValue(pEnumVal->getConstValue()) )
5371 : idlc()->error()->error1(EIDL_EVAL_ERROR, pEnum);
5372 :
5373 : pScope->addDeclaration(pEnumVal);
5374 : } else
5375 : {
5376 : idlc()->error()->coercionError((yyvsp[(3) - (3)].exval), ET_long);
5377 : delete (yyvsp[(3) - (3)].exval);
5378 : }
5379 : }
5380 : delete (yyvsp[(1) - (3)].sval);
5381 : }
5382 : break;
5383 :
5384 : case 321:
5385 : /* Line 1813 of yacc.c */
5386 : #line 2905 "/usr/local/src/libreoffice/idlc/source/parser.y"
5387 : {
5388 : idlc()->setParseState(PS_UnionSeen);
5389 : }
5390 : break;
5391 :
5392 : case 322:
5393 : /* Line 1813 of yacc.c */
5394 : #line 2909 "/usr/local/src/libreoffice/idlc/source/parser.y"
5395 : {
5396 : idlc()->setParseState(PS_UnionIDSeen);
5397 : checkIdentifier((yyvsp[(3) - (3)].sval));
5398 : }
5399 : break;
5400 :
5401 : case 323:
5402 : /* Line 1813 of yacc.c */
5403 : #line 2914 "/usr/local/src/libreoffice/idlc/source/parser.y"
5404 : {
5405 : idlc()->setParseState(PS_SwitchSeen);
5406 : }
5407 : break;
5408 :
5409 : case 324:
5410 : /* Line 1813 of yacc.c */
5411 : #line 2918 "/usr/local/src/libreoffice/idlc/source/parser.y"
5412 : {
5413 : idlc()->setParseState(PS_SwitchOpenParSeen);
5414 : }
5415 : break;
5416 :
5417 : case 325:
5418 : /* Line 1813 of yacc.c */
5419 : #line 2922 "/usr/local/src/libreoffice/idlc/source/parser.y"
5420 : {
5421 : idlc()->setParseState(PS_SwitchTypeSeen);
5422 : }
5423 : break;
5424 :
5425 : case 326:
5426 : /* Line 1813 of yacc.c */
5427 : #line 2926 "/usr/local/src/libreoffice/idlc/source/parser.y"
5428 : {
5429 : idlc()->setParseState(PS_SwitchCloseParSeen);
5430 :
5431 : AstScope* pScope = idlc()->scopes()->topNonNull();
5432 : AstUnion* pUnion = NULL;
5433 :
5434 : /*
5435 : * Create a node representing a union. Add it to its enclosing
5436 : * scope
5437 : */
5438 : if ( (yyvsp[(9) - (11)].cdclval) && pScope )
5439 : {
5440 : AstType* pType = (AstType*)(yyvsp[(9) - (11)].cdclval);
5441 : if ( !pType)
5442 : {
5443 : idlc()->error()->noTypeError((yyvsp[(9) - (11)].cdclval));
5444 : } else
5445 : {
5446 : pUnion = new AstUnion(*(yyvsp[(3) - (11)].sval), pType, pScope);
5447 : pScope->addDeclaration(pUnion);
5448 : }
5449 : }
5450 : delete (yyvsp[(3) - (11)].sval);
5451 : /*
5452 : * Push the scope of the union on the scopes stack
5453 : */
5454 : idlc()->scopes()->push(pUnion);
5455 : }
5456 : break;
5457 :
5458 : case 327:
5459 : /* Line 1813 of yacc.c */
5460 : #line 2955 "/usr/local/src/libreoffice/idlc/source/parser.y"
5461 : {
5462 : idlc()->setParseState(PS_UnionSqSeen);
5463 : }
5464 : break;
5465 :
5466 : case 328:
5467 : /* Line 1813 of yacc.c */
5468 : #line 2959 "/usr/local/src/libreoffice/idlc/source/parser.y"
5469 : {
5470 : idlc()->setParseState(PS_UnionBodySeen);
5471 : }
5472 : break;
5473 :
5474 : case 329:
5475 : /* Line 1813 of yacc.c */
5476 : #line 2963 "/usr/local/src/libreoffice/idlc/source/parser.y"
5477 : {
5478 : idlc()->setParseState(PS_UnionQsSeen);
5479 : /* this union is finished, pop its scope from the stack */
5480 : idlc()->scopes()->pop();
5481 : }
5482 : break;
5483 :
5484 : case 330:
5485 : /* Line 1813 of yacc.c */
5486 : #line 2972 "/usr/local/src/libreoffice/idlc/source/parser.y"
5487 : {
5488 : (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
5489 : }
5490 : break;
5491 :
5492 : case 331:
5493 : /* Line 1813 of yacc.c */
5494 : #line 2976 "/usr/local/src/libreoffice/idlc/source/parser.y"
5495 : {
5496 : (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
5497 : }
5498 : break;
5499 :
5500 : case 332:
5501 : /* Line 1813 of yacc.c */
5502 : #line 2980 "/usr/local/src/libreoffice/idlc/source/parser.y"
5503 : {
5504 : (yyval.cdclval) = idlc()->scopes()->bottom()->lookupPrimitiveType((yyvsp[(1) - (1)].etval));
5505 : }
5506 : break;
5507 :
5508 : case 334:
5509 : /* Line 1813 of yacc.c */
5510 : #line 2985 "/usr/local/src/libreoffice/idlc/source/parser.y"
5511 : {
5512 : AstScope* pScope = idlc()->scopes()->topNonNull();
5513 : AstBaseType* pBaseType = NULL;
5514 : AstDeclaration const * pDecl = NULL;
5515 : AstTypeDef* pTypeDef = NULL;
5516 : sal_Bool bFound = sal_False;
5517 : /*
5518 : * If the constant's type is a scoped name, it must resolve
5519 : * to a scalar constant type
5520 : */
5521 : if ( pScope && (pDecl = pScope->lookupByName(*(yyvsp[(1) - (1)].sval))) )
5522 : {
5523 : /*
5524 : * Look through typedefs
5525 : */
5526 : while ( !bFound )
5527 : {
5528 : switch (pDecl->getNodeType())
5529 : {
5530 : case NT_enum:
5531 : (yyval.cdclval) = pDecl;
5532 : bFound = sal_True;
5533 : break;
5534 : case NT_predefined:
5535 : pBaseType = (AstBaseType*)pDecl;
5536 : if ( pBaseType )
5537 : {
5538 : switch (pBaseType->getExprType())
5539 : {
5540 : case ET_short:
5541 : case ET_ushort:
5542 : case ET_long:
5543 : case ET_ulong:
5544 : case ET_hyper:
5545 : case ET_uhyper:
5546 : case ET_char:
5547 : case ET_byte:
5548 : case ET_boolean:
5549 : (yyval.cdclval) = pBaseType;
5550 : bFound = sal_True;
5551 : break;
5552 : default:
5553 : (yyval.cdclval) = NULL;
5554 : bFound = sal_True;
5555 : break;
5556 : }
5557 : }
5558 : break;
5559 : case NT_typedef:
5560 : pTypeDef = (AstTypeDef*)pDecl;
5561 : if ( pTypeDef )
5562 : pDecl = pTypeDef->getBaseType();
5563 : break;
5564 : default:
5565 : (yyval.cdclval) = NULL;
5566 : bFound = sal_True;
5567 : break;
5568 : }
5569 : }
5570 : } else
5571 : (yyval.cdclval) = NULL;
5572 :
5573 : if ((yyval.cdclval) == NULL)
5574 : idlc()->error()->lookupError(*(yyvsp[(1) - (1)].sval));
5575 : }
5576 : break;
5577 :
5578 : case 338:
5579 : /* Line 1813 of yacc.c */
5580 : #line 3061 "/usr/local/src/libreoffice/idlc/source/parser.y"
5581 : {
5582 : idlc()->setParseState(PS_UnionLabelSeen);
5583 : }
5584 : break;
5585 :
5586 : case 339:
5587 : /* Line 1813 of yacc.c */
5588 : #line 3065 "/usr/local/src/libreoffice/idlc/source/parser.y"
5589 : {
5590 : idlc()->setParseState(PS_UnionElemSeen);
5591 :
5592 : AstScope* pScope = idlc()->scopes()->topNonNull();
5593 : AstUnionLabel* pLabel = NULL;
5594 : AstUnionBranch* pBranch = NULL;
5595 : AstMember* pMember = (yyvsp[(3) - (3)].mval);
5596 :
5597 : /*
5598 : * Create several nodes representing branches of a union.
5599 : * Add them to the enclosing scope (the union scope)
5600 : */
5601 : if ( pScope && (yyvsp[(1) - (3)].llval) && (yyvsp[(3) - (3)].mval) )
5602 : {
5603 : LabelList::iterator iter = (yyvsp[(1) - (3)].llval)->begin();
5604 : LabelList::iterator end = (yyvsp[(1) - (3)].llval)->end();
5605 : for (;iter != end; iter++)
5606 : {
5607 : pLabel = *iter;
5608 : if ( !pLabel )
5609 : {
5610 : iter++;
5611 : continue;
5612 : }
5613 : pBranch = new AstUnionBranch(pLabel, pMember->getType(),
5614 : pMember->getLocalName(), pScope);
5615 : pScope->addDeclaration(pBranch);
5616 : }
5617 : }
5618 : if ( (yyvsp[(1) - (3)].llval) ) delete((yyvsp[(1) - (3)].llval));
5619 : }
5620 : break;
5621 :
5622 : case 340:
5623 : /* Line 1813 of yacc.c */
5624 : #line 3100 "/usr/local/src/libreoffice/idlc/source/parser.y"
5625 : {
5626 : if ( (yyvsp[(2) - (2)].llval) )
5627 : {
5628 : (yyvsp[(2) - (2)].llval)->push_front((yyvsp[(1) - (2)].lbval));
5629 : (yyval.llval) = (yyvsp[(2) - (2)].llval);
5630 : } else
5631 : {
5632 : LabelList* pLabels = new LabelList();
5633 : pLabels->push_back((yyvsp[(1) - (2)].lbval));
5634 : (yyval.llval) = pLabels;
5635 : }
5636 : }
5637 : break;
5638 :
5639 : case 341:
5640 : /* Line 1813 of yacc.c */
5641 : #line 3116 "/usr/local/src/libreoffice/idlc/source/parser.y"
5642 : {
5643 : if ( (yyvsp[(1) - (2)].llval) )
5644 : {
5645 : (yyvsp[(1) - (2)].llval)->push_back((yyvsp[(2) - (2)].lbval));
5646 : (yyval.llval) = (yyvsp[(1) - (2)].llval);
5647 : } else
5648 : {
5649 : LabelList* pLabels = new LabelList();
5650 : pLabels->push_back((yyvsp[(2) - (2)].lbval));
5651 : (yyval.llval) = pLabels;
5652 : }
5653 : }
5654 : break;
5655 :
5656 : case 342:
5657 : /* Line 1813 of yacc.c */
5658 : #line 3129 "/usr/local/src/libreoffice/idlc/source/parser.y"
5659 : {
5660 : (yyval.llval) = NULL;
5661 : }
5662 : break;
5663 :
5664 : case 343:
5665 : /* Line 1813 of yacc.c */
5666 : #line 3136 "/usr/local/src/libreoffice/idlc/source/parser.y"
5667 : {
5668 : idlc()->setParseState(PS_DefaultSeen);
5669 : }
5670 : break;
5671 :
5672 : case 344:
5673 : /* Line 1813 of yacc.c */
5674 : #line 3140 "/usr/local/src/libreoffice/idlc/source/parser.y"
5675 : {
5676 : idlc()->setParseState(PS_LabelColonSeen);
5677 : (yyval.lbval) = new AstUnionLabel(UL_default, NULL);
5678 : }
5679 : break;
5680 :
5681 : case 345:
5682 : /* Line 1813 of yacc.c */
5683 : #line 3145 "/usr/local/src/libreoffice/idlc/source/parser.y"
5684 : {
5685 : idlc()->setParseState(PS_CaseSeen);
5686 : }
5687 : break;
5688 :
5689 : case 346:
5690 : /* Line 1813 of yacc.c */
5691 : #line 3149 "/usr/local/src/libreoffice/idlc/source/parser.y"
5692 : {
5693 : idlc()->setParseState(PS_LabelExprSeen);
5694 : }
5695 : break;
5696 :
5697 : case 347:
5698 : /* Line 1813 of yacc.c */
5699 : #line 3153 "/usr/local/src/libreoffice/idlc/source/parser.y"
5700 : {
5701 : idlc()->setParseState(PS_LabelColonSeen);
5702 : (yyval.lbval) = new AstUnionLabel(UL_label, (yyvsp[(3) - (5)].exval));
5703 : }
5704 : break;
5705 :
5706 : case 348:
5707 : /* Line 1813 of yacc.c */
5708 : #line 3161 "/usr/local/src/libreoffice/idlc/source/parser.y"
5709 : {
5710 : idlc()->setParseState(PS_UnionElemTypeSeen);
5711 : }
5712 : break;
5713 :
5714 : case 349:
5715 : /* Line 1813 of yacc.c */
5716 : #line 3165 "/usr/local/src/libreoffice/idlc/source/parser.y"
5717 : {
5718 : idlc()->setParseState(PS_UnionElemDeclSeen);
5719 : }
5720 : break;
5721 :
5722 : case 350:
5723 : /* Line 1813 of yacc.c */
5724 : #line 3169 "/usr/local/src/libreoffice/idlc/source/parser.y"
5725 : {
5726 : idlc()->setParseState(PS_UnionElemCompleted);
5727 :
5728 : AstScope* pScope = idlc()->scopes()->topNonNull();
5729 : /*
5730 : * Check for illegal recursive use of type
5731 : */
5732 : // if ( $1 && AST_illegal_recursive_type($1))
5733 : // idlc()->error()->error1(EIDL_RECURSIVE_TYPE, $1);
5734 : /*
5735 : * Create a field in a union branch
5736 : */
5737 : if ( (yyvsp[(1) - (5)].cdclval) && (yyvsp[(3) - (5)].fdval) )
5738 : {
5739 : AstType const * pType = (yyvsp[(3) - (5)].fdval)->compose((yyvsp[(1) - (5)].cdclval));
5740 : if ( !pType )
5741 : (yyval.mval) = NULL;
5742 : else
5743 : (yyval.mval) = new AstMember(pType, (yyvsp[(3) - (5)].fdval)->getName(), pScope);
5744 : } else
5745 : (yyval.mval) = NULL;
5746 :
5747 : if ( (yyvsp[(3) - (5)].fdval) ) delete (yyvsp[(3) - (5)].fdval);
5748 : }
5749 : break;
5750 :
5751 : case 351:
5752 : /* Line 1813 of yacc.c */
5753 : #line 3195 "/usr/local/src/libreoffice/idlc/source/parser.y"
5754 : {
5755 : (yyval.mval) = NULL;
5756 : }
5757 : break;
5758 :
5759 : case 353:
5760 : /* Line 1813 of yacc.c */
5761 : #line 3202 "/usr/local/src/libreoffice/idlc/source/parser.y"
5762 : { (yyval.sval) = new OString("get"); }
5763 : break;
5764 :
5765 : case 354:
5766 : /* Line 1813 of yacc.c */
5767 : #line 3203 "/usr/local/src/libreoffice/idlc/source/parser.y"
5768 : { (yyval.sval) = new OString("set"); }
5769 : break;
5770 :
5771 : case 355:
5772 : /* Line 1813 of yacc.c */
5773 : #line 3204 "/usr/local/src/libreoffice/idlc/source/parser.y"
5774 : { (yyval.sval) = new OString("published"); }
5775 : break;
5776 :
5777 :
5778 : /* Line 1813 of yacc.c */
5779 : #line 5780 "/usr/local/src/libreoffice/workdir/unxlngi6.pro/YaccTarget/idlc/source/parser.cxx"
5780 3384013 : default: break;
5781 : }
5782 : /* User semantic actions sometimes alter yychar, and that requires
5783 : that yytoken be updated with the new translation. We take the
5784 : approach of translating immediately before every use of yytoken.
5785 : One alternative is translating here after every semantic action,
5786 : but that translation would be missed if the semantic action invokes
5787 : YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5788 : if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5789 : incorrect destructor might then be invoked immediately. In the
5790 : case of YYERROR or YYBACKUP, subsequent parser actions might lead
5791 : to an incorrect destructor call or verbose syntax error message
5792 : before the lookahead is translated. */
5793 10294807 : YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5794 :
5795 10294807 : YYPOPSTACK (yylen);
5796 10294807 : yylen = 0;
5797 10294807 : YY_STACK_PRINT (yyss, yyssp);
5798 :
5799 10294807 : *++yyvsp = yyval;
5800 :
5801 : /* Now `shift' the result of the reduction. Determine what state
5802 : that goes to, based on the state we popped back to and the rule
5803 : number reduced by. */
5804 :
5805 10294807 : yyn = yyr1[yyn];
5806 :
5807 10294807 : yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5808 10294807 : if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5809 3318261 : yystate = yytable[yystate];
5810 : else
5811 6976546 : yystate = yydefgoto[yyn - YYNTOKENS];
5812 :
5813 10294807 : goto yynewstate;
5814 :
5815 :
5816 : /*------------------------------------.
5817 : | yyerrlab -- here on detecting error |
5818 : `------------------------------------*/
5819 : yyerrlab:
5820 : /* Make sure we have latest lookahead translation. See comments at
5821 : user semantic actions for why this is necessary. */
5822 196 : yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5823 :
5824 : /* If not already recovering from an error, report this error. */
5825 196 : if (!yyerrstatus)
5826 : {
5827 35 : ++yynerrs;
5828 : #if ! YYERROR_VERBOSE
5829 : yyerror (YY_("syntax error"));
5830 : #else
5831 : # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5832 : yyssp, yytoken)
5833 : {
5834 35 : char const *yymsgp = YY_("syntax error");
5835 : int yysyntax_error_status;
5836 35 : yysyntax_error_status = YYSYNTAX_ERROR;
5837 35 : if (yysyntax_error_status == 0)
5838 35 : yymsgp = yymsg;
5839 0 : else if (yysyntax_error_status == 1)
5840 : {
5841 0 : if (yymsg != yymsgbuf)
5842 0 : YYSTACK_FREE (yymsg);
5843 0 : yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5844 0 : if (!yymsg)
5845 : {
5846 0 : yymsg = yymsgbuf;
5847 0 : yymsg_alloc = sizeof yymsgbuf;
5848 0 : yysyntax_error_status = 2;
5849 : }
5850 : else
5851 : {
5852 0 : yysyntax_error_status = YYSYNTAX_ERROR;
5853 0 : yymsgp = yymsg;
5854 : }
5855 : }
5856 35 : yyerror (yymsgp);
5857 35 : if (yysyntax_error_status == 2)
5858 0 : goto yyexhaustedlab;
5859 : }
5860 : # undef YYSYNTAX_ERROR
5861 : #endif
5862 : }
5863 :
5864 :
5865 :
5866 196 : if (yyerrstatus == 3)
5867 : {
5868 : /* If just tried and failed to reuse lookahead token after an
5869 : error, discard it. */
5870 :
5871 161 : if (yychar <= YYEOF)
5872 : {
5873 : /* Return failure if at end of input. */
5874 6 : if (yychar == YYEOF)
5875 6 : YYABORT;
5876 : }
5877 : else
5878 : {
5879 : yydestruct ("Error: discarding",
5880 155 : yytoken, &yylval);
5881 155 : yychar = YYEMPTY;
5882 : }
5883 : }
5884 :
5885 : /* Else will try to reuse lookahead token after shifting the error
5886 : token. */
5887 190 : goto yyerrlab1;
5888 :
5889 :
5890 : /*---------------------------------------------------.
5891 : | yyerrorlab -- error raised explicitly by YYERROR. |
5892 : `---------------------------------------------------*/
5893 : yyerrorlab:
5894 :
5895 : /* Pacify compilers like GCC when the user code never invokes
5896 : YYERROR and the label yyerrorlab therefore never appears in user
5897 : code. */
5898 : if (/*CONSTCOND*/ 0)
5899 : goto yyerrorlab;
5900 :
5901 : /* Do not reclaim the symbols of the rule which action triggered
5902 : this YYERROR. */
5903 : YYPOPSTACK (yylen);
5904 : yylen = 0;
5905 : YY_STACK_PRINT (yyss, yyssp);
5906 : yystate = *yyssp;
5907 : goto yyerrlab1;
5908 :
5909 :
5910 : /*-------------------------------------------------------------.
5911 : | yyerrlab1 -- common code for both syntax error and YYERROR. |
5912 : `-------------------------------------------------------------*/
5913 : yyerrlab1:
5914 190 : yyerrstatus = 3; /* Each real token shifted decrements this. */
5915 :
5916 : for (;;)
5917 : {
5918 401 : yyn = yypact[yystate];
5919 401 : if (!yypact_value_is_default (yyn))
5920 : {
5921 377 : yyn += YYTERROR;
5922 377 : if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5923 : {
5924 190 : yyn = yytable[yyn];
5925 190 : if (0 < yyn)
5926 190 : break;
5927 : }
5928 : }
5929 :
5930 : /* Pop the current state because it cannot handle the error token. */
5931 211 : if (yyssp == yyss)
5932 0 : YYABORT;
5933 :
5934 :
5935 : yydestruct ("Error: popping",
5936 211 : yystos[yystate], yyvsp);
5937 211 : YYPOPSTACK (1);
5938 211 : yystate = *yyssp;
5939 211 : YY_STACK_PRINT (yyss, yyssp);
5940 : }
5941 :
5942 : YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
5943 190 : *++yyvsp = yylval;
5944 : YY_IGNORE_MAYBE_UNINITIALIZED_END
5945 :
5946 :
5947 : /* Shift the error token. */
5948 190 : YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5949 :
5950 190 : yystate = yyn;
5951 190 : goto yynewstate;
5952 :
5953 :
5954 : /*-------------------------------------.
5955 : | yyacceptlab -- YYACCEPT comes here. |
5956 : `-------------------------------------*/
5957 : yyacceptlab:
5958 5594 : yyresult = 0;
5959 5594 : goto yyreturn;
5960 :
5961 : /*-----------------------------------.
5962 : | yyabortlab -- YYABORT comes here. |
5963 : `-----------------------------------*/
5964 : yyabortlab:
5965 6 : yyresult = 1;
5966 6 : goto yyreturn;
5967 :
5968 : #if !defined yyoverflow || YYERROR_VERBOSE
5969 : /*-------------------------------------------------.
5970 : | yyexhaustedlab -- memory exhaustion comes here. |
5971 : `-------------------------------------------------*/
5972 : yyexhaustedlab:
5973 0 : yyerror (YY_("memory exhausted"));
5974 0 : yyresult = 2;
5975 : /* Fall through. */
5976 : #endif
5977 :
5978 : yyreturn:
5979 5600 : if (yychar != YYEMPTY)
5980 : {
5981 : /* Make sure we have latest lookahead translation. See comments at
5982 : user semantic actions for why this is necessary. */
5983 6 : yytoken = YYTRANSLATE (yychar);
5984 : yydestruct ("Cleanup: discarding lookahead",
5985 6 : yytoken, &yylval);
5986 : }
5987 : /* Do not reclaim the symbols of the rule which action triggered
5988 : this YYABORT or YYACCEPT. */
5989 5600 : YYPOPSTACK (yylen);
5990 5600 : YY_STACK_PRINT (yyss, yyssp);
5991 22436 : while (yyssp != yyss)
5992 : {
5993 : yydestruct ("Cleanup: popping",
5994 11236 : yystos[*yyssp], yyvsp);
5995 11236 : YYPOPSTACK (1);
5996 : }
5997 : #ifndef yyoverflow
5998 5600 : if (yyss != yyssa)
5999 10 : YYSTACK_FREE (yyss);
6000 : #endif
6001 : #if YYERROR_VERBOSE
6002 5600 : if (yymsg != yymsgbuf)
6003 0 : YYSTACK_FREE (yymsg);
6004 : #endif
6005 : /* Make sure YYID is used. */
6006 5811 : return YYID (yyresult);
6007 : }
6008 :
6009 :
6010 : /* Line 2076 of yacc.c */
6011 : #line 3207 "/usr/local/src/libreoffice/idlc/source/parser.y"
6012 :
6013 :
6014 : /*
6015 : * Report an error situation discovered in a production
6016 : */
6017 : void yyerror(char const *errmsg)
6018 : {
6019 : idlc()->error()->syntaxError(idlc()->getParseState(), idlc()->getLineNumber(), errmsg);
6020 : idlc()->setParseState(PS_NoState);
6021 : }
|