diff --git a/reactos/dll/win32/msi/action.c b/reactos/dll/win32/msi/action.c index b88d2d03e05..dc04a7d64f9 100644 --- a/reactos/dll/win32/msi/action.c +++ b/reactos/dll/win32/msi/action.c @@ -1650,6 +1650,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level, { LPWSTR override; MSIFEATURE *feature; + BOOL remove = !strcmpW(property, szRemove); + BOOL reinstall = !strcmpW(property, szReinstall); override = msi_dup_property( package->db, property ); if (!override) @@ -1657,18 +1659,18 @@ static BOOL process_state_property(MSIPACKAGE* package, int level, LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry ) { - if (strcmpW( property, szRemove ) && !is_feature_selected( feature, level )) + if (feature->Level <= 0) continue; - if (!strcmpW(property, szReinstall)) state = feature->Installed; + if (reinstall) + state = (feature->Installed == INSTALLSTATE_ABSENT ? INSTALLSTATE_UNKNOWN : feature->Installed); + else if (remove) + state = (feature->Installed == INSTALLSTATE_ABSENT ? INSTALLSTATE_UNKNOWN : INSTALLSTATE_ABSENT); if (!strcmpiW( override, szAll )) { - if (feature->Installed != state) - { - feature->Action = state; - feature->ActionRequest = state; - } + feature->Action = state; + feature->ActionRequest = state; } else { @@ -1682,11 +1684,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level, if ((ptr2 && strlenW(feature->Feature) == len && !strncmpW(ptr, feature->Feature, len)) || (!ptr2 && !strcmpW(ptr, feature->Feature))) { - if (feature->Installed != state) - { - feature->Action = state; - feature->ActionRequest = state; - } + feature->Action = state; + feature->ActionRequest = state; break; } if (ptr2) @@ -1823,6 +1822,8 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) { FeatureList *fl; + if (!is_feature_selected( feature, level )) continue; + LIST_FOR_EACH_ENTRY( fl, &feature->Children, FeatureList, entry ) { if (fl->feature->Attributes & msidbFeatureAttributesFollowParent && @@ -1847,8 +1848,6 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package) debugstr_w(feature->Feature), feature->Level, feature->Installed, feature->ActionRequest, feature->Action); - if (!is_feature_selected( feature, level )) continue; - /* features with components that have compressed files are made local */ LIST_FOR_EACH_ENTRY( cl, &feature->Components, ComponentList, entry ) { @@ -2340,6 +2339,8 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package) static const WCHAR szPrimaryVolumeSpaceAvailable[] = {'P','r','i','m','a','r','y','V','o','l','u','m','e','S','p','a','c','e', 'A','v','a','i','l','a','b','l','e',0}; + static const WCHAR szOutOfNoRbDiskSpace[] = + {'O','u','t','O','f','N','o','R','b','D','i','s','k','S','p','a','c','e',0}; MSICOMPONENT *comp; MSIQUERY *view; WCHAR *level, *primary_key, *primary_folder; @@ -2416,6 +2417,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package) /* FIXME: check volume disk space */ msi_set_property( package->db, szOutOfDiskSpace, szZero, -1 ); + msi_set_property( package->db, szOutOfNoRbDiskSpace, szZero, -1 ); return MSI_SetFeatureStates(package); } @@ -3907,7 +3909,9 @@ static UINT ITERATE_CreateShortcuts(MSIRECORD *row, LPVOID param) else { FIXME("poorly handled shortcut format, advertised shortcut\n"); - IShellLinkW_SetPath(sl,comp->FullKeypath); + path = resolve_keypath( package, comp ); + IShellLinkW_SetPath( sl, path ); + msi_free( path ); } if (!MSI_RecordIsNull(row,6)) @@ -4876,6 +4880,8 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package) BOOL absent = FALSE; MSIRECORD *uirow; + if (feature->Level <= 0) continue; + if (feature->Action != INSTALLSTATE_LOCAL && feature->Action != INSTALLSTATE_SOURCE && feature->Action != INSTALLSTATE_ADVERTISED) absent = TRUE; @@ -7734,7 +7740,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, static const WCHAR szDisableRollback[] = {'D','I','S','A','B','L','E','R','O','L','L','B','A','C','K',0}; static const WCHAR szAction[] = {'A','C','T','I','O','N',0}; static const WCHAR szInstall[] = {'I','N','S','T','A','L','L',0}; - WCHAR *reinstall, *remove, *patch; + WCHAR *reinstall, *remove, *patch, *productcode; BOOL ui_exists; UINT rc; @@ -7803,6 +7809,15 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath, msi_adjust_privilege_properties( package ); msi_set_context( package ); + productcode = msi_dup_property( package->db, szProductCode ); + if (strcmpiW( productcode, package->ProductCode )) + { + TRACE( "product code changed %s -> %s\n", debugstr_w(package->ProductCode), debugstr_w(productcode) ); + msi_free( package->ProductCode ); + package->ProductCode = productcode; + } + else msi_free( productcode ); + if (msi_get_property_int( package->db, szDisableRollback, 0 )) { TRACE("disabling rollback\n"); diff --git a/reactos/dll/win32/msi/appsearch.c b/reactos/dll/win32/msi/appsearch.c index a204397a404..b38bf2781f9 100644 --- a/reactos/dll/win32/msi/appsearch.c +++ b/reactos/dll/win32/msi/appsearch.c @@ -438,6 +438,19 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNAT if (sz == 0) goto end; + /* expand if needed */ + if (regType == REG_EXPAND_SZ) + { + sz = ExpandEnvironmentStringsW((LPCWSTR)value, NULL, 0); + if (sz) + { + LPWSTR buf = msi_alloc(sz * sizeof(WCHAR)); + ExpandEnvironmentStringsW((LPCWSTR)value, buf, sz); + msi_free(value); + value = (LPBYTE)buf; + } + } + if ((regType == REG_SZ || regType == REG_EXPAND_SZ) && (ptr = strchrW((LPWSTR)value, '"')) && (end = strchrW(++ptr, '"'))) *end = '\0'; diff --git a/reactos/dll/win32/msi/classes.c b/reactos/dll/win32/msi/classes.c index 513f6c91827..4636eba3ea0 100644 --- a/reactos/dll/win32/msi/classes.c +++ b/reactos/dll/win32/msi/classes.c @@ -1443,14 +1443,14 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package) LIST_FOR_EACH_ENTRY( mt, &package->mimes, MSIMIME, entry ) { - LPWSTR extension, key; + LPWSTR extension = NULL, key; /* * check if the MIME is to be installed. Either as requested by an * extension or Class */ if ((!mt->Class || mt->Class->action != INSTALLSTATE_LOCAL) && - mt->Extension->action != INSTALLSTATE_LOCAL) + (!mt->Extension || mt->Extension->action != INSTALLSTATE_LOCAL)) { TRACE("MIME %s not scheduled to be installed\n", debugstr_w(mt->ContentType)); continue; @@ -1458,7 +1458,7 @@ UINT ACTION_RegisterMIMEInfo(MSIPACKAGE *package) TRACE("Registering MIME type %s\n", debugstr_w(mt->ContentType)); - extension = msi_alloc( (strlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) ); + if (mt->Extension) extension = msi_alloc( (strlenW( mt->Extension->Extension ) + 2) * sizeof(WCHAR) ); key = msi_alloc( (strlenW( mt->ContentType ) + strlenW( szMIMEDatabase ) + 1) * sizeof(WCHAR) ); if (extension && key) @@ -1501,7 +1501,7 @@ UINT ACTION_UnregisterMIMEInfo( MSIPACKAGE *package ) LPWSTR mime_key; if ((!mime->Class || mime->Class->action != INSTALLSTATE_ABSENT) && - mime->Extension->action != INSTALLSTATE_ABSENT) + (!mime->Extension || mime->Extension->action != INSTALLSTATE_ABSENT)) { TRACE("MIME %s not scheduled to be removed\n", debugstr_w(mime->ContentType)); continue; diff --git a/reactos/dll/win32/msi/cond.tab.c b/reactos/dll/win32/msi/cond.tab.c index 4f69ace03fd..61ca113369e 100644 --- a/reactos/dll/win32/msi/cond.tab.c +++ b/reactos/dll/win32/msi/cond.tab.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,23 +58,17 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse cond_parse #define yylex cond_lex #define yyerror cond_error -#define yylval cond_lval -#define yychar cond_char #define yydebug cond_debug #define yynerrs cond_nerrs /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "cond.y" +#line 1 "cond.y" /* yacc.c:339 */ /* @@ -162,14 +156,15 @@ static BOOL num_from_prop( LPCWSTR p, INT *val ) } +#line 180 "cond.tab.c" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 188 "cond.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -179,88 +174,87 @@ static BOOL num_from_prop( LPCWSTR p, INT *val ) # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 + +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int cond_debug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - COND_SPACE = 258, - COND_EOF = 259, - COND_OR = 260, - COND_AND = 261, - COND_NOT = 262, - COND_XOR = 263, - COND_IMP = 264, - COND_EQV = 265, - COND_LT = 266, - COND_GT = 267, - COND_EQ = 268, - COND_NE = 269, - COND_GE = 270, - COND_LE = 271, - COND_ILT = 272, - COND_IGT = 273, - COND_IEQ = 274, - COND_INE = 275, - COND_IGE = 276, - COND_ILE = 277, - COND_LPAR = 278, - COND_RPAR = 279, - COND_TILDA = 280, - COND_SS = 281, - COND_ISS = 282, - COND_ILHS = 283, - COND_IRHS = 284, - COND_LHS = 285, - COND_RHS = 286, - COND_PERCENT = 287, - COND_DOLLARS = 288, - COND_QUESTION = 289, - COND_AMPER = 290, - COND_EXCLAM = 291, - COND_IDENT = 292, - COND_NUMBER = 293, - COND_LITER = 294, - COND_ERROR = 295 - }; + enum yytokentype + { + COND_SPACE = 258, + COND_EOF = 259, + COND_OR = 260, + COND_AND = 261, + COND_NOT = 262, + COND_XOR = 263, + COND_IMP = 264, + COND_EQV = 265, + COND_LT = 266, + COND_GT = 267, + COND_EQ = 268, + COND_NE = 269, + COND_GE = 270, + COND_LE = 271, + COND_ILT = 272, + COND_IGT = 273, + COND_IEQ = 274, + COND_INE = 275, + COND_IGE = 276, + COND_ILE = 277, + COND_LPAR = 278, + COND_RPAR = 279, + COND_TILDA = 280, + COND_SS = 281, + COND_ISS = 282, + COND_ILHS = 283, + COND_IRHS = 284, + COND_LHS = 285, + COND_RHS = 286, + COND_PERCENT = 287, + COND_DOLLARS = 288, + COND_QUESTION = 289, + COND_AMPER = 290, + COND_EXCLAM = 291, + COND_IDENT = 292, + COND_NUMBER = 293, + COND_LITER = 294, + COND_ERROR = 295 + }; #endif - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 114 "cond.y" +#line 114 "cond.y" /* yacc.c:355 */ struct cond_str str; LPWSTR string; INT value; - - -/* Line 293 of yacc.c */ -#line 272 "cond.tab.c" -} YYSTYPE; +#line 264 "cond.tab.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + +int cond_parse (COND_input *info); + + + /* Copy the second part of user declarations. */ - -/* Line 343 of yacc.c */ -#line 284 "cond.tab.c" +#line 278 "cond.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -274,11 +268,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -298,8 +289,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -313,38 +303,67 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -363,9 +382,9 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -375,8 +394,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -392,7 +411,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -400,15 +419,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -418,7 +435,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -443,35 +460,35 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -487,17 +504,19 @@ union yyalloc #define YYNNTS 12 /* YYNRULES -- Number of rules. */ #define YYNRULES 53 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 70 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 295 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -533,39 +552,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 5, 6, 8, 12, 16, 20, 24, - 26, 30, 33, 35, 37, 41, 45, 49, 53, 57, - 61, 65, 69, 73, 77, 79, 81, 83, 85, 87, - 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, - 109, 111, 113, 115, 117, 119, 121, 124, 127, 130, - 133, 135, 138, 140 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 42, 0, -1, 43, -1, -1, 44, -1, 43, 5, - 44, -1, 43, 9, 44, -1, 43, 8, 44, -1, - 43, 10, 44, -1, 45, -1, 44, 6, 45, -1, - 7, 45, -1, 49, -1, 47, -1, 49, 46, 49, - -1, 50, 46, 49, -1, 49, 46, 50, -1, 50, - 46, 50, -1, 50, 46, 48, -1, 48, 46, 50, - -1, 48, 46, 48, -1, 48, 46, 49, -1, 49, - 46, 48, -1, 23, 43, 24, -1, 13, -1, 14, - -1, 11, -1, 12, -1, 16, -1, 15, -1, 26, - -1, 19, -1, 20, -1, 17, -1, 18, -1, 22, - -1, 21, -1, 27, -1, 30, -1, 31, -1, 28, - -1, 29, -1, 50, -1, 48, -1, 39, -1, 52, - -1, 33, 51, -1, 34, 51, -1, 35, 51, -1, - 36, 51, -1, 51, -1, 32, 51, -1, 37, -1, - 38, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 138, 138, 144, 151, 155, 159, 163, 167, 174, @@ -577,7 +564,7 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -591,13 +578,13 @@ static const char *const yytname[] = "COND_QUESTION", "COND_AMPER", "COND_EXCLAM", "COND_IDENT", "COND_NUMBER", "COND_LITER", "COND_ERROR", "$accept", "condition", "expression", "boolean_term", "boolean_factor", "operator", "value_s", - "literal", "value_i", "symbol_s", "identifier", "integer", 0 + "literal", "value_i", "symbol_s", "identifier", "integer", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -608,52 +595,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 41, 42, 42, 43, 43, 43, 43, 43, 44, - 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, - 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, - 46, 46, 47, 47, 48, 49, 49, 49, 49, 49, - 50, 50, 51, 52 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 0, 1, 3, 3, 3, 3, 1, - 3, 2, 1, 1, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, - 1, 2, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 3, 0, 0, 0, 0, 0, 0, 0, 52, 53, - 44, 0, 2, 4, 9, 13, 43, 12, 42, 50, - 45, 11, 0, 51, 46, 47, 48, 49, 1, 0, - 0, 0, 0, 0, 26, 27, 24, 25, 29, 28, - 33, 34, 31, 32, 36, 35, 30, 37, 40, 41, - 38, 39, 0, 0, 0, 23, 5, 7, 6, 8, - 10, 20, 21, 19, 22, 14, 16, 18, 15, 17 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 11, 12, 13, 14, 52, 15, 16, 17, 18, - 19, 20 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ #define YYPACT_NINF -15 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-15))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int8 yypact[] = { -7, -7, -7, -14, -14, -14, -14, -14, -15, -15, @@ -665,17 +618,37 @@ static const yytype_int8 yypact[] = -15, -15, -15, -15, -15, -15, -15, -15, -15, -15 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 3, 0, 0, 0, 0, 0, 0, 0, 52, 53, + 44, 0, 2, 4, 9, 13, 43, 12, 42, 50, + 45, 11, 0, 51, 46, 47, 48, 49, 1, 0, + 0, 0, 0, 0, 26, 27, 24, 25, 29, 28, + 33, 34, 31, 32, 36, 35, 30, 37, 40, 41, + 38, 39, 0, 0, 0, 23, 5, 7, 6, 8, + 10, 20, 21, 19, 22, 14, 16, 18, 15, 17 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -15, -15, 50, 33, 0, -3, -15, -4, 14, 17, 54, -15 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 11, 12, 13, 14, 52, 15, 16, 17, 18, + 19, 20 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 1, 21, 34, 35, 36, 37, 38, 39, 40, 41, @@ -688,12 +661,6 @@ static const yytype_uint8 yytable[] = 66, 69 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-15)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int8 yycheck[] = { 7, 1, 11, 12, 13, 14, 15, 16, 17, 18, @@ -706,8 +673,8 @@ static const yytype_int8 yycheck[] = 53, 54 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 7, 23, 32, 33, 34, 35, 36, 37, 38, @@ -719,94 +686,63 @@ static const yytype_uint8 yystos[] = 45, 48, 49, 50, 48, 49, 50, 48, 49, 50 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 41, 42, 42, 43, 43, 43, 43, 43, 44, + 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, + 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, + 46, 46, 47, 47, 48, 49, 49, 49, 49, 49, + 50, 50, 51, 52 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 0, 1, 3, 3, 3, 3, 1, + 3, 2, 1, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, + 1, 2, 1, 1 +}; -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (info, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* This macro is provided for backward compatibility. */ - -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, info) -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -816,56 +752,47 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, info); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, info); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, COND_input *info) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, info) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - COND_input *info; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (info); if (!yyvaluep) return; - YYUSE (info); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -873,23 +800,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, info) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, COND_input *info) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, info) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - COND_input *info; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, info); YYFPRINTF (yyoutput, ")"); @@ -900,16 +815,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, info) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -920,50 +827,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, COND_input *info) -#else -static void -yy_reduce_print (yyvsp, yyrule, info) - YYSTYPE *yyvsp; - int yyrule; - COND_input *info; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, COND_input *info) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , info); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , info); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, info); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, info); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -977,7 +876,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1000,15 +899,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1024,16 +916,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1063,27 +947,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1106,12 +990,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1119,10 +1002,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1171,11 +1050,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1195,10 +1076,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1235,83 +1118,39 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, COND_input *info) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, info) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - COND_input *info; -#endif { YYUSE (yyvaluep); YYUSE (info); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (COND_input *info); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (COND_input *info) -#else -int -yyparse (info) - COND_input *info; -#endif -#endif { /* The lookahead symbol. */ int yychar; + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -1321,10 +1160,10 @@ YYSTYPE yylval; int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1342,7 +1181,7 @@ YYSTYPE yylval; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1360,9 +1199,8 @@ YYSTYPE yylval; Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1371,14 +1209,6 @@ YYSTYPE yylval; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1399,23 +1229,23 @@ YYSTYPE yylval; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1423,22 +1253,22 @@ YYSTYPE yylval; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1447,10 +1277,10 @@ YYSTYPE yylval; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1479,7 +1309,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, info); } if (yychar <= YYEOF) @@ -1519,7 +1349,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1542,7 +1374,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1556,510 +1388,456 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1806 of yacc.c */ -#line 139 "cond.y" +#line 139 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; - cond->result = (yyvsp[(1) - (1)].value); + cond->result = (yyvsp[0].value); } +#line 1417 "cond.tab.c" /* yacc.c:1646 */ break; case 3: - -/* Line 1806 of yacc.c */ -#line 144 "cond.y" +#line 144 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; cond->result = MSICONDITION_NONE; } +#line 1426 "cond.tab.c" /* yacc.c:1646 */ break; case 4: - -/* Line 1806 of yacc.c */ -#line 152 "cond.y" +#line 152 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(1) - (1)].value); + (yyval.value) = (yyvsp[0].value); } +#line 1434 "cond.tab.c" /* yacc.c:1646 */ break; case 5: - -/* Line 1806 of yacc.c */ -#line 156 "cond.y" +#line 156 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value); + (yyval.value) = (yyvsp[-2].value) || (yyvsp[0].value); } +#line 1442 "cond.tab.c" /* yacc.c:1646 */ break; case 6: - -/* Line 1806 of yacc.c */ -#line 160 "cond.y" +#line 160 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = !(yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value); + (yyval.value) = !(yyvsp[-2].value) || (yyvsp[0].value); } +#line 1450 "cond.tab.c" /* yacc.c:1646 */ break; case 7: - -/* Line 1806 of yacc.c */ -#line 164 "cond.y" +#line 164 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = ( (yyvsp[(1) - (3)].value) || (yyvsp[(3) - (3)].value) ) && !( (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value) ); + (yyval.value) = ( (yyvsp[-2].value) || (yyvsp[0].value) ) && !( (yyvsp[-2].value) && (yyvsp[0].value) ); } +#line 1458 "cond.tab.c" /* yacc.c:1646 */ break; case 8: - -/* Line 1806 of yacc.c */ -#line 168 "cond.y" +#line 168 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = ( (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value) ) || ( !(yyvsp[(1) - (3)].value) && !(yyvsp[(3) - (3)].value) ); + (yyval.value) = ( (yyvsp[-2].value) && (yyvsp[0].value) ) || ( !(yyvsp[-2].value) && !(yyvsp[0].value) ); } +#line 1466 "cond.tab.c" /* yacc.c:1646 */ break; case 9: - -/* Line 1806 of yacc.c */ -#line 175 "cond.y" +#line 175 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(1) - (1)].value); + (yyval.value) = (yyvsp[0].value); } +#line 1474 "cond.tab.c" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 179 "cond.y" +#line 179 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(1) - (3)].value) && (yyvsp[(3) - (3)].value); + (yyval.value) = (yyvsp[-2].value) && (yyvsp[0].value); } +#line 1482 "cond.tab.c" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 186 "cond.y" +#line 186 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(2) - (2)].value) ? 0 : 1; + (yyval.value) = (yyvsp[0].value) ? 0 : 1; } +#line 1490 "cond.tab.c" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 190 "cond.y" +#line 190 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(1) - (1)].value) ? 1 : 0; + (yyval.value) = (yyvsp[0].value) ? 1 : 0; } +#line 1498 "cond.tab.c" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 194 "cond.y" +#line 194 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = ((yyvsp[(1) - (1)].string) && (yyvsp[(1) - (1)].string)[0]) ? 1 : 0; - cond_free( (yyvsp[(1) - (1)].string) ); + (yyval.value) = ((yyvsp[0].string) && (yyvsp[0].string)[0]) ? 1 : 0; + cond_free( (yyvsp[0].string) ); } +#line 1507 "cond.tab.c" /* yacc.c:1646 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 199 "cond.y" +#line 199 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = compare_int( (yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].value) ); + (yyval.value) = compare_int( (yyvsp[-2].value), (yyvsp[-1].value), (yyvsp[0].value) ); } +#line 1515 "cond.tab.c" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 203 "cond.y" +#line 203 "cond.y" /* yacc.c:1646 */ { int num; - if (num_from_prop( (yyvsp[(1) - (3)].string), &num )) - (yyval.value) = compare_int( num, (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].value) ); + if (num_from_prop( (yyvsp[-2].string), &num )) + (yyval.value) = compare_int( num, (yyvsp[-1].value), (yyvsp[0].value) ); else - (yyval.value) = ((yyvsp[(2) - (3)].value) == COND_NE || (yyvsp[(2) - (3)].value) == COND_INE ); - cond_free( (yyvsp[(1) - (3)].string) ); + (yyval.value) = ((yyvsp[-1].value) == COND_NE || (yyvsp[-1].value) == COND_INE ); + cond_free( (yyvsp[-2].string) ); } +#line 1528 "cond.tab.c" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 212 "cond.y" +#line 212 "cond.y" /* yacc.c:1646 */ { int num; - if (num_from_prop( (yyvsp[(3) - (3)].string), &num )) - (yyval.value) = compare_int( (yyvsp[(1) - (3)].value), (yyvsp[(2) - (3)].value), num ); + if (num_from_prop( (yyvsp[0].string), &num )) + (yyval.value) = compare_int( (yyvsp[-2].value), (yyvsp[-1].value), num ); else - (yyval.value) = ((yyvsp[(2) - (3)].value) == COND_NE || (yyvsp[(2) - (3)].value) == COND_INE ); - cond_free( (yyvsp[(3) - (3)].string) ); + (yyval.value) = ((yyvsp[-1].value) == COND_NE || (yyvsp[-1].value) == COND_INE ); + cond_free( (yyvsp[0].string) ); } +#line 1541 "cond.tab.c" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 221 "cond.y" +#line 221 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE ); + (yyval.value) = compare_and_free_strings( (yyvsp[-2].string), (yyvsp[-1].value), (yyvsp[0].string), TRUE ); } +#line 1549 "cond.tab.c" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 225 "cond.y" +#line 225 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE ); + (yyval.value) = compare_and_free_strings( (yyvsp[-2].string), (yyvsp[-1].value), (yyvsp[0].string), TRUE ); } +#line 1557 "cond.tab.c" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 229 "cond.y" +#line 229 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), TRUE ); + (yyval.value) = compare_and_free_strings( (yyvsp[-2].string), (yyvsp[-1].value), (yyvsp[0].string), TRUE ); } +#line 1565 "cond.tab.c" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 233 "cond.y" +#line 233 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = compare_and_free_strings( (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].value), (yyvsp[(3) - (3)].string), FALSE ); + (yyval.value) = compare_and_free_strings( (yyvsp[-2].string), (yyvsp[-1].value), (yyvsp[0].string), FALSE ); } +#line 1573 "cond.tab.c" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 237 "cond.y" +#line 237 "cond.y" /* yacc.c:1646 */ { (yyval.value) = 0; - cond_free( (yyvsp[(1) - (3)].string) ); + cond_free( (yyvsp[-2].string) ); } +#line 1582 "cond.tab.c" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 242 "cond.y" +#line 242 "cond.y" /* yacc.c:1646 */ { (yyval.value) = 0; - cond_free( (yyvsp[(3) - (3)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1591 "cond.tab.c" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 247 "cond.y" +#line 247 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(2) - (3)].value); + (yyval.value) = (yyvsp[-1].value); } +#line 1599 "cond.tab.c" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 254 "cond.y" +#line 254 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_EQ; } +#line 1605 "cond.tab.c" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 255 "cond.y" +#line 255 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_NE; } +#line 1611 "cond.tab.c" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 256 "cond.y" +#line 256 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_LT; } +#line 1617 "cond.tab.c" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 257 "cond.y" +#line 257 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_GT; } +#line 1623 "cond.tab.c" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 258 "cond.y" +#line 258 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_LE; } +#line 1629 "cond.tab.c" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 259 "cond.y" +#line 259 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_GE; } +#line 1635 "cond.tab.c" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 260 "cond.y" +#line 260 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_SS; } +#line 1641 "cond.tab.c" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 261 "cond.y" +#line 261 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_IEQ; } +#line 1647 "cond.tab.c" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 262 "cond.y" +#line 262 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_INE; } +#line 1653 "cond.tab.c" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 263 "cond.y" +#line 263 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_ILT; } +#line 1659 "cond.tab.c" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 264 "cond.y" +#line 264 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_IGT; } +#line 1665 "cond.tab.c" /* yacc.c:1646 */ break; case 35: - -/* Line 1806 of yacc.c */ -#line 265 "cond.y" +#line 265 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_ILE; } +#line 1671 "cond.tab.c" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 266 "cond.y" +#line 266 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_IGE; } +#line 1677 "cond.tab.c" /* yacc.c:1646 */ break; case 37: - -/* Line 1806 of yacc.c */ -#line 267 "cond.y" +#line 267 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_ISS; } +#line 1683 "cond.tab.c" /* yacc.c:1646 */ break; case 38: - -/* Line 1806 of yacc.c */ -#line 268 "cond.y" +#line 268 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_LHS; } +#line 1689 "cond.tab.c" /* yacc.c:1646 */ break; case 39: - -/* Line 1806 of yacc.c */ -#line 269 "cond.y" +#line 269 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_RHS; } +#line 1695 "cond.tab.c" /* yacc.c:1646 */ break; case 40: - -/* Line 1806 of yacc.c */ -#line 270 "cond.y" +#line 270 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_ILHS; } +#line 1701 "cond.tab.c" /* yacc.c:1646 */ break; case 41: - -/* Line 1806 of yacc.c */ -#line 271 "cond.y" +#line 271 "cond.y" /* yacc.c:1646 */ { (yyval.value) = COND_IRHS; } +#line 1707 "cond.tab.c" /* yacc.c:1646 */ break; case 42: - -/* Line 1806 of yacc.c */ -#line 276 "cond.y" +#line 276 "cond.y" /* yacc.c:1646 */ { - (yyval.string) = (yyvsp[(1) - (1)].string); + (yyval.string) = (yyvsp[0].string); } +#line 1715 "cond.tab.c" /* yacc.c:1646 */ break; case 43: - -/* Line 1806 of yacc.c */ -#line 280 "cond.y" +#line 280 "cond.y" /* yacc.c:1646 */ { - (yyval.string) = (yyvsp[(1) - (1)].string); + (yyval.string) = (yyvsp[0].string); } +#line 1723 "cond.tab.c" /* yacc.c:1646 */ break; case 44: - -/* Line 1806 of yacc.c */ -#line 287 "cond.y" +#line 287 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; - (yyval.string) = COND_GetLiteral( cond, &(yyvsp[(1) - (1)].str) ); + (yyval.string) = COND_GetLiteral( cond, &(yyvsp[0].str) ); if( !(yyval.string) ) YYABORT; } +#line 1734 "cond.tab.c" /* yacc.c:1646 */ break; case 45: - -/* Line 1806 of yacc.c */ -#line 297 "cond.y" +#line 297 "cond.y" /* yacc.c:1646 */ { - (yyval.value) = (yyvsp[(1) - (1)].value); + (yyval.value) = (yyvsp[0].value); } +#line 1742 "cond.tab.c" /* yacc.c:1646 */ break; case 46: - -/* Line 1806 of yacc.c */ -#line 301 "cond.y" +#line 301 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; - MSI_GetComponentStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); + MSI_GetComponentStateW(cond->package, (yyvsp[0].string), &install, &action ); (yyval.value) = action; - cond_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1755 "cond.tab.c" /* yacc.c:1646 */ break; case 47: - -/* Line 1806 of yacc.c */ -#line 310 "cond.y" +#line 310 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; - MSI_GetComponentStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); + MSI_GetComponentStateW(cond->package, (yyvsp[0].string), &install, &action ); (yyval.value) = install; - cond_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1768 "cond.tab.c" /* yacc.c:1646 */ break; case 48: - -/* Line 1806 of yacc.c */ -#line 319 "cond.y" +#line 319 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; - MSI_GetFeatureStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); + MSI_GetFeatureStateW(cond->package, (yyvsp[0].string), &install, &action ); if (action == INSTALLSTATE_UNKNOWN) (yyval.value) = MSICONDITION_FALSE; else (yyval.value) = action; - cond_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1785 "cond.tab.c" /* yacc.c:1646 */ break; case 49: - -/* Line 1806 of yacc.c */ -#line 332 "cond.y" +#line 332 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN; - MSI_GetFeatureStateW(cond->package, (yyvsp[(2) - (2)].string), &install, &action ); + MSI_GetFeatureStateW(cond->package, (yyvsp[0].string), &install, &action ); (yyval.value) = install; - cond_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1798 "cond.tab.c" /* yacc.c:1646 */ break; case 50: - -/* Line 1806 of yacc.c */ -#line 344 "cond.y" +#line 344 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; UINT len; - (yyval.string) = msi_dup_property( cond->package->db, (yyvsp[(1) - (1)].string) ); + (yyval.string) = msi_dup_property( cond->package->db, (yyvsp[0].string) ); if ((yyval.string)) { len = (lstrlenW((yyval.string)) + 1) * sizeof (WCHAR); (yyval.string) = cond_track_mem( cond, (yyval.string), len ); } - cond_free( (yyvsp[(1) - (1)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1815 "cond.tab.c" /* yacc.c:1646 */ break; case 51: - -/* Line 1806 of yacc.c */ -#line 357 "cond.y" +#line 357 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; - UINT len = GetEnvironmentVariableW( (yyvsp[(2) - (2)].string), NULL, 0 ); + UINT len = GetEnvironmentVariableW( (yyvsp[0].string), NULL, 0 ); (yyval.string) = NULL; if (len++) { (yyval.string) = cond_alloc( cond, len*sizeof (WCHAR) ); if( !(yyval.string) ) YYABORT; - GetEnvironmentVariableW( (yyvsp[(2) - (2)].string), (yyval.string), len ); + GetEnvironmentVariableW( (yyvsp[0].string), (yyval.string), len ); } - cond_free( (yyvsp[(2) - (2)].string) ); + cond_free( (yyvsp[0].string) ); } +#line 1833 "cond.tab.c" /* yacc.c:1646 */ break; case 52: - -/* Line 1806 of yacc.c */ -#line 374 "cond.y" +#line 374 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; - (yyval.string) = COND_GetString( cond, &(yyvsp[(1) - (1)].str) ); + (yyval.string) = COND_GetString( cond, &(yyvsp[0].str) ); if( !(yyval.string) ) YYABORT; } +#line 1844 "cond.tab.c" /* yacc.c:1646 */ break; case 53: - -/* Line 1806 of yacc.c */ -#line 384 "cond.y" +#line 384 "cond.y" /* yacc.c:1646 */ { COND_input* cond = (COND_input*) info; - LPWSTR szNum = COND_GetString( cond, &(yyvsp[(1) - (1)].str) ); + LPWSTR szNum = COND_GetString( cond, &(yyvsp[0].str) ); if( !szNum ) YYABORT; (yyval.value) = atoiW( szNum ); cond_free( szNum ); } +#line 1857 "cond.tab.c" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 2083 "cond.tab.c" +#line 1861 "cond.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2081,7 +1859,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2096,9 +1874,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2149,20 +1927,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, info); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, info); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2181,7 +1959,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2194,35 +1972,37 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, info); + yystos[yystate], yyvsp, info); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2246,7 +2026,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2265,14 +2045,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, info); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, info); + yystos[*yyssp], yyvsp, info); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2283,14 +2063,9 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 394 "cond.y" +#line 394 "cond.y" /* yacc.c:1906 */ @@ -2794,4 +2569,3 @@ MSICONDITION WINAPI MsiEvaluateConditionA( MSIHANDLE hInstall, LPCSTR szConditio msi_free( szwCond ); return r; } - diff --git a/reactos/dll/win32/msi/files.c b/reactos/dll/win32/msi/files.c index fda9ee3f569..943bc7b9131 100644 --- a/reactos/dll/win32/msi/files.c +++ b/reactos/dll/win32/msi/files.c @@ -830,7 +830,13 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param ) { if (!wildcards) { - destname = strdupW(sourcename); + WCHAR *p; + if (sourcename) + destname = strdupW(sourcename); + else if ((p = strrchrW(sourcedir, '\\'))) + destname = strdupW(p + 1); + else + destname = strdupW(sourcedir); if (!destname) goto done; } diff --git a/reactos/dll/win32/msi/msi.c b/reactos/dll/win32/msi/msi.c index 00ef89f3f1a..6bf53288d82 100644 --- a/reactos/dll/win32/msi/msi.c +++ b/reactos/dll/win32/msi/msi.c @@ -2841,7 +2841,9 @@ static INSTALLSTATE MSI_GetComponentPath(LPCWSTR szProduct, LPCWSTR szComponent, if (state == INSTALLSTATE_LOCAL && !*path) state = INSTALLSTATE_NOTUSED; - msi_strcpy_to_awstring(path, -1, lpPathBuf, pcchBuf); + if (msi_strcpy_to_awstring(path, -1, lpPathBuf, pcchBuf) == ERROR_MORE_DATA) + state = INSTALLSTATE_MOREDATA; + msi_free(path); return state; } @@ -3355,6 +3357,7 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent, HKEY hkey; DWORD sz; UINT rc; + INSTALLSTATE state; rc = MSIREG_OpenUserComponentsKey(szComponent, &hkey, FALSE); if (rc != ERROR_SUCCESS) @@ -3369,13 +3372,16 @@ static UINT MSI_ProvideQualifiedComponentEx(LPCWSTR szComponent, MsiDecomposeDescriptorW(info, product, feature, component, &sz); if (!szProduct) - rc = MSI_GetComponentPath(product, component, lpPathBuf, pcchPathBuf); + state = MSI_GetComponentPath(product, component, lpPathBuf, pcchPathBuf); else - rc = MSI_GetComponentPath(szProduct, component, lpPathBuf, pcchPathBuf); + state = MSI_GetComponentPath(szProduct, component, lpPathBuf, pcchPathBuf); msi_free( info ); - if (rc != INSTALLSTATE_LOCAL) + if (state == INSTALLSTATE_MOREDATA) + return ERROR_MORE_DATA; + + if (state != INSTALLSTATE_LOCAL) return ERROR_FILE_NOT_FOUND; return ERROR_SUCCESS; diff --git a/reactos/dll/win32/msi/package.c b/reactos/dll/win32/msi/package.c index a63bd427ad0..09f8c5c4f62 100644 --- a/reactos/dll/win32/msi/package.c +++ b/reactos/dll/win32/msi/package.c @@ -1156,7 +1156,6 @@ MSIPACKAGE *MSI_CreatePackage( MSIDATABASE *db, LPCWSTR base_url ) package->ProductCode = msi_dup_property( package->db, szProductCode ); package->script = msi_alloc_zero( sizeof(MSISCRIPT) ); - set_installed_prop( package ); set_installer_properties( package ); package->ui_level = gUILevel; @@ -1631,6 +1630,7 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, MSIPACKAGE **pPackage) return r; } msi_set_property( package->db, szDatabase, db->path, -1 ); + set_installed_prop( package ); msi_set_context( package ); while (1) diff --git a/reactos/dll/win32/msi/patch.c b/reactos/dll/win32/msi/patch.c index 24fa3a9b5f9..81b9e3499e4 100644 --- a/reactos/dll/win32/msi/patch.c +++ b/reactos/dll/win32/msi/patch.c @@ -37,54 +37,57 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid ) static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *transform ) { - WCHAR *package_product, *transform_product, *template = NULL; - UINT ret = ERROR_FUNCTION_FAILED; + MSISUMMARYINFO *si = MSI_GetSummaryInformationW( transform, 0 ); + UINT valid_flags = 0, wanted_flags = 0; - package_product = msi_dup_property( package->db, szProductCode ); - transform_product = msi_get_suminfo_product( transform ); + if (si) wanted_flags = msi_suminfo_get_int32( si, PID_CHARCOUNT ); + TRACE("validation flags %x\n", wanted_flags); - TRACE("package = %s transform = %s\n", debugstr_w(package_product), debugstr_w(transform_product)); + if (wanted_flags & ~(MSITRANSFORM_VALIDATE_PRODUCT|MSITRANSFORM_VALIDATE_LANGUAGE)) + FIXME("unsupported validation flags %x\n", wanted_flags); - if (!transform_product || strstrW( transform_product, package_product )) + if (wanted_flags & MSITRANSFORM_VALIDATE_PRODUCT) { - MSISUMMARYINFO *si; + WCHAR *package_product = msi_dup_property( package->db, szProductCode ); + WCHAR *transform_product = msi_get_suminfo_product( transform ); + + TRACE("package = %s transform = %s\n", debugstr_w(package_product), debugstr_w(transform_product)); + + if (!transform_product || strstrW( transform_product, package_product )) + { + valid_flags |= MSITRANSFORM_VALIDATE_PRODUCT; + } + msi_free( transform_product ); + msi_free( package_product ); + } + if (wanted_flags & MSITRANSFORM_VALIDATE_LANGUAGE) + { + WCHAR *template; const WCHAR *p; - si = MSI_GetSummaryInformationW( transform, 0 ); if (!si) { ERR("no summary information!\n"); goto end; } - template = msi_suminfo_dup_string( si, PID_TEMPLATE ); - if (!template) + if (!(template = msi_suminfo_dup_string( si, PID_TEMPLATE ))) { ERR("no template property!\n"); - msiobj_release( &si->hdr ); - goto end; - } - if (!template[0]) - { - ret = ERROR_SUCCESS; - msiobj_release( &si->hdr ); goto end; } TRACE("template: %s\n", debugstr_w(template)); - p = strchrW( template, ';' ); - if (p && match_language( package, atoiW( p + 1 ) )) + if (!template[0] || ((p = strchrW( template, ';' )) && match_language( package, atoiW( p + 1 ) ))) { - TRACE("applicable transform\n"); - ret = ERROR_SUCCESS; + valid_flags |= MSITRANSFORM_VALIDATE_LANGUAGE; } - /* FIXME: check platform */ - msiobj_release( &si->hdr ); + msi_free( template ); } end: - msi_free( transform_product ); - msi_free( package_product ); - msi_free( template ); - return ret; + msiobj_release( &si->hdr ); + if (valid_flags & ~wanted_flags) return ERROR_FUNCTION_FAILED; + TRACE("applicable transform\n"); + return ERROR_SUCCESS; } static UINT apply_substorage_transform( MSIPACKAGE *package, MSIDATABASE *patch_db, LPCWSTR name ) diff --git a/reactos/dll/win32/msi/sql.tab.c b/reactos/dll/win32/msi/sql.tab.c index a60ec09328a..f4cfd6bbef2 100644 --- a/reactos/dll/win32/msi/sql.tab.c +++ b/reactos/dll/win32/msi/sql.tab.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.5" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -58,23 +58,17 @@ /* Pull parsers. */ #define YYPULL 1 -/* Using locations. */ -#define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse sql_parse #define yylex sql_lex #define yyerror sql_error -#define yylval sql_lval -#define yychar sql_char #define yydebug sql_debug #define yynerrs sql_nerrs /* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "sql.y" +#line 1 "sql.y" /* yacc.c:339 */ /* @@ -124,14 +118,15 @@ static struct expr * EXPR_wildcard( void *info ); result = current_view +#line 134 "sql.tab.c" /* yacc.c:339 */ -/* Line 268 of yacc.c */ -#line 142 "sql.tab.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE @@ -141,90 +136,93 @@ static struct expr * EXPR_wildcard( void *info ); # define YYERROR_VERBOSE 0 #endif -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 +/* In a future release of Bison, this section will be replaced + by #include "sql.tab.h". */ +#ifndef YY_SQL_SQL_TAB_H_INCLUDED +# define YY_SQL_SQL_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int sql_debug; #endif - -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TK_ALTER = 258, - TK_AND = 259, - TK_BY = 260, - TK_CHAR = 261, - TK_COMMA = 262, - TK_CREATE = 263, - TK_DELETE = 264, - TK_DROP = 265, - TK_DISTINCT = 266, - TK_DOT = 267, - TK_EQ = 268, - TK_FREE = 269, - TK_FROM = 270, - TK_GE = 271, - TK_GT = 272, - TK_HOLD = 273, - TK_ADD = 274, - TK_ID = 275, - TK_ILLEGAL = 276, - TK_INSERT = 277, - TK_INT = 278, - TK_INTEGER = 279, - TK_INTO = 280, - TK_IS = 281, - TK_KEY = 282, - TK_LE = 283, - TK_LONG = 284, - TK_LONGCHAR = 285, - TK_LP = 286, - TK_LT = 287, - TK_LOCALIZABLE = 288, - TK_MINUS = 289, - TK_NE = 290, - TK_NOT = 291, - TK_NULL = 292, - TK_OBJECT = 293, - TK_OR = 294, - TK_ORDER = 295, - TK_PRIMARY = 296, - TK_RP = 297, - TK_SELECT = 298, - TK_SET = 299, - TK_SHORT = 300, - TK_SPACE = 301, - TK_STAR = 302, - TK_STRING = 303, - TK_TABLE = 304, - TK_TEMPORARY = 305, - TK_UPDATE = 306, - TK_VALUES = 307, - TK_WHERE = 308, - TK_WILDCARD = 309, - COLUMN = 311, - FUNCTION = 312, - COMMENT = 313, - UNCLOSED_STRING = 314, - SPACE = 315, - ILLEGAL = 316, - END_OF_FILE = 317, - TK_LIKE = 318, - TK_NEGATION = 319 - }; + enum yytokentype + { + TK_ALTER = 258, + TK_AND = 259, + TK_BY = 260, + TK_CHAR = 261, + TK_COMMA = 262, + TK_CREATE = 263, + TK_DELETE = 264, + TK_DROP = 265, + TK_DISTINCT = 266, + TK_DOT = 267, + TK_EQ = 268, + TK_FREE = 269, + TK_FROM = 270, + TK_GE = 271, + TK_GT = 272, + TK_HOLD = 273, + TK_ADD = 274, + TK_ID = 275, + TK_ILLEGAL = 276, + TK_INSERT = 277, + TK_INT = 278, + TK_INTEGER = 279, + TK_INTO = 280, + TK_IS = 281, + TK_KEY = 282, + TK_LE = 283, + TK_LONG = 284, + TK_LONGCHAR = 285, + TK_LP = 286, + TK_LT = 287, + TK_LOCALIZABLE = 288, + TK_MINUS = 289, + TK_NE = 290, + TK_NOT = 291, + TK_NULL = 292, + TK_OBJECT = 293, + TK_OR = 294, + TK_ORDER = 295, + TK_PRIMARY = 296, + TK_RP = 297, + TK_SELECT = 298, + TK_SET = 299, + TK_SHORT = 300, + TK_SPACE = 301, + TK_STAR = 302, + TK_STRING = 303, + TK_TABLE = 304, + TK_TEMPORARY = 305, + TK_UPDATE = 306, + TK_VALUES = 307, + TK_WHERE = 308, + TK_WILDCARD = 309, + END_OF_FILE = 310, + ILLEGAL = 311, + SPACE = 312, + UNCLOSED_STRING = 313, + COMMENT = 314, + FUNCTION = 315, + COLUMN = 316, + TK_LIKE = 318, + TK_NEGATION = 319 + }; #endif - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 293 of yacc.c */ -#line 68 "sql.y" +#line 68 "sql.y" /* yacc.c:355 */ struct sql_str str; LPWSTR string; @@ -234,22 +232,21 @@ typedef union YYSTYPE USHORT column_type; int integer; - - -/* Line 293 of yacc.c */ -#line 253 "sql.tab.c" -} YYSTYPE; +#line 248 "sql.tab.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif + +int sql_parse (SQL_input *info); + +#endif /* !YY_SQL_SQL_TAB_H_INCLUDED */ + /* Copy the second part of user declarations. */ - -/* Line 343 of yacc.c */ -#line 265 "sql.tab.c" +#line 262 "sql.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -263,11 +260,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -287,8 +281,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -302,38 +295,67 @@ typedef short int yytype_int16; # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ +#endif + #if ! defined yyoverflow || YYERROR_VERBOSE @@ -352,9 +374,9 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif @@ -364,8 +386,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -381,7 +403,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -389,15 +411,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -407,7 +427,7 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -432,35 +452,35 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do +/* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) # else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -476,17 +496,19 @@ union yyalloc #define YYNNTS 37 /* YYNRULES -- Number of rules. */ #define YYNRULES 87 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 154 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 319 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -524,57 +546,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, - 19, 30, 42, 49, 57, 64, 69, 72, 77, 83, - 90, 92, 94, 98, 103, 107, 109, 112, 114, 117, - 120, 122, 126, 128, 133, 135, 137, 139, 141, 143, - 145, 148, 152, 155, 157, 161, 163, 165, 169, 171, - 174, 179, 181, 184, 189, 191, 195, 199, 203, 207, - 211, 215, 219, 223, 227, 231, 235, 240, 242, 244, - 246, 250, 252, 256, 260, 262, 265, 267, 269, 271, - 275, 277, 281, 283, 285, 287, 289, 291 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 66, 0, -1, 67, -1, 82, -1, 69, -1, 68, - -1, 70, -1, 71, -1, 72, -1, 74, -1, 22, - 25, 98, 31, 85, 42, 52, 31, 91, 42, -1, - 22, 25, 98, 31, 85, 42, 52, 31, 91, 42, - 50, -1, 8, 49, 98, 31, 75, 42, -1, 8, - 49, 98, 31, 75, 42, 18, -1, 51, 98, 44, - 92, 53, 89, -1, 51, 98, 44, 92, -1, 9, - 86, -1, 3, 49, 98, 73, -1, 3, 49, 98, - 19, 77, -1, 3, 49, 98, 19, 77, 18, -1, - 18, -1, 14, -1, 10, 49, 98, -1, 76, 41, - 27, 85, -1, 76, 7, 77, -1, 77, -1, 96, - 78, -1, 79, -1, 79, 33, -1, 79, 50, -1, - 80, -1, 80, 36, 37, -1, 6, -1, 6, 31, - 81, 42, -1, 30, -1, 45, -1, 23, -1, 29, - -1, 38, -1, 101, -1, 43, 83, -1, 43, 11, - 83, -1, 84, 86, -1, 97, -1, 97, 7, 84, - -1, 47, -1, 96, -1, 96, 7, 85, -1, 47, - -1, 15, 98, -1, 87, 40, 5, 85, -1, 87, - -1, 15, 88, -1, 15, 88, 53, 89, -1, 98, - -1, 98, 7, 88, -1, 31, 89, 42, -1, 89, - 4, 89, -1, 89, 39, 89, -1, 95, 13, 90, - -1, 95, 17, 90, -1, 95, 32, 90, -1, 95, - 28, 90, -1, 95, 16, 90, -1, 95, 35, 90, - -1, 95, 26, 37, -1, 95, 26, 36, 37, -1, - 95, -1, 94, -1, 94, -1, 94, 7, 91, -1, - 93, -1, 93, 7, 92, -1, 96, 13, 94, -1, - 101, -1, 34, 101, -1, 48, -1, 54, -1, 96, - -1, 98, 12, 99, -1, 99, -1, 98, 12, 99, - -1, 99, -1, 100, -1, 99, -1, 20, -1, 48, - -1, 24, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 117, 117, 125, 126, 127, 128, 129, 130, 131, @@ -589,7 +561,7 @@ static const yytype_uint16 yyrline[] = }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -603,21 +575,21 @@ static const char *const yytname[] = "TK_OR", "TK_ORDER", "TK_PRIMARY", "TK_RP", "TK_SELECT", "TK_SET", "TK_SHORT", "TK_SPACE", "TK_STAR", "TK_STRING", "TK_TABLE", "TK_TEMPORARY", "TK_UPDATE", "TK_VALUES", "TK_WHERE", "TK_WILDCARD", - "AGG_FUNCTION.", "COLUMN", "FUNCTION", "COMMENT", "UNCLOSED_STRING", - "SPACE", "ILLEGAL", "END_OF_FILE", "TK_LIKE", "TK_NEGATION", "$accept", - "query", "onequery", "oneinsert", "onecreate", "oneupdate", "onedelete", - "onealter", "alterop", "onedrop", "table_def", "column_def", + "END_OF_FILE", "ILLEGAL", "SPACE", "UNCLOSED_STRING", "COMMENT", + "FUNCTION", "COLUMN", "AGG_FUNCTION.", "TK_LIKE", "TK_NEGATION", + "$accept", "query", "onequery", "oneinsert", "onecreate", "oneupdate", + "onedelete", "onealter", "alterop", "onedrop", "table_def", "column_def", "column_and_type", "column_type", "data_type_l", "data_type", "data_count", "oneselect", "selectfrom", "selcollist", "collist", "from", "unorderdfrom", "tablelist", "expr", "val", "constlist", "update_assign_list", "column_assignment", "const_val", "column_val", - "column", "selcolumn", "table", "id", "string", "number", 0 + "column", "selcolumn", "table", "id", "string", "number", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -630,69 +602,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 65, 66, 67, 67, 67, 67, 67, 67, 67, - 68, 68, 69, 69, 70, 70, 71, 72, 72, 72, - 73, 73, 74, 75, 76, 76, 77, 78, 78, 78, - 79, 79, 80, 80, 80, 80, 80, 80, 80, 81, - 82, 82, 83, 84, 84, 84, 85, 85, 85, 86, - 86, 86, 87, 87, 88, 88, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 90, 90, 91, - 91, 92, 92, 93, 94, 94, 94, 94, 95, 96, - 96, 97, 97, 97, 98, 99, 100, 101 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 10, 11, 6, 7, 6, 4, 2, 4, 5, 6, - 1, 1, 3, 4, 3, 1, 2, 1, 2, 2, - 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, - 2, 3, 2, 1, 3, 1, 1, 3, 1, 2, - 4, 1, 2, 4, 1, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 4, 1, 1, 1, - 3, 1, 3, 3, 1, 2, 1, 1, 1, 3, - 1, 3, 1, 1, 1, 1, 1, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, - 5, 4, 6, 7, 8, 9, 3, 0, 0, 0, - 16, 51, 0, 0, 0, 85, 45, 86, 40, 0, - 43, 0, 82, 83, 0, 84, 1, 0, 0, 52, - 54, 0, 22, 0, 41, 42, 0, 0, 0, 21, - 20, 0, 17, 0, 0, 0, 0, 0, 44, 81, - 15, 71, 0, 0, 80, 18, 0, 0, 0, 25, - 0, 53, 0, 78, 55, 54, 48, 50, 46, 0, - 0, 0, 0, 0, 19, 32, 36, 37, 34, 38, - 35, 26, 27, 30, 12, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, - 72, 87, 0, 76, 77, 73, 74, 79, 0, 28, - 29, 0, 13, 24, 0, 56, 57, 58, 59, 68, - 67, 63, 60, 0, 65, 62, 61, 64, 47, 0, - 75, 0, 39, 31, 23, 66, 0, 33, 0, 69, - 10, 0, 11, 70 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 8, 9, 10, 11, 12, 13, 14, 52, 15, - 67, 68, 65, 91, 92, 93, 141, 16, 28, 29, - 77, 20, 21, 39, 71, 128, 148, 60, 61, 129, - 130, 73, 30, 63, 64, 33, 116 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ #define YYPACT_NINF -80 + +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-80))) + +#define YYTABLE_NINF -85 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 36, -44, -39, -1, -26, 9, 50, 37, 56, -80, @@ -713,7 +634,30 @@ static const yytype_int16 yypact[] = 95, 52, -80, -80 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, + 5, 4, 6, 7, 8, 9, 3, 0, 0, 0, + 16, 51, 0, 0, 0, 85, 45, 86, 40, 0, + 43, 0, 82, 83, 0, 84, 1, 0, 0, 52, + 54, 0, 22, 0, 41, 42, 0, 0, 0, 21, + 20, 0, 17, 0, 0, 0, 0, 0, 44, 81, + 15, 71, 0, 0, 80, 18, 0, 0, 0, 25, + 0, 53, 0, 78, 55, 54, 48, 50, 46, 0, + 0, 0, 0, 0, 19, 32, 36, 37, 34, 38, + 35, 26, 27, 30, 12, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, + 72, 87, 0, 76, 77, 73, 74, 79, 0, 28, + 29, 0, 13, 24, 0, 56, 57, 58, 59, 68, + 67, 63, 60, 0, 65, 62, 61, 64, 47, 0, + 75, 0, 39, 31, 23, 66, 0, 33, 0, 69, + 10, 0, 11, 70 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -80, -80, -80, -80, -80, -80, -80, -80, -80, -80, @@ -722,10 +666,18 @@ static const yytype_int8 yypgoto[] = -7, -29, -80, 14, -6, -80, -16 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -85 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 8, 9, 10, 11, 12, 13, 14, 52, 15, + 67, 68, 65, 91, 92, 93, 141, 16, 28, 29, + 77, 20, 21, 39, 71, 128, 148, 60, 61, 129, + 130, 73, 30, 63, 64, 33, 116 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 32, 35, 25, 115, 79, 17, 69, 98, 25, 95, @@ -746,12 +698,6 @@ static const yytype_int16 yytable[] = 58, 74, 147, 0, 110, 150, 153 }; -#define yypact_value_is_default(yystate) \ - ((yystate) == (-80)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 6, 7, 20, 82, 57, 49, 53, 4, 20, 7, @@ -772,8 +718,8 @@ static const yytype_int16 yycheck[] = 46, 55, 42, -1, 81, 42, 151 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 8, 9, 10, 22, 43, 51, 66, 67, @@ -794,94 +740,69 @@ static const yytype_uint8 yystos[] = 42, 7, 50, 91 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 65, 66, 67, 67, 67, 67, 67, 67, 67, + 68, 68, 69, 69, 70, 70, 71, 72, 72, 72, + 73, 73, 74, 75, 76, 76, 77, 78, 78, 78, + 79, 79, 80, 80, 80, 80, 80, 80, 80, 81, + 82, 82, 83, 84, 84, 84, 85, 85, 85, 86, + 86, 86, 87, 87, 88, 88, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 90, 90, 91, + 91, 92, 92, 93, 94, 94, 94, 94, 95, 96, + 96, 97, 97, 97, 98, 99, 100, 101 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 10, 11, 6, 7, 6, 4, 2, 4, 5, 6, + 1, 1, 3, 4, 3, 1, 2, 1, 2, 2, + 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, + 2, 3, 2, 1, 3, 1, 1, 3, 1, 2, + 4, 1, 2, 4, 1, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 4, 1, 1, 1, + 3, 1, 3, 3, 1, 2, 1, 1, 1, 3, + 1, 3, 1, 1, 1, 1, 1, 1 +}; -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (info, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) + +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* This macro is provided for backward compatibility. */ - -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, info) -#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -891,56 +812,47 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, info); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, info); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + + +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, SQL_input *info) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, info) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - SQL_input *info; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); + YYUSE (info); if (!yyvaluep) return; - YYUSE (info); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -948,23 +860,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, info) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, SQL_input *info) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, info) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - SQL_input *info; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep, info); YYFPRINTF (yyoutput, ")"); @@ -975,16 +875,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, info) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -995,50 +887,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule, SQL_input *info) -#else -static void -yy_reduce_print (yyvsp, yyrule, info) - YYSTYPE *yyvsp; - int yyrule; - SQL_input *info; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, SQL_input *info) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , info); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , info); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule, info); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule, info); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1052,7 +936,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1075,15 +959,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1099,16 +976,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1138,27 +1007,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1181,12 +1050,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = 0; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1194,10 +1062,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1246,11 +1110,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, break; } yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } } } } @@ -1270,10 +1136,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, # undef YYCASE_ } - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } if (*yymsg_alloc < yysize) { @@ -1310,83 +1178,39 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, SQL_input *info) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, info) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - SQL_input *info; -#endif { YYUSE (yyvaluep); YYUSE (info); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (SQL_input *info); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (SQL_input *info) -#else -int -yyparse (info) - SQL_input *info; -#endif -#endif { /* The lookahead symbol. */ int yychar; + /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; +/* Default value used for initialization, for pacifying older GCCs + or non-GCC compilers. */ +YY_INITIAL_VALUE (static YYSTYPE yyval_default;) +YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); /* Number of syntax errors so far. */ int yynerrs; @@ -1396,10 +1220,10 @@ YYSTYPE yylval; int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. + 'yyss': related to states. + 'yyvs': related to semantic values. - Refer to the stacks thru separate pointers, to allow yyoverflow + Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ @@ -1417,7 +1241,7 @@ YYSTYPE yylval; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ - int yytoken; + int yytoken = 0; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; @@ -1435,9 +1259,8 @@ YYSTYPE yylval; Keep to zero when no symbol should be popped. */ int yylen = 0; - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); @@ -1446,14 +1269,6 @@ YYSTYPE yylval; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - goto yysetstate; /*------------------------------------------------------------. @@ -1474,23 +1289,23 @@ YYSTYPE yylval; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); - yyss = yyss1; - yyvs = yyvs1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1498,22 +1313,22 @@ YYSTYPE yylval; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1522,10 +1337,10 @@ YYSTYPE yylval; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1554,7 +1369,7 @@ yybackup: if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (&yylval, info); } if (yychar <= YYEOF) @@ -1594,7 +1409,9 @@ yybackup: yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1617,7 +1434,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1631,59 +1448,54 @@ yyreduce: switch (yyn) { case 2: - -/* Line 1806 of yacc.c */ -#line 118 "sql.y" +#line 118 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; - *sql->view = (yyvsp[(1) - (1)].query); + *sql->view = (yyvsp[0].query); } +#line 1469 "sql.tab.c" /* yacc.c:1646 */ break; case 10: - -/* Line 1806 of yacc.c */ -#line 136 "sql.y" +#line 136 "sql.y" /* yacc.c:1646 */ { SQL_input *sql = (SQL_input*) info; MSIVIEW *insert = NULL; - INSERT_CreateView( sql->db, &insert, (yyvsp[(3) - (10)].string), (yyvsp[(5) - (10)].column_list), (yyvsp[(9) - (10)].column_list), FALSE ); + INSERT_CreateView( sql->db, &insert, (yyvsp[-7].string), (yyvsp[-5].column_list), (yyvsp[-1].column_list), FALSE ); if( !insert ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), insert ); } +#line 1484 "sql.tab.c" /* yacc.c:1646 */ break; case 11: - -/* Line 1806 of yacc.c */ -#line 147 "sql.y" +#line 147 "sql.y" /* yacc.c:1646 */ { SQL_input *sql = (SQL_input*) info; MSIVIEW *insert = NULL; - INSERT_CreateView( sql->db, &insert, (yyvsp[(3) - (11)].string), (yyvsp[(5) - (11)].column_list), (yyvsp[(9) - (11)].column_list), TRUE ); + INSERT_CreateView( sql->db, &insert, (yyvsp[-8].string), (yyvsp[-6].column_list), (yyvsp[-2].column_list), TRUE ); if( !insert ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), insert ); } +#line 1499 "sql.tab.c" /* yacc.c:1646 */ break; case 12: - -/* Line 1806 of yacc.c */ -#line 161 "sql.y" +#line 161 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW *create = NULL; UINT r; - if( !(yyvsp[(5) - (6)].column_list) ) + if( !(yyvsp[-1].column_list) ) YYABORT; - r = CREATE_CreateView( sql->db, &create, (yyvsp[(3) - (6)].string), (yyvsp[(5) - (6)].column_list), FALSE ); + r = CREATE_CreateView( sql->db, &create, (yyvsp[-3].string), (yyvsp[-1].column_list), FALSE ); if( !create ) { sql->r = r; @@ -1692,814 +1504,744 @@ yyreduce: PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), create ); } +#line 1520 "sql.tab.c" /* yacc.c:1646 */ break; case 13: - -/* Line 1806 of yacc.c */ -#line 178 "sql.y" +#line 178 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW *create = NULL; - if( !(yyvsp[(5) - (7)].column_list) ) + if( !(yyvsp[-2].column_list) ) YYABORT; - CREATE_CreateView( sql->db, &create, (yyvsp[(3) - (7)].string), (yyvsp[(5) - (7)].column_list), TRUE ); + CREATE_CreateView( sql->db, &create, (yyvsp[-4].string), (yyvsp[-2].column_list), TRUE ); if( !create ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), create ); } +#line 1537 "sql.tab.c" /* yacc.c:1646 */ break; case 14: - -/* Line 1806 of yacc.c */ -#line 194 "sql.y" +#line 194 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW *update = NULL; - UPDATE_CreateView( sql->db, &update, (yyvsp[(2) - (6)].string), (yyvsp[(4) - (6)].column_list), (yyvsp[(6) - (6)].expr) ); + UPDATE_CreateView( sql->db, &update, (yyvsp[-4].string), (yyvsp[-2].column_list), (yyvsp[0].expr) ); if( !update ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), update ); } +#line 1552 "sql.tab.c" /* yacc.c:1646 */ break; case 15: - -/* Line 1806 of yacc.c */ -#line 205 "sql.y" +#line 205 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW *update = NULL; - UPDATE_CreateView( sql->db, &update, (yyvsp[(2) - (4)].string), (yyvsp[(4) - (4)].column_list), NULL ); + UPDATE_CreateView( sql->db, &update, (yyvsp[-2].string), (yyvsp[0].column_list), NULL ); if( !update ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), update ); } +#line 1567 "sql.tab.c" /* yacc.c:1646 */ break; case 16: - -/* Line 1806 of yacc.c */ -#line 219 "sql.y" +#line 219 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW *delete = NULL; - DELETE_CreateView( sql->db, &delete, (yyvsp[(2) - (2)].query) ); + DELETE_CreateView( sql->db, &delete, (yyvsp[0].query) ); if( !delete ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), delete ); } +#line 1582 "sql.tab.c" /* yacc.c:1646 */ break; case 17: - -/* Line 1806 of yacc.c */ -#line 233 "sql.y" +#line 233 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW *alter = NULL; - ALTER_CreateView( sql->db, &alter, (yyvsp[(3) - (4)].string), NULL, (yyvsp[(4) - (4)].integer) ); + ALTER_CreateView( sql->db, &alter, (yyvsp[-1].string), NULL, (yyvsp[0].integer) ); if( !alter ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), alter ); } +#line 1597 "sql.tab.c" /* yacc.c:1646 */ break; case 18: - -/* Line 1806 of yacc.c */ -#line 244 "sql.y" +#line 244 "sql.y" /* yacc.c:1646 */ { SQL_input *sql = (SQL_input *)info; MSIVIEW *alter = NULL; - ALTER_CreateView( sql->db, &alter, (yyvsp[(3) - (5)].string), (yyvsp[(5) - (5)].column_list), 0 ); + ALTER_CreateView( sql->db, &alter, (yyvsp[-2].string), (yyvsp[0].column_list), 0 ); if (!alter) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), alter ); } +#line 1612 "sql.tab.c" /* yacc.c:1646 */ break; case 19: - -/* Line 1806 of yacc.c */ -#line 255 "sql.y" +#line 255 "sql.y" /* yacc.c:1646 */ { SQL_input *sql = (SQL_input *)info; MSIVIEW *alter = NULL; - ALTER_CreateView( sql->db, &alter, (yyvsp[(3) - (6)].string), (yyvsp[(5) - (6)].column_list), 1 ); + ALTER_CreateView( sql->db, &alter, (yyvsp[-3].string), (yyvsp[-1].column_list), 1 ); if (!alter) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), alter ); } +#line 1627 "sql.tab.c" /* yacc.c:1646 */ break; case 20: - -/* Line 1806 of yacc.c */ -#line 269 "sql.y" +#line 269 "sql.y" /* yacc.c:1646 */ { (yyval.integer) = 1; } +#line 1635 "sql.tab.c" /* yacc.c:1646 */ break; case 21: - -/* Line 1806 of yacc.c */ -#line 273 "sql.y" +#line 273 "sql.y" /* yacc.c:1646 */ { (yyval.integer) = -1; } +#line 1643 "sql.tab.c" /* yacc.c:1646 */ break; case 22: - -/* Line 1806 of yacc.c */ -#line 280 "sql.y" +#line 280 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW* drop = NULL; UINT r; - r = DROP_CreateView( sql->db, &drop, (yyvsp[(3) - (3)].string) ); + r = DROP_CreateView( sql->db, &drop, (yyvsp[0].string) ); if( r != ERROR_SUCCESS || !(yyval.query) ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), drop ); } +#line 1659 "sql.tab.c" /* yacc.c:1646 */ break; case 23: - -/* Line 1806 of yacc.c */ -#line 295 "sql.y" +#line 295 "sql.y" /* yacc.c:1646 */ { - if( SQL_MarkPrimaryKeys( &(yyvsp[(1) - (4)].column_list), (yyvsp[(4) - (4)].column_list) ) ) - (yyval.column_list) = (yyvsp[(1) - (4)].column_list); + if( SQL_MarkPrimaryKeys( &(yyvsp[-3].column_list), (yyvsp[0].column_list) ) ) + (yyval.column_list) = (yyvsp[-3].column_list); else (yyval.column_list) = NULL; } +#line 1670 "sql.tab.c" /* yacc.c:1646 */ break; case 24: - -/* Line 1806 of yacc.c */ -#line 305 "sql.y" +#line 305 "sql.y" /* yacc.c:1646 */ { column_info *ci; - for( ci = (yyvsp[(1) - (3)].column_list); ci->next; ci = ci->next ) + for( ci = (yyvsp[-2].column_list); ci->next; ci = ci->next ) ; - ci->next = (yyvsp[(3) - (3)].column_list); - (yyval.column_list) = (yyvsp[(1) - (3)].column_list); + ci->next = (yyvsp[0].column_list); + (yyval.column_list) = (yyvsp[-2].column_list); } +#line 1684 "sql.tab.c" /* yacc.c:1646 */ break; case 25: - -/* Line 1806 of yacc.c */ -#line 315 "sql.y" +#line 315 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = (yyvsp[(1) - (1)].column_list); + (yyval.column_list) = (yyvsp[0].column_list); } +#line 1692 "sql.tab.c" /* yacc.c:1646 */ break; case 26: - -/* Line 1806 of yacc.c */ -#line 322 "sql.y" +#line 322 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = (yyvsp[(1) - (2)].column_list); - (yyval.column_list)->type = ((yyvsp[(2) - (2)].column_type) | MSITYPE_VALID); - (yyval.column_list)->temporary = (yyvsp[(2) - (2)].column_type) & MSITYPE_TEMPORARY ? TRUE : FALSE; + (yyval.column_list) = (yyvsp[-1].column_list); + (yyval.column_list)->type = ((yyvsp[0].column_type) | MSITYPE_VALID); + (yyval.column_list)->temporary = (yyvsp[0].column_type) & MSITYPE_TEMPORARY ? TRUE : FALSE; } +#line 1702 "sql.tab.c" /* yacc.c:1646 */ break; case 27: - -/* Line 1806 of yacc.c */ -#line 331 "sql.y" +#line 331 "sql.y" /* yacc.c:1646 */ { - (yyval.column_type) = (yyvsp[(1) - (1)].column_type); + (yyval.column_type) = (yyvsp[0].column_type); } +#line 1710 "sql.tab.c" /* yacc.c:1646 */ break; case 28: - -/* Line 1806 of yacc.c */ -#line 335 "sql.y" +#line 335 "sql.y" /* yacc.c:1646 */ { - (yyval.column_type) = (yyvsp[(1) - (2)].column_type) | MSITYPE_LOCALIZABLE; + (yyval.column_type) = (yyvsp[-1].column_type) | MSITYPE_LOCALIZABLE; } +#line 1718 "sql.tab.c" /* yacc.c:1646 */ break; case 29: - -/* Line 1806 of yacc.c */ -#line 339 "sql.y" +#line 339 "sql.y" /* yacc.c:1646 */ { - (yyval.column_type) = (yyvsp[(1) - (2)].column_type) | MSITYPE_TEMPORARY; + (yyval.column_type) = (yyvsp[-1].column_type) | MSITYPE_TEMPORARY; } +#line 1726 "sql.tab.c" /* yacc.c:1646 */ break; case 30: - -/* Line 1806 of yacc.c */ -#line 346 "sql.y" +#line 346 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) |= MSITYPE_NULLABLE; } +#line 1734 "sql.tab.c" /* yacc.c:1646 */ break; case 31: - -/* Line 1806 of yacc.c */ -#line 350 "sql.y" +#line 350 "sql.y" /* yacc.c:1646 */ { - (yyval.column_type) = (yyvsp[(1) - (3)].column_type); + (yyval.column_type) = (yyvsp[-2].column_type); } +#line 1742 "sql.tab.c" /* yacc.c:1646 */ break; case 32: - -/* Line 1806 of yacc.c */ -#line 357 "sql.y" +#line 357 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) = MSITYPE_STRING | 1; } +#line 1750 "sql.tab.c" /* yacc.c:1646 */ break; case 33: - -/* Line 1806 of yacc.c */ -#line 361 "sql.y" +#line 361 "sql.y" /* yacc.c:1646 */ { - (yyval.column_type) = MSITYPE_STRING | 0x400 | (yyvsp[(3) - (4)].column_type); + (yyval.column_type) = MSITYPE_STRING | 0x400 | (yyvsp[-1].column_type); } +#line 1758 "sql.tab.c" /* yacc.c:1646 */ break; case 34: - -/* Line 1806 of yacc.c */ -#line 365 "sql.y" +#line 365 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) = MSITYPE_STRING | 0x400; } +#line 1766 "sql.tab.c" /* yacc.c:1646 */ break; case 35: - -/* Line 1806 of yacc.c */ -#line 369 "sql.y" +#line 369 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) = 2 | 0x400; } +#line 1774 "sql.tab.c" /* yacc.c:1646 */ break; case 36: - -/* Line 1806 of yacc.c */ -#line 373 "sql.y" +#line 373 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) = 2 | 0x400; } +#line 1782 "sql.tab.c" /* yacc.c:1646 */ break; case 37: - -/* Line 1806 of yacc.c */ -#line 377 "sql.y" +#line 377 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) = 4; } +#line 1790 "sql.tab.c" /* yacc.c:1646 */ break; case 38: - -/* Line 1806 of yacc.c */ -#line 381 "sql.y" +#line 381 "sql.y" /* yacc.c:1646 */ { (yyval.column_type) = MSITYPE_STRING | MSITYPE_VALID; } +#line 1798 "sql.tab.c" /* yacc.c:1646 */ break; case 39: - -/* Line 1806 of yacc.c */ -#line 388 "sql.y" +#line 388 "sql.y" /* yacc.c:1646 */ { - if( ( (yyvsp[(1) - (1)].integer) > 255 ) || ( (yyvsp[(1) - (1)].integer) < 0 ) ) + if( ( (yyvsp[0].integer) > 255 ) || ( (yyvsp[0].integer) < 0 ) ) YYABORT; - (yyval.column_type) = (yyvsp[(1) - (1)].integer); + (yyval.column_type) = (yyvsp[0].integer); } +#line 1808 "sql.tab.c" /* yacc.c:1646 */ break; case 40: - -/* Line 1806 of yacc.c */ -#line 397 "sql.y" +#line 397 "sql.y" /* yacc.c:1646 */ { - (yyval.query) = (yyvsp[(2) - (2)].query); + (yyval.query) = (yyvsp[0].query); } +#line 1816 "sql.tab.c" /* yacc.c:1646 */ break; case 41: - -/* Line 1806 of yacc.c */ -#line 401 "sql.y" +#line 401 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW* distinct = NULL; UINT r; - r = DISTINCT_CreateView( sql->db, &distinct, (yyvsp[(3) - (3)].query) ); + r = DISTINCT_CreateView( sql->db, &distinct, (yyvsp[0].query) ); if (r != ERROR_SUCCESS) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), distinct ); } +#line 1832 "sql.tab.c" /* yacc.c:1646 */ break; case 42: - -/* Line 1806 of yacc.c */ -#line 416 "sql.y" +#line 416 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW* select = NULL; UINT r; - if( (yyvsp[(1) - (2)].column_list) ) + if( (yyvsp[-1].column_list) ) { - r = SELECT_CreateView( sql->db, &select, (yyvsp[(2) - (2)].query), (yyvsp[(1) - (2)].column_list) ); + r = SELECT_CreateView( sql->db, &select, (yyvsp[0].query), (yyvsp[-1].column_list) ); if (r != ERROR_SUCCESS) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), select ); } else - (yyval.query) = (yyvsp[(2) - (2)].query); + (yyval.query) = (yyvsp[0].query); } +#line 1853 "sql.tab.c" /* yacc.c:1646 */ break; case 44: - -/* Line 1806 of yacc.c */ -#line 437 "sql.y" +#line 437 "sql.y" /* yacc.c:1646 */ { - (yyvsp[(1) - (3)].column_list)->next = (yyvsp[(3) - (3)].column_list); + (yyvsp[-2].column_list)->next = (yyvsp[0].column_list); } +#line 1861 "sql.tab.c" /* yacc.c:1646 */ break; case 45: - -/* Line 1806 of yacc.c */ -#line 441 "sql.y" +#line 441 "sql.y" /* yacc.c:1646 */ { (yyval.column_list) = NULL; } +#line 1869 "sql.tab.c" /* yacc.c:1646 */ break; case 47: - -/* Line 1806 of yacc.c */ -#line 449 "sql.y" +#line 449 "sql.y" /* yacc.c:1646 */ { - (yyvsp[(1) - (3)].column_list)->next = (yyvsp[(3) - (3)].column_list); + (yyvsp[-2].column_list)->next = (yyvsp[0].column_list); } +#line 1877 "sql.tab.c" /* yacc.c:1646 */ break; case 48: - -/* Line 1806 of yacc.c */ -#line 453 "sql.y" +#line 453 "sql.y" /* yacc.c:1646 */ { (yyval.column_list) = NULL; } +#line 1885 "sql.tab.c" /* yacc.c:1646 */ break; case 49: - -/* Line 1806 of yacc.c */ -#line 460 "sql.y" +#line 460 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW* table = NULL; UINT r; - r = TABLE_CreateView( sql->db, (yyvsp[(2) - (2)].string), &table ); + r = TABLE_CreateView( sql->db, (yyvsp[0].string), &table ); if( r != ERROR_SUCCESS || !(yyval.query) ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), table ); } +#line 1901 "sql.tab.c" /* yacc.c:1646 */ break; case 50: - -/* Line 1806 of yacc.c */ -#line 472 "sql.y" +#line 472 "sql.y" /* yacc.c:1646 */ { UINT r; - if( (yyvsp[(4) - (4)].column_list) ) + if( (yyvsp[0].column_list) ) { - r = (yyvsp[(1) - (4)].query)->ops->sort( (yyvsp[(1) - (4)].query), (yyvsp[(4) - (4)].column_list) ); + r = (yyvsp[-3].query)->ops->sort( (yyvsp[-3].query), (yyvsp[0].column_list) ); if ( r != ERROR_SUCCESS) YYABORT; } - (yyval.query) = (yyvsp[(1) - (4)].query); + (yyval.query) = (yyvsp[-3].query); } +#line 1918 "sql.tab.c" /* yacc.c:1646 */ break; case 52: - -/* Line 1806 of yacc.c */ -#line 489 "sql.y" +#line 489 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW* where = NULL; UINT r; - r = WHERE_CreateView( sql->db, &where, (yyvsp[(2) - (2)].string), NULL ); + r = WHERE_CreateView( sql->db, &where, (yyvsp[0].string), NULL ); if( r != ERROR_SUCCESS ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), where ); } +#line 1934 "sql.tab.c" /* yacc.c:1646 */ break; case 53: - -/* Line 1806 of yacc.c */ -#line 501 "sql.y" +#line 501 "sql.y" /* yacc.c:1646 */ { SQL_input* sql = (SQL_input*) info; MSIVIEW* where = NULL; UINT r; - r = WHERE_CreateView( sql->db, &where, (yyvsp[(2) - (4)].string), (yyvsp[(4) - (4)].expr) ); + r = WHERE_CreateView( sql->db, &where, (yyvsp[-2].string), (yyvsp[0].expr) ); if( r != ERROR_SUCCESS ) YYABORT; PARSER_BUBBLE_UP_VIEW( sql, (yyval.query), where ); } +#line 1950 "sql.tab.c" /* yacc.c:1646 */ break; case 54: - -/* Line 1806 of yacc.c */ -#line 516 "sql.y" +#line 516 "sql.y" /* yacc.c:1646 */ { - (yyval.string) = (yyvsp[(1) - (1)].string); + (yyval.string) = (yyvsp[0].string); } +#line 1958 "sql.tab.c" /* yacc.c:1646 */ break; case 55: - -/* Line 1806 of yacc.c */ -#line 520 "sql.y" +#line 520 "sql.y" /* yacc.c:1646 */ { - (yyval.string) = parser_add_table( info, (yyvsp[(3) - (3)].string), (yyvsp[(1) - (3)].string) ); + (yyval.string) = parser_add_table( info, (yyvsp[0].string), (yyvsp[-2].string) ); if (!(yyval.string)) YYABORT; } +#line 1968 "sql.tab.c" /* yacc.c:1646 */ break; case 56: - -/* Line 1806 of yacc.c */ -#line 529 "sql.y" +#line 529 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = (yyvsp[(2) - (3)].expr); + (yyval.expr) = (yyvsp[-1].expr); if( !(yyval.expr) ) YYABORT; } +#line 1978 "sql.tab.c" /* yacc.c:1646 */ break; case 57: - -/* Line 1806 of yacc.c */ -#line 535 "sql.y" +#line 535 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_AND, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_AND, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 1988 "sql.tab.c" /* yacc.c:1646 */ break; case 58: - -/* Line 1806 of yacc.c */ -#line 541 "sql.y" +#line 541 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_OR, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_OR, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 1998 "sql.tab.c" /* yacc.c:1646 */ break; case 59: - -/* Line 1806 of yacc.c */ -#line 547 "sql.y" +#line 547 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_EQ, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_EQ, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 2008 "sql.tab.c" /* yacc.c:1646 */ break; case 60: - -/* Line 1806 of yacc.c */ -#line 553 "sql.y" +#line 553 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_GT, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_GT, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 2018 "sql.tab.c" /* yacc.c:1646 */ break; case 61: - -/* Line 1806 of yacc.c */ -#line 559 "sql.y" +#line 559 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_LT, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_LT, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 2028 "sql.tab.c" /* yacc.c:1646 */ break; case 62: - -/* Line 1806 of yacc.c */ -#line 565 "sql.y" +#line 565 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_LE, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_LE, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 2038 "sql.tab.c" /* yacc.c:1646 */ break; case 63: - -/* Line 1806 of yacc.c */ -#line 571 "sql.y" +#line 571 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_GE, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_GE, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 2048 "sql.tab.c" /* yacc.c:1646 */ break; case 64: - -/* Line 1806 of yacc.c */ -#line 577 "sql.y" +#line 577 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_complex( info, (yyvsp[(1) - (3)].expr), OP_NE, (yyvsp[(3) - (3)].expr) ); + (yyval.expr) = EXPR_complex( info, (yyvsp[-2].expr), OP_NE, (yyvsp[0].expr) ); if( !(yyval.expr) ) YYABORT; } +#line 2058 "sql.tab.c" /* yacc.c:1646 */ break; case 65: - -/* Line 1806 of yacc.c */ -#line 583 "sql.y" +#line 583 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_unary( info, (yyvsp[(1) - (3)].expr), OP_ISNULL ); + (yyval.expr) = EXPR_unary( info, (yyvsp[-2].expr), OP_ISNULL ); if( !(yyval.expr) ) YYABORT; } +#line 2068 "sql.tab.c" /* yacc.c:1646 */ break; case 66: - -/* Line 1806 of yacc.c */ -#line 589 "sql.y" +#line 589 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_unary( info, (yyvsp[(1) - (4)].expr), OP_NOTNULL ); + (yyval.expr) = EXPR_unary( info, (yyvsp[-3].expr), OP_NOTNULL ); if( !(yyval.expr) ) YYABORT; } +#line 2078 "sql.tab.c" /* yacc.c:1646 */ break; case 69: - -/* Line 1806 of yacc.c */ -#line 603 "sql.y" +#line 603 "sql.y" /* yacc.c:1646 */ { (yyval.column_list) = parser_alloc_column( info, NULL, NULL ); if( !(yyval.column_list) ) YYABORT; - (yyval.column_list)->val = (yyvsp[(1) - (1)].expr); + (yyval.column_list)->val = (yyvsp[0].expr); } +#line 2089 "sql.tab.c" /* yacc.c:1646 */ break; case 70: - -/* Line 1806 of yacc.c */ -#line 610 "sql.y" +#line 610 "sql.y" /* yacc.c:1646 */ { (yyval.column_list) = parser_alloc_column( info, NULL, NULL ); if( !(yyval.column_list) ) YYABORT; - (yyval.column_list)->val = (yyvsp[(1) - (3)].expr); - (yyval.column_list)->next = (yyvsp[(3) - (3)].column_list); + (yyval.column_list)->val = (yyvsp[-2].expr); + (yyval.column_list)->next = (yyvsp[0].column_list); } +#line 2101 "sql.tab.c" /* yacc.c:1646 */ break; case 72: - -/* Line 1806 of yacc.c */ -#line 622 "sql.y" +#line 622 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = (yyvsp[(1) - (3)].column_list); - (yyval.column_list)->next = (yyvsp[(3) - (3)].column_list); + (yyval.column_list) = (yyvsp[-2].column_list); + (yyval.column_list)->next = (yyvsp[0].column_list); } +#line 2110 "sql.tab.c" /* yacc.c:1646 */ break; case 73: - -/* Line 1806 of yacc.c */ -#line 630 "sql.y" +#line 630 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = (yyvsp[(1) - (3)].column_list); - (yyval.column_list)->val = (yyvsp[(3) - (3)].expr); + (yyval.column_list) = (yyvsp[-2].column_list); + (yyval.column_list)->val = (yyvsp[0].expr); } +#line 2119 "sql.tab.c" /* yacc.c:1646 */ break; case 74: - -/* Line 1806 of yacc.c */ -#line 638 "sql.y" +#line 638 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_ival( info, (yyvsp[(1) - (1)].integer) ); + (yyval.expr) = EXPR_ival( info, (yyvsp[0].integer) ); if( !(yyval.expr) ) YYABORT; } +#line 2129 "sql.tab.c" /* yacc.c:1646 */ break; case 75: - -/* Line 1806 of yacc.c */ -#line 644 "sql.y" +#line 644 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_ival( info, -(yyvsp[(2) - (2)].integer) ); + (yyval.expr) = EXPR_ival( info, -(yyvsp[0].integer) ); if( !(yyval.expr) ) YYABORT; } +#line 2139 "sql.tab.c" /* yacc.c:1646 */ break; case 76: - -/* Line 1806 of yacc.c */ -#line 650 "sql.y" +#line 650 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_sval( info, &(yyvsp[(1) - (1)].str) ); + (yyval.expr) = EXPR_sval( info, &(yyvsp[0].str) ); if( !(yyval.expr) ) YYABORT; } +#line 2149 "sql.tab.c" /* yacc.c:1646 */ break; case 77: - -/* Line 1806 of yacc.c */ -#line 656 "sql.y" +#line 656 "sql.y" /* yacc.c:1646 */ { (yyval.expr) = EXPR_wildcard( info ); if( !(yyval.expr) ) YYABORT; } +#line 2159 "sql.tab.c" /* yacc.c:1646 */ break; case 78: - -/* Line 1806 of yacc.c */ -#line 665 "sql.y" +#line 665 "sql.y" /* yacc.c:1646 */ { - (yyval.expr) = EXPR_column( info, (yyvsp[(1) - (1)].column_list) ); + (yyval.expr) = EXPR_column( info, (yyvsp[0].column_list) ); if( !(yyval.expr) ) YYABORT; } +#line 2169 "sql.tab.c" /* yacc.c:1646 */ break; case 79: - -/* Line 1806 of yacc.c */ -#line 674 "sql.y" +#line 674 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = parser_alloc_column( info, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].string) ); + (yyval.column_list) = parser_alloc_column( info, (yyvsp[-2].string), (yyvsp[0].string) ); if( !(yyval.column_list) ) YYABORT; } +#line 2179 "sql.tab.c" /* yacc.c:1646 */ break; case 80: - -/* Line 1806 of yacc.c */ -#line 680 "sql.y" +#line 680 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = parser_alloc_column( info, NULL, (yyvsp[(1) - (1)].string) ); + (yyval.column_list) = parser_alloc_column( info, NULL, (yyvsp[0].string) ); if( !(yyval.column_list) ) YYABORT; } +#line 2189 "sql.tab.c" /* yacc.c:1646 */ break; case 81: - -/* Line 1806 of yacc.c */ -#line 689 "sql.y" +#line 689 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = parser_alloc_column( info, (yyvsp[(1) - (3)].string), (yyvsp[(3) - (3)].string) ); + (yyval.column_list) = parser_alloc_column( info, (yyvsp[-2].string), (yyvsp[0].string) ); if( !(yyval.column_list) ) YYABORT; } +#line 2199 "sql.tab.c" /* yacc.c:1646 */ break; case 82: - -/* Line 1806 of yacc.c */ -#line 695 "sql.y" +#line 695 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = parser_alloc_column( info, NULL, (yyvsp[(1) - (1)].string) ); + (yyval.column_list) = parser_alloc_column( info, NULL, (yyvsp[0].string) ); if( !(yyval.column_list) ) YYABORT; } +#line 2209 "sql.tab.c" /* yacc.c:1646 */ break; case 83: - -/* Line 1806 of yacc.c */ -#line 701 "sql.y" +#line 701 "sql.y" /* yacc.c:1646 */ { - (yyval.column_list) = parser_alloc_column( info, NULL, (yyvsp[(1) - (1)].string) ); + (yyval.column_list) = parser_alloc_column( info, NULL, (yyvsp[0].string) ); if( !(yyval.column_list) ) YYABORT; } +#line 2219 "sql.tab.c" /* yacc.c:1646 */ break; case 84: - -/* Line 1806 of yacc.c */ -#line 710 "sql.y" +#line 710 "sql.y" /* yacc.c:1646 */ { - (yyval.string) = (yyvsp[(1) - (1)].string); + (yyval.string) = (yyvsp[0].string); } +#line 2227 "sql.tab.c" /* yacc.c:1646 */ break; case 85: - -/* Line 1806 of yacc.c */ -#line 717 "sql.y" +#line 717 "sql.y" /* yacc.c:1646 */ { - if ( SQL_getstring( info, &(yyvsp[(1) - (1)].str), &(yyval.string) ) != ERROR_SUCCESS || !(yyval.string) ) + if ( SQL_getstring( info, &(yyvsp[0].str), &(yyval.string) ) != ERROR_SUCCESS || !(yyval.string) ) YYABORT; } +#line 2236 "sql.tab.c" /* yacc.c:1646 */ break; case 86: - -/* Line 1806 of yacc.c */ -#line 725 "sql.y" +#line 725 "sql.y" /* yacc.c:1646 */ { - if ( SQL_getstring( info, &(yyvsp[(1) - (1)].str), &(yyval.string) ) != ERROR_SUCCESS || !(yyval.string) ) + if ( SQL_getstring( info, &(yyvsp[0].str), &(yyval.string) ) != ERROR_SUCCESS || !(yyval.string) ) YYABORT; } +#line 2245 "sql.tab.c" /* yacc.c:1646 */ break; case 87: - -/* Line 1806 of yacc.c */ -#line 733 "sql.y" +#line 733 "sql.y" /* yacc.c:1646 */ { (yyval.integer) = SQL_getint( info ); } +#line 2253 "sql.tab.c" /* yacc.c:1646 */ break; - -/* Line 1806 of yacc.c */ -#line 2515 "sql.tab.c" +#line 2257 "sql.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -2521,7 +2263,7 @@ yyreduce: *++yyvsp = yyval; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2536,9 +2278,9 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2589,20 +2331,20 @@ yyerrlab: if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, info); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, info); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2621,7 +2363,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2634,35 +2376,37 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp, info); + yystos[yystate], yyvsp, info); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2686,7 +2430,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#if !defined(yyoverflow) || YYERROR_VERBOSE +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2705,14 +2449,14 @@ yyreturn: yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, info); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, info); + yystos[*yyssp], yyvsp, info); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2723,14 +2467,9 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - - -/* Line 2067 of yacc.c */ -#line 738 "sql.y" +#line 738 "sql.y" /* yacc.c:1906 */ static LPWSTR parser_add_table( void *info, LPCWSTR list, LPCWSTR table ) @@ -2812,7 +2551,7 @@ UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str ) ( (p[0]=='\'') && (p[len-1]!='\'') ) ) return ERROR_FUNCTION_FAILED; - /* if there's quotes, remove them */ + /* if there are quotes, remove them */ if( ( (p[0]=='`') && (p[len-1]=='`') ) || ( (p[0]=='\'') && (p[len-1]=='\'') ) ) { @@ -3010,4 +2749,3 @@ UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview, return ERROR_SUCCESS; } - diff --git a/reactos/dll/win32/msi/sql.tab.h b/reactos/dll/win32/msi/sql.tab.h index e34c0cbc2b3..e648d744781 100644 --- a/reactos/dll/win32/msi/sql.tab.h +++ b/reactos/dll/win32/msi/sql.tab.h @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.5. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ /* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,89 +26,95 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - TK_ALTER = 258, - TK_AND = 259, - TK_BY = 260, - TK_CHAR = 261, - TK_COMMA = 262, - TK_CREATE = 263, - TK_DELETE = 264, - TK_DROP = 265, - TK_DISTINCT = 266, - TK_DOT = 267, - TK_EQ = 268, - TK_FREE = 269, - TK_FROM = 270, - TK_GE = 271, - TK_GT = 272, - TK_HOLD = 273, - TK_ADD = 274, - TK_ID = 275, - TK_ILLEGAL = 276, - TK_INSERT = 277, - TK_INT = 278, - TK_INTEGER = 279, - TK_INTO = 280, - TK_IS = 281, - TK_KEY = 282, - TK_LE = 283, - TK_LONG = 284, - TK_LONGCHAR = 285, - TK_LP = 286, - TK_LT = 287, - TK_LOCALIZABLE = 288, - TK_MINUS = 289, - TK_NE = 290, - TK_NOT = 291, - TK_NULL = 292, - TK_OBJECT = 293, - TK_OR = 294, - TK_ORDER = 295, - TK_PRIMARY = 296, - TK_RP = 297, - TK_SELECT = 298, - TK_SET = 299, - TK_SHORT = 300, - TK_SPACE = 301, - TK_STAR = 302, - TK_STRING = 303, - TK_TABLE = 304, - TK_TEMPORARY = 305, - TK_UPDATE = 306, - TK_VALUES = 307, - TK_WHERE = 308, - TK_WILDCARD = 309, - COLUMN = 311, - FUNCTION = 312, - COMMENT = 313, - UNCLOSED_STRING = 314, - SPACE = 315, - ILLEGAL = 316, - END_OF_FILE = 317, - TK_LIKE = 318, - TK_NEGATION = 319 - }; +#ifndef YY_SQL_SQL_TAB_H_INCLUDED +# define YY_SQL_SQL_TAB_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int sql_debug; #endif +/* Token type. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + enum yytokentype + { + TK_ALTER = 258, + TK_AND = 259, + TK_BY = 260, + TK_CHAR = 261, + TK_COMMA = 262, + TK_CREATE = 263, + TK_DELETE = 264, + TK_DROP = 265, + TK_DISTINCT = 266, + TK_DOT = 267, + TK_EQ = 268, + TK_FREE = 269, + TK_FROM = 270, + TK_GE = 271, + TK_GT = 272, + TK_HOLD = 273, + TK_ADD = 274, + TK_ID = 275, + TK_ILLEGAL = 276, + TK_INSERT = 277, + TK_INT = 278, + TK_INTEGER = 279, + TK_INTO = 280, + TK_IS = 281, + TK_KEY = 282, + TK_LE = 283, + TK_LONG = 284, + TK_LONGCHAR = 285, + TK_LP = 286, + TK_LT = 287, + TK_LOCALIZABLE = 288, + TK_MINUS = 289, + TK_NE = 290, + TK_NOT = 291, + TK_NULL = 292, + TK_OBJECT = 293, + TK_OR = 294, + TK_ORDER = 295, + TK_PRIMARY = 296, + TK_RP = 297, + TK_SELECT = 298, + TK_SET = 299, + TK_SHORT = 300, + TK_SPACE = 301, + TK_STAR = 302, + TK_STRING = 303, + TK_TABLE = 304, + TK_TEMPORARY = 305, + TK_UPDATE = 306, + TK_VALUES = 307, + TK_WHERE = 308, + TK_WILDCARD = 309, + END_OF_FILE = 310, + ILLEGAL = 311, + SPACE = 312, + UNCLOSED_STRING = 313, + COMMENT = 314, + FUNCTION = 315, + COLUMN = 316, + TK_LIKE = 318, + TK_NEGATION = 319 + }; +#endif - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { - -/* Line 2068 of yacc.c */ -#line 68 "sql.y" +#line 68 "sql.y" /* yacc.c:1909 */ struct sql_str str; LPWSTR string; @@ -118,16 +124,14 @@ typedef union YYSTYPE USHORT column_type; int integer; - - -/* Line 2068 of yacc.c */ -#line 125 "sql.tab.h" -} YYSTYPE; +#line 128 "sql.tab.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +int sql_parse (SQL_input *info); +#endif /* !YY_SQL_SQL_TAB_H_INCLUDED */ diff --git a/reactos/dll/win32/msi/table.c b/reactos/dll/win32/msi/table.c index 41f48e7f87e..7ecb9ad4357 100644 --- a/reactos/dll/win32/msi/table.c +++ b/reactos/dll/win32/msi/table.c @@ -652,7 +652,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF /* Note: _Columns table doesn't have non-persistent data */ /* if maxcount is non-zero, assume it's exactly right for this table */ - memset( colinfo, 0, maxcount * sizeof(*colinfo) ); + if (colinfo) memset( colinfo, 0, maxcount * sizeof(*colinfo) ); count = table->row_count; for (i = 0; i < count; i++) { @@ -665,7 +665,7 @@ static UINT get_tablecolumns( MSIDATABASE *db, LPCWSTR szTableName, MSICOLUMNINF /* check the column number is in range */ if (col < 1 || col > maxcount) { - ERR("column %d out of range\n", col); + ERR("column %d out of range (maxcount: %d)\n", col, maxcount); continue; } /* check if this column was already set */ diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 007b00afafe..f1455a03ef8 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -120,7 +120,7 @@ reactos/dll/win32/msg711.acm # Synced to Wine-1.7.17 reactos/dll/win32/msgsm32.acm # Synced to Wine-1.7.17 reactos/dll/win32/mshtml # Synced to Wine-1.7.17 reactos/dll/win32/mshtml.tlb # Synced to Wine-1.7.17 -reactos/dll/win32/msi # Synced to Wine-1.7.17 +reactos/dll/win32/msi # Synced to Wine-1.7.27 reactos/dll/win32/msimg32 # Synced to Wine-1.7.17 reactos/dll/win32/msimtf # Synced to Wine-1.7.17 reactos/dll/win32/msisip # Synced to Wine-1.7.17