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