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