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