Debian Codegraph @

source/compiler/prparser.tab.c

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