Debian Codegraph @

source/compiler/dtcompilerparser.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\\dtcompilerparser.y"
72
73 /******************************************************************************
74 *
75 * Module Name: dtcompilerparser.y - Bison input file for table compiler 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
119 #define _COMPONENT DT_COMPILER
120 ACPI_MODULE_NAME ("dtcompilerparser")
121
122 void * AslLocalAllocate (unsigned int Size);
123
124 /* Bison/yacc configuration */
125
126 #undef alloca
127 #define alloca AslLocalAllocate
128
129 int DtCompilerParserlex (void);
130 int DtCompilerParserparse (void);
131 void DtCompilerParsererror (char const *msg);
132 extern char *DtCompilerParsertext;
133 extern DT_FIELD *AslGbl_CurrentField;
134
135 extern int DtLabelByteOffset;
136 extern UINT64 DtCompilerParserlineno; /* Current line number */
137
138 extern UINT32 DtTokenFirstLine;
139 extern UINT32 DtTokenFirstColumn;
140
141 /* Bison/yacc configuration */
142
143 #define yytname DtCompilerParsername
144 #define YYDEBUG 1 /* Enable debug output */
145 #define YYERROR_VERBOSE 1 /* Verbose error messages */
146 #define YYFLAG -32768
147
148 /* Define YYMALLOC/YYFREE to prevent redefinition errors */
149
150 #define YYMALLOC malloc
151 #define YYFREE free
152
153
154
155 /* Line 189 of yacc.c */
156 #line 265 "dtcompilerparser.tab.c"
157
158 /* Enabling traces. */
159 #ifndef YYDEBUG
160 # define YYDEBUG 0
161 #endif
162
163 /* Enabling verbose error messages. */
164 #ifdef YYERROR_VERBOSE
165 # undef YYERROR_VERBOSE
166 # define YYERROR_VERBOSE 1
167 #else
168 # define YYERROR_VERBOSE 0
169 #endif
170
171 /* Enabling the token table. */
172 #ifndef YYTOKEN_TABLE
173 # define YYTOKEN_TABLE 0
174 #endif
175
176
177 /* Tokens. */
178 #ifndef YYTOKENTYPE
179 # define YYTOKENTYPE
180 /* Put the tokens into the symbol table, so that GDB and other debuggers
181 know about them. */
182 enum yytokentype {
183 DT_PARSEOP_DATA = 258,
184 DT_PARSEOP_LABEL = 259,
185 DT_PARSEOP_STRING_DATA = 260,
186 DT_PARSEOP_LINE_CONTINUATION = 261
187 };
188 #endif
189
190
191
192 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
193 typedef union YYSTYPE
194 {
195
196 /* Line 214 of yacc.c */
197 #line 193 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
198
199 char *s;
200 DT_FIELD *f;
201 DT_TABLE_UNIT *u;
202
203
204
205 /* Line 214 of yacc.c */
206 #line 315 "dtcompilerparser.tab.c"
207 } YYSTYPE;
208 # define YYSTYPE_IS_TRIVIAL 1
209 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
210 # define YYSTYPE_IS_DECLARED 1
211 #endif
212
213
214 /* Copy the second part of user declarations. */
215
216
217 /* Line 264 of yacc.c */
218 #line 327 "dtcompilerparser.tab.c"
219
220 #ifdef short
221 # undef short
222 #endif
223
224 #ifdef YYTYPE_UINT8
225 typedef YYTYPE_UINT8 yytype_uint8;
226 #else
227 typedef unsigned char yytype_uint8;
228 #endif
229
230 #ifdef YYTYPE_INT8
231 typedef YYTYPE_INT8 yytype_int8;
232 #elif (defined __STDC__ || defined __C99__FUNC__ \
233 || defined __cplusplus || defined _MSC_VER)
234 typedef signed char yytype_int8;
235 #else
236 typedef short int yytype_int8;
237 #endif
238
239 #ifdef YYTYPE_UINT16
240 typedef YYTYPE_UINT16 yytype_uint16;
241 #else
242 typedef unsigned short int yytype_uint16;
243 #endif
244
245 #ifdef YYTYPE_INT16
246 typedef YYTYPE_INT16 yytype_int16;
247 #else
248 typedef short int yytype_int16;
249 #endif
250
251 #ifndef YYSIZE_T
252 # ifdef __SIZE_TYPE__
253 # define YYSIZE_T __SIZE_TYPE__
254 # elif defined size_t
255 # define YYSIZE_T size_t
256 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
257 || defined __cplusplus || defined _MSC_VER)
258 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
259 # define YYSIZE_T size_t
260 # else
261 # define YYSIZE_T unsigned int
262 # endif
263 #endif
264
265 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
266
267 #ifndef YY_
268 # if YYENABLE_NLS
269 # if ENABLE_NLS
270 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
271 # define YY_(msgid) dgettext ("bison-runtime", msgid)
272 # endif
273 # endif
274 # ifndef YY_
275 # define YY_(msgid) msgid
276 # endif
277 #endif
278
279 /* Suppress unused-variable warnings by "using" E. */
280 #if ! defined lint || defined __GNUC__
281 # define YYUSE(e) ((void) (e))
282 #else
283 # define YYUSE(e) /* empty */
284 #endif
285
286 /* Identity function, used to suppress warnings about constant conditions. */
287 #ifndef lint
288 # define YYID(n) (n)
289 #else
290 #if (defined __STDC__ || defined __C99__FUNC__ \
291 || defined __cplusplus || defined _MSC_VER)
292 static int
293 YYID (int yyi)
294 #else
295 static int
296 YYID (yyi)
297 int yyi;
298 #endif
299 {
300 return yyi;
301 }
302 #endif
303
304 #if ! defined yyoverflow || YYERROR_VERBOSE
305
306 /* The parser invokes alloca or malloc; define the necessary symbols. */
307
308 # ifdef YYSTACK_USE_ALLOCA
309 # if YYSTACK_USE_ALLOCA
310 # ifdef __GNUC__
311 # define YYSTACK_ALLOC __builtin_alloca
312 # elif defined __BUILTIN_VA_ARG_INCR
313 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
314 # elif defined _AIX
315 # define YYSTACK_ALLOC __alloca
316 # elif defined _MSC_VER
317 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
318 # define alloca _alloca
319 # else
320 # define YYSTACK_ALLOC alloca
321 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
322 || defined __cplusplus || defined _MSC_VER)
323 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
324 # ifndef _STDLIB_H
325 # define _STDLIB_H 1
326 # endif
327 # endif
328 # endif
329 # endif
330 # endif
331
332 # ifdef YYSTACK_ALLOC
333 /* Pacify GCC's `empty if-body' warning. */
334 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
335 # ifndef YYSTACK_ALLOC_MAXIMUM
336 /* The OS might guarantee only one guard page at the bottom of the stack,
337 and a page size can be as small as 4096 bytes. So we cannot safely
338 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
339 to allow for a few compiler-allocated temporary stack slots. */
340 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
341 # endif
342 # else
343 # define YYSTACK_ALLOC YYMALLOC
344 # define YYSTACK_FREE YYFREE
345 # ifndef YYSTACK_ALLOC_MAXIMUM
346 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
347 # endif
348 # if (defined __cplusplus && ! defined _STDLIB_H \
349 && ! ((defined YYMALLOC || defined malloc) \
350 && (defined YYFREE || defined free)))
351 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
352 # ifndef _STDLIB_H
353 # define _STDLIB_H 1
354 # endif
355 # endif
356 # ifndef YYMALLOC
357 # define YYMALLOC malloc
358 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
359 || defined __cplusplus || defined _MSC_VER)
360 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
361 # endif
362 # endif
363 # ifndef YYFREE
364 # define YYFREE free
365 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
366 || defined __cplusplus || defined _MSC_VER)
367 void free (void *); /* INFRINGES ON USER NAME SPACE */
368 # endif
369 # endif
370 # endif
371 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
372
373
374 #if (! defined yyoverflow \
375 && (! defined __cplusplus \
376 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
377
378 /* A type that is properly aligned for any stack member. */
379 union yyalloc
380 {
381 yytype_int16 yyss_alloc;
382 YYSTYPE yyvs_alloc;
383 };
384
385 /* The size of the maximum gap between one aligned stack and the next. */
386 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
387
388 /* The size of an array large to enough to hold all stacks, each with
389 N elements. */
390 # define YYSTACK_BYTES(N) \
391 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
392 + YYSTACK_GAP_MAXIMUM)
393
394 /* Copy COUNT objects from FROM to TO. The source and destination do
395 not overlap. */
396 # ifndef YYCOPY
397 # if defined __GNUC__ && 1 < __GNUC__
398 # define YYCOPY(To, From, Count) \
399 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
400 # else
401 # define YYCOPY(To, From, Count) \
402 do \
403 { \
404 YYSIZE_T yyi; \
405 for (yyi = 0; yyi < (Count); yyi++) \
406 (To)[yyi] = (From)[yyi]; \
407 } \
408 while (YYID (0))
409 # endif
410 # endif
411
412 /* Relocate STACK from its old location to the new one. The
413 local variables YYSIZE and YYSTACKSIZE give the old and new number of
414 elements in the stack, and YYPTR gives the new location of the
415 stack. Advance YYPTR to a properly aligned location for the next
416 stack. */
417 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
418 do \
419 { \
420 YYSIZE_T yynewbytes; \
421 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
422 Stack = &yyptr->Stack_alloc; \
423 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
424 yyptr += yynewbytes / sizeof (*yyptr); \
425 } \
426 while (YYID (0))
427
428 #endif
429
430 /* YYFINAL -- State number of the termination state. */
431 #define YYFINAL 6
432 /* YYLAST -- Last index in YYTABLE. */
433 #define YYLAST 16
434
435 /* YYNTOKENS -- Number of terminals. */
436 #define YYNTOKENS 8
437 /* YYNNTS -- Number of nonterminals. */
438 #define YYNNTS 8
439 /* YYNRULES -- Number of rules. */
440 #define YYNRULES 13
441 /* YYNRULES -- Number of states. */
442 #define YYNSTATES 18
443
444 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
445 #define YYUNDEFTOK 2
446 #define YYMAXUTOK 261
447
448 #define YYTRANSLATE(YYX) \
449 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
450
451 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
452 static const yytype_uint8 yytranslate[] =
453 {
454 0, 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, 7, 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, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
472 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
473 2, 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, 1, 2, 3, 4,
480 5, 6
481 };
482
483 #if YYDEBUG
484 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
485 YYRHS. */
486 static const yytype_uint8 yyprhs[] =
487 {
488 0, 0, 3, 5, 8, 10, 14, 16, 18, 21,
489 24, 26, 29, 31
490 };
491
492 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
493 static const yytype_int8 yyrhs[] =
494 {
495 9, 0, -1, 10, -1, 11, 10, -1, 11, -1,
496 4, 7, 12, -1, 13, -1, 15, -1, 15, 13,
497 -1, 13, 14, -1, 14, -1, 6, 15, -1, 3,
498 -1, 5, -1
499 };
500
501 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
502 static const yytype_uint8 yyrline[] =
503 {
504 0, 215, 215, 219, 220, 224, 228, 229, 230, 234,
505 235, 239, 243, 247
506 };
507 #endif
508
509 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
510 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
511 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
512 static const char *const yytname[] =
513 {
514 "$end", "error", "$undefined", "DT_PARSEOP_DATA", "DT_PARSEOP_LABEL",
515 "DT_PARSEOP_STRING_DATA", "DT_PARSEOP_LINE_CONTINUATION", "':'",
516 "$accept", "Table", "FieldList", "Field", "Data", "MultiLineDataList",
517 "MultiLineData", "Datum", 0
518 };
519 #endif
520
521 # ifdef YYPRINT
522 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
523 token YYLEX-NUM. */
524 static const yytype_uint16 yytoknum[] =
525 {
526 0, 256, 257, 258, 259, 260, 261, 58
527 };
528 # endif
529
530 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
531 static const yytype_uint8 yyr1[] =
532 {
533 0, 8, 9, 10, 10, 11, 12, 12, 12, 13,
534 13, 14, 15, 15
535 };
536
537 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
538 static const yytype_uint8 yyr2[] =
539 {
540 0, 2, 1, 2, 1, 3, 1, 1, 2, 2,
541 1, 2, 1, 1
542 };
543
544 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
545 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
546 means the default is an error. */
547 static const yytype_uint8 yydefact[] =
548 {
549 0, 0, 0, 2, 4, 0, 1, 3, 12, 13,
550 0, 5, 6, 10, 7, 11, 9, 8
551 };
552
553 /* YYDEFGOTO[NTERM-NUM]. */
554 static const yytype_int8 yydefgoto[] =
555 {
556 -1, 2, 3, 4, 11, 12, 13, 14
557 };
558
559 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
560 STATE-NUM. */
561 #define YYPACT_NINF -13
562 static const yytype_int8 yypact[] =
563 {
564 5, -5, 7, -13, 5, -2, -13, -13, -13, -13,
565 3, -13, 4, -13, 4, -13, -13, 4
566 };
567
568 /* YYPGOTO[NTERM-NUM]. */
569 static const yytype_int8 yypgoto[] =
570 {
571 -13, -13, 8, -13, -13, -3, -12, 6
572 };
573
574 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
575 positive, shift that token. If negative, reduce the rule which
576 number is the opposite. If zero, do what YYDEFACT says.
577 If YYTABLE_NINF, syntax error. */
578 #define YYTABLE_NINF -1
579 static const yytype_uint8 yytable[] =
580 {
581 16, 8, 5, 9, 10, 16, 8, 6, 9, 1,
582 10, 17, 7, 0, 0, 0, 15
583 };
584
585 static const yytype_int8 yycheck[] =
586 {
587 12, 3, 7, 5, 6, 17, 3, 0, 5, 4,
588 6, 14, 4, -1, -1, -1, 10
589 };
590
591 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
592 symbol of state STATE-NUM. */
593 static const yytype_uint8 yystos[] =
594 {
595 0, 4, 9, 10, 11, 7, 0, 10, 3, 5,
596 6, 12, 13, 14, 15, 15, 14, 13
597 };
598
599 #define yyerrok (yyerrstatus = 0)
600 #define yyclearin (yychar = YYEMPTY)
601 #define YYEMPTY (-2)
602 #define YYEOF 0
603
604 #define YYACCEPT goto yyacceptlab
605 #define YYABORT goto yyabortlab
606 #define YYERROR goto yyerrorlab
607
608
609 /* Like YYERROR except do call yyerror. This remains here temporarily
610 to ease the transition to the new meaning of YYERROR, for GCC.
611 Once GCC version 2 has supplanted version 1, this can go. */
612
613 #define YYFAIL goto yyerrlab
614
615 #define YYRECOVERING() (!!yyerrstatus)
616
617 #define YYBACKUP(Token, Value) \
618 do \
619 if (yychar == YYEMPTY && yylen == 1) \
620 { \
621 yychar = (Token); \
622 yylval = (Value); \
623 yytoken = YYTRANSLATE (yychar); \
624 YYPOPSTACK (1); \
625 goto yybackup; \
626 } \
627 else \
628 { \
629 yyerror (YY_("syntax error: cannot back up")); \
630 YYERROR; \
631 } \
632 while (YYID (0))
633
634
635 #define YYTERROR 1
636 #define YYERRCODE 256
637
638
639 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
640 If N is 0, then set CURRENT to the empty location which ends
641 the previous symbol: RHS[0] (always defined). */
642
643 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
644 #ifndef YYLLOC_DEFAULT
645 # define YYLLOC_DEFAULT(Current, Rhs, N) \
646 do \
647 if (YYID (N)) \
648 { \
649 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
650 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
651 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
652 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
653 } \
654 else \
655 { \
656 (Current).first_line = (Current).last_line = \
657 YYRHSLOC (Rhs, 0).last_line; \
658 (Current).first_column = (Current).last_column = \
659 YYRHSLOC (Rhs, 0).last_column; \
660 } \
661 while (YYID (0))
662 #endif
663
664
665 /* YY_LOCATION_PRINT -- Print the location on the stream.
666 This macro was not mandated originally: define only if we know
667 we won't break user code: when these are the locations we know. */
668
669 #ifndef YY_LOCATION_PRINT
670 # if YYLTYPE_IS_TRIVIAL
671 # define YY_LOCATION_PRINT(File, Loc) \
672 fprintf (File, "%d.%d-%d.%d", \
673 (Loc).first_line, (Loc).first_column, \
674 (Loc).last_line, (Loc).last_column)
675 # else
676 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
677 # endif
678 #endif
679
680
681 /* YYLEX -- calling `yylex' with the right arguments. */
682
683 #ifdef YYLEX_PARAM
684 # define YYLEX yylex (YYLEX_PARAM)
685 #else
686 # define YYLEX yylex ()
687 #endif
688
689 /* Enable debugging if requested. */
690 #if YYDEBUG
691
692 # ifndef YYFPRINTF
693 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
694 # define YYFPRINTF fprintf
695 # endif
696
697 # define YYDPRINTF(Args) \
698 do { \
699 if (yydebug) \
700 YYFPRINTF Args; \
701 } while (YYID (0))
702
703 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
704 do { \
705 if (yydebug) \
706 { \
707 YYFPRINTF (stderr, "%s ", Title); \
708 yy_symbol_print (stderr, \
709 Type, Value); \
710 YYFPRINTF (stderr, "\n"); \
711 } \
712 } while (YYID (0))
713
714
715 /*--------------------------------.
716 | Print this symbol on YYOUTPUT. |
717 `--------------------------------*/
718
719 /*ARGSUSED*/
720 #if (defined __STDC__ || defined __C99__FUNC__ \
721 || defined __cplusplus || defined _MSC_VER)
722 static void
723 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
724 #else
725 static void
726 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
727 FILE *yyoutput;
728 int yytype;
729 YYSTYPE const * const yyvaluep;
730 #endif
731 {
732 if (!yyvaluep)
733 return;
734 # ifdef YYPRINT
735 if (yytype < YYNTOKENS)
736 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
737 # else
738 YYUSE (yyoutput);
739 # endif
740 switch (yytype)
741 {
742 default:
743 break;
744 }
745 }
746
747
748 /*--------------------------------.
749 | Print this symbol on YYOUTPUT. |
750 `--------------------------------*/
751
752 #if (defined __STDC__ || defined __C99__FUNC__ \
753 || defined __cplusplus || defined _MSC_VER)
754 static void
755 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
756 #else
757 static void
758 yy_symbol_print (yyoutput, yytype, yyvaluep)
759 FILE *yyoutput;
760 int yytype;
761 YYSTYPE const * const yyvaluep;
762 #endif
763 {
764 if (yytype < YYNTOKENS)
765 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
766 else
767 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
768
769 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
770 YYFPRINTF (yyoutput, ")");
771 }
772
773 /*------------------------------------------------------------------.
774 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
775 | TOP (included). |
776 `------------------------------------------------------------------*/
777
778 #if (defined __STDC__ || defined __C99__FUNC__ \
779 || defined __cplusplus || defined _MSC_VER)
780 static void
781 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
782 #else
783 static void
784 yy_stack_print (yybottom, yytop)
785 yytype_int16 *yybottom;
786 yytype_int16 *yytop;
787 #endif
788 {
789 YYFPRINTF (stderr, "Stack now");
790 for (; yybottom <= yytop; yybottom++)
791 {
792 int yybot = *yybottom;
793 YYFPRINTF (stderr, " %d", yybot);
794 }
795 YYFPRINTF (stderr, "\n");
796 }
797
798 # define YY_STACK_PRINT(Bottom, Top) \
799 do { \
800 if (yydebug) \
801 yy_stack_print ((Bottom), (Top)); \
802 } while (YYID (0))
803
804
805 /*------------------------------------------------.
806 | Report that the YYRULE is going to be reduced. |
807 `------------------------------------------------*/
808
809 #if (defined __STDC__ || defined __C99__FUNC__ \
810 || defined __cplusplus || defined _MSC_VER)
811 static void
812 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
813 #else
814 static void
815 yy_reduce_print (yyvsp, yyrule)
816 YYSTYPE *yyvsp;
817 int yyrule;
818 #endif
819 {
820 int yynrhs = yyr2[yyrule];
821 int yyi;
822 unsigned long int yylno = yyrline[yyrule];
823 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
824 yyrule - 1, yylno);
825 /* The symbols being reduced. */
826 for (yyi = 0; yyi < yynrhs; yyi++)
827 {
828 YYFPRINTF (stderr, " $%d = ", yyi + 1);
829 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
830 &(yyvsp[(yyi + 1) - (yynrhs)])
831 );
832 YYFPRINTF (stderr, "\n");
833 }
834 }
835
836 # define YY_REDUCE_PRINT(Rule) \
837 do { \
838 if (yydebug) \
839 yy_reduce_print (yyvsp, Rule); \
840 } while (YYID (0))
841
842 /* Nonzero means print parse trace. It is left uninitialized so that
843 multiple parsers can coexist. */
844 int yydebug;
845 #else /* !YYDEBUG */
846 # define YYDPRINTF(Args)
847 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
848 # define YY_STACK_PRINT(Bottom, Top)
849 # define YY_REDUCE_PRINT(Rule)
850 #endif /* !YYDEBUG */
851
852
853 /* YYINITDEPTH -- initial size of the parser's stacks. */
854 #ifndef YYINITDEPTH
855 # define YYINITDEPTH 200
856 #endif
857
858 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
859 if the built-in stack extension method is used).
860
861 Do not make this value too large; the results are undefined if
862 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
863 evaluated with infinite-precision integer arithmetic. */
864
865 #ifndef YYMAXDEPTH
866 # define YYMAXDEPTH 10000
867 #endif
868
869
870
871 #if YYERROR_VERBOSE
872
873 # ifndef yystrlen
874 # if defined __GLIBC__ && defined _STRING_H
875 # define yystrlen strlen
876 # else
877 /* Return the length of YYSTR. */
878 #if (defined __STDC__ || defined __C99__FUNC__ \
879 || defined __cplusplus || defined _MSC_VER)
880 static YYSIZE_T
881 yystrlen (const char *yystr)
882 #else
883 static YYSIZE_T
884 yystrlen (yystr)
885 const char *yystr;
886 #endif
887 {
888 YYSIZE_T yylen;
889 for (yylen = 0; yystr[yylen]; yylen++)
890 continue;
891 return yylen;
892 }
893 # endif
894 # endif
895
896 # ifndef yystpcpy
897 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
898 # define yystpcpy stpcpy
899 # else
900 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
901 YYDEST. */
902 #if (defined __STDC__ || defined __C99__FUNC__ \
903 || defined __cplusplus || defined _MSC_VER)
904 static char *
905 yystpcpy (char *yydest, const char *yysrc)
906 #else
907 static char *
908 yystpcpy (yydest, yysrc)
909 char *yydest;
910 const char *yysrc;
911 #endif
912 {
913 char *yyd = yydest;
914 const char *yys = yysrc;
915
916 while ((*yyd++ = *yys++) != '\0')
917 continue;
918
919 return yyd - 1;
920 }
921 # endif
922 # endif
923
924 # ifndef yytnamerr
925 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
926 quotes and backslashes, so that it's suitable for yyerror. The
927 heuristic is that double-quoting is unnecessary unless the string
928 contains an apostrophe, a comma, or backslash (other than
929 backslash-backslash). YYSTR is taken from yytname. If YYRES is
930 null, do not copy; instead, return the length of what the result
931 would have been. */
932 static YYSIZE_T
933 yytnamerr (char *yyres, const char *yystr)
934 {
935 if (*yystr == '"')
936 {
937 YYSIZE_T yyn = 0;
938 char const *yyp = yystr;
939
940 for (;;)
941 switch (*++yyp)
942 {
943 case '\'':
944 case ',':
945 goto do_not_strip_quotes;
946
947 case '\\':
948 if (*++yyp != '\\')
949 goto do_not_strip_quotes;
950 /* Fall through. */
951 default:
952 if (yyres)
953 yyres[yyn] = *yyp;
954 yyn++;
955 break;
956
957 case '"':
958 if (yyres)
959 yyres[yyn] = '\0';
960 return yyn;
961 }
962 do_not_strip_quotes: ;
963 }
964
965 if (! yyres)
966 return yystrlen (yystr);
967
968 return yystpcpy (yyres, yystr) - yyres;
969 }
970 # endif
971
972 /* Copy into YYRESULT an error message about the unexpected token
973 YYCHAR while in state YYSTATE. Return the number of bytes copied,
974 including the terminating null byte. If YYRESULT is null, do not
975 copy anything; just return the number of bytes that would be
976 copied. As a special case, return 0 if an ordinary "syntax error"
977 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
978 size calculation. */
979 static YYSIZE_T
980 yysyntax_error (char *yyresult, int yystate, int yychar)
981 {
982 int yyn = yypact[yystate];
983
984 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
985 return 0;
986 else
987 {
988 int yytype = YYTRANSLATE (yychar);
989 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
990 YYSIZE_T yysize = yysize0;
991 YYSIZE_T yysize1;
992 int yysize_overflow = 0;
993 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
994 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
995 int yyx;
996
997 # if 0
998 /* This is so xgettext sees the translatable formats that are
999 constructed on the fly. */
1000 YY_("syntax error, unexpected %s");
1001 YY_("syntax error, unexpected %s, expecting %s");
1002 YY_("syntax error, unexpected %s, expecting %s or %s");
1003 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1004 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1005 # endif
1006 char *yyfmt;
1007 char const *yyf;
1008 static char const yyunexpected[] = "syntax error, unexpected %s";
1009 static char const yyexpecting[] = ", expecting %s";
1010 static char const yyor[] = " or %s";
1011 char yyformat[sizeof yyunexpected
1012 + sizeof yyexpecting - 1
1013 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1014 * (sizeof yyor - 1))];
1015 char const *yyprefix = yyexpecting;
1016
1017 /* Start YYX at -YYN if negative to avoid negative indexes in
1018 YYCHECK. */
1019 int yyxbegin = yyn < 0 ? -yyn : 0;
1020
1021 /* Stay within bounds of both yycheck and yytname. */
1022 int yychecklim = YYLAST - yyn + 1;
1023 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1024 int yycount = 1;
1025
1026 yyarg[0] = yytname[yytype];
1027 yyfmt = yystpcpy (yyformat, yyunexpected);
1028
1029 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1030 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1031 {
1032 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1033 {
1034 yycount = 1;
1035 yysize = yysize0;
1036 yyformat[sizeof yyunexpected - 1] = '\0';
1037 break;
1038 }
1039 yyarg[yycount++] = yytname[yyx];
1040 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1041 yysize_overflow |= (yysize1 < yysize);
1042 yysize = yysize1;
1043 yyfmt = yystpcpy (yyfmt, yyprefix);
1044 yyprefix = yyor;
1045 }
1046
1047 yyf = YY_(yyformat);
1048 yysize1 = yysize + yystrlen (yyf);
1049 yysize_overflow |= (yysize1 < yysize);
1050 yysize = yysize1;
1051
1052 if (yysize_overflow)
1053 return YYSIZE_MAXIMUM;
1054
1055 if (yyresult)
1056 {
1057 /* Avoid sprintf, as that infringes on the user's name space.
1058 Don't have undefined behavior even if the translation
1059 produced a string with the wrong number of "%s"s. */
1060 char *yyp = yyresult;
1061 int yyi = 0;
1062 while ((*yyp = *yyf) != '\0')
1063 {
1064 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1065 {
1066 yyp += yytnamerr (yyp, yyarg[yyi++]);
1067 yyf += 2;
1068 }
1069 else
1070 {
1071 yyp++;
1072 yyf++;
1073 }
1074 }
1075 }
1076 return yysize;
1077 }
1078 }
1079 #endif /* YYERROR_VERBOSE */
1080
1081
1082 /*-----------------------------------------------.
1083 | Release the memory associated to this symbol. |
1084 `-----------------------------------------------*/
1085
1086 /*ARGSUSED*/
1087 #if (defined __STDC__ || defined __C99__FUNC__ \
1088 || defined __cplusplus || defined _MSC_VER)
1089 static void
1090 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1091 #else
1092 static void
1093 yydestruct (yymsg, yytype, yyvaluep)
1094 const char *yymsg;
1095 int yytype;
1096 YYSTYPE *yyvaluep;
1097 #endif
1098 {
1099 YYUSE (yyvaluep);
1100
1101 if (!yymsg)
1102 yymsg = "Deleting";
1103 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1104
1105 switch (yytype)
1106 {
1107
1108 default:
1109 break;
1110 }
1111 }
1112
1113 /* Prevent warnings from -Wmissing-prototypes. */
1114 #ifdef YYPARSE_PARAM
1115 #if defined __STDC__ || defined __cplusplus
1116 int yyparse (void *YYPARSE_PARAM);
1117 #else
1118 int yyparse ();
1119 #endif
1120 #else /* ! YYPARSE_PARAM */
1121 #if defined __STDC__ || defined __cplusplus
1122 int yyparse (void);
1123 #else
1124 int yyparse ();
1125 #endif
1126 #endif /* ! YYPARSE_PARAM */
1127
1128
1129 /* The lookahead symbol. */
1130 int yychar;
1131
1132 /* The semantic value of the lookahead symbol. */
1133 YYSTYPE yylval;
1134
1135 /* Number of syntax errors so far. */
1136 int yynerrs;
1137
1138
1139
1140 /*-------------------------.
1141 | yyparse or yypush_parse. |
1142 `-------------------------*/
1143
1144 #ifdef YYPARSE_PARAM
1145 #if (defined __STDC__ || defined __C99__FUNC__ \
1146 || defined __cplusplus || defined _MSC_VER)
1147 int
1148 yyparse (void *YYPARSE_PARAM)
1149 #else
1150 int
1151 yyparse (YYPARSE_PARAM)
1152 void *YYPARSE_PARAM;
1153 #endif
1154 #else /* ! YYPARSE_PARAM */
1155 #if (defined __STDC__ || defined __C99__FUNC__ \
1156 || defined __cplusplus || defined _MSC_VER)
1157 int
1158 yyparse (void)
1159 #else
1160 int
1161 yyparse ()
1162
1163 #endif
1164 #endif
1165 {
1166
1167
1168 int yystate;
1169 /* Number of tokens to shift before error messages enabled. */
1170 int yyerrstatus;
1171
1172 /* The stacks and their tools:
1173 `yyss': related to states.
1174 `yyvs': related to semantic values.
1175
1176 Refer to the stacks thru separate pointers, to allow yyoverflow
1177 to reallocate them elsewhere. */
1178
1179 /* The state stack. */
1180 yytype_int16 yyssa[YYINITDEPTH];
1181 yytype_int16 *yyss;
1182 yytype_int16 *yyssp;
1183
1184 /* The semantic value stack. */
1185 YYSTYPE yyvsa[YYINITDEPTH];
1186 YYSTYPE *yyvs;
1187 YYSTYPE *yyvsp;
1188
1189 YYSIZE_T yystacksize;
1190
1191 int yyn;
1192 int yyresult;
1193 /* Lookahead token as an internal (translated) token number. */
1194 int yytoken;
1195 /* The variables used to return semantic value and location from the
1196 action routines. */
1197 YYSTYPE yyval;
1198
1199 #if YYERROR_VERBOSE
1200 /* Buffer for error messages, and its allocated size. */
1201 char yymsgbuf[128];
1202 char *yymsg = yymsgbuf;
1203 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1204 #endif
1205
1206 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1207
1208 /* The number of symbols on the RHS of the reduced rule.
1209 Keep to zero when no symbol should be popped. */
1210 int yylen = 0;
1211
1212 yytoken = 0;
1213 yyss = yyssa;
1214 yyvs = yyvsa;
1215 yystacksize = YYINITDEPTH;
1216
1217 YYDPRINTF ((stderr, "Starting parse\n"));
1218
1219 yystate = 0;
1220 yyerrstatus = 0;
1221 yynerrs = 0;
1222 yychar = YYEMPTY; /* Cause a token to be read. */
1223
1224 /* Initialize stack pointers.
1225 Waste one element of value and location stack
1226 so that they stay on the same level as the state stack.
1227 The wasted elements are never initialized. */
1228 yyssp = yyss;
1229 yyvsp = yyvs;
1230
1231 goto yysetstate;
1232
1233 /*------------------------------------------------------------.
1234 | yynewstate -- Push a new state, which is found in yystate. |
1235 `------------------------------------------------------------*/
1236 yynewstate:
1237 /* In all cases, when you get here, the value and location stacks
1238 have just been pushed. So pushing a state here evens the stacks. */
1239 yyssp++;
1240
1241 yysetstate:
1242 *yyssp = yystate;
1243
1244 if (yyss + yystacksize - 1 <= yyssp)
1245 {
1246 /* Get the current used size of the three stacks, in elements. */
1247 YYSIZE_T yysize = yyssp - yyss + 1;
1248
1249 #ifdef yyoverflow
1250 {
1251 /* Give user a chance to reallocate the stack. Use copies of
1252 these so that the &'s don't force the real ones into
1253 memory. */
1254 YYSTYPE *yyvs1 = yyvs;
1255 yytype_int16 *yyss1 = yyss;
1256
1257 /* Each stack pointer address is followed by the size of the
1258 data in use in that stack, in bytes. This used to be a
1259 conditional around just the two extra args, but that might
1260 be undefined if yyoverflow is a macro. */
1261 yyoverflow (YY_("memory exhausted"),
1262 &yyss1, yysize * sizeof (*yyssp),
1263 &yyvs1, yysize * sizeof (*yyvsp),
1264 &yystacksize);
1265
1266 yyss = yyss1;
1267 yyvs = yyvs1;
1268 }
1269 #else /* no yyoverflow */
1270 # ifndef YYSTACK_RELOCATE
1271 goto yyexhaustedlab;
1272 # else
1273 /* Extend the stack our own way. */
1274 if (YYMAXDEPTH <= yystacksize)
1275 goto yyexhaustedlab;
1276 yystacksize *= 2;
1277 if (YYMAXDEPTH < yystacksize)
1278 yystacksize = YYMAXDEPTH;
1279
1280 {
1281 yytype_int16 *yyss1 = yyss;
1282 union yyalloc *yyptr =
1283 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1284 if (! yyptr)
1285 goto yyexhaustedlab;
1286 YYSTACK_RELOCATE (yyss_alloc, yyss);
1287 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1288 # undef YYSTACK_RELOCATE
1289 if (yyss1 != yyssa)
1290 YYSTACK_FREE (yyss1);
1291 }
1292 # endif
1293 #endif /* no yyoverflow */
1294
1295 yyssp = yyss + yysize - 1;
1296 yyvsp = yyvs + yysize - 1;
1297
1298 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1299 (unsigned long int) yystacksize));
1300
1301 if (yyss + yystacksize - 1 <= yyssp)
1302 YYABORT;
1303 }
1304
1305 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1306
1307 if (yystate == YYFINAL)
1308 YYACCEPT;
1309
1310 goto yybackup;
1311
1312 /*-----------.
1313 | yybackup. |
1314 `-----------*/
1315 yybackup:
1316
1317 /* Do appropriate processing given the current state. Read a
1318 lookahead token if we need one and don't already have one. */
1319
1320 /* First try to decide what to do without reference to lookahead token. */
1321 yyn = yypact[yystate];
1322 if (yyn == YYPACT_NINF)
1323 goto yydefault;
1324
1325 /* Not known => get a lookahead token if don't already have one. */
1326
1327 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1328 if (yychar == YYEMPTY)
1329 {
1330 YYDPRINTF ((stderr, "Reading a token: "));
1331 yychar = YYLEX;
1332 }
1333
1334 if (yychar <= YYEOF)
1335 {
1336 yychar = yytoken = YYEOF;
1337 YYDPRINTF ((stderr, "Now at end of input.\n"));
1338 }
1339 else
1340 {
1341 yytoken = YYTRANSLATE (yychar);
1342 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1343 }
1344
1345 /* If the proper action on seeing token YYTOKEN is to reduce or to
1346 detect an error, take that action. */
1347 yyn += yytoken;
1348 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1349 goto yydefault;
1350 yyn = yytable[yyn];
1351 if (yyn <= 0)
1352 {
1353 if (yyn == 0 || yyn == YYTABLE_NINF)
1354 goto yyerrlab;
1355 yyn = -yyn;
1356 goto yyreduce;
1357 }
1358
1359 /* Count tokens shifted since error; after three, turn off error
1360 status. */
1361 if (yyerrstatus)
1362 yyerrstatus--;
1363
1364 /* Shift the lookahead token. */
1365 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1366
1367 /* Discard the shifted token. */
1368 yychar = YYEMPTY;
1369
1370 yystate = yyn;
1371 *++yyvsp = yylval;
1372
1373 goto yynewstate;
1374
1375
1376 /*-----------------------------------------------------------.
1377 | yydefault -- do the default action for the current state. |
1378 `-----------------------------------------------------------*/
1379 yydefault:
1380 yyn = yydefact[yystate];
1381 if (yyn == 0)
1382 goto yyerrlab;
1383 goto yyreduce;
1384
1385
1386 /*-----------------------------.
1387 | yyreduce -- Do a reduction. |
1388 `-----------------------------*/
1389 yyreduce:
1390 /* yyn is the number of a rule to reduce with. */
1391 yylen = yyr2[yyn];
1392
1393 /* If YYLEN is nonzero, implement the default value of the action:
1394 `$$ = $1'.
1395
1396 Otherwise, the following line sets YYVAL to garbage.
1397 This behavior is undocumented and Bison
1398 users should not rely upon it. Assigning to YYVAL
1399 unconditionally makes the parser a bit smaller, and it avoids a
1400 GCC warning that YYVAL may be used uninitialized. */
1401 yyval = yyvsp[1-yylen];
1402
1403
1404 YY_REDUCE_PRINT (yyn);
1405 switch (yyn)
1406 {
1407 case 2:
1408
1409 /* Line 1455 of yacc.c */
1410 #line 215 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1411 { ;}
1412 break;
1413
1414 case 5:
1415
1416 /* Line 1455 of yacc.c */
1417 #line 224 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1418 { DtCreateField ((yyvsp[(1) - (3)].u), (yyvsp[(3) - (3)].u), DtLabelByteOffset); ;}
1419 break;
1420
1421 case 6:
1422
1423 /* Line 1455 of yacc.c */
1424 #line 228 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1425 { (yyval.u) = (yyvsp[(1) - (1)].u); ;}
1426 break;
1427
1428 case 7:
1429
1430 /* Line 1455 of yacc.c */
1431 #line 229 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1432 { (yyval.u) = (yyvsp[(1) - (1)].u); ;}
1433 break;
1434
1435 case 8:
1436
1437 /* Line 1455 of yacc.c */
1438 #line 230 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1439 { (yyval.u) = (yyvsp[(1) - (2)].u); ;}
1440 break;
1441
1442 case 9:
1443
1444 /* Line 1455 of yacc.c */
1445 #line 234 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1446 { (yyval.u) = DtCreateTableUnit (AcpiUtStrcat(AcpiUtStrcat((yyvsp[(1) - (2)].u)->Value, " "), (yyvsp[(2) - (2)].u)->Value), (yyvsp[(1) - (2)].u)->Line, (yyvsp[(1) - (2)].u)->Column); ;}
1447 break;
1448
1449 case 10:
1450
1451 /* Line 1455 of yacc.c */
1452 #line 235 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1453 { (yyval.u) = (yyvsp[(1) - (1)].u); ;}
1454 break;
1455
1456 case 11:
1457
1458 /* Line 1455 of yacc.c */
1459 #line 239 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1460 { DbgPrint (ASL_PARSE_OUTPUT, "line continuation detected\n"); (yyval.u) = (yyvsp[(2) - (2)].u); ;}
1461 break;
1462
1463 case 12:
1464
1465 /* Line 1455 of yacc.c */
1466 #line 243 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1467 {
1468 DbgPrint (ASL_PARSE_OUTPUT, "parser data: [%s]\n", DtCompilerParserlval.s);
1469 (yyval.u) = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
1470 ;}
1471 break;
1472
1473 case 13:
1474
1475 /* Line 1455 of yacc.c */
1476 #line 247 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1477 {
1478 DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s);
1479 (yyval.u) = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
1480 ;}
1481 break;
1482
1483
1484
1485 /* Line 1455 of yacc.c */
1486 #line 1595 "dtcompilerparser.tab.c"
1487 default: break;
1488 }
1489 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1490
1491 YYPOPSTACK (yylen);
1492 yylen = 0;
1493 YY_STACK_PRINT (yyss, yyssp);
1494
1495 *++yyvsp = yyval;
1496
1497 /* Now `shift' the result of the reduction. Determine what state
1498 that goes to, based on the state we popped back to and the rule
1499 number reduced by. */
1500
1501 yyn = yyr1[yyn];
1502
1503 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1504 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1505 yystate = yytable[yystate];
1506 else
1507 yystate = yydefgoto[yyn - YYNTOKENS];
1508
1509 goto yynewstate;
1510
1511
1512 /*------------------------------------.
1513 | yyerrlab -- here on detecting error |
1514 `------------------------------------*/
1515 yyerrlab:
1516 /* If not already recovering from an error, report this error. */
1517 if (!yyerrstatus)
1518 {
1519 ++yynerrs;
1520 #if ! YYERROR_VERBOSE
1521 yyerror (YY_("syntax error"));
1522 #else
1523 {
1524 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1525 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1526 {
1527 YYSIZE_T yyalloc = 2 * yysize;
1528 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1529 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1530 if (yymsg != yymsgbuf)
1531 YYSTACK_FREE (yymsg);
1532 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1533 if (yymsg)
1534 yymsg_alloc = yyalloc;
1535 else
1536 {
1537 yymsg = yymsgbuf;
1538 yymsg_alloc = sizeof yymsgbuf;
1539 }
1540 }
1541
1542 if (0 < yysize && yysize <= yymsg_alloc)
1543 {
1544 (void) yysyntax_error (yymsg, yystate, yychar);
1545 yyerror (yymsg);
1546 }
1547 else
1548 {
1549 yyerror (YY_("syntax error"));
1550 if (yysize != 0)
1551 goto yyexhaustedlab;
1552 }
1553 }
1554 #endif
1555 }
1556
1557
1558
1559 if (yyerrstatus == 3)
1560 {
1561 /* If just tried and failed to reuse lookahead token after an
1562 error, discard it. */
1563
1564 if (yychar <= YYEOF)
1565 {
1566 /* Return failure if at end of input. */
1567 if (yychar == YYEOF)
1568 YYABORT;
1569 }
1570 else
1571 {
1572 yydestruct ("Error: discarding",
1573 yytoken, &yylval);
1574 yychar = YYEMPTY;
1575 }
1576 }
1577
1578 /* Else will try to reuse lookahead token after shifting the error
1579 token. */
1580 goto yyerrlab1;
1581
1582
1583 /*---------------------------------------------------.
1584 | yyerrorlab -- error raised explicitly by YYERROR. |
1585 `---------------------------------------------------*/
1586 yyerrorlab:
1587
1588 /* Pacify compilers like GCC when the user code never invokes
1589 YYERROR and the label yyerrorlab therefore never appears in user
1590 code. */
1591 if (/*CONSTCOND*/ 0)
1592 goto yyerrorlab;
1593
1594 /* Do not reclaim the symbols of the rule which action triggered
1595 this YYERROR. */
1596 YYPOPSTACK (yylen);
1597 yylen = 0;
1598 YY_STACK_PRINT (yyss, yyssp);
1599 yystate = *yyssp;
1600 goto yyerrlab1;
1601
1602
1603 /*-------------------------------------------------------------.
1604 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1605 `-------------------------------------------------------------*/
1606 yyerrlab1:
1607 yyerrstatus = 3; /* Each real token shifted decrements this. */
1608
1609 for (;;)
1610 {
1611 yyn = yypact[yystate];
1612 if (yyn != YYPACT_NINF)
1613 {
1614 yyn += YYTERROR;
1615 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1616 {
1617 yyn = yytable[yyn];
1618 if (0 < yyn)
1619 break;
1620 }
1621 }
1622
1623 /* Pop the current state because it cannot handle the error token. */
1624 if (yyssp == yyss)
1625 YYABORT;
1626
1627
1628 yydestruct ("Error: popping",
1629 yystos[yystate], yyvsp);
1630 YYPOPSTACK (1);
1631 yystate = *yyssp;
1632 YY_STACK_PRINT (yyss, yyssp);
1633 }
1634
1635 *++yyvsp = yylval;
1636
1637
1638 /* Shift the error token. */
1639 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1640
1641 yystate = yyn;
1642 goto yynewstate;
1643
1644
1645 /*-------------------------------------.
1646 | yyacceptlab -- YYACCEPT comes here. |
1647 `-------------------------------------*/
1648 yyacceptlab:
1649 yyresult = 0;
1650 goto yyreturn;
1651
1652 /*-----------------------------------.
1653 | yyabortlab -- YYABORT comes here. |
1654 `-----------------------------------*/
1655 yyabortlab:
1656 yyresult = 1;
1657 goto yyreturn;
1658
1659 #if !defined(yyoverflow) || YYERROR_VERBOSE
1660 /*-------------------------------------------------.
1661 | yyexhaustedlab -- memory exhaustion comes here. |
1662 `-------------------------------------------------*/
1663 yyexhaustedlab:
1664 yyerror (YY_("memory exhausted"));
1665 yyresult = 2;
1666 /* Fall through. */
1667 #endif
1668
1669 yyreturn:
1670 if (yychar != YYEMPTY)
1671 yydestruct ("Cleanup: discarding lookahead",
1672 yytoken, &yylval);
1673 /* Do not reclaim the symbols of the rule which action triggered
1674 this YYABORT or YYACCEPT. */
1675 YYPOPSTACK (yylen);
1676 YY_STACK_PRINT (yyss, yyssp);
1677 while (yyssp != yyss)
1678 {
1679 yydestruct ("Cleanup: popping",
1680 yystos[*yyssp], yyvsp);
1681 YYPOPSTACK (1);
1682 }
1683 #ifndef yyoverflow
1684 if (yyss != yyssa)
1685 YYSTACK_FREE (yyss);
1686 #endif
1687 #if YYERROR_VERBOSE
1688 if (yymsg != yymsgbuf)
1689 YYSTACK_FREE (yymsg);
1690 #endif
1691 /* Make sure YYID is used. */
1692 return YYID (yyresult);
1693 }
1694
1695
1696
1697 /* Line 1675 of yacc.c */
1698 #line 254 "C:\\Users\\sdumbre\\testclone\\source\\compiler\\dtcompilerparser.y"
1699
1700
1701
1702 /*
1703 * Local support functions, including parser entry point
1704 */
1705 /******************************************************************************
1706 *
1707 * FUNCTION: DtCompilerParsererror
1708 *
1709 * PARAMETERS: Message - Parser-generated error message
1710 *
1711 * RETURN: None
1712 *
1713 * DESCRIPTION: Handler for parser errors
1714 *
1715 *****************************************************************************/
1716
1717 void
1718 DtCompilerParsererror (
1719 char const *Message)
1720 {
1721 DtError (ASL_ERROR, ASL_MSG_SYNTAX,
1722 AslGbl_CurrentField, (char *) Message);
1723 }
1724
1725 int
1726 DtCompilerParserwrap(void)
1727 {
1728 return (1);
1729 }
1730