Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/ce_parse.cpp

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/* A Bison parser, made by GNU Bison 2.3. */
2
3/* Skeleton implementation for Bison's Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
22
23/* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
32
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
35
36/* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
38
39/* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
45
46/* Identify Bison output. */
47#define YYBISON 1
48
49/* Bison version. */
50#define YYBISON_VERSION "2.3"
51
52/* Skeleton name. */
53#define YYSKELETON_NAME "yacc.c"
54
55/* Pure parsers. */
56#define YYPURE 0
57
58/* Using locations. */
59#define YYLSP_NEEDED 0
60
61/* Substitute the variable and function names. */
62#define yyparse cppExpYYparse
63#define yylex cppExpYYlex
64#define yyerror cppExpYYerror
65#define yylval cppExpYYlval
66#define yychar cppExpYYchar
67#define yydebug cppExpYYdebug
68#define yynerrs cppExpYYnerrs
69
70
71/* Tokens. */
72#ifndef YYTOKENTYPE
73# define YYTOKENTYPE
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
75 know about them. */
76 enum yytokentype {
77 TOK_QUESTIONMARK = 258,
78 TOK_COLON = 259,
79 TOK_OR = 260,
80 TOK_AND = 261,
81 TOK_BITWISEOR = 262,
82 TOK_BITWISEXOR = 263,
83 TOK_AMPERSAND = 264,
84 TOK_NOTEQUAL = 265,
85 TOK_EQUAL = 266,
86 TOK_LESSTHAN = 267,
87 TOK_GREATERTHAN = 268,
88 TOK_LESSTHANOREQUALTO = 269,
89 TOK_GREATERTHANOREQUALTO = 270,
90 TOK_SHIFTLEFT = 271,
91 TOK_SHIFTRIGHT = 272,
92 TOK_PLUS = 273,
93 TOK_MINUS = 274,
94 TOK_STAR = 275,
95 TOK_DIVIDE = 276,
96 TOK_MOD = 277,
97 TOK_TILDE = 278,
98 TOK_NOT = 279,
99 TOK_LPAREN = 280,
100 TOK_RPAREN = 281,
101 TOK_OCTALINT = 282,
102 TOK_DECIMALINT = 283,
103 TOK_HEXADECIMALINT = 284,
104 TOK_CHARACTER = 285,
105 TOK_FLOAT = 286
106 };
107#endif
108/* Tokens. */
109#define TOK_QUESTIONMARK 258
110#define TOK_COLON 259
111#define TOK_OR 260
112#define TOK_AND 261
113#define TOK_BITWISEOR 262
114#define TOK_BITWISEXOR 263
115#define TOK_AMPERSAND 264
116#define TOK_NOTEQUAL 265
117#define TOK_EQUAL 266
118#define TOK_LESSTHAN 267
119#define TOK_GREATERTHAN 268
120#define TOK_LESSTHANOREQUALTO 269
121#define TOK_GREATERTHANOREQUALTO 270
122#define TOK_SHIFTLEFT 271
123#define TOK_SHIFTRIGHT 272
124#define TOK_PLUS 273
125#define TOK_MINUS 274
126#define TOK_STAR 275
127#define TOK_DIVIDE 276
128#define TOK_MOD 277
129#define TOK_TILDE 278
130#define TOK_NOT 279
131#define TOK_LPAREN 280
132#define TOK_RPAREN 281
133#define TOK_OCTALINT 282
134#define TOK_DECIMALINT 283
135#define TOK_HEXADECIMALINT 284
136#define TOK_CHARACTER 285
137#define TOK_FLOAT 286
138
139
140
141
142/* Copy the first part of user declarations. */
143
144
145
146#include "cppvalue.h"
147#include "constexp.h"
148#include "message.h"
149
150#if defined(_MSC_VER)
151#define MSDOS
152#endif
153
154#define YYSTYPE CPPValue
155
156#include <stdio.h>
157#include <stdlib.h>
158
159int cppExpYYerror(const char *s)
160{
161 warn(g_constExpFileName,g_constExpLineNr,
162 "warning: preprocessing issue while doing constant expression evaluation: %s",s);
163 return 0;
164}
165
166int cppExpYYlex();
167
168
169
170/* Enabling traces. */
171#ifndef YYDEBUG
172# define YYDEBUG 0
173#endif
174
175/* Enabling verbose error messages. */
176#ifdef YYERROR_VERBOSE
177# undef YYERROR_VERBOSE
178# define YYERROR_VERBOSE 1
179#else
180# define YYERROR_VERBOSE 0
181#endif
182
183/* Enabling the token table. */
184#ifndef YYTOKEN_TABLE
185# define YYTOKEN_TABLE 0
186#endif
187
188#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
189typedef int YYSTYPE;
190# define yystype YYSTYPE /* obsolescent; will be withdrawn */
191# define YYSTYPE_IS_DECLARED 1
192# define YYSTYPE_IS_TRIVIAL 1
193#endif
194
195
196
197/* Copy the second part of user declarations. */
198
199
200/* Line 216 of yacc.c. */
201
202
203#ifdef short
204# undef short
205#endif
206
207#ifdef YYTYPE_UINT8
208typedef YYTYPE_UINT8 yytype_uint8;
209#else
210typedef unsigned char yytype_uint8;
211#endif
212
213#ifdef YYTYPE_INT8
214typedef YYTYPE_INT8 yytype_int8;
215#elif (defined __STDC__ || defined __C99__FUNC__ \
216 || defined __cplusplus || defined _MSC_VER)
217typedef signed char yytype_int8;
218#else
219typedef short int yytype_int8;
220#endif
221
222#ifdef YYTYPE_UINT16
223typedef YYTYPE_UINT16 yytype_uint16;
224#else
225typedef unsigned short int yytype_uint16;
226#endif
227
228#ifdef YYTYPE_INT16
229typedef YYTYPE_INT16 yytype_int16;
230#else
231typedef short int yytype_int16;
232#endif
233
234#ifndef YYSIZE_T
235# ifdef __SIZE_TYPE__
236# define YYSIZE_T __SIZE_TYPE__
237# elif defined size_t
238# define YYSIZE_T size_t
239# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
240 || defined __cplusplus || defined _MSC_VER)
241# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
242# define YYSIZE_T size_t
243# else
244# define YYSIZE_T unsigned int
245# endif
246#endif
247
248#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
249
250#ifndef YY_
251# if defined YYENABLE_NLS && YYENABLE_NLS
252# if ENABLE_NLS
253# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
254# define YY_(msgid) dgettext ("bison-runtime", msgid)
255# endif
256# endif
257# ifndef YY_
258# define YY_(msgid) msgid
259# endif
260#endif
261
262/* Suppress unused-variable warnings by "using" E. */
263#if ! defined lint || defined __GNUC__
264# define YYUSE(e) ((void) (e))
265#else
266# define YYUSE(e) /* empty */
267#endif
268
269/* Identity function, used to suppress warnings about constant conditions. */
270#ifndef lint
271# define YYID(n) (n)
272#else
273#if (defined __STDC__ || defined __C99__FUNC__ \
274 || defined __cplusplus || defined _MSC_VER)
275static int
276YYID (int i)
277#else
278static int
279YYID (i)
280 int i;
281#endif
282{
283 return i;
284}
285#endif
286
287#if ! defined yyoverflow || YYERROR_VERBOSE
288
289/* The parser invokes alloca or malloc; define the necessary symbols. */
290
291# ifdef YYSTACK_USE_ALLOCA
292# if YYSTACK_USE_ALLOCA
293# ifdef __GNUC__
294# define YYSTACK_ALLOC __builtin_alloca
295# elif defined __BUILTIN_VA_ARG_INCR
296# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
297# elif defined _AIX
298# define YYSTACK_ALLOC __alloca
299# elif defined _MSC_VER
300# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
301# define alloca _alloca
302# else
303# define YYSTACK_ALLOC alloca
304# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
305 || defined __cplusplus || defined _MSC_VER)
306# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
307# ifndef _STDLIB_H
308# define _STDLIB_H 1
309# endif
310# endif
311# endif
312# endif
313# endif
314
315# ifdef YYSTACK_ALLOC
316 /* Pacify GCC's `empty if-body' warning. */
317# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
318# ifndef YYSTACK_ALLOC_MAXIMUM
319 /* The OS might guarantee only one guard page at the bottom of the stack,
320 and a page size can be as small as 4096 bytes. So we cannot safely
321 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
322 to allow for a few compiler-allocated temporary stack slots. */
323# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
324# endif
325# else
326# define YYSTACK_ALLOC YYMALLOC
327# define YYSTACK_FREE YYFREE
328# ifndef YYSTACK_ALLOC_MAXIMUM
329# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
330# endif
331# if (defined __cplusplus && ! defined _STDLIB_H \
332 && ! ((defined YYMALLOC || defined malloc) \
333 && (defined YYFREE || defined free)))
334# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
335# ifndef _STDLIB_H
336# define _STDLIB_H 1
337# endif
338# endif
339# ifndef YYMALLOC
340# define YYMALLOC malloc
341# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
342 || defined __cplusplus || defined _MSC_VER)
343void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
344# endif
345# endif
346# ifndef YYFREE
347# define YYFREE free
348# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
349 || defined __cplusplus || defined _MSC_VER)
350void free (void *); /* INFRINGES ON USER NAME SPACE */
351# endif
352# endif
353# endif
354#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
355
356
357#if (! defined yyoverflow \
358 && (! defined __cplusplus \
359 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
360
361/* A type that is properly aligned for any stack member. */
362union yyalloc
363{
364 yytype_int16 yyss;
365 YYSTYPE yyvs;
366 };
367
368/* The size of the maximum gap between one aligned stack and the next. */
369# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
370
371/* The size of an array large to enough to hold all stacks, each with
372 N elements. */
373# define YYSTACK_BYTES(N) \
374 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
375 + YYSTACK_GAP_MAXIMUM)
376
377/* Copy COUNT objects from FROM to TO. The source and destination do
378 not overlap. */
379# ifndef YYCOPY
380# if defined __GNUC__ && 1 < __GNUC__
381# define YYCOPY(To, From, Count) \
382 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
383# else
384# define YYCOPY(To, From, Count)\
385 do\
386{\
387 YYSIZE_T yyi;\
388 for (yyi = 0; yyi < (Count); yyi++)\
389 (To)[yyi] = (From)[yyi];\
390}\
391 while (YYID (0))
392# endif
393# endif
394
395/* Relocate STACK from its old location to the new one. The
396 local variables YYSIZE and YYSTACKSIZE give the old and new number of
397 elements in the stack, and YYPTR gives the new location of the
398 stack. Advance YYPTR to a properly aligned location for the next
399 stack. */
400# define YYSTACK_RELOCATE(Stack)\
401 do\
402 {\
403YYSIZE_T yynewbytes;\
404YYCOPY (&yyptr->Stack, Stack, yysize);\
405Stack = &yyptr->Stack;\
406yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
407yyptr += yynewbytes / sizeof (*yyptr);\
408 }\
409 while (YYID (0))
410
411#endif
412
413/* YYFINAL -- State number of the termination state. */
414#define YYFINAL 31
415/* YYLAST -- Last index in YYTABLE. */
416#define YYLAST 63
417
418/* YYNTOKENS -- Number of terminals. */
419#define YYNTOKENS 32
420/* YYNNTS -- Number of nonterminals. */
421#define YYNNTS 16
422/* YYNRULES -- Number of rules. */
423#define YYNRULES 44
424/* YYNRULES -- Number of states. */
425#define YYNSTATES 73
426
427/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
428#define YYUNDEFTOK 2
429#define YYMAXUTOK 286
430
431#define YYTRANSLATE(YYX)\
432 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
433
434/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
435static const yytype_uint8 yytranslate[] =
436{
437 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
463 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
464 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
465 25, 26, 27, 28, 29, 30, 31
466};
467
468#if YYDEBUG
469/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
470 YYRHS. */
471static const yytype_uint8 yyprhs[] =
472{
473 0, 0, 3, 5, 7, 13, 15, 19, 21, 25,
474 27, 31, 33, 37, 39, 43, 45, 49, 53, 55,
475 59, 63, 67, 71, 73, 77, 81, 83, 87, 91,
476 93, 97, 101, 105, 107, 110, 113, 116, 119, 121,
477 125, 127, 129, 131, 133
478};
479
480/* YYRHS -- A `-1'-separated list of the rules' RHS. */
481static const yytype_int8 yyrhs[] =
482{
483 33, 0, -1, 34, -1, 35, -1, 35, 3, 35,
484 4, 35, -1, 36, -1, 35, 5, 36, -1, 37,
485 -1, 36, 6, 37, -1, 38, -1, 37, 7, 38,
486 -1, 39, -1, 38, 8, 39, -1, 40, -1, 39,
487 9, 40, -1, 41, -1, 40, 11, 41, -1, 40,
488 10, 41, -1, 42, -1, 41, 12, 42, -1, 41,
489 13, 42, -1, 41, 14, 42, -1, 41, 15, 42,
490 -1, 43, -1, 42, 16, 43, -1, 42, 17, 43,
491 -1, 44, -1, 43, 18, 44, -1, 43, 19, 44,
492 -1, 45, -1, 44, 20, 45, -1, 44, 21, 45,
493 -1, 44, 22, 45, -1, 46, -1, 18, 45, -1,
494 19, 45, -1, 23, 45, -1, 24, 45, -1, 47,
495 -1, 25, 34, 26, -1, 27, -1, 28, -1, 29,
496 -1, 30, -1, 31, -1
497};
498
499/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
500static const yytype_uint16 yyrline[] =
501{
502 0, 77, 77, 81, 83, 92, 94, 100, 102, 108,
503 110, 117, 119, 125, 127, 133, 135, 139, 145, 147,
504 151, 155, 160, 167, 169, 173, 179, 181, 192, 205,
505 207, 218, 231, 239, 241, 243, 250, 254, 260, 262,
506 266, 268, 270, 272, 274
507};
508#endif
509
510#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
511/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
512 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
513static const char *const yytname[] =
514{
515 "$end", "error", "$undefined", "TOK_QUESTIONMARK", "TOK_COLON",
516 "TOK_OR", "TOK_AND", "TOK_BITWISEOR", "TOK_BITWISEXOR", "TOK_AMPERSAND",
517 "TOK_NOTEQUAL", "TOK_EQUAL", "TOK_LESSTHAN", "TOK_GREATERTHAN",
518 "TOK_LESSTHANOREQUALTO", "TOK_GREATERTHANOREQUALTO", "TOK_SHIFTLEFT",
519 "TOK_SHIFTRIGHT", "TOK_PLUS", "TOK_MINUS", "TOK_STAR", "TOK_DIVIDE",
520 "TOK_MOD", "TOK_TILDE", "TOK_NOT", "TOK_LPAREN", "TOK_RPAREN",
521 "TOK_OCTALINT", "TOK_DECIMALINT", "TOK_HEXADECIMALINT", "TOK_CHARACTER",
522 "TOK_FLOAT", "$accept", "start", "constant_expression",
523 "logical_or_expression", "logical_and_expression",
524 "inclusive_or_expression", "exclusive_or_expression", "and_expression",
525 "equality_expression", "relational_expression", "shift_expression",
526 "additive_expression", "multiplicative_expression", "unary_expression",
527 "primary_expression", "constant", 0
528};
529#endif
530
531# ifdef YYPRINT
532/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
533 token YYLEX-NUM. */
534static const yytype_uint16 yytoknum[] =
535{
536 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
537 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
538 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
539 285, 286
540};
541# endif
542
543/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
544static const yytype_uint8 yyr1[] =
545{
546 0, 32, 33, 34, 34, 35, 35, 36, 36, 37,
547 37, 38, 38, 39, 39, 40, 40, 40, 41, 41,
548 41, 41, 41, 42, 42, 42, 43, 43, 43, 44,
549 44, 44, 44, 45, 45, 45, 45, 45, 46, 46,
550 47, 47, 47, 47, 47
551};
552
553/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
554static const yytype_uint8 yyr2[] =
555{
556 0, 2, 1, 1, 5, 1, 3, 1, 3, 1,
557 3, 1, 3, 1, 3, 1, 3, 3, 1, 3,
558 3, 3, 3, 1, 3, 3, 1, 3, 3, 1,
559 3, 3, 3, 1, 2, 2, 2, 2, 1, 3,
560 1, 1, 1, 1, 1
561};
562
563/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
564 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
565 means the default is an error. */
566static const yytype_uint8 yydefact[] =
567{
568 0, 0, 0, 0, 0, 0, 40, 41, 42, 43,
569 44, 0, 2, 3, 5, 7, 9, 11, 13, 15,
570 18, 23, 26, 29, 33, 38, 34, 35, 36, 37,
571 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
573 0, 39, 0, 6, 8, 10, 12, 14, 17, 16,
574 19, 20, 21, 22, 24, 25, 27, 28, 30, 31,
575 32, 0, 4
576};
577
578/* YYDEFGOTO[NTERM-NUM]. */
579static const yytype_int8 yydefgoto[] =
580{
581 -1, 11, 12, 13, 14, 15, 16, 17, 18, 19,
582 20, 21, 22, 23, 24, 25
583};
584
585/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
586 STATE-NUM. */
587#define YYPACT_NINF -29
588static const yytype_int8 yypact[] =
589{
590 -13, -13, -13, -13, -13, -13, -29, -29, -29, -29,
591 -29, 13, -29, 4, 29, 1, 19, 33, 21, 7,
592 17, 18, 8, -29, -29, -29, -29, -29, -29, -29,
593 20, -29, -13, -13, -13, -13, -13, -13, -13, -13,
594 -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
595 -13, -29, 34, 29, 1, 19, 33, 21, 7, 7,
596 17, 17, 17, 17, 18, 18, 8, 8, -29, -29,
597 -29, -13, 45
598};
599
600/* YYPGOTO[NTERM-NUM]. */
601static const yytype_int8 yypgoto[] =
602{
603 -29, -29, 48, -28, 22, 23, 24, 25, 26, 2,
604 -17, 0, 5, -1, -29, -29
605};
606
607/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
608 positive, shift that token. If negative, reduce the rule which
609 number is the opposite. If zero, do what YYDEFACT says.
610 If YYTABLE_NINF, syntax error. */
611#define YYTABLE_NINF -1
612static const yytype_uint8 yytable[] =
613{
614 26, 27, 28, 29, 52, 1, 2, 32, 35, 33,
615 3, 4, 5, 31, 6, 7, 8, 9, 10, 40,
616 41, 42, 43, 60, 61, 62, 63, 36, 48, 49,
617 50, 38, 39, 44, 45, 34, 46, 47, 71, 33,
618 58, 59, 37, 72, 64, 65, 51, 68, 69, 70,
619 33, 66, 67, 30, 0, 53, 0, 54, 0, 55,
620 0, 56, 0, 57
621};
622
623static const yytype_int8 yycheck[] =
624{
625 1, 2, 3, 4, 32, 18, 19, 3, 7, 5,
626 23, 24, 25, 0, 27, 28, 29, 30, 31, 12,
627 13, 14, 15, 40, 41, 42, 43, 8, 20, 21,
628 22, 10, 11, 16, 17, 6, 18, 19, 4, 5,
629 38, 39, 9, 71, 44, 45, 26, 48, 49, 50,
630 5, 46, 47, 5, -1, 33, -1, 34, -1, 35,
631 -1, 36, -1, 37
632};
633
634/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
635 symbol of state STATE-NUM. */
636static const yytype_uint8 yystos[] =
637{
638 0, 18, 19, 23, 24, 25, 27, 28, 29, 30,
639 31, 33, 34, 35, 36, 37, 38, 39, 40, 41,
640 42, 43, 44, 45, 46, 47, 45, 45, 45, 45,
641 34, 0, 3, 5, 6, 7, 8, 9, 10, 11,
642 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
643 22, 26, 35, 36, 37, 38, 39, 40, 41, 41,
644 42, 42, 42, 42, 43, 43, 44, 44, 45, 45,
645 45, 4, 35
646};
647
648#define yyerrok(yyerrstatus = 0)
649#define yyclearin(yychar = YYEMPTY)
650#define YYEMPTY(-2)
651#define YYEOF0
652
653#define YYACCEPTgoto yyacceptlab
654#define YYABORTgoto yyabortlab
655#define YYERRORgoto yyerrorlab
656
657
658/* Like YYERROR except do call yyerror. This remains here temporarily
659 to ease the transition to the new meaning of YYERROR, for GCC.
660 Once GCC version 2 has supplanted version 1, this can go. */
661
662#define YYFAILgoto yyerrlab
663
664#define YYRECOVERING() (!!yyerrstatus)
665
666#define YYBACKUP(Token, Value)\
667do\
668 if (yychar == YYEMPTY && yylen == 1)\
669 {\
670 yychar = (Token);\
671 yylval = (Value);\
672 yytoken = YYTRANSLATE (yychar);\
673 YYPOPSTACK (1);\
674 goto yybackup;\
675 }\
676 else\
677 {\
678 yyerror (YY_("syntax error: cannot back up")); \
679 YYERROR;\
680 }\
681while (YYID (0))
682
683
684#define YYTERROR1
685#define YYERRCODE256
686
687
688/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
689 If N is 0, then set CURRENT to the empty location which ends
690 the previous symbol: RHS[0] (always defined). */
691
692#define YYRHSLOC(Rhs, K) ((Rhs)[K])
693#ifndef YYLLOC_DEFAULT
694# define YYLLOC_DEFAULT(Current, Rhs, N)\
695 do\
696 if (YYID (N)) \
697{\
698 (Current).first_line = YYRHSLOC (Rhs, 1).first_line;\
699 (Current).first_column = YYRHSLOC (Rhs, 1).first_column;\
700 (Current).last_line = YYRHSLOC (Rhs, N).last_line;\
701 (Current).last_column = YYRHSLOC (Rhs, N).last_column;\
702}\
703 else\
704{\
705 (Current).first_line = (Current).last_line =\
706 YYRHSLOC (Rhs, 0).last_line;\
707 (Current).first_column = (Current).last_column =\
708 YYRHSLOC (Rhs, 0).last_column;\
709}\
710 while (YYID (0))
711#endif
712
713
714/* YY_LOCATION_PRINT -- Print the location on the stream.
715 This macro was not mandated originally: define only if we know
716 we won't break user code: when these are the locations we know. */
717
718#ifndef YY_LOCATION_PRINT
719# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
720# define YY_LOCATION_PRINT(File, Loc)\
721 fprintf (File, "%d.%d-%d.%d",\
722 (Loc).first_line, (Loc).first_column,\
723 (Loc).last_line, (Loc).last_column)
724# else
725# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
726# endif
727#endif
728
729
730/* YYLEX -- calling `yylex' with the right arguments. */
731
732#ifdef YYLEX_PARAM
733# define YYLEX yylex (YYLEX_PARAM)
734#else
735# define YYLEX yylex ()
736#endif
737
738/* Enable debugging if requested. */
739#if YYDEBUG
740
741# ifndef YYFPRINTF
742# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
743# define YYFPRINTF fprintf
744# endif
745
746# define YYDPRINTF(Args)\
747do {\
748 if (yydebug)\
749 YYFPRINTF Args;\
750} while (YYID (0))
751
752# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
753do { \
754 if (yydebug) \
755 { \
756 YYFPRINTF (stderr, "%s ", Title); \
757 yy_symbol_print (stderr, \
758 Type, Value); \
759 YYFPRINTF (stderr, "\n"); \
760 } \
761} while (YYID (0))
762
763
764/*--------------------------------.
765| Print this symbol on YYOUTPUT. |
766`--------------------------------*/
767
768/*ARGSUSED*/
769#if (defined __STDC__ || defined __C99__FUNC__ \
770 || defined __cplusplus || defined _MSC_VER)
771static void
772yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
773#else
774static void
775yy_symbol_value_print (yyoutput, yytype, yyvaluep)
776 FILE *yyoutput;
777 int yytype;
778 YYSTYPE const * const yyvaluep;
779#endif
780{
781 if (!yyvaluep)
782 return;
783# ifdef YYPRINT
784 if (yytype < YYNTOKENS)
785 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
786# else
787 YYUSE (yyoutput);
788# endif
789 switch (yytype)
790 {
791 default:
792break;
793 }
794}
795
796
797/*--------------------------------.
798| Print this symbol on YYOUTPUT. |
799`--------------------------------*/
800
801#if (defined __STDC__ || defined __C99__FUNC__ \
802 || defined __cplusplus || defined _MSC_VER)
803static void
804yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
805#else
806static void
807yy_symbol_print (yyoutput, yytype, yyvaluep)
808 FILE *yyoutput;
809 int yytype;
810 YYSTYPE const * const yyvaluep;
811#endif
812{
813 if (yytype < YYNTOKENS)
814 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
815 else
816 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
817
818 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
819 YYFPRINTF (yyoutput, ")");
820}
821
822/*------------------------------------------------------------------.
823| yy_stack_print -- Print the state stack from its BOTTOM up to its |
824| TOP (included). |
825`------------------------------------------------------------------*/
826
827#if (defined __STDC__ || defined __C99__FUNC__ \
828 || defined __cplusplus || defined _MSC_VER)
829static void
830yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
831#else
832static void
833yy_stack_print (bottom, top)
834 yytype_int16 *bottom;
835 yytype_int16 *top;
836#endif
837{
838 YYFPRINTF (stderr, "Stack now");
839 for (; bottom <= top; ++bottom)
840 YYFPRINTF (stderr, " %d", *bottom);
841 YYFPRINTF (stderr, "\n");
842}
843
844# define YY_STACK_PRINT(Bottom, Top)\
845do {\
846 if (yydebug)\
847 yy_stack_print ((Bottom), (Top));\
848} while (YYID (0))
849
850
851/*------------------------------------------------.
852| Report that the YYRULE is going to be reduced. |
853`------------------------------------------------*/
854
855#if (defined __STDC__ || defined __C99__FUNC__ \
856 || defined __cplusplus || defined _MSC_VER)
857static void
858yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
859#else
860static void
861yy_reduce_print (yyvsp, yyrule)
862 YYSTYPE *yyvsp;
863 int yyrule;
864#endif
865{
866 int yynrhs = yyr2[yyrule];
867 int yyi;
868 unsigned long int yylno = yyrline[yyrule];
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 fprintf (stderr, " $%d = ", yyi + 1);
875 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
876 &(yyvsp[(yyi + 1) - (yynrhs)])
877 );
878 fprintf (stderr, "\n");
879 }
880}
881
882# define YY_REDUCE_PRINT(Rule)\
883do {\
884 if (yydebug)\
885 yy_reduce_print (yyvsp, Rule); \
886} while (YYID (0))
887
888/* Nonzero means print parse trace. It is left uninitialized so that
889 multiple parsers can coexist. */
890int yydebug;
891#else /* !YYDEBUG */
892# define YYDPRINTF(Args)
893# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
894# define YY_STACK_PRINT(Bottom, Top)
895# define YY_REDUCE_PRINT(Rule)
896#endif /* !YYDEBUG */
897
898
899/* YYINITDEPTH -- initial size of the parser's stacks. */
900#ifndefYYINITDEPTH
901# define YYINITDEPTH 200
902#endif
903
904/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
905 if the built-in stack extension method is used).
906
907 Do not make this value too large; the results are undefined if
908 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
909 evaluated with infinite-precision integer arithmetic. */
910
911#ifndef YYMAXDEPTH
912# define YYMAXDEPTH 10000
913#endif
914
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#if (defined __STDC__ || defined __C99__FUNC__ \
925 || defined __cplusplus || defined _MSC_VER)
926static YYSIZE_T
927yystrlen (const char *yystr)
928#else
929static YYSIZE_T
930yystrlen (yystr)
931 const char *yystr;
932#endif
933{
934 YYSIZE_T yylen;
935 for (yylen = 0; yystr[yylen]; yylen++)
936 continue;
937 return yylen;
938}
939# endif
940# endif
941
942# ifndef yystpcpy
943# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
944# define yystpcpy stpcpy
945# else
946/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
947 YYDEST. */
948#if (defined __STDC__ || defined __C99__FUNC__ \
949 || defined __cplusplus || defined _MSC_VER)
950static char *
951yystpcpy (char *yydest, const char *yysrc)
952#else
953static char *
954yystpcpy (yydest, yysrc)
955 char *yydest;
956 const char *yysrc;
957#endif
958{
959 char *yyd = yydest;
960 const char *yys = yysrc;
961
962 while ((*yyd++ = *yys++) != '\0')
963 continue;
964
965 return yyd - 1;
966}
967# endif
968# endif
969
970# ifndef yytnamerr
971/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
972 quotes and backslashes, so that it's suitable for yyerror. The
973 heuristic is that double-quoting is unnecessary unless the string
974 contains an apostrophe, a comma, or backslash (other than
975 backslash-backslash). YYSTR is taken from yytname. If YYRES is
976 null, do not copy; instead, return the length of what the result
977 would have been. */
978static YYSIZE_T
979yytnamerr (char *yyres, const char *yystr)
980{
981 if (*yystr == '"')
982 {
983 YYSIZE_T yyn = 0;
984 char const *yyp = yystr;
985
986 for (;;)
987switch (*++yyp)
988 {
989 case '\'':
990 case ',':
991 goto do_not_strip_quotes;
992
993 case '\\':
994 if (*++yyp != '\\')
995 goto do_not_strip_quotes;
996 /* Fall through. */
997 default:
998 if (yyres)
999 yyres[yyn] = *yyp;
1000 yyn++;
1001 break;
1002
1003 case '"':
1004 if (yyres)
1005 yyres[yyn] = '\0';
1006 return yyn;
1007 }
1008 do_not_strip_quotes: ;
1009 }
1010
1011 if (! yyres)
1012 return yystrlen (yystr);
1013
1014 return yystpcpy (yyres, yystr) - yyres;
1015}
1016# endif
1017
1018/* Copy into YYRESULT an error message about the unexpected token
1019 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1020 including the terminating null byte. If YYRESULT is null, do not
1021 copy anything; just return the number of bytes that would be
1022 copied. As a special case, return 0 if an ordinary "syntax error"
1023 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1024 size calculation. */
1025static YYSIZE_T
1026yysyntax_error (char *yyresult, int yystate, int yychar)
1027{
1028 int yyn = yypact[yystate];
1029
1030 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1031 return 0;
1032 else
1033 {
1034 int yytype = YYTRANSLATE (yychar);
1035 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1036 YYSIZE_T yysize = yysize0;
1037 YYSIZE_T yysize1;
1038 int yysize_overflow = 0;
1039 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1040 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1041 int yyx;
1042
1043# if 0
1044 /* This is so xgettext sees the translatable formats that are
1045 constructed on the fly. */
1046 YY_("syntax error, unexpected %s");
1047 YY_("syntax error, unexpected %s, expecting %s");
1048 YY_("syntax error, unexpected %s, expecting %s or %s");
1049 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1050 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1051# endif
1052 char *yyfmt;
1053 char const *yyf;
1054 static char const yyunexpected[] = "syntax error, unexpected %s";
1055 static char const yyexpecting[] = ", expecting %s";
1056 static char const yyor[] = " or %s";
1057 char yyformat[sizeof yyunexpected
1058 + sizeof yyexpecting - 1
1059 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1060 * (sizeof yyor - 1))];
1061 char const *yyprefix = yyexpecting;
1062
1063 /* Start YYX at -YYN if negative to avoid negative indexes in
1064 YYCHECK. */
1065 int yyxbegin = yyn < 0 ? -yyn : 0;
1066
1067 /* Stay within bounds of both yycheck and yytname. */
1068 int yychecklim = YYLAST - yyn + 1;
1069 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1070 int yycount = 1;
1071
1072 yyarg[0] = yytname[yytype];
1073 yyfmt = yystpcpy (yyformat, yyunexpected);
1074
1075 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1076if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1077 {
1078 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1079 {
1080yycount = 1;
1081yysize = yysize0;
1082yyformat[sizeof yyunexpected - 1] = '\0';
1083break;
1084 }
1085 yyarg[yycount++] = yytname[yyx];
1086 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1087 yysize_overflow |= (yysize1 < yysize);
1088 yysize = yysize1;
1089 yyfmt = yystpcpy (yyfmt, yyprefix);
1090 yyprefix = yyor;
1091 }
1092
1093 yyf = YY_(yyformat);
1094 yysize1 = yysize + yystrlen (yyf);
1095 yysize_overflow |= (yysize1 < yysize);
1096 yysize = yysize1;
1097
1098 if (yysize_overflow)
1099return YYSIZE_MAXIMUM;
1100
1101 if (yyresult)
1102{
1103 /* Avoid sprintf, as that infringes on the user's name space.
1104 Don't have undefined behavior even if the translation
1105 produced a string with the wrong number of "%s"s. */
1106 char *yyp = yyresult;
1107 int yyi = 0;
1108 while ((*yyp = *yyf) != '\0')
1109 {
1110 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1111{
1112 yyp += yytnamerr (yyp, yyarg[yyi++]);
1113 yyf += 2;
1114}
1115 else
1116{
1117 yyp++;
1118 yyf++;
1119}
1120 }
1121}
1122 return yysize;
1123 }
1124}
1125#endif /* YYERROR_VERBOSE */
1126
1127
1128/*-----------------------------------------------.
1129| Release the memory associated to this symbol. |
1130`-----------------------------------------------*/
1131
1132/*ARGSUSED*/
1133#if (defined __STDC__ || defined __C99__FUNC__ \
1134 || defined __cplusplus || defined _MSC_VER)
1135static void
1136yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1137#else
1138static void
1139yydestruct (yymsg, yytype, yyvaluep)
1140 const char *yymsg;
1141 int yytype;
1142 YYSTYPE *yyvaluep;
1143#endif
1144{
1145 YYUSE (yyvaluep);
1146
1147 if (!yymsg)
1148 yymsg = "Deleting";
1149 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1150
1151 switch (yytype)
1152 {
1153
1154 default:
1155break;
1156 }
1157}
1158
1159
1160/* Prevent warnings from -Wmissing-prototypes. */
1161
1162#ifdef YYPARSE_PARAM
1163#if defined __STDC__ || defined __cplusplus
1164int yyparse (void *YYPARSE_PARAM);
1165#else
1166int yyparse ();
1167#endif
1168#else /* ! YYPARSE_PARAM */
1169#if defined __STDC__ || defined __cplusplus
1170int yyparse (void);
1171#else
1172int yyparse ();
1173#endif
1174#endif /* ! YYPARSE_PARAM */
1175
1176
1177
1178/* The look-ahead symbol. */
1179int yychar;
1180
1181/* The semantic value of the look-ahead symbol. */
1182YYSTYPE yylval;
1183
1184/* Number of syntax errors so far. */
1185int yynerrs;
1186
1187
1188
1189/*----------.
1190| yyparse. |
1191`----------*/
1192
1193#ifdef YYPARSE_PARAM
1194#if (defined __STDC__ || defined __C99__FUNC__ \
1195 || defined __cplusplus || defined _MSC_VER)
1196int
1197yyparse (void *YYPARSE_PARAM)
1198#else
1199int
1200yyparse (YYPARSE_PARAM)
1201 void *YYPARSE_PARAM;
1202#endif
1203#else /* ! YYPARSE_PARAM */
1204#if (defined __STDC__ || defined __C99__FUNC__ \
1205 || defined __cplusplus || defined _MSC_VER)
1206int
1207yyparse (void)
1208#else
1209int
1210yyparse ()
1211
1212#endif
1213#endif
1214{
1215
1216 int yystate;
1217 int yyn;
1218 int yyresult;
1219 /* Number of tokens to shift before error messages enabled. */
1220 int yyerrstatus;
1221 /* Look-ahead token as an internal (translated) token number. */
1222 int yytoken = 0;
1223#if YYERROR_VERBOSE
1224 /* Buffer for error messages, and its allocated size. */
1225 char yymsgbuf[128];
1226 char *yymsg = yymsgbuf;
1227 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1228#endif
1229
1230 /* Three stacks and their tools:
1231 `yyss': related to states,
1232 `yyvs': related to semantic values,
1233 `yyls': related to locations.
1234
1235 Refer to the stacks thru separate pointers, to allow yyoverflow
1236 to reallocate them elsewhere. */
1237
1238 /* The state stack. */
1239 yytype_int16 yyssa[YYINITDEPTH];
1240 yytype_int16 *yyss = yyssa;
1241 yytype_int16 *yyssp;
1242
1243 /* The semantic value stack. */
1244 YYSTYPE yyvsa[YYINITDEPTH];
1245 YYSTYPE *yyvs = yyvsa;
1246 YYSTYPE *yyvsp;
1247
1248
1249
1250#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1251
1252 YYSIZE_T yystacksize = YYINITDEPTH;
1253
1254 /* The variables used to return semantic value and location from the
1255 action routines. */
1256 YYSTYPE yyval;
1257
1258
1259 /* The number of symbols on the RHS of the reduced rule.
1260 Keep to zero when no symbol should be popped. */
1261 int yylen = 0;
1262
1263 YYDPRINTF ((stderr, "Starting parse\n"));
1264
1265 yystate = 0;
1266 yyerrstatus = 0;
1267 yynerrs = 0;
1268 yychar = YYEMPTY;/* Cause a token to be read. */
1269
1270 /* Initialize stack pointers.
1271 Waste one element of value and location stack
1272 so that they stay on the same level as the state stack.
1273 The wasted elements are never initialized. */
1274
1275 yyssp = yyss;
1276 yyvsp = yyvs;
1277
1278 goto yysetstate;
1279
1280/*------------------------------------------------------------.
1281| yynewstate -- Push a new state, which is found in yystate. |
1282`------------------------------------------------------------*/
1283 yynewstate:
1284 /* In all cases, when you get here, the value and location stacks
1285 have just been pushed. So pushing a state here evens the stacks. */
1286 yyssp++;
1287
1288 yysetstate:
1289 *yyssp = yystate;
1290
1291 if (yyss + yystacksize - 1 <= yyssp)
1292 {
1293 /* Get the current used size of the three stacks, in elements. */
1294 YYSIZE_T yysize = yyssp - yyss + 1;
1295
1296#ifdef yyoverflow
1297 {
1298/* Give user a chance to reallocate the stack. Use copies of
1299 these so that the &'s don't force the real ones into
1300 memory. */
1301YYSTYPE *yyvs1 = yyvs;
1302yytype_int16 *yyss1 = yyss;
1303
1304
1305/* Each stack pointer address is followed by the size of the
1306 data in use in that stack, in bytes. This used to be a
1307 conditional around just the two extra args, but that might
1308 be undefined if yyoverflow is a macro. */
1309yyoverflow (YY_("memory exhausted"),
1310 &yyss1, yysize * sizeof (*yyssp),
1311 &yyvs1, yysize * sizeof (*yyvsp),
1312
1313 &yystacksize);
1314
1315yyss = yyss1;
1316yyvs = yyvs1;
1317 }
1318#else /* no yyoverflow */
1319# ifndef YYSTACK_RELOCATE
1320 goto yyexhaustedlab;
1321# else
1322 /* Extend the stack our own way. */
1323 if (YYMAXDEPTH <= yystacksize)
1324goto yyexhaustedlab;
1325 yystacksize *= 2;
1326 if (YYMAXDEPTH < yystacksize)
1327yystacksize = YYMAXDEPTH;
1328
1329 {
1330yytype_int16 *yyss1 = yyss;
1331union yyalloc *yyptr =
1332 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1333if (! yyptr)
1334 goto yyexhaustedlab;
1335YYSTACK_RELOCATE (yyss);
1336YYSTACK_RELOCATE (yyvs);
1337
1338# undef YYSTACK_RELOCATE
1339if (yyss1 != yyssa)
1340 YYSTACK_FREE (yyss1);
1341 }
1342# endif
1343#endif /* no yyoverflow */
1344
1345 yyssp = yyss + yysize - 1;
1346 yyvsp = yyvs + yysize - 1;
1347
1348
1349 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1350 (unsigned long int) yystacksize));
1351
1352 if (yyss + yystacksize - 1 <= yyssp)
1353YYABORT;
1354 }
1355
1356 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1357
1358 goto yybackup;
1359
1360/*-----------.
1361| yybackup. |
1362`-----------*/
1363yybackup:
1364
1365 /* Do appropriate processing given the current state. Read a
1366 look-ahead token if we need one and don't already have one. */
1367
1368 /* First try to decide what to do without reference to look-ahead token. */
1369 yyn = yypact[yystate];
1370 if (yyn == YYPACT_NINF)
1371 goto yydefault;
1372
1373 /* Not known => get a look-ahead token if don't already have one. */
1374
1375 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1376 if (yychar == YYEMPTY)
1377 {
1378 YYDPRINTF ((stderr, "Reading a token: "));
1379 yychar = YYLEX;
1380 }
1381
1382 if (yychar <= YYEOF)
1383 {
1384 yychar = yytoken = YYEOF;
1385 YYDPRINTF ((stderr, "Now at end of input.\n"));
1386 }
1387 else
1388 {
1389 yytoken = YYTRANSLATE (yychar);
1390 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1391 }
1392
1393 /* If the proper action on seeing token YYTOKEN is to reduce or to
1394 detect an error, take that action. */
1395 yyn += yytoken;
1396 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1397 goto yydefault;
1398 yyn = yytable[yyn];
1399 if (yyn <= 0)
1400 {
1401 if (yyn == 0 || yyn == YYTABLE_NINF)
1402goto yyerrlab;
1403 yyn = -yyn;
1404 goto yyreduce;
1405 }
1406
1407 if (yyn == YYFINAL)
1408 YYACCEPT;
1409
1410 /* Count tokens shifted since error; after three, turn off error
1411 status. */
1412 if (yyerrstatus)
1413 yyerrstatus--;
1414
1415 /* Shift the look-ahead token. */
1416 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1417
1418 /* Discard the shifted token unless it is eof. */
1419 if (yychar != YYEOF)
1420 yychar = YYEMPTY;
1421
1422 yystate = yyn;
1423 *++yyvsp = yylval;
1424
1425 goto yynewstate;
1426
1427
1428/*-----------------------------------------------------------.
1429| yydefault -- do the default action for the current state. |
1430`-----------------------------------------------------------*/
1431yydefault:
1432 yyn = yydefact[yystate];
1433 if (yyn == 0)
1434 goto yyerrlab;
1435 goto yyreduce;
1436
1437
1438/*-----------------------------.
1439| yyreduce -- Do a reduction. |
1440`-----------------------------*/
1441yyreduce:
1442 /* yyn is the number of a rule to reduce with. */
1443 yylen = yyr2[yyn];
1444
1445 /* If YYLEN is nonzero, implement the default value of the action:
1446 `$$ = $1'.
1447
1448 Otherwise, the following line sets YYVAL to garbage.
1449 This behavior is undocumented and Bison
1450 users should not rely upon it. Assigning to YYVAL
1451 unconditionally makes the parser a bit smaller, and it avoids a
1452 GCC warning that YYVAL may be used uninitialized. */
1453 yyval = yyvsp[1-yylen];
1454
1455
1456 YY_REDUCE_PRINT (yyn);
1457 switch (yyn)
1458 {
1459 case 2:
1460
1461 { g_resultValue = (yyvsp[(1) - (1)]); return 0; ;}
1462 break;
1463
1464 case 3:
1465
1466 { (yyval) = (yyvsp[(1) - (1)]); ;}
1467 break;
1468
1469 case 4:
1470
1471 {
1472 bool c = ((yyvsp[(1) - (5)]).isInt() ? ((long)(yyvsp[(1) - (5)]) != 0) : ((double)(yyvsp[(1) - (5)]) != 0.0));
1473 (yyval) = c ? (yyvsp[(3) - (5)]) : (yyvsp[(5) - (5)]);
1474 ;}
1475 break;
1476
1477 case 5:
1478
1479 { (yyval) = (yyvsp[(1) - (1)]); ;}
1480 break;
1481
1482 case 6:
1483
1484 {
1485 (yyval) = CPPValue( (long)((long)(yyvsp[(1) - (3)]) || (long)(yyvsp[(3) - (3)])) );
1486 ;}
1487 break;
1488
1489 case 7:
1490
1491 { (yyval) = (yyvsp[(1) - (1)]); ;}
1492 break;
1493
1494 case 8:
1495
1496 {
1497 (yyval) = CPPValue( (long)((long)(yyvsp[(1) - (3)]) && (long)(yyvsp[(3) - (3)])) );
1498;}
1499 break;
1500
1501 case 9:
1502
1503 { (yyval) = (yyvsp[(1) - (1)]); ;}
1504 break;
1505
1506 case 10:
1507
1508 {
1509 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) | (long)(yyvsp[(3) - (3)]) );
1510 ;}
1511 break;
1512
1513 case 11:
1514
1515 { (yyval) = (yyvsp[(1) - (1)]); ;}
1516 break;
1517
1518 case 12:
1519
1520 {
1521 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) ^ (long)(yyvsp[(3) - (3)]) );
1522 ;}
1523 break;
1524
1525 case 13:
1526
1527 { (yyval) = (yyvsp[(1) - (1)]); ;}
1528 break;
1529
1530 case 14:
1531
1532 {
1533 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) & (long)(yyvsp[(3) - (3)]) );
1534;}
1535 break;
1536
1537 case 15:
1538
1539 { (yyval) = (yyvsp[(1) - (1)]); ;}
1540 break;
1541
1542 case 16:
1543
1544 {
1545 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) == (double)(yyvsp[(3) - (3)])) );
1546 ;}
1547 break;
1548
1549 case 17:
1550
1551 {
1552 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) != (double)(yyvsp[(3) - (3)])) );
1553 ;}
1554 break;
1555
1556 case 18:
1557
1558 { (yyval) = (yyvsp[(1) - (1)]); ;}
1559 break;
1560
1561 case 19:
1562
1563 {
1564 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) < (double)(yyvsp[(3) - (3)])) );
1565 ;}
1566 break;
1567
1568 case 20:
1569
1570 {
1571 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) > (double)(yyvsp[(3) - (3)])) );
1572 ;}
1573 break;
1574
1575 case 21:
1576
1577 {
1578 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) <= (double)(yyvsp[(3) - (3)])) );
1579 ;}
1580 break;
1581
1582 case 22:
1583
1584 {
1585 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) >= (double)(yyvsp[(3) - (3)])) );
1586 ;}
1587 break;
1588
1589 case 23:
1590
1591 { (yyval) = (yyvsp[(1) - (1)]); ;}
1592 break;
1593
1594 case 24:
1595
1596 {
1597 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) << (long)(yyvsp[(3) - (3)]) );
1598 ;}
1599 break;
1600
1601 case 25:
1602
1603 {
1604 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) >> (long)(yyvsp[(3) - (3)]) );
1605 ;}
1606 break;
1607
1608 case 26:
1609
1610 { (yyval) = (yyvsp[(1) - (1)]); ;}
1611 break;
1612
1613 case 27:
1614
1615 {
1616 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1617 {
1618 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) + (double)(yyvsp[(3) - (3)]) );
1619 }
1620 else
1621 {
1622 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) + (long)(yyvsp[(3) - (3)]) );
1623 }
1624 ;}
1625 break;
1626
1627 case 28:
1628
1629 {
1630 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1631 {
1632 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) - (double)(yyvsp[(3) - (3)]) );
1633 }
1634 else
1635 {
1636 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) - (long)(yyvsp[(3) - (3)]) );
1637 }
1638 ;}
1639 break;
1640
1641 case 29:
1642
1643 { (yyval) = (yyvsp[(1) - (1)]); ;}
1644 break;
1645
1646 case 30:
1647
1648 {
1649 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1650 {
1651 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) * (double)(yyvsp[(3) - (3)]) );
1652 }
1653 else
1654 {
1655 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) * (long)(yyvsp[(3) - (3)]) );
1656 }
1657 ;}
1658 break;
1659
1660 case 31:
1661
1662 {
1663 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1664 {
1665 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) / (double)(yyvsp[(3) - (3)]) );
1666 }
1667 else
1668 {
1669 long value = (yyvsp[(3) - (3)]);
1670 if (value==0) value=1;
1671 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) / value );
1672 }
1673 ;}
1674 break;
1675
1676 case 32:
1677
1678 {
1679 long value = (yyvsp[(3) - (3)]);
1680 if (value==0) value=1;
1681 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) % value );
1682 ;}
1683 break;
1684
1685 case 33:
1686
1687 { (yyval) = (yyvsp[(1) - (1)]); ;}
1688 break;
1689
1690 case 34:
1691
1692 { (yyval) = (yyvsp[(1) - (2)]); ;}
1693 break;
1694
1695 case 35:
1696
1697 {
1698 if ((yyvsp[(2) - (2)]).isInt())
1699 (yyval) = CPPValue(-(long)(yyvsp[(2) - (2)]));
1700 else
1701 (yyval) = CPPValue(-(double)(yyvsp[(2) - (2)]));
1702 ;}
1703 break;
1704
1705 case 36:
1706
1707 {
1708 (yyval) = CPPValue(~(long)(yyvsp[(2) - (2)]));
1709 ;}
1710 break;
1711
1712 case 37:
1713
1714 {
1715 (yyval) = CPPValue((long)!(long)(yyvsp[(2) - (2)]));
1716 ;}
1717 break;
1718
1719 case 38:
1720
1721 { (yyval) = (yyvsp[(1) - (1)]); ;}
1722 break;
1723
1724 case 39:
1725
1726 { (yyval) = (yyvsp[(2) - (3)]); ;}
1727 break;
1728
1729 case 40:
1730
1731 { (yyval) = parseOctal(); ;}
1732 break;
1733
1734 case 41:
1735
1736 { (yyval) = parseDecimal(); ;}
1737 break;
1738
1739 case 42:
1740
1741 { (yyval) = parseHexadecimal(); ;}
1742 break;
1743
1744 case 43:
1745
1746 { (yyval) = parseCharacter(); ;}
1747 break;
1748
1749 case 44:
1750
1751 { (yyval) = parseFloat(); ;}
1752 break;
1753
1754
1755/* Line 1267 of yacc.c. */
1756
1757 default: break;
1758 }
1759 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1760
1761 YYPOPSTACK (yylen);
1762 yylen = 0;
1763 YY_STACK_PRINT (yyss, yyssp);
1764
1765 *++yyvsp = yyval;
1766
1767
1768 /* Now `shift' the result of the reduction. Determine what state
1769 that goes to, based on the state we popped back to and the rule
1770 number reduced by. */
1771
1772 yyn = yyr1[yyn];
1773
1774 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1775 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1776 yystate = yytable[yystate];
1777 else
1778 yystate = yydefgoto[yyn - YYNTOKENS];
1779
1780 goto yynewstate;
1781
1782
1783/*------------------------------------.
1784| yyerrlab -- here on detecting error |
1785`------------------------------------*/
1786yyerrlab:
1787 /* If not already recovering from an error, report this error. */
1788 if (!yyerrstatus)
1789 {
1790 ++yynerrs;
1791#if ! YYERROR_VERBOSE
1792 yyerror (YY_("syntax error"));
1793#else
1794 {
1795YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1796if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1797 {
1798 YYSIZE_T yyalloc = 2 * yysize;
1799 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1800 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1801 if (yymsg != yymsgbuf)
1802 YYSTACK_FREE (yymsg);
1803 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1804 if (yymsg)
1805 yymsg_alloc = yyalloc;
1806 else
1807 {
1808yymsg = yymsgbuf;
1809yymsg_alloc = sizeof yymsgbuf;
1810 }
1811 }
1812
1813if (0 < yysize && yysize <= yymsg_alloc)
1814 {
1815 (void) yysyntax_error (yymsg, yystate, yychar);
1816 yyerror (yymsg);
1817 }
1818else
1819 {
1820 yyerror (YY_("syntax error"));
1821 if (yysize != 0)
1822 goto yyexhaustedlab;
1823 }
1824 }
1825#endif
1826 }
1827
1828
1829
1830 if (yyerrstatus == 3)
1831 {
1832 /* If just tried and failed to reuse look-ahead token after an
1833 error, discard it. */
1834
1835 if (yychar <= YYEOF)
1836{
1837 /* Return failure if at end of input. */
1838 if (yychar == YYEOF)
1839 YYABORT;
1840}
1841 else
1842{
1843 yydestruct ("Error: discarding",
1844 yytoken, &yylval);
1845 yychar = YYEMPTY;
1846}
1847 }
1848
1849 /* Else will try to reuse look-ahead token after shifting the error
1850 token. */
1851 goto yyerrlab1;
1852
1853
1854/*---------------------------------------------------.
1855| yyerrorlab -- error raised explicitly by YYERROR. |
1856`---------------------------------------------------*/
1857yyerrorlab:
1858
1859 /* Pacify compilers like GCC when the user code never invokes
1860 YYERROR and the label yyerrorlab therefore never appears in user
1861 code. */
1862 if (/*CONSTCOND*/ 0)
1863 goto yyerrorlab;
1864
1865 /* Do not reclaim the symbols of the rule which action triggered
1866 this YYERROR. */
1867 YYPOPSTACK (yylen);
1868 yylen = 0;
1869 YY_STACK_PRINT (yyss, yyssp);
1870 yystate = *yyssp;
1871 goto yyerrlab1;
1872
1873
1874/*-------------------------------------------------------------.
1875| yyerrlab1 -- common code for both syntax error and YYERROR. |
1876`-------------------------------------------------------------*/
1877yyerrlab1:
1878 yyerrstatus = 3;/* Each real token shifted decrements this. */
1879
1880 for (;;)
1881 {
1882 yyn = yypact[yystate];
1883 if (yyn != YYPACT_NINF)
1884{
1885 yyn += YYTERROR;
1886 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1887 {
1888 yyn = yytable[yyn];
1889 if (0 < yyn)
1890break;
1891 }
1892}
1893
1894 /* Pop the current state because it cannot handle the error token. */
1895 if (yyssp == yyss)
1896YYABORT;
1897
1898
1899 yydestruct ("Error: popping",
1900 yystos[yystate], yyvsp);
1901 YYPOPSTACK (1);
1902 yystate = *yyssp;
1903 YY_STACK_PRINT (yyss, yyssp);
1904 }
1905
1906 if (yyn == YYFINAL)
1907 YYACCEPT;
1908
1909 *++yyvsp = yylval;
1910
1911
1912 /* Shift the error token. */
1913 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1914
1915 yystate = yyn;
1916 goto yynewstate;
1917
1918
1919/*-------------------------------------.
1920| yyacceptlab -- YYACCEPT comes here. |
1921`-------------------------------------*/
1922yyacceptlab:
1923 yyresult = 0;
1924 goto yyreturn;
1925
1926/*-----------------------------------.
1927| yyabortlab -- YYABORT comes here. |
1928`-----------------------------------*/
1929yyabortlab:
1930 yyresult = 1;
1931 goto yyreturn;
1932
1933#ifndef yyoverflow
1934/*-------------------------------------------------.
1935| yyexhaustedlab -- memory exhaustion comes here. |
1936`-------------------------------------------------*/
1937yyexhaustedlab:
1938 yyerror (YY_("memory exhausted"));
1939 yyresult = 2;
1940 /* Fall through. */
1941#endif
1942
1943yyreturn:
1944 if (yychar != YYEOF && yychar != YYEMPTY)
1945 yydestruct ("Cleanup: discarding lookahead",
1946 yytoken, &yylval);
1947 /* Do not reclaim the symbols of the rule which action triggered
1948 this YYABORT or YYACCEPT. */
1949 YYPOPSTACK (yylen);
1950 YY_STACK_PRINT (yyss, yyssp);
1951 while (yyssp != yyss)
1952 {
1953 yydestruct ("Cleanup: popping",
1954 yystos[*yyssp], yyvsp);
1955 YYPOPSTACK (1);
1956 }
1957#ifndef yyoverflow
1958 if (yyss != yyssa)
1959 YYSTACK_FREE (yyss);
1960#endif
1961#if YYERROR_VERBOSE
1962 if (yymsg != yymsgbuf)
1963 YYSTACK_FREE (yymsg);
1964#endif
1965 /* Make sure YYID is used. */
1966 return YYID (yyresult);
1967}
1968
1969
1970
1971
1972
1973

Archive Download this file

Revision: 1322