ReactOS  0.4.14-dev-52-g6116262
cond.tab.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.1. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.1"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 0
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 
62 /* Substitute the variable and function names. */
63 #define yyparse cond_parse
64 #define yylex cond_lex
65 #define yyerror cond_error
66 #define yydebug cond_debug
67 #define yynerrs cond_nerrs
68 
69 
70 /* Copy the first part of user declarations. */
71 #line 1 "cond.y" /* yacc.c:339 */
72 
73 
74 /*
75  * Implementation of the Microsoft Installer (msi.dll)
76  *
77  * Copyright 2003 Mike McCormack for CodeWeavers
78  *
79  * This library is free software; you can redistribute it and/or
80  * modify it under the terms of the GNU Lesser General Public
81  * License as published by the Free Software Foundation; either
82  * version 2.1 of the License, or (at your option) any later version.
83  *
84  * This library is distributed in the hope that it will be useful,
85  * but WITHOUT ANY WARRANTY; without even the implied warranty of
86  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
87  * Lesser General Public License for more details.
88  *
89  * You should have received a copy of the GNU Lesser General Public
90  * License along with this library; if not, write to the Free Software
91  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
92  */
93 
94 #define COBJMACROS
95 
96 #include "config.h"
97 
98 #include <stdarg.h>
99 #include <stdio.h>
100 #include <stdlib.h>
101 
102 #include "windef.h"
103 #include "winbase.h"
104 #include "winuser.h"
105 #include "msi.h"
106 #include "msiquery.h"
107 #include "objbase.h"
108 #include "oleauto.h"
109 
110 #include "msipriv.h"
111 #include "msiserver.h"
112 #include "wine/debug.h"
113 #include "wine/unicode.h"
114 #include "wine/list.h"
115 
117 
118 typedef struct tag_yyinput
119 {
124  struct list mem;
125 } COND_input;
126 
127 struct cond_str {
130 };
131 
132 struct value {
133  enum value_type {
137  } type;
138  union {
141  } u;
142 };
143 
144 static LPWSTR COND_GetString( COND_input *info, const struct cond_str *str );
145 static LPWSTR COND_GetLiteral( COND_input *info, const struct cond_str *str );
146 static int cond_lex( void *COND_lval, COND_input *info);
147 static int cond_error( COND_input *info, const char *str);
148 
149 static void *cond_alloc( COND_input *cond, unsigned int sz );
150 static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz );
151 static void cond_free( void *ptr );
152 
153 static INT compare_int( INT a, INT operator, INT b );
154 static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b, BOOL convert );
155 
157 {
158  INT ret = 0, sign = 1;
159 
160  if (!p)
161  return FALSE;
162  if (*p == '-')
163  {
164  sign = -1;
165  p++;
166  }
167  if (!*p)
168  return FALSE;
169  while (*p)
170  {
171  if( *p < '0' || *p > '9' )
172  return FALSE;
173  ret = ret*10 + (*p - '0');
174  p++;
175  }
176  *val = ret*sign;
177  return TRUE;
178 }
179 
180 static void value_free( struct value val )
181 {
182  if (val.type != VALUE_INTEGER)
183  cond_free( val.u.string );
184 }
185 
186 
187 #line 188 "cond.tab.c" /* yacc.c:339 */
188 
189 # ifndef YY_NULLPTR
190 # if defined __cplusplus && 201103L <= __cplusplus
191 # define YY_NULLPTR nullptr
192 # else
193 # define YY_NULLPTR 0
194 # endif
195 # endif
196 
197 /* Enabling verbose error messages. */
198 #ifdef YYERROR_VERBOSE
199 # undef YYERROR_VERBOSE
200 # define YYERROR_VERBOSE 1
201 #else
202 # define YYERROR_VERBOSE 0
203 #endif
204 
205 
206 /* Debug traces. */
207 #ifndef YYDEBUG
208 # define YYDEBUG 0
209 #endif
210 #if YYDEBUG
211 extern int cond_debug;
212 #endif
213 
214 /* Token type. */
215 #ifndef YYTOKENTYPE
216 # define YYTOKENTYPE
218  {
219  COND_SPACE = 258,
220  COND_EOF = 259,
221  COND_OR = 260,
222  COND_AND = 261,
223  COND_NOT = 262,
224  COND_XOR = 263,
225  COND_IMP = 264,
226  COND_EQV = 265,
227  COND_LT = 266,
228  COND_GT = 267,
229  COND_EQ = 268,
230  COND_NE = 269,
231  COND_GE = 270,
232  COND_LE = 271,
233  COND_ILT = 272,
234  COND_IGT = 273,
235  COND_IEQ = 274,
236  COND_INE = 275,
237  COND_IGE = 276,
238  COND_ILE = 277,
239  COND_LPAR = 278,
240  COND_RPAR = 279,
241  COND_TILDA = 280,
242  COND_SS = 281,
243  COND_ISS = 282,
244  COND_ILHS = 283,
245  COND_IRHS = 284,
246  COND_LHS = 285,
247  COND_RHS = 286,
251  COND_AMPER = 290,
252  COND_EXCLAM = 291,
253  COND_IDENT = 292,
254  COND_NUMBER = 293,
255  COND_LITER = 294,
257  };
258 #endif
259 
260 /* Value type. */
261 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
262 
263 union YYSTYPE
264 {
265 #line 122 "cond.y" /* yacc.c:355 */
266 
267  struct cond_str str;
268  struct value value;
270  INT operator;
272 
273 #line 274 "cond.tab.c" /* yacc.c:355 */
274 };
275 
276 typedef union YYSTYPE YYSTYPE;
277 # define YYSTYPE_IS_TRIVIAL 1
278 # define YYSTYPE_IS_DECLARED 1
279 #endif
280 
281 
282 
283 int cond_parse (COND_input *info);
284 
285 
286 
287 /* Copy the second part of user declarations. */
288 
289 #line 290 "cond.tab.c" /* yacc.c:358 */
290 
291 #ifdef short
292 # undef short
293 #endif
294 
295 #ifdef YYTYPE_UINT8
296 typedef YYTYPE_UINT8 yytype_uint8;
297 #else
298 typedef unsigned char yytype_uint8;
299 #endif
300 
301 #ifdef YYTYPE_INT8
302 typedef YYTYPE_INT8 yytype_int8;
303 #else
304 typedef signed char yytype_int8;
305 #endif
306 
307 #ifdef YYTYPE_UINT16
308 typedef YYTYPE_UINT16 yytype_uint16;
309 #else
310 typedef unsigned short yytype_uint16;
311 #endif
312 
313 #ifdef YYTYPE_INT16
314 typedef YYTYPE_INT16 yytype_int16;
315 #else
316 typedef short yytype_int16;
317 #endif
318 
319 #ifndef YYSIZE_T
320 # ifdef __SIZE_TYPE__
321 # define YYSIZE_T __SIZE_TYPE__
322 # elif defined size_t
323 # define YYSIZE_T size_t
324 # elif ! defined YYSIZE_T
325 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
326 # define YYSIZE_T size_t
327 # else
328 # define YYSIZE_T unsigned
329 # endif
330 #endif
331 
332 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
333 
334 #ifndef YY_
335 # if defined YYENABLE_NLS && YYENABLE_NLS
336 # if ENABLE_NLS
337 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
338 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
339 # endif
340 # endif
341 # ifndef YY_
342 # define YY_(Msgid) Msgid
343 # endif
344 #endif
345 
346 #ifndef YY_ATTRIBUTE
347 # if (defined __GNUC__ \
348  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
349  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
350 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
351 # else
352 # define YY_ATTRIBUTE(Spec) /* empty */
353 # endif
354 #endif
355 
356 #ifndef YY_ATTRIBUTE_PURE
357 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
358 #endif
359 
360 #ifndef YY_ATTRIBUTE_UNUSED
361 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
362 #endif
363 
364 #if !defined _Noreturn \
365  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
366 # if defined _MSC_VER && 1200 <= _MSC_VER
367 # define _Noreturn __declspec (noreturn)
368 # else
369 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
370 # endif
371 #endif
372 
373 /* Suppress unused-variable warnings by "using" E. */
374 #if ! defined lint || defined __GNUC__
375 # define YYUSE(E) ((void) (E))
376 #else
377 # define YYUSE(E) /* empty */
378 #endif
379 
380 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
381 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
382 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
383  _Pragma ("GCC diagnostic push") \
384  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
385  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
386 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
387  _Pragma ("GCC diagnostic pop")
388 #else
389 # define YY_INITIAL_VALUE(Value) Value
390 #endif
391 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
392 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
393 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
394 #endif
395 #ifndef YY_INITIAL_VALUE
396 # define YY_INITIAL_VALUE(Value) /* Nothing. */
397 #endif
398 
399 
400 #if ! defined yyoverflow || YYERROR_VERBOSE
401 
402 /* The parser invokes alloca or malloc; define the necessary symbols. */
403 
404 # ifdef YYSTACK_USE_ALLOCA
405 # if YYSTACK_USE_ALLOCA
406 # ifdef __GNUC__
407 # define YYSTACK_ALLOC __builtin_alloca
408 # elif defined __BUILTIN_VA_ARG_INCR
409 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
410 # elif defined _AIX
411 # define YYSTACK_ALLOC __alloca
412 # elif defined _MSC_VER
413 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
414 # define alloca _alloca
415 # else
416 # define YYSTACK_ALLOC alloca
417 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
418 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
419  /* Use EXIT_SUCCESS as a witness for stdlib.h. */
420 # ifndef EXIT_SUCCESS
421 # define EXIT_SUCCESS 0
422 # endif
423 # endif
424 # endif
425 # endif
426 # endif
427 
428 # ifdef YYSTACK_ALLOC
429  /* Pacify GCC's 'empty if-body' warning. */
430 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
431 # ifndef YYSTACK_ALLOC_MAXIMUM
432  /* The OS might guarantee only one guard page at the bottom of the stack,
433  and a page size can be as small as 4096 bytes. So we cannot safely
434  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
435  to allow for a few compiler-allocated temporary stack slots. */
436 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
437 # endif
438 # else
439 # define YYSTACK_ALLOC YYMALLOC
440 # define YYSTACK_FREE YYFREE
441 # ifndef YYSTACK_ALLOC_MAXIMUM
442 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
443 # endif
444 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
445  && ! ((defined YYMALLOC || defined malloc) \
446  && (defined YYFREE || defined free)))
447 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
448 # ifndef EXIT_SUCCESS
449 # define EXIT_SUCCESS 0
450 # endif
451 # endif
452 # ifndef YYMALLOC
453 # define YYMALLOC malloc
454 # if ! defined malloc && ! defined EXIT_SUCCESS
455 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
456 # endif
457 # endif
458 # ifndef YYFREE
459 # define YYFREE free
460 # if ! defined free && ! defined EXIT_SUCCESS
461 void free (void *); /* INFRINGES ON USER NAME SPACE */
462 # endif
463 # endif
464 # endif
465 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
466 
467 
468 #if (! defined yyoverflow \
469  && (! defined __cplusplus \
470  || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
471 
472 /* A type that is properly aligned for any stack member. */
473 union yyalloc
474 {
477 };
478 
479 /* The size of the maximum gap between one aligned stack and the next. */
480 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
481 
482 /* The size of an array large to enough to hold all stacks, each with
483  N elements. */
484 # define YYSTACK_BYTES(N) \
485  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
486  + YYSTACK_GAP_MAXIMUM)
487 
488 # define YYCOPY_NEEDED 1
489 
490 /* Relocate STACK from its old location to the new one. The
491  local variables YYSIZE and YYSTACKSIZE give the old and new number of
492  elements in the stack, and YYPTR gives the new location of the
493  stack. Advance YYPTR to a properly aligned location for the next
494  stack. */
495 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
496  do \
497  { \
498  YYSIZE_T yynewbytes; \
499  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
500  Stack = &yyptr->Stack_alloc; \
501  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
502  yyptr += yynewbytes / sizeof (*yyptr); \
503  } \
504  while (0)
505 
506 #endif
507 
508 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
509 /* Copy COUNT objects from SRC to DST. The source and destination do
510  not overlap. */
511 # ifndef YYCOPY
512 # if defined __GNUC__ && 1 < __GNUC__
513 # define YYCOPY(Dst, Src, Count) \
514  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
515 # else
516 # define YYCOPY(Dst, Src, Count) \
517  do \
518  { \
519  YYSIZE_T yyi; \
520  for (yyi = 0; yyi < (Count); yyi++) \
521  (Dst)[yyi] = (Src)[yyi]; \
522  } \
523  while (0)
524 # endif
525 # endif
526 #endif /* !YYCOPY_NEEDED */
527 
528 /* YYFINAL -- State number of the termination state. */
529 #define YYFINAL 24
530 /* YYLAST -- Last index in YYTABLE. */
531 #define YYLAST 67
532 
533 /* YYNTOKENS -- Number of terminals. */
534 #define YYNTOKENS 41
535 /* YYNNTS -- Number of nonterminals. */
536 #define YYNNTS 8
537 /* YYNRULES -- Number of rules. */
538 #define YYNRULES 41
539 /* YYNSTATES -- Number of states. */
540 #define YYNSTATES 56
541 
542 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
543  by yylex, with out-of-bounds checking. */
544 #define YYUNDEFTOK 2
545 #define YYMAXUTOK 295
546 
547 #define YYTRANSLATE(YYX) \
548  ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
549 
550 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
551  as returned by yylex, without out-of-bounds checking. */
552 static const yytype_uint8 yytranslate[] =
553 {
554  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
558  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
561  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
562  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
563  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
564  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
565  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
566  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
569  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
572  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
573  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
574  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
575  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
576  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
577  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
578  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
579  2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
580  5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
581  15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
582  25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
583  35, 36, 37, 38, 39, 40
584 };
585 
586 #if YYDEBUG
587  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
588 static const yytype_uint16 yyrline[] =
589 {
590  0, 149, 149, 155, 162, 166, 170, 174, 178, 185,
591  189, 196, 200, 208, 243, 251, 252, 253, 254, 255,
592  256, 257, 258, 259, 260, 261, 262, 263, 264, 265,
593  266, 267, 268, 272, 286, 301, 309, 319, 336, 353,
594  370, 390
595 };
596 #endif
597 
598 #if YYDEBUG || YYERROR_VERBOSE || 0
599 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
600  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
601 static const char *const yytname[] =
602 {
603  "$end", "error", "$undefined", "COND_SPACE", "COND_EOF", "COND_OR",
604  "COND_AND", "COND_NOT", "COND_XOR", "COND_IMP", "COND_EQV", "COND_LT",
605  "COND_GT", "COND_EQ", "COND_NE", "COND_GE", "COND_LE", "COND_ILT",
606  "COND_IGT", "COND_IEQ", "COND_INE", "COND_IGE", "COND_ILE", "COND_LPAR",
607  "COND_RPAR", "COND_TILDA", "COND_SS", "COND_ISS", "COND_ILHS",
608  "COND_IRHS", "COND_LHS", "COND_RHS", "COND_PERCENT", "COND_DOLLARS",
609  "COND_QUESTION", "COND_AMPER", "COND_EXCLAM", "COND_IDENT",
610  "COND_NUMBER", "COND_LITER", "COND_ERROR", "$accept", "condition",
611  "expression", "boolean_term", "boolean_factor", "operator", "value",
612  "identifier", YY_NULLPTR
613 };
614 #endif
615 
616 # ifdef YYPRINT
617 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
618  (internal) symbol number NUM (which must be that of a token). */
619 static const yytype_uint16 yytoknum[] =
620 {
621  0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
622  265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
623  275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
624  285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
625  295
626 };
627 # endif
628 
629 #define YYPACT_NINF -45
630 
631 #define yypact_value_is_default(Yystate) \
632  (!!((Yystate) == (-45)))
633 
634 #define YYTABLE_NINF -1
635 
636 #define yytable_value_is_error(Yytable_value) \
637  0
638 
639  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
640  STATE-NUM. */
641 static const yytype_int8 yypact[] =
642 {
643  -7, -7, -7, -36, -36, -36, -36, -36, -45, -45,
644  -45, 2, 5, 3, -45, 23, -45, -45, -2, -45,
645  -45, -45, -45, -45, -45, -7, -7, -7, -7, -7,
646  -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
647  -45, -45, -45, -45, -45, -45, -45, -45, 24, -45,
648  3, 3, 3, 3, -45, -45
649 };
650 
651  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
652  Performed when YYTABLE does not specify something else to do. Zero
653  means the default is an error. */
654 static const yytype_uint8 yydefact[] =
655 {
656  3, 0, 0, 0, 0, 0, 0, 0, 41, 36,
657  35, 0, 2, 4, 9, 12, 33, 11, 0, 34,
658  37, 38, 39, 40, 1, 0, 0, 0, 0, 0,
659  17, 18, 15, 16, 20, 19, 24, 25, 22, 23,
660  27, 26, 21, 28, 31, 32, 29, 30, 0, 14,
661  5, 7, 6, 8, 10, 13
662 };
663 
664  /* YYPGOTO[NTERM-NUM]. */
665 static const yytype_int8 yypgoto[] =
666 {
667  -45, -45, 9, 39, 4, -45, -44, 14
668 };
669 
670  /* YYDEFGOTO[NTERM-NUM]. */
671 static const yytype_int8 yydefgoto[] =
672 {
673  -1, 11, 12, 13, 14, 48, 15, 16
674 };
675 
676  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
677  positive, shift that token. If negative, reduce the rule whose
678  number is the opposite. If YYTABLE_NINF, syntax error. */
679 static const yytype_uint8 yytable[] =
680 {
681  1, 8, 24, 25, 55, 17, 26, 27, 28, 29,
682  25, 18, 0, 26, 27, 28, 2, 19, 20, 21,
683  22, 23, 49, 0, 0, 3, 4, 5, 6, 7,
684  8, 9, 10, 54, 30, 31, 32, 33, 34, 35,
685  36, 37, 38, 39, 40, 41, 0, 0, 0, 42,
686  43, 44, 45, 46, 47, 0, 3, 4, 5, 6,
687  7, 8, 9, 10, 50, 51, 52, 53
688 };
689 
690 static const yytype_int8 yycheck[] =
691 {
692  7, 37, 0, 5, 48, 1, 8, 9, 10, 6,
693  5, 2, -1, 8, 9, 10, 23, 3, 4, 5,
694  6, 7, 24, -1, -1, 32, 33, 34, 35, 36,
695  37, 38, 39, 29, 11, 12, 13, 14, 15, 16,
696  17, 18, 19, 20, 21, 22, -1, -1, -1, 26,
697  27, 28, 29, 30, 31, -1, 32, 33, 34, 35,
698  36, 37, 38, 39, 25, 26, 27, 28
699 };
700 
701  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
702  symbol of state STATE-NUM. */
703 static const yytype_uint8 yystos[] =
704 {
705  0, 7, 23, 32, 33, 34, 35, 36, 37, 38,
706  39, 42, 43, 44, 45, 47, 48, 45, 43, 48,
707  48, 48, 48, 48, 0, 5, 8, 9, 10, 6,
708  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
709  21, 22, 26, 27, 28, 29, 30, 31, 46, 24,
710  44, 44, 44, 44, 45, 47
711 };
712 
713  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
714 static const yytype_uint8 yyr1[] =
715 {
716  0, 41, 42, 42, 43, 43, 43, 43, 43, 44,
717  44, 45, 45, 45, 45, 46, 46, 46, 46, 46,
718  46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
719  46, 46, 46, 47, 47, 47, 47, 47, 47, 47,
720  47, 48
721 };
722 
723  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
724 static const yytype_uint8 yyr2[] =
725 {
726  0, 2, 1, 0, 1, 3, 3, 3, 3, 1,
727  3, 2, 1, 3, 3, 1, 1, 1, 1, 1,
728  1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
729  1, 1, 1, 1, 2, 1, 1, 2, 2, 2,
730  2, 1
731 };
732 
733 
734 #define yyerrok (yyerrstatus = 0)
735 #define yyclearin (yychar = YYEMPTY)
736 #define YYEMPTY (-2)
737 #define YYEOF 0
738 
739 #define YYACCEPT goto yyacceptlab
740 #define YYABORT goto yyabortlab
741 #define YYERROR goto yyerrorlab
742 
743 
744 #define YYRECOVERING() (!!yyerrstatus)
745 
746 #define YYBACKUP(Token, Value) \
747 do \
748  if (yychar == YYEMPTY) \
749  { \
750  yychar = (Token); \
751  yylval = (Value); \
752  YYPOPSTACK (yylen); \
753  yystate = *yyssp; \
754  goto yybackup; \
755  } \
756  else \
757  { \
758  yyerror (info, YY_("syntax error: cannot back up")); \
759  YYERROR; \
760  } \
761 while (0)
762 
763 /* Error token number */
764 #define YYTERROR 1
765 #define YYERRCODE 256
766 
767 
768 
769 /* Enable debugging if requested. */
770 #if YYDEBUG
771 
772 # ifndef YYFPRINTF
773 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
774 # define YYFPRINTF fprintf
775 # endif
776 
777 # define YYDPRINTF(Args) \
778 do { \
779  if (yydebug) \
780  YYFPRINTF Args; \
781 } while (0)
782 
783 /* This macro is provided for backward compatibility. */
784 #ifndef YY_LOCATION_PRINT
785 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
786 #endif
787 
788 
789 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
790 do { \
791  if (yydebug) \
792  { \
793  YYFPRINTF (stderr, "%s ", Title); \
794  yy_symbol_print (stderr, \
795  Type, Value, info); \
796  YYFPRINTF (stderr, "\n"); \
797  } \
798 } while (0)
799 
800 
801 /*----------------------------------------.
802 | Print this symbol's value on YYOUTPUT. |
803 `----------------------------------------*/
804 
805 static void
806 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, COND_input *info)
807 {
808  FILE *yyo = yyoutput;
809  YYUSE (yyo);
810  YYUSE (info);
811  if (!yyvaluep)
812  return;
813 # ifdef YYPRINT
814  if (yytype < YYNTOKENS)
815  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
816 # endif
817  YYUSE (yytype);
818 }
819 
820 
821 /*--------------------------------.
822 | Print this symbol on YYOUTPUT. |
823 `--------------------------------*/
824 
825 static void
826 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, COND_input *info)
827 {
828  YYFPRINTF (yyoutput, "%s %s (",
829  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
830 
831  yy_symbol_value_print (yyoutput, yytype, yyvaluep, info);
832  YYFPRINTF (yyoutput, ")");
833 }
834 
835 /*------------------------------------------------------------------.
836 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
837 | TOP (included). |
838 `------------------------------------------------------------------*/
839 
840 static void
841 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
842 {
843  YYFPRINTF (stderr, "Stack now");
844  for (; yybottom <= yytop; yybottom++)
845  {
846  int yybot = *yybottom;
847  YYFPRINTF (stderr, " %d", yybot);
848  }
849  YYFPRINTF (stderr, "\n");
850 }
851 
852 # define YY_STACK_PRINT(Bottom, Top) \
853 do { \
854  if (yydebug) \
855  yy_stack_print ((Bottom), (Top)); \
856 } while (0)
857 
858 
859 /*------------------------------------------------.
860 | Report that the YYRULE is going to be reduced. |
861 `------------------------------------------------*/
862 
863 static void
864 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, COND_input *info)
865 {
866  unsigned long yylno = yyrline[yyrule];
867  int yynrhs = yyr2[yyrule];
868  int yyi;
869  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
870  yyrule - 1, yylno);
871  /* The symbols being reduced. */
872  for (yyi = 0; yyi < yynrhs; yyi++)
873  {
874  YYFPRINTF (stderr, " $%d = ", yyi + 1);
875  yy_symbol_print (stderr,
876  yystos[yyssp[yyi + 1 - yynrhs]],
877  &(yyvsp[(yyi + 1) - (yynrhs)])
878  , info);
879  YYFPRINTF (stderr, "\n");
880  }
881 }
882 
883 # define YY_REDUCE_PRINT(Rule) \
884 do { \
885  if (yydebug) \
886  yy_reduce_print (yyssp, yyvsp, Rule, info); \
887 } while (0)
888 
889 /* Nonzero means print parse trace. It is left uninitialized so that
890  multiple parsers can coexist. */
891 int yydebug;
892 #else /* !YYDEBUG */
893 # define YYDPRINTF(Args)
894 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
895 # define YY_STACK_PRINT(Bottom, Top)
896 # define YY_REDUCE_PRINT(Rule)
897 #endif /* !YYDEBUG */
898 
899 
900 /* YYINITDEPTH -- initial size of the parser's stacks. */
901 #ifndef YYINITDEPTH
902 # define YYINITDEPTH 200
903 #endif
904 
905 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
906  if the built-in stack extension method is used).
907 
908  Do not make this value too large; the results are undefined if
909  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
910  evaluated with infinite-precision integer arithmetic. */
911 
912 #ifndef YYMAXDEPTH
913 # define YYMAXDEPTH 10000
914 #endif
915 
916 
917 #if YYERROR_VERBOSE
918 
919 # ifndef yystrlen
920 # if defined __GLIBC__ && defined _STRING_H
921 # define yystrlen strlen
922 # else
923 /* Return the length of YYSTR. */
924 static YYSIZE_T
925 yystrlen (const char *yystr)
926 {
927  YYSIZE_T yylen;
928  for (yylen = 0; yystr[yylen]; yylen++)
929  continue;
930  return yylen;
931 }
932 # endif
933 # endif
934 
935 # ifndef yystpcpy
936 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
937 # define yystpcpy stpcpy
938 # else
939 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
940  YYDEST. */
941 static char *
942 yystpcpy (char *yydest, const char *yysrc)
943 {
944  char *yyd = yydest;
945  const char *yys = yysrc;
946 
947  while ((*yyd++ = *yys++) != '\0')
948  continue;
949 
950  return yyd - 1;
951 }
952 # endif
953 # endif
954 
955 # ifndef yytnamerr
956 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
957  quotes and backslashes, so that it's suitable for yyerror. The
958  heuristic is that double-quoting is unnecessary unless the string
959  contains an apostrophe, a comma, or backslash (other than
960  backslash-backslash). YYSTR is taken from yytname. If YYRES is
961  null, do not copy; instead, return the length of what the result
962  would have been. */
963 static YYSIZE_T
964 yytnamerr (char *yyres, const char *yystr)
965 {
966  if (*yystr == '"')
967  {
968  YYSIZE_T yyn = 0;
969  char const *yyp = yystr;
970 
971  for (;;)
972  switch (*++yyp)
973  {
974  case '\'':
975  case ',':
976  goto do_not_strip_quotes;
977 
978  case '\\':
979  if (*++yyp != '\\')
980  goto do_not_strip_quotes;
981  /* Fall through. */
982  default:
983  if (yyres)
984  yyres[yyn] = *yyp;
985  yyn++;
986  break;
987 
988  case '"':
989  if (yyres)
990  yyres[yyn] = '\0';
991  return yyn;
992  }
993  do_not_strip_quotes: ;
994  }
995 
996  if (! yyres)
997  return yystrlen (yystr);
998 
999  return yystpcpy (yyres, yystr) - yyres;
1000 }
1001 # endif
1002 
1003 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1004  about the unexpected token YYTOKEN for the state stack whose top is
1005  YYSSP.
1006 
1007  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1008  not large enough to hold the message. In that case, also set
1009  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1010  required number of bytes is too large to store. */
1011 static int
1012 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1013  yytype_int16 *yyssp, int yytoken)
1014 {
1015  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1016  YYSIZE_T yysize = yysize0;
1017  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1018  /* Internationalized format string. */
1019  const char *yyformat = YY_NULLPTR;
1020  /* Arguments of yyformat. */
1021  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1022  /* Number of reported tokens (one for the "unexpected", one per
1023  "expected"). */
1024  int yycount = 0;
1025 
1026  /* There are many possibilities here to consider:
1027  - If this state is a consistent state with a default action, then
1028  the only way this function was invoked is if the default action
1029  is an error action. In that case, don't check for expected
1030  tokens because there are none.
1031  - The only way there can be no lookahead present (in yychar) is if
1032  this state is a consistent state with a default action. Thus,
1033  detecting the absence of a lookahead is sufficient to determine
1034  that there is no unexpected or expected token to report. In that
1035  case, just report a simple "syntax error".
1036  - Don't assume there isn't a lookahead just because this state is a
1037  consistent state with a default action. There might have been a
1038  previous inconsistent state, consistent state with a non-default
1039  action, or user semantic action that manipulated yychar.
1040  - Of course, the expected token list depends on states to have
1041  correct lookahead information, and it depends on the parser not
1042  to perform extra reductions after fetching a lookahead from the
1043  scanner and before detecting a syntax error. Thus, state merging
1044  (from LALR or IELR) and default reductions corrupt the expected
1045  token list. However, the list is correct for canonical LR with
1046  one exception: it will still contain any token that will not be
1047  accepted due to an error action in a later state.
1048  */
1049  if (yytoken != YYEMPTY)
1050  {
1051  int yyn = yypact[*yyssp];
1052  yyarg[yycount++] = yytname[yytoken];
1053  if (!yypact_value_is_default (yyn))
1054  {
1055  /* Start YYX at -YYN if negative to avoid negative indexes in
1056  YYCHECK. In other words, skip the first -YYN actions for
1057  this state because they are default actions. */
1058  int yyxbegin = yyn < 0 ? -yyn : 0;
1059  /* Stay within bounds of both yycheck and yytname. */
1060  int yychecklim = YYLAST - yyn + 1;
1061  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1062  int yyx;
1063 
1064  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1065  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1066  && !yytable_value_is_error (yytable[yyx + yyn]))
1067  {
1068  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1069  {
1070  yycount = 1;
1071  yysize = yysize0;
1072  break;
1073  }
1074  yyarg[yycount++] = yytname[yyx];
1075  {
1076  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1077  if (! (yysize <= yysize1
1078  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1079  return 2;
1080  yysize = yysize1;
1081  }
1082  }
1083  }
1084  }
1085 
1086  switch (yycount)
1087  {
1088 # define YYCASE_(N, S) \
1089  case N: \
1090  yyformat = S; \
1091  break
1092  default: /* Avoid compiler warnings. */
1093  YYCASE_(0, YY_("syntax error"));
1094  YYCASE_(1, YY_("syntax error, unexpected %s"));
1095  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1096  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1097  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1098  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1099 # undef YYCASE_
1100  }
1101 
1102  {
1103  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1104  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1105  return 2;
1106  yysize = yysize1;
1107  }
1108 
1109  if (*yymsg_alloc < yysize)
1110  {
1111  *yymsg_alloc = 2 * yysize;
1112  if (! (yysize <= *yymsg_alloc
1113  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1114  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1115  return 1;
1116  }
1117 
1118  /* Avoid sprintf, as that infringes on the user's name space.
1119  Don't have undefined behavior even if the translation
1120  produced a string with the wrong number of "%s"s. */
1121  {
1122  char *yyp = *yymsg;
1123  int yyi = 0;
1124  while ((*yyp = *yyformat) != '\0')
1125  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1126  {
1127  yyp += yytnamerr (yyp, yyarg[yyi++]);
1128  yyformat += 2;
1129  }
1130  else
1131  {
1132  yyp++;
1133  yyformat++;
1134  }
1135  }
1136  return 0;
1137 }
1138 #endif /* YYERROR_VERBOSE */
1139 
1140 /*-----------------------------------------------.
1141 | Release the memory associated to this symbol. |
1142 `-----------------------------------------------*/
1143 
1144 static void
1145 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, COND_input *info)
1146 {
1147  YYUSE (yyvaluep);
1148  YYUSE (info);
1149  if (!yymsg)
1150  yymsg = "Deleting";
1151  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1152 
1154  YYUSE (yytype);
1156 }
1157 
1158 
1159 
1160 
1161 /*----------.
1162 | yyparse. |
1163 `----------*/
1164 
1165 int
1167 {
1168 /* The lookahead symbol. */
1169 int yychar;
1170 
1171 
1172 /* The semantic value of the lookahead symbol. */
1173 /* Default value used for initialization, for pacifying older GCCs
1174  or non-GCC compilers. */
1175 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1176 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1177 
1178  /* Number of syntax errors so far. */
1179  int yynerrs;
1180 
1181  int yystate;
1182  /* Number of tokens to shift before error messages enabled. */
1183  int yyerrstatus;
1184 
1185  /* The stacks and their tools:
1186  'yyss': related to states.
1187  'yyvs': related to semantic values.
1188 
1189  Refer to the stacks through separate pointers, to allow yyoverflow
1190  to reallocate them elsewhere. */
1191 
1192  /* The state stack. */
1193  yytype_int16 yyssa[YYINITDEPTH];
1194  yytype_int16 *yyss;
1195  yytype_int16 *yyssp;
1196 
1197  /* The semantic value stack. */
1198  YYSTYPE yyvsa[YYINITDEPTH];
1199  YYSTYPE *yyvs;
1200  YYSTYPE *yyvsp;
1201 
1202  YYSIZE_T yystacksize;
1203 
1204  int yyn;
1205  int yyresult;
1206  /* Lookahead token as an internal (translated) token number. */
1207  int yytoken = 0;
1208  /* The variables used to return semantic value and location from the
1209  action routines. */
1210  YYSTYPE yyval;
1211 
1212 #if YYERROR_VERBOSE
1213  /* Buffer for error messages, and its allocated size. */
1214  char yymsgbuf[128];
1215  char *yymsg = yymsgbuf;
1216  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1217 #endif
1218 
1219 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1220 
1221  /* The number of symbols on the RHS of the reduced rule.
1222  Keep to zero when no symbol should be popped. */
1223  int yylen = 0;
1224 
1225  yyssp = yyss = yyssa;
1226  yyvsp = yyvs = yyvsa;
1227  yystacksize = YYINITDEPTH;
1228 
1229  YYDPRINTF ((stderr, "Starting parse\n"));
1230 
1231  yystate = 0;
1232  yyerrstatus = 0;
1233  yynerrs = 0;
1234  yychar = YYEMPTY; /* Cause a token to be read. */
1235  goto yysetstate;
1236 
1237 /*------------------------------------------------------------.
1238 | yynewstate -- Push a new state, which is found in yystate. |
1239 `------------------------------------------------------------*/
1240  yynewstate:
1241  /* In all cases, when you get here, the value and location stacks
1242  have just been pushed. So pushing a state here evens the stacks. */
1243  yyssp++;
1244 
1245  yysetstate:
1246  *yyssp = yystate;
1247 
1248  if (yyss + yystacksize - 1 <= yyssp)
1249  {
1250  /* Get the current used size of the three stacks, in elements. */
1251  YYSIZE_T yysize = yyssp - yyss + 1;
1252 
1253 #ifdef yyoverflow
1254  {
1255  /* Give user a chance to reallocate the stack. Use copies of
1256  these so that the &'s don't force the real ones into
1257  memory. */
1258  YYSTYPE *yyvs1 = yyvs;
1259  yytype_int16 *yyss1 = yyss;
1260 
1261  /* Each stack pointer address is followed by the size of the
1262  data in use in that stack, in bytes. This used to be a
1263  conditional around just the two extra args, but that might
1264  be undefined if yyoverflow is a macro. */
1265  yyoverflow (YY_("memory exhausted"),
1266  &yyss1, yysize * sizeof (*yyssp),
1267  &yyvs1, yysize * sizeof (*yyvsp),
1268  &yystacksize);
1269 
1270  yyss = yyss1;
1271  yyvs = yyvs1;
1272  }
1273 #else /* no yyoverflow */
1274 # ifndef YYSTACK_RELOCATE
1275  goto yyexhaustedlab;
1276 # else
1277  /* Extend the stack our own way. */
1278  if (YYMAXDEPTH <= yystacksize)
1279  goto yyexhaustedlab;
1280  yystacksize *= 2;
1281  if (YYMAXDEPTH < yystacksize)
1282  yystacksize = YYMAXDEPTH;
1283 
1284  {
1285  yytype_int16 *yyss1 = yyss;
1286  union yyalloc *yyptr =
1287  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1288  if (! yyptr)
1289  goto yyexhaustedlab;
1290  YYSTACK_RELOCATE (yyss_alloc, yyss);
1291  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1292 # undef YYSTACK_RELOCATE
1293  if (yyss1 != yyssa)
1294  YYSTACK_FREE (yyss1);
1295  }
1296 # endif
1297 #endif /* no yyoverflow */
1298 
1299  yyssp = yyss + yysize - 1;
1300  yyvsp = yyvs + yysize - 1;
1301 
1302  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1303  (unsigned long) yystacksize));
1304 
1305  if (yyss + yystacksize - 1 <= yyssp)
1306  YYABORT;
1307  }
1308 
1309  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1310 
1311  if (yystate == YYFINAL)
1312  YYACCEPT;
1313 
1314  goto yybackup;
1315 
1316 /*-----------.
1317 | yybackup. |
1318 `-----------*/
1319 yybackup:
1320 
1321  /* Do appropriate processing given the current state. Read a
1322  lookahead token if we need one and don't already have one. */
1323 
1324  /* First try to decide what to do without reference to lookahead token. */
1325  yyn = yypact[yystate];
1326  if (yypact_value_is_default (yyn))
1327  goto yydefault;
1328 
1329  /* Not known => get a lookahead token if don't already have one. */
1330 
1331  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1332  if (yychar == YYEMPTY)
1333  {
1334  YYDPRINTF ((stderr, "Reading a token: "));
1335  yychar = yylex (&yylval, info);
1336  }
1337 
1338  if (yychar <= YYEOF)
1339  {
1340  yychar = yytoken = YYEOF;
1341  YYDPRINTF ((stderr, "Now at end of input.\n"));
1342  }
1343  else
1344  {
1345  yytoken = YYTRANSLATE (yychar);
1346  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1347  }
1348 
1349  /* If the proper action on seeing token YYTOKEN is to reduce or to
1350  detect an error, take that action. */
1351  yyn += yytoken;
1352  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1353  goto yydefault;
1354  yyn = yytable[yyn];
1355  if (yyn <= 0)
1356  {
1357  if (yytable_value_is_error (yyn))
1358  goto yyerrlab;
1359  yyn = -yyn;
1360  goto yyreduce;
1361  }
1362 
1363  /* Count tokens shifted since error; after three, turn off error
1364  status. */
1365  if (yyerrstatus)
1366  yyerrstatus--;
1367 
1368  /* Shift the lookahead token. */
1369  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1370 
1371  /* Discard the shifted token. */
1372  yychar = YYEMPTY;
1373 
1374  yystate = yyn;
1376  *++yyvsp = yylval;
1378 
1379  goto yynewstate;
1380 
1381 
1382 /*-----------------------------------------------------------.
1383 | yydefault -- do the default action for the current state. |
1384 `-----------------------------------------------------------*/
1385 yydefault:
1386  yyn = yydefact[yystate];
1387  if (yyn == 0)
1388  goto yyerrlab;
1389  goto yyreduce;
1390 
1391 
1392 /*-----------------------------.
1393 | yyreduce -- Do a reduction. |
1394 `-----------------------------*/
1395 yyreduce:
1396  /* yyn is the number of a rule to reduce with. */
1397  yylen = yyr2[yyn];
1398 
1399  /* If YYLEN is nonzero, implement the default value of the action:
1400  '$$ = $1'.
1401 
1402  Otherwise, the following line sets YYVAL to garbage.
1403  This behavior is undocumented and Bison
1404  users should not rely upon it. Assigning to YYVAL
1405  unconditionally makes the parser a bit smaller, and it avoids a
1406  GCC warning that YYVAL may be used uninitialized. */
1407  yyval = yyvsp[1-yylen];
1408 
1409 
1410  YY_REDUCE_PRINT (yyn);
1411  switch (yyn)
1412  {
1413  case 2:
1414 #line 150 "cond.y" /* yacc.c:1651 */
1415  {
1416  COND_input* cond = (COND_input*) info;
1417  cond->result = (yyvsp[0].bool);
1418  }
1419 #line 1420 "cond.tab.c" /* yacc.c:1651 */
1420  break;
1421 
1422  case 3:
1423 #line 155 "cond.y" /* yacc.c:1651 */
1424  {
1425  COND_input* cond = (COND_input*) info;
1426  cond->result = MSICONDITION_NONE;
1427  }
1428 #line 1429 "cond.tab.c" /* yacc.c:1651 */
1429  break;
1430 
1431  case 4:
1432 #line 163 "cond.y" /* yacc.c:1651 */
1433  {
1434  (yyval.bool) = (yyvsp[0].bool);
1435  }
1436 #line 1437 "cond.tab.c" /* yacc.c:1651 */
1437  break;
1438 
1439  case 5:
1440 #line 167 "cond.y" /* yacc.c:1651 */
1441  {
1442  (yyval.bool) = (yyvsp[-2].bool) || (yyvsp[0].bool);
1443  }
1444 #line 1445 "cond.tab.c" /* yacc.c:1651 */
1445  break;
1446 
1447  case 6:
1448 #line 171 "cond.y" /* yacc.c:1651 */
1449  {
1450  (yyval.bool) = !(yyvsp[-2].bool) || (yyvsp[0].bool);
1451  }
1452 #line 1453 "cond.tab.c" /* yacc.c:1651 */
1453  break;
1454 
1455  case 7:
1456 #line 175 "cond.y" /* yacc.c:1651 */
1457  {
1458  (yyval.bool) = ( (yyvsp[-2].bool) || (yyvsp[0].bool) ) && !( (yyvsp[-2].bool) && (yyvsp[0].bool) );
1459  }
1460 #line 1461 "cond.tab.c" /* yacc.c:1651 */
1461  break;
1462 
1463  case 8:
1464 #line 179 "cond.y" /* yacc.c:1651 */
1465  {
1466  (yyval.bool) = ( (yyvsp[-2].bool) && (yyvsp[0].bool) ) || ( !(yyvsp[-2].bool) && !(yyvsp[0].bool) );
1467  }
1468 #line 1469 "cond.tab.c" /* yacc.c:1651 */
1469  break;
1470 
1471  case 9:
1472 #line 186 "cond.y" /* yacc.c:1651 */
1473  {
1474  (yyval.bool) = (yyvsp[0].bool);
1475  }
1476 #line 1477 "cond.tab.c" /* yacc.c:1651 */
1477  break;
1478 
1479  case 10:
1480 #line 190 "cond.y" /* yacc.c:1651 */
1481  {
1482  (yyval.bool) = (yyvsp[-2].bool) && (yyvsp[0].bool);
1483  }
1484 #line 1485 "cond.tab.c" /* yacc.c:1651 */
1485  break;
1486 
1487  case 11:
1488 #line 197 "cond.y" /* yacc.c:1651 */
1489  {
1490  (yyval.bool) = !(yyvsp[0].bool);
1491  }
1492 #line 1493 "cond.tab.c" /* yacc.c:1651 */
1493  break;
1494 
1495  case 12:
1496 #line 201 "cond.y" /* yacc.c:1651 */
1497  {
1498  if ((yyvsp[0].value).type == VALUE_INTEGER)
1499  (yyval.bool) = (yyvsp[0].value).u.integer ? 1 : 0;
1500  else
1501  (yyval.bool) = (yyvsp[0].value).u.string && (yyvsp[0].value).u.string[0];
1502  value_free( (yyvsp[0].value) );
1503  }
1504 #line 1505 "cond.tab.c" /* yacc.c:1651 */
1505  break;
1506 
1507  case 13:
1508 #line 209 "cond.y" /* yacc.c:1651 */
1509  {
1510  if ((yyvsp[-2].value).type == VALUE_INTEGER && (yyvsp[0].value).type == VALUE_INTEGER)
1511  {
1512  (yyval.bool) = compare_int((yyvsp[-2].value).u.integer, (yyvsp[-1].operator), (yyvsp[0].value).u.integer);
1513  }
1514  else if ((yyvsp[-2].value).type != VALUE_INTEGER && (yyvsp[0].value).type != VALUE_INTEGER)
1515  {
1516  (yyval.bool) = compare_string((yyvsp[-2].value).u.string, (yyvsp[-1].operator), (yyvsp[0].value).u.string,
1517  (yyvsp[-2].value).type == VALUE_SYMBOL || (yyvsp[0].value).type == VALUE_SYMBOL);
1518  }
1519  else if ((yyvsp[-2].value).type == VALUE_LITERAL || (yyvsp[0].value).type == VALUE_LITERAL)
1520  {
1521  (yyval.bool) = ((yyvsp[-1].operator) == COND_NE || (yyvsp[-1].operator) == COND_INE );
1522  }
1523  else if ((yyvsp[-2].value).type == VALUE_SYMBOL) /* symbol operator integer */
1524  {
1525  int num;
1526  if (num_from_prop( (yyvsp[-2].value).u.string, &num ))
1527  (yyval.bool) = compare_int( num, (yyvsp[-1].operator), (yyvsp[0].value).u.integer );
1528  else
1529  (yyval.bool) = ((yyvsp[-1].operator) == COND_NE || (yyvsp[-1].operator) == COND_INE );
1530  }
1531  else /* integer operator symbol */
1532  {
1533  int num;
1534  if (num_from_prop( (yyvsp[0].value).u.string, &num ))
1535  (yyval.bool) = compare_int( (yyvsp[-2].value).u.integer, (yyvsp[-1].operator), num );
1536  else
1537  (yyval.bool) = ((yyvsp[-1].operator) == COND_NE || (yyvsp[-1].operator) == COND_INE );
1538  }
1539 
1540  value_free( (yyvsp[-2].value) );
1541  value_free( (yyvsp[0].value) );
1542  }
1543 #line 1544 "cond.tab.c" /* yacc.c:1651 */
1544  break;
1545 
1546  case 14:
1547 #line 244 "cond.y" /* yacc.c:1651 */
1548  {
1549  (yyval.bool) = (yyvsp[-1].bool);
1550  }
1551 #line 1552 "cond.tab.c" /* yacc.c:1651 */
1552  break;
1553 
1554  case 15:
1555 #line 251 "cond.y" /* yacc.c:1651 */
1556  { (yyval.operator) = COND_EQ; }
1557 #line 1558 "cond.tab.c" /* yacc.c:1651 */
1558  break;
1559 
1560  case 16:
1561 #line 252 "cond.y" /* yacc.c:1651 */
1562  { (yyval.operator) = COND_NE; }
1563 #line 1564 "cond.tab.c" /* yacc.c:1651 */
1564  break;
1565 
1566  case 17:
1567 #line 253 "cond.y" /* yacc.c:1651 */
1568  { (yyval.operator) = COND_LT; }
1569 #line 1570 "cond.tab.c" /* yacc.c:1651 */
1570  break;
1571 
1572  case 18:
1573 #line 254 "cond.y" /* yacc.c:1651 */
1574  { (yyval.operator) = COND_GT; }
1575 #line 1576 "cond.tab.c" /* yacc.c:1651 */
1576  break;
1577 
1578  case 19:
1579 #line 255 "cond.y" /* yacc.c:1651 */
1580  { (yyval.operator) = COND_LE; }
1581 #line 1582 "cond.tab.c" /* yacc.c:1651 */
1582  break;
1583 
1584  case 20:
1585 #line 256 "cond.y" /* yacc.c:1651 */
1586  { (yyval.operator) = COND_GE; }
1587 #line 1588 "cond.tab.c" /* yacc.c:1651 */
1588  break;
1589 
1590  case 21:
1591 #line 257 "cond.y" /* yacc.c:1651 */
1592  { (yyval.operator) = COND_SS; }
1593 #line 1594 "cond.tab.c" /* yacc.c:1651 */
1594  break;
1595 
1596  case 22:
1597 #line 258 "cond.y" /* yacc.c:1651 */
1598  { (yyval.operator) = COND_IEQ; }
1599 #line 1600 "cond.tab.c" /* yacc.c:1651 */
1600  break;
1601 
1602  case 23:
1603 #line 259 "cond.y" /* yacc.c:1651 */
1604  { (yyval.operator) = COND_INE; }
1605 #line 1606 "cond.tab.c" /* yacc.c:1651 */
1606  break;
1607 
1608  case 24:
1609 #line 260 "cond.y" /* yacc.c:1651 */
1610  { (yyval.operator) = COND_ILT; }
1611 #line 1612 "cond.tab.c" /* yacc.c:1651 */
1612  break;
1613 
1614  case 25:
1615 #line 261 "cond.y" /* yacc.c:1651 */
1616  { (yyval.operator) = COND_IGT; }
1617 #line 1618 "cond.tab.c" /* yacc.c:1651 */
1618  break;
1619 
1620  case 26:
1621 #line 262 "cond.y" /* yacc.c:1651 */
1622  { (yyval.operator) = COND_ILE; }
1623 #line 1624 "cond.tab.c" /* yacc.c:1651 */
1624  break;
1625 
1626  case 27:
1627 #line 263 "cond.y" /* yacc.c:1651 */
1628  { (yyval.operator) = COND_IGE; }
1629 #line 1630 "cond.tab.c" /* yacc.c:1651 */
1630  break;
1631 
1632  case 28:
1633 #line 264 "cond.y" /* yacc.c:1651 */
1634  { (yyval.operator) = COND_ISS; }
1635 #line 1636 "cond.tab.c" /* yacc.c:1651 */
1636  break;
1637 
1638  case 29:
1639 #line 265 "cond.y" /* yacc.c:1651 */
1640  { (yyval.operator) = COND_LHS; }
1641 #line 1642 "cond.tab.c" /* yacc.c:1651 */
1642  break;
1643 
1644  case 30:
1645 #line 266 "cond.y" /* yacc.c:1651 */
1646  { (yyval.operator) = COND_RHS; }
1647 #line 1648 "cond.tab.c" /* yacc.c:1651 */
1648  break;
1649 
1650  case 31:
1651 #line 267 "cond.y" /* yacc.c:1651 */
1652  { (yyval.operator) = COND_ILHS; }
1653 #line 1654 "cond.tab.c" /* yacc.c:1651 */
1654  break;
1655 
1656  case 32:
1657 #line 268 "cond.y" /* yacc.c:1651 */
1658  { (yyval.operator) = COND_IRHS; }
1659 #line 1660 "cond.tab.c" /* yacc.c:1651 */
1660  break;
1661 
1662  case 33:
1663 #line 273 "cond.y" /* yacc.c:1651 */
1664  {
1665  COND_input* cond = (COND_input*) info;
1666  UINT len;
1667 
1668  (yyval.value).type = VALUE_SYMBOL;
1669  (yyval.value).u.string = msi_dup_property( cond->package->db, (yyvsp[0].identifier) );
1670  if ((yyval.value).u.string)
1671  {
1672  len = (lstrlenW((yyval.value).u.string) + 1) * sizeof (WCHAR);
1673  (yyval.value).u.string = cond_track_mem( cond, (yyval.value).u.string, len );
1674  }
1675  cond_free( (yyvsp[0].identifier) );
1676  }
1677 #line 1678 "cond.tab.c" /* yacc.c:1651 */
1678  break;
1679 
1680  case 34:
1681 #line 287 "cond.y" /* yacc.c:1651 */
1682  {
1683  COND_input* cond = (COND_input*) info;
1684  UINT len = GetEnvironmentVariableW( (yyvsp[0].identifier), NULL, 0 );
1685  (yyval.value).type = VALUE_SYMBOL;
1686  (yyval.value).u.string = NULL;
1687  if (len++)
1688  {
1689  (yyval.value).u.string = cond_alloc( cond, len*sizeof (WCHAR) );
1690  if( !(yyval.value).u.string )
1691  YYABORT;
1692  GetEnvironmentVariableW( (yyvsp[0].identifier), (yyval.value).u.string, len );
1693  }
1694  cond_free( (yyvsp[0].identifier) );
1695  }
1696 #line 1697 "cond.tab.c" /* yacc.c:1651 */
1697  break;
1698 
1699  case 35:
1700 #line 302 "cond.y" /* yacc.c:1651 */
1701  {
1702  COND_input* cond = (COND_input*) info;
1703  (yyval.value).type = VALUE_LITERAL;
1704  (yyval.value).u.string = COND_GetLiteral( cond, &(yyvsp[0].str) );
1705  if( !(yyval.value).u.string )
1706  YYABORT;
1707  }
1708 #line 1709 "cond.tab.c" /* yacc.c:1651 */
1709  break;
1710 
1711  case 36:
1712 #line 310 "cond.y" /* yacc.c:1651 */
1713  {
1714  COND_input* cond = (COND_input*) info;
1715  LPWSTR szNum = COND_GetString( cond, &(yyvsp[0].str) );
1716  if( !szNum )
1717  YYABORT;
1718  (yyval.value).type = VALUE_INTEGER;
1719  (yyval.value).u.integer = atoiW( szNum );
1720  cond_free( szNum );
1721  }
1722 #line 1723 "cond.tab.c" /* yacc.c:1651 */
1723  break;
1724 
1725  case 37:
1726 #line 320 "cond.y" /* yacc.c:1651 */
1727  {
1728  COND_input* cond = (COND_input*) info;
1730 
1731  if(MSI_GetComponentStateW(cond->package, (yyvsp[0].identifier), &install, &action ) != ERROR_SUCCESS)
1732  {
1733  (yyval.value).type = VALUE_LITERAL;
1734  (yyval.value).u.string = NULL;
1735  }
1736  else
1737  {
1738  (yyval.value).type = VALUE_INTEGER;
1739  (yyval.value).u.integer = action;
1740  }
1741  cond_free( (yyvsp[0].identifier) );
1742  }
1743 #line 1744 "cond.tab.c" /* yacc.c:1651 */
1744  break;
1745 
1746  case 38:
1747 #line 337 "cond.y" /* yacc.c:1651 */
1748  {
1749  COND_input* cond = (COND_input*) info;
1751 
1752  if(MSI_GetComponentStateW(cond->package, (yyvsp[0].identifier), &install, &action ) != ERROR_SUCCESS)
1753  {
1754  (yyval.value).type = VALUE_LITERAL;
1755  (yyval.value).u.string = NULL;
1756  }
1757  else
1758  {
1759  (yyval.value).type = VALUE_INTEGER;
1760  (yyval.value).u.integer = install;
1761  }
1762  cond_free( (yyvsp[0].identifier) );
1763  }
1764 #line 1765 "cond.tab.c" /* yacc.c:1651 */
1765  break;
1766 
1767  case 39:
1768 #line 354 "cond.y" /* yacc.c:1651 */
1769  {
1770  COND_input* cond = (COND_input*) info;
1772 
1773  if (MSI_GetFeatureStateW(cond->package, (yyvsp[0].identifier), &install, &action ) != ERROR_SUCCESS)
1774  {
1775  (yyval.value).type = VALUE_LITERAL;
1776  (yyval.value).u.string = NULL;
1777  }
1778  else
1779  {
1780  (yyval.value).type = VALUE_INTEGER;
1781  (yyval.value).u.integer = action;
1782  }
1783  cond_free( (yyvsp[0].identifier) );
1784  }
1785 #line 1786 "cond.tab.c" /* yacc.c:1651 */
1786  break;
1787 
1788  case 40:
1789 #line 371 "cond.y" /* yacc.c:1651 */
1790  {
1791  COND_input* cond = (COND_input*) info;
1793 
1794  if(MSI_GetFeatureStateW(cond->package, (yyvsp[0].identifier), &install, &action ) != ERROR_SUCCESS)
1795  {
1796  (yyval.value).type = VALUE_LITERAL;
1797  (yyval.value).u.string = NULL;
1798  }
1799  else
1800  {
1801  (yyval.value).type = VALUE_INTEGER;
1802  (yyval.value).u.integer = install;
1803  }
1804  cond_free( (yyvsp[0].identifier) );
1805  }
1806 #line 1807 "cond.tab.c" /* yacc.c:1651 */
1807  break;
1808 
1809  case 41:
1810 #line 391 "cond.y" /* yacc.c:1651 */
1811  {
1812  COND_input* cond = (COND_input*) info;
1813  (yyval.identifier) = COND_GetString( cond, &(yyvsp[0].str) );
1814  if( !(yyval.identifier) )
1815  YYABORT;
1816  }
1817 #line 1818 "cond.tab.c" /* yacc.c:1651 */
1818  break;
1819 
1820 
1821 #line 1822 "cond.tab.c" /* yacc.c:1651 */
1822  default: break;
1823  }
1824  /* User semantic actions sometimes alter yychar, and that requires
1825  that yytoken be updated with the new translation. We take the
1826  approach of translating immediately before every use of yytoken.
1827  One alternative is translating here after every semantic action,
1828  but that translation would be missed if the semantic action invokes
1829  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1830  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
1831  incorrect destructor might then be invoked immediately. In the
1832  case of YYERROR or YYBACKUP, subsequent parser actions might lead
1833  to an incorrect destructor call or verbose syntax error message
1834  before the lookahead is translated. */
1835  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1836 
1837  YYPOPSTACK (yylen);
1838  yylen = 0;
1839  YY_STACK_PRINT (yyss, yyssp);
1840 
1841  *++yyvsp = yyval;
1842 
1843  /* Now 'shift' the result of the reduction. Determine what state
1844  that goes to, based on the state we popped back to and the rule
1845  number reduced by. */
1846 
1847  yyn = yyr1[yyn];
1848 
1849  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1850  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1851  yystate = yytable[yystate];
1852  else
1853  yystate = yydefgoto[yyn - YYNTOKENS];
1854 
1855  goto yynewstate;
1856 
1857 
1858 /*--------------------------------------.
1859 | yyerrlab -- here on detecting error. |
1860 `--------------------------------------*/
1861 yyerrlab:
1862  /* Make sure we have latest lookahead translation. See comments at
1863  user semantic actions for why this is necessary. */
1864  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1865 
1866  /* If not already recovering from an error, report this error. */
1867  if (!yyerrstatus)
1868  {
1869  ++yynerrs;
1870 #if ! YYERROR_VERBOSE
1871  yyerror (info, YY_("syntax error"));
1872 #else
1873 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1874  yyssp, yytoken)
1875  {
1876  char const *yymsgp = YY_("syntax error");
1877  int yysyntax_error_status;
1878  yysyntax_error_status = YYSYNTAX_ERROR;
1879  if (yysyntax_error_status == 0)
1880  yymsgp = yymsg;
1881  else if (yysyntax_error_status == 1)
1882  {
1883  if (yymsg != yymsgbuf)
1884  YYSTACK_FREE (yymsg);
1885  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
1886  if (!yymsg)
1887  {
1888  yymsg = yymsgbuf;
1889  yymsg_alloc = sizeof yymsgbuf;
1890  yysyntax_error_status = 2;
1891  }
1892  else
1893  {
1894  yysyntax_error_status = YYSYNTAX_ERROR;
1895  yymsgp = yymsg;
1896  }
1897  }
1898  yyerror (info, yymsgp);
1899  if (yysyntax_error_status == 2)
1900  goto yyexhaustedlab;
1901  }
1902 # undef YYSYNTAX_ERROR
1903 #endif
1904  }
1905 
1906 
1907 
1908  if (yyerrstatus == 3)
1909  {
1910  /* If just tried and failed to reuse lookahead token after an
1911  error, discard it. */
1912 
1913  if (yychar <= YYEOF)
1914  {
1915  /* Return failure if at end of input. */
1916  if (yychar == YYEOF)
1917  YYABORT;
1918  }
1919  else
1920  {
1921  yydestruct ("Error: discarding",
1922  yytoken, &yylval, info);
1923  yychar = YYEMPTY;
1924  }
1925  }
1926 
1927  /* Else will try to reuse lookahead token after shifting the error
1928  token. */
1929  goto yyerrlab1;
1930 
1931 
1932 /*---------------------------------------------------.
1933 | yyerrorlab -- error raised explicitly by YYERROR. |
1934 `---------------------------------------------------*/
1935 yyerrorlab:
1936 
1937  /* Pacify compilers like GCC when the user code never invokes
1938  YYERROR and the label yyerrorlab therefore never appears in user
1939  code. */
1940  if (/*CONSTCOND*/ 0)
1941  goto yyerrorlab;
1942 
1943  /* Do not reclaim the symbols of the rule whose action triggered
1944  this YYERROR. */
1945  YYPOPSTACK (yylen);
1946  yylen = 0;
1947  YY_STACK_PRINT (yyss, yyssp);
1948  yystate = *yyssp;
1949  goto yyerrlab1;
1950 
1951 
1952 /*-------------------------------------------------------------.
1953 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1954 `-------------------------------------------------------------*/
1955 yyerrlab1:
1956  yyerrstatus = 3; /* Each real token shifted decrements this. */
1957 
1958  for (;;)
1959  {
1960  yyn = yypact[yystate];
1961  if (!yypact_value_is_default (yyn))
1962  {
1963  yyn += YYTERROR;
1964  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1965  {
1966  yyn = yytable[yyn];
1967  if (0 < yyn)
1968  break;
1969  }
1970  }
1971 
1972  /* Pop the current state because it cannot handle the error token. */
1973  if (yyssp == yyss)
1974  YYABORT;
1975 
1976 
1977  yydestruct ("Error: popping",
1978  yystos[yystate], yyvsp, info);
1979  YYPOPSTACK (1);
1980  yystate = *yyssp;
1981  YY_STACK_PRINT (yyss, yyssp);
1982  }
1983 
1985  *++yyvsp = yylval;
1987 
1988 
1989  /* Shift the error token. */
1990  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1991 
1992  yystate = yyn;
1993  goto yynewstate;
1994 
1995 
1996 /*-------------------------------------.
1997 | yyacceptlab -- YYACCEPT comes here. |
1998 `-------------------------------------*/
1999 yyacceptlab:
2000  yyresult = 0;
2001  goto yyreturn;
2002 
2003 /*-----------------------------------.
2004 | yyabortlab -- YYABORT comes here. |
2005 `-----------------------------------*/
2006 yyabortlab:
2007  yyresult = 1;
2008  goto yyreturn;
2009 
2010 #if !defined yyoverflow || YYERROR_VERBOSE
2011 /*-------------------------------------------------.
2012 | yyexhaustedlab -- memory exhaustion comes here. |
2013 `-------------------------------------------------*/
2014 yyexhaustedlab:
2015  yyerror (info, YY_("memory exhausted"));
2016  yyresult = 2;
2017  /* Fall through. */
2018 #endif
2019 
2020 yyreturn:
2021  if (yychar != YYEMPTY)
2022  {
2023  /* Make sure we have latest lookahead translation. See comments at
2024  user semantic actions for why this is necessary. */
2025  yytoken = YYTRANSLATE (yychar);
2026  yydestruct ("Cleanup: discarding lookahead",
2027  yytoken, &yylval, info);
2028  }
2029  /* Do not reclaim the symbols of the rule whose action triggered
2030  this YYABORT or YYACCEPT. */
2031  YYPOPSTACK (yylen);
2032  YY_STACK_PRINT (yyss, yyssp);
2033  while (yyssp != yyss)
2034  {
2035  yydestruct ("Cleanup: popping",
2036  yystos[*yyssp], yyvsp, info);
2037  YYPOPSTACK (1);
2038  }
2039 #ifndef yyoverflow
2040  if (yyss != yyssa)
2041  YYSTACK_FREE (yyss);
2042 #endif
2043 #if YYERROR_VERBOSE
2044  if (yymsg != yymsgbuf)
2045  YYSTACK_FREE (yymsg);
2046 #endif
2047  return yyresult;
2048 }
2049 #line 399 "cond.y" /* yacc.c:1910 */
2050 
2051 
2052 
2053 static int COND_IsAlpha( WCHAR x )
2054 {
2055  return( ( ( x >= 'A' ) && ( x <= 'Z' ) ) ||
2056  ( ( x >= 'a' ) && ( x <= 'z' ) ) ||
2057  ( ( x == '_' ) ) );
2058 }
2059 
2060 static int COND_IsNumber( WCHAR x )
2061 {
2062  return( (( x >= '0' ) && ( x <= '9' )) || (x =='-') || (x =='.') );
2063 }
2064 
2065 static WCHAR *strstriW( const WCHAR *str, const WCHAR *sub )
2066 {
2067  LPWSTR strlower, sublower, r;
2068  strlower = CharLowerW( strdupW( str ) );
2069  sublower = CharLowerW( strdupW( sub ) );
2070  r = strstrW( strlower, sublower );
2071  if (r)
2072  r = (LPWSTR)str + (r - strlower);
2073  msi_free( strlower );
2074  msi_free( sublower );
2075  return r;
2076 }
2077 
2079 {
2080  int i;
2081 
2082  if (!*str)
2083  return FALSE;
2084 
2085  for (i = 0; i < lstrlenW( str ); i++)
2086  if (!isdigitW(str[i]))
2087  return FALSE;
2088 
2089  return TRUE;
2090 }
2091 
2093 {
2094  int lhs, rhs;
2095 
2096  /* substring operators return 0 if LHS is missing */
2097  if (!a || !*a)
2098  return 0;
2099 
2100  /* substring operators return 1 if RHS is missing */
2101  if (!b || !*b)
2102  return 1;
2103 
2104  /* if both strings contain only numbers, use integer comparison */
2105  lhs = atoiW(a);
2106  rhs = atoiW(b);
2107  if (str_is_number(a) && str_is_number(b))
2108  return compare_int( lhs, operator, rhs );
2109 
2110  switch (operator)
2111  {
2112  case COND_SS:
2113  return strstrW( a, b ) != 0;
2114  case COND_ISS:
2115  return strstriW( a, b ) != 0;
2116  case COND_LHS:
2117  {
2118  int l = strlenW( a );
2119  int r = strlenW( b );
2120  if (r > l) return 0;
2121  return !strncmpW( a, b, r );
2122  }
2123  case COND_RHS:
2124  {
2125  int l = strlenW( a );
2126  int r = strlenW( b );
2127  if (r > l) return 0;
2128  return !strncmpW( a + (l - r), b, r );
2129  }
2130  case COND_ILHS:
2131  {
2132  int l = strlenW( a );
2133  int r = strlenW( b );
2134  if (r > l) return 0;
2135  return !strncmpiW( a, b, r );
2136  }
2137  case COND_IRHS:
2138  {
2139  int l = strlenW( a );
2140  int r = strlenW( b );
2141  if (r > l) return 0;
2142  return !strncmpiW( a + (l - r), b, r );
2143  }
2144  default:
2145  ERR("invalid substring operator\n");
2146  return 0;
2147  }
2148  return 0;
2149 }
2150 
2152 {
2153  if (operator >= COND_SS && operator <= COND_RHS)
2154  return compare_substring( a, operator, b );
2155 
2156  /* null and empty string are equivalent */
2157  if (!a) a = szEmpty;
2158  if (!b) b = szEmpty;
2159 
2160  if (convert && str_is_number(a) && str_is_number(b))
2161  return compare_int( atoiW(a), operator, atoiW(b) );
2162 
2163  /* a or b may be NULL */
2164  switch (operator)
2165  {
2166  case COND_LT:
2167  return strcmpW( a, b ) < 0;
2168  case COND_GT:
2169  return strcmpW( a, b ) > 0;
2170  case COND_EQ:
2171  return strcmpW( a, b ) == 0;
2172  case COND_NE:
2173  return strcmpW( a, b ) != 0;
2174  case COND_GE:
2175  return strcmpW( a, b ) >= 0;
2176  case COND_LE:
2177  return strcmpW( a, b ) <= 0;
2178  case COND_ILT:
2179  return strcmpiW( a, b ) < 0;
2180  case COND_IGT:
2181  return strcmpiW( a, b ) > 0;
2182  case COND_IEQ:
2183  return strcmpiW( a, b ) == 0;
2184  case COND_INE:
2185  return strcmpiW( a, b ) != 0;
2186  case COND_IGE:
2187  return strcmpiW( a, b ) >= 0;
2188  case COND_ILE:
2189  return strcmpiW( a, b ) <= 0;
2190  default:
2191  ERR("invalid string operator\n");
2192  return 0;
2193  }
2194  return 0;
2195 }
2196 
2197 
2198 static INT compare_int( INT a, INT operator, INT b )
2199 {
2200  switch (operator)
2201  {
2202  case COND_LT:
2203  case COND_ILT:
2204  return a < b;
2205  case COND_GT:
2206  case COND_IGT:
2207  return a > b;
2208  case COND_EQ:
2209  case COND_IEQ:
2210  return a == b;
2211  case COND_NE:
2212  case COND_INE:
2213  return a != b;
2214  case COND_GE:
2215  case COND_IGE:
2216  return a >= b;
2217  case COND_LE:
2218  case COND_ILE:
2219  return a <= b;
2220  case COND_SS:
2221  case COND_ISS:
2222  return ( a & b ) ? 1 : 0;
2223  case COND_RHS:
2224  return ( ( a & 0xffff ) == b ) ? 1 : 0;
2225  case COND_LHS:
2226  return ( ( (a>>16) & 0xffff ) == b ) ? 1 : 0;
2227  default:
2228  ERR("invalid integer operator\n");
2229  return 0;
2230  }
2231  return 0;
2232 }
2233 
2234 
2235 static int COND_IsIdent( WCHAR x )
2236 {
2237  return( COND_IsAlpha( x ) || COND_IsNumber( x ) || ( x == '_' )
2238  || ( x == '#' ) || (x == '.') );
2239 }
2240 
2241 static int COND_GetOperator( COND_input *cond )
2242 {
2243  static const struct {
2244  const WCHAR str[4];
2245  int id;
2246  } table[] = {
2247  { {'~','<','=',0}, COND_ILE },
2248  { {'~','>','<',0}, COND_ISS },
2249  { {'~','>','>',0}, COND_IRHS },
2250  { {'~','<','>',0}, COND_INE },
2251  { {'~','>','=',0}, COND_IGE },
2252  { {'~','<','<',0}, COND_ILHS },
2253  { {'~','=',0}, COND_IEQ },
2254  { {'~','<',0}, COND_ILT },
2255  { {'~','>',0}, COND_IGT },
2256  { {'>','=',0}, COND_GE },
2257  { {'>','<',0}, COND_SS },
2258  { {'<','<',0}, COND_LHS },
2259  { {'<','>',0}, COND_NE },
2260  { {'<','=',0}, COND_LE },
2261  { {'>','>',0}, COND_RHS },
2262  { {'>',0}, COND_GT },
2263  { {'<',0}, COND_LT },
2264  { {0}, 0 }
2265  };
2266  LPCWSTR p = &cond->str[cond->n];
2267  int i = 0, len;
2268 
2269  while ( 1 )
2270  {
2271  len = lstrlenW( table[i].str );
2272  if ( !len || 0 == strncmpW( table[i].str, p, len ) )
2273  break;
2274  i++;
2275  }
2276  cond->n += len;
2277  return table[i].id;
2278 }
2279 
2280 static int COND_GetOne( struct cond_str *str, COND_input *cond )
2281 {
2282  int rc, len = 1;
2283  WCHAR ch;
2284 
2285  str->data = &cond->str[cond->n];
2286 
2287  ch = str->data[0];
2288 
2289  switch( ch )
2290  {
2291  case 0: return 0;
2292  case '(': rc = COND_LPAR; break;
2293  case ')': rc = COND_RPAR; break;
2294  case '&': rc = COND_AMPER; break;
2295  case '!': rc = COND_EXCLAM; break;
2296  case '$': rc = COND_DOLLARS; break;
2297  case '?': rc = COND_QUESTION; break;
2298  case '%': rc = COND_PERCENT; break;
2299  case ' ': rc = COND_SPACE; break;
2300  case '=': rc = COND_EQ; break;
2301 
2302  case '~':
2303  case '<':
2304  case '>':
2305  rc = COND_GetOperator( cond );
2306  if (!rc)
2307  rc = COND_ERROR;
2308  return rc;
2309  default:
2310  rc = 0;
2311  }
2312 
2313  if ( rc )
2314  {
2315  cond->n += len;
2316  return rc;
2317  }
2318 
2319  if (ch == '"' )
2320  {
2321  LPCWSTR p = strchrW( str->data + 1, '"' );
2322  if (!p) return COND_ERROR;
2323  len = p - str->data + 1;
2324  rc = COND_LITER;
2325  }
2326  else if( COND_IsAlpha( ch ) )
2327  {
2328  static const WCHAR szNot[] = {'N','O','T',0};
2329  static const WCHAR szAnd[] = {'A','N','D',0};
2330  static const WCHAR szXor[] = {'X','O','R',0};
2331  static const WCHAR szEqv[] = {'E','Q','V',0};
2332  static const WCHAR szImp[] = {'I','M','P',0};
2333  static const WCHAR szOr[] = {'O','R',0};
2334 
2335  while( COND_IsIdent( str->data[len] ) )
2336  len++;
2337  rc = COND_IDENT;
2338 
2339  if ( len == 3 )
2340  {
2341  if ( !strncmpiW( str->data, szNot, len ) )
2342  rc = COND_NOT;
2343  else if( !strncmpiW( str->data, szAnd, len ) )
2344  rc = COND_AND;
2345  else if( !strncmpiW( str->data, szXor, len ) )
2346  rc = COND_XOR;
2347  else if( !strncmpiW( str->data, szEqv, len ) )
2348  rc = COND_EQV;
2349  else if( !strncmpiW( str->data, szImp, len ) )
2350  rc = COND_IMP;
2351  }
2352  else if( (len == 2) && !strncmpiW( str->data, szOr, len ) )
2353  rc = COND_OR;
2354  }
2355  else if( COND_IsNumber( ch ) )
2356  {
2357  while( COND_IsNumber( str->data[len] ) )
2358  len++;
2359  rc = COND_NUMBER;
2360  }
2361  else
2362  {
2363  ERR("Got unknown character %c(%x)\n",ch,ch);
2364  return COND_ERROR;
2365  }
2366 
2367  cond->n += len;
2368  str->len = len;
2369 
2370  return rc;
2371 }
2372 
2373 static int cond_lex( void *COND_lval, COND_input *cond )
2374 {
2375  int rc;
2376  struct cond_str *str = COND_lval;
2377 
2378  do {
2379  rc = COND_GetOne( str, cond );
2380  } while (rc == COND_SPACE);
2381 
2382  return rc;
2383 }
2384 
2385 static LPWSTR COND_GetString( COND_input *cond, const struct cond_str *str )
2386 {
2387  LPWSTR ret;
2388 
2389  ret = cond_alloc( cond, (str->len+1) * sizeof (WCHAR) );
2390  if( ret )
2391  {
2392  memcpy( ret, str->data, str->len * sizeof(WCHAR));
2393  ret[str->len]=0;
2394  }
2395  TRACE("Got identifier %s\n",debugstr_w(ret));
2396  return ret;
2397 }
2398 
2399 static LPWSTR COND_GetLiteral( COND_input *cond, const struct cond_str *str )
2400 {
2401  LPWSTR ret;
2402 
2403  ret = cond_alloc( cond, (str->len-1) * sizeof (WCHAR) );
2404  if( ret )
2405  {
2406  memcpy( ret, str->data+1, (str->len-2) * sizeof(WCHAR) );
2407  ret[str->len - 2]=0;
2408  }
2409  TRACE("Got literal %s\n",debugstr_w(ret));
2410  return ret;
2411 }
2412 
2413 static void *cond_alloc( COND_input *cond, unsigned int sz )
2414 {
2415  struct list *mem;
2416 
2417  mem = msi_alloc( sizeof (struct list) + sz );
2418  if( !mem )
2419  return NULL;
2420 
2421  list_add_head( &(cond->mem), mem );
2422  return mem + 1;
2423 }
2424 
2425 static void *cond_track_mem( COND_input *cond, void *ptr, unsigned int sz )
2426 {
2427  void *new_ptr;
2428 
2429  if( !ptr )
2430  return ptr;
2431 
2432  new_ptr = cond_alloc( cond, sz );
2433  if( !new_ptr )
2434  {
2435  msi_free( ptr );
2436  return NULL;
2437  }
2438 
2439  memcpy( new_ptr, ptr, sz );
2440  msi_free( ptr );
2441  return new_ptr;
2442 }
2443 
2444 static void cond_free( void *ptr )
2445 {
2446  struct list *mem = (struct list *)ptr - 1;
2447 
2448  if( ptr )
2449  {
2450  list_remove( mem );
2451  msi_free( mem );
2452  }
2453 }
2454 
2455 static int cond_error( COND_input *info, const char *str )
2456 {
2457  TRACE("%s\n", str );
2458  return 0;
2459 }
2460 
2462 {
2463  COND_input cond;
2464  MSICONDITION r;
2465  struct list *mem, *safety;
2466 
2467  TRACE("%s\n", debugstr_w( szCondition ) );
2468 
2469  if (szCondition == NULL) return MSICONDITION_NONE;
2470 
2471  cond.package = package;
2472  cond.str = szCondition;
2473  cond.n = 0;
2474  cond.result = MSICONDITION_ERROR;
2475 
2476  list_init( &cond.mem );
2477 
2478  if ( !cond_parse( &cond ) )
2479  r = cond.result;
2480  else
2482 
2483  LIST_FOR_EACH_SAFE( mem, safety, &cond.mem )
2484  {
2485  /* The tracked memory lives directly after the list struct */
2486  void *ptr = mem + 1;
2487  if ( r != MSICONDITION_ERROR )
2488  WARN( "condition parser failed to free up some memory: %p\n", ptr );
2489  cond_free( ptr );
2490  }
2491 
2492  TRACE("%i <- %s\n", r, debugstr_w(szCondition));
2493  return r;
2494 }
2495 
2497 {
2498  MSIPACKAGE *package;
2499  UINT ret;
2500 
2501  package = msihandle2msiinfo( hInstall, MSIHANDLETYPE_PACKAGE);
2502  if( !package )
2503  {
2504  HRESULT hr;
2505  BSTR condition;
2506  IWineMsiRemotePackage *remote_package;
2507 
2508  remote_package = (IWineMsiRemotePackage *)msi_get_remote( hInstall );
2509  if (!remote_package)
2510  return MSICONDITION_ERROR;
2511 
2512  condition = SysAllocString( szCondition );
2513  if (!condition)
2514  {
2515  IWineMsiRemotePackage_Release( remote_package );
2516  return ERROR_OUTOFMEMORY;
2517  }
2518 
2519  hr = IWineMsiRemotePackage_EvaluateCondition( remote_package, condition );
2520 
2522  IWineMsiRemotePackage_Release( remote_package );
2523 
2524  if (FAILED(hr))
2525  {
2527  return HRESULT_CODE(hr);
2528 
2529  return ERROR_FUNCTION_FAILED;
2530  }
2531 
2532  return ERROR_SUCCESS;
2533  }
2534 
2535  ret = MSI_EvaluateConditionW( package, szCondition );
2536  msiobj_release( &package->hdr );
2537  return ret;
2538 }
2539 
2541 {
2542  LPWSTR szwCond = NULL;
2543  MSICONDITION r;
2544 
2545  szwCond = strdupAtoW( szCondition );
2546  if( szCondition && !szwCond )
2547  return MSICONDITION_ERROR;
2548 
2549  r = MsiEvaluateConditionW( hInstall, szwCond );
2550  msi_free( szwCond );
2551  return r;
2552 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
void * malloc(YYSIZE_T)
static size_t double int int int * sign
Definition: printf.c:64
static INT compare_int(INT a, INT operator, INT b)
Definition: cond.tab.c:2198
static int COND_IsAlpha(WCHAR x)
Definition: cond.tab.c:2053
static int COND_GetOne(struct cond_str *str, COND_input *cond)
Definition: cond.tab.c:2280
static BOOL num_from_prop(LPCWSTR p, INT *val)
Definition: cond.tab.c:156
static int yysyntax_error(YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken)
Definition: hlsl.tab.c:2256
INT integer
Definition: cond.tab.c:139
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:192
#define TRUE
Definition: types.h:120
static const yytype_uint8 yystos[]
Definition: cond.tab.c:703
static const yytype_uint8 yydefact[]
Definition: cond.tab.c:654
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define YYFINAL
Definition: cond.tab.c:529
int install
Definition: msacm.c:1353
static INT compare_string(LPCWSTR a, INT operator, LPCWSTR b, BOOL convert)
Definition: cond.tab.c:2151
static YYSIZE_T yystrlen(const char *yystr)
Definition: hlsl.tab.c:2169
MSIOBJECTHDR hdr
Definition: msipriv.h:385
YYLTYPE yylloc
Definition: hlsl.tab.c:2412
static WCHAR * strdupW(const WCHAR *src)
Definition: main.c:92
static void value_free(struct value val)
Definition: cond.tab.c:180
signed char yytype_int8
Definition: cond.tab.c:304
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
MSICONDITION WINAPI MsiEvaluateConditionW(MSIHANDLE hInstall, LPCWSTR szCondition)
Definition: cond.tab.c:2496
#define yychar
Definition: asmshader.tab.c:70
#define yypact_value_is_default(Yystate)
Definition: cond.tab.c:631
static BOOL str_is_number(LPCWSTR str)
Definition: cond.tab.c:2078
#define WARN(fmt,...)
Definition: debug.h:111
LPWSTR WINAPI CharLowerW(_Inout_ LPWSTR)
#define YYCASE_(N, S)
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
static void * cond_alloc(COND_input *cond, unsigned int sz)
Definition: cond.tab.c:2413
static const char *const yytname[]
Definition: hlsl.tab.c:1466
#define yyerror
Definition: cond.tab.c:65
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
static const yytype_int8 yycheck[]
Definition: cond.tab.c:690
void free(void *)
Definition: cabinet.c:147
LPWSTR identifier
Definition: cond.tab.c:269
OLECHAR * BSTR
Definition: compat.h:1934
#define YYUSE(E)
Definition: cond.tab.c:375
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
INT len
Definition: cond.tab.c:129
#define lstrlenW
Definition: compat.h:407
int32_t INT
Definition: typedefs.h:56
int cond_parse(COND_input *info)
unsigned long MSIHANDLE
Definition: msiserver.idl:25
#define yytable_value_is_error(Yytable_value)
Definition: cond.tab.c:636
struct value value
Definition: cond.tab.c:268
#define yylval
Definition: asmshader.tab.c:69
WINE_UNICODE_INLINE int strncmpW(const WCHAR *str1, const WCHAR *str2, int n)
Definition: unicode.h:235
static int COND_IsNumber(WCHAR x)
Definition: cond.tab.c:2060
static YYSIZE_T yytnamerr(char *yyres, const char *yystr)
Definition: hlsl.tab.c:2208
short int yytype_int16
else
Definition: tritemp.h:161
static int COND_IsIdent(WCHAR x)
Definition: cond.tab.c:2235
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
struct cond_str str
Definition: cond.tab.c:267
unsigned int BOOL
Definition: ntddk_ex.h:94
#define YY_NULLPTR
Definition: cond.tab.c:193
#define HRESULT_FACILITY(hr)
Definition: winerror.h:79
#define debugstr_w
Definition: kernel32.h:32
#define YYDPRINTF(Args)
Definition: cond.tab.c:893
static PVOID ptr
Definition: dispmode.c:27
MSICONDITION WINAPI MsiEvaluateConditionA(MSIHANDLE hInstall, LPCSTR szCondition)
Definition: cond.tab.c:2540
GLenum condition
Definition: glext.h:9255
#define YYSTACK_ALLOC
Definition: cond.tab.c:439
const WCHAR * str
#define strstrW(d, s)
Definition: unicode.h:32
#define YYPOPSTACK(N)
smooth NULL
Definition: ftsmooth.c:416
MSICONDITION result
Definition: cond.tab.c:123
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
static WCHAR * strstriW(const WCHAR *str, const WCHAR *sub)
Definition: cond.tab.c:2065
#define YYABORT
Definition: cond.tab.c:740
const char * LPCSTR
Definition: xmlstorage.h:183
static LPWSTR COND_GetLiteral(COND_input *info, const struct cond_str *str)
Definition: cond.tab.c:2399
#define b
Definition: ke_i.h:79
GLuint GLfloat * val
Definition: glext.h:7180
r l[0]
Definition: byte_order.h:167
#define YYSTACK_ALLOC_MAXIMUM
Definition: cond.tab.c:442
static int cond_error(COND_input *info, const char *str)
Definition: cond.tab.c:2455
#define YYMAXDEPTH
Definition: cond.tab.c:913
yytype_int16 yyss_alloc
static const WCHAR szEmpty[]
Definition: provider.c:47
#define YY_REDUCE_PRINT(Rule)
Definition: cond.tab.c:896
unsigned short yytype_uint16
Definition: cond.tab.c:310
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
INT operator
Definition: cond.tab.c:270
yytokentype
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: cond.tab.c:393
#define TRACE(s)
Definition: solgame.cpp:4
#define YYTERROR
Definition: cond.tab.c:764
int convert
Definition: msacm.c:1362
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define YYACCEPT
Definition: cond.tab.c:739
static const yytype_uint8 yytable[]
Definition: cond.tab.c:679
#define YYSIZE_T
Definition: cond.tab.c:326
LONG HRESULT
Definition: typedefs.h:77
YYSTYPE yyvs_alloc
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep, COND_input *info)
Definition: cond.tab.c:1145
#define YYSYNTAX_ERROR
#define WINAPI
Definition: msvc.h:8
#define yydebug
Definition: cond.tab.c:66
struct list mem
Definition: cond.tab.c:124
GLuint GLuint num
Definition: glext.h:9618
struct tag_yyinput COND_input
static const yytype_uint8 yyr2[]
Definition: cond.tab.c:724
MSIDATABASE * db
Definition: msipriv.h:386
WINE_DEFAULT_DEBUG_CHANNEL(msi)
unsigned char yytype_uint8
Definition: cond.tab.c:298
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:242
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: cond.tab.c:495
int ret
const WCHAR * identifier
Definition: parser.tab.c:296
enum value::value_type type
MSIPACKAGE * package
Definition: cond.tab.c:120
#define YYEOF
Definition: cond.tab.c:737
static const yytype_uint8 yytranslate[]
Definition: cond.tab.c:552
#define YY_STACK_PRINT(Bottom, Top)
Definition: cond.tab.c:895
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
int MSICONDITION
Definition: msiserver.idl:33
Definition: _list.h:228
WCHAR * string
Definition: cond.tab.c:140
static void cond_free(void *ptr)
Definition: cond.tab.c:2444
static const yytype_int8 yypgoto[]
Definition: cond.tab.c:665
#define YYTRANSLATE(YYX)
Definition: cond.tab.c:547
static char * yystpcpy(char *yydest, const char *yysrc)
Definition: hlsl.tab.c:2186
#define strcmpiW(s1, s2)
Definition: unicode.h:39
#define ERR(fmt,...)
Definition: debug.h:109
static const yytype_int8 yydefgoto[]
Definition: cond.tab.c:671
static LPWSTR COND_GetString(COND_input *info, const struct cond_str *str)
Definition: cond.tab.c:2385
#define FACILITY_WIN32
Definition: winerror.h:27
BOOL bool
Definition: cond.tab.c:271
#define YYEMPTY
Definition: cond.tab.c:736
static void * cond_track_mem(COND_input *cond, void *ptr, unsigned int sz)
Definition: cond.tab.c:2425
#define YYLAST
Definition: cond.tab.c:531
int INSTALLSTATE
Definition: msiserver.idl:35
const WCHAR * action
Definition: action.c:7783
static int COND_GetOperator(COND_input *cond)
Definition: cond.tab.c:2241
signed char yytype_int8
#define YYNTOKENS
Definition: cond.tab.c:534
WINE_UNICODE_INLINE int isdigitW(WCHAR wc)
Definition: unicode.h:170
value_type
Definition: cond.tab.c:133
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
unsigned short int yytype_uint16
unsigned int UINT
Definition: ndis.h:50
LPCWSTR str
Definition: cond.tab.c:121
static const yytype_uint8 yyr1[]
Definition: cond.tab.c:714
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: cond.tab.c:894
#define YY_(Msgid)
Definition: cond.tab.c:342
#define yylex
Definition: cond.tab.c:64
#define yynerrs
Definition: cond.tab.c:67
Definition: mem.c:156
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
#define HRESULT_CODE(hr)
Definition: winerror.h:76
static int cond_lex(void *COND_lval, COND_input *info)
Definition: cond.tab.c:2373
#define YYSTACK_FREE
Definition: cond.tab.c:440
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
MSICONDITION MSI_EvaluateConditionW(MSIPACKAGE *package, LPCWSTR szCondition)
Definition: cond.tab.c:2461
#define YYINITDEPTH
Definition: cond.tab.c:902
static void * msi_alloc(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1204
GLenum GLuint id
Definition: glext.h:5579
FILE * stderr
#define YY_INITIAL_VALUE(Value)
Definition: cond.tab.c:389
IUnknown * msi_get_remote(MSIHANDLE handle)
Definition: handle.c:182
static const yytype_int8 yypact[]
Definition: cond.tab.c:641
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
UINT MSI_GetComponentStateW(MSIPACKAGE *package, LPCWSTR szComponent, INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
Definition: install.c:1480
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define YYSTACK_BYTES(N)
Definition: cond.tab.c:484
union value::@477 u
#define GetEnvironmentVariableW(x, y, z)
Definition: compat.h:412
short yytype_int16
Definition: cond.tab.c:316
static WCHAR * strdupAtoW(const char *str)
Definition: main.c:67
UINT MSI_GetFeatureStateW(MSIPACKAGE *package, LPCWSTR szFeature, INSTALLSTATE *piInstalled, INSTALLSTATE *piAction)
Definition: install.c:1100
LPCWSTR data
Definition: cond.tab.c:128
unsigned char yytype_uint8
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: cond.tab.c:392
WINE_UNICODE_INLINE int atoiW(const WCHAR *str)
Definition: unicode.h:315
#define yyparse
Definition: cond.tab.c:63
static INT compare_substring(LPCWSTR a, INT operator, LPCWSTR b)
Definition: cond.tab.c:2092
LPWSTR msi_dup_property(MSIDATABASE *db, LPCWSTR prop) DECLSPEC_HIDDEN
Definition: package.c:2370