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