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