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