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