2 /* A Bison parser, made by GNU Bison 2.4.1. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
63 /* Using locations. */
64 #define YYLSP_NEEDED 0
66 /* Substitute the variable and function names. */
67 #define yyparse parser_parse
68 #define yylex parser_lex
69 #define yyerror parser_error
70 #define yylval parser_lval
71 #define yychar parser_char
72 #define yydebug parser_debug
73 #define yynerrs parser_nerrs
76 /* Copy the first part of user declarations. */
78 /* Line 189 of yacc.c */
84 * Copyright 2002 Ove Kaaven
85 * Copyright 2006-2008 Robert Shearman
87 * This library is free software; you can redistribute it and/or
88 * modify it under the terms of the GNU Lesser General Public
89 * License as published by the Free Software Foundation; either
90 * version 2.1 of the License, or (at your option) any later version.
92 * This library is distributed in the hope that it will be useful,
93 * but WITHOUT ANY WARRANTY; without even the implied warranty of
94 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
95 * Lesser General Public License for more details.
97 * You should have received a copy of the GNU Lesser General Public
98 * License along with this library; if not, write to the Free Software
99 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
118 #include "typetree.h"
121 /* Berkeley yacc (byacc) doesn't seem to know about these */
122 /* Some *BSD supplied versions do define these though */
124 # define YYEMPTY (-1) /* Empty lookahead value of yychar */
127 # define YYLEX yylex()
130 #elif defined(YYBISON)
131 /* Bison was used for original development */
132 /* #define YYEMPTY -2 */
133 /* #define YYLEX yylex() */
136 /* No yacc we know yet */
137 # if !defined(YYEMPTY) || !defined(YYLEX)
138 # error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX.
139 # elif defined(__GNUC__) /* gcc defines the #warning directive */
140 # warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested
141 /* #else we just take a chance that it works... */
145 #define YYERROR_VERBOSE
147 static unsigned char pointer_default
= RPC_FC_UP
;
149 typedef struct list typelist_t
;
158 int import_performed
;
161 typedef struct _decl_spec_t
165 enum storage_class stgclass
;
168 typelist_t incomplete_types
= LIST_INIT(incomplete_types
);
170 static void fix_incomplete(void);
171 static void fix_incomplete_types(type_t
*complete_type
);
173 static str_list_t
*append_str(str_list_t
*list
, char *str
);
174 static attr_list_t
*append_attr(attr_list_t
*list
, attr_t
*attr
);
175 static attr_list_t
*append_attr_list(attr_list_t
*new_list
, attr_list_t
*old_list
);
176 static decl_spec_t
*make_decl_spec(type_t
*type
, decl_spec_t
*left
, decl_spec_t
*right
, attr_t
*attr
, enum storage_class stgclass
);
177 static attr_t
*make_attr(enum attr_type type
);
178 static attr_t
*make_attrv(enum attr_type type
, unsigned int val
);
179 static attr_t
*make_attrp(enum attr_type type
, void *val
);
180 static expr_list_t
*append_expr(expr_list_t
*list
, expr_t
*expr
);
181 static array_dims_t
*append_array(array_dims_t
*list
, expr_t
*expr
);
182 static var_t
*declare_var(attr_list_t
*attrs
, decl_spec_t
*decl_spec
, const declarator_t
*decl
, int top
);
183 static var_list_t
*set_var_types(attr_list_t
*attrs
, decl_spec_t
*decl_spec
, declarator_list_t
*decls
);
184 static ifref_list_t
*append_ifref(ifref_list_t
*list
, ifref_t
*iface
);
185 static ifref_t
*make_ifref(type_t
*iface
);
186 static var_list_t
*append_var_list(var_list_t
*list
, var_list_t
*vars
);
187 static declarator_list_t
*append_declarator(declarator_list_t
*list
, declarator_t
*p
);
188 static declarator_t
*make_declarator(var_t
*var
);
189 static type_t
*make_safearray(type_t
*type
);
190 static typelib_t
*make_library(const char *name
, const attr_list_t
*attrs
);
191 static type_t
*append_ptrchain_type(type_t
*ptrchain
, type_t
*type
);
193 static type_t
*reg_typedefs(decl_spec_t
*decl_spec
, var_list_t
*names
, attr_list_t
*attrs
);
194 static type_t
*find_type_or_error(const char *name
, int t
);
195 static type_t
*find_type_or_error2(char *name
, int t
);
197 static var_t
*reg_const(var_t
*var
);
199 static char *gen_name(void);
200 static void check_arg_attrs(const var_t
*arg
);
201 static void check_statements(const statement_list_t
*stmts
, int is_inside_library
);
202 static void check_all_user_types(const statement_list_t
*stmts
);
203 static attr_list_t
*check_iface_attrs(const char *name
, attr_list_t
*attrs
);
204 static attr_list_t
*check_function_attrs(const char *name
, attr_list_t
*attrs
);
205 static attr_list_t
*check_typedef_attrs(attr_list_t
*attrs
);
206 static attr_list_t
*check_enum_attrs(attr_list_t
*attrs
);
207 static attr_list_t
*check_struct_attrs(attr_list_t
*attrs
);
208 static attr_list_t
*check_union_attrs(attr_list_t
*attrs
);
209 static attr_list_t
*check_field_attrs(const char *name
, attr_list_t
*attrs
);
210 static attr_list_t
*check_library_attrs(const char *name
, attr_list_t
*attrs
);
211 static attr_list_t
*check_dispiface_attrs(const char *name
, attr_list_t
*attrs
);
212 static attr_list_t
*check_module_attrs(const char *name
, attr_list_t
*attrs
);
213 static attr_list_t
*check_coclass_attrs(const char *name
, attr_list_t
*attrs
);
214 const char *get_attr_display_name(enum attr_type type
);
215 static void add_explicit_handle_if_necessary(var_t
*func
);
216 static void check_def(const type_t
*t
);
218 static statement_t
*make_statement(enum statement_type type
);
219 static statement_t
*make_statement_type_decl(type_t
*type
);
220 static statement_t
*make_statement_reference(type_t
*type
);
221 static statement_t
*make_statement_declaration(var_t
*var
);
222 static statement_t
*make_statement_library(typelib_t
*typelib
);
223 static statement_t
*make_statement_cppquote(const char *str
);
224 static statement_t
*make_statement_importlib(const char *str
);
225 static statement_t
*make_statement_module(type_t
*type
);
226 static statement_t
*make_statement_typedef(var_list_t
*names
);
227 static statement_t
*make_statement_import(const char *str
);
228 static statement_t
*make_statement_typedef(var_list_t
*names
);
229 static statement_list_t
*append_statement(statement_list_t
*list
, statement_t
*stmt
);
233 /* Line 189 of yacc.c */
234 #line 235 "parser.tab.c"
236 /* Enabling traces. */
241 /* Enabling verbose error messages. */
242 #ifdef YYERROR_VERBOSE
243 # undef YYERROR_VERBOSE
244 # define YYERROR_VERBOSE 1
246 # define YYERROR_VERBOSE 0
249 /* Enabling the token table. */
250 #ifndef YYTOKEN_TABLE
251 # define YYTOKEN_TABLE 0
258 /* Put the tokens into the symbol table, so that GDB and other debuggers
302 tCONTEXTHANDLE
= 299,
303 tCONTEXTHANDLENOSERIALIZE
= 300,
304 tCONTEXTHANDLESERIALIZE
= 301,
310 tDEFAULTCOLLELEM
= 307,
312 tDEFAULTVTABLE
= 309,
313 tDISABLECONSISTENCYCHECK
= 310,
315 tDISPINTERFACE
= 312,
319 tENABLEALLOCATE
= 316,
325 tEXPLICITHANDLE
= 322,
331 tFORCEALLOCATE
= 328,
337 tHELPSTRINGCONTEXT
= 334,
338 tHELPSTRINGDLL
= 335,
345 tIMMEDIATEBIND
= 342,
346 tIMPLICITHANDLE
= 343,
370 tNONEXTENSIBLE
= 367,
376 tOLEAUTOMATION
= 373,
380 tPARTIALIGNORE
= 377,
382 tPOINTERDEFAULT
= 379,
408 tSTRICTCONTEXTHANDLE
= 405,
422 tUSESGETLASTERROR
= 419,
447 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
448 typedef union YYSTYPE
451 /* Line 214 of yacc.c */
455 attr_list_t
*attr_list
;
456 str_list_t
*str_list
;
458 expr_list_t
*expr_list
;
459 array_dims_t
*array_dims
;
462 var_list_t
*var_list
;
463 declarator_t
*declarator
;
464 declarator_list_t
*declarator_list
;
465 statement_t
*statement
;
466 statement_list_t
*stmt_list
;
468 ifref_list_t
*ifref_list
;
473 interface_info_t ifinfo
;
475 struct _import_t
*import
;
476 struct _decl_spec_t
*declspec
;
477 enum storage_class stgclass
;
481 /* Line 214 of yacc.c */
482 #line 483 "parser.tab.c"
484 # define YYSTYPE_IS_TRIVIAL 1
485 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
486 # define YYSTYPE_IS_DECLARED 1
490 /* Copy the second part of user declarations. */
493 /* Line 264 of yacc.c */
494 #line 495 "parser.tab.c"
501 typedef YYTYPE_UINT8 yytype_uint8
;
503 typedef unsigned char yytype_uint8
;
507 typedef YYTYPE_INT8 yytype_int8
;
508 #elif (defined __STDC__ || defined __C99__FUNC__ \
509 || defined __cplusplus || defined _MSC_VER)
510 typedef signed char yytype_int8
;
512 typedef short int yytype_int8
;
516 typedef YYTYPE_UINT16 yytype_uint16
;
518 typedef unsigned short int yytype_uint16
;
522 typedef YYTYPE_INT16 yytype_int16
;
524 typedef short int yytype_int16
;
528 # ifdef __SIZE_TYPE__
529 # define YYSIZE_T __SIZE_TYPE__
530 # elif defined size_t
531 # define YYSIZE_T size_t
532 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
533 || defined __cplusplus || defined _MSC_VER)
534 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
535 # define YYSIZE_T size_t
537 # define YYSIZE_T unsigned int
541 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
546 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
547 # define YY_(msgid) dgettext ("bison-runtime", msgid)
551 # define YY_(msgid) msgid
555 /* Suppress unused-variable warnings by "using" E. */
556 #if ! defined lint || defined __GNUC__
557 # define YYUSE(e) ((void) (e))
559 # define YYUSE(e) /* empty */
562 /* Identity function, used to suppress warnings about constant conditions. */
566 #if (defined __STDC__ || defined __C99__FUNC__ \
567 || defined __cplusplus || defined _MSC_VER)
580 #if ! defined yyoverflow || YYERROR_VERBOSE
582 /* The parser invokes alloca or malloc; define the necessary symbols. */
584 # ifdef YYSTACK_USE_ALLOCA
585 # if YYSTACK_USE_ALLOCA
587 # define YYSTACK_ALLOC __builtin_alloca
588 # elif defined __BUILTIN_VA_ARG_INCR
589 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
591 # define YYSTACK_ALLOC __alloca
592 # elif defined _MSC_VER
593 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
594 # define alloca _alloca
596 # define YYSTACK_ALLOC alloca
597 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
598 || defined __cplusplus || defined _MSC_VER)
599 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
608 # ifdef YYSTACK_ALLOC
609 /* Pacify GCC's `empty if-body' warning. */
610 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
611 # ifndef YYSTACK_ALLOC_MAXIMUM
612 /* The OS might guarantee only one guard page at the bottom of the stack,
613 and a page size can be as small as 4096 bytes. So we cannot safely
614 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
615 to allow for a few compiler-allocated temporary stack slots. */
616 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
619 # define YYSTACK_ALLOC YYMALLOC
620 # define YYSTACK_FREE YYFREE
621 # ifndef YYSTACK_ALLOC_MAXIMUM
622 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
624 # if (defined __cplusplus && ! defined _STDLIB_H \
625 && ! ((defined YYMALLOC || defined malloc) \
626 && (defined YYFREE || defined free)))
627 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
633 # define YYMALLOC malloc
634 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
635 || defined __cplusplus || defined _MSC_VER)
636 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
641 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
642 || defined __cplusplus || defined _MSC_VER)
643 void free (void *); /* INFRINGES ON USER NAME SPACE */
647 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
650 #if (! defined yyoverflow \
651 && (! defined __cplusplus \
652 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
654 /* A type that is properly aligned for any stack member. */
657 yytype_int16 yyss_alloc
;
661 /* The size of the maximum gap between one aligned stack and the next. */
662 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
664 /* The size of an array large to enough to hold all stacks, each with
666 # define YYSTACK_BYTES(N) \
667 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
668 + YYSTACK_GAP_MAXIMUM)
670 /* Copy COUNT objects from FROM to TO. The source and destination do
673 # if defined __GNUC__ && 1 < __GNUC__
674 # define YYCOPY(To, From, Count) \
675 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
677 # define YYCOPY(To, From, Count) \
681 for (yyi = 0; yyi < (Count); yyi++) \
682 (To)[yyi] = (From)[yyi]; \
688 /* Relocate STACK from its old location to the new one. The
689 local variables YYSIZE and YYSTACKSIZE give the old and new number of
690 elements in the stack, and YYPTR gives the new location of the
691 stack. Advance YYPTR to a properly aligned location for the next
693 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
696 YYSIZE_T yynewbytes; \
697 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
698 Stack = &yyptr->Stack_alloc; \
699 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
700 yyptr += yynewbytes / sizeof (*yyptr); \
706 /* YYFINAL -- State number of the termination state. */
708 /* YYLAST -- Last index in YYTABLE. */
711 /* YYNTOKENS -- Number of terminals. */
712 #define YYNTOKENS 208
713 /* YYNNTS -- Number of nonterminals. */
715 /* YYNRULES -- Number of rules. */
717 /* YYNRULES -- Number of states. */
718 #define YYNSTATES 655
720 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
722 #define YYMAXUTOK 438
724 #define YYTRANSLATE(YYX) \
725 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
727 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
728 static const yytype_uint8 yytranslate
[] =
730 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
733 2, 2, 2, 192, 2, 2, 2, 191, 184, 2,
734 203, 204, 189, 188, 179, 187, 199, 190, 2, 2,
735 2, 2, 2, 2, 2, 2, 2, 2, 181, 202,
736 185, 207, 186, 180, 2, 2, 2, 2, 2, 2,
737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
739 2, 200, 2, 201, 183, 2, 2, 2, 2, 2,
740 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
741 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
742 2, 2, 2, 205, 182, 206, 193, 2, 2, 2,
743 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
744 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
745 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
746 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
747 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
748 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
749 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
750 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
751 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
752 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
753 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
754 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
755 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
756 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
757 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
758 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
759 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
760 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
761 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
762 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
763 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
764 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
765 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
766 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
767 115, 116, 117, 118, 119, 120, 121, 122, 123, 124,
768 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
769 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
770 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
771 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
772 165, 166, 167, 168, 169, 170, 171, 172, 173, 174,
773 175, 176, 177, 178, 194, 195, 196, 197, 198
777 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
779 static const yytype_uint16 yyprhs
[] =
781 0, 0, 3, 5, 6, 9, 12, 16, 19, 22,
782 25, 28, 29, 32, 35, 39, 42, 45, 48, 51,
783 54, 55, 58, 59, 61, 63, 66, 69, 71, 74,
784 76, 78, 80, 83, 86, 89, 94, 98, 102, 108,
785 111, 115, 120, 121, 123, 125, 129, 131, 135, 139,
786 142, 146, 150, 151, 153, 157, 159, 163, 168, 170,
787 174, 175, 177, 182, 184, 186, 188, 190, 192, 197,
788 202, 204, 206, 208, 210, 212, 214, 216, 218, 220,
789 222, 227, 229, 231, 233, 238, 240, 242, 244, 249,
790 254, 256, 258, 260, 262, 267, 272, 277, 282, 287,
791 289, 294, 296, 298, 303, 305, 311, 313, 315, 320,
792 325, 327, 329, 331, 333, 335, 337, 339, 341, 343,
793 345, 347, 349, 351, 353, 358, 360, 362, 364, 369,
794 374, 376, 378, 380, 382, 384, 391, 393, 398, 400,
795 402, 404, 409, 411, 413, 415, 420, 425, 430, 435,
796 437, 439, 444, 449, 451, 453, 458, 463, 468, 470,
797 472, 474, 476, 478, 480, 482, 483, 486, 491, 495,
798 496, 499, 501, 503, 507, 511, 513, 519, 521, 525,
799 526, 528, 530, 532, 534, 536, 538, 540, 542, 544,
800 546, 548, 554, 558, 562, 566, 570, 574, 578, 582,
801 586, 590, 594, 598, 602, 606, 610, 614, 618, 622,
802 626, 629, 632, 635, 638, 641, 644, 648, 652, 658,
803 664, 669, 673, 675, 679, 681, 683, 684, 687, 692,
804 696, 699, 702, 703, 706, 709, 711, 715, 717, 721,
805 724, 725, 727, 728, 730, 732, 734, 736, 738, 740,
806 742, 745, 748, 750, 752, 754, 756, 758, 760, 761,
807 763, 765, 768, 770, 773, 776, 778, 780, 782, 785,
808 788, 791, 797, 798, 801, 804, 807, 810, 813, 816,
809 820, 823, 827, 833, 839, 840, 843, 846, 849, 852,
810 859, 868, 871, 874, 877, 880, 883, 886, 892, 894,
811 896, 898, 900, 902, 903, 906, 909, 913, 914, 916,
812 919, 922, 925, 929, 932, 934, 936, 940, 943, 948,
813 952, 955, 957, 961, 964, 965, 967, 971, 974, 976,
814 980, 985, 989, 992, 994, 998, 1001, 1002, 1004, 1006,
815 1010, 1013, 1015, 1019, 1024, 1026, 1030, 1031, 1034, 1037,
816 1039, 1043, 1045, 1049, 1051, 1053, 1055, 1057, 1059, 1061,
817 1063, 1065, 1071, 1073, 1075, 1077, 1079, 1082, 1084, 1087,
818 1089, 1092, 1097, 1102, 1108, 1119, 1121
821 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
822 static const yytype_int16 yyrhs
[] =
824 209, 0, -1, 210, -1, -1, 210, 275, -1, 210,
825 274, -1, 210, 261, 202, -1, 210, 263, -1, 210,
826 278, -1, 210, 222, -1, 210, 214, -1, -1, 211,
827 275, -1, 211, 274, -1, 211, 261, 202, -1, 211,
828 263, -1, 211, 278, -1, 211, 214, -1, 211, 219,
829 -1, 211, 222, -1, -1, 212, 214, -1, -1, 202,
830 -1, 216, -1, 215, 202, -1, 254, 202, -1, 218,
831 -1, 305, 202, -1, 240, -1, 303, -1, 306, -1,
832 229, 240, -1, 229, 303, -1, 229, 306, -1, 48,
833 203, 8, 204, -1, 89, 8, 202, -1, 217, 211,
834 12, -1, 90, 203, 8, 204, 213, -1, 101, 3,
835 -1, 229, 220, 205, -1, 221, 211, 206, 213, -1,
836 -1, 225, -1, 226, -1, 224, 179, 226, -1, 224,
837 -1, 224, 179, 22, -1, 229, 283, 294, -1, 283,
838 294, -1, 200, 242, 201, -1, 200, 189, 201, -1,
839 -1, 229, -1, 200, 230, 201, -1, 232, -1, 230,
840 179, 232, -1, 230, 201, 200, 232, -1, 8, -1,
841 231, 179, 8, -1, -1, 23, -1, 25, 203, 8,
842 204, -1, 26, -1, 27, -1, 29, -1, 30, -1,
843 32, -1, 35, 203, 257, 204, -1, 37, 203, 244,
844 204, -1, 41, -1, 42, -1, 44, -1, 45, -1,
845 46, -1, 47, -1, 49, -1, 50, -1, 51, -1,
846 52, -1, 53, 203, 246, 204, -1, 54, -1, 55,
847 -1, 56, -1, 58, 203, 8, 204, -1, 60, -1,
848 61, -1, 62, -1, 63, 203, 231, 204, -1, 64,
849 203, 246, 204, -1, 67, -1, 71, -1, 73, -1,
850 74, -1, 76, 203, 245, 204, -1, 77, 203, 8,
851 204, -1, 78, 203, 8, 204, -1, 79, 203, 245,
852 204, -1, 80, 203, 8, 204, -1, 81, -1, 83,
853 203, 245, 204, -1, 84, -1, 85, -1, 86, 203,
854 243, 204, -1, 87, -1, 88, 203, 75, 3, 204,
855 -1, 91, -1, 94, -1, 100, 203, 241, 204, -1,
856 99, 203, 245, 204, -1, 99, -1, 102, -1, 103,
857 -1, 105, -1, 106, -1, 109, -1, 110, -1, 111,
858 -1, 112, -1, 113, -1, 114, -1, 116, -1, 117,
859 -1, 118, -1, 119, 203, 8, 204, -1, 120, -1,
860 121, -1, 122, -1, 124, 203, 302, 204, -1, 125,
861 203, 8, 204, -1, 127, -1, 128, -1, 129, -1,
862 130, -1, 132, -1, 133, 203, 245, 179, 245, 204,
863 -1, 134, -1, 137, 203, 304, 204, -1, 138, -1,
864 139, -1, 140, -1, 144, 203, 241, 204, -1, 147,
865 -1, 150, -1, 151, -1, 154, 203, 243, 204, -1,
866 155, 203, 304, 204, -1, 157, 203, 304, 204, -1,
867 156, 203, 301, 204, -1, 160, -1, 164, -1, 165,
868 203, 304, 204, -1, 166, 203, 233, 204, -1, 167,
869 -1, 168, -1, 169, 203, 307, 204, -1, 170, 203,
870 8, 204, -1, 173, 203, 304, 204, -1, 302, -1,
871 11, -1, 8, -1, 38, -1, 70, -1, 123, -1,
872 149, -1, -1, 235, 236, -1, 37, 245, 181, 251,
873 -1, 50, 181, 251, -1, -1, 238, 179, -1, 238,
874 -1, 239, -1, 238, 179, 239, -1, 257, 207, 245,
875 -1, 257, -1, 65, 256, 205, 237, 206, -1, 242,
876 -1, 241, 179, 242, -1, -1, 243, -1, 5, -1,
877 6, -1, 7, -1, 69, -1, 115, -1, 158, -1,
878 8, -1, 9, -1, 10, -1, 3, -1, 243, 180,
879 243, 181, 243, -1, 243, 20, 243, -1, 243, 21,
880 243, -1, 243, 182, 243, -1, 243, 183, 243, -1,
881 243, 184, 243, -1, 243, 16, 243, -1, 243, 17,
882 243, -1, 243, 186, 243, -1, 243, 185, 243, -1,
883 243, 18, 243, -1, 243, 19, 243, -1, 243, 13,
884 243, -1, 243, 14, 243, -1, 243, 188, 243, -1,
885 243, 187, 243, -1, 243, 191, 243, -1, 243, 189,
886 243, -1, 243, 190, 243, -1, 192, 243, -1, 193,
887 243, -1, 188, 243, -1, 187, 243, -1, 184, 243,
888 -1, 189, 243, -1, 243, 15, 3, -1, 243, 199,
889 3, -1, 203, 283, 290, 204, 243, -1, 145, 203,
890 283, 290, 204, -1, 243, 200, 243, 201, -1, 203,
891 243, 204, -1, 245, -1, 244, 179, 245, -1, 243,
892 -1, 243, -1, -1, 247, 248, -1, 228, 283, 299,
893 202, -1, 228, 306, 202, -1, 252, 202, -1, 229,
894 202, -1, -1, 250, 249, -1, 252, 202, -1, 202,
895 -1, 228, 283, 286, -1, 254, -1, 229, 283, 300,
896 -1, 283, 300, -1, -1, 257, -1, -1, 3, -1,
897 4, -1, 3, -1, 4, -1, 33, -1, 172, -1,
898 260, -1, 143, 260, -1, 163, 260, -1, 163, -1,
899 72, -1, 59, -1, 31, -1, 66, -1, 75, -1,
900 -1, 95, -1, 95, -1, 142, 259, -1, 146, -1,
901 104, 259, -1, 82, 259, -1, 97, -1, 39, -1,
902 96, -1, 40, 3, -1, 40, 4, -1, 229, 261,
903 -1, 262, 205, 264, 206, 213, -1, -1, 264, 265,
904 -1, 228, 275, -1, 57, 3, -1, 57, 4, -1,
905 229, 266, -1, 126, 181, -1, 268, 252, 202, -1,
906 107, 181, -1, 269, 253, 202, -1, 267, 205, 268,
907 269, 206, -1, 267, 205, 272, 202, 206, -1, -1,
908 181, 4, -1, 98, 3, -1, 98, 4, -1, 229,
909 272, -1, 273, 271, 205, 212, 206, 213, -1, 273,
910 181, 3, 205, 218, 212, 206, 213, -1, 270, 213,
911 -1, 272, 202, -1, 266, 202, -1, 108, 3, -1,
912 108, 4, -1, 229, 276, -1, 277, 205, 212, 206,
913 213, -1, 68, -1, 148, -1, 136, -1, 93, -1,
914 43, -1, -1, 282, 281, -1, 304, 284, -1, 285,
915 304, 284, -1, -1, 285, -1, 281, 284, -1, 280,
916 284, -1, 279, 284, -1, 189, 282, 286, -1, 234,
917 286, -1, 287, -1, 257, -1, 203, 286, 204, -1,
918 287, 227, -1, 287, 203, 223, 204, -1, 189, 282,
919 290, -1, 234, 290, -1, 291, -1, 189, 282, 294,
920 -1, 234, 294, -1, -1, 288, -1, 203, 289, 204,
921 -1, 291, 227, -1, 227, -1, 203, 223, 204, -1,
922 291, 203, 223, 204, -1, 189, 282, 294, -1, 234,
923 294, -1, 295, -1, 189, 282, 294, -1, 234, 294,
924 -1, -1, 292, -1, 257, -1, 203, 293, 204, -1,
925 295, 227, -1, 227, -1, 203, 223, 204, -1, 295,
926 203, 223, 204, -1, 286, -1, 296, 179, 286, -1,
927 -1, 181, 246, -1, 292, 297, -1, 298, -1, 299,
928 179, 298, -1, 286, -1, 286, 207, 246, -1, 174,
929 -1, 175, -1, 176, -1, 177, -1, 178, -1, 135,
930 -1, 162, -1, 131, -1, 152, 256, 205, 247, 206,
931 -1, 171, -1, 4, -1, 258, -1, 240, -1, 65,
932 3, -1, 303, -1, 152, 3, -1, 306, -1, 161,
933 3, -1, 141, 203, 304, 204, -1, 159, 228, 283,
934 296, -1, 161, 256, 205, 250, 206, -1, 161, 256,
935 153, 203, 252, 204, 255, 205, 235, 206, -1, 5,
939 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
940 static const yytype_uint16 yyrline
[] =
942 0, 328, 328, 342, 343, 344, 345, 348, 351, 352,
943 353, 356, 357, 358, 359, 360, 363, 364, 365, 366,
944 369, 370, 373, 374, 378, 379, 380, 381, 382, 386,
945 387, 388, 389, 390, 391, 394, 396, 404, 410, 414,
946 416, 420, 427, 428, 431, 432, 435, 436, 440, 445,
947 452, 453, 456, 457, 461, 464, 465, 466, 469, 470,
948 473, 474, 475, 476, 477, 478, 479, 480, 481, 482,
949 483, 484, 485, 486, 487, 488, 489, 490, 491, 492,
950 493, 494, 495, 496, 497, 498, 499, 500, 501, 502,
951 503, 504, 505, 506, 507, 508, 509, 510, 511, 512,
952 513, 514, 515, 516, 517, 518, 519, 520, 521, 522,
953 523, 524, 525, 526, 527, 528, 529, 530, 531, 532,
954 533, 534, 535, 536, 537, 538, 539, 540, 541, 542,
955 543, 544, 545, 546, 547, 548, 552, 553, 554, 555,
956 556, 557, 558, 559, 560, 561, 562, 563, 564, 565,
957 566, 567, 568, 569, 570, 571, 572, 573, 574, 578,
958 579, 584, 585, 586, 587, 590, 591, 594, 598, 604,
959 605, 606, 609, 613, 622, 626, 631, 634, 635, 648,
960 649, 652, 653, 654, 655, 656, 657, 658, 659, 660,
961 661, 662, 663, 664, 665, 666, 667, 668, 669, 670,
962 671, 672, 673, 674, 675, 676, 677, 678, 679, 680,
963 681, 682, 683, 684, 685, 686, 687, 688, 689, 691,
964 693, 694, 697, 698, 701, 707, 713, 714, 717, 722,
965 729, 730, 733, 734, 738, 739, 742, 748, 756, 760,
966 765, 766, 769, 770, 771, 774, 776, 779, 780, 781,
967 782, 783, 784, 785, 786, 787, 788, 789, 792, 793,
968 796, 797, 798, 799, 800, 801, 802, 803, 806, 807,
969 815, 821, 825, 826, 830, 833, 834, 837, 846, 847,
970 850, 851, 854, 860, 866, 867, 870, 871, 874, 884,
971 891, 897, 901, 902, 905, 906, 909, 914, 921, 922,
972 923, 927, 931, 934, 935, 938, 939, 943, 944, 948,
973 949, 950, 954, 956, 958, 962, 963, 964, 965, 973,
974 975, 977, 982, 984, 989, 990, 995, 996, 997, 998,
975 1003, 1012, 1014, 1015, 1020, 1022, 1026, 1027, 1034, 1035,
976 1036, 1037, 1038, 1043, 1051, 1052, 1055, 1056, 1059, 1066,
977 1067, 1072, 1073, 1077, 1078, 1079, 1080, 1081, 1085, 1086,
978 1087, 1090, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100,
979 1101, 1102, 1105, 1111, 1113, 1119, 1120
983 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
984 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
985 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
986 static const char *const yytname
[] =
988 "$end", "error", "$undefined", "aIDENTIFIER", "aKNOWNTYPE", "aNUM",
989 "aHEXNUM", "aDOUBLE", "aSTRING", "aWSTRING", "aSQSTRING", "aUUID",
990 "aEOF", "SHL", "SHR", "MEMBERPTR", "EQUALITY", "INEQUALITY",
991 "GREATEREQUAL", "LESSEQUAL", "LOGICALOR", "LOGICALAND", "ELLIPSIS",
992 "tAGGREGATABLE", "tALLOCATE", "tANNOTATION", "tAPPOBJECT", "tASYNC",
993 "tASYNCUUID", "tAUTOHANDLE", "tBINDABLE", "tBOOLEAN", "tBROADCAST",
994 "tBYTE", "tBYTECOUNT", "tCALLAS", "tCALLBACK", "tCASE", "tCDECL",
995 "tCHAR", "tCOCLASS", "tCODE", "tCOMMSTATUS", "tCONST", "tCONTEXTHANDLE",
996 "tCONTEXTHANDLENOSERIALIZE", "tCONTEXTHANDLESERIALIZE", "tCONTROL",
997 "tCPPQUOTE", "tDECODE", "tDEFAULT", "tDEFAULTBIND", "tDEFAULTCOLLELEM",
998 "tDEFAULTVALUE", "tDEFAULTVTABLE", "tDISABLECONSISTENCYCHECK",
999 "tDISPLAYBIND", "tDISPINTERFACE", "tDLLNAME", "tDOUBLE", "tDUAL",
1000 "tENABLEALLOCATE", "tENCODE", "tENDPOINT", "tENTRY", "tENUM",
1001 "tERRORSTATUST", "tEXPLICITHANDLE", "tEXTERN", "tFALSE", "tFASTCALL",
1002 "tFAULTSTATUS", "tFLOAT", "tFORCEALLOCATE", "tHANDLE", "tHANDLET",
1003 "tHELPCONTEXT", "tHELPFILE", "tHELPSTRING", "tHELPSTRINGCONTEXT",
1004 "tHELPSTRINGDLL", "tHIDDEN", "tHYPER", "tID", "tIDEMPOTENT", "tIGNORE",
1005 "tIIDIS", "tIMMEDIATEBIND", "tIMPLICITHANDLE", "tIMPORT", "tIMPORTLIB",
1006 "tIN", "tIN_LINE", "tINLINE", "tINPUTSYNC", "tINT", "tINT3264", "tINT64",
1007 "tINTERFACE", "tLCID", "tLENGTHIS", "tLIBRARY", "tLICENSED", "tLOCAL",
1008 "tLONG", "tMAYBE", "tMESSAGE", "tMETHODS", "tMODULE", "tNOCODE",
1009 "tNONBROWSABLE", "tNONCREATABLE", "tNONEXTENSIBLE", "tNOTIFY",
1010 "tNOTIFYFLAG", "tNULL", "tOBJECT", "tODL", "tOLEAUTOMATION", "tOPTIMIZE",
1011 "tOPTIONAL", "tOUT", "tPARTIALIGNORE", "tPASCAL", "tPOINTERDEFAULT",
1012 "tPROGID", "tPROPERTIES", "tPROPGET", "tPROPPUT", "tPROPPUTREF",
1013 "tPROXY", "tPTR", "tPUBLIC", "tRANGE", "tREADONLY", "tREF", "tREGISTER",
1014 "tREPRESENTAS", "tREQUESTEDIT", "tRESTRICTED", "tRETVAL", "tSAFEARRAY",
1015 "tSHORT", "tSIGNED", "tSIZEIS", "tSIZEOF", "tSMALL", "tSOURCE",
1016 "tSTATIC", "tSTDCALL", "tSTRICTCONTEXTHANDLE", "tSTRING", "tSTRUCT",
1017 "tSWITCH", "tSWITCHIS", "tSWITCHTYPE", "tTHREADING", "tTRANSMITAS",
1018 "tTRUE", "tTYPEDEF", "tUIDEFAULT", "tUNION", "tUNIQUE", "tUNSIGNED",
1019 "tUSESGETLASTERROR", "tUSERMARSHAL", "tUUID", "tV1ENUM", "tVARARG",
1020 "tVERSION", "tVIPROGID", "tVOID", "tWCHAR", "tWIREMARSHAL", "tAPARTMENT",
1021 "tNEUTRAL", "tSINGLE", "tFREE", "tBOTH", "','", "'?'", "':'", "'|'",
1022 "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "'!'",
1023 "'~'", "ADDRESSOF", "NEG", "POS", "PPTR", "CAST", "'.'", "'['", "']'",
1024 "';'", "'('", "')'", "'{'", "'}'", "'='", "$accept", "input",
1025 "gbl_statements", "imp_statements", "int_statements", "semicolon_opt",
1026 "statement", "typedecl", "cppquote", "import_start", "import",
1027 "importlib", "libraryhdr", "library_start", "librarydef", "m_args",
1028 "arg_list", "args", "arg", "array", "m_attributes", "attributes",
1029 "attrib_list", "str_list", "attribute", "uuid_string", "callconv",
1030 "cases", "case", "enums", "enum_list", "enum", "enumdef", "m_exprs",
1031 "m_expr", "expr", "expr_list_int_const", "expr_int_const", "expr_const",
1032 "fields", "field", "ne_union_field", "ne_union_fields", "union_field",
1033 "s_field", "funcdef", "declaration", "m_ident", "t_ident", "ident",
1034 "base_type", "m_int", "int_std", "coclass", "coclasshdr", "coclassdef",
1035 "coclass_ints", "coclass_int", "dispinterface", "dispinterfacehdr",
1036 "dispint_props", "dispint_meths", "dispinterfacedef", "inherit",
1037 "interface", "interfacehdr", "interfacedef", "interfacedec", "module",
1038 "modulehdr", "moduledef", "storage_cls_spec", "function_specifier",
1039 "type_qualifier", "m_type_qual_list", "decl_spec", "m_decl_spec_no_type",
1040 "decl_spec_no_type", "declarator", "direct_declarator",
1041 "abstract_declarator", "abstract_declarator_no_direct",
1042 "m_abstract_declarator", "abstract_direct_declarator", "any_declarator",
1043 "any_declarator_no_direct", "m_any_declarator", "any_direct_declarator",
1044 "declarator_list", "m_bitfield", "struct_declarator",
1045 "struct_declarator_list", "init_declarator", "threading_type",
1046 "pointer_type", "structdef", "type", "typedef", "uniondef", "version", 0
1051 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
1053 static const yytype_uint16 yytoknum
[] =
1055 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1056 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1057 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1058 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1059 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
1060 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
1061 315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
1062 325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
1063 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
1064 345, 346, 347, 348, 349, 350, 351, 352, 353, 354,
1065 355, 356, 357, 358, 359, 360, 361, 362, 363, 364,
1066 365, 366, 367, 368, 369, 370, 371, 372, 373, 374,
1067 375, 376, 377, 378, 379, 380, 381, 382, 383, 384,
1068 385, 386, 387, 388, 389, 390, 391, 392, 393, 394,
1069 395, 396, 397, 398, 399, 400, 401, 402, 403, 404,
1070 405, 406, 407, 408, 409, 410, 411, 412, 413, 414,
1071 415, 416, 417, 418, 419, 420, 421, 422, 423, 424,
1072 425, 426, 427, 428, 429, 430, 431, 432, 433, 44,
1073 63, 58, 124, 94, 38, 60, 62, 45, 43, 42,
1074 47, 37, 33, 126, 434, 435, 436, 437, 438, 46,
1075 91, 93, 59, 40, 41, 123, 125, 61
1079 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1080 static const yytype_uint16 yyr1
[] =
1082 0, 208, 209, 210, 210, 210, 210, 210, 210, 210,
1083 210, 211, 211, 211, 211, 211, 211, 211, 211, 211,
1084 212, 212, 213, 213, 214, 214, 214, 214, 214, 215,
1085 215, 215, 215, 215, 215, 216, 217, 218, 219, 220,
1086 221, 222, 223, 223, 224, 224, 225, 225, 226, 226,
1087 227, 227, 228, 228, 229, 230, 230, 230, 231, 231,
1088 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1089 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1090 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1091 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1092 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1093 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1094 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1095 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1096 232, 232, 232, 232, 232, 232, 232, 232, 232, 232,
1097 232, 232, 232, 232, 232, 232, 232, 232, 232, 233,
1098 233, 234, 234, 234, 234, 235, 235, 236, 236, 237,
1099 237, 237, 238, 238, 239, 239, 240, 241, 241, 242,
1100 242, 243, 243, 243, 243, 243, 243, 243, 243, 243,
1101 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
1102 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
1103 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
1104 243, 243, 244, 244, 245, 246, 247, 247, 248, 248,
1105 249, 249, 250, 250, 251, 251, 252, 253, 254, 254,
1106 255, 255, 256, 256, 256, 257, 257, 258, 258, 258,
1107 258, 258, 258, 258, 258, 258, 258, 258, 259, 259,
1108 260, 260, 260, 260, 260, 260, 260, 260, 261, 261,
1109 262, 263, 264, 264, 265, 266, 266, 267, 268, 268,
1110 269, 269, 270, 270, 271, 271, 272, 272, 273, 274,
1111 274, 274, 275, 275, 276, 276, 277, 278, 279, 279,
1112 279, 280, 281, 282, 282, 283, 283, 284, 284, 285,
1113 285, 285, 286, 286, 286, 287, 287, 287, 287, 288,
1114 288, 288, 289, 289, 290, 290, 291, 291, 291, 291,
1115 291, 292, 292, 292, 293, 293, 294, 294, 295, 295,
1116 295, 295, 295, 295, 296, 296, 297, 297, 298, 299,
1117 299, 300, 300, 301, 301, 301, 301, 301, 302, 302,
1118 302, 303, 304, 304, 304, 304, 304, 304, 304, 304,
1119 304, 304, 305, 306, 306, 307, 307
1122 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
1123 static const yytype_uint8 yyr2
[] =
1125 0, 2, 1, 0, 2, 2, 3, 2, 2, 2,
1126 2, 0, 2, 2, 3, 2, 2, 2, 2, 2,
1127 0, 2, 0, 1, 1, 2, 2, 1, 2, 1,
1128 1, 1, 2, 2, 2, 4, 3, 3, 5, 2,
1129 3, 4, 0, 1, 1, 3, 1, 3, 3, 2,
1130 3, 3, 0, 1, 3, 1, 3, 4, 1, 3,
1131 0, 1, 4, 1, 1, 1, 1, 1, 4, 4,
1132 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1133 4, 1, 1, 1, 4, 1, 1, 1, 4, 4,
1134 1, 1, 1, 1, 4, 4, 4, 4, 4, 1,
1135 4, 1, 1, 4, 1, 5, 1, 1, 4, 4,
1136 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1137 1, 1, 1, 1, 4, 1, 1, 1, 4, 4,
1138 1, 1, 1, 1, 1, 6, 1, 4, 1, 1,
1139 1, 4, 1, 1, 1, 4, 4, 4, 4, 1,
1140 1, 4, 4, 1, 1, 4, 4, 4, 1, 1,
1141 1, 1, 1, 1, 1, 0, 2, 4, 3, 0,
1142 2, 1, 1, 3, 3, 1, 5, 1, 3, 0,
1143 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1144 1, 5, 3, 3, 3, 3, 3, 3, 3, 3,
1145 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1146 2, 2, 2, 2, 2, 2, 3, 3, 5, 5,
1147 4, 3, 1, 3, 1, 1, 0, 2, 4, 3,
1148 2, 2, 0, 2, 2, 1, 3, 1, 3, 2,
1149 0, 1, 0, 1, 1, 1, 1, 1, 1, 1,
1150 2, 2, 1, 1, 1, 1, 1, 1, 0, 1,
1151 1, 2, 1, 2, 2, 1, 1, 1, 2, 2,
1152 2, 5, 0, 2, 2, 2, 2, 2, 2, 3,
1153 2, 3, 5, 5, 0, 2, 2, 2, 2, 6,
1154 8, 2, 2, 2, 2, 2, 2, 5, 1, 1,
1155 1, 1, 1, 0, 2, 2, 3, 0, 1, 2,
1156 2, 2, 3, 2, 1, 1, 3, 2, 4, 3,
1157 2, 1, 3, 2, 0, 1, 3, 2, 1, 3,
1158 4, 3, 2, 1, 3, 2, 0, 1, 1, 3,
1159 2, 1, 3, 4, 1, 3, 0, 2, 2, 1,
1160 3, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1161 1, 5, 1, 1, 1, 1, 2, 1, 2, 1,
1162 2, 4, 4, 5, 10, 1, 3
1165 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
1166 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
1167 means the default is an error. */
1168 static const yytype_uint16 yydefact
[] =
1170 3, 0, 2, 1, 363, 255, 247, 266, 0, 302,
1171 0, 0, 254, 242, 256, 298, 253, 257, 258, 0,
1172 301, 260, 267, 265, 0, 258, 300, 0, 258, 0,
1173 262, 299, 242, 52, 242, 252, 362, 248, 60, 10,
1174 0, 24, 11, 27, 11, 9, 0, 365, 0, 364,
1175 249, 0, 0, 7, 0, 0, 22, 0, 284, 5,
1176 4, 0, 8, 307, 307, 307, 0, 0, 367, 307,
1177 0, 369, 268, 269, 0, 275, 276, 366, 244, 0,
1178 259, 264, 0, 286, 287, 263, 0, 261, 250, 368,
1179 0, 0, 53, 370, 0, 251, 61, 0, 63, 64,
1180 65, 66, 67, 0, 0, 70, 71, 72, 73, 74,
1181 75, 76, 77, 78, 79, 0, 81, 82, 83, 0,
1182 85, 86, 87, 0, 0, 90, 91, 92, 93, 0,
1183 0, 0, 0, 0, 99, 0, 101, 102, 0, 104,
1184 0, 106, 107, 110, 0, 111, 112, 113, 114, 115,
1185 116, 117, 118, 119, 120, 121, 122, 123, 0, 125,
1186 126, 127, 0, 0, 130, 131, 132, 133, 360, 134,
1187 0, 136, 358, 0, 138, 139, 140, 0, 142, 143,
1188 144, 0, 0, 0, 0, 149, 359, 150, 0, 0,
1189 153, 154, 0, 0, 0, 0, 55, 158, 25, 0,
1190 0, 0, 0, 0, 365, 270, 277, 288, 296, 0,
1191 367, 369, 26, 6, 272, 293, 0, 23, 291, 292,
1192 0, 0, 20, 311, 308, 310, 309, 245, 246, 161,
1193 162, 163, 164, 303, 0, 0, 315, 351, 314, 239,
1194 365, 367, 307, 369, 305, 28, 0, 169, 36, 0,
1195 226, 0, 0, 232, 0, 0, 0, 0, 0, 0,
1196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1197 179, 0, 0, 0, 0, 0, 179, 0, 0, 0,
1198 0, 0, 0, 0, 0, 0, 60, 54, 37, 0,
1199 17, 18, 19, 0, 15, 13, 12, 16, 22, 39,
1200 294, 295, 40, 238, 52, 0, 52, 0, 0, 285,
1201 20, 0, 0, 0, 313, 0, 179, 42, 317, 306,
1202 35, 0, 171, 172, 175, 371, 52, 344, 372, 52,
1203 52, 0, 0, 190, 181, 182, 183, 187, 188, 189,
1204 184, 185, 0, 186, 0, 0, 0, 0, 0, 0,
1205 0, 224, 0, 222, 225, 0, 0, 58, 0, 0,
1206 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1207 177, 180, 0, 0, 0, 0, 0, 0, 0, 0,
1208 353, 354, 355, 356, 357, 0, 0, 0, 160, 159,
1209 0, 375, 0, 0, 0, 56, 60, 0, 14, 41,
1210 22, 0, 273, 278, 0, 0, 0, 0, 0, 0,
1211 0, 22, 21, 0, 304, 312, 316, 352, 0, 0,
1212 0, 46, 43, 44, 0, 336, 176, 170, 0, 361,
1213 0, 227, 0, 0, 373, 53, 233, 0, 62, 68,
1214 0, 214, 213, 212, 215, 210, 211, 0, 324, 0,
1215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1217 0, 0, 69, 80, 84, 0, 88, 89, 94, 95,
1218 96, 97, 98, 100, 103, 0, 109, 179, 108, 124,
1219 128, 129, 0, 137, 141, 145, 146, 148, 147, 151,
1220 152, 0, 155, 156, 157, 57, 0, 271, 274, 280,
1221 0, 279, 282, 0, 0, 237, 283, 20, 22, 297,
1222 51, 50, 318, 0, 336, 303, 42, 341, 336, 338,
1223 337, 49, 333, 173, 174, 0, 369, 345, 240, 231,
1224 230, 324, 221, 303, 42, 328, 324, 325, 0, 321,
1225 203, 204, 216, 197, 198, 201, 202, 192, 193, 0,
1226 194, 195, 196, 200, 199, 206, 205, 208, 209, 207,
1227 217, 0, 223, 59, 105, 178, 0, 376, 22, 236,
1228 281, 0, 289, 47, 45, 48, 336, 303, 0, 336,
1229 0, 332, 42, 340, 346, 349, 0, 229, 0, 241,
1230 0, 324, 303, 0, 336, 0, 320, 0, 42, 327,
1231 0, 220, 135, 38, 22, 331, 336, 342, 335, 339,
1232 0, 0, 348, 0, 228, 165, 219, 319, 336, 329,
1233 323, 326, 218, 0, 191, 290, 334, 343, 347, 350,
1234 0, 322, 330, 0, 0, 374, 166, 0, 52, 52,
1235 235, 168, 0, 167, 234
1238 /* YYDEFGOTO[NTERM-NUM]. */
1239 static const yytype_int16 yydefgoto
[] =
1241 -1, 1, 2, 199, 311, 218, 412, 40, 41, 42,
1242 43, 291, 203, 44, 292, 420, 421, 422, 423, 527,
1243 405, 92, 195, 358, 196, 390, 528, 640, 646, 321,
1244 322, 323, 240, 369, 370, 351, 352, 353, 355, 326,
1245 431, 436, 330, 651, 652, 514, 48, 598, 79, 529,
1246 49, 81, 50, 293, 52, 294, 304, 402, 54, 55,
1247 306, 407, 56, 221, 57, 58, 295, 296, 208, 61,
1248 297, 63, 64, 65, 312, 66, 223, 67, 237, 238,
1249 547, 605, 548, 549, 530, 590, 531, 532, 328, 622,
1250 595, 596, 239, 385, 197, 241, 69, 70, 243, 392
1253 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1255 #define YYPACT_NINF -511
1256 static const yytype_int16 yypact
[] =
1258 -511, 65, 1251, -511, -511, -511, -511, -511, 54, -511,
1259 -131, 131, -511, 176, -511, -511, -511, -511, 21, 167,
1260 -511, -511, -511, -511, 223, 21, -511, -37, 21, 36,
1261 -511, -511, 228, -62, 238, 36, -511, -511, 2477, -511,
1262 -41, -511, -511, -511, -511, -511, 2161, -25, -21, -511,
1263 -511, -19, -18, -511, -17, -15, -9, -7, 29, -511,
1264 -511, 15, -511, -6, -6, -6, 428, 2327, 13, -6,
1265 22, 26, -511, -511, 229, -511, -511, 41, -511, 50,
1266 -511, -511, 71, -511, -511, -511, 2327, -511, -511, 41,
1267 70, 2233, -511, -115, -109, -511, -511, 82, -511, -511,
1268 -511, -511, -511, 85, 87, -511, -511, -511, -511, -511,
1269 -511, -511, -511, -511, -511, 91, -511, -511, -511, 93,
1270 -511, -511, -511, 95, 96, -511, -511, -511, -511, 97,
1271 98, 104, 109, 113, -511, 115, -511, -511, 117, -511,
1272 118, -511, -511, 121, 123, -511, -511, -511, -511, -511,
1273 -511, -511, -511, -511, -511, -511, -511, -511, 133, -511,
1274 -511, -511, 134, 136, -511, -511, -511, -511, -511, -511,
1275 137, -511, -511, 138, -511, -511, -511, 141, -511, -511,
1276 -511, 151, 152, 156, 159, -511, -511, -511, 160, 163,
1277 -511, -511, 165, 168, 169, -124, -511, -511, -511, 1124,
1278 466, 378, 240, 177, 183, -511, -511, -511, -511, 428,
1279 184, 185, -511, -511, -511, -511, -44, -511, -511, -511,
1280 247, 186, -511, -511, -511, -511, -511, -511, -511, -511,
1281 -511, -511, -511, -511, 428, 428, -511, 181, -130, -511,
1282 -511, -511, -6, -511, -511, -511, 188, 276, -511, 190,
1283 -511, 428, 192, -511, 388, 276, 324, 324, 389, 390,
1284 324, 324, 391, 393, 324, 394, 324, 324, 328, 324,
1285 324, 398, -86, 399, 324, 2327, 324, 324, 2327, 202,
1286 2327, 2327, 84, 404, 409, 2327, 2477, 218, -511, 217,
1287 -511, -511, -511, 219, -511, -511, -511, -511, -9, -511,
1288 -511, -511, -511, -511, -77, 241, -79, 222, 221, -511,
1289 -511, 580, 300, 224, -511, 324, 906, 1670, -511, -511,
1290 -511, 227, 248, -511, 230, -511, -59, -511, 250, -62,
1291 -42, 231, 232, -511, -511, -511, -511, -511, -511, -511,
1292 -511, -511, 235, -511, 324, 324, 324, 324, 324, 324,
1293 981, 1957, -126, -511, 1957, 236, 237, -511, -120, 239,
1294 242, 244, 246, 249, 251, 252, 1668, 431, 253, -111,
1295 -511, 1957, 254, 255, 256, 263, 258, -94, 1740, 259,
1296 -511, -511, -511, -511, -511, 260, 261, 264, -511, -511,
1297 267, 245, 268, 270, 273, -511, 2477, 443, -511, -511,
1298 -9, 9, -511, -511, 271, 2233, 265, 867, 272, 365,
1299 681, -9, -511, 2233, -511, -511, -511, -511, 94, 279,
1300 280, 306, -511, -511, 2233, 595, -511, 276, 324, -511,
1301 2233, -511, 428, 283, -511, 286, -511, 288, -511, -511,
1302 2233, 8, 8, 8, 8, 8, 8, 1765, 566, 324,
1303 324, 488, 324, 324, 324, 324, 324, 324, 324, 324,
1304 324, 324, 324, 324, 324, 324, 324, 324, 324, 489,
1305 324, 324, -511, -511, -511, 485, -511, -511, -511, -511,
1306 -511, -511, -511, -511, -511, 290, -511, 324, -511, -511,
1307 -511, -511, 324, -511, -511, -511, -511, -511, -511, -511,
1308 -511, 490, -511, -511, -511, -511, 292, -511, -511, -511,
1309 428, -511, -511, 2233, 298, -511, -511, -511, -9, -511,
1310 -511, -511, -511, 1576, 595, -511, 1378, -511, 595, -511,
1311 -511, -511, -95, -511, -511, 595, 299, -511, 276, -511,
1312 -511, 566, -511, -511, 1504, -511, 566, -511, 303, -64,
1313 158, 158, -511, 1047, 1047, 505, 505, 1811, 1919, 1882,
1314 1900, 1990, 1973, 505, 505, 161, 161, 8, 8, 8,
1315 -511, 1860, -511, -511, -511, -511, 311, -511, -9, -511,
1316 -511, 795, -511, -511, -511, -511, 153, -511, 318, 595,
1317 322, -511, 1670, -511, 321, -511, -123, -511, 305, -511,
1318 325, 45, -511, 326, 595, 329, -511, 324, 1670, -511,
1319 324, -511, -511, -511, -9, -511, 153, -511, -511, -511,
1320 331, 324, -511, 595, -511, -511, -511, -511, 153, -511,
1321 -511, -511, 8, 333, 1957, -511, -511, -511, -511, -511,
1322 10, -511, -511, 324, 347, -511, -511, 358, -76, -76,
1323 -511, -511, 338, -511, -511
1326 /* YYPGOTO[NTERM-NUM]. */
1327 static const yytype_int16 yypgoto
[] =
1329 -511, -511, -511, 499, -292, -289, 19, -511, -511, -511,
1330 135, -511, -511, -511, 543, -494, -511, -511, 23, -227,
1331 -20, -2, -511, -511, -259, -511, -65, -511, -511, -511,
1332 -511, 120, 2, 274, -276, -196, -511, -254, -246, -511,
1333 -511, -511, -511, -100, -217, -511, 146, -511, 128, -63,
1334 -511, 81, 130, 40, -511, 552, -511, -511, 511, -511,
1335 -511, -511, -511, -511, -3, -511, 556, 3, -511, -511,
1336 558, -511, -511, -293, -398, -40, -30, -39, -218, -511,
1337 -511, -511, -510, -511, -506, -511, -461, -511, -511, -511,
1338 -58, -511, 357, -511, 295, 6, -45, -511, 0, -511
1341 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
1342 positive, shift that token. If negative, reduce the rule which
1343 number is the opposite. If zero, do what YYDEFACT says.
1344 If YYTABLE_NINF, syntax error. */
1345 #define YYTABLE_NINF -244
1346 static const yytype_int16 yytable
[] =
1348 46, 235, 71, 236, 47, 60, 209, 360, 68, 399,
1349 363, 318, 365, 91, 359, 368, 313, 314, 410, 414,
1350 375, 39, 242, 451, 224, 224, 224, 395, 404, 594,
1351 224, 600, 588, 327, 225, 226, 606, 9, -243, 244,
1352 419, 249, 51, 207, 252, 168, 211, 643, 204, 172,
1353 603, 251, 210, 471, 24, 286, 623, 72, 73, 475,
1354 644, 354, 15, 585, 354, 3, 11, 591, 487, 417,
1355 316, 366, 74, 317, 371, 7, 186, 287, 472, 624,
1356 371, 378, 305, 229, 476, 487, 205, 20, 9, 406,
1357 -243, 627, 388, 488, 415, 389, 253, 333, 620, 334,
1358 335, 336, 337, 338, 339, 316, 85, 24, 592, 87,
1359 494, 507, 433, 437, 633, 230, 80, 594, 18, 354,
1360 371, 38, 519, 38, 38, 615, 650, 586, 618, 400,
1361 26, 21, 22, 23, 75, 76, 316, 505, 38, 608,
1362 25, 38, 31, 630, 235, 601, 236, 429, 441, 442,
1363 443, 444, 445, 446, 447, 636, 227, 228, 38, 88,
1364 90, 198, 94, 340, 434, 95, 86, 641, 231, 235,
1365 235, 236, 236, 451, 534, 82, 451, -29, 28, 77,
1366 78, 212, 30, 213, 324, 215, 235, 214, 236, 616,
1367 216, 229, 332, 217, 232, 219, 9, 46, 46, 71,
1368 71, 47, 47, 224, 628, 68, 68, 469, 470, 341,
1369 220, 575, 319, 307, 537, -30, 645, 572, 290, 290,
1370 222, 545, 444, 230, 245, 581, 83, 84, -31, 582,
1371 376, 89, 78, 379, 543, 386, 387, 246, 576, 342,
1372 394, 93, 78, 300, 301, 316, -243, 235, 544, 236,
1373 308, 309, 343, 550, 551, 247, 553, 554, 555, 556,
1374 557, 558, 559, 560, 561, 562, 563, 564, 565, 566,
1375 567, 568, 569, 248, 571, 250, 231, 425, 344, 227,
1376 228, 345, 346, 347, 401, 254, 348, 349, 255, 613,
1377 256, 371, 579, 414, 257, 520, 258, 350, 259, 260,
1378 261, 262, 232, 227, 228, 593, 430, 263, 414, 413,
1379 448, 71, 264, 47, 545, 424, 265, 68, 266, 545,
1380 267, 268, 609, 414, 269, 635, 270, 333, 435, 334,
1381 335, 336, 337, 338, 339, 414, 271, 272, 229, 273,
1382 274, 275, 525, 9, 276, 464, 465, 466, 467, 468,
1383 466, 467, 468, 316, 277, 278, 526, 469, 470, 279,
1384 469, 470, 280, 281, 324, 510, 282, 235, 283, 236,
1385 230, 284, 285, 209, 545, 638, 380, 381, 382, 383,
1386 384, 299, 302, 546, 524, -32, -33, -34, 315, 647,
1387 535, 310, 320, 340, 325, 329, 331, 356, 357, 361,
1388 541, 362, 364, 367, 508, 513, 372, 374, 413, 391,
1389 71, 632, 47, 211, 634, 204, 68, 393, 396, 210,
1390 397, 398, 403, 231, 408, 354, 409, 427, 416, 432,
1391 536, 227, 228, 426, 485, 438, 439, 428, 440, 341,
1392 473, 474, 492, 477, 501, 235, 478, 236, 479, 232,
1393 480, 506, 509, 481, 19, 482, 483, 486, 489, 490,
1394 491, 589, 493, 496, 497, 498, 229, 511, 499, 342,
1395 4, 500, 502, 209, 503, 599, 546, 504, 516, 604,
1396 521, 546, 343, 425, 522, 523, 425, 538, 539, 233,
1397 540, 552, 570, 573, 574, 577, 578, 5, 230, 6,
1398 580, 597, 621, 234, 425, 7, 8, 607, 344, 9,
1399 625, 345, 346, 347, 10, 612, 348, 349, 449, 450,
1400 451, 424, 617, 11, 424, 12, 619, 350, 648, 626,
1401 629, 13, 14, 631, 15, 637, 546, 642, 16, 649,
1402 654, 17, 424, 200, 517, 45, 584, 533, 18, 653,
1403 377, 231, 425, 515, 53, 19, 289, 206, 59, 20,
1404 62, 21, 22, 23, 24, 639, 303, 373, 425, 0,
1405 25, 0, 0, 0, 0, 0, 0, 232, 0, 413,
1406 0, 71, 0, 47, 4, 0, 0, 68, 0, 0,
1407 424, 0, 0, 0, 0, 0, 0, 0, 227, 228,
1408 0, 0, 26, 0, 229, 0, 424, 27, 28, 29,
1409 0, 5, 30, 6, 31, 0, 0, 233, 32, 7,
1410 0, 0, 0, 9, 0, 33, 0, 34, 10, 35,
1411 0, 234, 0, 229, 0, 0, 230, 36, 37, 12,
1412 0, 0, 0, 0, 0, 13, 14, 0, 15, 0,
1413 0, 0, 16, 0, 0, 17, 0, 0, 0, 0,
1414 0, 0, 18, 0, 0, 230, 38, 0, 0, 19,
1415 0, 0, 298, 20, 0, 21, 22, 23, 0, 0,
1416 0, 0, 0, 0, 25, 4, 0, 0, 0, 231,
1417 0, 0, 464, 465, 466, 467, 468, 0, 0, 0,
1418 0, 0, 0, 0, 469, 470, 0, 0, 0, 0,
1419 0, 0, 5, 0, 6, 232, 26, 0, 231, 0,
1420 7, 27, 28, 29, 9, 0, 30, 0, 31, 10,
1421 0, 0, 32, 0, 0, 0, 0, 0, 0, 33,
1422 12, 34, 0, 35, 232, 0, 13, 14, 0, 15,
1423 0, 36, 37, 16, 0, 543, 17, 0, 0, 0,
1424 0, 0, 0, 18, 0, 0, 316, 0, 0, 544,
1425 19, 0, 0, 0, 20, 0, 21, 22, 23, 0,
1426 38, 0, 0, 0, 525, 25, 411, 0, 0, 0,
1427 0, 0, 0, 0, 0, 316, 0, 0, 526, 4,
1428 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1429 0, 0, 0, 0, 0, 0, 0, 26, 0, 0,
1430 0, 0, 27, 28, 29, 0, 5, 30, 6, 31,
1431 0, 0, 0, 32, 7, 0, 0, 0, 9, 0,
1432 33, 0, 34, 10, 35, 0, 0, 0, 0, 0,
1433 0, 0, 36, 37, 12, 0, 0, 0, 0, 0,
1434 13, 14, 0, 15, 0, 0, 0, 16, 0, 0,
1435 17, 4, 0, 0, 0, 0, 0, 18, 0, 0,
1436 0, 38, 0, 0, 19, 0, 0, 518, 20, 0,
1437 21, 22, 23, 0, 0, 0, 0, 0, 5, 25,
1438 6, 0, 0, 0, 0, 0, 7, 0, 0, 333,
1439 9, 334, 335, 336, 337, 338, 339, 0, 0, 0,
1440 0, 0, 0, 0, 0, 0, 12, 0, 0, 0,
1441 0, 26, 13, 14, 0, 15, 27, 28, 29, 16,
1442 0, 30, 17, 31, 0, 0, 0, 32, 0, 18,
1443 0, 0, 0, 0, 33, 0, 34, 0, 35, 0,
1444 20, 0, 21, 22, 23, 0, 36, 37, 0, 0,
1445 0, 25, 0, 0, 0, 340, 0, 0, 0, 0,
1446 0, 0, 0, 0, 333, 4, 334, 335, 336, 337,
1447 338, 339, 0, 0, 0, 38, 0, 0, 0, 0,
1448 0, 614, 0, 26, 0, 0, 0, 0, 27, 28,
1449 29, 0, 5, 30, 6, 31, 0, 0, 0, 32,
1450 7, 341, 0, 0, 9, 0, 0, 0, 34, 0,
1451 35, 0, 0, 0, 0, 0, 0, 0, 36, 37,
1452 12, 0, 0, 0, 0, 0, 13, 14, 0, 15,
1453 340, 342, 0, 16, 0, 0, 17, 0, 0, 0,
1454 449, 450, 451, 18, 343, 454, 455, 38, 0, 0,
1455 0, 0, 0, 512, 20, 0, 21, 22, 23, 0,
1456 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,
1457 344, 0, 0, 345, 346, 418, 341, 0, 348, 349,
1458 0, 0, 0, 0, 0, 0, 0, 0, 0, 350,
1459 0, 0, 0, 0, 0, 0, 0, 26, 0, 0,
1460 0, 0, 27, 28, 29, 0, 342, 30, 4, 31,
1461 0, 0, 0, 32, 0, 0, 288, 0, 0, 343,
1462 0, 0, 34, 0, 35, 0, 0, 0, 0, 0,
1463 0, 0, 36, 37, 0, 5, 0, 6, 0, 0,
1464 0, 0, 0, 7, 8, 344, 0, 9, 345, 346,
1465 347, 0, 10, 348, 349, 0, 0, 0, 0, 0,
1466 0, 11, 0, 12, 350, 0, 0, 0, 0, 13,
1467 14, 0, 15, 0, 0, 0, 16, 0, 0, 17,
1468 0, 0, 0, 0, 0, 0, 18, 0, 0, 0,
1469 0, 0, 0, 19, 289, 0, 0, 20, 0, 21,
1470 22, 23, 24, 0, 0, 0, 0, 0, 25, 0,
1471 0, 0, 462, 463, 464, 465, 466, 467, 468, 0,
1472 0, 0, 0, 0, 0, 0, 469, 470, 0, 0,
1473 0, 0, 0, 0, 0, 4, 0, 0, 0, 0,
1474 26, 0, 0, 0, 0, 27, 28, 29, 0, 0,
1475 30, 0, 31, 0, 0, 0, 32, 0, 0, 0,
1476 0, 0, 5, 33, 6, 34, 0, 35, 0, 0,
1477 7, 8, 0, 0, 9, 36, 37, 0, 0, 10,
1478 0, 0, 0, 0, 0, 0, 0, 0, 11, 0,
1479 12, 0, 0, 0, 0, 0, 13, 14, 0, 15,
1480 0, 0, 0, 16, 38, 0, 17, 0, 0, 0,
1481 0, 0, 0, 18, 0, 0, 0, 0, 0, 0,
1482 19, 0, 0, 0, 20, 0, 21, 22, 23, 24,
1483 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,
1484 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1485 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1486 0, 0, 4, 0, 0, 0, 0, 26, 0, 0,
1487 0, 0, 27, 28, 29, 0, 0, 30, 0, 31,
1488 0, 0, 0, 32, 0, 0, 0, 0, 0, 5,
1489 33, 6, 34, 0, 35, 0, 229, 7, 0, 0,
1490 0, 9, 36, 37, 0, 0, 0, 0, 0, 0,
1491 0, 0, 0, 0, 0, 0, 0, 12, 0, 0,
1492 0, 0, 0, 13, 14, 0, 15, 0, 230, 0,
1493 16, 38, 0, 17, 0, 0, 0, 0, 0, 0,
1494 18, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1495 0, 20, 0, 21, 22, 23, 0, 0, 0, 0,
1496 0, 0, 25, 0, 0, 0, 0, 0, 0, 0,
1497 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1498 0, 231, 0, 0, 0, 0, 0, 0, 4, 0,
1499 0, 0, 0, 0, 26, 0, 0, 0, 0, 27,
1500 28, 29, 0, 0, 30, 0, 31, 232, 0, 0,
1501 32, 0, 0, 0, 0, 5, 0, 6, 0, 34,
1502 0, 35, 229, 7, 0, 0, 0, 9, 0, 36,
1503 37, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1504 0, 0, 0, 12, 0, 0, 0, 587, 0, 13,
1505 14, 0, 15, 0, 230, 0, 16, 0, 38, 17,
1506 4, 0, 0, 0, 0, 0, 18, 0, 0, 0,
1507 0, 0, 0, 0, 0, 0, 0, 20, 583, 21,
1508 22, 23, 0, 0, 0, 0, 0, 5, 25, 6,
1509 0, 0, 0, 0, 0, 7, 0, 0, 0, 9,
1510 0, 0, 0, 0, 0, 0, 0, 231, 0, 0,
1511 0, 0, 0, 0, 0, 12, 0, 0, 0, 0,
1512 26, 13, 14, 0, 15, 27, 28, 29, 16, 0,
1513 30, 17, 31, 232, 0, 0, 32, 0, 18, 0,
1514 0, 0, 0, 0, 0, 34, 0, 35, 0, 20,
1515 0, 21, 22, 23, 4, 36, 37, 0, 0, 0,
1516 25, 449, 450, 451, 452, 453, 454, 455, 456, 457,
1517 0, 0, 0, 602, 0, 0, 0, 0, 0, 0,
1518 0, 5, 0, 6, 38, 0, 0, 0, 0, 7,
1519 0, 0, 26, 9, 0, 0, 0, 27, 28, 29,
1520 0, 0, 30, 0, 31, 0, 0, 0, 32, 12,
1521 0, 0, 0, 0, 0, 13, 14, 34, 15, 35,
1522 0, 0, 16, 0, 0, 17, 0, 36, 37, 0,
1523 0, 0, 18, 449, 450, 451, 452, 453, 454, 455,
1524 456, 457, 0, 20, 0, 21, 22, 23, 0, 0,
1525 0, 0, 0, 0, 25, 0, 38, 0, 449, 450,
1526 451, 452, 453, 454, 455, 456, 457, 0, 0, 0,
1527 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1528 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,
1529 0, 27, 28, 29, 0, 0, 30, 0, 31, 0,
1530 0, 0, 32, 0, 449, 450, 451, 452, 453, 454,
1531 455, 34, 457, 35, 0, 0, 0, 0, 0, 0,
1532 0, 36, 37, 0, 0, 0, 0, 0, 458, 0,
1533 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
1534 0, 0, 0, 0, 0, 0, 0, 469, 470, 0,
1535 38, 0, 484, 449, 450, 451, 452, 453, 454, 455,
1536 456, 457, 0, 0, 0, 0, 0, 0, 0, 0,
1537 0, 0, 0, 0, 0, 449, 450, 451, 452, 453,
1538 454, 455, 456, 457, 0, 0, 0, 0, 0, 0,
1539 0, 0, 0, 449, 450, 451, 452, 453, 454, 455,
1540 458, 0, 459, 460, 461, 462, 463, 464, 465, 466,
1541 467, 468, 449, 450, 451, 452, 453, 454, 455, 469,
1542 470, 0, 0, 0, 495, 458, 0, 459, 460, 461,
1543 462, 463, 464, 465, 466, 467, 468, 0, 0, 0,
1544 0, 0, 0, 0, 469, 470, 0, 0, 0, 542,
1545 449, 450, 451, 452, 453, 454, 455, 456, 457, 0,
1546 0, 0, 0, 0, 0, 0, 449, 450, 451, 452,
1547 453, 454, 455, 459, 460, 461, 462, 463, 464, 465,
1548 466, 467, 468, 449, 450, 451, 452, 453, 454, 455,
1549 469, 470, 0, 0, 0, 0, 0, 0, 0, 0,
1550 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1551 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1552 458, 0, 459, 460, 461, 462, 463, 464, 465, 466,
1553 467, 468, 0, 0, 0, 0, 0, 0, 0, 469,
1554 470, 611, 458, 610, 459, 460, 461, 462, 463, 464,
1555 465, 466, 467, 468, 0, 0, 0, 0, 0, 0,
1556 0, 469, 470, 460, 461, 462, 463, 464, 465, 466,
1557 467, 468, 0, 0, 0, 0, 0, 0, 0, 469,
1558 470, 459, 460, 461, 462, 463, 464, 465, 466, 467,
1559 468, 0, 0, 0, 0, 0, 0, 0, 469, 470,
1560 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1561 0, 0, 0, 0, 0, 0, 0, 458, 0, 459,
1562 460, 461, 462, 463, 464, 465, 466, 467, 468, 0,
1563 0, 0, 0, 0, 0, 0, 469, 470, 462, 463,
1564 464, 465, 466, 467, 468, 4, 0, 0, 0, 0,
1565 0, 0, 469, 470, 461, 462, 463, 464, 465, 466,
1566 467, 468, 0, 0, 0, 0, 0, 0, 0, 469,
1567 470, 0, 5, 0, 6, 0, 0, 0, 0, 0,
1568 7, 8, 0, 0, 9, 0, 0, 0, 0, 0,
1569 0, 0, 0, 0, 0, 0, 0, 0, 11, 0,
1570 12, 0, 0, 0, 0, 0, 13, 14, 0, 15,
1571 0, 0, 0, 16, 0, 0, 17, 4, 0, 0,
1572 0, 0, 0, 18, 0, 0, 0, 0, 0, 0,
1573 0, 0, 0, 0, 20, 0, 21, 22, 23, 24,
1574 0, 0, 201, 0, 5, 25, 6, 0, 0, 202,
1575 0, 0, 7, 0, 0, 0, 9, 0, 0, 0,
1576 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1577 0, 0, 12, 0, 0, 0, 0, 26, 13, 14,
1578 0, 15, 27, 28, 29, 16, 0, 30, 17, 31,
1579 0, 0, 0, 32, 0, 18, 0, 0, 0, 0,
1580 0, 0, 34, 0, 35, 0, 20, 0, 21, 22,
1581 23, 4, 36, 37, 0, 0, 0, 25, 0, 0,
1582 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1583 0, 0, 0, 0, 0, 0, 0, 0, 5, 0,
1584 6, 0, 0, 0, 0, 0, 7, 0, 0, 26,
1585 0, 0, 0, 0, 27, 28, 29, 0, 0, 30,
1586 0, 31, 0, 0, 0, 32, 12, 0, 0, 0,
1587 0, 0, 13, 14, 34, 0, 35, 0, 0, 16,
1588 0, 0, 17, 0, 36, 37, 0, 0, 0, 18,
1589 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1590 0, 0, 21, 22, 23, 0, 0, 0, 0, 0,
1591 0, 25, 0, 0, 0, 0, 0, 0, 0, 0,
1592 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1593 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1594 0, 0, 0, 0, 0, 0, 0, 0, 27, 28,
1595 29, 0, 0, 30, 0, 0, 0, 0, 0, 32,
1596 0, 0, 0, 0, 0, 0, 0, 0, 34, 0,
1597 35, 0, 0, 0, 0, 0, 0, 0, 36, 37,
1598 96, 0, 97, 98, 99, 0, 100, 101, 0, 102,
1599 0, 0, 103, 0, 104, 0, 0, 0, 105, 106,
1600 0, 107, 108, 109, 110, 0, 111, 112, 113, 114,
1601 115, 116, 117, 118, 0, 119, 0, 120, 121, 122,
1602 123, 124, 0, 0, 125, 0, 0, 0, 126, 0,
1603 127, 128, 0, 129, 130, 131, 132, 133, 134, 0,
1604 135, 136, 137, 138, 139, 140, 0, 0, 141, 0,
1605 0, 142, 0, 0, 0, 0, 143, 144, 0, 145,
1606 146, 0, 147, 148, 0, 0, 149, 150, 151, 152,
1607 153, 154, 0, 155, 156, 157, 158, 159, 160, 161,
1608 0, 162, 163, 0, 164, 165, 166, 167, 168, 169,
1609 170, 171, 172, 0, 173, 174, 175, 176, 0, 0,
1610 0, 177, 0, 0, 178, 0, 0, 179, 180, 0,
1611 0, 181, 182, 183, 184, 0, 0, 185, 0, 186,
1612 0, 187, 188, 189, 190, 191, 192, 193, 0, 0,
1616 static const yytype_int16 yycheck
[] =
1618 2, 66, 2, 66, 2, 2, 46, 261, 2, 298,
1619 264, 238, 266, 33, 260, 269, 234, 235, 310, 312,
1620 274, 2, 67, 15, 63, 64, 65, 286, 107, 535,
1621 69, 541, 526, 251, 64, 65, 546, 43, 153, 69,
1622 316, 86, 2, 46, 153, 131, 46, 37, 46, 135,
1623 544, 91, 46, 179, 98, 179, 179, 3, 4, 179,
1624 50, 257, 68, 524, 260, 0, 57, 528, 179, 315,
1625 200, 267, 203, 203, 270, 39, 162, 201, 204, 202,
1626 276, 277, 126, 38, 204, 179, 46, 93, 43, 306,
1627 205, 601, 8, 204, 312, 11, 205, 3, 592, 5,
1628 6, 7, 8, 9, 10, 200, 25, 98, 203, 28,
1629 204, 400, 329, 330, 608, 70, 95, 623, 82, 315,
1630 316, 200, 411, 200, 200, 586, 202, 525, 589, 206,
1631 136, 95, 96, 97, 3, 4, 200, 396, 200, 203,
1632 104, 200, 148, 604, 209, 543, 209, 206, 344, 345,
1633 346, 347, 348, 349, 350, 616, 3, 4, 200, 29,
1634 32, 202, 34, 69, 206, 35, 203, 628, 123, 234,
1635 235, 234, 235, 15, 428, 8, 15, 202, 142, 3,
1636 4, 202, 146, 202, 247, 202, 251, 205, 251, 587,
1637 205, 38, 255, 202, 149, 202, 43, 199, 200, 199,
1638 200, 199, 200, 242, 602, 199, 200, 199, 200, 115,
1639 181, 487, 242, 216, 432, 202, 206, 471, 199, 200,
1640 205, 448, 418, 70, 202, 517, 3, 4, 202, 518,
1641 275, 3, 4, 278, 189, 280, 281, 8, 492, 145,
1642 285, 3, 4, 3, 4, 200, 205, 312, 203, 312,
1643 3, 4, 158, 449, 450, 205, 452, 453, 454, 455,
1644 456, 457, 458, 459, 460, 461, 462, 463, 464, 465,
1645 466, 467, 468, 202, 470, 205, 123, 317, 184, 3,
1646 4, 187, 188, 189, 304, 203, 192, 193, 203, 578,
1647 203, 487, 510, 586, 203, 201, 203, 203, 203, 203,
1648 203, 203, 149, 3, 4, 532, 326, 203, 601, 311,
1649 350, 311, 203, 311, 541, 317, 203, 311, 203, 546,
1650 203, 203, 549, 616, 203, 614, 203, 3, 330, 5,
1651 6, 7, 8, 9, 10, 628, 203, 203, 38, 203,
1652 203, 203, 189, 43, 203, 187, 188, 189, 190, 191,
1653 189, 190, 191, 200, 203, 203, 203, 199, 200, 203,
1654 199, 200, 203, 203, 427, 405, 203, 432, 203, 432,
1655 70, 203, 203, 413, 601, 621, 174, 175, 176, 177,
1656 178, 3, 205, 448, 424, 202, 202, 202, 207, 643,
1657 430, 205, 204, 69, 204, 203, 8, 8, 8, 8,
1658 440, 8, 8, 75, 401, 407, 8, 8, 410, 5,
1659 410, 607, 410, 413, 610, 413, 410, 8, 200, 413,
1660 203, 202, 181, 123, 202, 621, 205, 179, 204, 179,
1661 430, 3, 4, 206, 3, 204, 204, 207, 203, 115,
1662 204, 204, 179, 204, 199, 510, 204, 510, 204, 149,
1663 204, 8, 181, 204, 89, 204, 204, 204, 204, 204,
1664 204, 526, 204, 204, 204, 204, 38, 202, 204, 145,
1665 4, 204, 204, 513, 204, 538, 541, 204, 206, 544,
1666 201, 546, 158, 523, 204, 179, 526, 204, 202, 189,
1667 202, 3, 3, 8, 204, 5, 204, 31, 70, 33,
1668 202, 202, 181, 203, 544, 39, 40, 204, 184, 43,
1669 205, 187, 188, 189, 48, 204, 192, 193, 13, 14,
1670 15, 523, 204, 57, 526, 59, 204, 203, 181, 204,
1671 204, 65, 66, 204, 68, 204, 601, 204, 72, 181,
1672 202, 75, 544, 44, 409, 2, 523, 427, 82, 649,
1673 276, 123, 592, 407, 2, 89, 90, 46, 2, 93,
1674 2, 95, 96, 97, 98, 623, 209, 272, 608, -1,
1675 104, -1, -1, -1, -1, -1, -1, 149, -1, 581,
1676 -1, 581, -1, 581, 4, -1, -1, 581, -1, -1,
1677 592, -1, -1, -1, -1, -1, -1, -1, 3, 4,
1678 -1, -1, 136, -1, 38, -1, 608, 141, 142, 143,
1679 -1, 31, 146, 33, 148, -1, -1, 189, 152, 39,
1680 -1, -1, -1, 43, -1, 159, -1, 161, 48, 163,
1681 -1, 203, -1, 38, -1, -1, 70, 171, 172, 59,
1682 -1, -1, -1, -1, -1, 65, 66, -1, 68, -1,
1683 -1, -1, 72, -1, -1, 75, -1, -1, -1, -1,
1684 -1, -1, 82, -1, -1, 70, 200, -1, -1, 89,
1685 -1, -1, 206, 93, -1, 95, 96, 97, -1, -1,
1686 -1, -1, -1, -1, 104, 4, -1, -1, -1, 123,
1687 -1, -1, 187, 188, 189, 190, 191, -1, -1, -1,
1688 -1, -1, -1, -1, 199, 200, -1, -1, -1, -1,
1689 -1, -1, 31, -1, 33, 149, 136, -1, 123, -1,
1690 39, 141, 142, 143, 43, -1, 146, -1, 148, 48,
1691 -1, -1, 152, -1, -1, -1, -1, -1, -1, 159,
1692 59, 161, -1, 163, 149, -1, 65, 66, -1, 68,
1693 -1, 171, 172, 72, -1, 189, 75, -1, -1, -1,
1694 -1, -1, -1, 82, -1, -1, 200, -1, -1, 203,
1695 89, -1, -1, -1, 93, -1, 95, 96, 97, -1,
1696 200, -1, -1, -1, 189, 104, 206, -1, -1, -1,
1697 -1, -1, -1, -1, -1, 200, -1, -1, 203, 4,
1698 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1699 -1, -1, -1, -1, -1, -1, -1, 136, -1, -1,
1700 -1, -1, 141, 142, 143, -1, 31, 146, 33, 148,
1701 -1, -1, -1, 152, 39, -1, -1, -1, 43, -1,
1702 159, -1, 161, 48, 163, -1, -1, -1, -1, -1,
1703 -1, -1, 171, 172, 59, -1, -1, -1, -1, -1,
1704 65, 66, -1, 68, -1, -1, -1, 72, -1, -1,
1705 75, 4, -1, -1, -1, -1, -1, 82, -1, -1,
1706 -1, 200, -1, -1, 89, -1, -1, 206, 93, -1,
1707 95, 96, 97, -1, -1, -1, -1, -1, 31, 104,
1708 33, -1, -1, -1, -1, -1, 39, -1, -1, 3,
1709 43, 5, 6, 7, 8, 9, 10, -1, -1, -1,
1710 -1, -1, -1, -1, -1, -1, 59, -1, -1, -1,
1711 -1, 136, 65, 66, -1, 68, 141, 142, 143, 72,
1712 -1, 146, 75, 148, -1, -1, -1, 152, -1, 82,
1713 -1, -1, -1, -1, 159, -1, 161, -1, 163, -1,
1714 93, -1, 95, 96, 97, -1, 171, 172, -1, -1,
1715 -1, 104, -1, -1, -1, 69, -1, -1, -1, -1,
1716 -1, -1, -1, -1, 3, 4, 5, 6, 7, 8,
1717 9, 10, -1, -1, -1, 200, -1, -1, -1, -1,
1718 -1, 206, -1, 136, -1, -1, -1, -1, 141, 142,
1719 143, -1, 31, 146, 33, 148, -1, -1, -1, 152,
1720 39, 115, -1, -1, 43, -1, -1, -1, 161, -1,
1721 163, -1, -1, -1, -1, -1, -1, -1, 171, 172,
1722 59, -1, -1, -1, -1, -1, 65, 66, -1, 68,
1723 69, 145, -1, 72, -1, -1, 75, -1, -1, -1,
1724 13, 14, 15, 82, 158, 18, 19, 200, -1, -1,
1725 -1, -1, -1, 206, 93, -1, 95, 96, 97, -1,
1726 -1, -1, -1, -1, -1, 104, -1, -1, -1, -1,
1727 184, -1, -1, 187, 188, 189, 115, -1, 192, 193,
1728 -1, -1, -1, -1, -1, -1, -1, -1, -1, 203,
1729 -1, -1, -1, -1, -1, -1, -1, 136, -1, -1,
1730 -1, -1, 141, 142, 143, -1, 145, 146, 4, 148,
1731 -1, -1, -1, 152, -1, -1, 12, -1, -1, 158,
1732 -1, -1, 161, -1, 163, -1, -1, -1, -1, -1,
1733 -1, -1, 171, 172, -1, 31, -1, 33, -1, -1,
1734 -1, -1, -1, 39, 40, 184, -1, 43, 187, 188,
1735 189, -1, 48, 192, 193, -1, -1, -1, -1, -1,
1736 -1, 57, -1, 59, 203, -1, -1, -1, -1, 65,
1737 66, -1, 68, -1, -1, -1, 72, -1, -1, 75,
1738 -1, -1, -1, -1, -1, -1, 82, -1, -1, -1,
1739 -1, -1, -1, 89, 90, -1, -1, 93, -1, 95,
1740 96, 97, 98, -1, -1, -1, -1, -1, 104, -1,
1741 -1, -1, 185, 186, 187, 188, 189, 190, 191, -1,
1742 -1, -1, -1, -1, -1, -1, 199, 200, -1, -1,
1743 -1, -1, -1, -1, -1, 4, -1, -1, -1, -1,
1744 136, -1, -1, -1, -1, 141, 142, 143, -1, -1,
1745 146, -1, 148, -1, -1, -1, 152, -1, -1, -1,
1746 -1, -1, 31, 159, 33, 161, -1, 163, -1, -1,
1747 39, 40, -1, -1, 43, 171, 172, -1, -1, 48,
1748 -1, -1, -1, -1, -1, -1, -1, -1, 57, -1,
1749 59, -1, -1, -1, -1, -1, 65, 66, -1, 68,
1750 -1, -1, -1, 72, 200, -1, 75, -1, -1, -1,
1751 -1, -1, -1, 82, -1, -1, -1, -1, -1, -1,
1752 89, -1, -1, -1, 93, -1, 95, 96, 97, 98,
1753 -1, -1, -1, -1, -1, 104, -1, -1, -1, -1,
1754 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1755 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1756 -1, -1, 4, -1, -1, -1, -1, 136, -1, -1,
1757 -1, -1, 141, 142, 143, -1, -1, 146, -1, 148,
1758 -1, -1, -1, 152, -1, -1, -1, -1, -1, 31,
1759 159, 33, 161, -1, 163, -1, 38, 39, -1, -1,
1760 -1, 43, 171, 172, -1, -1, -1, -1, -1, -1,
1761 -1, -1, -1, -1, -1, -1, -1, 59, -1, -1,
1762 -1, -1, -1, 65, 66, -1, 68, -1, 70, -1,
1763 72, 200, -1, 75, -1, -1, -1, -1, -1, -1,
1764 82, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1765 -1, 93, -1, 95, 96, 97, -1, -1, -1, -1,
1766 -1, -1, 104, -1, -1, -1, -1, -1, -1, -1,
1767 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1768 -1, 123, -1, -1, -1, -1, -1, -1, 4, -1,
1769 -1, -1, -1, -1, 136, -1, -1, -1, -1, 141,
1770 142, 143, -1, -1, 146, -1, 148, 149, -1, -1,
1771 152, -1, -1, -1, -1, 31, -1, 33, -1, 161,
1772 -1, 163, 38, 39, -1, -1, -1, 43, -1, 171,
1773 172, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1774 -1, -1, -1, 59, -1, -1, -1, 189, -1, 65,
1775 66, -1, 68, -1, 70, -1, 72, -1, 200, 75,
1776 4, -1, -1, -1, -1, -1, 82, -1, -1, -1,
1777 -1, -1, -1, -1, -1, -1, -1, 93, 22, 95,
1778 96, 97, -1, -1, -1, -1, -1, 31, 104, 33,
1779 -1, -1, -1, -1, -1, 39, -1, -1, -1, 43,
1780 -1, -1, -1, -1, -1, -1, -1, 123, -1, -1,
1781 -1, -1, -1, -1, -1, 59, -1, -1, -1, -1,
1782 136, 65, 66, -1, 68, 141, 142, 143, 72, -1,
1783 146, 75, 148, 149, -1, -1, 152, -1, 82, -1,
1784 -1, -1, -1, -1, -1, 161, -1, 163, -1, 93,
1785 -1, 95, 96, 97, 4, 171, 172, -1, -1, -1,
1786 104, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1787 -1, -1, -1, 189, -1, -1, -1, -1, -1, -1,
1788 -1, 31, -1, 33, 200, -1, -1, -1, -1, 39,
1789 -1, -1, 136, 43, -1, -1, -1, 141, 142, 143,
1790 -1, -1, 146, -1, 148, -1, -1, -1, 152, 59,
1791 -1, -1, -1, -1, -1, 65, 66, 161, 68, 163,
1792 -1, -1, 72, -1, -1, 75, -1, 171, 172, -1,
1793 -1, -1, 82, 13, 14, 15, 16, 17, 18, 19,
1794 20, 21, -1, 93, -1, 95, 96, 97, -1, -1,
1795 -1, -1, -1, -1, 104, -1, 200, -1, 13, 14,
1796 15, 16, 17, 18, 19, 20, 21, -1, -1, -1,
1797 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1798 -1, -1, -1, -1, -1, -1, 136, -1, -1, -1,
1799 -1, 141, 142, 143, -1, -1, 146, -1, 148, -1,
1800 -1, -1, 152, -1, 13, 14, 15, 16, 17, 18,
1801 19, 161, 21, 163, -1, -1, -1, -1, -1, -1,
1802 -1, 171, 172, -1, -1, -1, -1, -1, 180, -1,
1803 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1804 -1, -1, -1, -1, -1, -1, -1, 199, 200, -1,
1805 200, -1, 204, 13, 14, 15, 16, 17, 18, 19,
1806 20, 21, -1, -1, -1, -1, -1, -1, -1, -1,
1807 -1, -1, -1, -1, -1, 13, 14, 15, 16, 17,
1808 18, 19, 20, 21, -1, -1, -1, -1, -1, -1,
1809 -1, -1, -1, 13, 14, 15, 16, 17, 18, 19,
1810 180, -1, 182, 183, 184, 185, 186, 187, 188, 189,
1811 190, 191, 13, 14, 15, 16, 17, 18, 19, 199,
1812 200, -1, -1, -1, 204, 180, -1, 182, 183, 184,
1813 185, 186, 187, 188, 189, 190, 191, -1, -1, -1,
1814 -1, -1, -1, -1, 199, 200, -1, -1, -1, 204,
1815 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
1816 -1, -1, -1, -1, -1, -1, 13, 14, 15, 16,
1817 17, 18, 19, 182, 183, 184, 185, 186, 187, 188,
1818 189, 190, 191, 13, 14, 15, 16, 17, 18, 19,
1819 199, 200, -1, -1, -1, -1, -1, -1, -1, -1,
1820 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1821 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1822 180, -1, 182, 183, 184, 185, 186, 187, 188, 189,
1823 190, 191, -1, -1, -1, -1, -1, -1, -1, 199,
1824 200, 201, 180, 181, 182, 183, 184, 185, 186, 187,
1825 188, 189, 190, 191, -1, -1, -1, -1, -1, -1,
1826 -1, 199, 200, 183, 184, 185, 186, 187, 188, 189,
1827 190, 191, -1, -1, -1, -1, -1, -1, -1, 199,
1828 200, 182, 183, 184, 185, 186, 187, 188, 189, 190,
1829 191, -1, -1, -1, -1, -1, -1, -1, 199, 200,
1830 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1831 -1, -1, -1, -1, -1, -1, -1, 180, -1, 182,
1832 183, 184, 185, 186, 187, 188, 189, 190, 191, -1,
1833 -1, -1, -1, -1, -1, -1, 199, 200, 185, 186,
1834 187, 188, 189, 190, 191, 4, -1, -1, -1, -1,
1835 -1, -1, 199, 200, 184, 185, 186, 187, 188, 189,
1836 190, 191, -1, -1, -1, -1, -1, -1, -1, 199,
1837 200, -1, 31, -1, 33, -1, -1, -1, -1, -1,
1838 39, 40, -1, -1, 43, -1, -1, -1, -1, -1,
1839 -1, -1, -1, -1, -1, -1, -1, -1, 57, -1,
1840 59, -1, -1, -1, -1, -1, 65, 66, -1, 68,
1841 -1, -1, -1, 72, -1, -1, 75, 4, -1, -1,
1842 -1, -1, -1, 82, -1, -1, -1, -1, -1, -1,
1843 -1, -1, -1, -1, 93, -1, 95, 96, 97, 98,
1844 -1, -1, 101, -1, 31, 104, 33, -1, -1, 108,
1845 -1, -1, 39, -1, -1, -1, 43, -1, -1, -1,
1846 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1847 -1, -1, 59, -1, -1, -1, -1, 136, 65, 66,
1848 -1, 68, 141, 142, 143, 72, -1, 146, 75, 148,
1849 -1, -1, -1, 152, -1, 82, -1, -1, -1, -1,
1850 -1, -1, 161, -1, 163, -1, 93, -1, 95, 96,
1851 97, 4, 171, 172, -1, -1, -1, 104, -1, -1,
1852 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1853 -1, -1, -1, -1, -1, -1, -1, -1, 31, -1,
1854 33, -1, -1, -1, -1, -1, 39, -1, -1, 136,
1855 -1, -1, -1, -1, 141, 142, 143, -1, -1, 146,
1856 -1, 148, -1, -1, -1, 152, 59, -1, -1, -1,
1857 -1, -1, 65, 66, 161, -1, 163, -1, -1, 72,
1858 -1, -1, 75, -1, 171, 172, -1, -1, -1, 82,
1859 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1860 -1, -1, 95, 96, 97, -1, -1, -1, -1, -1,
1861 -1, 104, -1, -1, -1, -1, -1, -1, -1, -1,
1862 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1864 -1, -1, -1, -1, -1, -1, -1, -1, 141, 142,
1865 143, -1, -1, 146, -1, -1, -1, -1, -1, 152,
1866 -1, -1, -1, -1, -1, -1, -1, -1, 161, -1,
1867 163, -1, -1, -1, -1, -1, -1, -1, 171, 172,
1868 23, -1, 25, 26, 27, -1, 29, 30, -1, 32,
1869 -1, -1, 35, -1, 37, -1, -1, -1, 41, 42,
1870 -1, 44, 45, 46, 47, -1, 49, 50, 51, 52,
1871 53, 54, 55, 56, -1, 58, -1, 60, 61, 62,
1872 63, 64, -1, -1, 67, -1, -1, -1, 71, -1,
1873 73, 74, -1, 76, 77, 78, 79, 80, 81, -1,
1874 83, 84, 85, 86, 87, 88, -1, -1, 91, -1,
1875 -1, 94, -1, -1, -1, -1, 99, 100, -1, 102,
1876 103, -1, 105, 106, -1, -1, 109, 110, 111, 112,
1877 113, 114, -1, 116, 117, 118, 119, 120, 121, 122,
1878 -1, 124, 125, -1, 127, 128, 129, 130, 131, 132,
1879 133, 134, 135, -1, 137, 138, 139, 140, -1, -1,
1880 -1, 144, -1, -1, 147, -1, -1, 150, 151, -1,
1881 -1, 154, 155, 156, 157, -1, -1, 160, -1, 162,
1882 -1, 164, 165, 166, 167, 168, 169, 170, -1, -1,
1886 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1887 symbol of state STATE-NUM. */
1888 static const yytype_uint16 yystos
[] =
1890 0, 209, 210, 0, 4, 31, 33, 39, 40, 43,
1891 48, 57, 59, 65, 66, 68, 72, 75, 82, 89,
1892 93, 95, 96, 97, 98, 104, 136, 141, 142, 143,
1893 146, 148, 152, 159, 161, 163, 171, 172, 200, 214,
1894 215, 216, 217, 218, 221, 222, 229, 240, 254, 258,
1895 260, 261, 262, 263, 266, 267, 270, 272, 273, 274,
1896 275, 277, 278, 279, 280, 281, 283, 285, 303, 304,
1897 305, 306, 3, 4, 203, 3, 4, 3, 4, 256,
1898 95, 259, 8, 3, 4, 259, 203, 259, 260, 3,
1899 256, 228, 229, 3, 256, 260, 23, 25, 26, 27,
1900 29, 30, 32, 35, 37, 41, 42, 44, 45, 46,
1901 47, 49, 50, 51, 52, 53, 54, 55, 56, 58,
1902 60, 61, 62, 63, 64, 67, 71, 73, 74, 76,
1903 77, 78, 79, 80, 81, 83, 84, 85, 86, 87,
1904 88, 91, 94, 99, 100, 102, 103, 105, 106, 109,
1905 110, 111, 112, 113, 114, 116, 117, 118, 119, 120,
1906 121, 122, 124, 125, 127, 128, 129, 130, 131, 132,
1907 133, 134, 135, 137, 138, 139, 140, 144, 147, 150,
1908 151, 154, 155, 156, 157, 160, 162, 164, 165, 166,
1909 167, 168, 169, 170, 173, 230, 232, 302, 202, 211,
1910 211, 101, 108, 220, 240, 261, 266, 272, 276, 283,
1911 303, 306, 202, 202, 205, 202, 205, 202, 213, 202,
1912 181, 271, 205, 284, 285, 284, 284, 3, 4, 38,
1913 70, 123, 149, 189, 203, 234, 257, 286, 287, 300,
1914 240, 303, 304, 306, 284, 202, 8, 205, 202, 304,
1915 205, 283, 153, 205, 203, 203, 203, 203, 203, 203,
1916 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
1917 203, 203, 203, 203, 203, 203, 203, 203, 203, 203,
1918 203, 203, 203, 203, 203, 203, 179, 201, 12, 90,
1919 214, 219, 222, 261, 263, 274, 275, 278, 206, 3,
1920 3, 4, 205, 300, 264, 126, 268, 272, 3, 4,
1921 205, 212, 282, 286, 286, 207, 200, 203, 227, 284,
1922 204, 237, 238, 239, 257, 204, 247, 286, 296, 203,
1923 250, 8, 257, 3, 5, 6, 7, 8, 9, 10,
1924 69, 115, 145, 158, 184, 187, 188, 189, 192, 193,
1925 203, 243, 244, 245, 243, 246, 8, 8, 231, 246,
1926 245, 8, 8, 245, 8, 245, 243, 75, 245, 241,
1927 242, 243, 8, 302, 8, 245, 304, 241, 243, 304,
1928 174, 175, 176, 177, 178, 301, 304, 304, 8, 11,
1929 233, 5, 307, 8, 304, 232, 200, 203, 202, 213,
1930 206, 228, 265, 181, 107, 228, 252, 269, 202, 205,
1931 212, 206, 214, 229, 281, 286, 204, 246, 189, 242,
1932 223, 224, 225, 226, 229, 283, 206, 179, 207, 206,
1933 228, 248, 179, 252, 206, 229, 249, 252, 204, 204,
1934 203, 243, 243, 243, 243, 243, 243, 243, 283, 13,
1935 14, 15, 16, 17, 18, 19, 20, 21, 180, 182,
1936 183, 184, 185, 186, 187, 188, 189, 190, 191, 199,
1937 200, 179, 204, 204, 204, 179, 204, 204, 204, 204,
1938 204, 204, 204, 204, 204, 3, 204, 179, 204, 204,
1939 204, 204, 179, 204, 204, 204, 204, 204, 204, 204,
1940 204, 199, 204, 204, 204, 232, 8, 213, 275, 181,
1941 283, 202, 206, 229, 253, 254, 206, 218, 206, 213,
1942 201, 201, 204, 179, 283, 189, 203, 227, 234, 257,
1943 292, 294, 295, 239, 245, 283, 306, 286, 204, 202,
1944 202, 283, 204, 189, 203, 227, 234, 288, 290, 291,
1945 243, 243, 3, 243, 243, 243, 243, 243, 243, 243,
1946 243, 243, 243, 243, 243, 243, 243, 243, 243, 243,
1947 3, 243, 245, 8, 204, 242, 245, 5, 204, 286,
1948 202, 212, 213, 22, 226, 294, 282, 189, 223, 234,
1949 293, 294, 203, 227, 292, 298, 299, 202, 255, 257,
1950 290, 282, 189, 223, 234, 289, 290, 204, 203, 227,
1951 181, 201, 204, 213, 206, 294, 282, 204, 294, 204,
1952 223, 181, 297, 179, 202, 205, 204, 290, 282, 204,
1953 294, 204, 243, 223, 243, 213, 294, 204, 246, 298,
1954 235, 294, 204, 37, 50, 206, 236, 245, 181, 181,
1955 202, 251, 252, 251, 202
1958 #define yyerrok (yyerrstatus = 0)
1959 #define yyclearin (yychar = YYEMPTY)
1960 #define YYEMPTY (-2)
1963 #define YYACCEPT goto yyacceptlab
1964 #define YYABORT goto yyabortlab
1965 #define YYERROR goto yyerrorlab
1968 /* Like YYERROR except do call yyerror. This remains here temporarily
1969 to ease the transition to the new meaning of YYERROR, for GCC.
1970 Once GCC version 2 has supplanted version 1, this can go. */
1972 #define YYFAIL goto yyerrlab
1974 #define YYRECOVERING() (!!yyerrstatus)
1976 #define YYBACKUP(Token, Value) \
1978 if (yychar == YYEMPTY && yylen == 1) \
1982 yytoken = YYTRANSLATE (yychar); \
1988 yyerror (YY_("syntax error: cannot back up")); \
1995 #define YYERRCODE 256
1998 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1999 If N is 0, then set CURRENT to the empty location which ends
2000 the previous symbol: RHS[0] (always defined). */
2002 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
2003 #ifndef YYLLOC_DEFAULT
2004 # define YYLLOC_DEFAULT(Current, Rhs, N) \
2008 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
2009 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
2010 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
2011 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
2015 (Current).first_line = (Current).last_line = \
2016 YYRHSLOC (Rhs, 0).last_line; \
2017 (Current).first_column = (Current).last_column = \
2018 YYRHSLOC (Rhs, 0).last_column; \
2024 /* YY_LOCATION_PRINT -- Print the location on the stream.
2025 This macro was not mandated originally: define only if we know
2026 we won't break user code: when these are the locations we know. */
2028 #ifndef YY_LOCATION_PRINT
2029 # if YYLTYPE_IS_TRIVIAL
2030 # define YY_LOCATION_PRINT(File, Loc) \
2031 fprintf (File, "%d.%d-%d.%d", \
2032 (Loc).first_line, (Loc).first_column, \
2033 (Loc).last_line, (Loc).last_column)
2035 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
2040 /* YYLEX -- calling `yylex' with the right arguments. */
2043 # define YYLEX yylex (YYLEX_PARAM)
2045 # define YYLEX yylex ()
2048 /* Enable debugging if requested. */
2052 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
2053 # define YYFPRINTF fprintf
2056 # define YYDPRINTF(Args) \
2062 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
2066 YYFPRINTF (stderr, "%s ", Title); \
2067 yy_symbol_print (stderr, \
2069 YYFPRINTF (stderr, "\n"); \
2074 /*--------------------------------.
2075 | Print this symbol on YYOUTPUT. |
2076 `--------------------------------*/
2079 #if (defined __STDC__ || defined __C99__FUNC__ \
2080 || defined __cplusplus || defined _MSC_VER)
2082 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
2085 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
)
2088 YYSTYPE
const * const yyvaluep
;
2094 if (yytype
< YYNTOKENS
)
2095 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
2107 /*--------------------------------.
2108 | Print this symbol on YYOUTPUT. |
2109 `--------------------------------*/
2111 #if (defined __STDC__ || defined __C99__FUNC__ \
2112 || defined __cplusplus || defined _MSC_VER)
2114 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
)
2117 yy_symbol_print (yyoutput
, yytype
, yyvaluep
)
2120 YYSTYPE
const * const yyvaluep
;
2123 if (yytype
< YYNTOKENS
)
2124 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
2126 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
2128 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
);
2129 YYFPRINTF (yyoutput
, ")");
2132 /*------------------------------------------------------------------.
2133 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
2135 `------------------------------------------------------------------*/
2137 #if (defined __STDC__ || defined __C99__FUNC__ \
2138 || defined __cplusplus || defined _MSC_VER)
2140 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
2143 yy_stack_print (yybottom
, yytop
)
2144 yytype_int16
*yybottom
;
2145 yytype_int16
*yytop
;
2148 YYFPRINTF (stderr
, "Stack now");
2149 for (; yybottom
<= yytop
; yybottom
++)
2151 int yybot
= *yybottom
;
2152 YYFPRINTF (stderr
, " %d", yybot
);
2154 YYFPRINTF (stderr
, "\n");
2157 # define YY_STACK_PRINT(Bottom, Top) \
2160 yy_stack_print ((Bottom), (Top)); \
2164 /*------------------------------------------------.
2165 | Report that the YYRULE is going to be reduced. |
2166 `------------------------------------------------*/
2168 #if (defined __STDC__ || defined __C99__FUNC__ \
2169 || defined __cplusplus || defined _MSC_VER)
2171 yy_reduce_print (YYSTYPE
*yyvsp
, int yyrule
)
2174 yy_reduce_print (yyvsp
, yyrule
)
2179 int yynrhs
= yyr2
[yyrule
];
2181 unsigned long int yylno
= yyrline
[yyrule
];
2182 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
2184 /* The symbols being reduced. */
2185 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
2187 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
2188 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
2189 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
2191 YYFPRINTF (stderr
, "\n");
2195 # define YY_REDUCE_PRINT(Rule) \
2198 yy_reduce_print (yyvsp, Rule); \
2201 /* Nonzero means print parse trace. It is left uninitialized so that
2202 multiple parsers can coexist. */
2204 #else /* !YYDEBUG */
2205 # define YYDPRINTF(Args)
2206 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
2207 # define YY_STACK_PRINT(Bottom, Top)
2208 # define YY_REDUCE_PRINT(Rule)
2209 #endif /* !YYDEBUG */
2212 /* YYINITDEPTH -- initial size of the parser's stacks. */
2214 # define YYINITDEPTH 200
2217 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2218 if the built-in stack extension method is used).
2220 Do not make this value too large; the results are undefined if
2221 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2222 evaluated with infinite-precision integer arithmetic. */
2225 # define YYMAXDEPTH 10000
2233 # if defined __GLIBC__ && defined _STRING_H
2234 # define yystrlen strlen
2236 /* Return the length of YYSTR. */
2237 #if (defined __STDC__ || defined __C99__FUNC__ \
2238 || defined __cplusplus || defined _MSC_VER)
2240 yystrlen (const char *yystr
)
2248 for (yylen
= 0; yystr
[yylen
]; yylen
++)
2256 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
2257 # define yystpcpy stpcpy
2259 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
2261 #if (defined __STDC__ || defined __C99__FUNC__ \
2262 || defined __cplusplus || defined _MSC_VER)
2264 yystpcpy (char *yydest
, const char *yysrc
)
2267 yystpcpy (yydest
, yysrc
)
2273 const char *yys
= yysrc
;
2275 while ((*yyd
++ = *yys
++) != '\0')
2284 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
2285 quotes and backslashes, so that it's suitable for yyerror. The
2286 heuristic is that double-quoting is unnecessary unless the string
2287 contains an apostrophe, a comma, or backslash (other than
2288 backslash-backslash). YYSTR is taken from yytname. If YYRES is
2289 null, do not copy; instead, return the length of what the result
2292 yytnamerr (char *yyres
, const char *yystr
)
2297 char const *yyp
= yystr
;
2304 goto do_not_strip_quotes
;
2308 goto do_not_strip_quotes
;
2321 do_not_strip_quotes
: ;
2325 return yystrlen (yystr
);
2327 return yystpcpy (yyres
, yystr
) - yyres
;
2331 /* Copy into YYRESULT an error message about the unexpected token
2332 YYCHAR while in state YYSTATE. Return the number of bytes copied,
2333 including the terminating null byte. If YYRESULT is null, do not
2334 copy anything; just return the number of bytes that would be
2335 copied. As a special case, return 0 if an ordinary "syntax error"
2336 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
2337 size calculation. */
2339 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
2341 int yyn
= yypact
[yystate
];
2343 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
2347 int yytype
= YYTRANSLATE (yychar
);
2348 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
2349 YYSIZE_T yysize
= yysize0
;
2351 int yysize_overflow
= 0;
2352 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
2353 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
2357 /* This is so xgettext sees the translatable formats that are
2358 constructed on the fly. */
2359 YY_("syntax error, unexpected %s");
2360 YY_("syntax error, unexpected %s, expecting %s");
2361 YY_("syntax error, unexpected %s, expecting %s or %s");
2362 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
2363 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
2367 static char const yyunexpected
[] = "syntax error, unexpected %s";
2368 static char const yyexpecting
[] = ", expecting %s";
2369 static char const yyor
[] = " or %s";
2370 char yyformat
[sizeof yyunexpected
2371 + sizeof yyexpecting
- 1
2372 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
2373 * (sizeof yyor
- 1))];
2374 char const *yyprefix
= yyexpecting
;
2376 /* Start YYX at -YYN if negative to avoid negative indexes in
2378 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
2380 /* Stay within bounds of both yycheck and yytname. */
2381 int yychecklim
= YYLAST
- yyn
+ 1;
2382 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
2385 yyarg
[0] = yytname
[yytype
];
2386 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
2388 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
2389 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
2391 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
2395 yyformat
[sizeof yyunexpected
- 1] = '\0';
2398 yyarg
[yycount
++] = yytname
[yyx
];
2399 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
2400 yysize_overflow
|= (yysize1
< yysize
);
2402 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
2406 yyf
= YY_(yyformat
);
2407 yysize1
= yysize
+ yystrlen (yyf
);
2408 yysize_overflow
|= (yysize1
< yysize
);
2411 if (yysize_overflow
)
2412 return YYSIZE_MAXIMUM
;
2416 /* Avoid sprintf, as that infringes on the user's name space.
2417 Don't have undefined behavior even if the translation
2418 produced a string with the wrong number of "%s"s. */
2419 char *yyp
= yyresult
;
2421 while ((*yyp
= *yyf
) != '\0')
2423 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
2425 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
2438 #endif /* YYERROR_VERBOSE */
2441 /*-----------------------------------------------.
2442 | Release the memory associated to this symbol. |
2443 `-----------------------------------------------*/
2446 #if (defined __STDC__ || defined __C99__FUNC__ \
2447 || defined __cplusplus || defined _MSC_VER)
2449 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
)
2452 yydestruct (yymsg
, yytype
, yyvaluep
)
2462 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
2472 /* Prevent warnings from -Wmissing-prototypes. */
2473 #ifdef YYPARSE_PARAM
2474 #if defined __STDC__ || defined __cplusplus
2475 int yyparse (void *YYPARSE_PARAM
);
2479 #else /* ! YYPARSE_PARAM */
2480 #if defined __STDC__ || defined __cplusplus
2485 #endif /* ! YYPARSE_PARAM */
2488 /* The lookahead symbol. */
2491 /* The semantic value of the lookahead symbol. */
2494 /* Number of syntax errors so far. */
2499 /*-------------------------.
2500 | yyparse or yypush_parse. |
2501 `-------------------------*/
2503 #ifdef YYPARSE_PARAM
2504 #if (defined __STDC__ || defined __C99__FUNC__ \
2505 || defined __cplusplus || defined _MSC_VER)
2507 yyparse (void *YYPARSE_PARAM
)
2510 yyparse (YYPARSE_PARAM
)
2511 void *YYPARSE_PARAM
;
2513 #else /* ! YYPARSE_PARAM */
2514 #if (defined __STDC__ || defined __C99__FUNC__ \
2515 || defined __cplusplus || defined _MSC_VER)
2528 /* Number of tokens to shift before error messages enabled. */
2531 /* The stacks and their tools:
2532 `yyss': related to states.
2533 `yyvs': related to semantic values.
2535 Refer to the stacks thru separate pointers, to allow yyoverflow
2536 to reallocate them elsewhere. */
2538 /* The state stack. */
2539 yytype_int16 yyssa
[YYINITDEPTH
];
2541 yytype_int16
*yyssp
;
2543 /* The semantic value stack. */
2544 YYSTYPE yyvsa
[YYINITDEPTH
];
2548 YYSIZE_T yystacksize
;
2552 /* Lookahead token as an internal (translated) token number. */
2554 /* The variables used to return semantic value and location from the
2559 /* Buffer for error messages, and its allocated size. */
2561 char *yymsg
= yymsgbuf
;
2562 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
2565 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2567 /* The number of symbols on the RHS of the reduced rule.
2568 Keep to zero when no symbol should be popped. */
2574 yystacksize
= YYINITDEPTH
;
2576 YYDPRINTF ((stderr
, "Starting parse\n"));
2581 yychar
= YYEMPTY
; /* Cause a token to be read. */
2583 /* Initialize stack pointers.
2584 Waste one element of value and location stack
2585 so that they stay on the same level as the state stack.
2586 The wasted elements are never initialized. */
2592 /*------------------------------------------------------------.
2593 | yynewstate -- Push a new state, which is found in yystate. |
2594 `------------------------------------------------------------*/
2596 /* In all cases, when you get here, the value and location stacks
2597 have just been pushed. So pushing a state here evens the stacks. */
2603 if (yyss
+ yystacksize
- 1 <= yyssp
)
2605 /* Get the current used size of the three stacks, in elements. */
2606 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
2610 /* Give user a chance to reallocate the stack. Use copies of
2611 these so that the &'s don't force the real ones into
2613 YYSTYPE
*yyvs1
= yyvs
;
2614 yytype_int16
*yyss1
= yyss
;
2616 /* Each stack pointer address is followed by the size of the
2617 data in use in that stack, in bytes. This used to be a
2618 conditional around just the two extra args, but that might
2619 be undefined if yyoverflow is a macro. */
2620 yyoverflow (YY_("memory exhausted"),
2621 &yyss1
, yysize
* sizeof (*yyssp
),
2622 &yyvs1
, yysize
* sizeof (*yyvsp
),
2628 #else /* no yyoverflow */
2629 # ifndef YYSTACK_RELOCATE
2630 goto yyexhaustedlab
;
2632 /* Extend the stack our own way. */
2633 if (YYMAXDEPTH
<= yystacksize
)
2634 goto yyexhaustedlab
;
2636 if (YYMAXDEPTH
< yystacksize
)
2637 yystacksize
= YYMAXDEPTH
;
2640 yytype_int16
*yyss1
= yyss
;
2641 union yyalloc
*yyptr
=
2642 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
2644 goto yyexhaustedlab
;
2645 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
2646 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
2647 # undef YYSTACK_RELOCATE
2649 YYSTACK_FREE (yyss1
);
2652 #endif /* no yyoverflow */
2654 yyssp
= yyss
+ yysize
- 1;
2655 yyvsp
= yyvs
+ yysize
- 1;
2657 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
2658 (unsigned long int) yystacksize
));
2660 if (yyss
+ yystacksize
- 1 <= yyssp
)
2664 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
2666 if (yystate
== YYFINAL
)
2676 /* Do appropriate processing given the current state. Read a
2677 lookahead token if we need one and don't already have one. */
2679 /* First try to decide what to do without reference to lookahead token. */
2680 yyn
= yypact
[yystate
];
2681 if (yyn
== YYPACT_NINF
)
2684 /* Not known => get a lookahead token if don't already have one. */
2686 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2687 if (yychar
== YYEMPTY
)
2689 YYDPRINTF ((stderr
, "Reading a token: "));
2693 if (yychar
<= YYEOF
)
2695 yychar
= yytoken
= YYEOF
;
2696 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2700 yytoken
= YYTRANSLATE (yychar
);
2701 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2704 /* If the proper action on seeing token YYTOKEN is to reduce or to
2705 detect an error, take that action. */
2707 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2712 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
2718 /* Count tokens shifted since error; after three, turn off error
2723 /* Shift the lookahead token. */
2724 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2726 /* Discard the shifted token. */
2735 /*-----------------------------------------------------------.
2736 | yydefault -- do the default action for the current state. |
2737 `-----------------------------------------------------------*/
2739 yyn
= yydefact
[yystate
];
2745 /*-----------------------------.
2746 | yyreduce -- Do a reduction. |
2747 `-----------------------------*/
2749 /* yyn is the number of a rule to reduce with. */
2752 /* If YYLEN is nonzero, implement the default value of the action:
2755 Otherwise, the following line sets YYVAL to garbage.
2756 This behavior is undocumented and Bison
2757 users should not rely upon it. Assigning to YYVAL
2758 unconditionally makes the parser a bit smaller, and it avoids a
2759 GCC warning that YYVAL may be used uninitialized. */
2760 yyval
= yyvsp
[1-yylen
];
2763 YY_REDUCE_PRINT (yyn
);
2768 /* Line 1455 of yacc.c */
2769 #line 328 "parser.y"
2771 check_statements((yyvsp
[(1) - (1)].stmt_list
), FALSE
);
2772 check_all_user_types((yyvsp
[(1) - (1)].stmt_list
));
2773 write_header((yyvsp
[(1) - (1)].stmt_list
));
2774 write_id_data((yyvsp
[(1) - (1)].stmt_list
));
2775 write_proxies((yyvsp
[(1) - (1)].stmt_list
));
2776 write_client((yyvsp
[(1) - (1)].stmt_list
));
2777 write_server((yyvsp
[(1) - (1)].stmt_list
));
2778 write_regscript((yyvsp
[(1) - (1)].stmt_list
));
2779 write_dlldata((yyvsp
[(1) - (1)].stmt_list
));
2780 write_local_stubs((yyvsp
[(1) - (1)].stmt_list
));
2786 /* Line 1455 of yacc.c */
2787 #line 342 "parser.y"
2788 { (yyval
.stmt_list
) = NULL
; ;}
2793 /* Line 1455 of yacc.c */
2794 #line 343 "parser.y"
2795 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_reference((yyvsp
[(2) - (2)].type
))); ;}
2800 /* Line 1455 of yacc.c */
2801 #line 344 "parser.y"
2802 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_type_decl((yyvsp
[(2) - (2)].type
))); ;}
2807 /* Line 1455 of yacc.c */
2808 #line 345 "parser.y"
2809 { (yyval
.stmt_list
) = (yyvsp
[(1) - (3)].stmt_list
);
2810 reg_type((yyvsp
[(2) - (3)].type
), (yyvsp
[(2) - (3)].type
)->name
, 0);
2816 /* Line 1455 of yacc.c */
2817 #line 348 "parser.y"
2818 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_type_decl((yyvsp
[(2) - (2)].type
)));
2819 reg_type((yyvsp
[(2) - (2)].type
), (yyvsp
[(2) - (2)].type
)->name
, 0);
2825 /* Line 1455 of yacc.c */
2826 #line 351 "parser.y"
2827 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_module((yyvsp
[(2) - (2)].type
))); ;}
2832 /* Line 1455 of yacc.c */
2833 #line 352 "parser.y"
2834 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_library((yyvsp
[(2) - (2)].typelib
))); ;}
2839 /* Line 1455 of yacc.c */
2840 #line 353 "parser.y"
2841 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), (yyvsp
[(2) - (2)].statement
)); ;}
2846 /* Line 1455 of yacc.c */
2847 #line 356 "parser.y"
2848 { (yyval
.stmt_list
) = NULL
; ;}
2853 /* Line 1455 of yacc.c */
2854 #line 357 "parser.y"
2855 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_reference((yyvsp
[(2) - (2)].type
))); ;}
2860 /* Line 1455 of yacc.c */
2861 #line 358 "parser.y"
2862 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_type_decl((yyvsp
[(2) - (2)].type
))); ;}
2867 /* Line 1455 of yacc.c */
2868 #line 359 "parser.y"
2869 { (yyval
.stmt_list
) = (yyvsp
[(1) - (3)].stmt_list
); reg_type((yyvsp
[(2) - (3)].type
), (yyvsp
[(2) - (3)].type
)->name
, 0); ;}
2874 /* Line 1455 of yacc.c */
2875 #line 360 "parser.y"
2876 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_type_decl((yyvsp
[(2) - (2)].type
)));
2877 reg_type((yyvsp
[(2) - (2)].type
), (yyvsp
[(2) - (2)].type
)->name
, 0);
2883 /* Line 1455 of yacc.c */
2884 #line 363 "parser.y"
2885 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_module((yyvsp
[(2) - (2)].type
))); ;}
2890 /* Line 1455 of yacc.c */
2891 #line 364 "parser.y"
2892 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), (yyvsp
[(2) - (2)].statement
)); ;}
2897 /* Line 1455 of yacc.c */
2898 #line 365 "parser.y"
2899 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_importlib((yyvsp
[(2) - (2)].str
))); ;}
2904 /* Line 1455 of yacc.c */
2905 #line 366 "parser.y"
2906 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), make_statement_library((yyvsp
[(2) - (2)].typelib
))); ;}
2911 /* Line 1455 of yacc.c */
2912 #line 369 "parser.y"
2913 { (yyval
.stmt_list
) = NULL
; ;}
2918 /* Line 1455 of yacc.c */
2919 #line 370 "parser.y"
2920 { (yyval
.stmt_list
) = append_statement((yyvsp
[(1) - (2)].stmt_list
), (yyvsp
[(2) - (2)].statement
)); ;}
2925 /* Line 1455 of yacc.c */
2926 #line 378 "parser.y"
2927 { (yyval
.statement
) = make_statement_cppquote((yyvsp
[(1) - (1)].str
)); ;}
2932 /* Line 1455 of yacc.c */
2933 #line 379 "parser.y"
2934 { (yyval
.statement
) = make_statement_type_decl((yyvsp
[(1) - (2)].type
)); ;}
2939 /* Line 1455 of yacc.c */
2940 #line 380 "parser.y"
2941 { (yyval
.statement
) = make_statement_declaration((yyvsp
[(1) - (2)].var
)); ;}
2946 /* Line 1455 of yacc.c */
2947 #line 381 "parser.y"
2948 { (yyval
.statement
) = make_statement_import((yyvsp
[(1) - (1)].str
)); ;}
2953 /* Line 1455 of yacc.c */
2954 #line 382 "parser.y"
2955 { (yyval
.statement
) = (yyvsp
[(1) - (2)].statement
); ;}
2960 /* Line 1455 of yacc.c */
2961 #line 389 "parser.y"
2962 { (yyval
.type
) = (yyvsp
[(2) - (2)].type
); (yyval
.type
)->attrs
= check_enum_attrs((yyvsp
[(1) - (2)].attr_list
)); ;}
2967 /* Line 1455 of yacc.c */
2968 #line 390 "parser.y"
2969 { (yyval
.type
) = (yyvsp
[(2) - (2)].type
); (yyval
.type
)->attrs
= check_struct_attrs((yyvsp
[(1) - (2)].attr_list
)); ;}
2974 /* Line 1455 of yacc.c */
2975 #line 391 "parser.y"
2976 { (yyval
.type
) = (yyvsp
[(2) - (2)].type
); (yyval
.type
)->attrs
= check_union_attrs((yyvsp
[(1) - (2)].attr_list
)); ;}
2981 /* Line 1455 of yacc.c */
2982 #line 394 "parser.y"
2983 { (yyval
.str
) = (yyvsp
[(3) - (4)].str
); ;}
2988 /* Line 1455 of yacc.c */
2989 #line 396 "parser.y"
2990 { assert(yychar
== YYEMPTY
);
2991 (yyval
.import
) = xmalloc(sizeof(struct _import_t
));
2992 (yyval
.import
)->name
= (yyvsp
[(2) - (3)].str
);
2993 (yyval
.import
)->import_performed
= do_import((yyvsp
[(2) - (3)].str
));
2994 if (!(yyval
.import
)->import_performed
) yychar
= aEOF
;
3000 /* Line 1455 of yacc.c */
3001 #line 404 "parser.y"
3002 { (yyval
.str
) = (yyvsp
[(1) - (3)].import
)->name
;
3003 if ((yyvsp
[(1) - (3)].import
)->import_performed
) pop_import();
3004 free((yyvsp
[(1) - (3)].import
));
3010 /* Line 1455 of yacc.c */
3011 #line 411 "parser.y"
3012 { (yyval
.str
) = (yyvsp
[(3) - (5)].str
); if(!parse_only
) add_importlib((yyvsp
[(3) - (5)].str
)); ;}
3017 /* Line 1455 of yacc.c */
3018 #line 414 "parser.y"
3019 { (yyval
.str
) = (yyvsp
[(2) - (2)].str
); ;}
3024 /* Line 1455 of yacc.c */
3025 #line 416 "parser.y"
3026 { (yyval
.typelib
) = make_library((yyvsp
[(2) - (3)].str
), check_library_attrs((yyvsp
[(2) - (3)].str
), (yyvsp
[(1) - (3)].attr_list
)));
3027 if (!parse_only
) start_typelib((yyval
.typelib
));
3033 /* Line 1455 of yacc.c */
3034 #line 421 "parser.y"
3035 { (yyval
.typelib
) = (yyvsp
[(1) - (4)].typelib
);
3036 (yyval
.typelib
)->stmts
= (yyvsp
[(2) - (4)].stmt_list
);
3037 if (!parse_only
) end_typelib();
3043 /* Line 1455 of yacc.c */
3044 #line 427 "parser.y"
3045 { (yyval
.var_list
) = NULL
; ;}
3050 /* Line 1455 of yacc.c */
3051 #line 431 "parser.y"
3052 { check_arg_attrs((yyvsp
[(1) - (1)].var
)); (yyval
.var_list
) = append_var( NULL
, (yyvsp
[(1) - (1)].var
) ); ;}
3057 /* Line 1455 of yacc.c */
3058 #line 432 "parser.y"
3059 { check_arg_attrs((yyvsp
[(3) - (3)].var
)); (yyval
.var_list
) = append_var( (yyvsp
[(1) - (3)].var_list
), (yyvsp
[(3) - (3)].var
) ); ;}
3064 /* Line 1455 of yacc.c */
3065 #line 436 "parser.y"
3066 { (yyval
.var_list
) = append_var( (yyvsp
[(1) - (3)].var_list
), make_var(strdup("...")) ); ;}
3071 /* Line 1455 of yacc.c */
3072 #line 440 "parser.y"
3073 { if ((yyvsp
[(2) - (3)].declspec
)->stgclass
!= STG_NONE
&& (yyvsp
[(2) - (3)].declspec
)->stgclass
!= STG_REGISTER
)
3074 error_loc("invalid storage class for function parameter\n");
3075 (yyval
.var
) = declare_var((yyvsp
[(1) - (3)].attr_list
), (yyvsp
[(2) - (3)].declspec
), (yyvsp
[(3) - (3)].declarator
), TRUE
);
3076 free((yyvsp
[(2) - (3)].declspec
)); free((yyvsp
[(3) - (3)].declarator
));
3082 /* Line 1455 of yacc.c */
3083 #line 445 "parser.y"
3084 { if ((yyvsp
[(1) - (2)].declspec
)->stgclass
!= STG_NONE
&& (yyvsp
[(1) - (2)].declspec
)->stgclass
!= STG_REGISTER
)
3085 error_loc("invalid storage class for function parameter\n");
3086 (yyval
.var
) = declare_var(NULL
, (yyvsp
[(1) - (2)].declspec
), (yyvsp
[(2) - (2)].declarator
), TRUE
);
3087 free((yyvsp
[(1) - (2)].declspec
)); free((yyvsp
[(2) - (2)].declarator
));
3093 /* Line 1455 of yacc.c */
3094 #line 452 "parser.y"
3095 { (yyval
.expr
) = (yyvsp
[(2) - (3)].expr
); ;}
3100 /* Line 1455 of yacc.c */
3101 #line 453 "parser.y"
3102 { (yyval
.expr
) = make_expr(EXPR_VOID
); ;}
3107 /* Line 1455 of yacc.c */
3108 #line 456 "parser.y"
3109 { (yyval
.attr_list
) = NULL
; ;}
3114 /* Line 1455 of yacc.c */
3115 #line 461 "parser.y"
3116 { (yyval
.attr_list
) = (yyvsp
[(2) - (3)].attr_list
); ;}
3121 /* Line 1455 of yacc.c */
3122 #line 464 "parser.y"
3123 { (yyval
.attr_list
) = append_attr( NULL
, (yyvsp
[(1) - (1)].attr
) ); ;}
3128 /* Line 1455 of yacc.c */
3129 #line 465 "parser.y"
3130 { (yyval
.attr_list
) = append_attr( (yyvsp
[(1) - (3)].attr_list
), (yyvsp
[(3) - (3)].attr
) ); ;}
3135 /* Line 1455 of yacc.c */
3136 #line 466 "parser.y"
3137 { (yyval
.attr_list
) = append_attr( (yyvsp
[(1) - (4)].attr_list
), (yyvsp
[(4) - (4)].attr
) ); ;}
3142 /* Line 1455 of yacc.c */
3143 #line 469 "parser.y"
3144 { (yyval
.str_list
) = append_str( NULL
, (yyvsp
[(1) - (1)].str
) ); ;}
3149 /* Line 1455 of yacc.c */
3150 #line 470 "parser.y"
3151 { (yyval
.str_list
) = append_str( (yyvsp
[(1) - (3)].str_list
), (yyvsp
[(3) - (3)].str
) ); ;}
3156 /* Line 1455 of yacc.c */
3157 #line 473 "parser.y"
3158 { (yyval
.attr
) = NULL
; ;}
3163 /* Line 1455 of yacc.c */
3164 #line 474 "parser.y"
3165 { (yyval
.attr
) = make_attr(ATTR_AGGREGATABLE
); ;}
3170 /* Line 1455 of yacc.c */
3171 #line 475 "parser.y"
3172 { (yyval
.attr
) = make_attrp(ATTR_ANNOTATION
, (yyvsp
[(3) - (4)].str
)); ;}
3177 /* Line 1455 of yacc.c */
3178 #line 476 "parser.y"
3179 { (yyval
.attr
) = make_attr(ATTR_APPOBJECT
); ;}
3184 /* Line 1455 of yacc.c */
3185 #line 477 "parser.y"
3186 { (yyval
.attr
) = make_attr(ATTR_ASYNC
); ;}
3191 /* Line 1455 of yacc.c */
3192 #line 478 "parser.y"
3193 { (yyval
.attr
) = make_attr(ATTR_AUTO_HANDLE
); ;}
3198 /* Line 1455 of yacc.c */
3199 #line 479 "parser.y"
3200 { (yyval
.attr
) = make_attr(ATTR_BINDABLE
); ;}
3205 /* Line 1455 of yacc.c */
3206 #line 480 "parser.y"
3207 { (yyval
.attr
) = make_attr(ATTR_BROADCAST
); ;}
3212 /* Line 1455 of yacc.c */
3213 #line 481 "parser.y"
3214 { (yyval
.attr
) = make_attrp(ATTR_CALLAS
, (yyvsp
[(3) - (4)].var
)); ;}
3219 /* Line 1455 of yacc.c */
3220 #line 482 "parser.y"
3221 { (yyval
.attr
) = make_attrp(ATTR_CASE
, (yyvsp
[(3) - (4)].expr_list
)); ;}
3226 /* Line 1455 of yacc.c */
3227 #line 483 "parser.y"
3228 { (yyval
.attr
) = make_attr(ATTR_CODE
); ;}
3233 /* Line 1455 of yacc.c */
3234 #line 484 "parser.y"
3235 { (yyval
.attr
) = make_attr(ATTR_COMMSTATUS
); ;}
3240 /* Line 1455 of yacc.c */
3241 #line 485 "parser.y"
3242 { (yyval
.attr
) = make_attrv(ATTR_CONTEXTHANDLE
, 0); ;}
3247 /* Line 1455 of yacc.c */
3248 #line 486 "parser.y"
3249 { (yyval
.attr
) = make_attrv(ATTR_CONTEXTHANDLE
, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ ;}
3254 /* Line 1455 of yacc.c */
3255 #line 487 "parser.y"
3256 { (yyval
.attr
) = make_attrv(ATTR_CONTEXTHANDLE
, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ ;}
3261 /* Line 1455 of yacc.c */
3262 #line 488 "parser.y"
3263 { (yyval
.attr
) = make_attr(ATTR_CONTROL
); ;}
3268 /* Line 1455 of yacc.c */
3269 #line 489 "parser.y"
3270 { (yyval
.attr
) = make_attr(ATTR_DECODE
); ;}
3275 /* Line 1455 of yacc.c */
3276 #line 490 "parser.y"
3277 { (yyval
.attr
) = make_attr(ATTR_DEFAULT
); ;}
3282 /* Line 1455 of yacc.c */
3283 #line 491 "parser.y"
3284 { (yyval
.attr
) = make_attr(ATTR_DEFAULTBIND
); ;}
3289 /* Line 1455 of yacc.c */
3290 #line 492 "parser.y"
3291 { (yyval
.attr
) = make_attr(ATTR_DEFAULTCOLLELEM
); ;}
3296 /* Line 1455 of yacc.c */
3297 #line 493 "parser.y"
3298 { (yyval
.attr
) = make_attrp(ATTR_DEFAULTVALUE
, (yyvsp
[(3) - (4)].expr
)); ;}
3303 /* Line 1455 of yacc.c */
3304 #line 494 "parser.y"
3305 { (yyval
.attr
) = make_attr(ATTR_DEFAULTVTABLE
); ;}
3310 /* Line 1455 of yacc.c */
3311 #line 495 "parser.y"
3312 { (yyval
.attr
) = make_attr(ATTR_DISABLECONSISTENCYCHECK
); ;}
3317 /* Line 1455 of yacc.c */
3318 #line 496 "parser.y"
3319 { (yyval
.attr
) = make_attr(ATTR_DISPLAYBIND
); ;}
3324 /* Line 1455 of yacc.c */
3325 #line 497 "parser.y"
3326 { (yyval
.attr
) = make_attrp(ATTR_DLLNAME
, (yyvsp
[(3) - (4)].str
)); ;}
3331 /* Line 1455 of yacc.c */
3332 #line 498 "parser.y"
3333 { (yyval
.attr
) = make_attr(ATTR_DUAL
); ;}
3338 /* Line 1455 of yacc.c */
3339 #line 499 "parser.y"
3340 { (yyval
.attr
) = make_attr(ATTR_ENABLEALLOCATE
); ;}
3345 /* Line 1455 of yacc.c */
3346 #line 500 "parser.y"
3347 { (yyval
.attr
) = make_attr(ATTR_ENCODE
); ;}
3352 /* Line 1455 of yacc.c */
3353 #line 501 "parser.y"
3354 { (yyval
.attr
) = make_attrp(ATTR_ENDPOINT
, (yyvsp
[(3) - (4)].str_list
)); ;}
3359 /* Line 1455 of yacc.c */
3360 #line 502 "parser.y"
3361 { (yyval
.attr
) = make_attrp(ATTR_ENTRY
, (yyvsp
[(3) - (4)].expr
)); ;}
3366 /* Line 1455 of yacc.c */
3367 #line 503 "parser.y"
3368 { (yyval
.attr
) = make_attr(ATTR_EXPLICIT_HANDLE
); ;}
3373 /* Line 1455 of yacc.c */
3374 #line 504 "parser.y"
3375 { (yyval
.attr
) = make_attr(ATTR_FAULTSTATUS
); ;}
3380 /* Line 1455 of yacc.c */
3381 #line 505 "parser.y"
3382 { (yyval
.attr
) = make_attr(ATTR_FORCEALLOCATE
); ;}
3387 /* Line 1455 of yacc.c */
3388 #line 506 "parser.y"
3389 { (yyval
.attr
) = make_attr(ATTR_HANDLE
); ;}
3394 /* Line 1455 of yacc.c */
3395 #line 507 "parser.y"
3396 { (yyval
.attr
) = make_attrp(ATTR_HELPCONTEXT
, (yyvsp
[(3) - (4)].expr
)); ;}
3401 /* Line 1455 of yacc.c */
3402 #line 508 "parser.y"
3403 { (yyval
.attr
) = make_attrp(ATTR_HELPFILE
, (yyvsp
[(3) - (4)].str
)); ;}
3408 /* Line 1455 of yacc.c */
3409 #line 509 "parser.y"
3410 { (yyval
.attr
) = make_attrp(ATTR_HELPSTRING
, (yyvsp
[(3) - (4)].str
)); ;}
3415 /* Line 1455 of yacc.c */
3416 #line 510 "parser.y"
3417 { (yyval
.attr
) = make_attrp(ATTR_HELPSTRINGCONTEXT
, (yyvsp
[(3) - (4)].expr
)); ;}
3422 /* Line 1455 of yacc.c */
3423 #line 511 "parser.y"
3424 { (yyval
.attr
) = make_attrp(ATTR_HELPSTRINGDLL
, (yyvsp
[(3) - (4)].str
)); ;}
3429 /* Line 1455 of yacc.c */
3430 #line 512 "parser.y"
3431 { (yyval
.attr
) = make_attr(ATTR_HIDDEN
); ;}
3436 /* Line 1455 of yacc.c */
3437 #line 513 "parser.y"
3438 { (yyval
.attr
) = make_attrp(ATTR_ID
, (yyvsp
[(3) - (4)].expr
)); ;}
3443 /* Line 1455 of yacc.c */
3444 #line 514 "parser.y"
3445 { (yyval
.attr
) = make_attr(ATTR_IDEMPOTENT
); ;}
3450 /* Line 1455 of yacc.c */
3451 #line 515 "parser.y"
3452 { (yyval
.attr
) = make_attr(ATTR_IGNORE
); ;}
3457 /* Line 1455 of yacc.c */
3458 #line 516 "parser.y"
3459 { (yyval
.attr
) = make_attrp(ATTR_IIDIS
, (yyvsp
[(3) - (4)].expr
)); ;}
3464 /* Line 1455 of yacc.c */
3465 #line 517 "parser.y"
3466 { (yyval
.attr
) = make_attr(ATTR_IMMEDIATEBIND
); ;}
3471 /* Line 1455 of yacc.c */
3472 #line 518 "parser.y"
3473 { (yyval
.attr
) = make_attrp(ATTR_IMPLICIT_HANDLE
, (yyvsp
[(4) - (5)].str
)); ;}
3478 /* Line 1455 of yacc.c */
3479 #line 519 "parser.y"
3480 { (yyval
.attr
) = make_attr(ATTR_IN
); ;}
3485 /* Line 1455 of yacc.c */
3486 #line 520 "parser.y"
3487 { (yyval
.attr
) = make_attr(ATTR_INPUTSYNC
); ;}
3492 /* Line 1455 of yacc.c */
3493 #line 521 "parser.y"
3494 { (yyval
.attr
) = make_attrp(ATTR_LENGTHIS
, (yyvsp
[(3) - (4)].expr_list
)); ;}
3499 /* Line 1455 of yacc.c */
3500 #line 522 "parser.y"
3501 { (yyval
.attr
) = make_attrp(ATTR_LIBLCID
, (yyvsp
[(3) - (4)].expr
)); ;}
3506 /* Line 1455 of yacc.c */
3507 #line 523 "parser.y"
3508 { (yyval
.attr
) = make_attr(ATTR_PARAMLCID
); ;}
3513 /* Line 1455 of yacc.c */
3514 #line 524 "parser.y"
3515 { (yyval
.attr
) = make_attr(ATTR_LICENSED
); ;}
3520 /* Line 1455 of yacc.c */
3521 #line 525 "parser.y"
3522 { (yyval
.attr
) = make_attr(ATTR_LOCAL
); ;}
3527 /* Line 1455 of yacc.c */
3528 #line 526 "parser.y"
3529 { (yyval
.attr
) = make_attr(ATTR_MAYBE
); ;}
3534 /* Line 1455 of yacc.c */
3535 #line 527 "parser.y"
3536 { (yyval
.attr
) = make_attr(ATTR_MESSAGE
); ;}
3541 /* Line 1455 of yacc.c */
3542 #line 528 "parser.y"
3543 { (yyval
.attr
) = make_attr(ATTR_NOCODE
); ;}
3548 /* Line 1455 of yacc.c */
3549 #line 529 "parser.y"
3550 { (yyval
.attr
) = make_attr(ATTR_NONBROWSABLE
); ;}
3555 /* Line 1455 of yacc.c */
3556 #line 530 "parser.y"
3557 { (yyval
.attr
) = make_attr(ATTR_NONCREATABLE
); ;}
3562 /* Line 1455 of yacc.c */
3563 #line 531 "parser.y"
3564 { (yyval
.attr
) = make_attr(ATTR_NONEXTENSIBLE
); ;}
3569 /* Line 1455 of yacc.c */
3570 #line 532 "parser.y"
3571 { (yyval
.attr
) = make_attr(ATTR_NOTIFY
); ;}
3576 /* Line 1455 of yacc.c */
3577 #line 533 "parser.y"
3578 { (yyval
.attr
) = make_attr(ATTR_NOTIFYFLAG
); ;}
3583 /* Line 1455 of yacc.c */
3584 #line 534 "parser.y"
3585 { (yyval
.attr
) = make_attr(ATTR_OBJECT
); ;}
3590 /* Line 1455 of yacc.c */
3591 #line 535 "parser.y"
3592 { (yyval
.attr
) = make_attr(ATTR_ODL
); ;}
3597 /* Line 1455 of yacc.c */
3598 #line 536 "parser.y"
3599 { (yyval
.attr
) = make_attr(ATTR_OLEAUTOMATION
); ;}
3604 /* Line 1455 of yacc.c */
3605 #line 537 "parser.y"
3606 { (yyval
.attr
) = make_attrp(ATTR_OPTIMIZE
, (yyvsp
[(3) - (4)].str
)); ;}
3611 /* Line 1455 of yacc.c */
3612 #line 538 "parser.y"
3613 { (yyval
.attr
) = make_attr(ATTR_OPTIONAL
); ;}
3618 /* Line 1455 of yacc.c */
3619 #line 539 "parser.y"
3620 { (yyval
.attr
) = make_attr(ATTR_OUT
); ;}
3625 /* Line 1455 of yacc.c */
3626 #line 540 "parser.y"
3627 { (yyval
.attr
) = make_attr(ATTR_PARTIALIGNORE
); ;}
3632 /* Line 1455 of yacc.c */
3633 #line 541 "parser.y"
3634 { (yyval
.attr
) = make_attrv(ATTR_POINTERDEFAULT
, (yyvsp
[(3) - (4)].num
)); ;}
3639 /* Line 1455 of yacc.c */
3640 #line 542 "parser.y"
3641 { (yyval
.attr
) = make_attrp(ATTR_PROGID
, (yyvsp
[(3) - (4)].str
)); ;}
3646 /* Line 1455 of yacc.c */
3647 #line 543 "parser.y"
3648 { (yyval
.attr
) = make_attr(ATTR_PROPGET
); ;}
3653 /* Line 1455 of yacc.c */
3654 #line 544 "parser.y"
3655 { (yyval
.attr
) = make_attr(ATTR_PROPPUT
); ;}
3660 /* Line 1455 of yacc.c */
3661 #line 545 "parser.y"
3662 { (yyval
.attr
) = make_attr(ATTR_PROPPUTREF
); ;}
3667 /* Line 1455 of yacc.c */
3668 #line 546 "parser.y"
3669 { (yyval
.attr
) = make_attr(ATTR_PROXY
); ;}
3674 /* Line 1455 of yacc.c */
3675 #line 547 "parser.y"
3676 { (yyval
.attr
) = make_attr(ATTR_PUBLIC
); ;}
3681 /* Line 1455 of yacc.c */
3682 #line 549 "parser.y"
3683 { expr_list_t
*list
= append_expr( NULL
, (yyvsp
[(3) - (6)].expr
) );
3684 list
= append_expr( list
, (yyvsp
[(5) - (6)].expr
) );
3685 (yyval
.attr
) = make_attrp(ATTR_RANGE
, list
); ;}
3690 /* Line 1455 of yacc.c */
3691 #line 552 "parser.y"
3692 { (yyval
.attr
) = make_attr(ATTR_READONLY
); ;}
3697 /* Line 1455 of yacc.c */
3698 #line 553 "parser.y"
3699 { (yyval
.attr
) = make_attrp(ATTR_REPRESENTAS
, (yyvsp
[(3) - (4)].type
)); ;}
3704 /* Line 1455 of yacc.c */
3705 #line 554 "parser.y"
3706 { (yyval
.attr
) = make_attr(ATTR_REQUESTEDIT
); ;}
3711 /* Line 1455 of yacc.c */
3712 #line 555 "parser.y"
3713 { (yyval
.attr
) = make_attr(ATTR_RESTRICTED
); ;}
3718 /* Line 1455 of yacc.c */
3719 #line 556 "parser.y"
3720 { (yyval
.attr
) = make_attr(ATTR_RETVAL
); ;}
3725 /* Line 1455 of yacc.c */
3726 #line 557 "parser.y"
3727 { (yyval
.attr
) = make_attrp(ATTR_SIZEIS
, (yyvsp
[(3) - (4)].expr_list
)); ;}
3732 /* Line 1455 of yacc.c */
3733 #line 558 "parser.y"
3734 { (yyval
.attr
) = make_attr(ATTR_SOURCE
); ;}
3739 /* Line 1455 of yacc.c */
3740 #line 559 "parser.y"
3741 { (yyval
.attr
) = make_attr(ATTR_STRICTCONTEXTHANDLE
); ;}
3746 /* Line 1455 of yacc.c */
3747 #line 560 "parser.y"
3748 { (yyval
.attr
) = make_attr(ATTR_STRING
); ;}
3753 /* Line 1455 of yacc.c */
3754 #line 561 "parser.y"
3755 { (yyval
.attr
) = make_attrp(ATTR_SWITCHIS
, (yyvsp
[(3) - (4)].expr
)); ;}
3760 /* Line 1455 of yacc.c */
3761 #line 562 "parser.y"
3762 { (yyval
.attr
) = make_attrp(ATTR_SWITCHTYPE
, (yyvsp
[(3) - (4)].type
)); ;}
3767 /* Line 1455 of yacc.c */
3768 #line 563 "parser.y"
3769 { (yyval
.attr
) = make_attrp(ATTR_TRANSMITAS
, (yyvsp
[(3) - (4)].type
)); ;}
3774 /* Line 1455 of yacc.c */
3775 #line 564 "parser.y"
3776 { (yyval
.attr
) = make_attrv(ATTR_THREADING
, (yyvsp
[(3) - (4)].num
)); ;}
3781 /* Line 1455 of yacc.c */
3782 #line 565 "parser.y"
3783 { (yyval
.attr
) = make_attr(ATTR_UIDEFAULT
); ;}
3788 /* Line 1455 of yacc.c */
3789 #line 566 "parser.y"
3790 { (yyval
.attr
) = make_attr(ATTR_USESGETLASTERROR
); ;}
3795 /* Line 1455 of yacc.c */
3796 #line 567 "parser.y"
3797 { (yyval
.attr
) = make_attrp(ATTR_USERMARSHAL
, (yyvsp
[(3) - (4)].type
)); ;}
3802 /* Line 1455 of yacc.c */
3803 #line 568 "parser.y"
3804 { (yyval
.attr
) = make_attrp(ATTR_UUID
, (yyvsp
[(3) - (4)].uuid
)); ;}
3809 /* Line 1455 of yacc.c */
3810 #line 569 "parser.y"
3811 { (yyval
.attr
) = make_attr(ATTR_V1ENUM
); ;}
3816 /* Line 1455 of yacc.c */
3817 #line 570 "parser.y"
3818 { (yyval
.attr
) = make_attr(ATTR_VARARG
); ;}
3823 /* Line 1455 of yacc.c */
3824 #line 571 "parser.y"
3825 { (yyval
.attr
) = make_attrv(ATTR_VERSION
, (yyvsp
[(3) - (4)].num
)); ;}
3830 /* Line 1455 of yacc.c */
3831 #line 572 "parser.y"
3832 { (yyval
.attr
) = make_attrp(ATTR_VIPROGID
, (yyvsp
[(3) - (4)].str
)); ;}
3837 /* Line 1455 of yacc.c */
3838 #line 573 "parser.y"
3839 { (yyval
.attr
) = make_attrp(ATTR_WIREMARSHAL
, (yyvsp
[(3) - (4)].type
)); ;}
3844 /* Line 1455 of yacc.c */
3845 #line 574 "parser.y"
3846 { (yyval
.attr
) = make_attrv(ATTR_POINTERTYPE
, (yyvsp
[(1) - (1)].num
)); ;}
3851 /* Line 1455 of yacc.c */
3852 #line 579 "parser.y"
3853 { if (!is_valid_uuid((yyvsp
[(1) - (1)].str
)))
3854 error_loc("invalid UUID: %s\n", (yyvsp
[(1) - (1)].str
));
3855 (yyval
.uuid
) = parse_uuid((yyvsp
[(1) - (1)].str
)); ;}
3860 /* Line 1455 of yacc.c */
3861 #line 584 "parser.y"
3862 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
3867 /* Line 1455 of yacc.c */
3868 #line 585 "parser.y"
3869 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
3874 /* Line 1455 of yacc.c */
3875 #line 586 "parser.y"
3876 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
3881 /* Line 1455 of yacc.c */
3882 #line 587 "parser.y"
3883 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
3888 /* Line 1455 of yacc.c */
3889 #line 590 "parser.y"
3890 { (yyval
.var_list
) = NULL
; ;}
3895 /* Line 1455 of yacc.c */
3896 #line 591 "parser.y"
3897 { (yyval
.var_list
) = append_var( (yyvsp
[(1) - (2)].var_list
), (yyvsp
[(2) - (2)].var
) ); ;}
3902 /* Line 1455 of yacc.c */
3903 #line 594 "parser.y"
3904 { attr_t
*a
= make_attrp(ATTR_CASE
, append_expr( NULL
, (yyvsp
[(2) - (4)].expr
) ));
3905 (yyval
.var
) = (yyvsp
[(4) - (4)].var
); if (!(yyval
.var
)) (yyval
.var
) = make_var(NULL
);
3906 (yyval
.var
)->attrs
= append_attr( (yyval
.var
)->attrs
, a
);
3912 /* Line 1455 of yacc.c */
3913 #line 598 "parser.y"
3914 { attr_t
*a
= make_attr(ATTR_DEFAULT
);
3915 (yyval
.var
) = (yyvsp
[(3) - (3)].var
); if (!(yyval
.var
)) (yyval
.var
) = make_var(NULL
);
3916 (yyval
.var
)->attrs
= append_attr( (yyval
.var
)->attrs
, a
);
3922 /* Line 1455 of yacc.c */
3923 #line 604 "parser.y"
3924 { (yyval
.var_list
) = NULL
; ;}
3929 /* Line 1455 of yacc.c */
3930 #line 605 "parser.y"
3931 { (yyval
.var_list
) = (yyvsp
[(1) - (2)].var_list
); ;}
3936 /* Line 1455 of yacc.c */
3937 #line 609 "parser.y"
3938 { if (!(yyvsp
[(1) - (1)].var
)->eval
)
3939 (yyvsp
[(1) - (1)].var
)->eval
= make_exprl(EXPR_NUM
, 0 /* default for first enum entry */);
3940 (yyval
.var_list
) = append_var( NULL
, (yyvsp
[(1) - (1)].var
) );
3946 /* Line 1455 of yacc.c */
3947 #line 613 "parser.y"
3948 { if (!(yyvsp
[(3) - (3)].var
)->eval
)
3950 var_t
*last
= LIST_ENTRY( list_tail((yyval
.var_list
)), var_t
, entry
);
3951 (yyvsp
[(3) - (3)].var
)->eval
= make_exprl(EXPR_NUM
, last
->eval
->cval
+ 1);
3953 (yyval
.var_list
) = append_var( (yyvsp
[(1) - (3)].var_list
), (yyvsp
[(3) - (3)].var
) );
3959 /* Line 1455 of yacc.c */
3960 #line 622 "parser.y"
3961 { (yyval
.var
) = reg_const((yyvsp
[(1) - (3)].var
));
3962 (yyval
.var
)->eval
= (yyvsp
[(3) - (3)].expr
);
3963 (yyval
.var
)->type
= type_new_int(TYPE_BASIC_INT
, 0);
3969 /* Line 1455 of yacc.c */
3970 #line 626 "parser.y"
3971 { (yyval
.var
) = reg_const((yyvsp
[(1) - (1)].var
));
3972 (yyval
.var
)->type
= type_new_int(TYPE_BASIC_INT
, 0);
3978 /* Line 1455 of yacc.c */
3979 #line 631 "parser.y"
3980 { (yyval
.type
) = type_new_enum((yyvsp
[(2) - (5)].str
), TRUE
, (yyvsp
[(4) - (5)].var_list
)); ;}
3985 /* Line 1455 of yacc.c */
3986 #line 634 "parser.y"
3987 { (yyval
.expr_list
) = append_expr( NULL
, (yyvsp
[(1) - (1)].expr
) ); ;}
3992 /* Line 1455 of yacc.c */
3993 #line 635 "parser.y"
3994 { (yyval
.expr_list
) = append_expr( (yyvsp
[(1) - (3)].expr_list
), (yyvsp
[(3) - (3)].expr
) ); ;}
3999 /* Line 1455 of yacc.c */
4000 #line 648 "parser.y"
4001 { (yyval
.expr
) = make_expr(EXPR_VOID
); ;}
4006 /* Line 1455 of yacc.c */
4007 #line 652 "parser.y"
4008 { (yyval
.expr
) = make_exprl(EXPR_NUM
, (yyvsp
[(1) - (1)].num
)); ;}
4013 /* Line 1455 of yacc.c */
4014 #line 653 "parser.y"
4015 { (yyval
.expr
) = make_exprl(EXPR_HEXNUM
, (yyvsp
[(1) - (1)].num
)); ;}
4020 /* Line 1455 of yacc.c */
4021 #line 654 "parser.y"
4022 { (yyval
.expr
) = make_exprd(EXPR_DOUBLE
, (yyvsp
[(1) - (1)].dbl
)); ;}
4027 /* Line 1455 of yacc.c */
4028 #line 655 "parser.y"
4029 { (yyval
.expr
) = make_exprl(EXPR_TRUEFALSE
, 0); ;}
4034 /* Line 1455 of yacc.c */
4035 #line 656 "parser.y"
4036 { (yyval
.expr
) = make_exprl(EXPR_NUM
, 0); ;}
4041 /* Line 1455 of yacc.c */
4042 #line 657 "parser.y"
4043 { (yyval
.expr
) = make_exprl(EXPR_TRUEFALSE
, 1); ;}
4048 /* Line 1455 of yacc.c */
4049 #line 658 "parser.y"
4050 { (yyval
.expr
) = make_exprs(EXPR_STRLIT
, (yyvsp
[(1) - (1)].str
)); ;}
4055 /* Line 1455 of yacc.c */
4056 #line 659 "parser.y"
4057 { (yyval
.expr
) = make_exprs(EXPR_WSTRLIT
, (yyvsp
[(1) - (1)].str
)); ;}
4062 /* Line 1455 of yacc.c */
4063 #line 660 "parser.y"
4064 { (yyval
.expr
) = make_exprs(EXPR_CHARCONST
, (yyvsp
[(1) - (1)].str
)); ;}
4069 /* Line 1455 of yacc.c */
4070 #line 661 "parser.y"
4071 { (yyval
.expr
) = make_exprs(EXPR_IDENTIFIER
, (yyvsp
[(1) - (1)].str
)); ;}
4076 /* Line 1455 of yacc.c */
4077 #line 662 "parser.y"
4078 { (yyval
.expr
) = make_expr3(EXPR_COND
, (yyvsp
[(1) - (5)].expr
), (yyvsp
[(3) - (5)].expr
), (yyvsp
[(5) - (5)].expr
)); ;}
4083 /* Line 1455 of yacc.c */
4084 #line 663 "parser.y"
4085 { (yyval
.expr
) = make_expr2(EXPR_LOGOR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4090 /* Line 1455 of yacc.c */
4091 #line 664 "parser.y"
4092 { (yyval
.expr
) = make_expr2(EXPR_LOGAND
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4097 /* Line 1455 of yacc.c */
4098 #line 665 "parser.y"
4099 { (yyval
.expr
) = make_expr2(EXPR_OR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4104 /* Line 1455 of yacc.c */
4105 #line 666 "parser.y"
4106 { (yyval
.expr
) = make_expr2(EXPR_XOR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4111 /* Line 1455 of yacc.c */
4112 #line 667 "parser.y"
4113 { (yyval
.expr
) = make_expr2(EXPR_AND
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4118 /* Line 1455 of yacc.c */
4119 #line 668 "parser.y"
4120 { (yyval
.expr
) = make_expr2(EXPR_EQUALITY
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4125 /* Line 1455 of yacc.c */
4126 #line 669 "parser.y"
4127 { (yyval
.expr
) = make_expr2(EXPR_INEQUALITY
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4132 /* Line 1455 of yacc.c */
4133 #line 670 "parser.y"
4134 { (yyval
.expr
) = make_expr2(EXPR_GTR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4139 /* Line 1455 of yacc.c */
4140 #line 671 "parser.y"
4141 { (yyval
.expr
) = make_expr2(EXPR_LESS
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4146 /* Line 1455 of yacc.c */
4147 #line 672 "parser.y"
4148 { (yyval
.expr
) = make_expr2(EXPR_GTREQL
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4153 /* Line 1455 of yacc.c */
4154 #line 673 "parser.y"
4155 { (yyval
.expr
) = make_expr2(EXPR_LESSEQL
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4160 /* Line 1455 of yacc.c */
4161 #line 674 "parser.y"
4162 { (yyval
.expr
) = make_expr2(EXPR_SHL
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4167 /* Line 1455 of yacc.c */
4168 #line 675 "parser.y"
4169 { (yyval
.expr
) = make_expr2(EXPR_SHR
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4174 /* Line 1455 of yacc.c */
4175 #line 676 "parser.y"
4176 { (yyval
.expr
) = make_expr2(EXPR_ADD
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4181 /* Line 1455 of yacc.c */
4182 #line 677 "parser.y"
4183 { (yyval
.expr
) = make_expr2(EXPR_SUB
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4188 /* Line 1455 of yacc.c */
4189 #line 678 "parser.y"
4190 { (yyval
.expr
) = make_expr2(EXPR_MOD
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4195 /* Line 1455 of yacc.c */
4196 #line 679 "parser.y"
4197 { (yyval
.expr
) = make_expr2(EXPR_MUL
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4202 /* Line 1455 of yacc.c */
4203 #line 680 "parser.y"
4204 { (yyval
.expr
) = make_expr2(EXPR_DIV
, (yyvsp
[(1) - (3)].expr
), (yyvsp
[(3) - (3)].expr
)); ;}
4209 /* Line 1455 of yacc.c */
4210 #line 681 "parser.y"
4211 { (yyval
.expr
) = make_expr1(EXPR_LOGNOT
, (yyvsp
[(2) - (2)].expr
)); ;}
4216 /* Line 1455 of yacc.c */
4217 #line 682 "parser.y"
4218 { (yyval
.expr
) = make_expr1(EXPR_NOT
, (yyvsp
[(2) - (2)].expr
)); ;}
4223 /* Line 1455 of yacc.c */
4224 #line 683 "parser.y"
4225 { (yyval
.expr
) = make_expr1(EXPR_POS
, (yyvsp
[(2) - (2)].expr
)); ;}
4230 /* Line 1455 of yacc.c */
4231 #line 684 "parser.y"
4232 { (yyval
.expr
) = make_expr1(EXPR_NEG
, (yyvsp
[(2) - (2)].expr
)); ;}
4237 /* Line 1455 of yacc.c */
4238 #line 685 "parser.y"
4239 { (yyval
.expr
) = make_expr1(EXPR_ADDRESSOF
, (yyvsp
[(2) - (2)].expr
)); ;}
4244 /* Line 1455 of yacc.c */
4245 #line 686 "parser.y"
4246 { (yyval
.expr
) = make_expr1(EXPR_PPTR
, (yyvsp
[(2) - (2)].expr
)); ;}
4251 /* Line 1455 of yacc.c */
4252 #line 687 "parser.y"
4253 { (yyval
.expr
) = make_expr2(EXPR_MEMBER
, make_expr1(EXPR_PPTR
, (yyvsp
[(1) - (3)].expr
)), make_exprs(EXPR_IDENTIFIER
, (yyvsp
[(3) - (3)].str
))); ;}
4258 /* Line 1455 of yacc.c */
4259 #line 688 "parser.y"
4260 { (yyval
.expr
) = make_expr2(EXPR_MEMBER
, (yyvsp
[(1) - (3)].expr
), make_exprs(EXPR_IDENTIFIER
, (yyvsp
[(3) - (3)].str
))); ;}
4265 /* Line 1455 of yacc.c */
4266 #line 690 "parser.y"
4267 { (yyval
.expr
) = make_exprt(EXPR_CAST
, declare_var(NULL
, (yyvsp
[(2) - (5)].declspec
), (yyvsp
[(3) - (5)].declarator
), 0), (yyvsp
[(5) - (5)].expr
)); free((yyvsp
[(2) - (5)].declspec
)); free((yyvsp
[(3) - (5)].declarator
)); ;}
4272 /* Line 1455 of yacc.c */
4273 #line 692 "parser.y"
4274 { (yyval
.expr
) = make_exprt(EXPR_SIZEOF
, declare_var(NULL
, (yyvsp
[(3) - (5)].declspec
), (yyvsp
[(4) - (5)].declarator
), 0), NULL
); free((yyvsp
[(3) - (5)].declspec
)); free((yyvsp
[(4) - (5)].declarator
)); ;}
4279 /* Line 1455 of yacc.c */
4280 #line 693 "parser.y"
4281 { (yyval
.expr
) = make_expr2(EXPR_ARRAY
, (yyvsp
[(1) - (4)].expr
), (yyvsp
[(3) - (4)].expr
)); ;}
4286 /* Line 1455 of yacc.c */
4287 #line 694 "parser.y"
4288 { (yyval
.expr
) = (yyvsp
[(2) - (3)].expr
); ;}
4293 /* Line 1455 of yacc.c */
4294 #line 697 "parser.y"
4295 { (yyval
.expr_list
) = append_expr( NULL
, (yyvsp
[(1) - (1)].expr
) ); ;}
4300 /* Line 1455 of yacc.c */
4301 #line 698 "parser.y"
4302 { (yyval
.expr_list
) = append_expr( (yyvsp
[(1) - (3)].expr_list
), (yyvsp
[(3) - (3)].expr
) ); ;}
4307 /* Line 1455 of yacc.c */
4308 #line 701 "parser.y"
4309 { (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
4310 if (!(yyval
.expr
)->is_const
)
4311 error_loc("expression is not an integer constant\n");
4317 /* Line 1455 of yacc.c */
4318 #line 707 "parser.y"
4319 { (yyval
.expr
) = (yyvsp
[(1) - (1)].expr
);
4320 if (!(yyval
.expr
)->is_const
&& (yyval
.expr
)->type
!= EXPR_STRLIT
&& (yyval
.expr
)->type
!= EXPR_WSTRLIT
)
4321 error_loc("expression is not constant\n");
4327 /* Line 1455 of yacc.c */
4328 #line 713 "parser.y"
4329 { (yyval
.var_list
) = NULL
; ;}
4334 /* Line 1455 of yacc.c */
4335 #line 714 "parser.y"
4336 { (yyval
.var_list
) = append_var_list((yyvsp
[(1) - (2)].var_list
), (yyvsp
[(2) - (2)].var_list
)); ;}
4341 /* Line 1455 of yacc.c */
4342 #line 718 "parser.y"
4343 { const char *first
= LIST_ENTRY(list_head((yyvsp
[(3) - (4)].declarator_list
)), declarator_t
, entry
)->var
->name
;
4344 check_field_attrs(first
, (yyvsp
[(1) - (4)].attr_list
));
4345 (yyval
.var_list
) = set_var_types((yyvsp
[(1) - (4)].attr_list
), (yyvsp
[(2) - (4)].declspec
), (yyvsp
[(3) - (4)].declarator_list
));
4351 /* Line 1455 of yacc.c */
4352 #line 722 "parser.y"
4353 { var_t
*v
= make_var(NULL
);
4354 v
->type
= (yyvsp
[(2) - (3)].type
); v
->attrs
= (yyvsp
[(1) - (3)].attr_list
);
4355 (yyval
.var_list
) = append_var(NULL
, v
);
4361 /* Line 1455 of yacc.c */
4362 #line 729 "parser.y"
4363 { (yyval
.var
) = (yyvsp
[(1) - (2)].var
); ;}
4368 /* Line 1455 of yacc.c */
4369 #line 730 "parser.y"
4370 { (yyval
.var
) = make_var(NULL
); (yyval
.var
)->attrs
= (yyvsp
[(1) - (2)].attr_list
); ;}
4375 /* Line 1455 of yacc.c */
4376 #line 733 "parser.y"
4377 { (yyval
.var_list
) = NULL
; ;}
4382 /* Line 1455 of yacc.c */
4383 #line 734 "parser.y"
4384 { (yyval
.var_list
) = append_var( (yyvsp
[(1) - (2)].var_list
), (yyvsp
[(2) - (2)].var
) ); ;}
4389 /* Line 1455 of yacc.c */
4390 #line 738 "parser.y"
4391 { (yyval
.var
) = (yyvsp
[(1) - (2)].var
); ;}
4396 /* Line 1455 of yacc.c */
4397 #line 739 "parser.y"
4398 { (yyval
.var
) = NULL
; ;}
4403 /* Line 1455 of yacc.c */
4404 #line 742 "parser.y"
4405 { (yyval
.var
) = declare_var(check_field_attrs((yyvsp
[(3) - (3)].declarator
)->var
->name
, (yyvsp
[(1) - (3)].attr_list
)),
4406 (yyvsp
[(2) - (3)].declspec
), (yyvsp
[(3) - (3)].declarator
), FALSE
);
4407 free((yyvsp
[(3) - (3)].declarator
));
4413 /* Line 1455 of yacc.c */
4414 #line 748 "parser.y"
4415 { (yyval
.var
) = (yyvsp
[(1) - (1)].var
);
4416 if (type_get_type((yyval
.var
)->type
) != TYPE_FUNCTION
)
4417 error_loc("only methods may be declared inside the methods section of a dispinterface\n");
4418 check_function_attrs((yyval
.var
)->name
, (yyval
.var
)->attrs
);
4424 /* Line 1455 of yacc.c */
4425 #line 757 "parser.y"
4426 { (yyval
.var
) = declare_var((yyvsp
[(1) - (3)].attr_list
), (yyvsp
[(2) - (3)].declspec
), (yyvsp
[(3) - (3)].declarator
), FALSE
);
4427 free((yyvsp
[(3) - (3)].declarator
));
4433 /* Line 1455 of yacc.c */
4434 #line 760 "parser.y"
4435 { (yyval
.var
) = declare_var(NULL
, (yyvsp
[(1) - (2)].declspec
), (yyvsp
[(2) - (2)].declarator
), FALSE
);
4436 free((yyvsp
[(2) - (2)].declarator
));
4442 /* Line 1455 of yacc.c */
4443 #line 765 "parser.y"
4444 { (yyval
.var
) = NULL
; ;}
4449 /* Line 1455 of yacc.c */
4450 #line 769 "parser.y"
4451 { (yyval
.str
) = NULL
; ;}
4456 /* Line 1455 of yacc.c */
4457 #line 770 "parser.y"
4458 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
4463 /* Line 1455 of yacc.c */
4464 #line 771 "parser.y"
4465 { (yyval
.str
) = (yyvsp
[(1) - (1)].str
); ;}
4470 /* Line 1455 of yacc.c */
4471 #line 774 "parser.y"
4472 { (yyval
.var
) = make_var((yyvsp
[(1) - (1)].str
)); ;}
4477 /* Line 1455 of yacc.c */
4478 #line 776 "parser.y"
4479 { (yyval
.var
) = make_var((yyvsp
[(1) - (1)].str
)); ;}
4484 /* Line 1455 of yacc.c */
4485 #line 779 "parser.y"
4486 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4491 /* Line 1455 of yacc.c */
4492 #line 780 "parser.y"
4493 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4498 /* Line 1455 of yacc.c */
4499 #line 782 "parser.y"
4500 { (yyval
.type
) = type_new_int(type_basic_get_type((yyvsp
[(2) - (2)].type
)), -1); ;}
4505 /* Line 1455 of yacc.c */
4506 #line 783 "parser.y"
4507 { (yyval
.type
) = type_new_int(type_basic_get_type((yyvsp
[(2) - (2)].type
)), 1); ;}
4512 /* Line 1455 of yacc.c */
4513 #line 784 "parser.y"
4514 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT
, 1); ;}
4519 /* Line 1455 of yacc.c */
4520 #line 785 "parser.y"
4521 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4526 /* Line 1455 of yacc.c */
4527 #line 786 "parser.y"
4528 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4533 /* Line 1455 of yacc.c */
4534 #line 787 "parser.y"
4535 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4540 /* Line 1455 of yacc.c */
4541 #line 788 "parser.y"
4542 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4547 /* Line 1455 of yacc.c */
4548 #line 789 "parser.y"
4549 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
4554 /* Line 1455 of yacc.c */
4555 #line 796 "parser.y"
4556 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT
, 0); ;}
4561 /* Line 1455 of yacc.c */
4562 #line 797 "parser.y"
4563 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT16
, 0); ;}
4568 /* Line 1455 of yacc.c */
4569 #line 798 "parser.y"
4570 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT8
, 0); ;}
4575 /* Line 1455 of yacc.c */
4576 #line 799 "parser.y"
4577 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT32
, 0); ;}
4582 /* Line 1455 of yacc.c */
4583 #line 800 "parser.y"
4584 { (yyval
.type
) = type_new_int(TYPE_BASIC_HYPER
, 0); ;}
4589 /* Line 1455 of yacc.c */
4590 #line 801 "parser.y"
4591 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT64
, 0); ;}
4596 /* Line 1455 of yacc.c */
4597 #line 802 "parser.y"
4598 { (yyval
.type
) = type_new_int(TYPE_BASIC_CHAR
, 0); ;}
4603 /* Line 1455 of yacc.c */
4604 #line 803 "parser.y"
4605 { (yyval
.type
) = type_new_int(TYPE_BASIC_INT3264
, 0); ;}
4610 /* Line 1455 of yacc.c */
4611 #line 806 "parser.y"
4612 { (yyval
.type
) = type_new_coclass((yyvsp
[(2) - (2)].str
)); ;}
4617 /* Line 1455 of yacc.c */
4618 #line 807 "parser.y"
4619 { (yyval
.type
) = find_type((yyvsp
[(2) - (2)].str
), 0);
4620 if (type_get_type_detect_alias((yyval
.type
)) != TYPE_COCLASS
)
4621 error_loc("%s was not declared a coclass at %s:%d\n",
4622 (yyvsp
[(2) - (2)].str
), (yyval
.type
)->loc_info
.input_name
,
4623 (yyval
.type
)->loc_info
.line_number
);
4629 /* Line 1455 of yacc.c */
4630 #line 815 "parser.y"
4631 { (yyval
.type
) = (yyvsp
[(2) - (2)].type
);
4632 check_def((yyval
.type
));
4633 (yyval
.type
)->attrs
= check_coclass_attrs((yyvsp
[(2) - (2)].type
)->name
, (yyvsp
[(1) - (2)].attr_list
));
4639 /* Line 1455 of yacc.c */
4640 #line 822 "parser.y"
4641 { (yyval
.type
) = type_coclass_define((yyvsp
[(1) - (5)].type
), (yyvsp
[(3) - (5)].ifref_list
)); ;}
4646 /* Line 1455 of yacc.c */
4647 #line 825 "parser.y"
4648 { (yyval
.ifref_list
) = NULL
; ;}
4653 /* Line 1455 of yacc.c */
4654 #line 826 "parser.y"
4655 { (yyval
.ifref_list
) = append_ifref( (yyvsp
[(1) - (2)].ifref_list
), (yyvsp
[(2) - (2)].ifref
) ); ;}
4660 /* Line 1455 of yacc.c */
4661 #line 830 "parser.y"
4662 { (yyval
.ifref
) = make_ifref((yyvsp
[(2) - (2)].type
)); (yyval
.ifref
)->attrs
= (yyvsp
[(1) - (2)].attr_list
); ;}
4667 /* Line 1455 of yacc.c */
4668 #line 833 "parser.y"
4669 { (yyval
.type
) = get_type(TYPE_INTERFACE
, (yyvsp
[(2) - (2)].str
), 0); ;}
4674 /* Line 1455 of yacc.c */
4675 #line 834 "parser.y"
4676 { (yyval
.type
) = get_type(TYPE_INTERFACE
, (yyvsp
[(2) - (2)].str
), 0); ;}
4681 /* Line 1455 of yacc.c */
4682 #line 837 "parser.y"
4684 (yyval
.type
) = (yyvsp
[(2) - (2)].type
);
4685 check_def((yyval
.type
));
4686 attrs
= make_attr(ATTR_DISPINTERFACE
);
4687 (yyval
.type
)->attrs
= append_attr( check_dispiface_attrs((yyvsp
[(2) - (2)].type
)->name
, (yyvsp
[(1) - (2)].attr_list
)), attrs
);
4688 (yyval
.type
)->defined
= TRUE
;
4694 /* Line 1455 of yacc.c */
4695 #line 846 "parser.y"
4696 { (yyval
.var_list
) = NULL
; ;}
4701 /* Line 1455 of yacc.c */
4702 #line 847 "parser.y"
4703 { (yyval
.var_list
) = append_var( (yyvsp
[(1) - (3)].var_list
), (yyvsp
[(2) - (3)].var
) ); ;}
4708 /* Line 1455 of yacc.c */
4709 #line 850 "parser.y"
4710 { (yyval
.var_list
) = NULL
; ;}
4715 /* Line 1455 of yacc.c */
4716 #line 851 "parser.y"
4717 { (yyval
.var_list
) = append_var( (yyvsp
[(1) - (3)].var_list
), (yyvsp
[(2) - (3)].var
) ); ;}
4722 /* Line 1455 of yacc.c */
4723 #line 857 "parser.y"
4724 { (yyval
.type
) = (yyvsp
[(1) - (5)].type
);
4725 type_dispinterface_define((yyval
.type
), (yyvsp
[(3) - (5)].var_list
), (yyvsp
[(4) - (5)].var_list
));
4731 /* Line 1455 of yacc.c */
4732 #line 861 "parser.y"
4733 { (yyval
.type
) = (yyvsp
[(1) - (5)].type
);
4734 type_dispinterface_define_from_iface((yyval
.type
), (yyvsp
[(3) - (5)].type
));
4740 /* Line 1455 of yacc.c */
4741 #line 866 "parser.y"
4742 { (yyval
.type
) = NULL
; ;}
4747 /* Line 1455 of yacc.c */
4748 #line 867 "parser.y"
4749 { (yyval
.type
) = find_type_or_error2((yyvsp
[(2) - (2)].str
), 0); ;}
4754 /* Line 1455 of yacc.c */
4755 #line 870 "parser.y"
4756 { (yyval
.type
) = get_type(TYPE_INTERFACE
, (yyvsp
[(2) - (2)].str
), 0); ;}
4761 /* Line 1455 of yacc.c */
4762 #line 871 "parser.y"
4763 { (yyval
.type
) = get_type(TYPE_INTERFACE
, (yyvsp
[(2) - (2)].str
), 0); ;}
4768 /* Line 1455 of yacc.c */
4769 #line 874 "parser.y"
4770 { (yyval
.ifinfo
).interface
= (yyvsp
[(2) - (2)].type
);
4771 (yyval
.ifinfo
).old_pointer_default
= pointer_default
;
4772 if (is_attr((yyvsp
[(1) - (2)].attr_list
), ATTR_POINTERDEFAULT
))
4773 pointer_default
= get_attrv((yyvsp
[(1) - (2)].attr_list
), ATTR_POINTERDEFAULT
);
4774 check_def((yyvsp
[(2) - (2)].type
));
4775 (yyvsp
[(2) - (2)].type
)->attrs
= check_iface_attrs((yyvsp
[(2) - (2)].type
)->name
, (yyvsp
[(1) - (2)].attr_list
));
4776 (yyvsp
[(2) - (2)].type
)->defined
= TRUE
;
4782 /* Line 1455 of yacc.c */
4783 #line 885 "parser.y"
4784 { (yyval
.type
) = (yyvsp
[(1) - (6)].ifinfo
).interface
;
4785 type_interface_define((yyval
.type
), (yyvsp
[(2) - (6)].type
), (yyvsp
[(4) - (6)].stmt_list
));
4786 pointer_default
= (yyvsp
[(1) - (6)].ifinfo
).old_pointer_default
;
4792 /* Line 1455 of yacc.c */
4793 #line 893 "parser.y"
4794 { (yyval
.type
) = (yyvsp
[(1) - (8)].ifinfo
).interface
;
4795 type_interface_define((yyval
.type
), find_type_or_error2((yyvsp
[(3) - (8)].str
), 0), (yyvsp
[(6) - (8)].stmt_list
));
4796 pointer_default
= (yyvsp
[(1) - (8)].ifinfo
).old_pointer_default
;
4802 /* Line 1455 of yacc.c */
4803 #line 897 "parser.y"
4804 { (yyval
.type
) = (yyvsp
[(1) - (2)].type
); ;}
4809 /* Line 1455 of yacc.c */
4810 #line 901 "parser.y"
4811 { (yyval
.type
) = (yyvsp
[(1) - (2)].type
); ;}
4816 /* Line 1455 of yacc.c */
4817 #line 902 "parser.y"
4818 { (yyval
.type
) = (yyvsp
[(1) - (2)].type
); ;}
4823 /* Line 1455 of yacc.c */
4824 #line 905 "parser.y"
4825 { (yyval
.type
) = type_new_module((yyvsp
[(2) - (2)].str
)); ;}
4830 /* Line 1455 of yacc.c */
4831 #line 906 "parser.y"
4832 { (yyval
.type
) = type_new_module((yyvsp
[(2) - (2)].str
)); ;}
4837 /* Line 1455 of yacc.c */
4838 #line 909 "parser.y"
4839 { (yyval
.type
) = (yyvsp
[(2) - (2)].type
);
4840 (yyval
.type
)->attrs
= check_module_attrs((yyvsp
[(2) - (2)].type
)->name
, (yyvsp
[(1) - (2)].attr_list
));
4846 /* Line 1455 of yacc.c */
4847 #line 915 "parser.y"
4848 { (yyval
.type
) = (yyvsp
[(1) - (5)].type
);
4849 type_module_define((yyval
.type
), (yyvsp
[(3) - (5)].stmt_list
));
4855 /* Line 1455 of yacc.c */
4856 #line 921 "parser.y"
4857 { (yyval
.stgclass
) = STG_EXTERN
; ;}
4862 /* Line 1455 of yacc.c */
4863 #line 922 "parser.y"
4864 { (yyval
.stgclass
) = STG_STATIC
; ;}
4869 /* Line 1455 of yacc.c */
4870 #line 923 "parser.y"
4871 { (yyval
.stgclass
) = STG_REGISTER
; ;}
4876 /* Line 1455 of yacc.c */
4877 #line 927 "parser.y"
4878 { (yyval
.attr
) = make_attr(ATTR_INLINE
); ;}
4883 /* Line 1455 of yacc.c */
4884 #line 931 "parser.y"
4885 { (yyval
.attr
) = make_attr(ATTR_CONST
); ;}
4890 /* Line 1455 of yacc.c */
4891 #line 934 "parser.y"
4892 { (yyval
.attr_list
) = NULL
; ;}
4897 /* Line 1455 of yacc.c */
4898 #line 935 "parser.y"
4899 { (yyval
.attr_list
) = append_attr((yyvsp
[(1) - (2)].attr_list
), (yyvsp
[(2) - (2)].attr
)); ;}
4904 /* Line 1455 of yacc.c */
4905 #line 938 "parser.y"
4906 { (yyval
.declspec
) = make_decl_spec((yyvsp
[(1) - (2)].type
), (yyvsp
[(2) - (2)].declspec
), NULL
, NULL
, STG_NONE
); ;}
4911 /* Line 1455 of yacc.c */
4912 #line 940 "parser.y"
4913 { (yyval
.declspec
) = make_decl_spec((yyvsp
[(2) - (3)].type
), (yyvsp
[(1) - (3)].declspec
), (yyvsp
[(3) - (3)].declspec
), NULL
, STG_NONE
); ;}
4918 /* Line 1455 of yacc.c */
4919 #line 943 "parser.y"
4920 { (yyval
.declspec
) = NULL
; ;}
4925 /* Line 1455 of yacc.c */
4926 #line 948 "parser.y"
4927 { (yyval
.declspec
) = make_decl_spec(NULL
, (yyvsp
[(2) - (2)].declspec
), NULL
, (yyvsp
[(1) - (2)].attr
), STG_NONE
); ;}
4932 /* Line 1455 of yacc.c */
4933 #line 949 "parser.y"
4934 { (yyval
.declspec
) = make_decl_spec(NULL
, (yyvsp
[(2) - (2)].declspec
), NULL
, (yyvsp
[(1) - (2)].attr
), STG_NONE
); ;}
4939 /* Line 1455 of yacc.c */
4940 #line 950 "parser.y"
4941 { (yyval
.declspec
) = make_decl_spec(NULL
, (yyvsp
[(2) - (2)].declspec
), NULL
, NULL
, (yyvsp
[(1) - (2)].stgclass
)); ;}
4946 /* Line 1455 of yacc.c */
4947 #line 955 "parser.y"
4948 { (yyval
.declarator
) = (yyvsp
[(3) - (3)].declarator
); (yyval
.declarator
)->type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_pointer(pointer_default
, NULL
, (yyvsp
[(2) - (3)].attr_list
))); ;}
4953 /* Line 1455 of yacc.c */
4954 #line 956 "parser.y"
4955 { (yyval
.declarator
) = (yyvsp
[(2) - (2)].declarator
); if ((yyval
.declarator
)->func_type
) (yyval
.declarator
)->func_type
->attrs
= append_attr((yyval
.declarator
)->func_type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
)));
4956 else if ((yyval
.declarator
)->type
) (yyval
.declarator
)->type
->attrs
= append_attr((yyval
.declarator
)->type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
))); ;}
4961 /* Line 1455 of yacc.c */
4962 #line 962 "parser.y"
4963 { (yyval
.declarator
) = make_declarator((yyvsp
[(1) - (1)].var
)); ;}
4968 /* Line 1455 of yacc.c */
4969 #line 963 "parser.y"
4970 { (yyval
.declarator
) = (yyvsp
[(2) - (3)].declarator
); ;}
4975 /* Line 1455 of yacc.c */
4976 #line 964 "parser.y"
4977 { (yyval
.declarator
) = (yyvsp
[(1) - (2)].declarator
); (yyval
.declarator
)->array
= append_array((yyval
.declarator
)->array
, (yyvsp
[(2) - (2)].expr
)); ;}
4982 /* Line 1455 of yacc.c */
4983 #line 965 "parser.y"
4984 { (yyval
.declarator
) = (yyvsp
[(1) - (4)].declarator
);
4985 (yyval
.declarator
)->func_type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_function((yyvsp
[(3) - (4)].var_list
)));
4986 (yyval
.declarator
)->type
= NULL
;
4992 /* Line 1455 of yacc.c */
4993 #line 974 "parser.y"
4994 { (yyval
.declarator
) = (yyvsp
[(3) - (3)].declarator
); (yyval
.declarator
)->type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_pointer(pointer_default
, NULL
, (yyvsp
[(2) - (3)].attr_list
))); ;}
4999 /* Line 1455 of yacc.c */
5000 #line 975 "parser.y"
5001 { (yyval
.declarator
) = (yyvsp
[(2) - (2)].declarator
); if ((yyval
.declarator
)->func_type
) (yyval
.declarator
)->func_type
->attrs
= append_attr((yyval
.declarator
)->func_type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
)));
5002 else if ((yyval
.declarator
)->type
) (yyval
.declarator
)->type
->attrs
= append_attr((yyval
.declarator
)->type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
))); ;}
5007 /* Line 1455 of yacc.c */
5008 #line 983 "parser.y"
5009 { (yyval
.declarator
) = (yyvsp
[(3) - (3)].declarator
); (yyval
.declarator
)->type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_pointer(pointer_default
, NULL
, (yyvsp
[(2) - (3)].attr_list
))); ;}
5014 /* Line 1455 of yacc.c */
5015 #line 984 "parser.y"
5016 { (yyval
.declarator
) = (yyvsp
[(2) - (2)].declarator
); if ((yyval
.declarator
)->func_type
) (yyval
.declarator
)->func_type
->attrs
= append_attr((yyval
.declarator
)->func_type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
)));
5017 else if ((yyval
.declarator
)->type
) (yyval
.declarator
)->type
->attrs
= append_attr((yyval
.declarator
)->type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
))); ;}
5022 /* Line 1455 of yacc.c */
5023 #line 989 "parser.y"
5024 { (yyval
.declarator
) = make_declarator(NULL
); ;}
5029 /* Line 1455 of yacc.c */
5030 #line 995 "parser.y"
5031 { (yyval
.declarator
) = (yyvsp
[(2) - (3)].declarator
); ;}
5036 /* Line 1455 of yacc.c */
5037 #line 996 "parser.y"
5038 { (yyval
.declarator
) = (yyvsp
[(1) - (2)].declarator
); (yyval
.declarator
)->array
= append_array((yyval
.declarator
)->array
, (yyvsp
[(2) - (2)].expr
)); ;}
5043 /* Line 1455 of yacc.c */
5044 #line 997 "parser.y"
5045 { (yyval
.declarator
) = make_declarator(NULL
); (yyval
.declarator
)->array
= append_array((yyval
.declarator
)->array
, (yyvsp
[(1) - (1)].expr
)); ;}
5050 /* Line 1455 of yacc.c */
5051 #line 999 "parser.y"
5052 { (yyval
.declarator
) = make_declarator(NULL
);
5053 (yyval
.declarator
)->func_type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_function((yyvsp
[(2) - (3)].var_list
)));
5054 (yyval
.declarator
)->type
= NULL
;
5060 /* Line 1455 of yacc.c */
5061 #line 1004 "parser.y"
5062 { (yyval
.declarator
) = (yyvsp
[(1) - (4)].declarator
);
5063 (yyval
.declarator
)->func_type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_function((yyvsp
[(3) - (4)].var_list
)));
5064 (yyval
.declarator
)->type
= NULL
;
5070 /* Line 1455 of yacc.c */
5071 #line 1013 "parser.y"
5072 { (yyval
.declarator
) = (yyvsp
[(3) - (3)].declarator
); (yyval
.declarator
)->type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_pointer(pointer_default
, NULL
, (yyvsp
[(2) - (3)].attr_list
))); ;}
5077 /* Line 1455 of yacc.c */
5078 #line 1014 "parser.y"
5079 { (yyval
.declarator
) = (yyvsp
[(2) - (2)].declarator
); (yyval
.declarator
)->type
->attrs
= append_attr((yyval
.declarator
)->type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
))); ;}
5084 /* Line 1455 of yacc.c */
5085 #line 1021 "parser.y"
5086 { (yyval
.declarator
) = (yyvsp
[(3) - (3)].declarator
); (yyval
.declarator
)->type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_pointer(pointer_default
, NULL
, (yyvsp
[(2) - (3)].attr_list
))); ;}
5091 /* Line 1455 of yacc.c */
5092 #line 1022 "parser.y"
5093 { (yyval
.declarator
) = (yyvsp
[(2) - (2)].declarator
); (yyval
.declarator
)->type
->attrs
= append_attr((yyval
.declarator
)->type
->attrs
, make_attrp(ATTR_CALLCONV
, (yyvsp
[(1) - (2)].str
))); ;}
5098 /* Line 1455 of yacc.c */
5099 #line 1026 "parser.y"
5100 { (yyval
.declarator
) = make_declarator(NULL
); ;}
5105 /* Line 1455 of yacc.c */
5106 #line 1034 "parser.y"
5107 { (yyval
.declarator
) = make_declarator((yyvsp
[(1) - (1)].var
)); ;}
5112 /* Line 1455 of yacc.c */
5113 #line 1035 "parser.y"
5114 { (yyval
.declarator
) = (yyvsp
[(2) - (3)].declarator
); ;}
5119 /* Line 1455 of yacc.c */
5120 #line 1036 "parser.y"
5121 { (yyval
.declarator
) = (yyvsp
[(1) - (2)].declarator
); (yyval
.declarator
)->array
= append_array((yyval
.declarator
)->array
, (yyvsp
[(2) - (2)].expr
)); ;}
5126 /* Line 1455 of yacc.c */
5127 #line 1037 "parser.y"
5128 { (yyval
.declarator
) = make_declarator(NULL
); (yyval
.declarator
)->array
= append_array((yyval
.declarator
)->array
, (yyvsp
[(1) - (1)].expr
)); ;}
5133 /* Line 1455 of yacc.c */
5134 #line 1039 "parser.y"
5135 { (yyval
.declarator
) = make_declarator(NULL
);
5136 (yyval
.declarator
)->func_type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_function((yyvsp
[(2) - (3)].var_list
)));
5137 (yyval
.declarator
)->type
= NULL
;
5143 /* Line 1455 of yacc.c */
5144 #line 1044 "parser.y"
5145 { (yyval
.declarator
) = (yyvsp
[(1) - (4)].declarator
);
5146 (yyval
.declarator
)->func_type
= append_ptrchain_type((yyval
.declarator
)->type
, type_new_function((yyvsp
[(3) - (4)].var_list
)));
5147 (yyval
.declarator
)->type
= NULL
;
5153 /* Line 1455 of yacc.c */
5154 #line 1051 "parser.y"
5155 { (yyval
.declarator_list
) = append_declarator( NULL
, (yyvsp
[(1) - (1)].declarator
) ); ;}
5160 /* Line 1455 of yacc.c */
5161 #line 1052 "parser.y"
5162 { (yyval
.declarator_list
) = append_declarator( (yyvsp
[(1) - (3)].declarator_list
), (yyvsp
[(3) - (3)].declarator
) ); ;}
5167 /* Line 1455 of yacc.c */
5168 #line 1055 "parser.y"
5169 { (yyval
.expr
) = NULL
; ;}
5174 /* Line 1455 of yacc.c */
5175 #line 1056 "parser.y"
5176 { (yyval
.expr
) = (yyvsp
[(2) - (2)].expr
); ;}
5181 /* Line 1455 of yacc.c */
5182 #line 1059 "parser.y"
5183 { (yyval
.declarator
) = (yyvsp
[(1) - (2)].declarator
); (yyval
.declarator
)->bits
= (yyvsp
[(2) - (2)].expr
);
5184 if (!(yyval
.declarator
)->bits
&& !(yyval
.declarator
)->var
->name
)
5185 error_loc("unnamed fields are not allowed\n");
5191 /* Line 1455 of yacc.c */
5192 #line 1066 "parser.y"
5193 { (yyval
.declarator_list
) = append_declarator( NULL
, (yyvsp
[(1) - (1)].declarator
) ); ;}
5198 /* Line 1455 of yacc.c */
5199 #line 1068 "parser.y"
5200 { (yyval
.declarator_list
) = append_declarator( (yyvsp
[(1) - (3)].declarator_list
), (yyvsp
[(3) - (3)].declarator
) ); ;}
5205 /* Line 1455 of yacc.c */
5206 #line 1072 "parser.y"
5207 { (yyval
.declarator
) = (yyvsp
[(1) - (1)].declarator
); ;}
5212 /* Line 1455 of yacc.c */
5213 #line 1073 "parser.y"
5214 { (yyval
.declarator
) = (yyvsp
[(1) - (3)].declarator
); (yyvsp
[(1) - (3)].declarator
)->var
->eval
= (yyvsp
[(3) - (3)].expr
); ;}
5219 /* Line 1455 of yacc.c */
5220 #line 1077 "parser.y"
5221 { (yyval
.num
) = THREADING_APARTMENT
; ;}
5226 /* Line 1455 of yacc.c */
5227 #line 1078 "parser.y"
5228 { (yyval
.num
) = THREADING_NEUTRAL
; ;}
5233 /* Line 1455 of yacc.c */
5234 #line 1079 "parser.y"
5235 { (yyval
.num
) = THREADING_SINGLE
; ;}
5240 /* Line 1455 of yacc.c */
5241 #line 1080 "parser.y"
5242 { (yyval
.num
) = THREADING_FREE
; ;}
5247 /* Line 1455 of yacc.c */
5248 #line 1081 "parser.y"
5249 { (yyval
.num
) = THREADING_BOTH
; ;}
5254 /* Line 1455 of yacc.c */
5255 #line 1085 "parser.y"
5256 { (yyval
.num
) = RPC_FC_RP
; ;}
5261 /* Line 1455 of yacc.c */
5262 #line 1086 "parser.y"
5263 { (yyval
.num
) = RPC_FC_UP
; ;}
5268 /* Line 1455 of yacc.c */
5269 #line 1087 "parser.y"
5270 { (yyval
.num
) = RPC_FC_FP
; ;}
5275 /* Line 1455 of yacc.c */
5276 #line 1090 "parser.y"
5277 { (yyval
.type
) = type_new_struct((yyvsp
[(2) - (5)].str
), TRUE
, (yyvsp
[(4) - (5)].var_list
)); ;}
5282 /* Line 1455 of yacc.c */
5283 #line 1093 "parser.y"
5284 { (yyval
.type
) = type_new_void(); ;}
5289 /* Line 1455 of yacc.c */
5290 #line 1094 "parser.y"
5291 { (yyval
.type
) = find_type_or_error((yyvsp
[(1) - (1)].str
), 0); ;}
5296 /* Line 1455 of yacc.c */
5297 #line 1095 "parser.y"
5298 { (yyval
.type
) = (yyvsp
[(1) - (1)].type
); ;}
5303 /* Line 1455 of yacc.c */
5304 #line 1096 "parser.y"
5305 { (yyval
.type
) = (yyvsp
[(1) - (1)].type
); ;}
5310 /* Line 1455 of yacc.c */
5311 #line 1097 "parser.y"
5312 { (yyval
.type
) = type_new_enum((yyvsp
[(2) - (2)].str
), FALSE
, NULL
); ;}
5317 /* Line 1455 of yacc.c */
5318 #line 1098 "parser.y"
5319 { (yyval
.type
) = (yyvsp
[(1) - (1)].type
); ;}
5324 /* Line 1455 of yacc.c */
5325 #line 1099 "parser.y"
5326 { (yyval
.type
) = type_new_struct((yyvsp
[(2) - (2)].str
), FALSE
, NULL
); ;}
5331 /* Line 1455 of yacc.c */
5332 #line 1100 "parser.y"
5333 { (yyval
.type
) = (yyvsp
[(1) - (1)].type
); ;}
5338 /* Line 1455 of yacc.c */
5339 #line 1101 "parser.y"
5340 { (yyval
.type
) = type_new_nonencapsulated_union((yyvsp
[(2) - (2)].str
), FALSE
, NULL
); ;}
5345 /* Line 1455 of yacc.c */
5346 #line 1102 "parser.y"
5347 { (yyval
.type
) = make_safearray((yyvsp
[(3) - (4)].type
)); ;}
5352 /* Line 1455 of yacc.c */
5353 #line 1106 "parser.y"
5354 { reg_typedefs((yyvsp
[(3) - (4)].declspec
), (yyvsp
[(4) - (4)].declarator_list
), check_typedef_attrs((yyvsp
[(2) - (4)].attr_list
)));
5355 (yyval
.statement
) = make_statement_typedef((yyvsp
[(4) - (4)].declarator_list
));
5361 /* Line 1455 of yacc.c */
5362 #line 1112 "parser.y"
5363 { (yyval
.type
) = type_new_nonencapsulated_union((yyvsp
[(2) - (5)].str
), TRUE
, (yyvsp
[(4) - (5)].var_list
)); ;}
5368 /* Line 1455 of yacc.c */
5369 #line 1115 "parser.y"
5370 { (yyval
.type
) = type_new_encapsulated_union((yyvsp
[(2) - (10)].str
), (yyvsp
[(5) - (10)].var
), (yyvsp
[(7) - (10)].var
), (yyvsp
[(9) - (10)].var_list
)); ;}
5375 /* Line 1455 of yacc.c */
5376 #line 1119 "parser.y"
5377 { (yyval
.num
) = MAKEVERSION((yyvsp
[(1) - (1)].num
), 0); ;}
5382 /* Line 1455 of yacc.c */
5383 #line 1120 "parser.y"
5384 { (yyval
.num
) = MAKEVERSION((yyvsp
[(1) - (3)].num
), (yyvsp
[(3) - (3)].num
)); ;}
5389 /* Line 1455 of yacc.c */
5390 #line 5391 "parser.tab.c"
5393 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
5397 YY_STACK_PRINT (yyss
, yyssp
);
5401 /* Now `shift' the result of the reduction. Determine what state
5402 that goes to, based on the state we popped back to and the rule
5403 number reduced by. */
5407 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
5408 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
5409 yystate
= yytable
[yystate
];
5411 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
5416 /*------------------------------------.
5417 | yyerrlab -- here on detecting error |
5418 `------------------------------------*/
5420 /* If not already recovering from an error, report this error. */
5424 #if ! YYERROR_VERBOSE
5425 yyerror (YY_("syntax error"));
5428 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
5429 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
5431 YYSIZE_T yyalloc
= 2 * yysize
;
5432 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
5433 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
5434 if (yymsg
!= yymsgbuf
)
5435 YYSTACK_FREE (yymsg
);
5436 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
5438 yymsg_alloc
= yyalloc
;
5442 yymsg_alloc
= sizeof yymsgbuf
;
5446 if (0 < yysize
&& yysize
<= yymsg_alloc
)
5448 (void) yysyntax_error (yymsg
, yystate
, yychar
);
5453 yyerror (YY_("syntax error"));
5455 goto yyexhaustedlab
;
5463 if (yyerrstatus
== 3)
5465 /* If just tried and failed to reuse lookahead token after an
5466 error, discard it. */
5468 if (yychar
<= YYEOF
)
5470 /* Return failure if at end of input. */
5471 if (yychar
== YYEOF
)
5476 yydestruct ("Error: discarding",
5482 /* Else will try to reuse lookahead token after shifting the error
5487 /*---------------------------------------------------.
5488 | yyerrorlab -- error raised explicitly by YYERROR. |
5489 `---------------------------------------------------*/
5492 /* Pacify compilers like GCC when the user code never invokes
5493 YYERROR and the label yyerrorlab therefore never appears in user
5495 if (/*CONSTCOND*/ 0)
5498 /* Do not reclaim the symbols of the rule which action triggered
5502 YY_STACK_PRINT (yyss
, yyssp
);
5507 /*-------------------------------------------------------------.
5508 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5509 `-------------------------------------------------------------*/
5511 yyerrstatus
= 3; /* Each real token shifted decrements this. */
5515 yyn
= yypact
[yystate
];
5516 if (yyn
!= YYPACT_NINF
)
5519 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
5527 /* Pop the current state because it cannot handle the error token. */
5532 yydestruct ("Error: popping",
5533 yystos
[yystate
], yyvsp
);
5536 YY_STACK_PRINT (yyss
, yyssp
);
5542 /* Shift the error token. */
5543 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
5549 /*-------------------------------------.
5550 | yyacceptlab -- YYACCEPT comes here. |
5551 `-------------------------------------*/
5556 /*-----------------------------------.
5557 | yyabortlab -- YYABORT comes here. |
5558 `-----------------------------------*/
5563 #if !defined(yyoverflow) || YYERROR_VERBOSE
5564 /*-------------------------------------------------.
5565 | yyexhaustedlab -- memory exhaustion comes here. |
5566 `-------------------------------------------------*/
5568 yyerror (YY_("memory exhausted"));
5574 if (yychar
!= YYEMPTY
)
5575 yydestruct ("Cleanup: discarding lookahead",
5577 /* Do not reclaim the symbols of the rule which action triggered
5578 this YYABORT or YYACCEPT. */
5580 YY_STACK_PRINT (yyss
, yyssp
);
5581 while (yyssp
!= yyss
)
5583 yydestruct ("Cleanup: popping",
5584 yystos
[*yyssp
], yyvsp
);
5589 YYSTACK_FREE (yyss
);
5592 if (yymsg
!= yymsgbuf
)
5593 YYSTACK_FREE (yymsg
);
5595 /* Make sure YYID is used. */
5596 return YYID (yyresult
);
5601 /* Line 1675 of yacc.c */
5602 #line 1123 "parser.y"
5605 static void decl_builtin_basic(const char *name
, enum type_basic_type type
)
5607 type_t
*t
= type_new_basic(type
);
5608 reg_type(t
, name
, 0);
5611 static void decl_builtin_alias(const char *name
, type_t
*t
)
5613 reg_type(type_new_alias(t
, name
), name
, 0);
5616 void init_types(void)
5618 decl_builtin_basic("byte", TYPE_BASIC_BYTE
);
5619 decl_builtin_basic("wchar_t", TYPE_BASIC_WCHAR
);
5620 decl_builtin_basic("float", TYPE_BASIC_FLOAT
);
5621 decl_builtin_basic("double", TYPE_BASIC_DOUBLE
);
5622 decl_builtin_basic("error_status_t", TYPE_BASIC_ERROR_STATUS_T
);
5623 decl_builtin_basic("handle_t", TYPE_BASIC_HANDLE
);
5624 decl_builtin_alias("boolean", type_new_basic(TYPE_BASIC_BYTE
));
5627 static str_list_t
*append_str(str_list_t
*list
, char *str
)
5629 struct str_list_entry_t
*entry
;
5631 if (!str
) return list
;
5634 list
= xmalloc( sizeof(*list
) );
5637 entry
= xmalloc( sizeof(*entry
) );
5639 list_add_tail( list
, &entry
->entry
);
5643 static attr_list_t
*append_attr(attr_list_t
*list
, attr_t
*attr
)
5645 attr_t
*attr_existing
;
5646 if (!attr
) return list
;
5649 list
= xmalloc( sizeof(*list
) );
5652 LIST_FOR_EACH_ENTRY(attr_existing
, list
, attr_t
, entry
)
5653 if (attr_existing
->type
== attr
->type
)
5655 parser_warning("duplicate attribute %s\n", get_attr_display_name(attr
->type
));
5656 /* use the last attribute, like MIDL does */
5657 list_remove(&attr_existing
->entry
);
5660 list_add_tail( list
, &attr
->entry
);
5664 static attr_list_t
*move_attr(attr_list_t
*dst
, attr_list_t
*src
, enum attr_type type
)
5667 if (!src
) return dst
;
5668 LIST_FOR_EACH_ENTRY(attr
, src
, attr_t
, entry
)
5669 if (attr
->type
== type
)
5671 list_remove(&attr
->entry
);
5672 return append_attr(dst
, attr
);
5677 static attr_list_t
*append_attr_list(attr_list_t
*new_list
, attr_list_t
*old_list
)
5681 if (!old_list
) return new_list
;
5683 while ((entry
= list_head(old_list
)))
5685 attr_t
*attr
= LIST_ENTRY(entry
, attr_t
, entry
);
5687 new_list
= append_attr(new_list
, attr
);
5692 static attr_list_t
*dupattrs(const attr_list_t
*list
)
5694 attr_list_t
*new_list
;
5697 if (!list
) return NULL
;
5699 new_list
= xmalloc( sizeof(*list
) );
5700 list_init( new_list
);
5701 LIST_FOR_EACH_ENTRY(attr
, list
, const attr_t
, entry
)
5703 attr_t
*new_attr
= xmalloc(sizeof(*new_attr
));
5705 list_add_tail(new_list
, &new_attr
->entry
);
5710 static decl_spec_t
*make_decl_spec(type_t
*type
, decl_spec_t
*left
, decl_spec_t
*right
, attr_t
*attr
, enum storage_class stgclass
)
5712 decl_spec_t
*declspec
= left
? left
: right
;
5715 declspec
= xmalloc(sizeof(*declspec
));
5716 declspec
->type
= NULL
;
5717 declspec
->attrs
= NULL
;
5718 declspec
->stgclass
= STG_NONE
;
5720 declspec
->type
= type
;
5721 if (left
&& declspec
!= left
)
5723 declspec
->attrs
= append_attr_list(declspec
->attrs
, left
->attrs
);
5724 if (declspec
->stgclass
== STG_NONE
)
5725 declspec
->stgclass
= left
->stgclass
;
5726 else if (left
->stgclass
!= STG_NONE
)
5727 error_loc("only one storage class can be specified\n");
5728 assert(!left
->type
);
5731 if (right
&& declspec
!= right
)
5733 declspec
->attrs
= append_attr_list(declspec
->attrs
, right
->attrs
);
5734 if (declspec
->stgclass
== STG_NONE
)
5735 declspec
->stgclass
= right
->stgclass
;
5736 else if (right
->stgclass
!= STG_NONE
)
5737 error_loc("only one storage class can be specified\n");
5738 assert(!right
->type
);
5742 declspec
->attrs
= append_attr(declspec
->attrs
, attr
);
5743 if (declspec
->stgclass
== STG_NONE
)
5744 declspec
->stgclass
= stgclass
;
5745 else if (stgclass
!= STG_NONE
)
5746 error_loc("only one storage class can be specified\n");
5748 /* apply attributes to type */
5749 if (type
&& declspec
->attrs
)
5752 declspec
->type
= duptype(type
, 1);
5753 attrs
= dupattrs(type
->attrs
);
5754 declspec
->type
->attrs
= append_attr_list(attrs
, declspec
->attrs
);
5755 declspec
->attrs
= NULL
;
5761 static attr_t
*make_attr(enum attr_type type
)
5763 attr_t
*a
= xmalloc(sizeof(attr_t
));
5769 static attr_t
*make_attrv(enum attr_type type
, unsigned int val
)
5771 attr_t
*a
= xmalloc(sizeof(attr_t
));
5777 static attr_t
*make_attrp(enum attr_type type
, void *val
)
5779 attr_t
*a
= xmalloc(sizeof(attr_t
));
5785 static expr_list_t
*append_expr(expr_list_t
*list
, expr_t
*expr
)
5787 if (!expr
) return list
;
5790 list
= xmalloc( sizeof(*list
) );
5793 list_add_tail( list
, &expr
->entry
);
5797 static array_dims_t
*append_array(array_dims_t
*list
, expr_t
*expr
)
5799 if (!expr
) return list
;
5802 list
= xmalloc( sizeof(*list
) );
5805 list_add_tail( list
, &expr
->entry
);
5809 static struct list type_pool
= LIST_INIT(type_pool
);
5816 type_t
*alloc_type(void)
5818 type_pool_node_t
*node
= xmalloc(sizeof *node
);
5819 list_add_tail(&type_pool
, &node
->link
);
5823 void set_all_tfswrite(int val
)
5825 type_pool_node_t
*node
;
5826 LIST_FOR_EACH_ENTRY(node
, &type_pool
, type_pool_node_t
, link
)
5827 node
->data
.tfswrite
= val
;
5830 void clear_all_offsets(void)
5832 type_pool_node_t
*node
;
5833 LIST_FOR_EACH_ENTRY(node
, &type_pool
, type_pool_node_t
, link
)
5834 node
->data
.typestring_offset
= node
->data
.ptrdesc
= 0;
5837 static void type_function_add_head_arg(type_t
*type
, var_t
*arg
)
5839 if (!type
->details
.function
->args
)
5841 type
->details
.function
->args
= xmalloc( sizeof(*type
->details
.function
->args
) );
5842 list_init( type
->details
.function
->args
);
5844 list_add_head( type
->details
.function
->args
, &arg
->entry
);
5847 static int is_allowed_range_type(const type_t
*type
)
5849 switch (type_get_type(type
))
5854 switch (type_basic_get_type(type
))
5856 case TYPE_BASIC_INT8
:
5857 case TYPE_BASIC_INT16
:
5858 case TYPE_BASIC_INT32
:
5859 case TYPE_BASIC_INT64
:
5860 case TYPE_BASIC_INT
:
5861 case TYPE_BASIC_INT3264
:
5862 case TYPE_BASIC_BYTE
:
5863 case TYPE_BASIC_CHAR
:
5864 case TYPE_BASIC_WCHAR
:
5865 case TYPE_BASIC_HYPER
:
5867 case TYPE_BASIC_FLOAT
:
5868 case TYPE_BASIC_DOUBLE
:
5869 case TYPE_BASIC_ERROR_STATUS_T
:
5870 case TYPE_BASIC_HANDLE
:
5879 static type_t
*append_ptrchain_type(type_t
*ptrchain
, type_t
*type
)
5881 type_t
*ptrchain_type
;
5884 for (ptrchain_type
= ptrchain
; type_pointer_get_ref(ptrchain_type
); ptrchain_type
= type_pointer_get_ref(ptrchain_type
))
5886 assert(ptrchain_type
->type_type
== TYPE_POINTER
);
5887 ptrchain_type
->details
.pointer
.ref
= type
;
5891 static var_t
*declare_var(attr_list_t
*attrs
, decl_spec_t
*decl_spec
, const declarator_t
*decl
,
5894 var_t
*v
= decl
->var
;
5895 expr_list_t
*sizes
= get_attrp(attrs
, ATTR_SIZEIS
);
5896 expr_list_t
*lengs
= get_attrp(attrs
, ATTR_LENGTHIS
);
5900 array_dims_t
*arr
= decl
? decl
->array
: NULL
;
5901 type_t
*func_type
= decl
? decl
->func_type
: NULL
;
5902 type_t
*type
= decl_spec
->type
;
5904 if (is_attr(type
->attrs
, ATTR_INLINE
))
5907 error_loc("inline attribute applied to non-function type\n");
5911 /* move inline attribute from return type node to function node */
5912 for (t
= func_type
; is_ptr(t
); t
= type_pointer_get_ref(t
))
5914 t
->attrs
= move_attr(t
->attrs
, type
->attrs
, ATTR_INLINE
);
5918 /* add type onto the end of the pointers in pident->type */
5919 v
->type
= append_ptrchain_type(decl
? decl
->type
: NULL
, type
);
5920 v
->stgclass
= decl_spec
->stgclass
;
5923 /* check for pointer attribute being applied to non-pointer, non-array
5927 int ptr_attr
= get_attrv(v
->attrs
, ATTR_POINTERTYPE
);
5928 const type_t
*ptr
= NULL
;
5929 /* pointer attributes on the left side of the type belong to the function
5930 * pointer, if one is being declared */
5931 type_t
**pt
= func_type
? &func_type
: &v
->type
;
5932 for (ptr
= *pt
; ptr
&& !ptr_attr
; )
5934 ptr_attr
= get_attrv(ptr
->attrs
, ATTR_POINTERTYPE
);
5935 if (!ptr_attr
&& type_is_alias(ptr
))
5936 ptr
= type_alias_get_aliasee(ptr
);
5942 if (ptr_attr
&& ptr_attr
!= RPC_FC_UP
&&
5943 type_get_type(type_pointer_get_ref(ptr
)) == TYPE_INTERFACE
)
5944 warning_loc_info(&v
->loc_info
,
5945 "%s: pointer attribute applied to interface "
5946 "pointer type has no effect\n", v
->name
);
5947 if (!ptr_attr
&& top
&& (*pt
)->details
.pointer
.def_fc
!= RPC_FC_RP
)
5949 /* FIXME: this is a horrible hack to cope with the issue that we
5950 * store an offset to the typeformat string in the type object, but
5951 * two typeformat strings may be written depending on whether the
5952 * pointer is a toplevel parameter or not */
5953 *pt
= duptype(*pt
, 1);
5957 error_loc("%s: pointer attribute applied to non-pointer type\n", v
->name
);
5960 if (is_attr(v
->attrs
, ATTR_STRING
))
5964 if (!is_ptr(v
->type
) && !arr
)
5965 error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n",
5969 t
= type_pointer_get_ref(t
);
5971 if (type_get_type(t
) != TYPE_BASIC
&&
5972 (get_basic_fc(t
) != RPC_FC_CHAR
&&
5973 get_basic_fc(t
) != RPC_FC_BYTE
&&
5974 get_basic_fc(t
) != RPC_FC_WCHAR
))
5976 error_loc("'%s': [string] attribute is only valid on 'char', 'byte', or 'wchar_t' pointers and arrays\n",
5981 if (is_attr(v
->attrs
, ATTR_V1ENUM
))
5983 if (type_get_type_detect_alias(v
->type
) != TYPE_ENUM
)
5984 error_loc("'%s': [v1_enum] attribute applied to non-enum type\n", v
->name
);
5987 if (is_attr(v
->attrs
, ATTR_RANGE
) && !is_allowed_range_type(v
->type
))
5988 error_loc("'%s': [range] attribute applied to non-integer type\n",
5993 if (arr
) LIST_FOR_EACH_ENTRY_REV(dim
, arr
, expr_t
, entry
)
5996 error_loc("%s: only the first array dimension can be unspecified\n", v
->name
);
6001 error_loc("%s: array dimension must be positive\n", v
->name
);
6003 /* FIXME: should use a type_memsize that allows us to pass in a pointer size */
6006 unsigned int size
= type_memsize(v
->type
);
6008 if (0xffffffffu
/ size
< dim
->cval
)
6009 error_loc("%s: total array size is too large\n", v
->name
);
6015 *ptype
= type_new_array(NULL
, *ptype
, FALSE
,
6016 dim
->is_const
? dim
->cval
: 0,
6017 dim
->is_const
? NULL
: dim
, NULL
,
6022 if (sizes
) LIST_FOR_EACH_ENTRY(dim
, sizes
, expr_t
, entry
)
6024 if (dim
->type
!= EXPR_VOID
)
6026 if (is_array(*ptype
))
6028 if (!type_array_get_conformance(*ptype
) ||
6029 type_array_get_conformance(*ptype
)->type
!= EXPR_VOID
)
6030 error_loc("%s: cannot specify size_is for an already sized array\n", v
->name
);
6032 *ptype
= type_new_array((*ptype
)->name
,
6033 type_array_get_element(*ptype
), FALSE
,
6036 else if (is_ptr(*ptype
))
6037 *ptype
= type_new_array((*ptype
)->name
, type_pointer_get_ref(*ptype
), TRUE
,
6038 0, dim
, NULL
, pointer_default
);
6040 error_loc("%s: size_is attribute applied to illegal type\n", v
->name
);
6044 ptype
= &(*ptype
)->details
.pointer
.ref
;
6045 else if (is_array(*ptype
))
6046 ptype
= &(*ptype
)->details
.array
.elem
;
6048 error_loc("%s: too many expressions in size_is attribute\n", v
->name
);
6052 if (lengs
) LIST_FOR_EACH_ENTRY(dim
, lengs
, expr_t
, entry
)
6054 if (dim
->type
!= EXPR_VOID
)
6056 if (is_array(*ptype
))
6058 *ptype
= type_new_array((*ptype
)->name
,
6059 type_array_get_element(*ptype
),
6060 type_array_is_decl_as_ptr(*ptype
),
6061 type_array_get_dim(*ptype
),
6062 type_array_get_conformance(*ptype
),
6063 dim
, type_array_get_ptr_default_fc(*ptype
));
6066 error_loc("%s: length_is attribute applied to illegal type\n", v
->name
);
6070 ptype
= &(*ptype
)->details
.pointer
.ref
;
6071 else if (is_array(*ptype
))
6072 ptype
= &(*ptype
)->details
.array
.elem
;
6074 error_loc("%s: too many expressions in length_is attribute\n", v
->name
);
6077 /* v->type is currently pointing to the type on the left-side of the
6078 * declaration, so we need to fix this up so that it is the return type of the
6079 * function and make v->type point to the function side of the declaration */
6083 type_t
*return_type
= v
->type
;
6084 v
->type
= func_type
;
6085 for (ft
= v
->type
; is_ptr(ft
); ft
= type_pointer_get_ref(ft
))
6087 assert(type_get_type_detect_alias(ft
) == TYPE_FUNCTION
);
6088 ft
->details
.function
->rettype
= return_type
;
6089 /* move calling convention attribute, if present, from pointer nodes to
6091 for (t
= v
->type
; is_ptr(t
); t
= type_pointer_get_ref(t
))
6092 ft
->attrs
= move_attr(ft
->attrs
, t
->attrs
, ATTR_CALLCONV
);
6097 for (t
= v
->type
; is_ptr(t
); t
= type_pointer_get_ref(t
))
6098 if (is_attr(t
->attrs
, ATTR_CALLCONV
))
6099 error_loc("calling convention applied to non-function-pointer type\n");
6103 v
->type
= type_new_bitfield(v
->type
, decl
->bits
);
6108 static var_list_t
*set_var_types(attr_list_t
*attrs
, decl_spec_t
*decl_spec
, declarator_list_t
*decls
)
6110 declarator_t
*decl
, *next
;
6111 var_list_t
*var_list
= NULL
;
6113 LIST_FOR_EACH_ENTRY_SAFE( decl
, next
, decls
, declarator_t
, entry
)
6115 var_t
*var
= declare_var(attrs
, decl_spec
, decl
, 0);
6116 var_list
= append_var(var_list
, var
);
6123 static ifref_list_t
*append_ifref(ifref_list_t
*list
, ifref_t
*iface
)
6125 if (!iface
) return list
;
6128 list
= xmalloc( sizeof(*list
) );
6131 list_add_tail( list
, &iface
->entry
);
6135 static ifref_t
*make_ifref(type_t
*iface
)
6137 ifref_t
*l
= xmalloc(sizeof(ifref_t
));
6143 var_list_t
*append_var(var_list_t
*list
, var_t
*var
)
6145 if (!var
) return list
;
6148 list
= xmalloc( sizeof(*list
) );
6151 list_add_tail( list
, &var
->entry
);
6155 static var_list_t
*append_var_list(var_list_t
*list
, var_list_t
*vars
)
6157 if (!vars
) return list
;
6160 list
= xmalloc( sizeof(*list
) );
6163 list_move_tail( list
, vars
);
6167 var_t
*make_var(char *name
)
6169 var_t
*v
= xmalloc(sizeof(var_t
));
6174 v
->stgclass
= STG_NONE
;
6175 init_loc_info(&v
->loc_info
);
6179 static declarator_list_t
*append_declarator(declarator_list_t
*list
, declarator_t
*d
)
6181 if (!d
) return list
;
6183 list
= xmalloc(sizeof(*list
));
6186 list_add_tail(list
, &d
->entry
);
6190 static declarator_t
*make_declarator(var_t
*var
)
6192 declarator_t
*d
= xmalloc(sizeof(*d
));
6193 d
->var
= var
? var
: make_var(NULL
);
6195 d
->func_type
= NULL
;
6201 static type_t
*make_safearray(type_t
*type
)
6203 return type_new_array(NULL
, type_new_alias(type
, "SAFEARRAY"), TRUE
, 0,
6204 NULL
, NULL
, RPC_FC_RP
);
6207 static typelib_t
*make_library(const char *name
, const attr_list_t
*attrs
)
6209 typelib_t
*typelib
= xmalloc(sizeof(*typelib
));
6210 typelib
->name
= xstrdup(name
);
6211 typelib
->filename
= NULL
;
6212 typelib
->attrs
= attrs
;
6213 list_init( &typelib
->importlibs
);
6219 static int hash_ident(const char *name
)
6221 const char *p
= name
;
6223 /* a simple sum hash is probably good enough */
6228 return sum
& (HASHMAX
-1);
6231 /***** type repository *****/
6240 struct rtype
*type_hash
[HASHMAX
];
6242 type_t
*reg_type(type_t
*type
, const char *name
, int t
)
6247 error_loc("registering named type without name\n");
6250 hash
= hash_ident(name
);
6251 nt
= xmalloc(sizeof(struct rtype
));
6255 nt
->next
= type_hash
[hash
];
6256 type_hash
[hash
] = nt
;
6257 if ((t
== tsSTRUCT
|| t
== tsUNION
))
6258 fix_incomplete_types(type
);
6262 static int is_incomplete(const type_t
*t
)
6264 return !t
->defined
&&
6265 (type_get_type_detect_alias(t
) == TYPE_STRUCT
||
6266 type_get_type_detect_alias(t
) == TYPE_UNION
||
6267 type_get_type_detect_alias(t
) == TYPE_ENCAPSULATED_UNION
);
6270 void add_incomplete(type_t
*t
)
6272 struct typenode
*tn
= xmalloc(sizeof *tn
);
6274 list_add_tail(&incomplete_types
, &tn
->entry
);
6277 static void fix_type(type_t
*t
)
6279 if (type_is_alias(t
) && is_incomplete(t
)) {
6280 type_t
*ot
= type_alias_get_aliasee(t
);
6282 if (type_get_type_detect_alias(ot
) == TYPE_STRUCT
||
6283 type_get_type_detect_alias(ot
) == TYPE_UNION
||
6284 type_get_type_detect_alias(ot
) == TYPE_ENCAPSULATED_UNION
)
6285 t
->details
.structure
= ot
->details
.structure
;
6286 t
->defined
= ot
->defined
;
6290 static void fix_incomplete(void)
6292 struct typenode
*tn
, *next
;
6294 LIST_FOR_EACH_ENTRY_SAFE(tn
, next
, &incomplete_types
, struct typenode
, entry
) {
6296 list_remove(&tn
->entry
);
6301 static void fix_incomplete_types(type_t
*complete_type
)
6303 struct typenode
*tn
, *next
;
6305 LIST_FOR_EACH_ENTRY_SAFE(tn
, next
, &incomplete_types
, struct typenode
, entry
)
6307 if (type_is_equal(complete_type
, tn
->type
))
6309 tn
->type
->details
.structure
= complete_type
->details
.structure
;
6310 list_remove(&tn
->entry
);
6316 static type_t
*reg_typedefs(decl_spec_t
*decl_spec
, declarator_list_t
*decls
, attr_list_t
*attrs
)
6318 const declarator_t
*decl
;
6319 type_t
*type
= decl_spec
->type
;
6321 /* We must generate names for tagless enum, struct or union.
6322 Typedef-ing a tagless enum, struct or union means we want the typedef
6323 to be included in a library hence the public attribute. */
6324 if ((type_get_type_detect_alias(type
) == TYPE_ENUM
||
6325 type_get_type_detect_alias(type
) == TYPE_STRUCT
||
6326 type_get_type_detect_alias(type
) == TYPE_UNION
||
6327 type_get_type_detect_alias(type
) == TYPE_ENCAPSULATED_UNION
) &&
6328 !type
->name
&& !parse_only
)
6330 if (! is_attr(attrs
, ATTR_PUBLIC
))
6331 attrs
= append_attr( attrs
, make_attr(ATTR_PUBLIC
) );
6332 type
->name
= gen_name();
6334 else if (is_attr(attrs
, ATTR_UUID
) && !is_attr(attrs
, ATTR_PUBLIC
))
6335 attrs
= append_attr( attrs
, make_attr(ATTR_PUBLIC
) );
6337 LIST_FOR_EACH_ENTRY( decl
, decls
, const declarator_t
, entry
)
6340 if (decl
->var
->name
) {
6344 cur
= find_type(decl
->var
->name
, 0);
6346 error_loc("%s: redefinition error; original definition was at %s:%d\n",
6347 cur
->name
, cur
->loc_info
.input_name
,
6348 cur
->loc_info
.line_number
);
6350 name
= declare_var(attrs
, decl_spec
, decl
, 0);
6351 cur
= type_new_alias(name
->type
, name
->name
);
6354 if (is_incomplete(cur
))
6355 add_incomplete(cur
);
6356 reg_type(cur
, cur
->name
, 0);
6362 type_t
*find_type(const char *name
, int t
)
6364 struct rtype
*cur
= type_hash
[hash_ident(name
)];
6365 while (cur
&& (cur
->t
!= t
|| strcmp(cur
->name
, name
)))
6367 return cur
? cur
->type
: NULL
;
6370 static type_t
*find_type_or_error(const char *name
, int t
)
6372 type_t
*type
= find_type(name
, t
);
6374 error_loc("type '%s' not found\n", name
);
6380 static type_t
*find_type_or_error2(char *name
, int t
)
6382 type_t
*tp
= find_type_or_error(name
, t
);
6387 int is_type(const char *name
)
6389 return find_type(name
, 0) != NULL
;
6392 type_t
*get_type(enum type_type type
, char *name
, int t
)
6396 tp
= find_type(name
, t
);
6402 tp
= make_type(type
);
6404 if (!name
) return tp
;
6405 return reg_type(tp
, name
, t
);
6408 /***** constant repository *****/
6413 struct rconst
*next
;
6416 struct rconst
*const_hash
[HASHMAX
];
6418 static var_t
*reg_const(var_t
*var
)
6423 error_loc("registering constant without name\n");
6426 hash
= hash_ident(var
->name
);
6427 nc
= xmalloc(sizeof(struct rconst
));
6428 nc
->name
= var
->name
;
6430 nc
->next
= const_hash
[hash
];
6431 const_hash
[hash
] = nc
;
6435 var_t
*find_const(const char *name
, int f
)
6437 struct rconst
*cur
= const_hash
[hash_ident(name
)];
6438 while (cur
&& strcmp(cur
->name
, name
))
6441 if (f
) error_loc("constant '%s' not found\n", name
);
6447 static char *gen_name(void)
6449 static const char format
[] = "__WIDL_%s_generated_name_%08lX";
6450 static unsigned long n
= 0;
6451 static const char *file_id
;
6457 char *dst
= dup_basename(input_name
, ".idl");
6461 if (! isalnum((unsigned char) *dst
))
6464 size
= sizeof format
- 7 + strlen(file_id
) + 8;
6467 name
= xmalloc(size
);
6468 sprintf(name
, format
, file_id
, n
++);
6474 unsigned int dce_compatible
: 1;
6475 unsigned int acf
: 1;
6476 unsigned int on_interface
: 1;
6477 unsigned int on_function
: 1;
6478 unsigned int on_arg
: 1;
6479 unsigned int on_type
: 1;
6480 unsigned int on_enum
: 1;
6481 unsigned int on_struct
: 1;
6482 unsigned int on_union
: 1;
6483 unsigned int on_field
: 1;
6484 unsigned int on_library
: 1;
6485 unsigned int on_dispinterface
: 1;
6486 unsigned int on_module
: 1;
6487 unsigned int on_coclass
: 1;
6488 const char *display_name
;
6491 struct allowed_attr allowed_attr
[] =
6493 /* attr { D ACF I Fn ARG T En St Un Fi L DI M C <display name> } */
6494 /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" },
6495 /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" },
6496 /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" },
6497 /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" },
6498 /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" },
6499 /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" },
6500 /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" },
6501 /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "call_as" },
6502 /* ATTR_CALLCONV */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
},
6503 /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" },
6504 /* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" },
6505 /* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" },
6506 /* ATTR_CONST */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "const" },
6507 /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" },
6508 /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" },
6509 /* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "decode" },
6510 /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" },
6511 /* ATTR_DEFAULTBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" },
6512 /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" },
6513 /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" },
6514 /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "defaultvtable" },
6515 /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" },
6516 /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL
},
6517 /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" },
6518 /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "dllname" },
6519 /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" },
6520 /* ATTR_ENABLEALLOCATE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "enable_allocate" },
6521 /* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "encode" },
6522 /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" },
6523 /* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" },
6524 /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" },
6525 /* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" },
6526 /* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" },
6527 /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "handle" },
6528 /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpcontext" },
6529 /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpfile" },
6530 /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstring" },
6531 /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" },
6532 /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" },
6533 /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" },
6534 /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "id" },
6535 /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" },
6536 /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" },
6537 /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" },
6538 /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "immediatebind" },
6539 /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" },
6540 /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" },
6541 /* ATTR_INLINE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inline" },
6542 /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" },
6543 /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" },
6544 /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" },
6545 /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" },
6546 /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" },
6547 /* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" },
6548 /* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" },
6549 /* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" },
6550 /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" },
6551 /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" },
6552 /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" },
6553 /* ATTR_NOTIFY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify" },
6554 /* ATTR_NOTIFYFLAG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify_flag" },
6555 /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "object" },
6556 /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "odl" },
6557 /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" },
6558 /* ATTR_OPTIMIZE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" },
6559 /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" },
6560 /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" },
6561 /* ATTR_PARAMLCID */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" },
6562 /* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" },
6563 /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" },
6564 /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "ref, unique or ptr" },
6565 /* ATTR_PROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "progid" },
6566 /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" },
6567 /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" },
6568 /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" },
6569 /* ATTR_PROXY */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" },
6570 /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "public" },
6571 /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, "range" },
6572 /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "readonly" },
6573 /* ATTR_REPRESENTAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "represent_as" },
6574 /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "requestedit" },
6575 /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, "restricted" },
6576 /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "retval" },
6577 /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "size_is" },
6578 /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "source" },
6579 /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" },
6580 /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "string" },
6581 /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "switch_is" },
6582 /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, "switch_type" },
6583 /* ATTR_THREADING */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "threading" },
6584 /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "transmit_as" },
6585 /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" },
6586 /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" },
6587 /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" },
6588 /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "uuid" },
6589 /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" },
6590 /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" },
6591 /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "version" },
6592 /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" },
6593 /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" },
6596 const char *get_attr_display_name(enum attr_type type
)
6598 return allowed_attr
[type
].display_name
;
6601 static attr_list_t
*check_iface_attrs(const char *name
, attr_list_t
*attrs
)
6604 if (!attrs
) return attrs
;
6605 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6607 if (!allowed_attr
[attr
->type
].on_interface
)
6608 error_loc("inapplicable attribute %s for interface %s\n",
6609 allowed_attr
[attr
->type
].display_name
, name
);
6614 static attr_list_t
*check_function_attrs(const char *name
, attr_list_t
*attrs
)
6617 if (!attrs
) return attrs
;
6618 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6620 if (!allowed_attr
[attr
->type
].on_function
)
6621 error_loc("inapplicable attribute %s for function %s\n",
6622 allowed_attr
[attr
->type
].display_name
, name
);
6627 static void check_arg_attrs(const var_t
*arg
)
6633 LIST_FOR_EACH_ENTRY(attr
, arg
->attrs
, const attr_t
, entry
)
6635 if (!allowed_attr
[attr
->type
].on_arg
)
6636 error_loc("inapplicable attribute %s for argument %s\n",
6637 allowed_attr
[attr
->type
].display_name
, arg
->name
);
6642 static attr_list_t
*check_typedef_attrs(attr_list_t
*attrs
)
6645 if (!attrs
) return attrs
;
6646 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6648 if (!allowed_attr
[attr
->type
].on_type
)
6649 error_loc("inapplicable attribute %s for typedef\n",
6650 allowed_attr
[attr
->type
].display_name
);
6655 static attr_list_t
*check_enum_attrs(attr_list_t
*attrs
)
6658 if (!attrs
) return attrs
;
6659 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6661 if (!allowed_attr
[attr
->type
].on_enum
)
6662 error_loc("inapplicable attribute %s for enum\n",
6663 allowed_attr
[attr
->type
].display_name
);
6668 static attr_list_t
*check_struct_attrs(attr_list_t
*attrs
)
6671 if (!attrs
) return attrs
;
6672 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6674 if (!allowed_attr
[attr
->type
].on_struct
)
6675 error_loc("inapplicable attribute %s for struct\n",
6676 allowed_attr
[attr
->type
].display_name
);
6681 static attr_list_t
*check_union_attrs(attr_list_t
*attrs
)
6684 if (!attrs
) return attrs
;
6685 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6687 if (!allowed_attr
[attr
->type
].on_union
)
6688 error_loc("inapplicable attribute %s for union\n",
6689 allowed_attr
[attr
->type
].display_name
);
6694 static attr_list_t
*check_field_attrs(const char *name
, attr_list_t
*attrs
)
6697 if (!attrs
) return attrs
;
6698 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6700 if (!allowed_attr
[attr
->type
].on_field
)
6701 error_loc("inapplicable attribute %s for field %s\n",
6702 allowed_attr
[attr
->type
].display_name
, name
);
6707 static attr_list_t
*check_library_attrs(const char *name
, attr_list_t
*attrs
)
6710 if (!attrs
) return attrs
;
6711 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6713 if (!allowed_attr
[attr
->type
].on_library
)
6714 error_loc("inapplicable attribute %s for library %s\n",
6715 allowed_attr
[attr
->type
].display_name
, name
);
6720 static attr_list_t
*check_dispiface_attrs(const char *name
, attr_list_t
*attrs
)
6723 if (!attrs
) return attrs
;
6724 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6726 if (!allowed_attr
[attr
->type
].on_dispinterface
)
6727 error_loc("inapplicable attribute %s for dispinterface %s\n",
6728 allowed_attr
[attr
->type
].display_name
, name
);
6733 static attr_list_t
*check_module_attrs(const char *name
, attr_list_t
*attrs
)
6736 if (!attrs
) return attrs
;
6737 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6739 if (!allowed_attr
[attr
->type
].on_module
)
6740 error_loc("inapplicable attribute %s for module %s\n",
6741 allowed_attr
[attr
->type
].display_name
, name
);
6746 static attr_list_t
*check_coclass_attrs(const char *name
, attr_list_t
*attrs
)
6749 if (!attrs
) return attrs
;
6750 LIST_FOR_EACH_ENTRY(attr
, attrs
, const attr_t
, entry
)
6752 if (!allowed_attr
[attr
->type
].on_coclass
)
6753 error_loc("inapplicable attribute %s for coclass %s\n",
6754 allowed_attr
[attr
->type
].display_name
, name
);
6759 static int is_allowed_conf_type(const type_t
*type
)
6761 switch (type_get_type(type
))
6766 switch (type_basic_get_type(type
))
6768 case TYPE_BASIC_INT8
:
6769 case TYPE_BASIC_INT16
:
6770 case TYPE_BASIC_INT32
:
6771 case TYPE_BASIC_INT64
:
6772 case TYPE_BASIC_INT
:
6773 case TYPE_BASIC_CHAR
:
6774 case TYPE_BASIC_HYPER
:
6775 case TYPE_BASIC_BYTE
:
6776 case TYPE_BASIC_WCHAR
:
6782 /* shouldn't get here because of type_get_type call above */
6787 case TYPE_ENCAPSULATED_UNION
:
6794 case TYPE_INTERFACE
:
6801 static int is_ptr_guid_type(const type_t
*type
)
6803 /* first, make sure it is a pointer to something */
6804 if (!is_ptr(type
)) return FALSE
;
6806 /* second, make sure it is a pointer to something of size sizeof(GUID),
6808 return (type_memsize(type_pointer_get_ref(type
)) == 16);
6811 static void check_conformance_expr_list(const char *attr_name
, const var_t
*arg
, const type_t
*container_type
, expr_list_t
*expr_list
)
6814 struct expr_loc expr_loc
;
6816 expr_loc
.attr
= attr_name
;
6817 if (expr_list
) LIST_FOR_EACH_ENTRY(dim
, expr_list
, expr_t
, entry
)
6819 if (dim
->type
!= EXPR_VOID
)
6821 const type_t
*expr_type
= expr_resolve_type(&expr_loc
, container_type
, dim
);
6822 if (!is_allowed_conf_type(expr_type
))
6823 error_loc_info(&arg
->loc_info
, "expression must resolve to integral type <= 32bits for attribute %s\n",
6829 static void check_remoting_fields(const var_t
*var
, type_t
*type
);
6831 /* checks that properties common to fields and arguments are consistent */
6832 static void check_field_common(const type_t
*container_type
,
6833 const char *container_name
, const var_t
*arg
)
6835 type_t
*type
= arg
->type
;
6837 const char *container_type_name
;
6838 const char *var_type
;
6840 switch (type_get_type(container_type
))
6843 container_type_name
= "struct";
6847 container_type_name
= "union";
6850 case TYPE_ENCAPSULATED_UNION
:
6851 container_type_name
= "encapsulated union";
6855 container_type_name
= "function";
6856 var_type
= "parameter";
6859 /* should be no other container types */
6864 if (is_attr(arg
->attrs
, ATTR_LENGTHIS
) &&
6865 (is_attr(arg
->attrs
, ATTR_STRING
) || is_aliaschain_attr(arg
->type
, ATTR_STRING
)))
6866 error_loc_info(&arg
->loc_info
,
6867 "string and length_is specified for argument %s are mutually exclusive attributes\n",
6870 if (is_attr(arg
->attrs
, ATTR_SIZEIS
))
6872 expr_list_t
*size_is_exprs
= get_attrp(arg
->attrs
, ATTR_SIZEIS
);
6873 check_conformance_expr_list("size_is", arg
, container_type
, size_is_exprs
);
6875 if (is_attr(arg
->attrs
, ATTR_LENGTHIS
))
6877 expr_list_t
*length_is_exprs
= get_attrp(arg
->attrs
, ATTR_LENGTHIS
);
6878 check_conformance_expr_list("length_is", arg
, container_type
, length_is_exprs
);
6880 if (is_attr(arg
->attrs
, ATTR_IIDIS
))
6882 struct expr_loc expr_loc
;
6883 expr_t
*expr
= get_attrp(arg
->attrs
, ATTR_IIDIS
);
6884 if (expr
->type
!= EXPR_VOID
)
6886 const type_t
*expr_type
;
6888 expr_loc
.attr
= "iid_is";
6889 expr_type
= expr_resolve_type(&expr_loc
, container_type
, expr
);
6890 if (!expr_type
|| !is_ptr_guid_type(expr_type
))
6891 error_loc_info(&arg
->loc_info
, "expression must resolve to pointer to GUID type for attribute iid_is\n");
6894 if (is_attr(arg
->attrs
, ATTR_SWITCHIS
))
6896 struct expr_loc expr_loc
;
6897 expr_t
*expr
= get_attrp(arg
->attrs
, ATTR_SWITCHIS
);
6898 if (expr
->type
!= EXPR_VOID
)
6900 const type_t
*expr_type
;
6902 expr_loc
.attr
= "switch_is";
6903 expr_type
= expr_resolve_type(&expr_loc
, container_type
, expr
);
6904 if (!expr_type
|| !is_allowed_conf_type(expr_type
))
6905 error_loc_info(&arg
->loc_info
, "expression must resolve to integral type <= 32bits for attribute %s\n",
6914 switch (typegen_detect_type(type
, arg
->attrs
, TDT_IGNORE_STRINGS
))
6918 check_remoting_fields(arg
, type
);
6922 const char *reason
= "is invalid";
6923 switch (type_get_type(type
))
6926 reason
= "cannot derive from void *";
6929 reason
= "cannot be a function pointer";
6932 reason
= "cannot be a bit-field";
6935 reason
= "cannot be a class";
6937 case TYPE_INTERFACE
:
6938 reason
= "cannot be a non-pointer to an interface";
6941 reason
= "cannot be a module";
6946 error_loc_info(&arg
->loc_info
, "%s \'%s\' of %s \'%s\' %s\n",
6947 var_type
, arg
->name
, container_type_name
, container_name
, reason
);
6950 case TGT_CTXT_HANDLE
:
6951 case TGT_CTXT_HANDLE_POINTER
:
6952 if (type_get_type(container_type
) != TYPE_FUNCTION
)
6953 error_loc_info(&arg
->loc_info
,
6954 "%s \'%s\' of %s \'%s\' cannot be a context handle\n",
6955 var_type
, arg
->name
, container_type_name
,
6960 const type_t
*t
= type
;
6962 t
= type_pointer_get_ref(t
);
6963 if (is_aliaschain_attr(t
, ATTR_RANGE
))
6964 warning_loc_info(&arg
->loc_info
, "%s: range not verified for a string of ranged types\n", arg
->name
);
6968 type
= type_pointer_get_ref(type
);
6972 type
= type_array_get_element(type
);
6976 case TGT_IFACE_POINTER
:
6983 } while (more_to_do
);
6986 static void check_remoting_fields(const var_t
*var
, type_t
*type
)
6989 const var_list_t
*fields
= NULL
;
6991 type
= type_get_real_type(type
);
6996 type
->checked
= TRUE
;
6998 if (type_get_type(type
) == TYPE_STRUCT
)
7000 if (type_is_complete(type
))
7001 fields
= type_struct_get_fields(type
);
7003 error_loc_info(&var
->loc_info
, "undefined type declaration %s\n", type
->name
);
7005 else if (type_get_type(type
) == TYPE_UNION
|| type_get_type(type
) == TYPE_ENCAPSULATED_UNION
)
7006 fields
= type_union_get_cases(type
);
7008 if (fields
) LIST_FOR_EACH_ENTRY( field
, fields
, const var_t
, entry
)
7009 if (field
->type
) check_field_common(type
, type
->name
, field
);
7012 /* checks that arguments for a function make sense for marshalling and unmarshalling */
7013 static void check_remoting_args(const var_t
*func
)
7015 const char *funcname
= func
->name
;
7018 if (func
->type
->details
.function
->args
) LIST_FOR_EACH_ENTRY( arg
, func
->type
->details
.function
->args
, const var_t
, entry
)
7020 const type_t
*type
= arg
->type
;
7022 /* check that [out] parameters have enough pointer levels */
7023 if (is_attr(arg
->attrs
, ATTR_OUT
))
7025 switch (typegen_detect_type(type
, arg
->attrs
, TDT_ALL_TYPES
))
7032 case TGT_CTXT_HANDLE
:
7034 error_loc_info(&arg
->loc_info
, "out parameter \'%s\' of function \'%s\' is not a pointer\n", arg
->name
, funcname
);
7036 case TGT_IFACE_POINTER
:
7037 error_loc_info(&arg
->loc_info
, "out interface pointer \'%s\' of function \'%s\' is not a double pointer\n", arg
->name
, funcname
);
7042 (!type_array_has_conformance(type
) ||
7043 type_array_get_conformance(type
)->type
== EXPR_VOID
)))
7044 error_loc_info(&arg
->loc_info
, "out parameter \'%s\' of function \'%s\' cannot be an unsized string\n", arg
->name
, funcname
);
7047 /* already error'd before we get here */
7048 case TGT_CTXT_HANDLE_POINTER
:
7056 check_field_common(func
->type
, funcname
, arg
);
7059 if (type_get_type(type_function_get_rettype(func
->type
)) != TYPE_VOID
)
7063 var
.type
= type_function_get_rettype(func
->type
);
7064 var
.name
= xstrdup("return value");
7065 check_field_common(func
->type
, funcname
, &var
);
7070 static void add_explicit_handle_if_necessary(var_t
*func
)
7072 const var_t
* explicit_handle_var
;
7073 const var_t
* explicit_generic_handle_var
= NULL
;
7074 const var_t
* context_handle_var
= NULL
;
7076 /* check for a defined binding handle */
7077 explicit_handle_var
= get_explicit_handle_var(func
);
7078 if (!explicit_handle_var
)
7080 explicit_generic_handle_var
= get_explicit_generic_handle_var(func
);
7081 if (!explicit_generic_handle_var
)
7083 context_handle_var
= get_context_handle_var(func
);
7084 if (!context_handle_var
)
7086 /* no explicit handle specified so add
7087 * "[in] handle_t IDL_handle" as the first parameter to the
7089 var_t
*idl_handle
= make_var(xstrdup("IDL_handle"));
7090 idl_handle
->attrs
= append_attr(NULL
, make_attr(ATTR_IN
));
7091 idl_handle
->type
= find_type_or_error("handle_t", 0);
7092 type_function_add_head_arg(func
->type
, idl_handle
);
7098 static void check_functions(const type_t
*iface
, int is_inside_library
)
7100 const statement_t
*stmt
;
7101 if (is_attr(iface
->attrs
, ATTR_EXPLICIT_HANDLE
))
7103 STATEMENTS_FOR_EACH_FUNC( stmt
, type_iface_get_stmts(iface
) )
7105 var_t
*func
= stmt
->u
.var
;
7106 add_explicit_handle_if_necessary(func
);
7109 if (!is_inside_library
&& !is_attr(iface
->attrs
, ATTR_LOCAL
))
7111 STATEMENTS_FOR_EACH_FUNC( stmt
, type_iface_get_stmts(iface
) )
7113 const var_t
*func
= stmt
->u
.var
;
7114 if (!is_attr(func
->attrs
, ATTR_LOCAL
))
7115 check_remoting_args(func
);
7120 static void check_statements(const statement_list_t
*stmts
, int is_inside_library
)
7122 const statement_t
*stmt
;
7124 if (stmts
) LIST_FOR_EACH_ENTRY(stmt
, stmts
, const statement_t
, entry
)
7126 if (stmt
->type
== STMT_LIBRARY
)
7127 check_statements(stmt
->u
.lib
->stmts
, TRUE
);
7128 else if (stmt
->type
== STMT_TYPE
&& type_get_type(stmt
->u
.type
) == TYPE_INTERFACE
)
7129 check_functions(stmt
->u
.type
, is_inside_library
);
7133 static void check_all_user_types(const statement_list_t
*stmts
)
7135 const statement_t
*stmt
;
7137 if (stmts
) LIST_FOR_EACH_ENTRY(stmt
, stmts
, const statement_t
, entry
)
7139 if (stmt
->type
== STMT_LIBRARY
)
7140 check_all_user_types(stmt
->u
.lib
->stmts
);
7141 else if (stmt
->type
== STMT_TYPE
&& type_get_type(stmt
->u
.type
) == TYPE_INTERFACE
&&
7142 !is_local(stmt
->u
.type
->attrs
))
7144 const statement_t
*stmt_func
;
7145 STATEMENTS_FOR_EACH_FUNC(stmt_func
, type_iface_get_stmts(stmt
->u
.type
)) {
7146 const var_t
*func
= stmt_func
->u
.var
;
7147 check_for_additional_prototype_types(func
->type
->details
.function
->args
);
7153 int is_valid_uuid(const char *s
)
7157 for (i
= 0; i
< 36; ++i
)
7158 if (i
== 8 || i
== 13 || i
== 18 || i
== 23)
7164 if (!isxdigit(s
[i
]))
7167 return s
[i
] == '\0';
7170 static statement_t
*make_statement(enum statement_type type
)
7172 statement_t
*stmt
= xmalloc(sizeof(*stmt
));
7177 static statement_t
*make_statement_type_decl(type_t
*type
)
7179 statement_t
*stmt
= make_statement(STMT_TYPE
);
7180 stmt
->u
.type
= type
;
7184 static statement_t
*make_statement_reference(type_t
*type
)
7186 statement_t
*stmt
= make_statement(STMT_TYPEREF
);
7187 stmt
->u
.type
= type
;
7191 static statement_t
*make_statement_declaration(var_t
*var
)
7193 statement_t
*stmt
= make_statement(STMT_DECLARATION
);
7195 if (var
->stgclass
== STG_EXTERN
&& var
->eval
)
7196 warning("'%s' initialised and declared extern\n", var
->name
);
7197 if (is_const_decl(var
))
7202 else if (type_get_type(var
->type
) == TYPE_FUNCTION
)
7203 check_function_attrs(var
->name
, var
->attrs
);
7204 else if (var
->stgclass
== STG_NONE
|| var
->stgclass
== STG_REGISTER
)
7205 error_loc("instantiation of data is illegal\n");
7209 static statement_t
*make_statement_library(typelib_t
*typelib
)
7211 statement_t
*stmt
= make_statement(STMT_LIBRARY
);
7212 stmt
->u
.lib
= typelib
;
7216 static statement_t
*make_statement_cppquote(const char *str
)
7218 statement_t
*stmt
= make_statement(STMT_CPPQUOTE
);
7223 static statement_t
*make_statement_importlib(const char *str
)
7225 statement_t
*stmt
= make_statement(STMT_IMPORTLIB
);
7230 static statement_t
*make_statement_import(const char *str
)
7232 statement_t
*stmt
= make_statement(STMT_IMPORT
);
7237 static statement_t
*make_statement_module(type_t
*type
)
7239 statement_t
*stmt
= make_statement(STMT_MODULE
);
7240 stmt
->u
.type
= type
;
7244 static statement_t
*make_statement_typedef(declarator_list_t
*decls
)
7246 declarator_t
*decl
, *next
;
7248 type_list_t
**type_list
;
7250 if (!decls
) return NULL
;
7252 stmt
= make_statement(STMT_TYPEDEF
);
7253 stmt
->u
.type_list
= NULL
;
7254 type_list
= &stmt
->u
.type_list
;
7256 LIST_FOR_EACH_ENTRY_SAFE( decl
, next
, decls
, declarator_t
, entry
)
7258 var_t
*var
= decl
->var
;
7259 type_t
*type
= find_type_or_error(var
->name
, 0);
7260 *type_list
= xmalloc(sizeof(type_list_t
));
7261 (*type_list
)->type
= type
;
7262 (*type_list
)->next
= NULL
;
7264 type_list
= &(*type_list
)->next
;
7272 static statement_list_t
*append_statement(statement_list_t
*list
, statement_t
*stmt
)
7274 if (!stmt
) return list
;
7277 list
= xmalloc( sizeof(*list
) );
7280 list_add_tail( list
, &stmt
->entry
);
7284 void init_loc_info(loc_info_t
*i
)
7286 i
->input_name
= input_name
? input_name
: "stdin";
7287 i
->line_number
= line_number
;
7288 i
->near_text
= parser_text
;
7291 static void check_def(const type_t
*t
)
7294 error_loc("%s: redefinition error; original definition was at %s:%d\n",
7295 t
->name
, t
->loc_info
.input_name
, t
->loc_info
.line_number
);