Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenparser.tab.c
Go to the documentation of this file.
00001 /* A Bison parser, made by GNU Bison 2.4.2. */ 00002 00003 /* Skeleton implementation for Bison's Yacc-like parsers in C 00004 00005 Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software 00006 Foundation, Inc. 00007 00008 This program is free software: you can redistribute it and/or modify 00009 it under the terms of the GNU General Public License as published by 00010 the Free Software Foundation, either version 3 of the License, or 00011 (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00020 00021 /* As a special exception, you may create a larger work that contains 00022 part or all of the Bison parser skeleton and distribute that work 00023 under terms of your choice, so long as that work isn't itself a 00024 parser generator using the skeleton or a modified version thereof 00025 as a parser skeleton. Alternatively, if you modify or redistribute 00026 the parser skeleton itself, you may (at your option) remove this 00027 special exception, which will cause the skeleton and the resulting 00028 Bison output files to be licensed under the GNU General Public 00029 License without this special exception. 00030 00031 This special exception was added by the Free Software Foundation in 00032 version 2.2 of Bison. */ 00033 00034 /* C LALR(1) parser skeleton written by Richard Stallman, by 00035 simplifying the original so-called "semantic" parser. */ 00036 00037 /* All symbols defined below should begin with yy or YY, to avoid 00038 infringing on user name space. This should be done even for local 00039 variables, as they might otherwise be expanded by user macros. 00040 There are some unavoidable exceptions within include files to 00041 define necessary library symbols; they are noted "INFRINGES ON 00042 USER NAME SPACE" below. */ 00043 00044 /* Identify Bison output. */ 00045 #define YYBISON 1 00046 00047 /* Bison version. */ 00048 #define YYBISON_VERSION "2.4.2" 00049 00050 /* Skeleton name. */ 00051 #define YYSKELETON_NAME "yacc.c" 00052 00053 /* Pure parsers. */ 00054 #define YYPURE 0 00055 00056 /* Push parsers. */ 00057 #define YYPUSH 0 00058 00059 /* Pull parsers. */ 00060 #define YYPULL 1 00061 00062 /* Using locations. */ 00063 #define YYLSP_NEEDED 0 00064 00065 /* Substitute the variable and function names. */ 00066 #define yyparse parser_parse 00067 #define yylex parser_lex 00068 #define yyerror parser_error 00069 #define yylval parser_lval 00070 #define yychar parser_char 00071 #define yydebug parser_debug 00072 #define yynerrs parser_nerrs 00073 00074 00075 /* Copy the first part of user declarations. */ 00076 00077 /* Line 189 of yacc.c */ 00078 #line 1 "parser.y" 00079 00080 /* 00081 * IDL Compiler 00082 * 00083 * Copyright 2002 Ove Kaaven 00084 * Copyright 2006-2008 Robert Shearman 00085 * 00086 * This library is free software; you can redistribute it and/or 00087 * modify it under the terms of the GNU Lesser General Public 00088 * License as published by the Free Software Foundation; either 00089 * version 2.1 of the License, or (at your option) any later version. 00090 * 00091 * This library is distributed in the hope that it will be useful, 00092 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00093 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00094 * Lesser General Public License for more details. 00095 * 00096 * You should have received a copy of the GNU Lesser General Public 00097 * License along with this library; if not, write to the Free Software 00098 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00099 */ 00100 00101 #include "config.h" 00102 00103 #include <stdio.h> 00104 #include <stdlib.h> 00105 #include <stdarg.h> 00106 #include <assert.h> 00107 #include <ctype.h> 00108 #include <string.h> 00109 00110 #include "widl.h" 00111 #include "utils.h" 00112 #include "parser.h" 00113 #include "header.h" 00114 #include "typelib.h" 00115 #include "typegen.h" 00116 #include "expr.h" 00117 #include "typetree.h" 00118 00119 #if defined(YYBYACC) 00120 /* Berkeley yacc (byacc) doesn't seem to know about these */ 00121 /* Some *BSD supplied versions do define these though */ 00122 # ifndef YYEMPTY 00123 # define YYEMPTY (-1) /* Empty lookahead value of yychar */ 00124 # endif 00125 # ifndef YYLEX 00126 # define YYLEX yylex() 00127 # endif 00128 00129 #elif defined(YYBISON) 00130 /* Bison was used for original development */ 00131 /* #define YYEMPTY -2 */ 00132 /* #define YYLEX yylex() */ 00133 00134 #else 00135 /* No yacc we know yet */ 00136 # if !defined(YYEMPTY) || !defined(YYLEX) 00137 # error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. 00138 # elif defined(__GNUC__) /* gcc defines the #warning directive */ 00139 # warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested 00140 /* #else we just take a chance that it works... */ 00141 # endif 00142 #endif 00143 00144 #define YYERROR_VERBOSE 00145 00146 static unsigned char pointer_default = RPC_FC_UP; 00147 00148 typedef struct list typelist_t; 00149 struct typenode { 00150 type_t *type; 00151 struct list entry; 00152 }; 00153 00154 struct _import_t 00155 { 00156 char *name; 00157 int import_performed; 00158 }; 00159 00160 typedef struct _decl_spec_t 00161 { 00162 type_t *type; 00163 attr_list_t *attrs; 00164 enum storage_class stgclass; 00165 } decl_spec_t; 00166 00167 typelist_t incomplete_types = LIST_INIT(incomplete_types); 00168 00169 static void fix_incomplete(void); 00170 static void fix_incomplete_types(type_t *complete_type); 00171 00172 static str_list_t *append_str(str_list_t *list, char *str); 00173 static attr_list_t *append_attr(attr_list_t *list, attr_t *attr); 00174 static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_list); 00175 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); 00176 static attr_t *make_attr(enum attr_type type); 00177 static attr_t *make_attrv(enum attr_type type, unsigned int val); 00178 static attr_t *make_attrp(enum attr_type type, void *val); 00179 static expr_list_t *append_expr(expr_list_t *list, expr_t *expr); 00180 static array_dims_t *append_array(array_dims_t *list, expr_t *expr); 00181 static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl, int top); 00182 static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls); 00183 static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface); 00184 static ifref_t *make_ifref(type_t *iface); 00185 static var_list_t *append_var_list(var_list_t *list, var_list_t *vars); 00186 static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *p); 00187 static declarator_t *make_declarator(var_t *var); 00188 static type_t *make_safearray(type_t *type); 00189 static typelib_t *make_library(const char *name, const attr_list_t *attrs); 00190 static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type); 00191 00192 static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); 00193 static type_t *find_type_or_error(const char *name, int t); 00194 static type_t *find_type_or_error2(char *name, int t); 00195 00196 static var_t *reg_const(var_t *var); 00197 00198 static char *gen_name(void); 00199 static void check_arg_attrs(const var_t *arg); 00200 static void check_statements(const statement_list_t *stmts, int is_inside_library); 00201 static void check_all_user_types(const statement_list_t *stmts); 00202 static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs); 00203 static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs); 00204 static attr_list_t *check_typedef_attrs(attr_list_t *attrs); 00205 static attr_list_t *check_enum_attrs(attr_list_t *attrs); 00206 static attr_list_t *check_struct_attrs(attr_list_t *attrs); 00207 static attr_list_t *check_union_attrs(attr_list_t *attrs); 00208 static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs); 00209 static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs); 00210 static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs); 00211 static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs); 00212 static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); 00213 const char *get_attr_display_name(enum attr_type type); 00214 static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func); 00215 static void check_def(const type_t *t); 00216 00217 static statement_t *make_statement(enum statement_type type); 00218 static statement_t *make_statement_type_decl(type_t *type); 00219 static statement_t *make_statement_reference(type_t *type); 00220 static statement_t *make_statement_declaration(var_t *var); 00221 static statement_t *make_statement_library(typelib_t *typelib); 00222 static statement_t *make_statement_cppquote(const char *str); 00223 static statement_t *make_statement_importlib(const char *str); 00224 static statement_t *make_statement_module(type_t *type); 00225 static statement_t *make_statement_typedef(var_list_t *names); 00226 static statement_t *make_statement_import(const char *str); 00227 static statement_t *make_statement_typedef(var_list_t *names); 00228 static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); 00229 00230 00231 00232 /* Line 189 of yacc.c */ 00233 #line 234 "parser.tab.c" 00234 00235 /* Enabling traces. */ 00236 #ifndef YYDEBUG 00237 # define YYDEBUG 0 00238 #endif 00239 00240 /* Enabling verbose error messages. */ 00241 #ifdef YYERROR_VERBOSE 00242 # undef YYERROR_VERBOSE 00243 # define YYERROR_VERBOSE 1 00244 #else 00245 # define YYERROR_VERBOSE 0 00246 #endif 00247 00248 /* Enabling the token table. */ 00249 #ifndef YYTOKEN_TABLE 00250 # define YYTOKEN_TABLE 0 00251 #endif 00252 00253 00254 /* Tokens. */ 00255 #ifndef YYTOKENTYPE 00256 # define YYTOKENTYPE 00257 /* Put the tokens into the symbol table, so that GDB and other debuggers 00258 know about them. */ 00259 enum yytokentype { 00260 aIDENTIFIER = 258, 00261 aKNOWNTYPE = 259, 00262 aNUM = 260, 00263 aHEXNUM = 261, 00264 aDOUBLE = 262, 00265 aSTRING = 263, 00266 aWSTRING = 264, 00267 aSQSTRING = 265, 00268 aUUID = 266, 00269 aEOF = 267, 00270 SHL = 268, 00271 SHR = 269, 00272 MEMBERPTR = 270, 00273 EQUALITY = 271, 00274 INEQUALITY = 272, 00275 GREATEREQUAL = 273, 00276 LESSEQUAL = 274, 00277 LOGICALOR = 275, 00278 LOGICALAND = 276, 00279 ELLIPSIS = 277, 00280 tAGGREGATABLE = 278, 00281 tALLOCATE = 279, 00282 tANNOTATION = 280, 00283 tAPPOBJECT = 281, 00284 tASYNC = 282, 00285 tASYNCUUID = 283, 00286 tAUTOHANDLE = 284, 00287 tBINDABLE = 285, 00288 tBOOLEAN = 286, 00289 tBROADCAST = 287, 00290 tBYTE = 288, 00291 tBYTECOUNT = 289, 00292 tCALLAS = 290, 00293 tCALLBACK = 291, 00294 tCASE = 292, 00295 tCDECL = 293, 00296 tCHAR = 294, 00297 tCOCLASS = 295, 00298 tCODE = 296, 00299 tCOMMSTATUS = 297, 00300 tCONST = 298, 00301 tCONTEXTHANDLE = 299, 00302 tCONTEXTHANDLENOSERIALIZE = 300, 00303 tCONTEXTHANDLESERIALIZE = 301, 00304 tCONTROL = 302, 00305 tCPPQUOTE = 303, 00306 tDECODE = 304, 00307 tDEFAULT = 305, 00308 tDEFAULTBIND = 306, 00309 tDEFAULTCOLLELEM = 307, 00310 tDEFAULTVALUE = 308, 00311 tDEFAULTVTABLE = 309, 00312 tDISABLECONSISTENCYCHECK = 310, 00313 tDISPLAYBIND = 311, 00314 tDISPINTERFACE = 312, 00315 tDLLNAME = 313, 00316 tDOUBLE = 314, 00317 tDUAL = 315, 00318 tENABLEALLOCATE = 316, 00319 tENCODE = 317, 00320 tENDPOINT = 318, 00321 tENTRY = 319, 00322 tENUM = 320, 00323 tERRORSTATUST = 321, 00324 tEXPLICITHANDLE = 322, 00325 tEXTERN = 323, 00326 tFALSE = 324, 00327 tFASTCALL = 325, 00328 tFAULTSTATUS = 326, 00329 tFLOAT = 327, 00330 tFORCEALLOCATE = 328, 00331 tHANDLE = 329, 00332 tHANDLET = 330, 00333 tHELPCONTEXT = 331, 00334 tHELPFILE = 332, 00335 tHELPSTRING = 333, 00336 tHELPSTRINGCONTEXT = 334, 00337 tHELPSTRINGDLL = 335, 00338 tHIDDEN = 336, 00339 tHYPER = 337, 00340 tID = 338, 00341 tIDEMPOTENT = 339, 00342 tIGNORE = 340, 00343 tIIDIS = 341, 00344 tIMMEDIATEBIND = 342, 00345 tIMPLICITHANDLE = 343, 00346 tIMPORT = 344, 00347 tIMPORTLIB = 345, 00348 tIN = 346, 00349 tIN_LINE = 347, 00350 tINLINE = 348, 00351 tINPUTSYNC = 349, 00352 tINT = 350, 00353 tINT3264 = 351, 00354 tINT64 = 352, 00355 tINTERFACE = 353, 00356 tLCID = 354, 00357 tLENGTHIS = 355, 00358 tLIBRARY = 356, 00359 tLICENSED = 357, 00360 tLOCAL = 358, 00361 tLONG = 359, 00362 tMAYBE = 360, 00363 tMESSAGE = 361, 00364 tMETHODS = 362, 00365 tMODULE = 363, 00366 tNOCODE = 364, 00367 tNONBROWSABLE = 365, 00368 tNONCREATABLE = 366, 00369 tNONEXTENSIBLE = 367, 00370 tNOTIFY = 368, 00371 tNOTIFYFLAG = 369, 00372 tNULL = 370, 00373 tOBJECT = 371, 00374 tODL = 372, 00375 tOLEAUTOMATION = 373, 00376 tOPTIMIZE = 374, 00377 tOPTIONAL = 375, 00378 tOUT = 376, 00379 tPARTIALIGNORE = 377, 00380 tPASCAL = 378, 00381 tPOINTERDEFAULT = 379, 00382 tPROGID = 380, 00383 tPROPERTIES = 381, 00384 tPROPGET = 382, 00385 tPROPPUT = 383, 00386 tPROPPUTREF = 384, 00387 tPROXY = 385, 00388 tPTR = 386, 00389 tPUBLIC = 387, 00390 tRANGE = 388, 00391 tREADONLY = 389, 00392 tREF = 390, 00393 tREGISTER = 391, 00394 tREPRESENTAS = 392, 00395 tREQUESTEDIT = 393, 00396 tRESTRICTED = 394, 00397 tRETVAL = 395, 00398 tSAFEARRAY = 396, 00399 tSHORT = 397, 00400 tSIGNED = 398, 00401 tSIZEIS = 399, 00402 tSIZEOF = 400, 00403 tSMALL = 401, 00404 tSOURCE = 402, 00405 tSTATIC = 403, 00406 tSTDCALL = 404, 00407 tSTRICTCONTEXTHANDLE = 405, 00408 tSTRING = 406, 00409 tSTRUCT = 407, 00410 tSWITCH = 408, 00411 tSWITCHIS = 409, 00412 tSWITCHTYPE = 410, 00413 tTHREADING = 411, 00414 tTRANSMITAS = 412, 00415 tTRUE = 413, 00416 tTYPEDEF = 414, 00417 tUIDEFAULT = 415, 00418 tUNION = 416, 00419 tUNIQUE = 417, 00420 tUNSIGNED = 418, 00421 tUSESGETLASTERROR = 419, 00422 tUSERMARSHAL = 420, 00423 tUUID = 421, 00424 tV1ENUM = 422, 00425 tVARARG = 423, 00426 tVERSION = 424, 00427 tVIPROGID = 425, 00428 tVOID = 426, 00429 tWCHAR = 427, 00430 tWIREMARSHAL = 428, 00431 tAPARTMENT = 429, 00432 tNEUTRAL = 430, 00433 tSINGLE = 431, 00434 tFREE = 432, 00435 tBOTH = 433, 00436 ADDRESSOF = 434, 00437 NEG = 435, 00438 POS = 436, 00439 PPTR = 437, 00440 CAST = 438 00441 }; 00442 #endif 00443 00444 00445 00446 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 00447 typedef union YYSTYPE 00448 { 00449 00450 /* Line 214 of yacc.c */ 00451 #line 153 "parser.y" 00452 00453 attr_t *attr; 00454 attr_list_t *attr_list; 00455 str_list_t *str_list; 00456 expr_t *expr; 00457 expr_list_t *expr_list; 00458 array_dims_t *array_dims; 00459 type_t *type; 00460 var_t *var; 00461 var_list_t *var_list; 00462 declarator_t *declarator; 00463 declarator_list_t *declarator_list; 00464 statement_t *statement; 00465 statement_list_t *stmt_list; 00466 ifref_t *ifref; 00467 ifref_list_t *ifref_list; 00468 char *str; 00469 UUID *uuid; 00470 unsigned int num; 00471 double dbl; 00472 interface_info_t ifinfo; 00473 typelib_t *typelib; 00474 struct _import_t *import; 00475 struct _decl_spec_t *declspec; 00476 enum storage_class stgclass; 00477 00478 00479 00480 /* Line 214 of yacc.c */ 00481 #line 482 "parser.tab.c" 00482 } YYSTYPE; 00483 # define YYSTYPE_IS_TRIVIAL 1 00484 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 00485 # define YYSTYPE_IS_DECLARED 1 00486 #endif 00487 00488 00489 /* Copy the second part of user declarations. */ 00490 00491 00492 /* Line 264 of yacc.c */ 00493 #line 494 "parser.tab.c" 00494 00495 #ifdef short 00496 # undef short 00497 #endif 00498 00499 #ifdef YYTYPE_UINT8 00500 typedef YYTYPE_UINT8 yytype_uint8; 00501 #else 00502 typedef unsigned char yytype_uint8; 00503 #endif 00504 00505 #ifdef YYTYPE_INT8 00506 typedef YYTYPE_INT8 yytype_int8; 00507 #elif (defined __STDC__ || defined __C99__FUNC__ \ 00508 || defined __cplusplus || defined _MSC_VER) 00509 typedef signed char yytype_int8; 00510 #else 00511 typedef short int yytype_int8; 00512 #endif 00513 00514 #ifdef YYTYPE_UINT16 00515 typedef YYTYPE_UINT16 yytype_uint16; 00516 #else 00517 typedef unsigned short int yytype_uint16; 00518 #endif 00519 00520 #ifdef YYTYPE_INT16 00521 typedef YYTYPE_INT16 yytype_int16; 00522 #else 00523 typedef short int yytype_int16; 00524 #endif 00525 00526 #ifndef YYSIZE_T 00527 # ifdef __SIZE_TYPE__ 00528 # define YYSIZE_T __SIZE_TYPE__ 00529 # elif defined size_t 00530 # define YYSIZE_T size_t 00531 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 00532 || defined __cplusplus || defined _MSC_VER) 00533 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 00534 # define YYSIZE_T size_t 00535 # else 00536 # define YYSIZE_T unsigned int 00537 # endif 00538 #endif 00539 00540 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 00541 00542 #ifndef YY_ 00543 # if defined YYENABLE_NLS && YYENABLE_NLS 00544 # if ENABLE_NLS 00545 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 00546 # define YY_(msgid) dgettext ("bison-runtime", msgid) 00547 # endif 00548 # endif 00549 # ifndef YY_ 00550 # define YY_(msgid) msgid 00551 # endif 00552 #endif 00553 00554 /* Suppress unused-variable warnings by "using" E. */ 00555 #if ! defined lint || defined __GNUC__ 00556 # define YYUSE(e) ((void) (e)) 00557 #else 00558 # define YYUSE(e) /* empty */ 00559 #endif 00560 00561 /* Identity function, used to suppress warnings about constant conditions. */ 00562 #ifndef lint 00563 # define YYID(n) (n) 00564 #else 00565 #if (defined __STDC__ || defined __C99__FUNC__ \ 00566 || defined __cplusplus || defined _MSC_VER) 00567 static int 00568 YYID (int yyi) 00569 #else 00570 static int 00571 YYID (yyi) 00572 int yyi; 00573 #endif 00574 { 00575 return yyi; 00576 } 00577 #endif 00578 00579 #if ! defined yyoverflow || YYERROR_VERBOSE 00580 00581 /* The parser invokes alloca or malloc; define the necessary symbols. */ 00582 00583 # ifdef YYSTACK_USE_ALLOCA 00584 # if YYSTACK_USE_ALLOCA 00585 # ifdef __GNUC__ 00586 # define YYSTACK_ALLOC __builtin_alloca 00587 # elif defined __BUILTIN_VA_ARG_INCR 00588 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 00589 # elif defined _AIX 00590 # define YYSTACK_ALLOC __alloca 00591 # elif defined _MSC_VER 00592 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 00593 # define alloca _alloca 00594 # else 00595 # define YYSTACK_ALLOC alloca 00596 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00597 || defined __cplusplus || defined _MSC_VER) 00598 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00599 # ifndef _STDLIB_H 00600 # define _STDLIB_H 1 00601 # endif 00602 # endif 00603 # endif 00604 # endif 00605 # endif 00606 00607 # ifdef YYSTACK_ALLOC 00608 /* Pacify GCC's `empty if-body' warning. */ 00609 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 00610 # ifndef YYSTACK_ALLOC_MAXIMUM 00611 /* The OS might guarantee only one guard page at the bottom of the stack, 00612 and a page size can be as small as 4096 bytes. So we cannot safely 00613 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 00614 to allow for a few compiler-allocated temporary stack slots. */ 00615 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 00616 # endif 00617 # else 00618 # define YYSTACK_ALLOC YYMALLOC 00619 # define YYSTACK_FREE YYFREE 00620 # ifndef YYSTACK_ALLOC_MAXIMUM 00621 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 00622 # endif 00623 # if (defined __cplusplus && ! defined _STDLIB_H \ 00624 && ! ((defined YYMALLOC || defined malloc) \ 00625 && (defined YYFREE || defined free))) 00626 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 00627 # ifndef _STDLIB_H 00628 # define _STDLIB_H 1 00629 # endif 00630 # endif 00631 # ifndef YYMALLOC 00632 # define YYMALLOC malloc 00633 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00634 || defined __cplusplus || defined _MSC_VER) 00635 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 00636 # endif 00637 # endif 00638 # ifndef YYFREE 00639 # define YYFREE free 00640 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 00641 || defined __cplusplus || defined _MSC_VER) 00642 void free (void *); /* INFRINGES ON USER NAME SPACE */ 00643 # endif 00644 # endif 00645 # endif 00646 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 00647 00648 00649 #if (! defined yyoverflow \ 00650 && (! defined __cplusplus \ 00651 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 00652 00653 /* A type that is properly aligned for any stack member. */ 00654 union yyalloc 00655 { 00656 yytype_int16 yyss_alloc; 00657 YYSTYPE yyvs_alloc; 00658 }; 00659 00660 /* The size of the maximum gap between one aligned stack and the next. */ 00661 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 00662 00663 /* The size of an array large to enough to hold all stacks, each with 00664 N elements. */ 00665 # define YYSTACK_BYTES(N) \ 00666 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 00667 + YYSTACK_GAP_MAXIMUM) 00668 00669 /* Copy COUNT objects from FROM to TO. The source and destination do 00670 not overlap. */ 00671 # ifndef YYCOPY 00672 # if defined __GNUC__ && 1 < __GNUC__ 00673 # define YYCOPY(To, From, Count) \ 00674 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 00675 # else 00676 # define YYCOPY(To, From, Count) \ 00677 do \ 00678 { \ 00679 YYSIZE_T yyi; \ 00680 for (yyi = 0; yyi < (Count); yyi++) \ 00681 (To)[yyi] = (From)[yyi]; \ 00682 } \ 00683 while (YYID (0)) 00684 # endif 00685 # endif 00686 00687 /* Relocate STACK from its old location to the new one. The 00688 local variables YYSIZE and YYSTACKSIZE give the old and new number of 00689 elements in the stack, and YYPTR gives the new location of the 00690 stack. Advance YYPTR to a properly aligned location for the next 00691 stack. */ 00692 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 00693 do \ 00694 { \ 00695 YYSIZE_T yynewbytes; \ 00696 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 00697 Stack = &yyptr->Stack_alloc; \ 00698 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 00699 yyptr += yynewbytes / sizeof (*yyptr); \ 00700 } \ 00701 while (YYID (0)) 00702 00703 #endif 00704 00705 /* YYFINAL -- State number of the termination state. */ 00706 #define YYFINAL 3 00707 /* YYLAST -- Last index in YYTABLE. */ 00708 #define YYLAST 2742 00709 00710 /* YYNTOKENS -- Number of terminals. */ 00711 #define YYNTOKENS 208 00712 /* YYNNTS -- Number of nonterminals. */ 00713 #define YYNNTS 100 00714 /* YYNRULES -- Number of rules. */ 00715 #define YYNRULES 380 00716 /* YYNRULES -- Number of states. */ 00717 #define YYNSTATES 661 00718 00719 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 00720 #define YYUNDEFTOK 2 00721 #define YYMAXUTOK 438 00722 00723 #define YYTRANSLATE(YYX) \ 00724 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 00725 00726 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 00727 static const yytype_uint8 yytranslate[] = 00728 { 00729 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00730 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00732 2, 2, 2, 192, 2, 2, 2, 191, 184, 2, 00733 203, 204, 189, 188, 179, 187, 199, 190, 2, 2, 00734 2, 2, 2, 2, 2, 2, 2, 2, 181, 202, 00735 185, 207, 186, 180, 2, 2, 2, 2, 2, 2, 00736 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00738 2, 200, 2, 201, 183, 2, 2, 2, 2, 2, 00739 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00740 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00741 2, 2, 2, 205, 182, 206, 193, 2, 2, 2, 00742 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00743 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00744 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00745 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00746 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00747 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00748 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00749 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00750 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00751 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00752 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00753 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 00754 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 00755 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 00756 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 00757 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 00758 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 00759 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 00760 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 00761 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 00762 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 00763 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 00764 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 00765 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 00766 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 00767 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 00768 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 00769 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 00770 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 00771 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 00772 175, 176, 177, 178, 194, 195, 196, 197, 198 00773 }; 00774 00775 #if YYDEBUG 00776 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 00777 YYRHS. */ 00778 static const yytype_uint16 yyprhs[] = 00779 { 00780 0, 0, 3, 5, 6, 9, 12, 16, 19, 22, 00781 25, 28, 29, 32, 35, 39, 42, 45, 48, 51, 00782 54, 55, 58, 59, 61, 63, 66, 69, 71, 74, 00783 76, 79, 81, 84, 86, 89, 92, 95, 98, 103, 00784 107, 111, 117, 120, 124, 129, 130, 132, 134, 138, 00785 140, 144, 148, 151, 155, 159, 162, 163, 165, 169, 00786 171, 175, 180, 182, 186, 187, 189, 194, 196, 198, 00787 200, 202, 204, 209, 214, 216, 218, 220, 222, 224, 00788 226, 228, 230, 232, 234, 239, 241, 243, 245, 250, 00789 252, 254, 256, 261, 266, 268, 270, 272, 274, 279, 00790 284, 289, 294, 299, 301, 306, 308, 310, 315, 317, 00791 322, 324, 326, 331, 336, 338, 340, 342, 344, 346, 00792 348, 350, 352, 354, 356, 358, 360, 362, 364, 369, 00793 371, 373, 375, 380, 385, 387, 389, 391, 393, 395, 00794 402, 404, 409, 411, 413, 415, 420, 422, 424, 426, 00795 431, 436, 441, 446, 448, 450, 455, 460, 462, 464, 00796 469, 474, 479, 481, 483, 485, 487, 489, 491, 493, 00797 494, 497, 502, 506, 507, 510, 512, 514, 518, 522, 00798 524, 530, 532, 536, 537, 539, 541, 543, 545, 547, 00799 549, 551, 553, 555, 557, 559, 565, 569, 573, 577, 00800 581, 585, 589, 593, 597, 601, 605, 609, 613, 617, 00801 621, 625, 629, 633, 637, 640, 643, 646, 649, 652, 00802 655, 659, 663, 669, 675, 680, 684, 686, 690, 692, 00803 694, 695, 698, 703, 707, 710, 713, 714, 717, 720, 00804 722, 726, 728, 732, 735, 736, 738, 739, 741, 743, 00805 745, 747, 749, 751, 753, 756, 759, 761, 763, 765, 00806 767, 769, 771, 772, 774, 776, 779, 781, 784, 787, 00807 789, 791, 793, 796, 799, 802, 808, 809, 812, 815, 00808 818, 821, 824, 827, 831, 834, 838, 844, 850, 851, 00809 854, 857, 860, 863, 870, 879, 882, 885, 888, 891, 00810 894, 897, 903, 905, 907, 909, 911, 913, 914, 917, 00811 920, 924, 925, 927, 930, 933, 936, 940, 943, 945, 00812 947, 951, 954, 959, 963, 966, 968, 972, 975, 976, 00813 978, 982, 985, 987, 991, 996, 1000, 1003, 1005, 1009, 00814 1012, 1013, 1015, 1017, 1021, 1024, 1026, 1030, 1035, 1037, 00815 1041, 1042, 1045, 1048, 1050, 1054, 1056, 1060, 1062, 1064, 00816 1066, 1068, 1070, 1072, 1074, 1076, 1082, 1084, 1086, 1088, 00817 1090, 1093, 1095, 1098, 1100, 1103, 1108, 1113, 1119, 1130, 00818 1132 00819 }; 00820 00821 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 00822 static const yytype_int16 yyrhs[] = 00823 { 00824 209, 0, -1, 210, -1, -1, 210, 275, -1, 210, 00825 274, -1, 210, 261, 202, -1, 210, 263, -1, 210, 00826 278, -1, 210, 222, -1, 210, 214, -1, -1, 211, 00827 275, -1, 211, 274, -1, 211, 261, 202, -1, 211, 00828 263, -1, 211, 278, -1, 211, 214, -1, 211, 219, 00829 -1, 211, 222, -1, -1, 212, 214, -1, -1, 202, 00830 -1, 216, -1, 215, 202, -1, 254, 202, -1, 218, 00831 -1, 305, 202, -1, 240, -1, 65, 3, -1, 303, 00832 -1, 152, 3, -1, 306, -1, 161, 3, -1, 229, 00833 240, -1, 229, 303, -1, 229, 306, -1, 48, 203, 00834 8, 204, -1, 89, 8, 202, -1, 217, 211, 12, 00835 -1, 90, 203, 8, 204, 213, -1, 101, 3, -1, 00836 229, 220, 205, -1, 221, 211, 206, 213, -1, -1, 00837 225, -1, 226, -1, 224, 179, 226, -1, 224, -1, 00838 224, 179, 22, -1, 229, 283, 294, -1, 283, 294, 00839 -1, 200, 243, 201, -1, 200, 189, 201, -1, 200, 00840 201, -1, -1, 229, -1, 200, 230, 201, -1, 232, 00841 -1, 230, 179, 232, -1, 230, 201, 200, 232, -1, 00842 8, -1, 231, 179, 8, -1, -1, 23, -1, 25, 00843 203, 8, 204, -1, 26, -1, 27, -1, 29, -1, 00844 30, -1, 32, -1, 35, 203, 257, 204, -1, 37, 00845 203, 244, 204, -1, 41, -1, 42, -1, 44, -1, 00846 45, -1, 46, -1, 47, -1, 49, -1, 50, -1, 00847 51, -1, 52, -1, 53, 203, 246, 204, -1, 54, 00848 -1, 55, -1, 56, -1, 58, 203, 8, 204, -1, 00849 60, -1, 61, -1, 62, -1, 63, 203, 231, 204, 00850 -1, 64, 203, 246, 204, -1, 67, -1, 71, -1, 00851 73, -1, 74, -1, 76, 203, 245, 204, -1, 77, 00852 203, 8, 204, -1, 78, 203, 8, 204, -1, 79, 00853 203, 245, 204, -1, 80, 203, 8, 204, -1, 81, 00854 -1, 83, 203, 245, 204, -1, 84, -1, 85, -1, 00855 86, 203, 243, 204, -1, 87, -1, 88, 203, 226, 00856 204, -1, 91, -1, 94, -1, 100, 203, 241, 204, 00857 -1, 99, 203, 245, 204, -1, 99, -1, 102, -1, 00858 103, -1, 105, -1, 106, -1, 109, -1, 110, -1, 00859 111, -1, 112, -1, 113, -1, 114, -1, 116, -1, 00860 117, -1, 118, -1, 119, 203, 8, 204, -1, 120, 00861 -1, 121, -1, 122, -1, 124, 203, 302, 204, -1, 00862 125, 203, 8, 204, -1, 127, -1, 128, -1, 129, 00863 -1, 130, -1, 132, -1, 133, 203, 245, 179, 245, 00864 204, -1, 134, -1, 137, 203, 304, 204, -1, 138, 00865 -1, 139, -1, 140, -1, 144, 203, 241, 204, -1, 00866 147, -1, 150, -1, 151, -1, 154, 203, 243, 204, 00867 -1, 155, 203, 304, 204, -1, 157, 203, 304, 204, 00868 -1, 156, 203, 301, 204, -1, 160, -1, 164, -1, 00869 165, 203, 304, 204, -1, 166, 203, 233, 204, -1, 00870 167, -1, 168, -1, 169, 203, 307, 204, -1, 170, 00871 203, 8, 204, -1, 173, 203, 304, 204, -1, 302, 00872 -1, 11, -1, 8, -1, 38, -1, 70, -1, 123, 00873 -1, 149, -1, -1, 235, 236, -1, 37, 245, 181, 00874 251, -1, 50, 181, 251, -1, -1, 238, 179, -1, 00875 238, -1, 239, -1, 238, 179, 239, -1, 257, 207, 00876 245, -1, 257, -1, 65, 256, 205, 237, 206, -1, 00877 242, -1, 241, 179, 242, -1, -1, 243, -1, 5, 00878 -1, 6, -1, 7, -1, 69, -1, 115, -1, 158, 00879 -1, 8, -1, 9, -1, 10, -1, 3, -1, 243, 00880 180, 243, 181, 243, -1, 243, 20, 243, -1, 243, 00881 21, 243, -1, 243, 182, 243, -1, 243, 183, 243, 00882 -1, 243, 184, 243, -1, 243, 16, 243, -1, 243, 00883 17, 243, -1, 243, 186, 243, -1, 243, 185, 243, 00884 -1, 243, 18, 243, -1, 243, 19, 243, -1, 243, 00885 13, 243, -1, 243, 14, 243, -1, 243, 188, 243, 00886 -1, 243, 187, 243, -1, 243, 191, 243, -1, 243, 00887 189, 243, -1, 243, 190, 243, -1, 192, 243, -1, 00888 193, 243, -1, 188, 243, -1, 187, 243, -1, 184, 00889 243, -1, 189, 243, -1, 243, 15, 3, -1, 243, 00890 199, 3, -1, 203, 283, 290, 204, 243, -1, 145, 00891 203, 283, 290, 204, -1, 243, 200, 243, 201, -1, 00892 203, 243, 204, -1, 245, -1, 244, 179, 245, -1, 00893 243, -1, 243, -1, -1, 247, 248, -1, 228, 283, 00894 299, 202, -1, 228, 306, 202, -1, 252, 202, -1, 00895 229, 202, -1, -1, 250, 249, -1, 252, 202, -1, 00896 202, -1, 228, 283, 286, -1, 254, -1, 229, 283, 00897 300, -1, 283, 300, -1, -1, 257, -1, -1, 3, 00898 -1, 4, -1, 3, -1, 4, -1, 33, -1, 172, 00899 -1, 260, -1, 143, 260, -1, 163, 260, -1, 163, 00900 -1, 72, -1, 59, -1, 31, -1, 66, -1, 75, 00901 -1, -1, 95, -1, 95, -1, 142, 259, -1, 146, 00902 -1, 104, 259, -1, 82, 259, -1, 97, -1, 39, 00903 -1, 96, -1, 40, 3, -1, 40, 4, -1, 229, 00904 261, -1, 262, 205, 264, 206, 213, -1, -1, 264, 00905 265, -1, 228, 275, -1, 57, 3, -1, 57, 4, 00906 -1, 229, 266, -1, 126, 181, -1, 268, 252, 202, 00907 -1, 107, 181, -1, 269, 253, 202, -1, 267, 205, 00908 268, 269, 206, -1, 267, 205, 272, 202, 206, -1, 00909 -1, 181, 4, -1, 98, 3, -1, 98, 4, -1, 00910 229, 272, -1, 273, 271, 205, 212, 206, 213, -1, 00911 273, 181, 3, 205, 218, 212, 206, 213, -1, 270, 00912 213, -1, 272, 202, -1, 266, 202, -1, 108, 3, 00913 -1, 108, 4, -1, 229, 276, -1, 277, 205, 212, 00914 206, 213, -1, 68, -1, 148, -1, 136, -1, 93, 00915 -1, 43, -1, -1, 282, 281, -1, 304, 284, -1, 00916 285, 304, 284, -1, -1, 285, -1, 281, 284, -1, 00917 280, 284, -1, 279, 284, -1, 189, 282, 286, -1, 00918 234, 286, -1, 287, -1, 257, -1, 203, 286, 204, 00919 -1, 287, 227, -1, 287, 203, 223, 204, -1, 189, 00920 282, 290, -1, 234, 290, -1, 291, -1, 189, 282, 00921 294, -1, 234, 294, -1, -1, 288, -1, 203, 289, 00922 204, -1, 291, 227, -1, 227, -1, 203, 223, 204, 00923 -1, 291, 203, 223, 204, -1, 189, 282, 294, -1, 00924 234, 294, -1, 295, -1, 189, 282, 294, -1, 234, 00925 294, -1, -1, 292, -1, 257, -1, 203, 293, 204, 00926 -1, 295, 227, -1, 227, -1, 203, 223, 204, -1, 00927 295, 203, 223, 204, -1, 286, -1, 296, 179, 286, 00928 -1, -1, 181, 246, -1, 292, 297, -1, 298, -1, 00929 299, 179, 298, -1, 286, -1, 286, 207, 246, -1, 00930 174, -1, 175, -1, 176, -1, 177, -1, 178, -1, 00931 135, -1, 162, -1, 131, -1, 152, 256, 205, 247, 00932 206, -1, 171, -1, 4, -1, 258, -1, 240, -1, 00933 65, 3, -1, 303, -1, 152, 3, -1, 306, -1, 00934 161, 3, -1, 141, 203, 304, 204, -1, 159, 228, 00935 283, 296, -1, 161, 256, 205, 250, 206, -1, 161, 00936 256, 153, 203, 252, 204, 255, 205, 235, 206, -1, 00937 5, -1, 5, 199, 5, -1 00938 }; 00939 00940 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 00941 static const yytype_uint16 yyrline[] = 00942 { 00943 0, 328, 328, 342, 343, 344, 345, 348, 351, 352, 00944 353, 356, 357, 358, 359, 360, 363, 364, 365, 366, 00945 369, 370, 373, 374, 378, 379, 380, 381, 382, 386, 00946 387, 388, 389, 390, 391, 392, 393, 394, 397, 399, 00947 407, 413, 417, 419, 423, 430, 431, 434, 435, 438, 00948 439, 443, 448, 455, 459, 460, 463, 464, 468, 471, 00949 472, 473, 476, 477, 480, 481, 482, 483, 484, 485, 00950 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 00951 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 00952 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 00953 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 00954 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 00955 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 00956 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 00957 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 00958 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 00959 579, 580, 581, 585, 586, 591, 592, 593, 594, 597, 00960 598, 601, 605, 611, 612, 613, 616, 620, 629, 633, 00961 638, 641, 642, 645, 646, 649, 650, 651, 652, 653, 00962 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 00963 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 00964 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 00965 684, 685, 686, 688, 690, 691, 694, 695, 698, 704, 00966 710, 711, 714, 719, 726, 727, 730, 731, 735, 736, 00967 739, 745, 753, 757, 762, 763, 766, 767, 768, 771, 00968 773, 776, 777, 778, 779, 780, 781, 782, 783, 784, 00969 785, 786, 789, 790, 793, 794, 795, 796, 797, 798, 00970 799, 800, 803, 804, 812, 818, 822, 823, 827, 830, 00971 831, 834, 843, 844, 847, 848, 851, 857, 863, 864, 00972 867, 868, 871, 881, 888, 894, 898, 899, 902, 903, 00973 906, 911, 918, 919, 920, 924, 928, 931, 932, 935, 00974 936, 940, 941, 945, 946, 947, 951, 953, 955, 959, 00975 960, 961, 962, 970, 972, 974, 979, 981, 986, 987, 00976 992, 993, 994, 995, 1000, 1009, 1011, 1012, 1017, 1019, 00977 1023, 1024, 1031, 1032, 1033, 1034, 1035, 1040, 1048, 1049, 00978 1052, 1053, 1056, 1063, 1064, 1069, 1070, 1074, 1075, 1076, 00979 1077, 1078, 1082, 1083, 1084, 1087, 1090, 1091, 1092, 1093, 00980 1094, 1095, 1096, 1097, 1098, 1099, 1102, 1108, 1110, 1116, 00981 1117 00982 }; 00983 #endif 00984 00985 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 00986 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 00987 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 00988 static const char *const yytname[] = 00989 { 00990 "$end", "error", "$undefined", "aIDENTIFIER", "aKNOWNTYPE", "aNUM", 00991 "aHEXNUM", "aDOUBLE", "aSTRING", "aWSTRING", "aSQSTRING", "aUUID", 00992 "aEOF", "SHL", "SHR", "MEMBERPTR", "EQUALITY", "INEQUALITY", 00993 "GREATEREQUAL", "LESSEQUAL", "LOGICALOR", "LOGICALAND", "ELLIPSIS", 00994 "tAGGREGATABLE", "tALLOCATE", "tANNOTATION", "tAPPOBJECT", "tASYNC", 00995 "tASYNCUUID", "tAUTOHANDLE", "tBINDABLE", "tBOOLEAN", "tBROADCAST", 00996 "tBYTE", "tBYTECOUNT", "tCALLAS", "tCALLBACK", "tCASE", "tCDECL", 00997 "tCHAR", "tCOCLASS", "tCODE", "tCOMMSTATUS", "tCONST", "tCONTEXTHANDLE", 00998 "tCONTEXTHANDLENOSERIALIZE", "tCONTEXTHANDLESERIALIZE", "tCONTROL", 00999 "tCPPQUOTE", "tDECODE", "tDEFAULT", "tDEFAULTBIND", "tDEFAULTCOLLELEM", 01000 "tDEFAULTVALUE", "tDEFAULTVTABLE", "tDISABLECONSISTENCYCHECK", 01001 "tDISPLAYBIND", "tDISPINTERFACE", "tDLLNAME", "tDOUBLE", "tDUAL", 01002 "tENABLEALLOCATE", "tENCODE", "tENDPOINT", "tENTRY", "tENUM", 01003 "tERRORSTATUST", "tEXPLICITHANDLE", "tEXTERN", "tFALSE", "tFASTCALL", 01004 "tFAULTSTATUS", "tFLOAT", "tFORCEALLOCATE", "tHANDLE", "tHANDLET", 01005 "tHELPCONTEXT", "tHELPFILE", "tHELPSTRING", "tHELPSTRINGCONTEXT", 01006 "tHELPSTRINGDLL", "tHIDDEN", "tHYPER", "tID", "tIDEMPOTENT", "tIGNORE", 01007 "tIIDIS", "tIMMEDIATEBIND", "tIMPLICITHANDLE", "tIMPORT", "tIMPORTLIB", 01008 "tIN", "tIN_LINE", "tINLINE", "tINPUTSYNC", "tINT", "tINT3264", "tINT64", 01009 "tINTERFACE", "tLCID", "tLENGTHIS", "tLIBRARY", "tLICENSED", "tLOCAL", 01010 "tLONG", "tMAYBE", "tMESSAGE", "tMETHODS", "tMODULE", "tNOCODE", 01011 "tNONBROWSABLE", "tNONCREATABLE", "tNONEXTENSIBLE", "tNOTIFY", 01012 "tNOTIFYFLAG", "tNULL", "tOBJECT", "tODL", "tOLEAUTOMATION", "tOPTIMIZE", 01013 "tOPTIONAL", "tOUT", "tPARTIALIGNORE", "tPASCAL", "tPOINTERDEFAULT", 01014 "tPROGID", "tPROPERTIES", "tPROPGET", "tPROPPUT", "tPROPPUTREF", 01015 "tPROXY", "tPTR", "tPUBLIC", "tRANGE", "tREADONLY", "tREF", "tREGISTER", 01016 "tREPRESENTAS", "tREQUESTEDIT", "tRESTRICTED", "tRETVAL", "tSAFEARRAY", 01017 "tSHORT", "tSIGNED", "tSIZEIS", "tSIZEOF", "tSMALL", "tSOURCE", 01018 "tSTATIC", "tSTDCALL", "tSTRICTCONTEXTHANDLE", "tSTRING", "tSTRUCT", 01019 "tSWITCH", "tSWITCHIS", "tSWITCHTYPE", "tTHREADING", "tTRANSMITAS", 01020 "tTRUE", "tTYPEDEF", "tUIDEFAULT", "tUNION", "tUNIQUE", "tUNSIGNED", 01021 "tUSESGETLASTERROR", "tUSERMARSHAL", "tUUID", "tV1ENUM", "tVARARG", 01022 "tVERSION", "tVIPROGID", "tVOID", "tWCHAR", "tWIREMARSHAL", "tAPARTMENT", 01023 "tNEUTRAL", "tSINGLE", "tFREE", "tBOTH", "','", "'?'", "':'", "'|'", 01024 "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "'!'", 01025 "'~'", "ADDRESSOF", "NEG", "POS", "PPTR", "CAST", "'.'", "'['", "']'", 01026 "';'", "'('", "')'", "'{'", "'}'", "'='", "$accept", "input", 01027 "gbl_statements", "imp_statements", "int_statements", "semicolon_opt", 01028 "statement", "typedecl", "cppquote", "import_start", "import", 01029 "importlib", "libraryhdr", "library_start", "librarydef", "m_args", 01030 "arg_list", "args", "arg", "array", "m_attributes", "attributes", 01031 "attrib_list", "str_list", "attribute", "uuid_string", "callconv", 01032 "cases", "case", "enums", "enum_list", "enum", "enumdef", "m_exprs", 01033 "m_expr", "expr", "expr_list_int_const", "expr_int_const", "expr_const", 01034 "fields", "field", "ne_union_field", "ne_union_fields", "union_field", 01035 "s_field", "funcdef", "declaration", "m_ident", "t_ident", "ident", 01036 "base_type", "m_int", "int_std", "coclass", "coclasshdr", "coclassdef", 01037 "coclass_ints", "coclass_int", "dispinterface", "dispinterfacehdr", 01038 "dispint_props", "dispint_meths", "dispinterfacedef", "inherit", 01039 "interface", "interfacehdr", "interfacedef", "interfacedec", "module", 01040 "modulehdr", "moduledef", "storage_cls_spec", "function_specifier", 01041 "type_qualifier", "m_type_qual_list", "decl_spec", "m_decl_spec_no_type", 01042 "decl_spec_no_type", "declarator", "direct_declarator", 01043 "abstract_declarator", "abstract_declarator_no_direct", 01044 "m_abstract_declarator", "abstract_direct_declarator", "any_declarator", 01045 "any_declarator_no_direct", "m_any_declarator", "any_direct_declarator", 01046 "declarator_list", "m_bitfield", "struct_declarator", 01047 "struct_declarator_list", "init_declarator", "threading_type", 01048 "pointer_type", "structdef", "type", "typedef", "uniondef", "version", 0 01049 }; 01050 #endif 01051 01052 # ifdef YYPRINT 01053 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 01054 token YYLEX-NUM. */ 01055 static const yytype_uint16 yytoknum[] = 01056 { 01057 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 01058 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 01059 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 01060 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 01061 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 01062 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 01063 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 01064 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 01065 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 01066 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 01067 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 01068 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 01069 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 01070 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 01071 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 01072 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 01073 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 01074 425, 426, 427, 428, 429, 430, 431, 432, 433, 44, 01075 63, 58, 124, 94, 38, 60, 62, 45, 43, 42, 01076 47, 37, 33, 126, 434, 435, 436, 437, 438, 46, 01077 91, 93, 59, 40, 41, 123, 125, 61 01078 }; 01079 # endif 01080 01081 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 01082 static const yytype_uint16 yyr1[] = 01083 { 01084 0, 208, 209, 210, 210, 210, 210, 210, 210, 210, 01085 210, 211, 211, 211, 211, 211, 211, 211, 211, 211, 01086 212, 212, 213, 213, 214, 214, 214, 214, 214, 215, 01087 215, 215, 215, 215, 215, 215, 215, 215, 216, 217, 01088 218, 219, 220, 221, 222, 223, 223, 224, 224, 225, 01089 225, 226, 226, 227, 227, 227, 228, 228, 229, 230, 01090 230, 230, 231, 231, 232, 232, 232, 232, 232, 232, 01091 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01092 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01093 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01094 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01095 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01096 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01097 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01098 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01099 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, 01100 232, 232, 232, 233, 233, 234, 234, 234, 234, 235, 01101 235, 236, 236, 237, 237, 237, 238, 238, 239, 239, 01102 240, 241, 241, 242, 242, 243, 243, 243, 243, 243, 01103 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 01104 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 01105 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 01106 243, 243, 243, 243, 243, 243, 244, 244, 245, 246, 01107 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, 01108 252, 253, 254, 254, 255, 255, 256, 256, 256, 257, 01109 257, 258, 258, 258, 258, 258, 258, 258, 258, 258, 01110 258, 258, 259, 259, 260, 260, 260, 260, 260, 260, 01111 260, 260, 261, 261, 262, 263, 264, 264, 265, 266, 01112 266, 267, 268, 268, 269, 269, 270, 270, 271, 271, 01113 272, 272, 273, 274, 274, 274, 275, 275, 276, 276, 01114 277, 278, 279, 279, 279, 280, 281, 282, 282, 283, 01115 283, 284, 284, 285, 285, 285, 286, 286, 286, 287, 01116 287, 287, 287, 288, 288, 288, 289, 289, 290, 290, 01117 291, 291, 291, 291, 291, 292, 292, 292, 293, 293, 01118 294, 294, 295, 295, 295, 295, 295, 295, 296, 296, 01119 297, 297, 298, 299, 299, 300, 300, 301, 301, 301, 01120 301, 301, 302, 302, 302, 303, 304, 304, 304, 304, 01121 304, 304, 304, 304, 304, 304, 305, 306, 306, 307, 01122 307 01123 }; 01124 01125 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 01126 static const yytype_uint8 yyr2[] = 01127 { 01128 0, 2, 1, 0, 2, 2, 3, 2, 2, 2, 01129 2, 0, 2, 2, 3, 2, 2, 2, 2, 2, 01130 0, 2, 0, 1, 1, 2, 2, 1, 2, 1, 01131 2, 1, 2, 1, 2, 2, 2, 2, 4, 3, 01132 3, 5, 2, 3, 4, 0, 1, 1, 3, 1, 01133 3, 3, 2, 3, 3, 2, 0, 1, 3, 1, 01134 3, 4, 1, 3, 0, 1, 4, 1, 1, 1, 01135 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, 01136 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 01137 1, 1, 4, 4, 1, 1, 1, 1, 4, 4, 01138 4, 4, 4, 1, 4, 1, 1, 4, 1, 4, 01139 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, 01140 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 01141 1, 1, 4, 4, 1, 1, 1, 1, 1, 6, 01142 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 01143 4, 4, 4, 1, 1, 4, 4, 1, 1, 4, 01144 4, 4, 1, 1, 1, 1, 1, 1, 1, 0, 01145 2, 4, 3, 0, 2, 1, 1, 3, 3, 1, 01146 5, 1, 3, 0, 1, 1, 1, 1, 1, 1, 01147 1, 1, 1, 1, 1, 5, 3, 3, 3, 3, 01148 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 01149 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 01150 3, 3, 5, 5, 4, 3, 1, 3, 1, 1, 01151 0, 2, 4, 3, 2, 2, 0, 2, 2, 1, 01152 3, 1, 3, 2, 0, 1, 0, 1, 1, 1, 01153 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 01154 1, 1, 0, 1, 1, 2, 1, 2, 2, 1, 01155 1, 1, 2, 2, 2, 5, 0, 2, 2, 2, 01156 2, 2, 2, 3, 2, 3, 5, 5, 0, 2, 01157 2, 2, 2, 6, 8, 2, 2, 2, 2, 2, 01158 2, 5, 1, 1, 1, 1, 1, 0, 2, 2, 01159 3, 0, 1, 2, 2, 2, 3, 2, 1, 1, 01160 3, 2, 4, 3, 2, 1, 3, 2, 0, 1, 01161 3, 2, 1, 3, 4, 3, 2, 1, 3, 2, 01162 0, 1, 1, 3, 2, 1, 3, 4, 1, 3, 01163 0, 2, 2, 1, 3, 1, 3, 1, 1, 1, 01164 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 01165 2, 1, 2, 1, 2, 4, 4, 5, 10, 1, 01166 3 01167 }; 01168 01169 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 01170 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 01171 means the default is an error. */ 01172 static const yytype_uint16 yydefact[] = 01173 { 01174 3, 0, 2, 1, 367, 259, 251, 270, 0, 306, 01175 0, 0, 258, 246, 260, 302, 257, 261, 262, 0, 01176 305, 264, 271, 269, 0, 262, 304, 0, 262, 0, 01177 266, 303, 246, 56, 246, 256, 366, 252, 64, 10, 01178 0, 24, 11, 27, 11, 9, 0, 369, 0, 368, 01179 253, 0, 0, 7, 0, 0, 22, 0, 288, 5, 01180 4, 0, 8, 311, 311, 311, 0, 0, 371, 311, 01181 0, 373, 272, 273, 0, 279, 280, 370, 248, 0, 01182 263, 268, 0, 290, 291, 267, 0, 265, 254, 372, 01183 0, 0, 57, 374, 0, 255, 65, 0, 67, 68, 01184 69, 70, 71, 0, 0, 74, 75, 76, 77, 78, 01185 79, 80, 81, 82, 83, 0, 85, 86, 87, 0, 01186 89, 90, 91, 0, 0, 94, 95, 96, 97, 0, 01187 0, 0, 0, 0, 103, 0, 105, 106, 0, 108, 01188 0, 110, 111, 114, 0, 115, 116, 117, 118, 119, 01189 120, 121, 122, 123, 124, 125, 126, 127, 0, 129, 01190 130, 131, 0, 0, 134, 135, 136, 137, 364, 138, 01191 0, 140, 362, 0, 142, 143, 144, 0, 146, 147, 01192 148, 0, 0, 0, 0, 153, 363, 154, 0, 0, 01193 157, 158, 0, 0, 0, 0, 59, 162, 25, 0, 01194 0, 246, 0, 0, 246, 246, 0, 369, 274, 281, 01195 292, 300, 0, 371, 373, 26, 6, 276, 297, 0, 01196 23, 295, 296, 0, 0, 20, 315, 312, 314, 313, 01197 249, 250, 165, 166, 167, 168, 307, 0, 0, 319, 01198 355, 318, 243, 369, 371, 311, 373, 309, 28, 0, 01199 173, 39, 0, 230, 0, 0, 236, 0, 0, 0, 01200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01201 0, 0, 0, 183, 0, 0, 0, 0, 0, 183, 01202 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 01203 58, 40, 0, 17, 18, 19, 0, 15, 13, 12, 01204 16, 22, 370, 42, 298, 299, 372, 374, 43, 242, 01205 56, 0, 56, 0, 0, 289, 20, 0, 0, 0, 01206 317, 0, 0, 45, 321, 310, 38, 0, 175, 176, 01207 179, 375, 56, 348, 376, 56, 56, 0, 0, 194, 01208 185, 186, 187, 191, 192, 193, 188, 189, 0, 190, 01209 0, 0, 0, 0, 0, 0, 0, 228, 0, 226, 01210 229, 0, 0, 62, 0, 0, 0, 0, 0, 0, 01211 0, 0, 0, 0, 0, 340, 0, 0, 181, 184, 01212 0, 0, 0, 0, 0, 0, 0, 0, 357, 358, 01213 359, 360, 361, 0, 0, 0, 164, 163, 0, 379, 01214 0, 0, 0, 60, 64, 0, 14, 44, 22, 0, 01215 277, 282, 0, 0, 0, 0, 0, 0, 0, 22, 01216 21, 0, 308, 316, 320, 356, 0, 55, 0, 0, 01217 49, 46, 47, 180, 174, 0, 365, 0, 231, 0, 01218 0, 377, 57, 237, 0, 66, 72, 0, 218, 217, 01219 216, 219, 214, 215, 0, 328, 0, 0, 0, 0, 01220 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01221 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 01222 84, 88, 0, 92, 93, 98, 99, 100, 101, 102, 01223 104, 107, 109, 340, 307, 45, 345, 340, 342, 341, 01224 52, 337, 113, 183, 112, 128, 132, 133, 0, 141, 01225 145, 149, 150, 152, 151, 155, 156, 0, 159, 160, 01226 161, 61, 0, 275, 278, 284, 0, 283, 286, 0, 01227 0, 241, 287, 20, 22, 301, 54, 53, 322, 0, 01228 177, 178, 0, 373, 349, 244, 235, 234, 328, 225, 01229 307, 45, 332, 328, 329, 0, 325, 207, 208, 220, 01230 201, 202, 205, 206, 196, 197, 0, 198, 199, 200, 01231 204, 203, 210, 209, 212, 213, 211, 221, 0, 227, 01232 63, 51, 340, 307, 0, 340, 0, 336, 45, 344, 01233 182, 0, 380, 22, 240, 285, 0, 293, 50, 48, 01234 350, 353, 0, 233, 0, 245, 0, 328, 307, 0, 01235 340, 0, 324, 0, 45, 331, 0, 224, 335, 340, 01236 346, 339, 343, 0, 139, 41, 22, 0, 352, 0, 01237 232, 169, 223, 323, 340, 333, 327, 330, 222, 0, 01238 195, 338, 347, 294, 351, 354, 0, 326, 334, 0, 01239 0, 378, 170, 0, 56, 56, 239, 172, 0, 171, 01240 238 01241 }; 01242 01243 /* YYDEFGOTO[NTERM-NUM]. */ 01244 static const yytype_int16 yydefgoto[] = 01245 { 01246 -1, 1, 2, 199, 317, 221, 420, 40, 41, 42, 01247 43, 294, 206, 44, 295, 429, 430, 431, 432, 496, 01248 413, 92, 195, 364, 196, 398, 497, 646, 652, 327, 01249 328, 329, 243, 377, 378, 357, 358, 359, 361, 332, 01250 438, 443, 336, 657, 658, 530, 48, 604, 79, 498, 01251 49, 81, 50, 296, 52, 297, 310, 410, 54, 55, 01252 312, 415, 56, 224, 57, 58, 298, 299, 211, 61, 01253 300, 63, 64, 65, 318, 66, 226, 67, 240, 241, 01254 554, 611, 555, 556, 499, 586, 500, 501, 334, 628, 01255 601, 602, 242, 393, 197, 244, 69, 70, 246, 400 01256 }; 01257 01258 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 01259 STATE-NUM. */ 01260 #define YYPACT_NINF -509 01261 static const yytype_int16 yypact[] = 01262 { 01263 -509, 85, 1435, -509, -509, -509, -509, -509, 73, -509, 01264 -105, 90, -509, 205, -509, -509, -509, -509, 12, 110, 01265 -509, -509, -509, -509, 258, 12, -509, -83, 12, 362, 01266 -509, -509, 260, -70, 262, 362, -509, -509, 2569, -509, 01267 -58, -509, -509, -509, -509, -509, 2253, -42, -40, -509, 01268 -509, -31, -73, -509, -9, -68, 11, 13, -26, -509, 01269 -509, -17, -509, 56, 56, 56, 93, 2419, 17, 56, 01270 21, 33, -509, -509, 170, -509, -509, -60, -509, 40, 01271 -509, -509, 70, -509, -509, -509, 2419, -509, -509, -52, 01272 65, 2325, -509, -99, -97, -509, -509, 76, -509, -509, 01273 -509, -509, -509, 78, 101, -509, -509, -509, -509, -509, 01274 -509, -509, -509, -509, -509, 113, -509, -509, -509, 117, 01275 -509, -509, -509, 123, 128, -509, -509, -509, -509, 130, 01276 133, 134, 135, 136, -509, 137, -509, -509, 138, -509, 01277 140, -509, -509, 141, 144, -509, -509, -509, -509, -509, 01278 -509, -509, -509, -509, -509, -509, -509, -509, 145, -509, 01279 -509, -509, 146, 147, -509, -509, -509, -509, -509, -509, 01280 148, -509, -509, 151, -509, -509, -509, 169, -509, -509, 01281 -509, 173, 174, 175, 177, -509, -509, -509, 179, 180, 01282 -509, -509, 182, 185, 188, -121, -509, -509, -509, 1308, 01283 495, 274, 342, 285, 289, 303, 189, 191, -509, -509, 01284 -509, -509, 93, 194, 195, -509, -509, -509, -509, -59, 01285 -509, -509, -509, 305, 193, -509, -509, -509, -509, -509, 01286 -509, -509, -509, -509, -509, -509, -509, 93, 93, -509, 01287 139, -57, -509, -509, -509, 56, -509, -509, -509, 196, 01288 325, -509, 198, -509, 93, 201, -509, 399, 325, 821, 01289 821, 400, 401, 821, 821, 404, 406, 821, 409, 821, 01290 821, 1854, 821, 821, 411, -78, 414, 821, 2419, 821, 01291 821, 2419, 9, 2419, 2419, 143, 420, 418, 2419, 2569, 01292 228, -509, 226, -509, -509, -509, 230, -509, -509, -509, 01293 -509, 11, 229, -509, -509, -509, 229, -92, -509, -509, 01294 -128, 252, -81, 233, 231, -509, -509, 596, 71, 234, 01295 -509, 821, 1110, 1854, -509, -509, -509, 235, 263, -509, 01296 232, -509, -84, -509, 264, -70, -71, 241, 256, -509, 01297 -509, -509, -509, -509, -509, -509, -509, -509, 253, -509, 01298 821, 821, 821, 821, 821, 821, 1039, 2065, -134, -509, 01299 2065, 261, 265, -509, -117, 266, 267, 268, 269, 270, 01300 271, 272, 1231, 273, 2325, 87, 276, -93, -509, 2065, 01301 277, 278, 280, 283, 281, -87, 1852, 287, -509, -509, 01302 -509, -509, -509, 288, 290, 291, -509, -509, 292, 279, 01303 296, 297, 298, -509, 2569, 459, -509, -509, 11, -19, 01304 -509, -509, 306, 2325, 301, 925, 299, 379, 710, 11, 01305 -509, 2325, -509, -509, -509, -509, 1143, -509, 433, 302, 01306 310, -509, -509, -509, 325, 821, -509, 2325, -509, 93, 01307 307, -509, 308, -509, 311, -509, -509, 2325, 22, 22, 01308 22, 22, 22, 22, 1924, -21, 821, 821, 511, 821, 01309 821, 821, 821, 821, 821, 821, 821, 821, 821, 821, 01310 821, 821, 821, 821, 821, 821, 512, 821, 821, -509, 01311 -509, -509, 508, -509, -509, -509, -509, -509, -509, -509, 01312 -509, -509, -509, 87, -509, 1562, -509, 87, -509, -509, 01313 -509, -39, -509, 821, -509, -509, -509, -509, 821, -509, 01314 -509, -509, -509, -509, -509, -509, -509, 513, -509, -509, 01315 -509, -509, 313, -509, -509, -509, 93, -509, -509, 2325, 01316 318, -509, -509, -509, 11, -509, -509, -509, -509, 1760, 01317 -509, -509, 87, 319, -509, 325, -509, -509, -21, -509, 01318 -509, 1688, -509, -21, -509, 320, -23, 112, 112, -509, 01319 732, 732, 68, 68, 1970, 1994, 2044, 1076, 2082, 1018, 01320 68, 68, 95, 95, 22, 22, 22, -509, 1949, -509, 01321 -509, -509, 25, -509, 321, 87, 323, -509, 1854, -509, 01322 -509, 327, -509, 11, -509, -509, 811, -509, -509, -509, 01323 348, -509, -114, -509, 317, -509, 328, 341, -509, 329, 01324 87, 332, -509, 821, 1854, -509, 821, -509, -509, 25, 01325 -509, -509, -509, 335, -509, -509, 11, 821, -509, 87, 01326 -509, -509, -509, -509, 25, -509, -509, -509, 22, 336, 01327 2065, -509, -509, -509, -509, -509, -10, -509, -509, 821, 01328 364, -509, -509, 365, -136, -136, -509, -509, 345, -509, 01329 -509 01330 }; 01331 01332 /* YYPGOTO[NTERM-NUM]. */ 01333 static const yytype_int16 yypgoto[] = 01334 { 01335 -509, -509, -509, 504, -304, -296, 41, -509, -509, -509, 01336 149, -509, -509, -509, 548, -462, -509, -509, -264, -221, 01337 -27, -2, -509, -509, -268, -509, -65, -509, -509, -509, 01338 -509, 119, 2, 286, 48, -104, -509, -254, -252, -509, 01339 -509, -509, -509, -100, -197, -509, 153, -509, 39, -47, 01340 -509, 142, 105, 58, -509, 555, -509, -509, 516, -509, 01341 -509, -509, -509, -509, -24, -509, 556, 1, -509, -509, 01342 557, -509, -509, -309, -450, -32, -14, -33, -213, -509, 01343 -509, -509, -506, -509, -508, -509, -179, -509, -509, -509, 01344 -56, -509, 352, -509, 294, 6, -51, -509, 0, -509 01345 }; 01346 01347 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 01348 positive, shift that token. If negative, reduce the rule which 01349 number is the opposite. If zero, do what YYDEFACT says. 01350 If YYTABLE_NINF, syntax error. */ 01351 #define YYTABLE_NINF -248 01352 static const yytype_int16 yytable[] = 01353 { 01354 46, 238, 71, 60, 47, 407, 91, 373, 68, 422, 01355 366, 365, 418, 369, 212, 371, 245, 232, 376, 239, 01356 324, 403, 210, 383, 319, 320, 412, 649, 230, 231, 01357 227, 227, 227, 584, 600, 252, 227, 458, 11, 24, 01358 650, 333, 606, 39, 582, 478, 214, 612, 207, 233, 01359 228, 229, 213, 168, -247, 247, 255, 172, 289, 254, 01360 51, -247, 482, 232, 38, 629, 656, 311, 9, 425, 01361 479, 90, 38, 94, 230, 231, 72, 73, 408, 24, 01362 290, 456, 457, 458, 186, 3, 503, 483, 630, 609, 01363 230, 231, 503, 75, 76, 233, 230, 231, 74, 9, 01364 607, 633, 234, -34, 208, 423, -247, 80, 256, 232, 01365 458, 504, 523, -247, 9, 414, 38, 510, 82, 38, 01366 86, 600, 436, 535, 15, 232, 623, 458, 235, 38, 01367 38, 232, 217, 619, 88, 441, 521, 219, 440, 444, 01368 95, 233, -30, 322, 198, -247, 323, 238, 234, 20, 01369 -32, 396, 639, -247, 397, 223, 360, 233, 634, 360, 01370 -29, 322, 215, 233, 588, 239, 372, 85, 550, 379, 01371 87, 216, 238, 238, 235, 379, 386, 322, 249, 322, 01372 614, 541, 551, 388, 389, 390, 391, 392, 225, 238, 01373 239, 239, 26, 218, 234, 313, 651, 46, 46, 71, 01374 71, 47, 47, 330, 31, 68, 68, 239, 77, 78, 01375 234, 338, 227, 220, 494, 222, 234, 360, 428, -31, 01376 235, 476, 477, 248, 579, 322, 544, 384, 495, 596, 01377 387, 325, 394, 395, 552, -33, 235, 402, 597, 375, 01378 293, 293, 235, 90, 94, 250, 448, 449, 450, 451, 01379 452, 453, 454, 238, 591, 471, 472, 473, 474, 475, 01380 236, 83, 84, 89, 78, 93, 78, 476, 477, 374, 01381 253, 239, 251, 422, 237, 599, 494, 302, 78, 257, 01382 589, 258, 236, 409, 473, 474, 475, 322, 304, 305, 01383 495, 375, 306, 78, 476, 477, 237, 625, 422, 471, 01384 472, 473, 474, 475, 259, 437, 307, 78, 314, 315, 01385 422, 476, 477, 594, 581, 421, 260, 71, 587, 47, 01386 261, 374, 451, 68, 455, 422, 262, 552, 230, 231, 01387 643, 263, 552, 264, 442, 615, 265, 266, 267, 268, 01388 269, 270, 493, 271, 272, 303, 321, 273, 274, 275, 01389 276, 277, 557, 558, 278, 560, 561, 562, 563, 564, 01390 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 01391 575, 576, 279, 578, 238, 644, 280, 281, 282, 232, 01392 283, 526, 284, 285, 9, 286, 552, 330, 287, 212, 01393 553, 288, 239, -35, 308, 653, -36, -37, 316, 379, 01394 326, 7, 331, 618, 335, 542, 621, 337, 362, 363, 01395 524, 233, 367, 529, 368, 548, 421, 370, 71, 380, 01396 47, 214, 382, 207, 68, 399, 401, 213, 404, 405, 01397 585, 636, 406, 411, -247, 416, 417, 543, 424, 435, 01398 641, 433, 434, 439, 18, 445, 456, 457, 458, 459, 01399 460, 461, 462, 463, 464, 647, 447, 21, 22, 23, 01400 446, 238, 508, 375, 234, 480, 25, 522, 19, 481, 01401 484, 485, 486, 487, 488, 489, 490, 492, 517, 239, 01402 502, 505, 506, 553, 507, 509, 610, 525, 553, 539, 01403 235, 512, 513, 374, 514, 515, 516, 212, 605, 4, 01404 518, 519, 520, 527, 28, 532, 538, 375, 30, 638, 01405 546, 545, 640, 547, 559, 577, 580, 593, 592, 375, 01406 595, 603, 631, 360, 613, 620, 5, 622, 6, 627, 01407 550, 624, 632, 635, 7, 8, 637, 374, 9, 642, 01408 648, 322, 553, 10, 551, 654, 655, 660, 200, 374, 01409 45, 590, 11, 540, 12, 659, 375, 53, 59, 62, 01410 13, 14, 209, 15, 309, 385, 533, 16, 531, 381, 01411 17, 0, 0, 645, 0, 0, 0, 18, 0, 0, 01412 0, 0, 375, 0, 19, 292, 374, 0, 20, 0, 01413 21, 22, 23, 24, 421, 0, 71, 0, 47, 25, 01414 4, 0, 68, 0, 0, 0, 0, 0, 0, 0, 01415 0, 0, 374, 465, 0, 466, 467, 468, 469, 470, 01416 471, 472, 473, 474, 475, 0, 0, 5, 0, 6, 01417 0, 26, 476, 477, 537, 7, 27, 28, 29, 9, 01418 0, 30, 0, 31, 10, 0, 0, 32, 0, 0, 01419 0, 0, 0, 0, 33, 12, 34, 0, 35, 0, 01420 0, 13, 14, 0, 15, 0, 36, 37, 16, 0, 01421 0, 17, 0, 0, 0, 0, 0, 0, 18, 0, 01422 0, 0, 0, 0, 0, 19, 0, 0, 0, 20, 01423 0, 21, 22, 23, 0, 38, 0, 0, 0, 0, 01424 25, 301, 0, 0, 0, 0, 0, 0, 0, 0, 01425 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 01426 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01427 0, 0, 26, 0, 0, 0, 0, 27, 28, 29, 01428 0, 5, 30, 6, 31, 456, 457, 458, 32, 7, 01429 461, 462, 0, 9, 0, 33, 0, 34, 10, 35, 01430 0, 0, 0, 0, 0, 0, 0, 36, 37, 12, 01431 0, 0, 0, 0, 0, 13, 14, 0, 15, 0, 01432 0, 0, 16, 0, 0, 17, 0, 0, 0, 0, 01433 0, 0, 18, 0, 0, 0, 38, 0, 0, 19, 01434 0, 0, 419, 20, 0, 21, 22, 23, 0, 0, 01435 0, 0, 0, 0, 25, 4, 0, 0, 0, 0, 01436 0, 0, 0, 0, 339, 0, 340, 341, 342, 343, 01437 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 01438 0, 0, 5, 0, 6, 0, 26, 0, 0, 0, 01439 7, 27, 28, 29, 9, 0, 30, 0, 31, 10, 01440 0, 0, 32, 0, 0, 0, 0, 0, 0, 33, 01441 12, 34, 0, 35, 0, 0, 13, 14, 0, 15, 01442 0, 36, 37, 16, 0, 0, 17, 0, 0, 0, 01443 346, 0, 0, 18, 0, 0, 0, 0, 0, 0, 01444 19, 0, 0, 0, 20, 0, 21, 22, 23, 0, 01445 38, 0, 0, 0, 0, 25, 534, 469, 470, 471, 01446 472, 473, 474, 475, 0, 0, 0, 0, 0, 4, 01447 0, 476, 477, 0, 0, 0, 347, 0, 0, 0, 01448 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 01449 0, 0, 27, 28, 29, 0, 5, 30, 6, 31, 01450 0, 0, 0, 32, 7, 0, 348, 0, 9, 0, 01451 33, 0, 34, 0, 35, 0, 0, 0, 0, 349, 01452 0, 0, 36, 37, 12, 0, 0, 0, 0, 0, 01453 201, 14, 0, 15, 0, 0, 0, 16, 0, 0, 01454 17, 0, 0, 0, 0, 350, 0, 18, 351, 352, 01455 353, 38, 0, 354, 355, 0, 0, 626, 20, 0, 01456 21, 22, 23, 0, 356, 0, 0, 0, 0, 25, 01457 0, 456, 457, 458, 459, 460, 461, 462, 0, 0, 01458 0, 0, 339, 4, 340, 341, 342, 343, 344, 345, 01459 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01460 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, 01461 5, 30, 6, 31, 0, 0, 0, 204, 7, 0, 01462 0, 0, 9, 0, 0, 0, 205, 0, 35, 456, 01463 457, 458, 459, 460, 461, 462, 36, 37, 12, 0, 01464 0, 0, 0, 0, 201, 14, 0, 15, 346, 0, 01465 0, 16, 0, 339, 17, 340, 341, 342, 343, 344, 01466 345, 18, 0, 0, 0, 38, 0, 0, 0, 0, 01467 0, 528, 20, 0, 21, 22, 23, 0, 0, 0, 01468 0, 0, 0, 25, 0, 0, 339, 0, 340, 341, 01469 342, 343, 344, 345, 347, 0, 0, 0, 0, 0, 01470 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01471 0, 0, 0, 0, 0, 26, 0, 0, 0, 346, 01472 27, 28, 29, 0, 348, 30, 0, 31, 0, 0, 01473 0, 204, 0, 0, 0, 0, 0, 349, 0, 0, 01474 205, 0, 35, 469, 470, 471, 472, 473, 474, 475, 01475 36, 37, 346, 0, 0, 0, 0, 476, 477, 0, 01476 0, 0, 0, 350, 0, 347, 351, 352, 353, 0, 01477 0, 354, 355, 0, 0, 0, 0, 0, 0, 0, 01478 0, 0, 356, 0, 456, 457, 458, 459, 460, 461, 01479 462, 463, 464, 0, 0, 348, 0, 0, 347, 467, 01480 468, 469, 470, 471, 472, 473, 474, 475, 349, 0, 01481 0, 0, 0, 0, 0, 476, 477, 0, 0, 0, 01482 0, 0, 0, 0, 0, 0, 0, 0, 348, 0, 01483 0, 0, 0, 0, 350, 0, 0, 351, 352, 426, 01484 0, 349, 354, 355, 0, 0, 0, 0, 0, 0, 01485 0, 427, 4, 356, 0, 0, 0, 0, 0, 0, 01486 291, 0, 0, 0, 0, 0, 0, 350, 0, 0, 01487 351, 352, 353, 0, 0, 354, 355, 0, 0, 5, 01488 0, 6, 0, 0, 536, 0, 356, 7, 8, 0, 01489 0, 9, 0, 0, 0, 0, 10, 0, 0, 0, 01490 0, 0, 0, 0, 0, 11, 0, 12, 0, 0, 01491 0, 0, 0, 13, 14, 0, 15, 0, 0, 0, 01492 16, 0, 0, 17, 0, 0, 0, 0, 0, 0, 01493 18, 0, 0, 0, 0, 0, 0, 19, 292, 0, 01494 0, 20, 0, 21, 22, 23, 24, 0, 0, 0, 01495 0, 465, 25, 466, 467, 468, 469, 470, 471, 472, 01496 473, 474, 475, 0, 0, 0, 0, 0, 0, 0, 01497 476, 477, 0, 0, 0, 491, 0, 0, 0, 4, 01498 0, 0, 0, 0, 26, 0, 0, 0, 0, 27, 01499 28, 29, 0, 0, 30, 0, 31, 0, 0, 0, 01500 32, 0, 0, 0, 0, 0, 5, 33, 6, 34, 01501 0, 35, 0, 0, 7, 8, 0, 0, 9, 36, 01502 37, 0, 0, 10, 0, 0, 0, 0, 0, 0, 01503 0, 0, 11, 0, 12, 0, 0, 0, 0, 0, 01504 13, 14, 0, 15, 0, 0, 0, 16, 38, 0, 01505 17, 0, 0, 0, 0, 0, 0, 18, 0, 0, 01506 0, 0, 0, 0, 19, 0, 0, 0, 20, 0, 01507 21, 22, 23, 24, 0, 0, 0, 0, 0, 25, 01508 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01509 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01510 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 01511 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, 01512 0, 30, 0, 31, 0, 0, 0, 32, 0, 0, 01513 0, 0, 0, 5, 33, 6, 34, 0, 35, 0, 01514 232, 7, 0, 0, 0, 9, 36, 37, 0, 0, 01515 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01516 0, 12, 0, 0, 0, 0, 0, 201, 14, 0, 01517 15, 0, 233, 0, 16, 38, 0, 17, 0, 0, 01518 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 01519 0, 0, 0, 0, 0, 20, 0, 21, 22, 23, 01520 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 01521 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01522 0, 0, 0, 0, 0, 234, 0, 0, 0, 0, 01523 0, 0, 4, 0, 0, 0, 0, 0, 26, 0, 01524 0, 0, 0, 27, 28, 29, 0, 0, 30, 0, 01525 31, 235, 0, 0, 204, 0, 0, 0, 0, 5, 01526 0, 6, 0, 205, 0, 35, 232, 7, 0, 0, 01527 0, 9, 0, 36, 37, 0, 0, 0, 0, 0, 01528 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 01529 0, 583, 0, 201, 14, 0, 15, 0, 233, 0, 01530 16, 0, 38, 17, 4, 0, 0, 0, 0, 0, 01531 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01532 0, 20, 598, 21, 22, 23, 0, 0, 0, 0, 01533 0, 5, 25, 6, 0, 0, 0, 0, 0, 7, 01534 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 01535 0, 234, 0, 0, 0, 0, 0, 0, 0, 12, 01536 0, 0, 0, 0, 26, 201, 14, 0, 15, 27, 01537 28, 29, 16, 0, 30, 17, 31, 235, 0, 0, 01538 204, 0, 18, 0, 0, 0, 0, 0, 0, 205, 01539 0, 35, 0, 20, 0, 21, 22, 23, 4, 36, 01540 37, 0, 0, 0, 25, 456, 457, 458, 459, 460, 01541 461, 462, 463, 464, 0, 0, 0, 608, 0, 0, 01542 0, 0, 0, 0, 0, 5, 0, 6, 38, 0, 01543 0, 0, 0, 7, 0, 0, 26, 9, 0, 0, 01544 0, 27, 28, 29, 0, 0, 30, 0, 31, 0, 01545 0, 0, 204, 12, 0, 0, 0, 0, 0, 201, 01546 14, 205, 15, 35, 0, 0, 16, 0, 0, 17, 01547 0, 36, 37, 0, 0, 0, 18, 456, 457, 458, 01548 459, 460, 461, 462, 463, 464, 0, 20, 0, 21, 01549 22, 23, 0, 0, 0, 0, 0, 0, 25, 0, 01550 38, 0, 456, 457, 458, 459, 460, 461, 462, 463, 01551 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01552 0, 0, 0, 456, 457, 458, 459, 460, 461, 462, 01553 26, 464, 0, 0, 0, 27, 28, 29, 0, 0, 01554 30, 0, 31, 0, 0, 0, 204, 456, 457, 458, 01555 459, 460, 461, 462, 0, 205, 0, 35, 0, 0, 01556 0, 0, 0, 0, 0, 36, 37, 0, 0, 0, 01557 0, 0, 465, 0, 466, 467, 468, 469, 470, 471, 01558 472, 473, 474, 475, 0, 0, 0, 0, 0, 0, 01559 0, 476, 477, 0, 38, 0, 511, 456, 457, 458, 01560 459, 460, 461, 462, 463, 464, 0, 0, 0, 0, 01561 0, 0, 0, 0, 0, 0, 0, 0, 456, 457, 01562 458, 459, 460, 461, 462, 463, 464, 0, 0, 0, 01563 0, 0, 0, 0, 0, 456, 457, 458, 459, 460, 01564 461, 462, 0, 0, 465, 0, 466, 467, 468, 469, 01565 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, 01566 0, 0, 0, 476, 477, 0, 0, 0, 549, 465, 01567 0, 466, 467, 468, 469, 470, 471, 472, 473, 474, 01568 475, 0, 0, 0, 0, 0, 0, 0, 476, 477, 01569 617, 0, 466, 467, 468, 469, 470, 471, 472, 473, 01570 474, 475, 0, 0, 0, 0, 0, 0, 0, 476, 01571 477, 0, 0, 0, 0, 0, 466, 467, 468, 469, 01572 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, 01573 0, 0, 0, 476, 477, 0, 0, 0, 0, 0, 01574 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01575 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01576 0, 0, 0, 0, 465, 616, 466, 467, 468, 469, 01577 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, 01578 0, 0, 0, 476, 477, 465, 0, 466, 467, 468, 01579 469, 470, 471, 472, 473, 474, 475, 4, 0, 0, 01580 0, 0, 0, 0, 476, 477, 468, 469, 470, 471, 01581 472, 473, 474, 475, 0, 0, 0, 0, 0, 0, 01582 0, 476, 477, 0, 5, 0, 6, 0, 0, 0, 01583 0, 0, 7, 8, 0, 0, 9, 0, 0, 0, 01584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01585 11, 0, 12, 0, 0, 0, 0, 0, 201, 14, 01586 0, 15, 0, 0, 0, 16, 0, 0, 17, 4, 01587 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 01588 0, 0, 0, 0, 0, 0, 20, 0, 21, 22, 01589 23, 24, 0, 0, 202, 0, 5, 25, 6, 0, 01590 0, 203, 0, 0, 7, 0, 0, 0, 9, 0, 01591 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01592 0, 0, 0, 0, 12, 0, 0, 0, 0, 26, 01593 201, 14, 0, 15, 27, 28, 29, 16, 0, 30, 01594 17, 31, 0, 0, 0, 204, 0, 18, 0, 0, 01595 0, 0, 0, 0, 205, 0, 35, 0, 20, 0, 01596 21, 22, 23, 4, 36, 37, 0, 0, 0, 25, 01597 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01598 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01599 5, 0, 6, 0, 0, 0, 0, 0, 7, 0, 01600 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, 01601 0, 30, 0, 31, 0, 0, 0, 204, 12, 0, 01602 0, 0, 0, 0, 201, 14, 205, 0, 35, 0, 01603 0, 16, 0, 0, 17, 0, 36, 37, 0, 0, 01604 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 01605 0, 0, 0, 0, 21, 22, 23, 0, 0, 0, 01606 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 01607 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01608 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01609 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 01610 27, 28, 29, 0, 0, 30, 0, 0, 0, 0, 01611 0, 204, 0, 0, 0, 0, 0, 0, 0, 0, 01612 205, 0, 35, 0, 0, 0, 0, 0, 0, 0, 01613 36, 37, 96, 0, 97, 98, 99, 0, 100, 101, 01614 0, 102, 0, 0, 103, 0, 104, 0, 0, 0, 01615 105, 106, 0, 107, 108, 109, 110, 0, 111, 112, 01616 113, 114, 115, 116, 117, 118, 0, 119, 0, 120, 01617 121, 122, 123, 124, 0, 0, 125, 0, 0, 0, 01618 126, 0, 127, 128, 0, 129, 130, 131, 132, 133, 01619 134, 0, 135, 136, 137, 138, 139, 140, 0, 0, 01620 141, 0, 0, 142, 0, 0, 0, 0, 143, 144, 01621 0, 145, 146, 0, 147, 148, 0, 0, 149, 150, 01622 151, 152, 153, 154, 0, 155, 156, 157, 158, 159, 01623 160, 161, 0, 162, 163, 0, 164, 165, 166, 167, 01624 168, 169, 170, 171, 172, 0, 173, 174, 175, 176, 01625 0, 0, 0, 177, 0, 0, 178, 0, 0, 179, 01626 180, 0, 0, 181, 182, 183, 184, 0, 0, 185, 01627 0, 186, 0, 187, 188, 189, 190, 191, 192, 193, 01628 0, 0, 194 01629 }; 01630 01631 static const yytype_int16 yycheck[] = 01632 { 01633 2, 66, 2, 2, 2, 301, 33, 271, 2, 318, 01634 264, 263, 316, 267, 46, 269, 67, 38, 272, 66, 01635 241, 289, 46, 277, 237, 238, 107, 37, 3, 4, 01636 63, 64, 65, 495, 542, 86, 69, 15, 57, 98, 01637 50, 254, 548, 2, 494, 179, 46, 553, 46, 70, 01638 64, 65, 46, 131, 153, 69, 153, 135, 179, 91, 01639 2, 153, 179, 38, 200, 179, 202, 126, 43, 321, 01640 204, 32, 200, 34, 3, 4, 3, 4, 206, 98, 01641 201, 13, 14, 15, 162, 0, 179, 204, 202, 551, 01642 3, 4, 179, 3, 4, 70, 3, 4, 203, 43, 01643 550, 607, 123, 202, 46, 318, 205, 95, 205, 38, 01644 15, 204, 408, 205, 43, 312, 200, 204, 8, 200, 01645 203, 629, 206, 419, 68, 38, 588, 15, 149, 200, 01646 200, 38, 205, 583, 29, 206, 404, 205, 335, 336, 01647 35, 70, 202, 200, 202, 205, 203, 212, 123, 93, 01648 202, 8, 614, 205, 11, 181, 260, 70, 608, 263, 01649 202, 200, 202, 70, 203, 212, 270, 25, 189, 273, 01650 28, 202, 237, 238, 149, 279, 280, 200, 8, 200, 01651 203, 435, 203, 174, 175, 176, 177, 178, 205, 254, 01652 237, 238, 136, 202, 123, 219, 206, 199, 200, 199, 01653 200, 199, 200, 250, 148, 199, 200, 254, 3, 4, 01654 123, 258, 245, 202, 189, 202, 123, 321, 322, 202, 01655 149, 199, 200, 202, 478, 200, 439, 278, 203, 533, 01656 281, 245, 283, 284, 455, 202, 149, 288, 534, 271, 01657 199, 200, 149, 204, 205, 205, 350, 351, 352, 353, 01658 354, 355, 356, 318, 508, 187, 188, 189, 190, 191, 01659 189, 3, 4, 3, 4, 3, 4, 199, 200, 271, 01660 205, 318, 202, 582, 203, 539, 189, 3, 4, 203, 01661 501, 203, 189, 310, 189, 190, 191, 200, 3, 4, 01662 203, 323, 3, 4, 199, 200, 203, 593, 607, 187, 01663 188, 189, 190, 191, 203, 332, 3, 4, 3, 4, 01664 619, 199, 200, 526, 493, 317, 203, 317, 497, 317, 01665 203, 323, 426, 317, 356, 634, 203, 548, 3, 4, 01666 626, 203, 553, 203, 336, 556, 203, 203, 203, 203, 01667 203, 203, 374, 203, 203, 3, 207, 203, 203, 203, 01668 203, 203, 456, 457, 203, 459, 460, 461, 462, 463, 01669 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 01670 474, 475, 203, 477, 439, 627, 203, 203, 203, 38, 01671 203, 413, 203, 203, 43, 203, 607, 434, 203, 421, 01672 455, 203, 439, 202, 205, 649, 202, 202, 205, 503, 01673 204, 39, 204, 582, 203, 437, 585, 8, 8, 8, 01674 409, 70, 8, 415, 8, 447, 418, 8, 418, 8, 01675 418, 421, 8, 421, 418, 5, 8, 421, 200, 203, 01676 495, 610, 202, 181, 205, 202, 205, 437, 204, 207, 01677 619, 206, 179, 179, 82, 204, 13, 14, 15, 16, 01678 17, 18, 19, 20, 21, 634, 203, 95, 96, 97, 01679 204, 526, 179, 495, 123, 204, 104, 8, 89, 204, 01680 204, 204, 204, 204, 204, 204, 204, 204, 199, 526, 01681 204, 204, 204, 548, 204, 204, 551, 181, 553, 179, 01682 149, 204, 204, 495, 204, 204, 204, 529, 545, 4, 01683 204, 204, 204, 202, 142, 206, 204, 539, 146, 613, 01684 202, 204, 616, 202, 3, 3, 8, 204, 5, 551, 01685 202, 202, 205, 627, 204, 204, 31, 204, 33, 181, 01686 189, 204, 204, 204, 39, 40, 204, 539, 43, 204, 01687 204, 200, 607, 48, 203, 181, 181, 202, 44, 551, 01688 2, 503, 57, 434, 59, 655, 588, 2, 2, 2, 01689 65, 66, 46, 68, 212, 279, 417, 72, 415, 275, 01690 75, -1, -1, 629, -1, -1, -1, 82, -1, -1, 01691 -1, -1, 614, -1, 89, 90, 588, -1, 93, -1, 01692 95, 96, 97, 98, 596, -1, 596, -1, 596, 104, 01693 4, -1, 596, -1, -1, -1, -1, -1, -1, -1, 01694 -1, -1, 614, 180, -1, 182, 183, 184, 185, 186, 01695 187, 188, 189, 190, 191, -1, -1, 31, -1, 33, 01696 -1, 136, 199, 200, 201, 39, 141, 142, 143, 43, 01697 -1, 146, -1, 148, 48, -1, -1, 152, -1, -1, 01698 -1, -1, -1, -1, 159, 59, 161, -1, 163, -1, 01699 -1, 65, 66, -1, 68, -1, 171, 172, 72, -1, 01700 -1, 75, -1, -1, -1, -1, -1, -1, 82, -1, 01701 -1, -1, -1, -1, -1, 89, -1, -1, -1, 93, 01702 -1, 95, 96, 97, -1, 200, -1, -1, -1, -1, 01703 104, 206, -1, -1, -1, -1, -1, -1, -1, -1, 01704 -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, 01705 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01706 -1, -1, 136, -1, -1, -1, -1, 141, 142, 143, 01707 -1, 31, 146, 33, 148, 13, 14, 15, 152, 39, 01708 18, 19, -1, 43, -1, 159, -1, 161, 48, 163, 01709 -1, -1, -1, -1, -1, -1, -1, 171, 172, 59, 01710 -1, -1, -1, -1, -1, 65, 66, -1, 68, -1, 01711 -1, -1, 72, -1, -1, 75, -1, -1, -1, -1, 01712 -1, -1, 82, -1, -1, -1, 200, -1, -1, 89, 01713 -1, -1, 206, 93, -1, 95, 96, 97, -1, -1, 01714 -1, -1, -1, -1, 104, 4, -1, -1, -1, -1, 01715 -1, -1, -1, -1, 3, -1, 5, 6, 7, 8, 01716 9, 10, -1, -1, -1, -1, -1, -1, -1, -1, 01717 -1, -1, 31, -1, 33, -1, 136, -1, -1, -1, 01718 39, 141, 142, 143, 43, -1, 146, -1, 148, 48, 01719 -1, -1, 152, -1, -1, -1, -1, -1, -1, 159, 01720 59, 161, -1, 163, -1, -1, 65, 66, -1, 68, 01721 -1, 171, 172, 72, -1, -1, 75, -1, -1, -1, 01722 69, -1, -1, 82, -1, -1, -1, -1, -1, -1, 01723 89, -1, -1, -1, 93, -1, 95, 96, 97, -1, 01724 200, -1, -1, -1, -1, 104, 206, 185, 186, 187, 01725 188, 189, 190, 191, -1, -1, -1, -1, -1, 4, 01726 -1, 199, 200, -1, -1, -1, 115, -1, -1, -1, 01727 -1, -1, -1, -1, -1, -1, -1, 136, -1, -1, 01728 -1, -1, 141, 142, 143, -1, 31, 146, 33, 148, 01729 -1, -1, -1, 152, 39, -1, 145, -1, 43, -1, 01730 159, -1, 161, -1, 163, -1, -1, -1, -1, 158, 01731 -1, -1, 171, 172, 59, -1, -1, -1, -1, -1, 01732 65, 66, -1, 68, -1, -1, -1, 72, -1, -1, 01733 75, -1, -1, -1, -1, 184, -1, 82, 187, 188, 01734 189, 200, -1, 192, 193, -1, -1, 206, 93, -1, 01735 95, 96, 97, -1, 203, -1, -1, -1, -1, 104, 01736 -1, 13, 14, 15, 16, 17, 18, 19, -1, -1, 01737 -1, -1, 3, 4, 5, 6, 7, 8, 9, 10, 01738 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01739 -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, 01740 31, 146, 33, 148, -1, -1, -1, 152, 39, -1, 01741 -1, -1, 43, -1, -1, -1, 161, -1, 163, 13, 01742 14, 15, 16, 17, 18, 19, 171, 172, 59, -1, 01743 -1, -1, -1, -1, 65, 66, -1, 68, 69, -1, 01744 -1, 72, -1, 3, 75, 5, 6, 7, 8, 9, 01745 10, 82, -1, -1, -1, 200, -1, -1, -1, -1, 01746 -1, 206, 93, -1, 95, 96, 97, -1, -1, -1, 01747 -1, -1, -1, 104, -1, -1, 3, -1, 5, 6, 01748 7, 8, 9, 10, 115, -1, -1, -1, -1, -1, 01749 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01750 -1, -1, -1, -1, -1, 136, -1, -1, -1, 69, 01751 141, 142, 143, -1, 145, 146, -1, 148, -1, -1, 01752 -1, 152, -1, -1, -1, -1, -1, 158, -1, -1, 01753 161, -1, 163, 185, 186, 187, 188, 189, 190, 191, 01754 171, 172, 69, -1, -1, -1, -1, 199, 200, -1, 01755 -1, -1, -1, 184, -1, 115, 187, 188, 189, -1, 01756 -1, 192, 193, -1, -1, -1, -1, -1, -1, -1, 01757 -1, -1, 203, -1, 13, 14, 15, 16, 17, 18, 01758 19, 20, 21, -1, -1, 145, -1, -1, 115, 183, 01759 184, 185, 186, 187, 188, 189, 190, 191, 158, -1, 01760 -1, -1, -1, -1, -1, 199, 200, -1, -1, -1, 01761 -1, -1, -1, -1, -1, -1, -1, -1, 145, -1, 01762 -1, -1, -1, -1, 184, -1, -1, 187, 188, 189, 01763 -1, 158, 192, 193, -1, -1, -1, -1, -1, -1, 01764 -1, 201, 4, 203, -1, -1, -1, -1, -1, -1, 01765 12, -1, -1, -1, -1, -1, -1, 184, -1, -1, 01766 187, 188, 189, -1, -1, 192, 193, -1, -1, 31, 01767 -1, 33, -1, -1, 201, -1, 203, 39, 40, -1, 01768 -1, 43, -1, -1, -1, -1, 48, -1, -1, -1, 01769 -1, -1, -1, -1, -1, 57, -1, 59, -1, -1, 01770 -1, -1, -1, 65, 66, -1, 68, -1, -1, -1, 01771 72, -1, -1, 75, -1, -1, -1, -1, -1, -1, 01772 82, -1, -1, -1, -1, -1, -1, 89, 90, -1, 01773 -1, 93, -1, 95, 96, 97, 98, -1, -1, -1, 01774 -1, 180, 104, 182, 183, 184, 185, 186, 187, 188, 01775 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, 01776 199, 200, -1, -1, -1, 204, -1, -1, -1, 4, 01777 -1, -1, -1, -1, 136, -1, -1, -1, -1, 141, 01778 142, 143, -1, -1, 146, -1, 148, -1, -1, -1, 01779 152, -1, -1, -1, -1, -1, 31, 159, 33, 161, 01780 -1, 163, -1, -1, 39, 40, -1, -1, 43, 171, 01781 172, -1, -1, 48, -1, -1, -1, -1, -1, -1, 01782 -1, -1, 57, -1, 59, -1, -1, -1, -1, -1, 01783 65, 66, -1, 68, -1, -1, -1, 72, 200, -1, 01784 75, -1, -1, -1, -1, -1, -1, 82, -1, -1, 01785 -1, -1, -1, -1, 89, -1, -1, -1, 93, -1, 01786 95, 96, 97, 98, -1, -1, -1, -1, -1, 104, 01787 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01788 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01789 -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, 01790 -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, 01791 -1, 146, -1, 148, -1, -1, -1, 152, -1, -1, 01792 -1, -1, -1, 31, 159, 33, 161, -1, 163, -1, 01793 38, 39, -1, -1, -1, 43, 171, 172, -1, -1, 01794 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01795 -1, 59, -1, -1, -1, -1, -1, 65, 66, -1, 01796 68, -1, 70, -1, 72, 200, -1, 75, -1, -1, 01797 -1, -1, -1, -1, 82, -1, -1, -1, -1, -1, 01798 -1, -1, -1, -1, -1, 93, -1, 95, 96, 97, 01799 -1, -1, -1, -1, -1, -1, 104, -1, -1, -1, 01800 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01801 -1, -1, -1, -1, -1, 123, -1, -1, -1, -1, 01802 -1, -1, 4, -1, -1, -1, -1, -1, 136, -1, 01803 -1, -1, -1, 141, 142, 143, -1, -1, 146, -1, 01804 148, 149, -1, -1, 152, -1, -1, -1, -1, 31, 01805 -1, 33, -1, 161, -1, 163, 38, 39, -1, -1, 01806 -1, 43, -1, 171, 172, -1, -1, -1, -1, -1, 01807 -1, -1, -1, -1, -1, -1, -1, 59, -1, -1, 01808 -1, 189, -1, 65, 66, -1, 68, -1, 70, -1, 01809 72, -1, 200, 75, 4, -1, -1, -1, -1, -1, 01810 82, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01811 -1, 93, 22, 95, 96, 97, -1, -1, -1, -1, 01812 -1, 31, 104, 33, -1, -1, -1, -1, -1, 39, 01813 -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, 01814 -1, 123, -1, -1, -1, -1, -1, -1, -1, 59, 01815 -1, -1, -1, -1, 136, 65, 66, -1, 68, 141, 01816 142, 143, 72, -1, 146, 75, 148, 149, -1, -1, 01817 152, -1, 82, -1, -1, -1, -1, -1, -1, 161, 01818 -1, 163, -1, 93, -1, 95, 96, 97, 4, 171, 01819 172, -1, -1, -1, 104, 13, 14, 15, 16, 17, 01820 18, 19, 20, 21, -1, -1, -1, 189, -1, -1, 01821 -1, -1, -1, -1, -1, 31, -1, 33, 200, -1, 01822 -1, -1, -1, 39, -1, -1, 136, 43, -1, -1, 01823 -1, 141, 142, 143, -1, -1, 146, -1, 148, -1, 01824 -1, -1, 152, 59, -1, -1, -1, -1, -1, 65, 01825 66, 161, 68, 163, -1, -1, 72, -1, -1, 75, 01826 -1, 171, 172, -1, -1, -1, 82, 13, 14, 15, 01827 16, 17, 18, 19, 20, 21, -1, 93, -1, 95, 01828 96, 97, -1, -1, -1, -1, -1, -1, 104, -1, 01829 200, -1, 13, 14, 15, 16, 17, 18, 19, 20, 01830 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01831 -1, -1, -1, 13, 14, 15, 16, 17, 18, 19, 01832 136, 21, -1, -1, -1, 141, 142, 143, -1, -1, 01833 146, -1, 148, -1, -1, -1, 152, 13, 14, 15, 01834 16, 17, 18, 19, -1, 161, -1, 163, -1, -1, 01835 -1, -1, -1, -1, -1, 171, 172, -1, -1, -1, 01836 -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 01837 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, 01838 -1, 199, 200, -1, 200, -1, 204, 13, 14, 15, 01839 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, 01840 -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, 01841 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, 01842 -1, -1, -1, -1, -1, 13, 14, 15, 16, 17, 01843 18, 19, -1, -1, 180, -1, 182, 183, 184, 185, 01844 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, 01845 -1, -1, -1, 199, 200, -1, -1, -1, 204, 180, 01846 -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 01847 191, -1, -1, -1, -1, -1, -1, -1, 199, 200, 01848 201, -1, 182, 183, 184, 185, 186, 187, 188, 189, 01849 190, 191, -1, -1, -1, -1, -1, -1, -1, 199, 01850 200, -1, -1, -1, -1, -1, 182, 183, 184, 185, 01851 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, 01852 -1, -1, -1, 199, 200, -1, -1, -1, -1, -1, 01853 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01854 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01855 -1, -1, -1, -1, 180, 181, 182, 183, 184, 185, 01856 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, 01857 -1, -1, -1, 199, 200, 180, -1, 182, 183, 184, 01858 185, 186, 187, 188, 189, 190, 191, 4, -1, -1, 01859 -1, -1, -1, -1, 199, 200, 184, 185, 186, 187, 01860 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, 01861 -1, 199, 200, -1, 31, -1, 33, -1, -1, -1, 01862 -1, -1, 39, 40, -1, -1, 43, -1, -1, -1, 01863 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01864 57, -1, 59, -1, -1, -1, -1, -1, 65, 66, 01865 -1, 68, -1, -1, -1, 72, -1, -1, 75, 4, 01866 -1, -1, -1, -1, -1, 82, -1, -1, -1, -1, 01867 -1, -1, -1, -1, -1, -1, 93, -1, 95, 96, 01868 97, 98, -1, -1, 101, -1, 31, 104, 33, -1, 01869 -1, 108, -1, -1, 39, -1, -1, -1, 43, -1, 01870 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01871 -1, -1, -1, -1, 59, -1, -1, -1, -1, 136, 01872 65, 66, -1, 68, 141, 142, 143, 72, -1, 146, 01873 75, 148, -1, -1, -1, 152, -1, 82, -1, -1, 01874 -1, -1, -1, -1, 161, -1, 163, -1, 93, -1, 01875 95, 96, 97, 4, 171, 172, -1, -1, -1, 104, 01876 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01877 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01878 31, -1, 33, -1, -1, -1, -1, -1, 39, -1, 01879 -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, 01880 -1, 146, -1, 148, -1, -1, -1, 152, 59, -1, 01881 -1, -1, -1, -1, 65, 66, 161, -1, 163, -1, 01882 -1, 72, -1, -1, 75, -1, 171, 172, -1, -1, 01883 -1, 82, -1, -1, -1, -1, -1, -1, -1, -1, 01884 -1, -1, -1, -1, 95, 96, 97, -1, -1, -1, 01885 -1, -1, -1, 104, -1, -1, -1, -1, -1, -1, 01886 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01887 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01888 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 01889 141, 142, 143, -1, -1, 146, -1, -1, -1, -1, 01890 -1, 152, -1, -1, -1, -1, -1, -1, -1, -1, 01891 161, -1, 163, -1, -1, -1, -1, -1, -1, -1, 01892 171, 172, 23, -1, 25, 26, 27, -1, 29, 30, 01893 -1, 32, -1, -1, 35, -1, 37, -1, -1, -1, 01894 41, 42, -1, 44, 45, 46, 47, -1, 49, 50, 01895 51, 52, 53, 54, 55, 56, -1, 58, -1, 60, 01896 61, 62, 63, 64, -1, -1, 67, -1, -1, -1, 01897 71, -1, 73, 74, -1, 76, 77, 78, 79, 80, 01898 81, -1, 83, 84, 85, 86, 87, 88, -1, -1, 01899 91, -1, -1, 94, -1, -1, -1, -1, 99, 100, 01900 -1, 102, 103, -1, 105, 106, -1, -1, 109, 110, 01901 111, 112, 113, 114, -1, 116, 117, 118, 119, 120, 01902 121, 122, -1, 124, 125, -1, 127, 128, 129, 130, 01903 131, 132, 133, 134, 135, -1, 137, 138, 139, 140, 01904 -1, -1, -1, 144, -1, -1, 147, -1, -1, 150, 01905 151, -1, -1, 154, 155, 156, 157, -1, -1, 160, 01906 -1, 162, -1, 164, 165, 166, 167, 168, 169, 170, 01907 -1, -1, 173 01908 }; 01909 01910 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 01911 symbol of state STATE-NUM. */ 01912 static const yytype_uint16 yystos[] = 01913 { 01914 0, 209, 210, 0, 4, 31, 33, 39, 40, 43, 01915 48, 57, 59, 65, 66, 68, 72, 75, 82, 89, 01916 93, 95, 96, 97, 98, 104, 136, 141, 142, 143, 01917 146, 148, 152, 159, 161, 163, 171, 172, 200, 214, 01918 215, 216, 217, 218, 221, 222, 229, 240, 254, 258, 01919 260, 261, 262, 263, 266, 267, 270, 272, 273, 274, 01920 275, 277, 278, 279, 280, 281, 283, 285, 303, 304, 01921 305, 306, 3, 4, 203, 3, 4, 3, 4, 256, 01922 95, 259, 8, 3, 4, 259, 203, 259, 260, 3, 01923 256, 228, 229, 3, 256, 260, 23, 25, 26, 27, 01924 29, 30, 32, 35, 37, 41, 42, 44, 45, 46, 01925 47, 49, 50, 51, 52, 53, 54, 55, 56, 58, 01926 60, 61, 62, 63, 64, 67, 71, 73, 74, 76, 01927 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 01928 88, 91, 94, 99, 100, 102, 103, 105, 106, 109, 01929 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, 01930 121, 122, 124, 125, 127, 128, 129, 130, 131, 132, 01931 133, 134, 135, 137, 138, 139, 140, 144, 147, 150, 01932 151, 154, 155, 156, 157, 160, 162, 164, 165, 166, 01933 167, 168, 169, 170, 173, 230, 232, 302, 202, 211, 01934 211, 65, 101, 108, 152, 161, 220, 240, 261, 266, 01935 272, 276, 283, 303, 306, 202, 202, 205, 202, 205, 01936 202, 213, 202, 181, 271, 205, 284, 285, 284, 284, 01937 3, 4, 38, 70, 123, 149, 189, 203, 234, 257, 01938 286, 287, 300, 240, 303, 304, 306, 284, 202, 8, 01939 205, 202, 304, 205, 283, 153, 205, 203, 203, 203, 01940 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 01941 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, 01942 203, 203, 203, 203, 203, 203, 203, 203, 203, 179, 01943 201, 12, 90, 214, 219, 222, 261, 263, 274, 275, 01944 278, 206, 3, 3, 3, 4, 3, 3, 205, 300, 01945 264, 126, 268, 272, 3, 4, 205, 212, 282, 286, 01946 286, 207, 200, 203, 227, 284, 204, 237, 238, 239, 01947 257, 204, 247, 286, 296, 203, 250, 8, 257, 3, 01948 5, 6, 7, 8, 9, 10, 69, 115, 145, 158, 01949 184, 187, 188, 189, 192, 193, 203, 243, 244, 245, 01950 243, 246, 8, 8, 231, 246, 245, 8, 8, 245, 01951 8, 245, 243, 226, 229, 283, 245, 241, 242, 243, 01952 8, 302, 8, 245, 304, 241, 243, 304, 174, 175, 01953 176, 177, 178, 301, 304, 304, 8, 11, 233, 5, 01954 307, 8, 304, 232, 200, 203, 202, 213, 206, 228, 01955 265, 181, 107, 228, 252, 269, 202, 205, 212, 206, 01956 214, 229, 281, 286, 204, 246, 189, 201, 243, 223, 01957 224, 225, 226, 206, 179, 207, 206, 228, 248, 179, 01958 252, 206, 229, 249, 252, 204, 204, 203, 243, 243, 01959 243, 243, 243, 243, 243, 283, 13, 14, 15, 16, 01960 17, 18, 19, 20, 21, 180, 182, 183, 184, 185, 01961 186, 187, 188, 189, 190, 191, 199, 200, 179, 204, 01962 204, 204, 179, 204, 204, 204, 204, 204, 204, 204, 01963 204, 204, 204, 283, 189, 203, 227, 234, 257, 292, 01964 294, 295, 204, 179, 204, 204, 204, 204, 179, 204, 01965 204, 204, 204, 204, 204, 204, 204, 199, 204, 204, 01966 204, 232, 8, 213, 275, 181, 283, 202, 206, 229, 01967 253, 254, 206, 218, 206, 213, 201, 201, 204, 179, 01968 239, 245, 283, 306, 286, 204, 202, 202, 283, 204, 01969 189, 203, 227, 234, 288, 290, 291, 243, 243, 3, 01970 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, 01971 243, 243, 243, 243, 243, 243, 243, 3, 243, 245, 01972 8, 294, 282, 189, 223, 234, 293, 294, 203, 227, 01973 242, 245, 5, 204, 286, 202, 212, 213, 22, 226, 01974 292, 298, 299, 202, 255, 257, 290, 282, 189, 223, 01975 234, 289, 290, 204, 203, 227, 181, 201, 294, 282, 01976 204, 294, 204, 223, 204, 213, 206, 181, 297, 179, 01977 202, 205, 204, 290, 282, 204, 294, 204, 243, 223, 01978 243, 294, 204, 213, 246, 298, 235, 294, 204, 37, 01979 50, 206, 236, 245, 181, 181, 202, 251, 252, 251, 01980 202 01981 }; 01982 01983 #define yyerrok (yyerrstatus = 0) 01984 #define yyclearin (yychar = YYEMPTY) 01985 #define YYEMPTY (-2) 01986 #define YYEOF 0 01987 01988 #define YYACCEPT goto yyacceptlab 01989 #define YYABORT goto yyabortlab 01990 #define YYERROR goto yyerrorlab 01991 01992 01993 /* Like YYERROR except do call yyerror. This remains here temporarily 01994 to ease the transition to the new meaning of YYERROR, for GCC. 01995 Once GCC version 2 has supplanted version 1, this can go. However, 01996 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 01997 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 01998 discussed. */ 01999 02000 #define YYFAIL goto yyerrlab 02001 #if defined YYFAIL 02002 /* This is here to suppress warnings from the GCC cpp's 02003 -Wunused-macros. Normally we don't worry about that warning, but 02004 some users do, and we want to make it easy for users to remove 02005 YYFAIL uses, which will produce warnings from Bison 2.5. */ 02006 #endif 02007 02008 #define YYRECOVERING() (!!yyerrstatus) 02009 02010 #define YYBACKUP(Token, Value) \ 02011 do \ 02012 if (yychar == YYEMPTY && yylen == 1) \ 02013 { \ 02014 yychar = (Token); \ 02015 yylval = (Value); \ 02016 yytoken = YYTRANSLATE (yychar); \ 02017 YYPOPSTACK (1); \ 02018 goto yybackup; \ 02019 } \ 02020 else \ 02021 { \ 02022 yyerror (YY_("syntax error: cannot back up")); \ 02023 YYERROR; \ 02024 } \ 02025 while (YYID (0)) 02026 02027 02028 #define YYTERROR 1 02029 #define YYERRCODE 256 02030 02031 02032 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 02033 If N is 0, then set CURRENT to the empty location which ends 02034 the previous symbol: RHS[0] (always defined). */ 02035 02036 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 02037 #ifndef YYLLOC_DEFAULT 02038 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 02039 do \ 02040 if (YYID (N)) \ 02041 { \ 02042 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 02043 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 02044 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 02045 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 02046 } \ 02047 else \ 02048 { \ 02049 (Current).first_line = (Current).last_line = \ 02050 YYRHSLOC (Rhs, 0).last_line; \ 02051 (Current).first_column = (Current).last_column = \ 02052 YYRHSLOC (Rhs, 0).last_column; \ 02053 } \ 02054 while (YYID (0)) 02055 #endif 02056 02057 02058 /* YY_LOCATION_PRINT -- Print the location on the stream. 02059 This macro was not mandated originally: define only if we know 02060 we won't break user code: when these are the locations we know. */ 02061 02062 #ifndef YY_LOCATION_PRINT 02063 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 02064 # define YY_LOCATION_PRINT(File, Loc) \ 02065 fprintf (File, "%d.%d-%d.%d", \ 02066 (Loc).first_line, (Loc).first_column, \ 02067 (Loc).last_line, (Loc).last_column) 02068 # else 02069 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 02070 # endif 02071 #endif 02072 02073 02074 /* YYLEX -- calling `yylex' with the right arguments. */ 02075 02076 #ifdef YYLEX_PARAM 02077 # define YYLEX yylex (YYLEX_PARAM) 02078 #else 02079 # define YYLEX yylex () 02080 #endif 02081 02082 /* Enable debugging if requested. */ 02083 #if YYDEBUG 02084 02085 # ifndef YYFPRINTF 02086 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 02087 # define YYFPRINTF fprintf 02088 # endif 02089 02090 # define YYDPRINTF(Args) \ 02091 do { \ 02092 if (yydebug) \ 02093 YYFPRINTF Args; \ 02094 } while (YYID (0)) 02095 02096 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 02097 do { \ 02098 if (yydebug) \ 02099 { \ 02100 YYFPRINTF (stderr, "%s ", Title); \ 02101 yy_symbol_print (stderr, \ 02102 Type, Value); \ 02103 YYFPRINTF (stderr, "\n"); \ 02104 } \ 02105 } while (YYID (0)) 02106 02107 02108 /*--------------------------------. 02109 | Print this symbol on YYOUTPUT. | 02110 `--------------------------------*/ 02111 02112 /*ARGSUSED*/ 02113 #if (defined __STDC__ || defined __C99__FUNC__ \ 02114 || defined __cplusplus || defined _MSC_VER) 02115 static void 02116 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 02117 #else 02118 static void 02119 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 02120 FILE *yyoutput; 02121 int yytype; 02122 YYSTYPE const * const yyvaluep; 02123 #endif 02124 { 02125 if (!yyvaluep) 02126 return; 02127 # ifdef YYPRINT 02128 if (yytype < YYNTOKENS) 02129 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 02130 # else 02131 YYUSE (yyoutput); 02132 # endif 02133 switch (yytype) 02134 { 02135 default: 02136 break; 02137 } 02138 } 02139 02140 02141 /*--------------------------------. 02142 | Print this symbol on YYOUTPUT. | 02143 `--------------------------------*/ 02144 02145 #if (defined __STDC__ || defined __C99__FUNC__ \ 02146 || defined __cplusplus || defined _MSC_VER) 02147 static void 02148 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 02149 #else 02150 static void 02151 yy_symbol_print (yyoutput, yytype, yyvaluep) 02152 FILE *yyoutput; 02153 int yytype; 02154 YYSTYPE const * const yyvaluep; 02155 #endif 02156 { 02157 if (yytype < YYNTOKENS) 02158 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 02159 else 02160 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 02161 02162 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 02163 YYFPRINTF (yyoutput, ")"); 02164 } 02165 02166 /*------------------------------------------------------------------. 02167 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 02168 | TOP (included). | 02169 `------------------------------------------------------------------*/ 02170 02171 #if (defined __STDC__ || defined __C99__FUNC__ \ 02172 || defined __cplusplus || defined _MSC_VER) 02173 static void 02174 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 02175 #else 02176 static void 02177 yy_stack_print (yybottom, yytop) 02178 yytype_int16 *yybottom; 02179 yytype_int16 *yytop; 02180 #endif 02181 { 02182 YYFPRINTF (stderr, "Stack now"); 02183 for (; yybottom <= yytop; yybottom++) 02184 { 02185 int yybot = *yybottom; 02186 YYFPRINTF (stderr, " %d", yybot); 02187 } 02188 YYFPRINTF (stderr, "\n"); 02189 } 02190 02191 # define YY_STACK_PRINT(Bottom, Top) \ 02192 do { \ 02193 if (yydebug) \ 02194 yy_stack_print ((Bottom), (Top)); \ 02195 } while (YYID (0)) 02196 02197 02198 /*------------------------------------------------. 02199 | Report that the YYRULE is going to be reduced. | 02200 `------------------------------------------------*/ 02201 02202 #if (defined __STDC__ || defined __C99__FUNC__ \ 02203 || defined __cplusplus || defined _MSC_VER) 02204 static void 02205 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 02206 #else 02207 static void 02208 yy_reduce_print (yyvsp, yyrule) 02209 YYSTYPE *yyvsp; 02210 int yyrule; 02211 #endif 02212 { 02213 int yynrhs = yyr2[yyrule]; 02214 int yyi; 02215 unsigned long int yylno = yyrline[yyrule]; 02216 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 02217 yyrule - 1, yylno); 02218 /* The symbols being reduced. */ 02219 for (yyi = 0; yyi < yynrhs; yyi++) 02220 { 02221 YYFPRINTF (stderr, " $%d = ", yyi + 1); 02222 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 02223 &(yyvsp[(yyi + 1) - (yynrhs)]) 02224 ); 02225 YYFPRINTF (stderr, "\n"); 02226 } 02227 } 02228 02229 # define YY_REDUCE_PRINT(Rule) \ 02230 do { \ 02231 if (yydebug) \ 02232 yy_reduce_print (yyvsp, Rule); \ 02233 } while (YYID (0)) 02234 02235 /* Nonzero means print parse trace. It is left uninitialized so that 02236 multiple parsers can coexist. */ 02237 int yydebug; 02238 #else /* !YYDEBUG */ 02239 # define YYDPRINTF(Args) 02240 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 02241 # define YY_STACK_PRINT(Bottom, Top) 02242 # define YY_REDUCE_PRINT(Rule) 02243 #endif /* !YYDEBUG */ 02244 02245 02246 /* YYINITDEPTH -- initial size of the parser's stacks. */ 02247 #ifndef YYINITDEPTH 02248 # define YYINITDEPTH 200 02249 #endif 02250 02251 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 02252 if the built-in stack extension method is used). 02253 02254 Do not make this value too large; the results are undefined if 02255 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 02256 evaluated with infinite-precision integer arithmetic. */ 02257 02258 #ifndef YYMAXDEPTH 02259 # define YYMAXDEPTH 10000 02260 #endif 02261 02262 02263 02264 #if YYERROR_VERBOSE 02265 02266 # ifndef yystrlen 02267 # if defined __GLIBC__ && defined _STRING_H 02268 # define yystrlen strlen 02269 # else 02270 /* Return the length of YYSTR. */ 02271 #if (defined __STDC__ || defined __C99__FUNC__ \ 02272 || defined __cplusplus || defined _MSC_VER) 02273 static YYSIZE_T 02274 yystrlen (const char *yystr) 02275 #else 02276 static YYSIZE_T 02277 yystrlen (yystr) 02278 const char *yystr; 02279 #endif 02280 { 02281 YYSIZE_T yylen; 02282 for (yylen = 0; yystr[yylen]; yylen++) 02283 continue; 02284 return yylen; 02285 } 02286 # endif 02287 # endif 02288 02289 # ifndef yystpcpy 02290 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 02291 # define yystpcpy stpcpy 02292 # else 02293 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 02294 YYDEST. */ 02295 #if (defined __STDC__ || defined __C99__FUNC__ \ 02296 || defined __cplusplus || defined _MSC_VER) 02297 static char * 02298 yystpcpy (char *yydest, const char *yysrc) 02299 #else 02300 static char * 02301 yystpcpy (yydest, yysrc) 02302 char *yydest; 02303 const char *yysrc; 02304 #endif 02305 { 02306 char *yyd = yydest; 02307 const char *yys = yysrc; 02308 02309 while ((*yyd++ = *yys++) != '\0') 02310 continue; 02311 02312 return yyd - 1; 02313 } 02314 # endif 02315 # endif 02316 02317 # ifndef yytnamerr 02318 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 02319 quotes and backslashes, so that it's suitable for yyerror. The 02320 heuristic is that double-quoting is unnecessary unless the string 02321 contains an apostrophe, a comma, or backslash (other than 02322 backslash-backslash). YYSTR is taken from yytname. If YYRES is 02323 null, do not copy; instead, return the length of what the result 02324 would have been. */ 02325 static YYSIZE_T 02326 yytnamerr (char *yyres, const char *yystr) 02327 { 02328 if (*yystr == '"') 02329 { 02330 YYSIZE_T yyn = 0; 02331 char const *yyp = yystr; 02332 02333 for (;;) 02334 switch (*++yyp) 02335 { 02336 case '\'': 02337 case ',': 02338 goto do_not_strip_quotes; 02339 02340 case '\\': 02341 if (*++yyp != '\\') 02342 goto do_not_strip_quotes; 02343 /* Fall through. */ 02344 default: 02345 if (yyres) 02346 yyres[yyn] = *yyp; 02347 yyn++; 02348 break; 02349 02350 case '"': 02351 if (yyres) 02352 yyres[yyn] = '\0'; 02353 return yyn; 02354 } 02355 do_not_strip_quotes: ; 02356 } 02357 02358 if (! yyres) 02359 return yystrlen (yystr); 02360 02361 return yystpcpy (yyres, yystr) - yyres; 02362 } 02363 # endif 02364 02365 /* Copy into YYRESULT an error message about the unexpected token 02366 YYCHAR while in state YYSTATE. Return the number of bytes copied, 02367 including the terminating null byte. If YYRESULT is null, do not 02368 copy anything; just return the number of bytes that would be 02369 copied. As a special case, return 0 if an ordinary "syntax error" 02370 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 02371 size calculation. */ 02372 static YYSIZE_T 02373 yysyntax_error (char *yyresult, int yystate, int yychar) 02374 { 02375 int yyn = yypact[yystate]; 02376 02377 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 02378 return 0; 02379 else 02380 { 02381 int yytype = YYTRANSLATE (yychar); 02382 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 02383 YYSIZE_T yysize = yysize0; 02384 YYSIZE_T yysize1; 02385 int yysize_overflow = 0; 02386 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 02387 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 02388 int yyx; 02389 02390 # if 0 02391 /* This is so xgettext sees the translatable formats that are 02392 constructed on the fly. */ 02393 YY_("syntax error, unexpected %s"); 02394 YY_("syntax error, unexpected %s, expecting %s"); 02395 YY_("syntax error, unexpected %s, expecting %s or %s"); 02396 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 02397 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 02398 # endif 02399 char *yyfmt; 02400 char const *yyf; 02401 static char const yyunexpected[] = "syntax error, unexpected %s"; 02402 static char const yyexpecting[] = ", expecting %s"; 02403 static char const yyor[] = " or %s"; 02404 char yyformat[sizeof yyunexpected 02405 + sizeof yyexpecting - 1 02406 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 02407 * (sizeof yyor - 1))]; 02408 char const *yyprefix = yyexpecting; 02409 02410 /* Start YYX at -YYN if negative to avoid negative indexes in 02411 YYCHECK. */ 02412 int yyxbegin = yyn < 0 ? -yyn : 0; 02413 02414 /* Stay within bounds of both yycheck and yytname. */ 02415 int yychecklim = YYLAST - yyn + 1; 02416 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 02417 int yycount = 1; 02418 02419 yyarg[0] = yytname[yytype]; 02420 yyfmt = yystpcpy (yyformat, yyunexpected); 02421 02422 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 02423 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 02424 { 02425 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 02426 { 02427 yycount = 1; 02428 yysize = yysize0; 02429 yyformat[sizeof yyunexpected - 1] = '\0'; 02430 break; 02431 } 02432 yyarg[yycount++] = yytname[yyx]; 02433 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 02434 yysize_overflow |= (yysize1 < yysize); 02435 yysize = yysize1; 02436 yyfmt = yystpcpy (yyfmt, yyprefix); 02437 yyprefix = yyor; 02438 } 02439 02440 yyf = YY_(yyformat); 02441 yysize1 = yysize + yystrlen (yyf); 02442 yysize_overflow |= (yysize1 < yysize); 02443 yysize = yysize1; 02444 02445 if (yysize_overflow) 02446 return YYSIZE_MAXIMUM; 02447 02448 if (yyresult) 02449 { 02450 /* Avoid sprintf, as that infringes on the user's name space. 02451 Don't have undefined behavior even if the translation 02452 produced a string with the wrong number of "%s"s. */ 02453 char *yyp = yyresult; 02454 int yyi = 0; 02455 while ((*yyp = *yyf) != '\0') 02456 { 02457 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 02458 { 02459 yyp += yytnamerr (yyp, yyarg[yyi++]); 02460 yyf += 2; 02461 } 02462 else 02463 { 02464 yyp++; 02465 yyf++; 02466 } 02467 } 02468 } 02469 return yysize; 02470 } 02471 } 02472 #endif /* YYERROR_VERBOSE */ 02473 02474 02475 /*-----------------------------------------------. 02476 | Release the memory associated to this symbol. | 02477 `-----------------------------------------------*/ 02478 02479 /*ARGSUSED*/ 02480 #if (defined __STDC__ || defined __C99__FUNC__ \ 02481 || defined __cplusplus || defined _MSC_VER) 02482 static void 02483 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 02484 #else 02485 static void 02486 yydestruct (yymsg, yytype, yyvaluep) 02487 const char *yymsg; 02488 int yytype; 02489 YYSTYPE *yyvaluep; 02490 #endif 02491 { 02492 YYUSE (yyvaluep); 02493 02494 if (!yymsg) 02495 yymsg = "Deleting"; 02496 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 02497 02498 switch (yytype) 02499 { 02500 02501 default: 02502 break; 02503 } 02504 } 02505 02506 /* Prevent warnings from -Wmissing-prototypes. */ 02507 #ifdef YYPARSE_PARAM 02508 #if defined __STDC__ || defined __cplusplus 02509 int yyparse (void *YYPARSE_PARAM); 02510 #else 02511 int yyparse (); 02512 #endif 02513 #else /* ! YYPARSE_PARAM */ 02514 #if defined __STDC__ || defined __cplusplus 02515 int yyparse (void); 02516 #else 02517 int yyparse (); 02518 #endif 02519 #endif /* ! YYPARSE_PARAM */ 02520 02521 02522 /* The lookahead symbol. */ 02523 int yychar; 02524 02525 /* The semantic value of the lookahead symbol. */ 02526 YYSTYPE yylval; 02527 02528 /* Number of syntax errors so far. */ 02529 int yynerrs; 02530 02531 02532 02533 /*-------------------------. 02534 | yyparse or yypush_parse. | 02535 `-------------------------*/ 02536 02537 #ifdef YYPARSE_PARAM 02538 #if (defined __STDC__ || defined __C99__FUNC__ \ 02539 || defined __cplusplus || defined _MSC_VER) 02540 int 02541 yyparse (void *YYPARSE_PARAM) 02542 #else 02543 int 02544 yyparse (YYPARSE_PARAM) 02545 void *YYPARSE_PARAM; 02546 #endif 02547 #else /* ! YYPARSE_PARAM */ 02548 #if (defined __STDC__ || defined __C99__FUNC__ \ 02549 || defined __cplusplus || defined _MSC_VER) 02550 int 02551 yyparse (void) 02552 #else 02553 int 02554 yyparse () 02555 02556 #endif 02557 #endif 02558 { 02559 02560 02561 int yystate; 02562 /* Number of tokens to shift before error messages enabled. */ 02563 int yyerrstatus; 02564 02565 /* The stacks and their tools: 02566 `yyss': related to states. 02567 `yyvs': related to semantic values. 02568 02569 Refer to the stacks thru separate pointers, to allow yyoverflow 02570 to reallocate them elsewhere. */ 02571 02572 /* The state stack. */ 02573 yytype_int16 yyssa[YYINITDEPTH]; 02574 yytype_int16 *yyss; 02575 yytype_int16 *yyssp; 02576 02577 /* The semantic value stack. */ 02578 YYSTYPE yyvsa[YYINITDEPTH]; 02579 YYSTYPE *yyvs; 02580 YYSTYPE *yyvsp; 02581 02582 YYSIZE_T yystacksize; 02583 02584 int yyn; 02585 int yyresult; 02586 /* Lookahead token as an internal (translated) token number. */ 02587 int yytoken; 02588 /* The variables used to return semantic value and location from the 02589 action routines. */ 02590 YYSTYPE yyval; 02591 02592 #if YYERROR_VERBOSE 02593 /* Buffer for error messages, and its allocated size. */ 02594 char yymsgbuf[128]; 02595 char *yymsg = yymsgbuf; 02596 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 02597 #endif 02598 02599 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 02600 02601 /* The number of symbols on the RHS of the reduced rule. 02602 Keep to zero when no symbol should be popped. */ 02603 int yylen = 0; 02604 02605 yytoken = 0; 02606 yyss = yyssa; 02607 yyvs = yyvsa; 02608 yystacksize = YYINITDEPTH; 02609 02610 YYDPRINTF ((stderr, "Starting parse\n")); 02611 02612 yystate = 0; 02613 yyerrstatus = 0; 02614 yynerrs = 0; 02615 yychar = YYEMPTY; /* Cause a token to be read. */ 02616 02617 /* Initialize stack pointers. 02618 Waste one element of value and location stack 02619 so that they stay on the same level as the state stack. 02620 The wasted elements are never initialized. */ 02621 yyssp = yyss; 02622 yyvsp = yyvs; 02623 02624 goto yysetstate; 02625 02626 /*------------------------------------------------------------. 02627 | yynewstate -- Push a new state, which is found in yystate. | 02628 `------------------------------------------------------------*/ 02629 yynewstate: 02630 /* In all cases, when you get here, the value and location stacks 02631 have just been pushed. So pushing a state here evens the stacks. */ 02632 yyssp++; 02633 02634 yysetstate: 02635 *yyssp = yystate; 02636 02637 if (yyss + yystacksize - 1 <= yyssp) 02638 { 02639 /* Get the current used size of the three stacks, in elements. */ 02640 YYSIZE_T yysize = yyssp - yyss + 1; 02641 02642 #ifdef yyoverflow 02643 { 02644 /* Give user a chance to reallocate the stack. Use copies of 02645 these so that the &'s don't force the real ones into 02646 memory. */ 02647 YYSTYPE *yyvs1 = yyvs; 02648 yytype_int16 *yyss1 = yyss; 02649 02650 /* Each stack pointer address is followed by the size of the 02651 data in use in that stack, in bytes. This used to be a 02652 conditional around just the two extra args, but that might 02653 be undefined if yyoverflow is a macro. */ 02654 yyoverflow (YY_("memory exhausted"), 02655 &yyss1, yysize * sizeof (*yyssp), 02656 &yyvs1, yysize * sizeof (*yyvsp), 02657 &yystacksize); 02658 02659 yyss = yyss1; 02660 yyvs = yyvs1; 02661 } 02662 #else /* no yyoverflow */ 02663 # ifndef YYSTACK_RELOCATE 02664 goto yyexhaustedlab; 02665 # else 02666 /* Extend the stack our own way. */ 02667 if (YYMAXDEPTH <= yystacksize) 02668 goto yyexhaustedlab; 02669 yystacksize *= 2; 02670 if (YYMAXDEPTH < yystacksize) 02671 yystacksize = YYMAXDEPTH; 02672 02673 { 02674 yytype_int16 *yyss1 = yyss; 02675 union yyalloc *yyptr = 02676 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 02677 if (! yyptr) 02678 goto yyexhaustedlab; 02679 YYSTACK_RELOCATE (yyss_alloc, yyss); 02680 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 02681 # undef YYSTACK_RELOCATE 02682 if (yyss1 != yyssa) 02683 YYSTACK_FREE (yyss1); 02684 } 02685 # endif 02686 #endif /* no yyoverflow */ 02687 02688 yyssp = yyss + yysize - 1; 02689 yyvsp = yyvs + yysize - 1; 02690 02691 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 02692 (unsigned long int) yystacksize)); 02693 02694 if (yyss + yystacksize - 1 <= yyssp) 02695 YYABORT; 02696 } 02697 02698 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 02699 02700 if (yystate == YYFINAL) 02701 YYACCEPT; 02702 02703 goto yybackup; 02704 02705 /*-----------. 02706 | yybackup. | 02707 `-----------*/ 02708 yybackup: 02709 02710 /* Do appropriate processing given the current state. Read a 02711 lookahead token if we need one and don't already have one. */ 02712 02713 /* First try to decide what to do without reference to lookahead token. */ 02714 yyn = yypact[yystate]; 02715 if (yyn == YYPACT_NINF) 02716 goto yydefault; 02717 02718 /* Not known => get a lookahead token if don't already have one. */ 02719 02720 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 02721 if (yychar == YYEMPTY) 02722 { 02723 YYDPRINTF ((stderr, "Reading a token: ")); 02724 yychar = YYLEX; 02725 } 02726 02727 if (yychar <= YYEOF) 02728 { 02729 yychar = yytoken = YYEOF; 02730 YYDPRINTF ((stderr, "Now at end of input.\n")); 02731 } 02732 else 02733 { 02734 yytoken = YYTRANSLATE (yychar); 02735 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 02736 } 02737 02738 /* If the proper action on seeing token YYTOKEN is to reduce or to 02739 detect an error, take that action. */ 02740 yyn += yytoken; 02741 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 02742 goto yydefault; 02743 yyn = yytable[yyn]; 02744 if (yyn <= 0) 02745 { 02746 if (yyn == 0 || yyn == YYTABLE_NINF) 02747 goto yyerrlab; 02748 yyn = -yyn; 02749 goto yyreduce; 02750 } 02751 02752 /* Count tokens shifted since error; after three, turn off error 02753 status. */ 02754 if (yyerrstatus) 02755 yyerrstatus--; 02756 02757 /* Shift the lookahead token. */ 02758 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 02759 02760 /* Discard the shifted token. */ 02761 yychar = YYEMPTY; 02762 02763 yystate = yyn; 02764 *++yyvsp = yylval; 02765 02766 goto yynewstate; 02767 02768 02769 /*-----------------------------------------------------------. 02770 | yydefault -- do the default action for the current state. | 02771 `-----------------------------------------------------------*/ 02772 yydefault: 02773 yyn = yydefact[yystate]; 02774 if (yyn == 0) 02775 goto yyerrlab; 02776 goto yyreduce; 02777 02778 02779 /*-----------------------------. 02780 | yyreduce -- Do a reduction. | 02781 `-----------------------------*/ 02782 yyreduce: 02783 /* yyn is the number of a rule to reduce with. */ 02784 yylen = yyr2[yyn]; 02785 02786 /* If YYLEN is nonzero, implement the default value of the action: 02787 `$$ = $1'. 02788 02789 Otherwise, the following line sets YYVAL to garbage. 02790 This behavior is undocumented and Bison 02791 users should not rely upon it. Assigning to YYVAL 02792 unconditionally makes the parser a bit smaller, and it avoids a 02793 GCC warning that YYVAL may be used uninitialized. */ 02794 yyval = yyvsp[1-yylen]; 02795 02796 02797 YY_REDUCE_PRINT (yyn); 02798 switch (yyn) 02799 { 02800 case 2: 02801 02802 /* Line 1464 of yacc.c */ 02803 #line 328 "parser.y" 02804 { fix_incomplete(); 02805 check_statements((yyvsp[(1) - (1)].stmt_list), FALSE); 02806 check_all_user_types((yyvsp[(1) - (1)].stmt_list)); 02807 write_header((yyvsp[(1) - (1)].stmt_list)); 02808 write_id_data((yyvsp[(1) - (1)].stmt_list)); 02809 write_proxies((yyvsp[(1) - (1)].stmt_list)); 02810 write_client((yyvsp[(1) - (1)].stmt_list)); 02811 write_server((yyvsp[(1) - (1)].stmt_list)); 02812 write_regscript((yyvsp[(1) - (1)].stmt_list)); 02813 write_dlldata((yyvsp[(1) - (1)].stmt_list)); 02814 write_local_stubs((yyvsp[(1) - (1)].stmt_list)); 02815 ;} 02816 break; 02817 02818 case 3: 02819 02820 /* Line 1464 of yacc.c */ 02821 #line 342 "parser.y" 02822 { (yyval.stmt_list) = NULL; ;} 02823 break; 02824 02825 case 4: 02826 02827 /* Line 1464 of yacc.c */ 02828 #line 343 "parser.y" 02829 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); ;} 02830 break; 02831 02832 case 5: 02833 02834 /* Line 1464 of yacc.c */ 02835 #line 344 "parser.y" 02836 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); ;} 02837 break; 02838 02839 case 6: 02840 02841 /* Line 1464 of yacc.c */ 02842 #line 345 "parser.y" 02843 { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); 02844 reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); 02845 ;} 02846 break; 02847 02848 case 7: 02849 02850 /* Line 1464 of yacc.c */ 02851 #line 348 "parser.y" 02852 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); 02853 reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0); 02854 ;} 02855 break; 02856 02857 case 8: 02858 02859 /* Line 1464 of yacc.c */ 02860 #line 351 "parser.y" 02861 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); ;} 02862 break; 02863 02864 case 9: 02865 02866 /* Line 1464 of yacc.c */ 02867 #line 352 "parser.y" 02868 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); ;} 02869 break; 02870 02871 case 10: 02872 02873 /* Line 1464 of yacc.c */ 02874 #line 353 "parser.y" 02875 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); ;} 02876 break; 02877 02878 case 11: 02879 02880 /* Line 1464 of yacc.c */ 02881 #line 356 "parser.y" 02882 { (yyval.stmt_list) = NULL; ;} 02883 break; 02884 02885 case 12: 02886 02887 /* Line 1464 of yacc.c */ 02888 #line 357 "parser.y" 02889 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); ;} 02890 break; 02891 02892 case 13: 02893 02894 /* Line 1464 of yacc.c */ 02895 #line 358 "parser.y" 02896 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); ;} 02897 break; 02898 02899 case 14: 02900 02901 /* Line 1464 of yacc.c */ 02902 #line 359 "parser.y" 02903 { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); ;} 02904 break; 02905 02906 case 15: 02907 02908 /* Line 1464 of yacc.c */ 02909 #line 360 "parser.y" 02910 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); 02911 reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0); 02912 ;} 02913 break; 02914 02915 case 16: 02916 02917 /* Line 1464 of yacc.c */ 02918 #line 363 "parser.y" 02919 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); ;} 02920 break; 02921 02922 case 17: 02923 02924 /* Line 1464 of yacc.c */ 02925 #line 364 "parser.y" 02926 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); ;} 02927 break; 02928 02929 case 18: 02930 02931 /* Line 1464 of yacc.c */ 02932 #line 365 "parser.y" 02933 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_importlib((yyvsp[(2) - (2)].str))); ;} 02934 break; 02935 02936 case 19: 02937 02938 /* Line 1464 of yacc.c */ 02939 #line 366 "parser.y" 02940 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); ;} 02941 break; 02942 02943 case 20: 02944 02945 /* Line 1464 of yacc.c */ 02946 #line 369 "parser.y" 02947 { (yyval.stmt_list) = NULL; ;} 02948 break; 02949 02950 case 21: 02951 02952 /* Line 1464 of yacc.c */ 02953 #line 370 "parser.y" 02954 { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); ;} 02955 break; 02956 02957 case 24: 02958 02959 /* Line 1464 of yacc.c */ 02960 #line 378 "parser.y" 02961 { (yyval.statement) = make_statement_cppquote((yyvsp[(1) - (1)].str)); ;} 02962 break; 02963 02964 case 25: 02965 02966 /* Line 1464 of yacc.c */ 02967 #line 379 "parser.y" 02968 { (yyval.statement) = make_statement_type_decl((yyvsp[(1) - (2)].type)); ;} 02969 break; 02970 02971 case 26: 02972 02973 /* Line 1464 of yacc.c */ 02974 #line 380 "parser.y" 02975 { (yyval.statement) = make_statement_declaration((yyvsp[(1) - (2)].var)); ;} 02976 break; 02977 02978 case 27: 02979 02980 /* Line 1464 of yacc.c */ 02981 #line 381 "parser.y" 02982 { (yyval.statement) = make_statement_import((yyvsp[(1) - (1)].str)); ;} 02983 break; 02984 02985 case 28: 02986 02987 /* Line 1464 of yacc.c */ 02988 #line 382 "parser.y" 02989 { (yyval.statement) = (yyvsp[(1) - (2)].statement); ;} 02990 break; 02991 02992 case 30: 02993 02994 /* Line 1464 of yacc.c */ 02995 #line 387 "parser.y" 02996 { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); ;} 02997 break; 02998 02999 case 32: 03000 03001 /* Line 1464 of yacc.c */ 03002 #line 389 "parser.y" 03003 { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); ;} 03004 break; 03005 03006 case 34: 03007 03008 /* Line 1464 of yacc.c */ 03009 #line 391 "parser.y" 03010 { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); ;} 03011 break; 03012 03013 case 35: 03014 03015 /* Line 1464 of yacc.c */ 03016 #line 392 "parser.y" 03017 { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_enum_attrs((yyvsp[(1) - (2)].attr_list)); ;} 03018 break; 03019 03020 case 36: 03021 03022 /* Line 1464 of yacc.c */ 03023 #line 393 "parser.y" 03024 { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_struct_attrs((yyvsp[(1) - (2)].attr_list)); ;} 03025 break; 03026 03027 case 37: 03028 03029 /* Line 1464 of yacc.c */ 03030 #line 394 "parser.y" 03031 { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_union_attrs((yyvsp[(1) - (2)].attr_list)); ;} 03032 break; 03033 03034 case 38: 03035 03036 /* Line 1464 of yacc.c */ 03037 #line 397 "parser.y" 03038 { (yyval.str) = (yyvsp[(3) - (4)].str); ;} 03039 break; 03040 03041 case 39: 03042 03043 /* Line 1464 of yacc.c */ 03044 #line 399 "parser.y" 03045 { assert(yychar == YYEMPTY); 03046 (yyval.import) = xmalloc(sizeof(struct _import_t)); 03047 (yyval.import)->name = (yyvsp[(2) - (3)].str); 03048 (yyval.import)->import_performed = do_import((yyvsp[(2) - (3)].str)); 03049 if (!(yyval.import)->import_performed) yychar = aEOF; 03050 ;} 03051 break; 03052 03053 case 40: 03054 03055 /* Line 1464 of yacc.c */ 03056 #line 407 "parser.y" 03057 { (yyval.str) = (yyvsp[(1) - (3)].import)->name; 03058 if ((yyvsp[(1) - (3)].import)->import_performed) pop_import(); 03059 free((yyvsp[(1) - (3)].import)); 03060 ;} 03061 break; 03062 03063 case 41: 03064 03065 /* Line 1464 of yacc.c */ 03066 #line 414 "parser.y" 03067 { (yyval.str) = (yyvsp[(3) - (5)].str); if(!parse_only) add_importlib((yyvsp[(3) - (5)].str)); ;} 03068 break; 03069 03070 case 42: 03071 03072 /* Line 1464 of yacc.c */ 03073 #line 417 "parser.y" 03074 { (yyval.str) = (yyvsp[(2) - (2)].str); ;} 03075 break; 03076 03077 case 43: 03078 03079 /* Line 1464 of yacc.c */ 03080 #line 419 "parser.y" 03081 { (yyval.typelib) = make_library((yyvsp[(2) - (3)].str), check_library_attrs((yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].attr_list))); 03082 if (!parse_only) start_typelib((yyval.typelib)); 03083 ;} 03084 break; 03085 03086 case 44: 03087 03088 /* Line 1464 of yacc.c */ 03089 #line 424 "parser.y" 03090 { (yyval.typelib) = (yyvsp[(1) - (4)].typelib); 03091 (yyval.typelib)->stmts = (yyvsp[(2) - (4)].stmt_list); 03092 if (!parse_only) end_typelib(); 03093 ;} 03094 break; 03095 03096 case 45: 03097 03098 /* Line 1464 of yacc.c */ 03099 #line 430 "parser.y" 03100 { (yyval.var_list) = NULL; ;} 03101 break; 03102 03103 case 47: 03104 03105 /* Line 1464 of yacc.c */ 03106 #line 434 "parser.y" 03107 { check_arg_attrs((yyvsp[(1) - (1)].var)); (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); ;} 03108 break; 03109 03110 case 48: 03111 03112 /* Line 1464 of yacc.c */ 03113 #line 435 "parser.y" 03114 { check_arg_attrs((yyvsp[(3) - (3)].var)); (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) ); ;} 03115 break; 03116 03117 case 50: 03118 03119 /* Line 1464 of yacc.c */ 03120 #line 439 "parser.y" 03121 { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), make_var(strdup("...")) ); ;} 03122 break; 03123 03124 case 51: 03125 03126 /* Line 1464 of yacc.c */ 03127 #line 443 "parser.y" 03128 { if ((yyvsp[(2) - (3)].declspec)->stgclass != STG_NONE && (yyvsp[(2) - (3)].declspec)->stgclass != STG_REGISTER) 03129 error_loc("invalid storage class for function parameter\n"); 03130 (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), TRUE); 03131 free((yyvsp[(2) - (3)].declspec)); free((yyvsp[(3) - (3)].declarator)); 03132 ;} 03133 break; 03134 03135 case 52: 03136 03137 /* Line 1464 of yacc.c */ 03138 #line 448 "parser.y" 03139 { if ((yyvsp[(1) - (2)].declspec)->stgclass != STG_NONE && (yyvsp[(1) - (2)].declspec)->stgclass != STG_REGISTER) 03140 error_loc("invalid storage class for function parameter\n"); 03141 (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), TRUE); 03142 free((yyvsp[(1) - (2)].declspec)); free((yyvsp[(2) - (2)].declarator)); 03143 ;} 03144 break; 03145 03146 case 53: 03147 03148 /* Line 1464 of yacc.c */ 03149 #line 455 "parser.y" 03150 { (yyval.expr) = (yyvsp[(2) - (3)].expr); 03151 if (!(yyval.expr)->is_const) 03152 error_loc("array dimension is not an integer constant\n"); 03153 ;} 03154 break; 03155 03156 case 54: 03157 03158 /* Line 1464 of yacc.c */ 03159 #line 459 "parser.y" 03160 { (yyval.expr) = make_expr(EXPR_VOID); ;} 03161 break; 03162 03163 case 55: 03164 03165 /* Line 1464 of yacc.c */ 03166 #line 460 "parser.y" 03167 { (yyval.expr) = make_expr(EXPR_VOID); ;} 03168 break; 03169 03170 case 56: 03171 03172 /* Line 1464 of yacc.c */ 03173 #line 463 "parser.y" 03174 { (yyval.attr_list) = NULL; ;} 03175 break; 03176 03177 case 58: 03178 03179 /* Line 1464 of yacc.c */ 03180 #line 468 "parser.y" 03181 { (yyval.attr_list) = (yyvsp[(2) - (3)].attr_list); ;} 03182 break; 03183 03184 case 59: 03185 03186 /* Line 1464 of yacc.c */ 03187 #line 471 "parser.y" 03188 { (yyval.attr_list) = append_attr( NULL, (yyvsp[(1) - (1)].attr) ); ;} 03189 break; 03190 03191 case 60: 03192 03193 /* Line 1464 of yacc.c */ 03194 #line 472 "parser.y" 03195 { (yyval.attr_list) = append_attr( (yyvsp[(1) - (3)].attr_list), (yyvsp[(3) - (3)].attr) ); ;} 03196 break; 03197 03198 case 61: 03199 03200 /* Line 1464 of yacc.c */ 03201 #line 473 "parser.y" 03202 { (yyval.attr_list) = append_attr( (yyvsp[(1) - (4)].attr_list), (yyvsp[(4) - (4)].attr) ); ;} 03203 break; 03204 03205 case 62: 03206 03207 /* Line 1464 of yacc.c */ 03208 #line 476 "parser.y" 03209 { (yyval.str_list) = append_str( NULL, (yyvsp[(1) - (1)].str) ); ;} 03210 break; 03211 03212 case 63: 03213 03214 /* Line 1464 of yacc.c */ 03215 #line 477 "parser.y" 03216 { (yyval.str_list) = append_str( (yyvsp[(1) - (3)].str_list), (yyvsp[(3) - (3)].str) ); ;} 03217 break; 03218 03219 case 64: 03220 03221 /* Line 1464 of yacc.c */ 03222 #line 480 "parser.y" 03223 { (yyval.attr) = NULL; ;} 03224 break; 03225 03226 case 65: 03227 03228 /* Line 1464 of yacc.c */ 03229 #line 481 "parser.y" 03230 { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); ;} 03231 break; 03232 03233 case 66: 03234 03235 /* Line 1464 of yacc.c */ 03236 #line 482 "parser.y" 03237 { (yyval.attr) = make_attrp(ATTR_ANNOTATION, (yyvsp[(3) - (4)].str)); ;} 03238 break; 03239 03240 case 67: 03241 03242 /* Line 1464 of yacc.c */ 03243 #line 483 "parser.y" 03244 { (yyval.attr) = make_attr(ATTR_APPOBJECT); ;} 03245 break; 03246 03247 case 68: 03248 03249 /* Line 1464 of yacc.c */ 03250 #line 484 "parser.y" 03251 { (yyval.attr) = make_attr(ATTR_ASYNC); ;} 03252 break; 03253 03254 case 69: 03255 03256 /* Line 1464 of yacc.c */ 03257 #line 485 "parser.y" 03258 { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); ;} 03259 break; 03260 03261 case 70: 03262 03263 /* Line 1464 of yacc.c */ 03264 #line 486 "parser.y" 03265 { (yyval.attr) = make_attr(ATTR_BINDABLE); ;} 03266 break; 03267 03268 case 71: 03269 03270 /* Line 1464 of yacc.c */ 03271 #line 487 "parser.y" 03272 { (yyval.attr) = make_attr(ATTR_BROADCAST); ;} 03273 break; 03274 03275 case 72: 03276 03277 /* Line 1464 of yacc.c */ 03278 #line 488 "parser.y" 03279 { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[(3) - (4)].var)); ;} 03280 break; 03281 03282 case 73: 03283 03284 /* Line 1464 of yacc.c */ 03285 #line 489 "parser.y" 03286 { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[(3) - (4)].expr_list)); ;} 03287 break; 03288 03289 case 74: 03290 03291 /* Line 1464 of yacc.c */ 03292 #line 490 "parser.y" 03293 { (yyval.attr) = make_attr(ATTR_CODE); ;} 03294 break; 03295 03296 case 75: 03297 03298 /* Line 1464 of yacc.c */ 03299 #line 491 "parser.y" 03300 { (yyval.attr) = make_attr(ATTR_COMMSTATUS); ;} 03301 break; 03302 03303 case 76: 03304 03305 /* Line 1464 of yacc.c */ 03306 #line 492 "parser.y" 03307 { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); ;} 03308 break; 03309 03310 case 77: 03311 03312 /* Line 1464 of yacc.c */ 03313 #line 493 "parser.y" 03314 { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ ;} 03315 break; 03316 03317 case 78: 03318 03319 /* Line 1464 of yacc.c */ 03320 #line 494 "parser.y" 03321 { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ ;} 03322 break; 03323 03324 case 79: 03325 03326 /* Line 1464 of yacc.c */ 03327 #line 495 "parser.y" 03328 { (yyval.attr) = make_attr(ATTR_CONTROL); ;} 03329 break; 03330 03331 case 80: 03332 03333 /* Line 1464 of yacc.c */ 03334 #line 496 "parser.y" 03335 { (yyval.attr) = make_attr(ATTR_DECODE); ;} 03336 break; 03337 03338 case 81: 03339 03340 /* Line 1464 of yacc.c */ 03341 #line 497 "parser.y" 03342 { (yyval.attr) = make_attr(ATTR_DEFAULT); ;} 03343 break; 03344 03345 case 82: 03346 03347 /* Line 1464 of yacc.c */ 03348 #line 498 "parser.y" 03349 { (yyval.attr) = make_attr(ATTR_DEFAULTBIND); ;} 03350 break; 03351 03352 case 83: 03353 03354 /* Line 1464 of yacc.c */ 03355 #line 499 "parser.y" 03356 { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); ;} 03357 break; 03358 03359 case 84: 03360 03361 /* Line 1464 of yacc.c */ 03362 #line 500 "parser.y" 03363 { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[(3) - (4)].expr)); ;} 03364 break; 03365 03366 case 85: 03367 03368 /* Line 1464 of yacc.c */ 03369 #line 501 "parser.y" 03370 { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); ;} 03371 break; 03372 03373 case 86: 03374 03375 /* Line 1464 of yacc.c */ 03376 #line 502 "parser.y" 03377 { (yyval.attr) = make_attr(ATTR_DISABLECONSISTENCYCHECK); ;} 03378 break; 03379 03380 case 87: 03381 03382 /* Line 1464 of yacc.c */ 03383 #line 503 "parser.y" 03384 { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); ;} 03385 break; 03386 03387 case 88: 03388 03389 /* Line 1464 of yacc.c */ 03390 #line 504 "parser.y" 03391 { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[(3) - (4)].str)); ;} 03392 break; 03393 03394 case 89: 03395 03396 /* Line 1464 of yacc.c */ 03397 #line 505 "parser.y" 03398 { (yyval.attr) = make_attr(ATTR_DUAL); ;} 03399 break; 03400 03401 case 90: 03402 03403 /* Line 1464 of yacc.c */ 03404 #line 506 "parser.y" 03405 { (yyval.attr) = make_attr(ATTR_ENABLEALLOCATE); ;} 03406 break; 03407 03408 case 91: 03409 03410 /* Line 1464 of yacc.c */ 03411 #line 507 "parser.y" 03412 { (yyval.attr) = make_attr(ATTR_ENCODE); ;} 03413 break; 03414 03415 case 92: 03416 03417 /* Line 1464 of yacc.c */ 03418 #line 508 "parser.y" 03419 { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[(3) - (4)].str_list)); ;} 03420 break; 03421 03422 case 93: 03423 03424 /* Line 1464 of yacc.c */ 03425 #line 509 "parser.y" 03426 { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[(3) - (4)].expr)); ;} 03427 break; 03428 03429 case 94: 03430 03431 /* Line 1464 of yacc.c */ 03432 #line 510 "parser.y" 03433 { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); ;} 03434 break; 03435 03436 case 95: 03437 03438 /* Line 1464 of yacc.c */ 03439 #line 511 "parser.y" 03440 { (yyval.attr) = make_attr(ATTR_FAULTSTATUS); ;} 03441 break; 03442 03443 case 96: 03444 03445 /* Line 1464 of yacc.c */ 03446 #line 512 "parser.y" 03447 { (yyval.attr) = make_attr(ATTR_FORCEALLOCATE); ;} 03448 break; 03449 03450 case 97: 03451 03452 /* Line 1464 of yacc.c */ 03453 #line 513 "parser.y" 03454 { (yyval.attr) = make_attr(ATTR_HANDLE); ;} 03455 break; 03456 03457 case 98: 03458 03459 /* Line 1464 of yacc.c */ 03460 #line 514 "parser.y" 03461 { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[(3) - (4)].expr)); ;} 03462 break; 03463 03464 case 99: 03465 03466 /* Line 1464 of yacc.c */ 03467 #line 515 "parser.y" 03468 { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[(3) - (4)].str)); ;} 03469 break; 03470 03471 case 100: 03472 03473 /* Line 1464 of yacc.c */ 03474 #line 516 "parser.y" 03475 { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[(3) - (4)].str)); ;} 03476 break; 03477 03478 case 101: 03479 03480 /* Line 1464 of yacc.c */ 03481 #line 517 "parser.y" 03482 { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[(3) - (4)].expr)); ;} 03483 break; 03484 03485 case 102: 03486 03487 /* Line 1464 of yacc.c */ 03488 #line 518 "parser.y" 03489 { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[(3) - (4)].str)); ;} 03490 break; 03491 03492 case 103: 03493 03494 /* Line 1464 of yacc.c */ 03495 #line 519 "parser.y" 03496 { (yyval.attr) = make_attr(ATTR_HIDDEN); ;} 03497 break; 03498 03499 case 104: 03500 03501 /* Line 1464 of yacc.c */ 03502 #line 520 "parser.y" 03503 { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[(3) - (4)].expr)); ;} 03504 break; 03505 03506 case 105: 03507 03508 /* Line 1464 of yacc.c */ 03509 #line 521 "parser.y" 03510 { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); ;} 03511 break; 03512 03513 case 106: 03514 03515 /* Line 1464 of yacc.c */ 03516 #line 522 "parser.y" 03517 { (yyval.attr) = make_attr(ATTR_IGNORE); ;} 03518 break; 03519 03520 case 107: 03521 03522 /* Line 1464 of yacc.c */ 03523 #line 523 "parser.y" 03524 { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[(3) - (4)].expr)); ;} 03525 break; 03526 03527 case 108: 03528 03529 /* Line 1464 of yacc.c */ 03530 #line 524 "parser.y" 03531 { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); ;} 03532 break; 03533 03534 case 109: 03535 03536 /* Line 1464 of yacc.c */ 03537 #line 525 "parser.y" 03538 { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[(3) - (4)].var)); ;} 03539 break; 03540 03541 case 110: 03542 03543 /* Line 1464 of yacc.c */ 03544 #line 526 "parser.y" 03545 { (yyval.attr) = make_attr(ATTR_IN); ;} 03546 break; 03547 03548 case 111: 03549 03550 /* Line 1464 of yacc.c */ 03551 #line 527 "parser.y" 03552 { (yyval.attr) = make_attr(ATTR_INPUTSYNC); ;} 03553 break; 03554 03555 case 112: 03556 03557 /* Line 1464 of yacc.c */ 03558 #line 528 "parser.y" 03559 { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[(3) - (4)].expr_list)); ;} 03560 break; 03561 03562 case 113: 03563 03564 /* Line 1464 of yacc.c */ 03565 #line 529 "parser.y" 03566 { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[(3) - (4)].expr)); ;} 03567 break; 03568 03569 case 114: 03570 03571 /* Line 1464 of yacc.c */ 03572 #line 530 "parser.y" 03573 { (yyval.attr) = make_attr(ATTR_PARAMLCID); ;} 03574 break; 03575 03576 case 115: 03577 03578 /* Line 1464 of yacc.c */ 03579 #line 531 "parser.y" 03580 { (yyval.attr) = make_attr(ATTR_LICENSED); ;} 03581 break; 03582 03583 case 116: 03584 03585 /* Line 1464 of yacc.c */ 03586 #line 532 "parser.y" 03587 { (yyval.attr) = make_attr(ATTR_LOCAL); ;} 03588 break; 03589 03590 case 117: 03591 03592 /* Line 1464 of yacc.c */ 03593 #line 533 "parser.y" 03594 { (yyval.attr) = make_attr(ATTR_MAYBE); ;} 03595 break; 03596 03597 case 118: 03598 03599 /* Line 1464 of yacc.c */ 03600 #line 534 "parser.y" 03601 { (yyval.attr) = make_attr(ATTR_MESSAGE); ;} 03602 break; 03603 03604 case 119: 03605 03606 /* Line 1464 of yacc.c */ 03607 #line 535 "parser.y" 03608 { (yyval.attr) = make_attr(ATTR_NOCODE); ;} 03609 break; 03610 03611 case 120: 03612 03613 /* Line 1464 of yacc.c */ 03614 #line 536 "parser.y" 03615 { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); ;} 03616 break; 03617 03618 case 121: 03619 03620 /* Line 1464 of yacc.c */ 03621 #line 537 "parser.y" 03622 { (yyval.attr) = make_attr(ATTR_NONCREATABLE); ;} 03623 break; 03624 03625 case 122: 03626 03627 /* Line 1464 of yacc.c */ 03628 #line 538 "parser.y" 03629 { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); ;} 03630 break; 03631 03632 case 123: 03633 03634 /* Line 1464 of yacc.c */ 03635 #line 539 "parser.y" 03636 { (yyval.attr) = make_attr(ATTR_NOTIFY); ;} 03637 break; 03638 03639 case 124: 03640 03641 /* Line 1464 of yacc.c */ 03642 #line 540 "parser.y" 03643 { (yyval.attr) = make_attr(ATTR_NOTIFYFLAG); ;} 03644 break; 03645 03646 case 125: 03647 03648 /* Line 1464 of yacc.c */ 03649 #line 541 "parser.y" 03650 { (yyval.attr) = make_attr(ATTR_OBJECT); ;} 03651 break; 03652 03653 case 126: 03654 03655 /* Line 1464 of yacc.c */ 03656 #line 542 "parser.y" 03657 { (yyval.attr) = make_attr(ATTR_ODL); ;} 03658 break; 03659 03660 case 127: 03661 03662 /* Line 1464 of yacc.c */ 03663 #line 543 "parser.y" 03664 { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); ;} 03665 break; 03666 03667 case 128: 03668 03669 /* Line 1464 of yacc.c */ 03670 #line 544 "parser.y" 03671 { (yyval.attr) = make_attrp(ATTR_OPTIMIZE, (yyvsp[(3) - (4)].str)); ;} 03672 break; 03673 03674 case 129: 03675 03676 /* Line 1464 of yacc.c */ 03677 #line 545 "parser.y" 03678 { (yyval.attr) = make_attr(ATTR_OPTIONAL); ;} 03679 break; 03680 03681 case 130: 03682 03683 /* Line 1464 of yacc.c */ 03684 #line 546 "parser.y" 03685 { (yyval.attr) = make_attr(ATTR_OUT); ;} 03686 break; 03687 03688 case 131: 03689 03690 /* Line 1464 of yacc.c */ 03691 #line 547 "parser.y" 03692 { (yyval.attr) = make_attr(ATTR_PARTIALIGNORE); ;} 03693 break; 03694 03695 case 132: 03696 03697 /* Line 1464 of yacc.c */ 03698 #line 548 "parser.y" 03699 { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[(3) - (4)].num)); ;} 03700 break; 03701 03702 case 133: 03703 03704 /* Line 1464 of yacc.c */ 03705 #line 549 "parser.y" 03706 { (yyval.attr) = make_attrp(ATTR_PROGID, (yyvsp[(3) - (4)].str)); ;} 03707 break; 03708 03709 case 134: 03710 03711 /* Line 1464 of yacc.c */ 03712 #line 550 "parser.y" 03713 { (yyval.attr) = make_attr(ATTR_PROPGET); ;} 03714 break; 03715 03716 case 135: 03717 03718 /* Line 1464 of yacc.c */ 03719 #line 551 "parser.y" 03720 { (yyval.attr) = make_attr(ATTR_PROPPUT); ;} 03721 break; 03722 03723 case 136: 03724 03725 /* Line 1464 of yacc.c */ 03726 #line 552 "parser.y" 03727 { (yyval.attr) = make_attr(ATTR_PROPPUTREF); ;} 03728 break; 03729 03730 case 137: 03731 03732 /* Line 1464 of yacc.c */ 03733 #line 553 "parser.y" 03734 { (yyval.attr) = make_attr(ATTR_PROXY); ;} 03735 break; 03736 03737 case 138: 03738 03739 /* Line 1464 of yacc.c */ 03740 #line 554 "parser.y" 03741 { (yyval.attr) = make_attr(ATTR_PUBLIC); ;} 03742 break; 03743 03744 case 139: 03745 03746 /* Line 1464 of yacc.c */ 03747 #line 556 "parser.y" 03748 { expr_list_t *list = append_expr( NULL, (yyvsp[(3) - (6)].expr) ); 03749 list = append_expr( list, (yyvsp[(5) - (6)].expr) ); 03750 (yyval.attr) = make_attrp(ATTR_RANGE, list); ;} 03751 break; 03752 03753 case 140: 03754 03755 /* Line 1464 of yacc.c */ 03756 #line 559 "parser.y" 03757 { (yyval.attr) = make_attr(ATTR_READONLY); ;} 03758 break; 03759 03760 case 141: 03761 03762 /* Line 1464 of yacc.c */ 03763 #line 560 "parser.y" 03764 { (yyval.attr) = make_attrp(ATTR_REPRESENTAS, (yyvsp[(3) - (4)].type)); ;} 03765 break; 03766 03767 case 142: 03768 03769 /* Line 1464 of yacc.c */ 03770 #line 561 "parser.y" 03771 { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); ;} 03772 break; 03773 03774 case 143: 03775 03776 /* Line 1464 of yacc.c */ 03777 #line 562 "parser.y" 03778 { (yyval.attr) = make_attr(ATTR_RESTRICTED); ;} 03779 break; 03780 03781 case 144: 03782 03783 /* Line 1464 of yacc.c */ 03784 #line 563 "parser.y" 03785 { (yyval.attr) = make_attr(ATTR_RETVAL); ;} 03786 break; 03787 03788 case 145: 03789 03790 /* Line 1464 of yacc.c */ 03791 #line 564 "parser.y" 03792 { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[(3) - (4)].expr_list)); ;} 03793 break; 03794 03795 case 146: 03796 03797 /* Line 1464 of yacc.c */ 03798 #line 565 "parser.y" 03799 { (yyval.attr) = make_attr(ATTR_SOURCE); ;} 03800 break; 03801 03802 case 147: 03803 03804 /* Line 1464 of yacc.c */ 03805 #line 566 "parser.y" 03806 { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); ;} 03807 break; 03808 03809 case 148: 03810 03811 /* Line 1464 of yacc.c */ 03812 #line 567 "parser.y" 03813 { (yyval.attr) = make_attr(ATTR_STRING); ;} 03814 break; 03815 03816 case 149: 03817 03818 /* Line 1464 of yacc.c */ 03819 #line 568 "parser.y" 03820 { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[(3) - (4)].expr)); ;} 03821 break; 03822 03823 case 150: 03824 03825 /* Line 1464 of yacc.c */ 03826 #line 569 "parser.y" 03827 { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[(3) - (4)].type)); ;} 03828 break; 03829 03830 case 151: 03831 03832 /* Line 1464 of yacc.c */ 03833 #line 570 "parser.y" 03834 { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[(3) - (4)].type)); ;} 03835 break; 03836 03837 case 152: 03838 03839 /* Line 1464 of yacc.c */ 03840 #line 571 "parser.y" 03841 { (yyval.attr) = make_attrv(ATTR_THREADING, (yyvsp[(3) - (4)].num)); ;} 03842 break; 03843 03844 case 153: 03845 03846 /* Line 1464 of yacc.c */ 03847 #line 572 "parser.y" 03848 { (yyval.attr) = make_attr(ATTR_UIDEFAULT); ;} 03849 break; 03850 03851 case 154: 03852 03853 /* Line 1464 of yacc.c */ 03854 #line 573 "parser.y" 03855 { (yyval.attr) = make_attr(ATTR_USESGETLASTERROR); ;} 03856 break; 03857 03858 case 155: 03859 03860 /* Line 1464 of yacc.c */ 03861 #line 574 "parser.y" 03862 { (yyval.attr) = make_attrp(ATTR_USERMARSHAL, (yyvsp[(3) - (4)].type)); ;} 03863 break; 03864 03865 case 156: 03866 03867 /* Line 1464 of yacc.c */ 03868 #line 575 "parser.y" 03869 { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[(3) - (4)].uuid)); ;} 03870 break; 03871 03872 case 157: 03873 03874 /* Line 1464 of yacc.c */ 03875 #line 576 "parser.y" 03876 { (yyval.attr) = make_attr(ATTR_V1ENUM); ;} 03877 break; 03878 03879 case 158: 03880 03881 /* Line 1464 of yacc.c */ 03882 #line 577 "parser.y" 03883 { (yyval.attr) = make_attr(ATTR_VARARG); ;} 03884 break; 03885 03886 case 159: 03887 03888 /* Line 1464 of yacc.c */ 03889 #line 578 "parser.y" 03890 { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[(3) - (4)].num)); ;} 03891 break; 03892 03893 case 160: 03894 03895 /* Line 1464 of yacc.c */ 03896 #line 579 "parser.y" 03897 { (yyval.attr) = make_attrp(ATTR_VIPROGID, (yyvsp[(3) - (4)].str)); ;} 03898 break; 03899 03900 case 161: 03901 03902 /* Line 1464 of yacc.c */ 03903 #line 580 "parser.y" 03904 { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[(3) - (4)].type)); ;} 03905 break; 03906 03907 case 162: 03908 03909 /* Line 1464 of yacc.c */ 03910 #line 581 "parser.y" 03911 { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[(1) - (1)].num)); ;} 03912 break; 03913 03914 case 164: 03915 03916 /* Line 1464 of yacc.c */ 03917 #line 586 "parser.y" 03918 { if (!is_valid_uuid((yyvsp[(1) - (1)].str))) 03919 error_loc("invalid UUID: %s\n", (yyvsp[(1) - (1)].str)); 03920 (yyval.uuid) = parse_uuid((yyvsp[(1) - (1)].str)); ;} 03921 break; 03922 03923 case 165: 03924 03925 /* Line 1464 of yacc.c */ 03926 #line 591 "parser.y" 03927 { (yyval.str) = xstrdup("__cdecl"); ;} 03928 break; 03929 03930 case 166: 03931 03932 /* Line 1464 of yacc.c */ 03933 #line 592 "parser.y" 03934 { (yyval.str) = xstrdup("__fastcall"); ;} 03935 break; 03936 03937 case 167: 03938 03939 /* Line 1464 of yacc.c */ 03940 #line 593 "parser.y" 03941 { (yyval.str) = xstrdup("__pascal"); ;} 03942 break; 03943 03944 case 168: 03945 03946 /* Line 1464 of yacc.c */ 03947 #line 594 "parser.y" 03948 { (yyval.str) = xstrdup("__stdcall"); ;} 03949 break; 03950 03951 case 169: 03952 03953 /* Line 1464 of yacc.c */ 03954 #line 597 "parser.y" 03955 { (yyval.var_list) = NULL; ;} 03956 break; 03957 03958 case 170: 03959 03960 /* Line 1464 of yacc.c */ 03961 #line 598 "parser.y" 03962 { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); ;} 03963 break; 03964 03965 case 171: 03966 03967 /* Line 1464 of yacc.c */ 03968 #line 601 "parser.y" 03969 { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[(2) - (4)].expr) )); 03970 (yyval.var) = (yyvsp[(4) - (4)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); 03971 (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); 03972 ;} 03973 break; 03974 03975 case 172: 03976 03977 /* Line 1464 of yacc.c */ 03978 #line 605 "parser.y" 03979 { attr_t *a = make_attr(ATTR_DEFAULT); 03980 (yyval.var) = (yyvsp[(3) - (3)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); 03981 (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); 03982 ;} 03983 break; 03984 03985 case 173: 03986 03987 /* Line 1464 of yacc.c */ 03988 #line 611 "parser.y" 03989 { (yyval.var_list) = NULL; ;} 03990 break; 03991 03992 case 174: 03993 03994 /* Line 1464 of yacc.c */ 03995 #line 612 "parser.y" 03996 { (yyval.var_list) = (yyvsp[(1) - (2)].var_list); ;} 03997 break; 03998 03999 case 176: 04000 04001 /* Line 1464 of yacc.c */ 04002 #line 616 "parser.y" 04003 { if (!(yyvsp[(1) - (1)].var)->eval) 04004 (yyvsp[(1) - (1)].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */); 04005 (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); 04006 ;} 04007 break; 04008 04009 case 177: 04010 04011 /* Line 1464 of yacc.c */ 04012 #line 620 "parser.y" 04013 { if (!(yyvsp[(3) - (3)].var)->eval) 04014 { 04015 var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry ); 04016 (yyvsp[(3) - (3)].var)->eval = make_exprl(EXPR_NUM, last->eval->cval + 1); 04017 } 04018 (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) ); 04019 ;} 04020 break; 04021 04022 case 178: 04023 04024 /* Line 1464 of yacc.c */ 04025 #line 629 "parser.y" 04026 { (yyval.var) = reg_const((yyvsp[(1) - (3)].var)); 04027 (yyval.var)->eval = (yyvsp[(3) - (3)].expr); 04028 (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0); 04029 ;} 04030 break; 04031 04032 case 179: 04033 04034 /* Line 1464 of yacc.c */ 04035 #line 633 "parser.y" 04036 { (yyval.var) = reg_const((yyvsp[(1) - (1)].var)); 04037 (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0); 04038 ;} 04039 break; 04040 04041 case 180: 04042 04043 /* Line 1464 of yacc.c */ 04044 #line 638 "parser.y" 04045 { (yyval.type) = type_new_enum((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); ;} 04046 break; 04047 04048 case 181: 04049 04050 /* Line 1464 of yacc.c */ 04051 #line 641 "parser.y" 04052 { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); ;} 04053 break; 04054 04055 case 182: 04056 04057 /* Line 1464 of yacc.c */ 04058 #line 642 "parser.y" 04059 { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); ;} 04060 break; 04061 04062 case 183: 04063 04064 /* Line 1464 of yacc.c */ 04065 #line 645 "parser.y" 04066 { (yyval.expr) = make_expr(EXPR_VOID); ;} 04067 break; 04068 04069 case 185: 04070 04071 /* Line 1464 of yacc.c */ 04072 #line 649 "parser.y" 04073 { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[(1) - (1)].num)); ;} 04074 break; 04075 04076 case 186: 04077 04078 /* Line 1464 of yacc.c */ 04079 #line 650 "parser.y" 04080 { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[(1) - (1)].num)); ;} 04081 break; 04082 04083 case 187: 04084 04085 /* Line 1464 of yacc.c */ 04086 #line 651 "parser.y" 04087 { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[(1) - (1)].dbl)); ;} 04088 break; 04089 04090 case 188: 04091 04092 /* Line 1464 of yacc.c */ 04093 #line 652 "parser.y" 04094 { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); ;} 04095 break; 04096 04097 case 189: 04098 04099 /* Line 1464 of yacc.c */ 04100 #line 653 "parser.y" 04101 { (yyval.expr) = make_exprl(EXPR_NUM, 0); ;} 04102 break; 04103 04104 case 190: 04105 04106 /* Line 1464 of yacc.c */ 04107 #line 654 "parser.y" 04108 { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); ;} 04109 break; 04110 04111 case 191: 04112 04113 /* Line 1464 of yacc.c */ 04114 #line 655 "parser.y" 04115 { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[(1) - (1)].str)); ;} 04116 break; 04117 04118 case 192: 04119 04120 /* Line 1464 of yacc.c */ 04121 #line 656 "parser.y" 04122 { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[(1) - (1)].str)); ;} 04123 break; 04124 04125 case 193: 04126 04127 /* Line 1464 of yacc.c */ 04128 #line 657 "parser.y" 04129 { (yyval.expr) = make_exprs(EXPR_CHARCONST, (yyvsp[(1) - (1)].str)); ;} 04130 break; 04131 04132 case 194: 04133 04134 /* Line 1464 of yacc.c */ 04135 #line 658 "parser.y" 04136 { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[(1) - (1)].str)); ;} 04137 break; 04138 04139 case 195: 04140 04141 /* Line 1464 of yacc.c */ 04142 #line 659 "parser.y" 04143 { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); ;} 04144 break; 04145 04146 case 196: 04147 04148 /* Line 1464 of yacc.c */ 04149 #line 660 "parser.y" 04150 { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04151 break; 04152 04153 case 197: 04154 04155 /* Line 1464 of yacc.c */ 04156 #line 661 "parser.y" 04157 { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04158 break; 04159 04160 case 198: 04161 04162 /* Line 1464 of yacc.c */ 04163 #line 662 "parser.y" 04164 { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04165 break; 04166 04167 case 199: 04168 04169 /* Line 1464 of yacc.c */ 04170 #line 663 "parser.y" 04171 { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04172 break; 04173 04174 case 200: 04175 04176 /* Line 1464 of yacc.c */ 04177 #line 664 "parser.y" 04178 { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04179 break; 04180 04181 case 201: 04182 04183 /* Line 1464 of yacc.c */ 04184 #line 665 "parser.y" 04185 { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04186 break; 04187 04188 case 202: 04189 04190 /* Line 1464 of yacc.c */ 04191 #line 666 "parser.y" 04192 { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04193 break; 04194 04195 case 203: 04196 04197 /* Line 1464 of yacc.c */ 04198 #line 667 "parser.y" 04199 { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04200 break; 04201 04202 case 204: 04203 04204 /* Line 1464 of yacc.c */ 04205 #line 668 "parser.y" 04206 { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04207 break; 04208 04209 case 205: 04210 04211 /* Line 1464 of yacc.c */ 04212 #line 669 "parser.y" 04213 { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04214 break; 04215 04216 case 206: 04217 04218 /* Line 1464 of yacc.c */ 04219 #line 670 "parser.y" 04220 { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04221 break; 04222 04223 case 207: 04224 04225 /* Line 1464 of yacc.c */ 04226 #line 671 "parser.y" 04227 { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04228 break; 04229 04230 case 208: 04231 04232 /* Line 1464 of yacc.c */ 04233 #line 672 "parser.y" 04234 { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04235 break; 04236 04237 case 209: 04238 04239 /* Line 1464 of yacc.c */ 04240 #line 673 "parser.y" 04241 { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04242 break; 04243 04244 case 210: 04245 04246 /* Line 1464 of yacc.c */ 04247 #line 674 "parser.y" 04248 { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04249 break; 04250 04251 case 211: 04252 04253 /* Line 1464 of yacc.c */ 04254 #line 675 "parser.y" 04255 { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04256 break; 04257 04258 case 212: 04259 04260 /* Line 1464 of yacc.c */ 04261 #line 676 "parser.y" 04262 { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04263 break; 04264 04265 case 213: 04266 04267 /* Line 1464 of yacc.c */ 04268 #line 677 "parser.y" 04269 { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); ;} 04270 break; 04271 04272 case 214: 04273 04274 /* Line 1464 of yacc.c */ 04275 #line 678 "parser.y" 04276 { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[(2) - (2)].expr)); ;} 04277 break; 04278 04279 case 215: 04280 04281 /* Line 1464 of yacc.c */ 04282 #line 679 "parser.y" 04283 { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[(2) - (2)].expr)); ;} 04284 break; 04285 04286 case 216: 04287 04288 /* Line 1464 of yacc.c */ 04289 #line 680 "parser.y" 04290 { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[(2) - (2)].expr)); ;} 04291 break; 04292 04293 case 217: 04294 04295 /* Line 1464 of yacc.c */ 04296 #line 681 "parser.y" 04297 { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[(2) - (2)].expr)); ;} 04298 break; 04299 04300 case 218: 04301 04302 /* Line 1464 of yacc.c */ 04303 #line 682 "parser.y" 04304 { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[(2) - (2)].expr)); ;} 04305 break; 04306 04307 case 219: 04308 04309 /* Line 1464 of yacc.c */ 04310 #line 683 "parser.y" 04311 { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[(2) - (2)].expr)); ;} 04312 break; 04313 04314 case 220: 04315 04316 /* Line 1464 of yacc.c */ 04317 #line 684 "parser.y" 04318 { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[(1) - (3)].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); ;} 04319 break; 04320 04321 case 221: 04322 04323 /* Line 1464 of yacc.c */ 04324 #line 685 "parser.y" 04325 { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[(1) - (3)].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); ;} 04326 break; 04327 04328 case 222: 04329 04330 /* Line 1464 of yacc.c */ 04331 #line 687 "parser.y" 04332 { (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)); ;} 04333 break; 04334 04335 case 223: 04336 04337 /* Line 1464 of yacc.c */ 04338 #line 689 "parser.y" 04339 { (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)); ;} 04340 break; 04341 04342 case 224: 04343 04344 /* Line 1464 of yacc.c */ 04345 #line 690 "parser.y" 04346 { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr)); ;} 04347 break; 04348 04349 case 225: 04350 04351 /* Line 1464 of yacc.c */ 04352 #line 691 "parser.y" 04353 { (yyval.expr) = (yyvsp[(2) - (3)].expr); ;} 04354 break; 04355 04356 case 226: 04357 04358 /* Line 1464 of yacc.c */ 04359 #line 694 "parser.y" 04360 { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); ;} 04361 break; 04362 04363 case 227: 04364 04365 /* Line 1464 of yacc.c */ 04366 #line 695 "parser.y" 04367 { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); ;} 04368 break; 04369 04370 case 228: 04371 04372 /* Line 1464 of yacc.c */ 04373 #line 698 "parser.y" 04374 { (yyval.expr) = (yyvsp[(1) - (1)].expr); 04375 if (!(yyval.expr)->is_const) 04376 error_loc("expression is not an integer constant\n"); 04377 ;} 04378 break; 04379 04380 case 229: 04381 04382 /* Line 1464 of yacc.c */ 04383 #line 704 "parser.y" 04384 { (yyval.expr) = (yyvsp[(1) - (1)].expr); 04385 if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT) 04386 error_loc("expression is not constant\n"); 04387 ;} 04388 break; 04389 04390 case 230: 04391 04392 /* Line 1464 of yacc.c */ 04393 #line 710 "parser.y" 04394 { (yyval.var_list) = NULL; ;} 04395 break; 04396 04397 case 231: 04398 04399 /* Line 1464 of yacc.c */ 04400 #line 711 "parser.y" 04401 { (yyval.var_list) = append_var_list((yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var_list)); ;} 04402 break; 04403 04404 case 232: 04405 04406 /* Line 1464 of yacc.c */ 04407 #line 715 "parser.y" 04408 { const char *first = LIST_ENTRY(list_head((yyvsp[(3) - (4)].declarator_list)), declarator_t, entry)->var->name; 04409 check_field_attrs(first, (yyvsp[(1) - (4)].attr_list)); 04410 (yyval.var_list) = set_var_types((yyvsp[(1) - (4)].attr_list), (yyvsp[(2) - (4)].declspec), (yyvsp[(3) - (4)].declarator_list)); 04411 ;} 04412 break; 04413 04414 case 233: 04415 04416 /* Line 1464 of yacc.c */ 04417 #line 719 "parser.y" 04418 { var_t *v = make_var(NULL); 04419 v->type = (yyvsp[(2) - (3)].type); v->attrs = (yyvsp[(1) - (3)].attr_list); 04420 (yyval.var_list) = append_var(NULL, v); 04421 ;} 04422 break; 04423 04424 case 234: 04425 04426 /* Line 1464 of yacc.c */ 04427 #line 726 "parser.y" 04428 { (yyval.var) = (yyvsp[(1) - (2)].var); ;} 04429 break; 04430 04431 case 235: 04432 04433 /* Line 1464 of yacc.c */ 04434 #line 727 "parser.y" 04435 { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[(1) - (2)].attr_list); ;} 04436 break; 04437 04438 case 236: 04439 04440 /* Line 1464 of yacc.c */ 04441 #line 730 "parser.y" 04442 { (yyval.var_list) = NULL; ;} 04443 break; 04444 04445 case 237: 04446 04447 /* Line 1464 of yacc.c */ 04448 #line 731 "parser.y" 04449 { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); ;} 04450 break; 04451 04452 case 238: 04453 04454 /* Line 1464 of yacc.c */ 04455 #line 735 "parser.y" 04456 { (yyval.var) = (yyvsp[(1) - (2)].var); ;} 04457 break; 04458 04459 case 239: 04460 04461 /* Line 1464 of yacc.c */ 04462 #line 736 "parser.y" 04463 { (yyval.var) = NULL; ;} 04464 break; 04465 04466 case 240: 04467 04468 /* Line 1464 of yacc.c */ 04469 #line 739 "parser.y" 04470 { (yyval.var) = declare_var(check_field_attrs((yyvsp[(3) - (3)].declarator)->var->name, (yyvsp[(1) - (3)].attr_list)), 04471 (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE); 04472 free((yyvsp[(3) - (3)].declarator)); 04473 ;} 04474 break; 04475 04476 case 241: 04477 04478 /* Line 1464 of yacc.c */ 04479 #line 745 "parser.y" 04480 { (yyval.var) = (yyvsp[(1) - (1)].var); 04481 if (type_get_type((yyval.var)->type) != TYPE_FUNCTION) 04482 error_loc("only methods may be declared inside the methods section of a dispinterface\n"); 04483 check_function_attrs((yyval.var)->name, (yyval.var)->attrs); 04484 ;} 04485 break; 04486 04487 case 242: 04488 04489 /* Line 1464 of yacc.c */ 04490 #line 754 "parser.y" 04491 { (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE); 04492 free((yyvsp[(3) - (3)].declarator)); 04493 ;} 04494 break; 04495 04496 case 243: 04497 04498 /* Line 1464 of yacc.c */ 04499 #line 757 "parser.y" 04500 { (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), FALSE); 04501 free((yyvsp[(2) - (2)].declarator)); 04502 ;} 04503 break; 04504 04505 case 244: 04506 04507 /* Line 1464 of yacc.c */ 04508 #line 762 "parser.y" 04509 { (yyval.var) = NULL; ;} 04510 break; 04511 04512 case 246: 04513 04514 /* Line 1464 of yacc.c */ 04515 #line 766 "parser.y" 04516 { (yyval.str) = NULL; ;} 04517 break; 04518 04519 case 247: 04520 04521 /* Line 1464 of yacc.c */ 04522 #line 767 "parser.y" 04523 { (yyval.str) = (yyvsp[(1) - (1)].str); ;} 04524 break; 04525 04526 case 248: 04527 04528 /* Line 1464 of yacc.c */ 04529 #line 768 "parser.y" 04530 { (yyval.str) = (yyvsp[(1) - (1)].str); ;} 04531 break; 04532 04533 case 249: 04534 04535 /* Line 1464 of yacc.c */ 04536 #line 771 "parser.y" 04537 { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); ;} 04538 break; 04539 04540 case 250: 04541 04542 /* Line 1464 of yacc.c */ 04543 #line 773 "parser.y" 04544 { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); ;} 04545 break; 04546 04547 case 251: 04548 04549 /* Line 1464 of yacc.c */ 04550 #line 776 "parser.y" 04551 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04552 break; 04553 04554 case 252: 04555 04556 /* Line 1464 of yacc.c */ 04557 #line 777 "parser.y" 04558 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04559 break; 04560 04561 case 254: 04562 04563 /* Line 1464 of yacc.c */ 04564 #line 779 "parser.y" 04565 { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), -1); ;} 04566 break; 04567 04568 case 255: 04569 04570 /* Line 1464 of yacc.c */ 04571 #line 780 "parser.y" 04572 { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), 1); ;} 04573 break; 04574 04575 case 256: 04576 04577 /* Line 1464 of yacc.c */ 04578 #line 781 "parser.y" 04579 { (yyval.type) = type_new_int(TYPE_BASIC_INT, 1); ;} 04580 break; 04581 04582 case 257: 04583 04584 /* Line 1464 of yacc.c */ 04585 #line 782 "parser.y" 04586 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04587 break; 04588 04589 case 258: 04590 04591 /* Line 1464 of yacc.c */ 04592 #line 783 "parser.y" 04593 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04594 break; 04595 04596 case 259: 04597 04598 /* Line 1464 of yacc.c */ 04599 #line 784 "parser.y" 04600 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04601 break; 04602 04603 case 260: 04604 04605 /* Line 1464 of yacc.c */ 04606 #line 785 "parser.y" 04607 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04608 break; 04609 04610 case 261: 04611 04612 /* Line 1464 of yacc.c */ 04613 #line 786 "parser.y" 04614 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 04615 break; 04616 04617 case 264: 04618 04619 /* Line 1464 of yacc.c */ 04620 #line 793 "parser.y" 04621 { (yyval.type) = type_new_int(TYPE_BASIC_INT, 0); ;} 04622 break; 04623 04624 case 265: 04625 04626 /* Line 1464 of yacc.c */ 04627 #line 794 "parser.y" 04628 { (yyval.type) = type_new_int(TYPE_BASIC_INT16, 0); ;} 04629 break; 04630 04631 case 266: 04632 04633 /* Line 1464 of yacc.c */ 04634 #line 795 "parser.y" 04635 { (yyval.type) = type_new_int(TYPE_BASIC_INT8, 0); ;} 04636 break; 04637 04638 case 267: 04639 04640 /* Line 1464 of yacc.c */ 04641 #line 796 "parser.y" 04642 { (yyval.type) = type_new_int(TYPE_BASIC_INT32, 0); ;} 04643 break; 04644 04645 case 268: 04646 04647 /* Line 1464 of yacc.c */ 04648 #line 797 "parser.y" 04649 { (yyval.type) = type_new_int(TYPE_BASIC_HYPER, 0); ;} 04650 break; 04651 04652 case 269: 04653 04654 /* Line 1464 of yacc.c */ 04655 #line 798 "parser.y" 04656 { (yyval.type) = type_new_int(TYPE_BASIC_INT64, 0); ;} 04657 break; 04658 04659 case 270: 04660 04661 /* Line 1464 of yacc.c */ 04662 #line 799 "parser.y" 04663 { (yyval.type) = type_new_int(TYPE_BASIC_CHAR, 0); ;} 04664 break; 04665 04666 case 271: 04667 04668 /* Line 1464 of yacc.c */ 04669 #line 800 "parser.y" 04670 { (yyval.type) = type_new_int(TYPE_BASIC_INT3264, 0); ;} 04671 break; 04672 04673 case 272: 04674 04675 /* Line 1464 of yacc.c */ 04676 #line 803 "parser.y" 04677 { (yyval.type) = type_new_coclass((yyvsp[(2) - (2)].str)); ;} 04678 break; 04679 04680 case 273: 04681 04682 /* Line 1464 of yacc.c */ 04683 #line 804 "parser.y" 04684 { (yyval.type) = find_type((yyvsp[(2) - (2)].str), 0); 04685 if (type_get_type_detect_alias((yyval.type)) != TYPE_COCLASS) 04686 error_loc("%s was not declared a coclass at %s:%d\n", 04687 (yyvsp[(2) - (2)].str), (yyval.type)->loc_info.input_name, 04688 (yyval.type)->loc_info.line_number); 04689 ;} 04690 break; 04691 04692 case 274: 04693 04694 /* Line 1464 of yacc.c */ 04695 #line 812 "parser.y" 04696 { (yyval.type) = (yyvsp[(2) - (2)].type); 04697 check_def((yyval.type)); 04698 (yyval.type)->attrs = check_coclass_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); 04699 ;} 04700 break; 04701 04702 case 275: 04703 04704 /* Line 1464 of yacc.c */ 04705 #line 819 "parser.y" 04706 { (yyval.type) = type_coclass_define((yyvsp[(1) - (5)].type), (yyvsp[(3) - (5)].ifref_list)); ;} 04707 break; 04708 04709 case 276: 04710 04711 /* Line 1464 of yacc.c */ 04712 #line 822 "parser.y" 04713 { (yyval.ifref_list) = NULL; ;} 04714 break; 04715 04716 case 277: 04717 04718 /* Line 1464 of yacc.c */ 04719 #line 823 "parser.y" 04720 { (yyval.ifref_list) = append_ifref( (yyvsp[(1) - (2)].ifref_list), (yyvsp[(2) - (2)].ifref) ); ;} 04721 break; 04722 04723 case 278: 04724 04725 /* Line 1464 of yacc.c */ 04726 #line 827 "parser.y" 04727 { (yyval.ifref) = make_ifref((yyvsp[(2) - (2)].type)); (yyval.ifref)->attrs = (yyvsp[(1) - (2)].attr_list); ;} 04728 break; 04729 04730 case 279: 04731 04732 /* Line 1464 of yacc.c */ 04733 #line 830 "parser.y" 04734 { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} 04735 break; 04736 04737 case 280: 04738 04739 /* Line 1464 of yacc.c */ 04740 #line 831 "parser.y" 04741 { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} 04742 break; 04743 04744 case 281: 04745 04746 /* Line 1464 of yacc.c */ 04747 #line 834 "parser.y" 04748 { attr_t *attrs; 04749 (yyval.type) = (yyvsp[(2) - (2)].type); 04750 check_def((yyval.type)); 04751 attrs = make_attr(ATTR_DISPINTERFACE); 04752 (yyval.type)->attrs = append_attr( check_dispiface_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)), attrs ); 04753 (yyval.type)->defined = TRUE; 04754 ;} 04755 break; 04756 04757 case 282: 04758 04759 /* Line 1464 of yacc.c */ 04760 #line 843 "parser.y" 04761 { (yyval.var_list) = NULL; ;} 04762 break; 04763 04764 case 283: 04765 04766 /* Line 1464 of yacc.c */ 04767 #line 844 "parser.y" 04768 { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); ;} 04769 break; 04770 04771 case 284: 04772 04773 /* Line 1464 of yacc.c */ 04774 #line 847 "parser.y" 04775 { (yyval.var_list) = NULL; ;} 04776 break; 04777 04778 case 285: 04779 04780 /* Line 1464 of yacc.c */ 04781 #line 848 "parser.y" 04782 { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); ;} 04783 break; 04784 04785 case 286: 04786 04787 /* Line 1464 of yacc.c */ 04788 #line 854 "parser.y" 04789 { (yyval.type) = (yyvsp[(1) - (5)].type); 04790 type_dispinterface_define((yyval.type), (yyvsp[(3) - (5)].var_list), (yyvsp[(4) - (5)].var_list)); 04791 ;} 04792 break; 04793 04794 case 287: 04795 04796 /* Line 1464 of yacc.c */ 04797 #line 858 "parser.y" 04798 { (yyval.type) = (yyvsp[(1) - (5)].type); 04799 type_dispinterface_define_from_iface((yyval.type), (yyvsp[(3) - (5)].type)); 04800 ;} 04801 break; 04802 04803 case 288: 04804 04805 /* Line 1464 of yacc.c */ 04806 #line 863 "parser.y" 04807 { (yyval.type) = NULL; ;} 04808 break; 04809 04810 case 289: 04811 04812 /* Line 1464 of yacc.c */ 04813 #line 864 "parser.y" 04814 { (yyval.type) = find_type_or_error2((yyvsp[(2) - (2)].str), 0); ;} 04815 break; 04816 04817 case 290: 04818 04819 /* Line 1464 of yacc.c */ 04820 #line 867 "parser.y" 04821 { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} 04822 break; 04823 04824 case 291: 04825 04826 /* Line 1464 of yacc.c */ 04827 #line 868 "parser.y" 04828 { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); ;} 04829 break; 04830 04831 case 292: 04832 04833 /* Line 1464 of yacc.c */ 04834 #line 871 "parser.y" 04835 { (yyval.ifinfo).interface = (yyvsp[(2) - (2)].type); 04836 (yyval.ifinfo).old_pointer_default = pointer_default; 04837 if (is_attr((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT)) 04838 pointer_default = get_attrv((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT); 04839 check_def((yyvsp[(2) - (2)].type)); 04840 (yyvsp[(2) - (2)].type)->attrs = check_iface_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); 04841 (yyvsp[(2) - (2)].type)->defined = TRUE; 04842 ;} 04843 break; 04844 04845 case 293: 04846 04847 /* Line 1464 of yacc.c */ 04848 #line 882 "parser.y" 04849 { (yyval.type) = (yyvsp[(1) - (6)].ifinfo).interface; 04850 type_interface_define((yyval.type), (yyvsp[(2) - (6)].type), (yyvsp[(4) - (6)].stmt_list)); 04851 pointer_default = (yyvsp[(1) - (6)].ifinfo).old_pointer_default; 04852 ;} 04853 break; 04854 04855 case 294: 04856 04857 /* Line 1464 of yacc.c */ 04858 #line 890 "parser.y" 04859 { (yyval.type) = (yyvsp[(1) - (8)].ifinfo).interface; 04860 type_interface_define((yyval.type), find_type_or_error2((yyvsp[(3) - (8)].str), 0), (yyvsp[(6) - (8)].stmt_list)); 04861 pointer_default = (yyvsp[(1) - (8)].ifinfo).old_pointer_default; 04862 ;} 04863 break; 04864 04865 case 295: 04866 04867 /* Line 1464 of yacc.c */ 04868 #line 894 "parser.y" 04869 { (yyval.type) = (yyvsp[(1) - (2)].type); ;} 04870 break; 04871 04872 case 296: 04873 04874 /* Line 1464 of yacc.c */ 04875 #line 898 "parser.y" 04876 { (yyval.type) = (yyvsp[(1) - (2)].type); ;} 04877 break; 04878 04879 case 297: 04880 04881 /* Line 1464 of yacc.c */ 04882 #line 899 "parser.y" 04883 { (yyval.type) = (yyvsp[(1) - (2)].type); ;} 04884 break; 04885 04886 case 298: 04887 04888 /* Line 1464 of yacc.c */ 04889 #line 902 "parser.y" 04890 { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); ;} 04891 break; 04892 04893 case 299: 04894 04895 /* Line 1464 of yacc.c */ 04896 #line 903 "parser.y" 04897 { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); ;} 04898 break; 04899 04900 case 300: 04901 04902 /* Line 1464 of yacc.c */ 04903 #line 906 "parser.y" 04904 { (yyval.type) = (yyvsp[(2) - (2)].type); 04905 (yyval.type)->attrs = check_module_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); 04906 ;} 04907 break; 04908 04909 case 301: 04910 04911 /* Line 1464 of yacc.c */ 04912 #line 912 "parser.y" 04913 { (yyval.type) = (yyvsp[(1) - (5)].type); 04914 type_module_define((yyval.type), (yyvsp[(3) - (5)].stmt_list)); 04915 ;} 04916 break; 04917 04918 case 302: 04919 04920 /* Line 1464 of yacc.c */ 04921 #line 918 "parser.y" 04922 { (yyval.stgclass) = STG_EXTERN; ;} 04923 break; 04924 04925 case 303: 04926 04927 /* Line 1464 of yacc.c */ 04928 #line 919 "parser.y" 04929 { (yyval.stgclass) = STG_STATIC; ;} 04930 break; 04931 04932 case 304: 04933 04934 /* Line 1464 of yacc.c */ 04935 #line 920 "parser.y" 04936 { (yyval.stgclass) = STG_REGISTER; ;} 04937 break; 04938 04939 case 305: 04940 04941 /* Line 1464 of yacc.c */ 04942 #line 924 "parser.y" 04943 { (yyval.attr) = make_attr(ATTR_INLINE); ;} 04944 break; 04945 04946 case 306: 04947 04948 /* Line 1464 of yacc.c */ 04949 #line 928 "parser.y" 04950 { (yyval.attr) = make_attr(ATTR_CONST); ;} 04951 break; 04952 04953 case 307: 04954 04955 /* Line 1464 of yacc.c */ 04956 #line 931 "parser.y" 04957 { (yyval.attr_list) = NULL; ;} 04958 break; 04959 04960 case 308: 04961 04962 /* Line 1464 of yacc.c */ 04963 #line 932 "parser.y" 04964 { (yyval.attr_list) = append_attr((yyvsp[(1) - (2)].attr_list), (yyvsp[(2) - (2)].attr)); ;} 04965 break; 04966 04967 case 309: 04968 04969 /* Line 1464 of yacc.c */ 04970 #line 935 "parser.y" 04971 { (yyval.declspec) = make_decl_spec((yyvsp[(1) - (2)].type), (yyvsp[(2) - (2)].declspec), NULL, NULL, STG_NONE); ;} 04972 break; 04973 04974 case 310: 04975 04976 /* Line 1464 of yacc.c */ 04977 #line 937 "parser.y" 04978 { (yyval.declspec) = make_decl_spec((yyvsp[(2) - (3)].type), (yyvsp[(1) - (3)].declspec), (yyvsp[(3) - (3)].declspec), NULL, STG_NONE); ;} 04979 break; 04980 04981 case 311: 04982 04983 /* Line 1464 of yacc.c */ 04984 #line 940 "parser.y" 04985 { (yyval.declspec) = NULL; ;} 04986 break; 04987 04988 case 313: 04989 04990 /* Line 1464 of yacc.c */ 04991 #line 945 "parser.y" 04992 { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); ;} 04993 break; 04994 04995 case 314: 04996 04997 /* Line 1464 of yacc.c */ 04998 #line 946 "parser.y" 04999 { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); ;} 05000 break; 05001 05002 case 315: 05003 05004 /* Line 1464 of yacc.c */ 05005 #line 947 "parser.y" 05006 { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, NULL, (yyvsp[(1) - (2)].stgclass)); ;} 05007 break; 05008 05009 case 316: 05010 05011 /* Line 1464 of yacc.c */ 05012 #line 952 "parser.y" 05013 { (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))); ;} 05014 break; 05015 05016 case 317: 05017 05018 /* Line 1464 of yacc.c */ 05019 #line 953 "parser.y" 05020 { (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))); 05021 else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} 05022 break; 05023 05024 case 319: 05025 05026 /* Line 1464 of yacc.c */ 05027 #line 959 "parser.y" 05028 { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); ;} 05029 break; 05030 05031 case 320: 05032 05033 /* Line 1464 of yacc.c */ 05034 #line 960 "parser.y" 05035 { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); ;} 05036 break; 05037 05038 case 321: 05039 05040 /* Line 1464 of yacc.c */ 05041 #line 961 "parser.y" 05042 { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); ;} 05043 break; 05044 05045 case 322: 05046 05047 /* Line 1464 of yacc.c */ 05048 #line 962 "parser.y" 05049 { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); 05050 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); 05051 (yyval.declarator)->type = NULL; 05052 ;} 05053 break; 05054 05055 case 323: 05056 05057 /* Line 1464 of yacc.c */ 05058 #line 971 "parser.y" 05059 { (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))); ;} 05060 break; 05061 05062 case 324: 05063 05064 /* Line 1464 of yacc.c */ 05065 #line 972 "parser.y" 05066 { (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))); 05067 else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} 05068 break; 05069 05070 case 326: 05071 05072 /* Line 1464 of yacc.c */ 05073 #line 980 "parser.y" 05074 { (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))); ;} 05075 break; 05076 05077 case 327: 05078 05079 /* Line 1464 of yacc.c */ 05080 #line 981 "parser.y" 05081 { (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))); 05082 else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} 05083 break; 05084 05085 case 328: 05086 05087 /* Line 1464 of yacc.c */ 05088 #line 986 "parser.y" 05089 { (yyval.declarator) = make_declarator(NULL); ;} 05090 break; 05091 05092 case 330: 05093 05094 /* Line 1464 of yacc.c */ 05095 #line 992 "parser.y" 05096 { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); ;} 05097 break; 05098 05099 case 331: 05100 05101 /* Line 1464 of yacc.c */ 05102 #line 993 "parser.y" 05103 { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); ;} 05104 break; 05105 05106 case 332: 05107 05108 /* Line 1464 of yacc.c */ 05109 #line 994 "parser.y" 05110 { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); ;} 05111 break; 05112 05113 case 333: 05114 05115 /* Line 1464 of yacc.c */ 05116 #line 996 "parser.y" 05117 { (yyval.declarator) = make_declarator(NULL); 05118 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list))); 05119 (yyval.declarator)->type = NULL; 05120 ;} 05121 break; 05122 05123 case 334: 05124 05125 /* Line 1464 of yacc.c */ 05126 #line 1001 "parser.y" 05127 { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); 05128 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); 05129 (yyval.declarator)->type = NULL; 05130 ;} 05131 break; 05132 05133 case 335: 05134 05135 /* Line 1464 of yacc.c */ 05136 #line 1010 "parser.y" 05137 { (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))); ;} 05138 break; 05139 05140 case 336: 05141 05142 /* Line 1464 of yacc.c */ 05143 #line 1011 "parser.y" 05144 { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} 05145 break; 05146 05147 case 338: 05148 05149 /* Line 1464 of yacc.c */ 05150 #line 1018 "parser.y" 05151 { (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))); ;} 05152 break; 05153 05154 case 339: 05155 05156 /* Line 1464 of yacc.c */ 05157 #line 1019 "parser.y" 05158 { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); ;} 05159 break; 05160 05161 case 340: 05162 05163 /* Line 1464 of yacc.c */ 05164 #line 1023 "parser.y" 05165 { (yyval.declarator) = make_declarator(NULL); ;} 05166 break; 05167 05168 case 342: 05169 05170 /* Line 1464 of yacc.c */ 05171 #line 1031 "parser.y" 05172 { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); ;} 05173 break; 05174 05175 case 343: 05176 05177 /* Line 1464 of yacc.c */ 05178 #line 1032 "parser.y" 05179 { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); ;} 05180 break; 05181 05182 case 344: 05183 05184 /* Line 1464 of yacc.c */ 05185 #line 1033 "parser.y" 05186 { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); ;} 05187 break; 05188 05189 case 345: 05190 05191 /* Line 1464 of yacc.c */ 05192 #line 1034 "parser.y" 05193 { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); ;} 05194 break; 05195 05196 case 346: 05197 05198 /* Line 1464 of yacc.c */ 05199 #line 1036 "parser.y" 05200 { (yyval.declarator) = make_declarator(NULL); 05201 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list))); 05202 (yyval.declarator)->type = NULL; 05203 ;} 05204 break; 05205 05206 case 347: 05207 05208 /* Line 1464 of yacc.c */ 05209 #line 1041 "parser.y" 05210 { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); 05211 (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); 05212 (yyval.declarator)->type = NULL; 05213 ;} 05214 break; 05215 05216 case 348: 05217 05218 /* Line 1464 of yacc.c */ 05219 #line 1048 "parser.y" 05220 { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); ;} 05221 break; 05222 05223 case 349: 05224 05225 /* Line 1464 of yacc.c */ 05226 #line 1049 "parser.y" 05227 { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); ;} 05228 break; 05229 05230 case 350: 05231 05232 /* Line 1464 of yacc.c */ 05233 #line 1052 "parser.y" 05234 { (yyval.expr) = NULL; ;} 05235 break; 05236 05237 case 351: 05238 05239 /* Line 1464 of yacc.c */ 05240 #line 1053 "parser.y" 05241 { (yyval.expr) = (yyvsp[(2) - (2)].expr); ;} 05242 break; 05243 05244 case 352: 05245 05246 /* Line 1464 of yacc.c */ 05247 #line 1056 "parser.y" 05248 { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->bits = (yyvsp[(2) - (2)].expr); 05249 if (!(yyval.declarator)->bits && !(yyval.declarator)->var->name) 05250 error_loc("unnamed fields are not allowed\n"); 05251 ;} 05252 break; 05253 05254 case 353: 05255 05256 /* Line 1464 of yacc.c */ 05257 #line 1063 "parser.y" 05258 { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); ;} 05259 break; 05260 05261 case 354: 05262 05263 /* Line 1464 of yacc.c */ 05264 #line 1065 "parser.y" 05265 { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); ;} 05266 break; 05267 05268 case 355: 05269 05270 /* Line 1464 of yacc.c */ 05271 #line 1069 "parser.y" 05272 { (yyval.declarator) = (yyvsp[(1) - (1)].declarator); ;} 05273 break; 05274 05275 case 356: 05276 05277 /* Line 1464 of yacc.c */ 05278 #line 1070 "parser.y" 05279 { (yyval.declarator) = (yyvsp[(1) - (3)].declarator); (yyvsp[(1) - (3)].declarator)->var->eval = (yyvsp[(3) - (3)].expr); ;} 05280 break; 05281 05282 case 357: 05283 05284 /* Line 1464 of yacc.c */ 05285 #line 1074 "parser.y" 05286 { (yyval.num) = THREADING_APARTMENT; ;} 05287 break; 05288 05289 case 358: 05290 05291 /* Line 1464 of yacc.c */ 05292 #line 1075 "parser.y" 05293 { (yyval.num) = THREADING_NEUTRAL; ;} 05294 break; 05295 05296 case 359: 05297 05298 /* Line 1464 of yacc.c */ 05299 #line 1076 "parser.y" 05300 { (yyval.num) = THREADING_SINGLE; ;} 05301 break; 05302 05303 case 360: 05304 05305 /* Line 1464 of yacc.c */ 05306 #line 1077 "parser.y" 05307 { (yyval.num) = THREADING_FREE; ;} 05308 break; 05309 05310 case 361: 05311 05312 /* Line 1464 of yacc.c */ 05313 #line 1078 "parser.y" 05314 { (yyval.num) = THREADING_BOTH; ;} 05315 break; 05316 05317 case 362: 05318 05319 /* Line 1464 of yacc.c */ 05320 #line 1082 "parser.y" 05321 { (yyval.num) = RPC_FC_RP; ;} 05322 break; 05323 05324 case 363: 05325 05326 /* Line 1464 of yacc.c */ 05327 #line 1083 "parser.y" 05328 { (yyval.num) = RPC_FC_UP; ;} 05329 break; 05330 05331 case 364: 05332 05333 /* Line 1464 of yacc.c */ 05334 #line 1084 "parser.y" 05335 { (yyval.num) = RPC_FC_FP; ;} 05336 break; 05337 05338 case 365: 05339 05340 /* Line 1464 of yacc.c */ 05341 #line 1087 "parser.y" 05342 { (yyval.type) = type_new_struct((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); ;} 05343 break; 05344 05345 case 366: 05346 05347 /* Line 1464 of yacc.c */ 05348 #line 1090 "parser.y" 05349 { (yyval.type) = type_new_void(); ;} 05350 break; 05351 05352 case 367: 05353 05354 /* Line 1464 of yacc.c */ 05355 #line 1091 "parser.y" 05356 { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); ;} 05357 break; 05358 05359 case 368: 05360 05361 /* Line 1464 of yacc.c */ 05362 #line 1092 "parser.y" 05363 { (yyval.type) = (yyvsp[(1) - (1)].type); ;} 05364 break; 05365 05366 case 369: 05367 05368 /* Line 1464 of yacc.c */ 05369 #line 1093 "parser.y" 05370 { (yyval.type) = (yyvsp[(1) - (1)].type); ;} 05371 break; 05372 05373 case 370: 05374 05375 /* Line 1464 of yacc.c */ 05376 #line 1094 "parser.y" 05377 { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); ;} 05378 break; 05379 05380 case 371: 05381 05382 /* Line 1464 of yacc.c */ 05383 #line 1095 "parser.y" 05384 { (yyval.type) = (yyvsp[(1) - (1)].type); ;} 05385 break; 05386 05387 case 372: 05388 05389 /* Line 1464 of yacc.c */ 05390 #line 1096 "parser.y" 05391 { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); ;} 05392 break; 05393 05394 case 373: 05395 05396 /* Line 1464 of yacc.c */ 05397 #line 1097 "parser.y" 05398 { (yyval.type) = (yyvsp[(1) - (1)].type); ;} 05399 break; 05400 05401 case 374: 05402 05403 /* Line 1464 of yacc.c */ 05404 #line 1098 "parser.y" 05405 { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); ;} 05406 break; 05407 05408 case 375: 05409 05410 /* Line 1464 of yacc.c */ 05411 #line 1099 "parser.y" 05412 { (yyval.type) = make_safearray((yyvsp[(3) - (4)].type)); ;} 05413 break; 05414 05415 case 376: 05416 05417 /* Line 1464 of yacc.c */ 05418 #line 1103 "parser.y" 05419 { reg_typedefs((yyvsp[(3) - (4)].declspec), (yyvsp[(4) - (4)].declarator_list), check_typedef_attrs((yyvsp[(2) - (4)].attr_list))); 05420 (yyval.statement) = make_statement_typedef((yyvsp[(4) - (4)].declarator_list)); 05421 ;} 05422 break; 05423 05424 case 377: 05425 05426 /* Line 1464 of yacc.c */ 05427 #line 1109 "parser.y" 05428 { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); ;} 05429 break; 05430 05431 case 378: 05432 05433 /* Line 1464 of yacc.c */ 05434 #line 1112 "parser.y" 05435 { (yyval.type) = type_new_encapsulated_union((yyvsp[(2) - (10)].str), (yyvsp[(5) - (10)].var), (yyvsp[(7) - (10)].var), (yyvsp[(9) - (10)].var_list)); ;} 05436 break; 05437 05438 case 379: 05439 05440 /* Line 1464 of yacc.c */ 05441 #line 1116 "parser.y" 05442 { (yyval.num) = MAKEVERSION((yyvsp[(1) - (1)].num), 0); ;} 05443 break; 05444 05445 case 380: 05446 05447 /* Line 1464 of yacc.c */ 05448 #line 1117 "parser.y" 05449 { (yyval.num) = MAKEVERSION((yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num)); ;} 05450 break; 05451 05452 05453 05454 /* Line 1464 of yacc.c */ 05455 #line 5456 "parser.tab.c" 05456 default: break; 05457 } 05458 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 05459 05460 YYPOPSTACK (yylen); 05461 yylen = 0; 05462 YY_STACK_PRINT (yyss, yyssp); 05463 05464 *++yyvsp = yyval; 05465 05466 /* Now `shift' the result of the reduction. Determine what state 05467 that goes to, based on the state we popped back to and the rule 05468 number reduced by. */ 05469 05470 yyn = yyr1[yyn]; 05471 05472 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 05473 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 05474 yystate = yytable[yystate]; 05475 else 05476 yystate = yydefgoto[yyn - YYNTOKENS]; 05477 05478 goto yynewstate; 05479 05480 05481 /*------------------------------------. 05482 | yyerrlab -- here on detecting error | 05483 `------------------------------------*/ 05484 yyerrlab: 05485 /* If not already recovering from an error, report this error. */ 05486 if (!yyerrstatus) 05487 { 05488 ++yynerrs; 05489 #if ! YYERROR_VERBOSE 05490 yyerror (YY_("syntax error")); 05491 #else 05492 { 05493 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 05494 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 05495 { 05496 YYSIZE_T yyalloc = 2 * yysize; 05497 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 05498 yyalloc = YYSTACK_ALLOC_MAXIMUM; 05499 if (yymsg != yymsgbuf) 05500 YYSTACK_FREE (yymsg); 05501 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 05502 if (yymsg) 05503 yymsg_alloc = yyalloc; 05504 else 05505 { 05506 yymsg = yymsgbuf; 05507 yymsg_alloc = sizeof yymsgbuf; 05508 } 05509 } 05510 05511 if (0 < yysize && yysize <= yymsg_alloc) 05512 { 05513 (void) yysyntax_error (yymsg, yystate, yychar); 05514 yyerror (yymsg); 05515 } 05516 else 05517 { 05518 yyerror (YY_("syntax error")); 05519 if (yysize != 0) 05520 goto yyexhaustedlab; 05521 } 05522 } 05523 #endif 05524 } 05525 05526 05527 05528 if (yyerrstatus == 3) 05529 { 05530 /* If just tried and failed to reuse lookahead token after an 05531 error, discard it. */ 05532 05533 if (yychar <= YYEOF) 05534 { 05535 /* Return failure if at end of input. */ 05536 if (yychar == YYEOF) 05537 YYABORT; 05538 } 05539 else 05540 { 05541 yydestruct ("Error: discarding", 05542 yytoken, &yylval); 05543 yychar = YYEMPTY; 05544 } 05545 } 05546 05547 /* Else will try to reuse lookahead token after shifting the error 05548 token. */ 05549 goto yyerrlab1; 05550 05551 05552 /*---------------------------------------------------. 05553 | yyerrorlab -- error raised explicitly by YYERROR. | 05554 `---------------------------------------------------*/ 05555 yyerrorlab: 05556 05557 /* Pacify compilers like GCC when the user code never invokes 05558 YYERROR and the label yyerrorlab therefore never appears in user 05559 code. */ 05560 if (/*CONSTCOND*/ 0) 05561 goto yyerrorlab; 05562 05563 /* Do not reclaim the symbols of the rule which action triggered 05564 this YYERROR. */ 05565 YYPOPSTACK (yylen); 05566 yylen = 0; 05567 YY_STACK_PRINT (yyss, yyssp); 05568 yystate = *yyssp; 05569 goto yyerrlab1; 05570 05571 05572 /*-------------------------------------------------------------. 05573 | yyerrlab1 -- common code for both syntax error and YYERROR. | 05574 `-------------------------------------------------------------*/ 05575 yyerrlab1: 05576 yyerrstatus = 3; /* Each real token shifted decrements this. */ 05577 05578 for (;;) 05579 { 05580 yyn = yypact[yystate]; 05581 if (yyn != YYPACT_NINF) 05582 { 05583 yyn += YYTERROR; 05584 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 05585 { 05586 yyn = yytable[yyn]; 05587 if (0 < yyn) 05588 break; 05589 } 05590 } 05591 05592 /* Pop the current state because it cannot handle the error token. */ 05593 if (yyssp == yyss) 05594 YYABORT; 05595 05596 05597 yydestruct ("Error: popping", 05598 yystos[yystate], yyvsp); 05599 YYPOPSTACK (1); 05600 yystate = *yyssp; 05601 YY_STACK_PRINT (yyss, yyssp); 05602 } 05603 05604 *++yyvsp = yylval; 05605 05606 05607 /* Shift the error token. */ 05608 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 05609 05610 yystate = yyn; 05611 goto yynewstate; 05612 05613 05614 /*-------------------------------------. 05615 | yyacceptlab -- YYACCEPT comes here. | 05616 `-------------------------------------*/ 05617 yyacceptlab: 05618 yyresult = 0; 05619 goto yyreturn; 05620 05621 /*-----------------------------------. 05622 | yyabortlab -- YYABORT comes here. | 05623 `-----------------------------------*/ 05624 yyabortlab: 05625 yyresult = 1; 05626 goto yyreturn; 05627 05628 #if !defined(yyoverflow) || YYERROR_VERBOSE 05629 /*-------------------------------------------------. 05630 | yyexhaustedlab -- memory exhaustion comes here. | 05631 `-------------------------------------------------*/ 05632 yyexhaustedlab: 05633 yyerror (YY_("memory exhausted")); 05634 yyresult = 2; 05635 /* Fall through. */ 05636 #endif 05637 05638 yyreturn: 05639 if (yychar != YYEMPTY) 05640 yydestruct ("Cleanup: discarding lookahead", 05641 yytoken, &yylval); 05642 /* Do not reclaim the symbols of the rule which action triggered 05643 this YYABORT or YYACCEPT. */ 05644 YYPOPSTACK (yylen); 05645 YY_STACK_PRINT (yyss, yyssp); 05646 while (yyssp != yyss) 05647 { 05648 yydestruct ("Cleanup: popping", 05649 yystos[*yyssp], yyvsp); 05650 YYPOPSTACK (1); 05651 } 05652 #ifndef yyoverflow 05653 if (yyss != yyssa) 05654 YYSTACK_FREE (yyss); 05655 #endif 05656 #if YYERROR_VERBOSE 05657 if (yymsg != yymsgbuf) 05658 YYSTACK_FREE (yymsg); 05659 #endif 05660 /* Make sure YYID is used. */ 05661 return YYID (yyresult); 05662 } 05663 05664 05665 05666 /* Line 1684 of yacc.c */ 05667 #line 1120 "parser.y" 05668 05669 05670 static void decl_builtin_basic(const char *name, enum type_basic_type type) 05671 { 05672 type_t *t = type_new_basic(type); 05673 reg_type(t, name, 0); 05674 } 05675 05676 static void decl_builtin_alias(const char *name, type_t *t) 05677 { 05678 reg_type(type_new_alias(t, name), name, 0); 05679 } 05680 05681 void init_types(void) 05682 { 05683 decl_builtin_basic("byte", TYPE_BASIC_BYTE); 05684 decl_builtin_basic("wchar_t", TYPE_BASIC_WCHAR); 05685 decl_builtin_basic("float", TYPE_BASIC_FLOAT); 05686 decl_builtin_basic("double", TYPE_BASIC_DOUBLE); 05687 decl_builtin_basic("error_status_t", TYPE_BASIC_ERROR_STATUS_T); 05688 decl_builtin_basic("handle_t", TYPE_BASIC_HANDLE); 05689 decl_builtin_alias("boolean", type_new_basic(TYPE_BASIC_BYTE)); 05690 } 05691 05692 static str_list_t *append_str(str_list_t *list, char *str) 05693 { 05694 struct str_list_entry_t *entry; 05695 05696 if (!str) return list; 05697 if (!list) 05698 { 05699 list = xmalloc( sizeof(*list) ); 05700 list_init( list ); 05701 } 05702 entry = xmalloc( sizeof(*entry) ); 05703 entry->str = str; 05704 list_add_tail( list, &entry->entry ); 05705 return list; 05706 } 05707 05708 static attr_list_t *append_attr(attr_list_t *list, attr_t *attr) 05709 { 05710 attr_t *attr_existing; 05711 if (!attr) return list; 05712 if (!list) 05713 { 05714 list = xmalloc( sizeof(*list) ); 05715 list_init( list ); 05716 } 05717 LIST_FOR_EACH_ENTRY(attr_existing, list, attr_t, entry) 05718 if (attr_existing->type == attr->type) 05719 { 05720 parser_warning("duplicate attribute %s\n", get_attr_display_name(attr->type)); 05721 /* use the last attribute, like MIDL does */ 05722 list_remove(&attr_existing->entry); 05723 break; 05724 } 05725 list_add_tail( list, &attr->entry ); 05726 return list; 05727 } 05728 05729 static attr_list_t *move_attr(attr_list_t *dst, attr_list_t *src, enum attr_type type) 05730 { 05731 attr_t *attr; 05732 if (!src) return dst; 05733 LIST_FOR_EACH_ENTRY(attr, src, attr_t, entry) 05734 if (attr->type == type) 05735 { 05736 list_remove(&attr->entry); 05737 return append_attr(dst, attr); 05738 } 05739 return dst; 05740 } 05741 05742 static attr_list_t *append_attr_list(attr_list_t *new_list, attr_list_t *old_list) 05743 { 05744 struct list *entry; 05745 05746 if (!old_list) return new_list; 05747 05748 while ((entry = list_head(old_list))) 05749 { 05750 attr_t *attr = LIST_ENTRY(entry, attr_t, entry); 05751 list_remove(entry); 05752 new_list = append_attr(new_list, attr); 05753 } 05754 return new_list; 05755 } 05756 05757 static attr_list_t *dupattrs(const attr_list_t *list) 05758 { 05759 attr_list_t *new_list; 05760 const attr_t *attr; 05761 05762 if (!list) return NULL; 05763 05764 new_list = xmalloc( sizeof(*list) ); 05765 list_init( new_list ); 05766 LIST_FOR_EACH_ENTRY(attr, list, const attr_t, entry) 05767 { 05768 attr_t *new_attr = xmalloc(sizeof(*new_attr)); 05769 *new_attr = *attr; 05770 list_add_tail(new_list, &new_attr->entry); 05771 } 05772 return new_list; 05773 } 05774 05775 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) 05776 { 05777 decl_spec_t *declspec = left ? left : right; 05778 if (!declspec) 05779 { 05780 declspec = xmalloc(sizeof(*declspec)); 05781 declspec->type = NULL; 05782 declspec->attrs = NULL; 05783 declspec->stgclass = STG_NONE; 05784 } 05785 declspec->type = type; 05786 if (left && declspec != left) 05787 { 05788 declspec->attrs = append_attr_list(declspec->attrs, left->attrs); 05789 if (declspec->stgclass == STG_NONE) 05790 declspec->stgclass = left->stgclass; 05791 else if (left->stgclass != STG_NONE) 05792 error_loc("only one storage class can be specified\n"); 05793 assert(!left->type); 05794 free(left); 05795 } 05796 if (right && declspec != right) 05797 { 05798 declspec->attrs = append_attr_list(declspec->attrs, right->attrs); 05799 if (declspec->stgclass == STG_NONE) 05800 declspec->stgclass = right->stgclass; 05801 else if (right->stgclass != STG_NONE) 05802 error_loc("only one storage class can be specified\n"); 05803 assert(!right->type); 05804 free(right); 05805 } 05806 05807 declspec->attrs = append_attr(declspec->attrs, attr); 05808 if (declspec->stgclass == STG_NONE) 05809 declspec->stgclass = stgclass; 05810 else if (stgclass != STG_NONE) 05811 error_loc("only one storage class can be specified\n"); 05812 05813 /* apply attributes to type */ 05814 if (type && declspec->attrs) 05815 { 05816 attr_list_t *attrs; 05817 declspec->type = duptype(type, 1); 05818 attrs = dupattrs(type->attrs); 05819 declspec->type->attrs = append_attr_list(attrs, declspec->attrs); 05820 declspec->attrs = NULL; 05821 } 05822 05823 return declspec; 05824 } 05825 05826 static attr_t *make_attr(enum attr_type type) 05827 { 05828 attr_t *a = xmalloc(sizeof(attr_t)); 05829 a->type = type; 05830 a->u.ival = 0; 05831 return a; 05832 } 05833 05834 static attr_t *make_attrv(enum attr_type type, unsigned int val) 05835 { 05836 attr_t *a = xmalloc(sizeof(attr_t)); 05837 a->type = type; 05838 a->u.ival = val; 05839 return a; 05840 } 05841 05842 static attr_t *make_attrp(enum attr_type type, void *val) 05843 { 05844 attr_t *a = xmalloc(sizeof(attr_t)); 05845 a->type = type; 05846 a->u.pval = val; 05847 return a; 05848 } 05849 05850 static expr_list_t *append_expr(expr_list_t *list, expr_t *expr) 05851 { 05852 if (!expr) return list; 05853 if (!list) 05854 { 05855 list = xmalloc( sizeof(*list) ); 05856 list_init( list ); 05857 } 05858 list_add_tail( list, &expr->entry ); 05859 return list; 05860 } 05861 05862 static array_dims_t *append_array(array_dims_t *list, expr_t *expr) 05863 { 05864 if (!expr) return list; 05865 if (!list) 05866 { 05867 list = xmalloc( sizeof(*list) ); 05868 list_init( list ); 05869 } 05870 list_add_tail( list, &expr->entry ); 05871 return list; 05872 } 05873 05874 static struct list type_pool = LIST_INIT(type_pool); 05875 typedef struct 05876 { 05877 type_t data; 05878 struct list link; 05879 } type_pool_node_t; 05880 05881 type_t *alloc_type(void) 05882 { 05883 type_pool_node_t *node = xmalloc(sizeof *node); 05884 list_add_tail(&type_pool, &node->link); 05885 return &node->data; 05886 } 05887 05888 void set_all_tfswrite(int val) 05889 { 05890 type_pool_node_t *node; 05891 LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) 05892 node->data.tfswrite = val; 05893 } 05894 05895 void clear_all_offsets(void) 05896 { 05897 type_pool_node_t *node; 05898 LIST_FOR_EACH_ENTRY(node, &type_pool, type_pool_node_t, link) 05899 node->data.typestring_offset = node->data.ptrdesc = 0; 05900 } 05901 05902 static void type_function_add_head_arg(type_t *type, var_t *arg) 05903 { 05904 if (!type->details.function->args) 05905 { 05906 type->details.function->args = xmalloc( sizeof(*type->details.function->args) ); 05907 list_init( type->details.function->args ); 05908 } 05909 list_add_head( type->details.function->args, &arg->entry ); 05910 } 05911 05912 static int is_allowed_range_type(const type_t *type) 05913 { 05914 switch (type_get_type(type)) 05915 { 05916 case TYPE_ENUM: 05917 return TRUE; 05918 case TYPE_BASIC: 05919 switch (type_basic_get_type(type)) 05920 { 05921 case TYPE_BASIC_INT8: 05922 case TYPE_BASIC_INT16: 05923 case TYPE_BASIC_INT32: 05924 case TYPE_BASIC_INT64: 05925 case TYPE_BASIC_INT: 05926 case TYPE_BASIC_INT3264: 05927 case TYPE_BASIC_BYTE: 05928 case TYPE_BASIC_CHAR: 05929 case TYPE_BASIC_WCHAR: 05930 case TYPE_BASIC_HYPER: 05931 return TRUE; 05932 case TYPE_BASIC_FLOAT: 05933 case TYPE_BASIC_DOUBLE: 05934 case TYPE_BASIC_ERROR_STATUS_T: 05935 case TYPE_BASIC_HANDLE: 05936 return FALSE; 05937 } 05938 return FALSE; 05939 default: 05940 return FALSE; 05941 } 05942 } 05943 05944 static type_t *append_ptrchain_type(type_t *ptrchain, type_t *type) 05945 { 05946 type_t *ptrchain_type; 05947 if (!ptrchain) 05948 return type; 05949 for (ptrchain_type = ptrchain; type_pointer_get_ref(ptrchain_type); ptrchain_type = type_pointer_get_ref(ptrchain_type)) 05950 ; 05951 assert(ptrchain_type->type_type == TYPE_POINTER); 05952 ptrchain_type->details.pointer.ref = type; 05953 return ptrchain; 05954 } 05955 05956 static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const declarator_t *decl, 05957 int top) 05958 { 05959 var_t *v = decl->var; 05960 expr_list_t *sizes = get_attrp(attrs, ATTR_SIZEIS); 05961 expr_list_t *lengs = get_attrp(attrs, ATTR_LENGTHIS); 05962 int sizeless; 05963 expr_t *dim; 05964 type_t **ptype; 05965 array_dims_t *arr = decl ? decl->array : NULL; 05966 type_t *func_type = decl ? decl->func_type : NULL; 05967 type_t *type = decl_spec->type; 05968 05969 /* In case of a ranged type, duplicate it */ 05970 if(is_attr(attrs, ATTR_RANGE)) 05971 type = duptype(type, 1); 05972 05973 if (is_attr(type->attrs, ATTR_INLINE)) 05974 { 05975 if (!func_type) 05976 error_loc("inline attribute applied to non-function type\n"); 05977 else 05978 { 05979 type_t *t; 05980 /* move inline attribute from return type node to function node */ 05981 for (t = func_type; is_ptr(t); t = type_pointer_get_ref(t)) 05982 ; 05983 t->attrs = move_attr(t->attrs, type->attrs, ATTR_INLINE); 05984 } 05985 } 05986 05987 /* add type onto the end of the pointers in pident->type */ 05988 v->type = append_ptrchain_type(decl ? decl->type : NULL, type); 05989 v->stgclass = decl_spec->stgclass; 05990 v->attrs = attrs; 05991 05992 /* check for pointer attribute being applied to non-pointer, non-array 05993 * type */ 05994 if (!arr) 05995 { 05996 int ptr_attr = get_attrv(v->attrs, ATTR_POINTERTYPE); 05997 const type_t *ptr = NULL; 05998 /* pointer attributes on the left side of the type belong to the function 05999 * pointer, if one is being declared */ 06000 type_t **pt = func_type ? &func_type : &v->type; 06001 for (ptr = *pt; ptr && !ptr_attr; ) 06002 { 06003 ptr_attr = get_attrv(ptr->attrs, ATTR_POINTERTYPE); 06004 if (!ptr_attr && type_is_alias(ptr)) 06005 ptr = type_alias_get_aliasee(ptr); 06006 else 06007 break; 06008 } 06009 if (is_ptr(ptr)) 06010 { 06011 if (ptr_attr && ptr_attr != RPC_FC_UP && 06012 type_get_type(type_pointer_get_ref(ptr)) == TYPE_INTERFACE) 06013 warning_loc_info(&v->loc_info, 06014 "%s: pointer attribute applied to interface " 06015 "pointer type has no effect\n", v->name); 06016 if (!ptr_attr && top && (*pt)->details.pointer.def_fc != RPC_FC_RP) 06017 { 06018 /* FIXME: this is a horrible hack to cope with the issue that we 06019 * store an offset to the typeformat string in the type object, but 06020 * two typeformat strings may be written depending on whether the 06021 * pointer is a toplevel parameter or not */ 06022 *pt = duptype(*pt, 1); 06023 } 06024 } 06025 else if (ptr_attr) 06026 error_loc("%s: pointer attribute applied to non-pointer type\n", v->name); 06027 } 06028 06029 if (is_attr(v->attrs, ATTR_STRING)) 06030 { 06031 type_t *t = type; 06032 06033 if (!is_ptr(v->type) && !arr) 06034 error_loc("'%s': [string] attribute applied to non-pointer, non-array type\n", 06035 v->name); 06036 06037 while (is_ptr(t)) 06038 t = type_pointer_get_ref(t); 06039 06040 if (type_get_type(t) != TYPE_BASIC && 06041 (get_basic_fc(t) != RPC_FC_CHAR && 06042 get_basic_fc(t) != RPC_FC_BYTE && 06043 get_basic_fc(t) != RPC_FC_WCHAR)) 06044 { 06045 error_loc("'%s': [string] attribute is only valid on 'char', 'byte', or 'wchar_t' pointers and arrays\n", 06046 v->name); 06047 } 06048 } 06049 06050 if (is_attr(v->attrs, ATTR_V1ENUM)) 06051 { 06052 if (type_get_type_detect_alias(v->type) != TYPE_ENUM) 06053 error_loc("'%s': [v1_enum] attribute applied to non-enum type\n", v->name); 06054 } 06055 06056 if (is_attr(v->attrs, ATTR_RANGE) && !is_allowed_range_type(v->type)) 06057 error_loc("'%s': [range] attribute applied to non-integer type\n", 06058 v->name); 06059 06060 ptype = &v->type; 06061 sizeless = FALSE; 06062 if (arr) LIST_FOR_EACH_ENTRY_REV(dim, arr, expr_t, entry) 06063 { 06064 if (sizeless) 06065 error_loc("%s: only the first array dimension can be unspecified\n", v->name); 06066 06067 if (dim->is_const) 06068 { 06069 if (dim->cval <= 0) 06070 error_loc("%s: array dimension must be positive\n", v->name); 06071 06072 /* FIXME: should use a type_memsize that allows us to pass in a pointer size */ 06073 if (0) 06074 { 06075 unsigned int size = type_memsize(v->type); 06076 06077 if (0xffffffffu / size < dim->cval) 06078 error_loc("%s: total array size is too large\n", v->name); 06079 } 06080 } 06081 else 06082 sizeless = TRUE; 06083 06084 *ptype = type_new_array(NULL, *ptype, FALSE, 06085 dim->is_const ? dim->cval : 0, 06086 dim->is_const ? NULL : dim, NULL, 06087 pointer_default); 06088 } 06089 06090 ptype = &v->type; 06091 if (sizes) LIST_FOR_EACH_ENTRY(dim, sizes, expr_t, entry) 06092 { 06093 if (dim->type != EXPR_VOID) 06094 { 06095 if (is_array(*ptype)) 06096 { 06097 if (!type_array_get_conformance(*ptype) || 06098 type_array_get_conformance(*ptype)->type != EXPR_VOID) 06099 error_loc("%s: cannot specify size_is for an already sized array\n", v->name); 06100 else 06101 *ptype = type_new_array((*ptype)->name, 06102 type_array_get_element(*ptype), FALSE, 06103 0, dim, NULL, 0); 06104 } 06105 else if (is_ptr(*ptype)) 06106 *ptype = type_new_array((*ptype)->name, type_pointer_get_ref(*ptype), TRUE, 06107 0, dim, NULL, pointer_default); 06108 else 06109 error_loc("%s: size_is attribute applied to illegal type\n", v->name); 06110 } 06111 06112 if (is_ptr(*ptype)) 06113 ptype = &(*ptype)->details.pointer.ref; 06114 else if (is_array(*ptype)) 06115 ptype = &(*ptype)->details.array.elem; 06116 else 06117 error_loc("%s: too many expressions in size_is attribute\n", v->name); 06118 } 06119 06120 ptype = &v->type; 06121 if (lengs) LIST_FOR_EACH_ENTRY(dim, lengs, expr_t, entry) 06122 { 06123 if (dim->type != EXPR_VOID) 06124 { 06125 if (is_array(*ptype)) 06126 { 06127 *ptype = type_new_array((*ptype)->name, 06128 type_array_get_element(*ptype), 06129 type_array_is_decl_as_ptr(*ptype), 06130 type_array_get_dim(*ptype), 06131 type_array_get_conformance(*ptype), 06132 dim, type_array_get_ptr_default_fc(*ptype)); 06133 } 06134 else 06135 error_loc("%s: length_is attribute applied to illegal type\n", v->name); 06136 } 06137 06138 if (is_ptr(*ptype)) 06139 ptype = &(*ptype)->details.pointer.ref; 06140 else if (is_array(*ptype)) 06141 ptype = &(*ptype)->details.array.elem; 06142 else 06143 error_loc("%s: too many expressions in length_is attribute\n", v->name); 06144 } 06145 06146 /* v->type is currently pointing to the type on the left-side of the 06147 * declaration, so we need to fix this up so that it is the return type of the 06148 * function and make v->type point to the function side of the declaration */ 06149 if (func_type) 06150 { 06151 type_t *ft, *t; 06152 type_t *return_type = v->type; 06153 v->type = func_type; 06154 for (ft = v->type; is_ptr(ft); ft = type_pointer_get_ref(ft)) 06155 ; 06156 assert(type_get_type_detect_alias(ft) == TYPE_FUNCTION); 06157 ft->details.function->rettype = return_type; 06158 /* move calling convention attribute, if present, from pointer nodes to 06159 * function node */ 06160 for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t)) 06161 ft->attrs = move_attr(ft->attrs, t->attrs, ATTR_CALLCONV); 06162 } 06163 else 06164 { 06165 type_t *t; 06166 for (t = v->type; is_ptr(t); t = type_pointer_get_ref(t)) 06167 if (is_attr(t->attrs, ATTR_CALLCONV)) 06168 error_loc("calling convention applied to non-function-pointer type\n"); 06169 } 06170 06171 if (decl->bits) 06172 v->type = type_new_bitfield(v->type, decl->bits); 06173 06174 return v; 06175 } 06176 06177 static var_list_t *set_var_types(attr_list_t *attrs, decl_spec_t *decl_spec, declarator_list_t *decls) 06178 { 06179 declarator_t *decl, *next; 06180 var_list_t *var_list = NULL; 06181 06182 LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) 06183 { 06184 var_t *var = declare_var(attrs, decl_spec, decl, 0); 06185 var_list = append_var(var_list, var); 06186 free(decl); 06187 } 06188 free(decl_spec); 06189 return var_list; 06190 } 06191 06192 static ifref_list_t *append_ifref(ifref_list_t *list, ifref_t *iface) 06193 { 06194 if (!iface) return list; 06195 if (!list) 06196 { 06197 list = xmalloc( sizeof(*list) ); 06198 list_init( list ); 06199 } 06200 list_add_tail( list, &iface->entry ); 06201 return list; 06202 } 06203 06204 static ifref_t *make_ifref(type_t *iface) 06205 { 06206 ifref_t *l = xmalloc(sizeof(ifref_t)); 06207 l->iface = iface; 06208 l->attrs = NULL; 06209 return l; 06210 } 06211 06212 var_list_t *append_var(var_list_t *list, var_t *var) 06213 { 06214 if (!var) return list; 06215 if (!list) 06216 { 06217 list = xmalloc( sizeof(*list) ); 06218 list_init( list ); 06219 } 06220 list_add_tail( list, &var->entry ); 06221 return list; 06222 } 06223 06224 static var_list_t *append_var_list(var_list_t *list, var_list_t *vars) 06225 { 06226 if (!vars) return list; 06227 if (!list) 06228 { 06229 list = xmalloc( sizeof(*list) ); 06230 list_init( list ); 06231 } 06232 list_move_tail( list, vars ); 06233 return list; 06234 } 06235 06236 var_t *make_var(char *name) 06237 { 06238 var_t *v = xmalloc(sizeof(var_t)); 06239 v->name = name; 06240 v->type = NULL; 06241 v->attrs = NULL; 06242 v->eval = NULL; 06243 v->stgclass = STG_NONE; 06244 init_loc_info(&v->loc_info); 06245 return v; 06246 } 06247 06248 static declarator_list_t *append_declarator(declarator_list_t *list, declarator_t *d) 06249 { 06250 if (!d) return list; 06251 if (!list) { 06252 list = xmalloc(sizeof(*list)); 06253 list_init(list); 06254 } 06255 list_add_tail(list, &d->entry); 06256 return list; 06257 } 06258 06259 static declarator_t *make_declarator(var_t *var) 06260 { 06261 declarator_t *d = xmalloc(sizeof(*d)); 06262 d->var = var ? var : make_var(NULL); 06263 d->type = NULL; 06264 d->func_type = NULL; 06265 d->array = NULL; 06266 d->bits = NULL; 06267 return d; 06268 } 06269 06270 static type_t *make_safearray(type_t *type) 06271 { 06272 return type_new_array(NULL, type_new_alias(type, "SAFEARRAY"), TRUE, 0, 06273 NULL, NULL, RPC_FC_RP); 06274 } 06275 06276 static typelib_t *make_library(const char *name, const attr_list_t *attrs) 06277 { 06278 typelib_t *typelib = xmalloc(sizeof(*typelib)); 06279 typelib->name = xstrdup(name); 06280 typelib->attrs = attrs; 06281 list_init( &typelib->importlibs ); 06282 return typelib; 06283 } 06284 06285 #define HASHMAX 64 06286 06287 static int hash_ident(const char *name) 06288 { 06289 const char *p = name; 06290 int sum = 0; 06291 /* a simple sum hash is probably good enough */ 06292 while (*p) { 06293 sum += *p; 06294 p++; 06295 } 06296 return sum & (HASHMAX-1); 06297 } 06298 06299 /***** type repository *****/ 06300 06301 struct rtype { 06302 const char *name; 06303 type_t *type; 06304 int t; 06305 struct rtype *next; 06306 }; 06307 06308 struct rtype *type_hash[HASHMAX]; 06309 06310 type_t *reg_type(type_t *type, const char *name, int t) 06311 { 06312 struct rtype *nt; 06313 int hash; 06314 if (!name) { 06315 error_loc("registering named type without name\n"); 06316 return type; 06317 } 06318 hash = hash_ident(name); 06319 nt = xmalloc(sizeof(struct rtype)); 06320 nt->name = name; 06321 nt->type = type; 06322 nt->t = t; 06323 nt->next = type_hash[hash]; 06324 type_hash[hash] = nt; 06325 if ((t == tsSTRUCT || t == tsUNION)) 06326 fix_incomplete_types(type); 06327 return type; 06328 } 06329 06330 static int is_incomplete(const type_t *t) 06331 { 06332 return !t->defined && 06333 (type_get_type_detect_alias(t) == TYPE_STRUCT || 06334 type_get_type_detect_alias(t) == TYPE_UNION || 06335 type_get_type_detect_alias(t) == TYPE_ENCAPSULATED_UNION); 06336 } 06337 06338 void add_incomplete(type_t *t) 06339 { 06340 struct typenode *tn = xmalloc(sizeof *tn); 06341 tn->type = t; 06342 list_add_tail(&incomplete_types, &tn->entry); 06343 } 06344 06345 static void fix_type(type_t *t) 06346 { 06347 if (type_is_alias(t) && is_incomplete(t)) { 06348 type_t *ot = type_alias_get_aliasee(t); 06349 fix_type(ot); 06350 if (type_get_type_detect_alias(ot) == TYPE_STRUCT || 06351 type_get_type_detect_alias(ot) == TYPE_UNION || 06352 type_get_type_detect_alias(ot) == TYPE_ENCAPSULATED_UNION) 06353 t->details.structure = ot->details.structure; 06354 t->defined = ot->defined; 06355 } 06356 } 06357 06358 static void fix_incomplete(void) 06359 { 06360 struct typenode *tn, *next; 06361 06362 LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) { 06363 fix_type(tn->type); 06364 list_remove(&tn->entry); 06365 free(tn); 06366 } 06367 } 06368 06369 static void fix_incomplete_types(type_t *complete_type) 06370 { 06371 struct typenode *tn, *next; 06372 06373 LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) 06374 { 06375 if (type_is_equal(complete_type, tn->type)) 06376 { 06377 tn->type->details.structure = complete_type->details.structure; 06378 list_remove(&tn->entry); 06379 free(tn); 06380 } 06381 } 06382 } 06383 06384 static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, attr_list_t *attrs) 06385 { 06386 const declarator_t *decl; 06387 type_t *type = decl_spec->type; 06388 06389 /* We must generate names for tagless enum, struct or union. 06390 Typedef-ing a tagless enum, struct or union means we want the typedef 06391 to be included in a library hence the public attribute. */ 06392 if ((type_get_type_detect_alias(type) == TYPE_ENUM || 06393 type_get_type_detect_alias(type) == TYPE_STRUCT || 06394 type_get_type_detect_alias(type) == TYPE_UNION || 06395 type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) && 06396 !type->name && !parse_only) 06397 { 06398 if (! is_attr(attrs, ATTR_PUBLIC)) 06399 attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); 06400 type->name = gen_name(); 06401 } 06402 else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)) 06403 attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); 06404 06405 /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it. */ 06406 if (type_get_type_detect_alias(type) == TYPE_UNION && 06407 is_attr(attrs, ATTR_SWITCHTYPE) && 06408 !is_attr(type->attrs, ATTR_SWITCHTYPE)) 06409 type->attrs = append_attr(type->attrs, make_attrp(ATTR_SWITCHTYPE, get_attrp(attrs, ATTR_SWITCHTYPE))); 06410 06411 LIST_FOR_EACH_ENTRY( decl, decls, const declarator_t, entry ) 06412 { 06413 06414 if (decl->var->name) { 06415 type_t *cur; 06416 var_t *name; 06417 06418 cur = find_type(decl->var->name, 0); 06419 if (cur) 06420 error_loc("%s: redefinition error; original definition was at %s:%d\n", 06421 cur->name, cur->loc_info.input_name, 06422 cur->loc_info.line_number); 06423 06424 name = declare_var(attrs, decl_spec, decl, 0); 06425 cur = type_new_alias(name->type, name->name); 06426 cur->attrs = attrs; 06427 06428 if (is_incomplete(cur)) 06429 add_incomplete(cur); 06430 reg_type(cur, cur->name, 0); 06431 } 06432 } 06433 return type; 06434 } 06435 06436 type_t *find_type(const char *name, int t) 06437 { 06438 struct rtype *cur = type_hash[hash_ident(name)]; 06439 while (cur && (cur->t != t || strcmp(cur->name, name))) 06440 cur = cur->next; 06441 return cur ? cur->type : NULL; 06442 } 06443 06444 static type_t *find_type_or_error(const char *name, int t) 06445 { 06446 type_t *type = find_type(name, t); 06447 if (!type) { 06448 error_loc("type '%s' not found\n", name); 06449 return NULL; 06450 } 06451 return type; 06452 } 06453 06454 static type_t *find_type_or_error2(char *name, int t) 06455 { 06456 type_t *tp = find_type_or_error(name, t); 06457 free(name); 06458 return tp; 06459 } 06460 06461 int is_type(const char *name) 06462 { 06463 return find_type(name, 0) != NULL; 06464 } 06465 06466 type_t *get_type(enum type_type type, char *name, int t) 06467 { 06468 type_t *tp; 06469 if (name) { 06470 tp = find_type(name, t); 06471 if (tp) { 06472 free(name); 06473 return tp; 06474 } 06475 } 06476 tp = make_type(type); 06477 tp->name = name; 06478 if (!name) return tp; 06479 return reg_type(tp, name, t); 06480 } 06481 06482 /***** constant repository *****/ 06483 06484 struct rconst { 06485 char *name; 06486 var_t *var; 06487 struct rconst *next; 06488 }; 06489 06490 struct rconst *const_hash[HASHMAX]; 06491 06492 static var_t *reg_const(var_t *var) 06493 { 06494 struct rconst *nc; 06495 int hash; 06496 if (!var->name) { 06497 error_loc("registering constant without name\n"); 06498 return var; 06499 } 06500 hash = hash_ident(var->name); 06501 nc = xmalloc(sizeof(struct rconst)); 06502 nc->name = var->name; 06503 nc->var = var; 06504 nc->next = const_hash[hash]; 06505 const_hash[hash] = nc; 06506 return var; 06507 } 06508 06509 var_t *find_const(const char *name, int f) 06510 { 06511 struct rconst *cur = const_hash[hash_ident(name)]; 06512 while (cur && strcmp(cur->name, name)) 06513 cur = cur->next; 06514 if (!cur) { 06515 if (f) error_loc("constant '%s' not found\n", name); 06516 return NULL; 06517 } 06518 return cur->var; 06519 } 06520 06521 static char *gen_name(void) 06522 { 06523 static const char format[] = "__WIDL_%s_generated_name_%08lX"; 06524 static unsigned long n = 0; 06525 static const char *file_id; 06526 static size_t size; 06527 char *name; 06528 06529 if (! file_id) 06530 { 06531 char *dst = dup_basename(input_name, ".idl"); 06532 file_id = dst; 06533 06534 for (; *dst; ++dst) 06535 if (! isalnum((unsigned char) *dst)) 06536 *dst = '_'; 06537 06538 size = sizeof format - 7 + strlen(file_id) + 8; 06539 } 06540 06541 name = xmalloc(size); 06542 sprintf(name, format, file_id, n++); 06543 return name; 06544 } 06545 06546 struct allowed_attr 06547 { 06548 unsigned int dce_compatible : 1; 06549 unsigned int acf : 1; 06550 unsigned int on_interface : 1; 06551 unsigned int on_function : 1; 06552 unsigned int on_arg : 1; 06553 unsigned int on_type : 1; 06554 unsigned int on_enum : 1; 06555 unsigned int on_struct : 1; 06556 unsigned int on_union : 1; 06557 unsigned int on_field : 1; 06558 unsigned int on_library : 1; 06559 unsigned int on_dispinterface : 1; 06560 unsigned int on_module : 1; 06561 unsigned int on_coclass : 1; 06562 const char *display_name; 06563 }; 06564 06565 struct allowed_attr allowed_attr[] = 06566 { 06567 /* attr { D ACF I Fn ARG T En St Un Fi L DI M C <display name> } */ 06568 /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" }, 06569 /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" }, 06570 /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, 06571 /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" }, 06572 /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, 06573 /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" }, 06574 /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" }, 06575 /* ATTR_CALLAS */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "call_as" }, 06576 /* ATTR_CALLCONV */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, 06577 /* ATTR_CASE */ { 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "case" }, 06578 /* ATTR_CODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "code" }, 06579 /* ATTR_COMMSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "comm_status" }, 06580 /* ATTR_CONST */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "const" }, 06581 /* ATTR_CONTEXTHANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "context_handle" }, 06582 /* ATTR_CONTROL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "control" }, 06583 /* ATTR_DECODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "decode" }, 06584 /* ATTR_DEFAULT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, "default" }, 06585 /* ATTR_DEFAULTBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultbind" }, 06586 /* ATTR_DEFAULTCOLLELEM */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultcollelem" }, 06587 /* ATTR_DEFAULTVALUE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "defaultvalue" }, 06588 /* ATTR_DEFAULTVTABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "defaultvtable" }, 06589 /* ATTR_DISABLECONSISTENCYCHECK */{ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "disable_consistency_check" }, 06590 /* ATTR_DISPINTERFACE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL }, 06591 /* ATTR_DISPLAYBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "displaybind" }, 06592 /* ATTR_DLLNAME */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, "dllname" }, 06593 /* ATTR_DUAL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "dual" }, 06594 /* ATTR_ENABLEALLOCATE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "enable_allocate" }, 06595 /* ATTR_ENCODE */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "encode" }, 06596 /* ATTR_ENDPOINT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "endpoint" }, 06597 /* ATTR_ENTRY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "entry" }, 06598 /* ATTR_EXPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "explicit_handle" }, 06599 /* ATTR_FAULTSTATUS */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "fault_status" }, 06600 /* ATTR_FORCEALLOCATE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "force_allocate" }, 06601 /* ATTR_HANDLE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "handle" }, 06602 /* ATTR_HELPCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpcontext" }, 06603 /* ATTR_HELPFILE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpfile" }, 06604 /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstring" }, 06605 /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" }, 06606 /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" }, 06607 /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, 06608 /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "id" }, 06609 /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" }, 06610 /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" }, 06611 /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" }, 06612 /* ATTR_IMMEDIATEBIND */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "immediatebind" }, 06613 /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" }, 06614 /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" }, 06615 /* ATTR_INLINE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inline" }, 06616 /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, 06617 /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" }, 06618 /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" }, 06619 /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" }, 06620 /* ATTR_LOCAL */ { 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "local" }, 06621 /* ATTR_MAYBE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "maybe" }, 06622 /* ATTR_MESSAGE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "message" }, 06623 /* ATTR_NOCODE */ { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nocode" }, 06624 /* ATTR_NONBROWSABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonbrowsable" }, 06625 /* ATTR_NONCREATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "noncreatable" }, 06626 /* ATTR_NONEXTENSIBLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "nonextensible" }, 06627 /* ATTR_NOTIFY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify" }, 06628 /* ATTR_NOTIFYFLAG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "notify_flag" }, 06629 /* ATTR_OBJECT */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "object" }, 06630 /* ATTR_ODL */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "odl" }, 06631 /* ATTR_OLEAUTOMATION */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "oleautomation" }, 06632 /* ATTR_OPTIMIZE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optimize" }, 06633 /* ATTR_OPTIONAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "optional" }, 06634 /* ATTR_OUT */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "out" }, 06635 /* ATTR_PARAMLCID */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "lcid" }, 06636 /* ATTR_PARTIALIGNORE */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "partial_ignore" }, 06637 /* ATTR_POINTERDEFAULT */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "pointer_default" }, 06638 /* ATTR_POINTERTYPE */ { 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "ref, unique or ptr" }, 06639 /* ATTR_PROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "progid" }, 06640 /* ATTR_PROPGET */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" }, 06641 /* ATTR_PROPPUT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" }, 06642 /* ATTR_PROPPUTREF */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" }, 06643 /* ATTR_PROXY */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" }, 06644 /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "public" }, 06645 /* ATTR_RANGE */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, "range" }, 06646 /* ATTR_READONLY */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "readonly" }, 06647 /* ATTR_REPRESENTAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "represent_as" }, 06648 /* ATTR_REQUESTEDIT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "requestedit" }, 06649 /* ATTR_RESTRICTED */ { 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, "restricted" }, 06650 /* ATTR_RETVAL */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "retval" }, 06651 /* ATTR_SIZEIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "size_is" }, 06652 /* ATTR_SOURCE */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "source" }, 06653 /* ATTR_STRICTCONTEXTHANDLE */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "strict_context_handle" }, 06654 /* ATTR_STRING */ { 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, "string" }, 06655 /* ATTR_SWITCHIS */ { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "switch_is" }, 06656 /* ATTR_SWITCHTYPE */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, "switch_type" }, 06657 /* ATTR_THREADING */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "threading" }, 06658 /* ATTR_TRANSMITAS */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "transmit_as" }, 06659 /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" }, 06660 /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" }, 06661 /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" }, 06662 /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "uuid" }, 06663 /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" }, 06664 /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" }, 06665 /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "version" }, 06666 /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" }, 06667 /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" }, 06668 }; 06669 06670 const char *get_attr_display_name(enum attr_type type) 06671 { 06672 return allowed_attr[type].display_name; 06673 } 06674 06675 static attr_list_t *check_iface_attrs(const char *name, attr_list_t *attrs) 06676 { 06677 const attr_t *attr; 06678 if (!attrs) return attrs; 06679 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06680 { 06681 if (!allowed_attr[attr->type].on_interface) 06682 error_loc("inapplicable attribute %s for interface %s\n", 06683 allowed_attr[attr->type].display_name, name); 06684 if (attr->type == ATTR_IMPLICIT_HANDLE) 06685 { 06686 const var_t *var = attr->u.pval; 06687 if (type_get_type( var->type) == TYPE_BASIC && 06688 type_basic_get_type( var->type ) == TYPE_BASIC_HANDLE) 06689 continue; 06690 if (is_aliaschain_attr( var->type, ATTR_HANDLE )) 06691 continue; 06692 error_loc("attribute %s requires a handle type in interface %s\n", 06693 allowed_attr[attr->type].display_name, name); 06694 } 06695 } 06696 return attrs; 06697 } 06698 06699 static attr_list_t *check_function_attrs(const char *name, attr_list_t *attrs) 06700 { 06701 const attr_t *attr; 06702 if (!attrs) return attrs; 06703 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06704 { 06705 if (!allowed_attr[attr->type].on_function) 06706 error_loc("inapplicable attribute %s for function %s\n", 06707 allowed_attr[attr->type].display_name, name); 06708 } 06709 return attrs; 06710 } 06711 06712 static void check_arg_attrs(const var_t *arg) 06713 { 06714 const attr_t *attr; 06715 06716 if (arg->attrs) 06717 { 06718 LIST_FOR_EACH_ENTRY(attr, arg->attrs, const attr_t, entry) 06719 { 06720 if (!allowed_attr[attr->type].on_arg) 06721 error_loc("inapplicable attribute %s for argument %s\n", 06722 allowed_attr[attr->type].display_name, arg->name); 06723 } 06724 } 06725 } 06726 06727 static attr_list_t *check_typedef_attrs(attr_list_t *attrs) 06728 { 06729 const attr_t *attr; 06730 if (!attrs) return attrs; 06731 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06732 { 06733 if (!allowed_attr[attr->type].on_type) 06734 error_loc("inapplicable attribute %s for typedef\n", 06735 allowed_attr[attr->type].display_name); 06736 } 06737 return attrs; 06738 } 06739 06740 static attr_list_t *check_enum_attrs(attr_list_t *attrs) 06741 { 06742 const attr_t *attr; 06743 if (!attrs) return attrs; 06744 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06745 { 06746 if (!allowed_attr[attr->type].on_enum) 06747 error_loc("inapplicable attribute %s for enum\n", 06748 allowed_attr[attr->type].display_name); 06749 } 06750 return attrs; 06751 } 06752 06753 static attr_list_t *check_struct_attrs(attr_list_t *attrs) 06754 { 06755 const attr_t *attr; 06756 if (!attrs) return attrs; 06757 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06758 { 06759 if (!allowed_attr[attr->type].on_struct) 06760 error_loc("inapplicable attribute %s for struct\n", 06761 allowed_attr[attr->type].display_name); 06762 } 06763 return attrs; 06764 } 06765 06766 static attr_list_t *check_union_attrs(attr_list_t *attrs) 06767 { 06768 const attr_t *attr; 06769 if (!attrs) return attrs; 06770 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06771 { 06772 if (!allowed_attr[attr->type].on_union) 06773 error_loc("inapplicable attribute %s for union\n", 06774 allowed_attr[attr->type].display_name); 06775 } 06776 return attrs; 06777 } 06778 06779 static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs) 06780 { 06781 const attr_t *attr; 06782 if (!attrs) return attrs; 06783 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06784 { 06785 if (!allowed_attr[attr->type].on_field) 06786 error_loc("inapplicable attribute %s for field %s\n", 06787 allowed_attr[attr->type].display_name, name); 06788 } 06789 return attrs; 06790 } 06791 06792 static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs) 06793 { 06794 const attr_t *attr; 06795 if (!attrs) return attrs; 06796 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06797 { 06798 if (!allowed_attr[attr->type].on_library) 06799 error_loc("inapplicable attribute %s for library %s\n", 06800 allowed_attr[attr->type].display_name, name); 06801 } 06802 return attrs; 06803 } 06804 06805 static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs) 06806 { 06807 const attr_t *attr; 06808 if (!attrs) return attrs; 06809 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06810 { 06811 if (!allowed_attr[attr->type].on_dispinterface) 06812 error_loc("inapplicable attribute %s for dispinterface %s\n", 06813 allowed_attr[attr->type].display_name, name); 06814 } 06815 return attrs; 06816 } 06817 06818 static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs) 06819 { 06820 const attr_t *attr; 06821 if (!attrs) return attrs; 06822 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06823 { 06824 if (!allowed_attr[attr->type].on_module) 06825 error_loc("inapplicable attribute %s for module %s\n", 06826 allowed_attr[attr->type].display_name, name); 06827 } 06828 return attrs; 06829 } 06830 06831 static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs) 06832 { 06833 const attr_t *attr; 06834 if (!attrs) return attrs; 06835 LIST_FOR_EACH_ENTRY(attr, attrs, const attr_t, entry) 06836 { 06837 if (!allowed_attr[attr->type].on_coclass) 06838 error_loc("inapplicable attribute %s for coclass %s\n", 06839 allowed_attr[attr->type].display_name, name); 06840 } 06841 return attrs; 06842 } 06843 06844 static int is_allowed_conf_type(const type_t *type) 06845 { 06846 switch (type_get_type(type)) 06847 { 06848 case TYPE_ENUM: 06849 return TRUE; 06850 case TYPE_BASIC: 06851 switch (type_basic_get_type(type)) 06852 { 06853 case TYPE_BASIC_INT8: 06854 case TYPE_BASIC_INT16: 06855 case TYPE_BASIC_INT32: 06856 case TYPE_BASIC_INT64: 06857 case TYPE_BASIC_INT: 06858 case TYPE_BASIC_CHAR: 06859 case TYPE_BASIC_HYPER: 06860 case TYPE_BASIC_BYTE: 06861 case TYPE_BASIC_WCHAR: 06862 return TRUE; 06863 default: 06864 return FALSE; 06865 } 06866 case TYPE_ALIAS: 06867 /* shouldn't get here because of type_get_type call above */ 06868 assert(0); 06869 /* fall through */ 06870 case TYPE_STRUCT: 06871 case TYPE_UNION: 06872 case TYPE_ENCAPSULATED_UNION: 06873 case TYPE_ARRAY: 06874 case TYPE_POINTER: 06875 case TYPE_VOID: 06876 case TYPE_MODULE: 06877 case TYPE_COCLASS: 06878 case TYPE_FUNCTION: 06879 case TYPE_INTERFACE: 06880 case TYPE_BITFIELD: 06881 return FALSE; 06882 } 06883 return FALSE; 06884 } 06885 06886 static int is_ptr_guid_type(const type_t *type) 06887 { 06888 /* first, make sure it is a pointer to something */ 06889 if (!is_ptr(type)) return FALSE; 06890 06891 /* second, make sure it is a pointer to something of size sizeof(GUID), 06892 * i.e. 16 bytes */ 06893 return (type_memsize(type_pointer_get_ref(type)) == 16); 06894 } 06895 06896 static void check_conformance_expr_list(const char *attr_name, const var_t *arg, const type_t *container_type, expr_list_t *expr_list) 06897 { 06898 expr_t *dim; 06899 struct expr_loc expr_loc; 06900 expr_loc.v = arg; 06901 expr_loc.attr = attr_name; 06902 if (expr_list) LIST_FOR_EACH_ENTRY(dim, expr_list, expr_t, entry) 06903 { 06904 if (dim->type != EXPR_VOID) 06905 { 06906 const type_t *expr_type = expr_resolve_type(&expr_loc, container_type, dim); 06907 if (!is_allowed_conf_type(expr_type)) 06908 error_loc_info(&arg->loc_info, "expression must resolve to integral type <= 32bits for attribute %s\n", 06909 attr_name); 06910 } 06911 } 06912 } 06913 06914 static void check_remoting_fields(const var_t *var, type_t *type); 06915 06916 /* checks that properties common to fields and arguments are consistent */ 06917 static void check_field_common(const type_t *container_type, 06918 const char *container_name, const var_t *arg) 06919 { 06920 type_t *type = arg->type; 06921 int more_to_do; 06922 const char *container_type_name; 06923 const char *var_type; 06924 06925 switch (type_get_type(container_type)) 06926 { 06927 case TYPE_STRUCT: 06928 container_type_name = "struct"; 06929 var_type = "field"; 06930 break; 06931 case TYPE_UNION: 06932 container_type_name = "union"; 06933 var_type = "arm"; 06934 break; 06935 case TYPE_ENCAPSULATED_UNION: 06936 container_type_name = "encapsulated union"; 06937 var_type = "arm"; 06938 break; 06939 case TYPE_FUNCTION: 06940 container_type_name = "function"; 06941 var_type = "parameter"; 06942 break; 06943 default: 06944 /* should be no other container types */ 06945 assert(0); 06946 return; 06947 } 06948 06949 if (is_attr(arg->attrs, ATTR_LENGTHIS) && 06950 (is_attr(arg->attrs, ATTR_STRING) || is_aliaschain_attr(arg->type, ATTR_STRING))) 06951 error_loc_info(&arg->loc_info, 06952 "string and length_is specified for argument %s are mutually exclusive attributes\n", 06953 arg->name); 06954 06955 if (is_attr(arg->attrs, ATTR_SIZEIS)) 06956 { 06957 expr_list_t *size_is_exprs = get_attrp(arg->attrs, ATTR_SIZEIS); 06958 check_conformance_expr_list("size_is", arg, container_type, size_is_exprs); 06959 } 06960 if (is_attr(arg->attrs, ATTR_LENGTHIS)) 06961 { 06962 expr_list_t *length_is_exprs = get_attrp(arg->attrs, ATTR_LENGTHIS); 06963 check_conformance_expr_list("length_is", arg, container_type, length_is_exprs); 06964 } 06965 if (is_attr(arg->attrs, ATTR_IIDIS)) 06966 { 06967 struct expr_loc expr_loc; 06968 expr_t *expr = get_attrp(arg->attrs, ATTR_IIDIS); 06969 if (expr->type != EXPR_VOID) 06970 { 06971 const type_t *expr_type; 06972 expr_loc.v = arg; 06973 expr_loc.attr = "iid_is"; 06974 expr_type = expr_resolve_type(&expr_loc, container_type, expr); 06975 if (!expr_type || !is_ptr_guid_type(expr_type)) 06976 error_loc_info(&arg->loc_info, "expression must resolve to pointer to GUID type for attribute iid_is\n"); 06977 } 06978 } 06979 if (is_attr(arg->attrs, ATTR_SWITCHIS)) 06980 { 06981 struct expr_loc expr_loc; 06982 expr_t *expr = get_attrp(arg->attrs, ATTR_SWITCHIS); 06983 if (expr->type != EXPR_VOID) 06984 { 06985 const type_t *expr_type; 06986 expr_loc.v = arg; 06987 expr_loc.attr = "switch_is"; 06988 expr_type = expr_resolve_type(&expr_loc, container_type, expr); 06989 if (!expr_type || !is_allowed_conf_type(expr_type)) 06990 error_loc_info(&arg->loc_info, "expression must resolve to integral type <= 32bits for attribute %s\n", 06991 expr_loc.attr); 06992 } 06993 } 06994 06995 do 06996 { 06997 more_to_do = FALSE; 06998 06999 switch (typegen_detect_type(type, arg->attrs, TDT_IGNORE_STRINGS)) 07000 { 07001 case TGT_STRUCT: 07002 case TGT_UNION: 07003 check_remoting_fields(arg, type); 07004 break; 07005 case TGT_INVALID: 07006 { 07007 const char *reason = "is invalid"; 07008 switch (type_get_type(type)) 07009 { 07010 case TYPE_VOID: 07011 reason = "cannot derive from void *"; 07012 break; 07013 case TYPE_FUNCTION: 07014 reason = "cannot be a function pointer"; 07015 break; 07016 case TYPE_BITFIELD: 07017 reason = "cannot be a bit-field"; 07018 break; 07019 case TYPE_COCLASS: 07020 reason = "cannot be a class"; 07021 break; 07022 case TYPE_INTERFACE: 07023 reason = "cannot be a non-pointer to an interface"; 07024 break; 07025 case TYPE_MODULE: 07026 reason = "cannot be a module"; 07027 break; 07028 default: 07029 break; 07030 } 07031 error_loc_info(&arg->loc_info, "%s \'%s\' of %s \'%s\' %s\n", 07032 var_type, arg->name, container_type_name, container_name, reason); 07033 break; 07034 } 07035 case TGT_CTXT_HANDLE: 07036 case TGT_CTXT_HANDLE_POINTER: 07037 if (type_get_type(container_type) != TYPE_FUNCTION) 07038 error_loc_info(&arg->loc_info, 07039 "%s \'%s\' of %s \'%s\' cannot be a context handle\n", 07040 var_type, arg->name, container_type_name, 07041 container_name); 07042 break; 07043 case TGT_STRING: 07044 { 07045 const type_t *t = type; 07046 while (is_ptr(t)) 07047 t = type_pointer_get_ref(t); 07048 if (is_aliaschain_attr(t, ATTR_RANGE)) 07049 warning_loc_info(&arg->loc_info, "%s: range not verified for a string of ranged types\n", arg->name); 07050 break; 07051 } 07052 case TGT_POINTER: 07053 type = type_pointer_get_ref(type); 07054 more_to_do = TRUE; 07055 break; 07056 case TGT_ARRAY: 07057 type = type_array_get_element(type); 07058 more_to_do = TRUE; 07059 break; 07060 case TGT_USER_TYPE: 07061 case TGT_IFACE_POINTER: 07062 case TGT_BASIC: 07063 case TGT_ENUM: 07064 case TGT_RANGE: 07065 /* nothing to do */ 07066 break; 07067 } 07068 } while (more_to_do); 07069 } 07070 07071 static void check_remoting_fields(const var_t *var, type_t *type) 07072 { 07073 const var_t *field; 07074 const var_list_t *fields = NULL; 07075 07076 type = type_get_real_type(type); 07077 07078 if (type->checked) 07079 return; 07080 07081 type->checked = TRUE; 07082 07083 if (type_get_type(type) == TYPE_STRUCT) 07084 { 07085 if (type_is_complete(type)) 07086 fields = type_struct_get_fields(type); 07087 else 07088 error_loc_info(&var->loc_info, "undefined type declaration %s\n", type->name); 07089 } 07090 else if (type_get_type(type) == TYPE_UNION || type_get_type(type) == TYPE_ENCAPSULATED_UNION) 07091 fields = type_union_get_cases(type); 07092 07093 if (fields) LIST_FOR_EACH_ENTRY( field, fields, const var_t, entry ) 07094 if (field->type) check_field_common(type, type->name, field); 07095 } 07096 07097 /* checks that arguments for a function make sense for marshalling and unmarshalling */ 07098 static void check_remoting_args(const var_t *func) 07099 { 07100 const char *funcname = func->name; 07101 const var_t *arg; 07102 07103 if (func->type->details.function->args) LIST_FOR_EACH_ENTRY( arg, func->type->details.function->args, const var_t, entry ) 07104 { 07105 const type_t *type = arg->type; 07106 07107 /* check that [out] parameters have enough pointer levels */ 07108 if (is_attr(arg->attrs, ATTR_OUT)) 07109 { 07110 switch (typegen_detect_type(type, arg->attrs, TDT_ALL_TYPES)) 07111 { 07112 case TGT_BASIC: 07113 case TGT_ENUM: 07114 case TGT_RANGE: 07115 case TGT_STRUCT: 07116 case TGT_UNION: 07117 case TGT_CTXT_HANDLE: 07118 case TGT_USER_TYPE: 07119 error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' is not a pointer\n", arg->name, funcname); 07120 break; 07121 case TGT_IFACE_POINTER: 07122 error_loc_info(&arg->loc_info, "out interface pointer \'%s\' of function \'%s\' is not a double pointer\n", arg->name, funcname); 07123 break; 07124 case TGT_STRING: 07125 if (is_array(type)) 07126 { 07127 /* needs conformance or fixed dimension */ 07128 if (type_array_has_conformance(type) && 07129 type_array_get_conformance(type)->type != EXPR_VOID) break; 07130 if (!type_array_has_conformance(type) && type_array_get_dim(type)) break; 07131 } 07132 if (is_attr( arg->attrs, ATTR_IN )) break; 07133 error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' cannot be an unsized string\n", arg->name, funcname); 07134 break; 07135 case TGT_INVALID: 07136 /* already error'd before we get here */ 07137 case TGT_CTXT_HANDLE_POINTER: 07138 case TGT_POINTER: 07139 case TGT_ARRAY: 07140 /* OK */ 07141 break; 07142 } 07143 } 07144 07145 check_field_common(func->type, funcname, arg); 07146 } 07147 07148 if (type_get_type(type_function_get_rettype(func->type)) != TYPE_VOID) 07149 { 07150 var_t var; 07151 var = *func; 07152 var.type = type_function_get_rettype(func->type); 07153 var.name = xstrdup("return value"); 07154 check_field_common(func->type, funcname, &var); 07155 free(var.name); 07156 } 07157 } 07158 07159 static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func) 07160 { 07161 unsigned char explicit_fc, implicit_fc; 07162 07163 /* check for a defined binding handle */ 07164 if (!get_func_handle_var( iface, func, &explicit_fc, &implicit_fc ) || !explicit_fc) 07165 { 07166 /* no explicit handle specified so add 07167 * "[in] handle_t IDL_handle" as the first parameter to the 07168 * function */ 07169 var_t *idl_handle = make_var(xstrdup("IDL_handle")); 07170 idl_handle->attrs = append_attr(NULL, make_attr(ATTR_IN)); 07171 idl_handle->type = find_type_or_error("handle_t", 0); 07172 type_function_add_head_arg(func->type, idl_handle); 07173 } 07174 } 07175 07176 static void check_functions(const type_t *iface, int is_inside_library) 07177 { 07178 const statement_t *stmt; 07179 if (is_attr(iface->attrs, ATTR_EXPLICIT_HANDLE)) 07180 { 07181 STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) 07182 { 07183 var_t *func = stmt->u.var; 07184 add_explicit_handle_if_necessary(iface, func); 07185 } 07186 } 07187 if (!is_inside_library && !is_attr(iface->attrs, ATTR_LOCAL)) 07188 { 07189 STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) 07190 { 07191 const var_t *func = stmt->u.var; 07192 if (!is_attr(func->attrs, ATTR_LOCAL)) 07193 check_remoting_args(func); 07194 } 07195 } 07196 } 07197 07198 static void check_statements(const statement_list_t *stmts, int is_inside_library) 07199 { 07200 const statement_t *stmt; 07201 07202 if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) 07203 { 07204 if (stmt->type == STMT_LIBRARY) 07205 check_statements(stmt->u.lib->stmts, TRUE); 07206 else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE) 07207 check_functions(stmt->u.type, is_inside_library); 07208 } 07209 } 07210 07211 static void check_all_user_types(const statement_list_t *stmts) 07212 { 07213 const statement_t *stmt; 07214 07215 if (stmts) LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry) 07216 { 07217 if (stmt->type == STMT_LIBRARY) 07218 check_all_user_types(stmt->u.lib->stmts); 07219 else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE && 07220 !is_local(stmt->u.type->attrs)) 07221 { 07222 const statement_t *stmt_func; 07223 STATEMENTS_FOR_EACH_FUNC(stmt_func, type_iface_get_stmts(stmt->u.type)) { 07224 const var_t *func = stmt_func->u.var; 07225 check_for_additional_prototype_types(func->type->details.function->args); 07226 } 07227 } 07228 } 07229 } 07230 07231 int is_valid_uuid(const char *s) 07232 { 07233 int i; 07234 07235 for (i = 0; i < 36; ++i) 07236 if (i == 8 || i == 13 || i == 18 || i == 23) 07237 { 07238 if (s[i] != '-') 07239 return FALSE; 07240 } 07241 else 07242 if (!isxdigit(s[i])) 07243 return FALSE; 07244 07245 return s[i] == '\0'; 07246 } 07247 07248 static statement_t *make_statement(enum statement_type type) 07249 { 07250 statement_t *stmt = xmalloc(sizeof(*stmt)); 07251 stmt->type = type; 07252 return stmt; 07253 } 07254 07255 static statement_t *make_statement_type_decl(type_t *type) 07256 { 07257 statement_t *stmt = make_statement(STMT_TYPE); 07258 stmt->u.type = type; 07259 return stmt; 07260 } 07261 07262 static statement_t *make_statement_reference(type_t *type) 07263 { 07264 statement_t *stmt = make_statement(STMT_TYPEREF); 07265 stmt->u.type = type; 07266 return stmt; 07267 } 07268 07269 static statement_t *make_statement_declaration(var_t *var) 07270 { 07271 statement_t *stmt = make_statement(STMT_DECLARATION); 07272 stmt->u.var = var; 07273 if (var->stgclass == STG_EXTERN && var->eval) 07274 warning("'%s' initialised and declared extern\n", var->name); 07275 if (is_const_decl(var)) 07276 { 07277 if (var->eval) 07278 reg_const(var); 07279 } 07280 else if (type_get_type(var->type) == TYPE_FUNCTION) 07281 check_function_attrs(var->name, var->attrs); 07282 else if (var->stgclass == STG_NONE || var->stgclass == STG_REGISTER) 07283 error_loc("instantiation of data is illegal\n"); 07284 return stmt; 07285 } 07286 07287 static statement_t *make_statement_library(typelib_t *typelib) 07288 { 07289 statement_t *stmt = make_statement(STMT_LIBRARY); 07290 stmt->u.lib = typelib; 07291 return stmt; 07292 } 07293 07294 static statement_t *make_statement_cppquote(const char *str) 07295 { 07296 statement_t *stmt = make_statement(STMT_CPPQUOTE); 07297 stmt->u.str = str; 07298 return stmt; 07299 } 07300 07301 static statement_t *make_statement_importlib(const char *str) 07302 { 07303 statement_t *stmt = make_statement(STMT_IMPORTLIB); 07304 stmt->u.str = str; 07305 return stmt; 07306 } 07307 07308 static statement_t *make_statement_import(const char *str) 07309 { 07310 statement_t *stmt = make_statement(STMT_IMPORT); 07311 stmt->u.str = str; 07312 return stmt; 07313 } 07314 07315 static statement_t *make_statement_module(type_t *type) 07316 { 07317 statement_t *stmt = make_statement(STMT_MODULE); 07318 stmt->u.type = type; 07319 return stmt; 07320 } 07321 07322 static statement_t *make_statement_typedef(declarator_list_t *decls) 07323 { 07324 declarator_t *decl, *next; 07325 statement_t *stmt; 07326 type_list_t **type_list; 07327 07328 if (!decls) return NULL; 07329 07330 stmt = make_statement(STMT_TYPEDEF); 07331 stmt->u.type_list = NULL; 07332 type_list = &stmt->u.type_list; 07333 07334 LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) 07335 { 07336 var_t *var = decl->var; 07337 type_t *type = find_type_or_error(var->name, 0); 07338 *type_list = xmalloc(sizeof(type_list_t)); 07339 (*type_list)->type = type; 07340 (*type_list)->next = NULL; 07341 07342 type_list = &(*type_list)->next; 07343 free(decl); 07344 free(var); 07345 } 07346 07347 return stmt; 07348 } 07349 07350 static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt) 07351 { 07352 if (!stmt) return list; 07353 if (!list) 07354 { 07355 list = xmalloc( sizeof(*list) ); 07356 list_init( list ); 07357 } 07358 list_add_tail( list, &stmt->entry ); 07359 return list; 07360 } 07361 07362 void init_loc_info(loc_info_t *i) 07363 { 07364 i->input_name = input_name ? input_name : "stdin"; 07365 i->line_number = line_number; 07366 i->near_text = parser_text; 07367 } 07368 07369 static void check_def(const type_t *t) 07370 { 07371 if (t->defined) 07372 error_loc("%s: redefinition error; original definition was at %s:%d\n", 07373 t->name, t->loc_info.input_name, t->loc_info.line_number); 07374 } 07375 Generated on Sat May 26 2012 04:22:55 for ReactOS by
1.7.6.1
|