gram.c revision fd7d9bd3
1fd7d9bd3Smrg/* A Bison parser, made by GNU Bison 1.875c. */ 2fd7d9bd3Smrg 3fd7d9bd3Smrg/* Skeleton parser for Yacc-like parsing with Bison, 4fd7d9bd3Smrg Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. 5fd7d9bd3Smrg 6fd7d9bd3Smrg This program is free software; you can redistribute it and/or modify 7fd7d9bd3Smrg it under the terms of the GNU General Public License as published by 8fd7d9bd3Smrg the Free Software Foundation; either version 2, or (at your option) 9fd7d9bd3Smrg any later version. 10fd7d9bd3Smrg 11fd7d9bd3Smrg This program is distributed in the hope that it will be useful, 12fd7d9bd3Smrg but WITHOUT ANY WARRANTY; without even the implied warranty of 13fd7d9bd3Smrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14fd7d9bd3Smrg GNU General Public License for more details. 15fd7d9bd3Smrg 16fd7d9bd3Smrg You should have received a copy of the GNU General Public License 17fd7d9bd3Smrg along with this program; if not, write to the Free Software 18fd7d9bd3Smrg Foundation, Inc., 59 Temple Place - Suite 330, 19fd7d9bd3Smrg Boston, MA 02111-1307, USA. */ 20fd7d9bd3Smrg 21fd7d9bd3Smrg/* As a special exception, when this file is copied by Bison into a 22fd7d9bd3Smrg Bison output file, you may use that output file without restriction. 23fd7d9bd3Smrg This special exception was added by the Free Software Foundation 24fd7d9bd3Smrg in version 1.24 of Bison. */ 25fd7d9bd3Smrg 26fd7d9bd3Smrg/* Written by Richard Stallman by simplifying the original so called 27fd7d9bd3Smrg ``semantic'' parser. */ 28fd7d9bd3Smrg 29fd7d9bd3Smrg/* All symbols defined below should begin with yy or YY, to avoid 30fd7d9bd3Smrg infringing on user name space. This should be done even for local 31fd7d9bd3Smrg variables, as they might otherwise be expanded by user macros. 32fd7d9bd3Smrg There are some unavoidable exceptions within include files to 33fd7d9bd3Smrg define necessary library symbols; they are noted "INFRINGES ON 34fd7d9bd3Smrg USER NAME SPACE" below. */ 35fd7d9bd3Smrg 36fd7d9bd3Smrg/* Identify Bison output. */ 37fd7d9bd3Smrg#define YYBISON 1 38fd7d9bd3Smrg 39fd7d9bd3Smrg/* Skeleton name. */ 40fd7d9bd3Smrg#define YYSKELETON_NAME "yacc.c" 41fd7d9bd3Smrg 42fd7d9bd3Smrg/* Pure parsers. */ 43fd7d9bd3Smrg#define YYPURE 0 44fd7d9bd3Smrg 45fd7d9bd3Smrg/* Using locations. */ 46fd7d9bd3Smrg#define YYLSP_NEEDED 0 47fd7d9bd3Smrg 48fd7d9bd3Smrg 49fd7d9bd3Smrg 50fd7d9bd3Smrg/* Tokens. */ 51fd7d9bd3Smrg#ifndef YYTOKENTYPE 52fd7d9bd3Smrg# define YYTOKENTYPE 53fd7d9bd3Smrg /* Put the tokens into the symbol table, so that GDB and other debuggers 54fd7d9bd3Smrg know about them. */ 55fd7d9bd3Smrg enum yytokentype { 56fd7d9bd3Smrg STRING = 258, 57fd7d9bd3Smrg NUMBER = 259, 58fd7d9bd3Smrg RUN = 260, 59fd7d9bd3Smrg FUNCTION = 261, 60fd7d9bd3Smrg FUNCTIONTYPE = 262, 61fd7d9bd3Smrg TEST = 263, 62fd7d9bd3Smrg TESTTYPE = 264, 63fd7d9bd3Smrg LINESTYLE = 265, 64fd7d9bd3Smrg LINESTYLETYPE = 266, 65fd7d9bd3Smrg CAPSTYLE = 267, 66fd7d9bd3Smrg CAPSTYLETYPE = 268, 67fd7d9bd3Smrg JOINSTYLE = 269, 68fd7d9bd3Smrg JOINSTYLETYPE = 270, 69fd7d9bd3Smrg ROUND = 271, 70fd7d9bd3Smrg SOLID = 272, 71fd7d9bd3Smrg FILLSTYLE = 273, 72fd7d9bd3Smrg FILLSTYLETYPE = 274, 73fd7d9bd3Smrg FILLRULE = 275, 74fd7d9bd3Smrg FILLRULETYPE = 276, 75fd7d9bd3Smrg ARCMODE = 277, 76fd7d9bd3Smrg ARCMODETYPE = 278, 77fd7d9bd3Smrg FOREGROUND = 279, 78fd7d9bd3Smrg BACKGROUND = 280, 79fd7d9bd3Smrg LINEWIDTH = 281, 80fd7d9bd3Smrg PLANEMASK = 282, 81fd7d9bd3Smrg DASHLIST = 283, 82fd7d9bd3Smrg PERCENT = 284, 83fd7d9bd3Smrg FONT = 285 84fd7d9bd3Smrg }; 85fd7d9bd3Smrg#endif 86fd7d9bd3Smrg#define STRING 258 87fd7d9bd3Smrg#define NUMBER 259 88fd7d9bd3Smrg#define RUN 260 89fd7d9bd3Smrg#define FUNCTION 261 90fd7d9bd3Smrg#define FUNCTIONTYPE 262 91fd7d9bd3Smrg#define TEST 263 92fd7d9bd3Smrg#define TESTTYPE 264 93fd7d9bd3Smrg#define LINESTYLE 265 94fd7d9bd3Smrg#define LINESTYLETYPE 266 95fd7d9bd3Smrg#define CAPSTYLE 267 96fd7d9bd3Smrg#define CAPSTYLETYPE 268 97fd7d9bd3Smrg#define JOINSTYLE 269 98fd7d9bd3Smrg#define JOINSTYLETYPE 270 99fd7d9bd3Smrg#define ROUND 271 100fd7d9bd3Smrg#define SOLID 272 101fd7d9bd3Smrg#define FILLSTYLE 273 102fd7d9bd3Smrg#define FILLSTYLETYPE 274 103fd7d9bd3Smrg#define FILLRULE 275 104fd7d9bd3Smrg#define FILLRULETYPE 276 105fd7d9bd3Smrg#define ARCMODE 277 106fd7d9bd3Smrg#define ARCMODETYPE 278 107fd7d9bd3Smrg#define FOREGROUND 279 108fd7d9bd3Smrg#define BACKGROUND 280 109fd7d9bd3Smrg#define LINEWIDTH 281 110fd7d9bd3Smrg#define PLANEMASK 282 111fd7d9bd3Smrg#define DASHLIST 283 112fd7d9bd3Smrg#define PERCENT 284 113fd7d9bd3Smrg#define FONT 285 114fd7d9bd3Smrg 115fd7d9bd3Smrg 116fd7d9bd3Smrg 117fd7d9bd3Smrg 118fd7d9bd3Smrg/* Copy the first part of user declarations. */ 119fd7d9bd3Smrg#line 6 "gram.y" 120fd7d9bd3Smrg 121fd7d9bd3Smrg#define YYDEBUG 1 122fd7d9bd3Smrg 123fd7d9bd3Smrg#include <stdio.h> 124fd7d9bd3Smrg#include <X11/X.h> 125fd7d9bd3Smrg#include <X11/Intrinsic.h> 126fd7d9bd3Smrg#include "xgc.h" 127fd7d9bd3Smrg 128fd7d9bd3Smrgextern int yylineno; 129fd7d9bd3Smrg 130fd7d9bd3Smrg 131fd7d9bd3Smrg 132fd7d9bd3Smrg/* Enabling traces. */ 133fd7d9bd3Smrg#ifndef YYDEBUG 134fd7d9bd3Smrg# define YYDEBUG 0 135fd7d9bd3Smrg#endif 136fd7d9bd3Smrg 137fd7d9bd3Smrg/* Enabling verbose error messages. */ 138fd7d9bd3Smrg#ifdef YYERROR_VERBOSE 139fd7d9bd3Smrg# undef YYERROR_VERBOSE 140fd7d9bd3Smrg# define YYERROR_VERBOSE 1 141fd7d9bd3Smrg#else 142fd7d9bd3Smrg# define YYERROR_VERBOSE 0 143fd7d9bd3Smrg#endif 144fd7d9bd3Smrg 145fd7d9bd3Smrg#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 146fd7d9bd3Smrg#line 19 "gram.y" 147fd7d9bd3Smrgtypedef union YYSTYPE { 148fd7d9bd3Smrg int num; 149fd7d9bd3Smrg char *ptr; 150fd7d9bd3Smrg} YYSTYPE; 151fd7d9bd3Smrg/* Line 191 of yacc.c. */ 152fd7d9bd3Smrg#line 153 "gram.c" 153fd7d9bd3Smrg# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 154fd7d9bd3Smrg# define YYSTYPE_IS_DECLARED 1 155fd7d9bd3Smrg# define YYSTYPE_IS_TRIVIAL 1 156fd7d9bd3Smrg#endif 157fd7d9bd3Smrg 158fd7d9bd3Smrg 159fd7d9bd3Smrg 160fd7d9bd3Smrg/* Copy the second part of user declarations. */ 161fd7d9bd3Smrg 162fd7d9bd3Smrg 163fd7d9bd3Smrg/* Line 214 of yacc.c. */ 164fd7d9bd3Smrg#line 165 "gram.c" 165fd7d9bd3Smrg 166fd7d9bd3Smrg#if ! defined (yyoverflow) || YYERROR_VERBOSE 167fd7d9bd3Smrg 168fd7d9bd3Smrg# ifndef YYFREE 169fd7d9bd3Smrg# define YYFREE free 170fd7d9bd3Smrg# endif 171fd7d9bd3Smrg# ifndef YYMALLOC 172fd7d9bd3Smrg# define YYMALLOC malloc 173fd7d9bd3Smrg# endif 174fd7d9bd3Smrg 175fd7d9bd3Smrg/* The parser invokes alloca or malloc; define the necessary symbols. */ 176fd7d9bd3Smrg 177fd7d9bd3Smrg# ifdef YYSTACK_USE_ALLOCA 178fd7d9bd3Smrg# if YYSTACK_USE_ALLOCA 179fd7d9bd3Smrg# define YYSTACK_ALLOC alloca 180fd7d9bd3Smrg# endif 181fd7d9bd3Smrg# else 182fd7d9bd3Smrg# if defined (alloca) || defined (_ALLOCA_H) 183fd7d9bd3Smrg# define YYSTACK_ALLOC alloca 184fd7d9bd3Smrg# else 185fd7d9bd3Smrg# ifdef __GNUC__ 186fd7d9bd3Smrg# define YYSTACK_ALLOC __builtin_alloca 187fd7d9bd3Smrg# endif 188fd7d9bd3Smrg# endif 189fd7d9bd3Smrg# endif 190fd7d9bd3Smrg 191fd7d9bd3Smrg# ifdef YYSTACK_ALLOC 192fd7d9bd3Smrg /* Pacify GCC's `empty if-body' warning. */ 193fd7d9bd3Smrg# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 194fd7d9bd3Smrg# else 195fd7d9bd3Smrg# if defined (__STDC__) || defined (__cplusplus) 196fd7d9bd3Smrg# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 197fd7d9bd3Smrg# define YYSIZE_T size_t 198fd7d9bd3Smrg# endif 199fd7d9bd3Smrg# define YYSTACK_ALLOC YYMALLOC 200fd7d9bd3Smrg# define YYSTACK_FREE YYFREE 201fd7d9bd3Smrg# endif 202fd7d9bd3Smrg#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 203fd7d9bd3Smrg 204fd7d9bd3Smrg 205fd7d9bd3Smrg#if (! defined (yyoverflow) \ 206fd7d9bd3Smrg && (! defined (__cplusplus) \ 207fd7d9bd3Smrg || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) 208fd7d9bd3Smrg 209fd7d9bd3Smrg/* A type that is properly aligned for any stack member. */ 210fd7d9bd3Smrgunion yyalloc 211fd7d9bd3Smrg{ 212fd7d9bd3Smrg short yyss; 213fd7d9bd3Smrg YYSTYPE yyvs; 214fd7d9bd3Smrg }; 215fd7d9bd3Smrg 216fd7d9bd3Smrg/* The size of the maximum gap between one aligned stack and the next. */ 217fd7d9bd3Smrg# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 218fd7d9bd3Smrg 219fd7d9bd3Smrg/* The size of an array large to enough to hold all stacks, each with 220fd7d9bd3Smrg N elements. */ 221fd7d9bd3Smrg# define YYSTACK_BYTES(N) \ 222fd7d9bd3Smrg ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ 223fd7d9bd3Smrg + YYSTACK_GAP_MAXIMUM) 224fd7d9bd3Smrg 225fd7d9bd3Smrg/* Copy COUNT objects from FROM to TO. The source and destination do 226fd7d9bd3Smrg not overlap. */ 227fd7d9bd3Smrg# ifndef YYCOPY 228fd7d9bd3Smrg# if defined (__GNUC__) && 1 < __GNUC__ 229fd7d9bd3Smrg# define YYCOPY(To, From, Count) \ 230fd7d9bd3Smrg __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 231fd7d9bd3Smrg# else 232fd7d9bd3Smrg# define YYCOPY(To, From, Count) \ 233fd7d9bd3Smrg do \ 234fd7d9bd3Smrg { \ 235fd7d9bd3Smrg register YYSIZE_T yyi; \ 236fd7d9bd3Smrg for (yyi = 0; yyi < (Count); yyi++) \ 237fd7d9bd3Smrg (To)[yyi] = (From)[yyi]; \ 238fd7d9bd3Smrg } \ 239fd7d9bd3Smrg while (0) 240fd7d9bd3Smrg# endif 241fd7d9bd3Smrg# endif 242fd7d9bd3Smrg 243fd7d9bd3Smrg/* Relocate STACK from its old location to the new one. The 244fd7d9bd3Smrg local variables YYSIZE and YYSTACKSIZE give the old and new number of 245fd7d9bd3Smrg elements in the stack, and YYPTR gives the new location of the 246fd7d9bd3Smrg stack. Advance YYPTR to a properly aligned location for the next 247fd7d9bd3Smrg stack. */ 248fd7d9bd3Smrg# define YYSTACK_RELOCATE(Stack) \ 249fd7d9bd3Smrg do \ 250fd7d9bd3Smrg { \ 251fd7d9bd3Smrg YYSIZE_T yynewbytes; \ 252fd7d9bd3Smrg YYCOPY (&yyptr->Stack, Stack, yysize); \ 253fd7d9bd3Smrg Stack = &yyptr->Stack; \ 254fd7d9bd3Smrg yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 255fd7d9bd3Smrg yyptr += yynewbytes / sizeof (*yyptr); \ 256fd7d9bd3Smrg } \ 257fd7d9bd3Smrg while (0) 258fd7d9bd3Smrg 259fd7d9bd3Smrg#endif 260fd7d9bd3Smrg 261fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 262fd7d9bd3Smrg typedef signed char yysigned_char; 263fd7d9bd3Smrg#else 264fd7d9bd3Smrg typedef short yysigned_char; 265fd7d9bd3Smrg#endif 266fd7d9bd3Smrg 267fd7d9bd3Smrg/* YYFINAL -- State number of the termination state. */ 268fd7d9bd3Smrg#define YYFINAL 3 269fd7d9bd3Smrg/* YYLAST -- Last index in YYTABLE. */ 270fd7d9bd3Smrg#define YYLAST 40 271fd7d9bd3Smrg 272fd7d9bd3Smrg/* YYNTOKENS -- Number of terminals. */ 273fd7d9bd3Smrg#define YYNTOKENS 32 274fd7d9bd3Smrg/* YYNNTS -- Number of nonterminals. */ 275fd7d9bd3Smrg#define YYNNTS 4 276fd7d9bd3Smrg/* YYNRULES -- Number of rules. */ 277fd7d9bd3Smrg#define YYNRULES 26 278fd7d9bd3Smrg/* YYNRULES -- Number of states. */ 279fd7d9bd3Smrg#define YYNSTATES 43 280fd7d9bd3Smrg 281fd7d9bd3Smrg/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 282fd7d9bd3Smrg#define YYUNDEFTOK 2 283fd7d9bd3Smrg#define YYMAXUTOK 285 284fd7d9bd3Smrg 285fd7d9bd3Smrg#define YYTRANSLATE(YYX) \ 286fd7d9bd3Smrg ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 287fd7d9bd3Smrg 288fd7d9bd3Smrg/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 289fd7d9bd3Smrgstatic const unsigned char yytranslate[] = 290fd7d9bd3Smrg{ 291fd7d9bd3Smrg 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 292fd7d9bd3Smrg 31, 2, 2, 2, 2, 2, 2, 2, 2, 2, 293fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 294fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 295fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 296fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 297fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 298fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 299fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 300fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 301fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 302fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 303fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 304fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 305fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 306fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 307fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 308fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 309fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 310fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 311fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 312fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 313fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 314fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 315fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 316fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 317fd7d9bd3Smrg 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 318fd7d9bd3Smrg 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 319fd7d9bd3Smrg 25, 26, 27, 28, 29, 30 320fd7d9bd3Smrg}; 321fd7d9bd3Smrg 322fd7d9bd3Smrg#if YYDEBUG 323fd7d9bd3Smrg/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 324fd7d9bd3Smrg YYRHS. */ 325fd7d9bd3Smrgstatic const unsigned char yyprhs[] = 326fd7d9bd3Smrg{ 327fd7d9bd3Smrg 0, 0, 3, 5, 6, 9, 13, 15, 17, 20, 328fd7d9bd3Smrg 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 329fd7d9bd3Smrg 53, 56, 59, 62, 65, 68, 71 330fd7d9bd3Smrg}; 331fd7d9bd3Smrg 332fd7d9bd3Smrg/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 333fd7d9bd3Smrgstatic const yysigned_char yyrhs[] = 334fd7d9bd3Smrg{ 335fd7d9bd3Smrg 33, 0, -1, 34, -1, -1, 34, 31, -1, 34, 336fd7d9bd3Smrg 35, 31, -1, 1, -1, 5, -1, 8, 9, -1, 337fd7d9bd3Smrg 6, 7, -1, 10, 11, -1, 10, 17, -1, 12, 338fd7d9bd3Smrg 13, -1, 12, 16, -1, 14, 15, -1, 14, 16, 339fd7d9bd3Smrg -1, 18, 19, -1, 18, 17, -1, 20, 21, -1, 340fd7d9bd3Smrg 22, 23, -1, 24, 4, -1, 25, 4, -1, 26, 341fd7d9bd3Smrg 4, -1, 27, 4, -1, 28, 4, -1, 30, 3, 342fd7d9bd3Smrg -1, 29, 4, -1 343fd7d9bd3Smrg}; 344fd7d9bd3Smrg 345fd7d9bd3Smrg/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 346fd7d9bd3Smrgstatic const unsigned char yyrline[] = 347fd7d9bd3Smrg{ 348fd7d9bd3Smrg 0, 41, 41, 44, 45, 46, 49, 50, 52, 54, 349fd7d9bd3Smrg 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 350fd7d9bd3Smrg 76, 78, 80, 82, 84, 86, 88 351fd7d9bd3Smrg}; 352fd7d9bd3Smrg#endif 353fd7d9bd3Smrg 354fd7d9bd3Smrg#if YYDEBUG || YYERROR_VERBOSE 355fd7d9bd3Smrg/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 356fd7d9bd3Smrg First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 357fd7d9bd3Smrgstatic const char *const yytname[] = 358fd7d9bd3Smrg{ 359fd7d9bd3Smrg "$end", "error", "$undefined", "STRING", "NUMBER", "RUN", "FUNCTION", 360fd7d9bd3Smrg "FUNCTIONTYPE", "TEST", "TESTTYPE", "LINESTYLE", "LINESTYLETYPE", 361fd7d9bd3Smrg "CAPSTYLE", "CAPSTYLETYPE", "JOINSTYLE", "JOINSTYLETYPE", "ROUND", 362fd7d9bd3Smrg "SOLID", "FILLSTYLE", "FILLSTYLETYPE", "FILLRULE", "FILLRULETYPE", 363fd7d9bd3Smrg "ARCMODE", "ARCMODETYPE", "FOREGROUND", "BACKGROUND", "LINEWIDTH", 364fd7d9bd3Smrg "PLANEMASK", "DASHLIST", "PERCENT", "FONT", "'\\n'", "$accept", "all", 365fd7d9bd3Smrg "stmts", "stmt", 0 366fd7d9bd3Smrg}; 367fd7d9bd3Smrg#endif 368fd7d9bd3Smrg 369fd7d9bd3Smrg# ifdef YYPRINT 370fd7d9bd3Smrg/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 371fd7d9bd3Smrg token YYLEX-NUM. */ 372fd7d9bd3Smrgstatic const unsigned short yytoknum[] = 373fd7d9bd3Smrg{ 374fd7d9bd3Smrg 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 375fd7d9bd3Smrg 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 376fd7d9bd3Smrg 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 377fd7d9bd3Smrg 285, 10 378fd7d9bd3Smrg}; 379fd7d9bd3Smrg# endif 380fd7d9bd3Smrg 381fd7d9bd3Smrg/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 382fd7d9bd3Smrgstatic const unsigned char yyr1[] = 383fd7d9bd3Smrg{ 384fd7d9bd3Smrg 0, 32, 33, 34, 34, 34, 35, 35, 35, 35, 385fd7d9bd3Smrg 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 386fd7d9bd3Smrg 35, 35, 35, 35, 35, 35, 35 387fd7d9bd3Smrg}; 388fd7d9bd3Smrg 389fd7d9bd3Smrg/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 390fd7d9bd3Smrgstatic const unsigned char yyr2[] = 391fd7d9bd3Smrg{ 392fd7d9bd3Smrg 0, 2, 1, 0, 2, 3, 1, 1, 2, 2, 393fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 394fd7d9bd3Smrg 2, 2, 2, 2, 2, 2, 2 395fd7d9bd3Smrg}; 396fd7d9bd3Smrg 397fd7d9bd3Smrg/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 398fd7d9bd3Smrg STATE-NUM when YYTABLE doesn't specify something else to do. Zero 399fd7d9bd3Smrg means the default is an error. */ 400fd7d9bd3Smrgstatic const unsigned char yydefact[] = 401fd7d9bd3Smrg{ 402fd7d9bd3Smrg 3, 0, 0, 1, 6, 7, 0, 0, 0, 0, 403fd7d9bd3Smrg 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 404fd7d9bd3Smrg 0, 4, 0, 9, 8, 10, 11, 12, 13, 14, 405fd7d9bd3Smrg 15, 17, 16, 18, 19, 20, 21, 22, 23, 24, 406fd7d9bd3Smrg 26, 25, 5 407fd7d9bd3Smrg}; 408fd7d9bd3Smrg 409fd7d9bd3Smrg/* YYDEFGOTO[NTERM-NUM]. */ 410fd7d9bd3Smrgstatic const yysigned_char yydefgoto[] = 411fd7d9bd3Smrg{ 412fd7d9bd3Smrg -1, 1, 2, 22 413fd7d9bd3Smrg}; 414fd7d9bd3Smrg 415fd7d9bd3Smrg/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 416fd7d9bd3Smrg STATE-NUM. */ 417fd7d9bd3Smrg#define YYPACT_NINF -10 418fd7d9bd3Smrgstatic const yysigned_char yypact[] = 419fd7d9bd3Smrg{ 420fd7d9bd3Smrg -10, 2, 0, -10, -10, -10, 8, 10, -8, -9, 421fd7d9bd3Smrg 1, -6, 11, -2, 19, 29, 30, 31, 32, 33, 422fd7d9bd3Smrg 35, -10, 9, -10, -10, -10, -10, -10, -10, -10, 423fd7d9bd3Smrg -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, 424fd7d9bd3Smrg -10, -10, -10 425fd7d9bd3Smrg}; 426fd7d9bd3Smrg 427fd7d9bd3Smrg/* YYPGOTO[NTERM-NUM]. */ 428fd7d9bd3Smrgstatic const yysigned_char yypgoto[] = 429fd7d9bd3Smrg{ 430fd7d9bd3Smrg -10, -10, -10, -10 431fd7d9bd3Smrg}; 432fd7d9bd3Smrg 433fd7d9bd3Smrg/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 434fd7d9bd3Smrg positive, shift that token. If negative, reduce the rule which 435fd7d9bd3Smrg number is the opposite. If zero, do what YYDEFACT says. 436fd7d9bd3Smrg If YYTABLE_NINF, syntax error. */ 437fd7d9bd3Smrg#define YYTABLE_NINF -3 438fd7d9bd3Smrgstatic const yysigned_char yytable[] = 439fd7d9bd3Smrg{ 440fd7d9bd3Smrg -2, 4, 3, 25, 27, 5, 6, 28, 7, 26, 441fd7d9bd3Smrg 8, 31, 9, 32, 10, 23, 29, 30, 11, 24, 442fd7d9bd3Smrg 12, 34, 13, 35, 14, 15, 16, 17, 18, 19, 443fd7d9bd3Smrg 20, 21, 33, 36, 37, 38, 39, 40, 41, 0, 444fd7d9bd3Smrg 42 445fd7d9bd3Smrg}; 446fd7d9bd3Smrg 447fd7d9bd3Smrgstatic const yysigned_char yycheck[] = 448fd7d9bd3Smrg{ 449fd7d9bd3Smrg 0, 1, 0, 11, 13, 5, 6, 16, 8, 17, 450fd7d9bd3Smrg 10, 17, 12, 19, 14, 7, 15, 16, 18, 9, 451fd7d9bd3Smrg 20, 23, 22, 4, 24, 25, 26, 27, 28, 29, 452fd7d9bd3Smrg 30, 31, 21, 4, 4, 4, 4, 4, 3, -1, 453fd7d9bd3Smrg 31 454fd7d9bd3Smrg}; 455fd7d9bd3Smrg 456fd7d9bd3Smrg/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 457fd7d9bd3Smrg symbol of state STATE-NUM. */ 458fd7d9bd3Smrgstatic const unsigned char yystos[] = 459fd7d9bd3Smrg{ 460fd7d9bd3Smrg 0, 33, 34, 0, 1, 5, 6, 8, 10, 12, 461fd7d9bd3Smrg 14, 18, 20, 22, 24, 25, 26, 27, 28, 29, 462fd7d9bd3Smrg 30, 31, 35, 7, 9, 11, 17, 13, 16, 15, 463fd7d9bd3Smrg 16, 17, 19, 21, 23, 4, 4, 4, 4, 4, 464fd7d9bd3Smrg 4, 3, 31 465fd7d9bd3Smrg}; 466fd7d9bd3Smrg 467fd7d9bd3Smrg#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 468fd7d9bd3Smrg# define YYSIZE_T __SIZE_TYPE__ 469fd7d9bd3Smrg#endif 470fd7d9bd3Smrg#if ! defined (YYSIZE_T) && defined (size_t) 471fd7d9bd3Smrg# define YYSIZE_T size_t 472fd7d9bd3Smrg#endif 473fd7d9bd3Smrg#if ! defined (YYSIZE_T) 474fd7d9bd3Smrg# if defined (__STDC__) || defined (__cplusplus) 475fd7d9bd3Smrg# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 476fd7d9bd3Smrg# define YYSIZE_T size_t 477fd7d9bd3Smrg# endif 478fd7d9bd3Smrg#endif 479fd7d9bd3Smrg#if ! defined (YYSIZE_T) 480fd7d9bd3Smrg# define YYSIZE_T unsigned int 481fd7d9bd3Smrg#endif 482fd7d9bd3Smrg 483fd7d9bd3Smrg#define yyerrok (yyerrstatus = 0) 484fd7d9bd3Smrg#define yyclearin (yychar = YYEMPTY) 485fd7d9bd3Smrg#define YYEMPTY (-2) 486fd7d9bd3Smrg#define YYEOF 0 487fd7d9bd3Smrg 488fd7d9bd3Smrg#define YYACCEPT goto yyacceptlab 489fd7d9bd3Smrg#define YYABORT goto yyabortlab 490fd7d9bd3Smrg#define YYERROR goto yyerrorlab 491fd7d9bd3Smrg 492fd7d9bd3Smrg 493fd7d9bd3Smrg/* Like YYERROR except do call yyerror. This remains here temporarily 494fd7d9bd3Smrg to ease the transition to the new meaning of YYERROR, for GCC. 495fd7d9bd3Smrg Once GCC version 2 has supplanted version 1, this can go. */ 496fd7d9bd3Smrg 497fd7d9bd3Smrg#define YYFAIL goto yyerrlab 498fd7d9bd3Smrg 499fd7d9bd3Smrg#define YYRECOVERING() (!!yyerrstatus) 500fd7d9bd3Smrg 501fd7d9bd3Smrg#define YYBACKUP(Token, Value) \ 502fd7d9bd3Smrgdo \ 503fd7d9bd3Smrg if (yychar == YYEMPTY && yylen == 1) \ 504fd7d9bd3Smrg { \ 505fd7d9bd3Smrg yychar = (Token); \ 506fd7d9bd3Smrg yylval = (Value); \ 507fd7d9bd3Smrg yytoken = YYTRANSLATE (yychar); \ 508fd7d9bd3Smrg YYPOPSTACK; \ 509fd7d9bd3Smrg goto yybackup; \ 510fd7d9bd3Smrg } \ 511fd7d9bd3Smrg else \ 512fd7d9bd3Smrg { \ 513fd7d9bd3Smrg yyerror ("syntax error: cannot back up");\ 514fd7d9bd3Smrg YYERROR; \ 515fd7d9bd3Smrg } \ 516fd7d9bd3Smrgwhile (0) 517fd7d9bd3Smrg 518fd7d9bd3Smrg#define YYTERROR 1 519fd7d9bd3Smrg#define YYERRCODE 256 520fd7d9bd3Smrg 521fd7d9bd3Smrg/* YYLLOC_DEFAULT -- Compute the default location (before the actions 522fd7d9bd3Smrg are run). */ 523fd7d9bd3Smrg 524fd7d9bd3Smrg#ifndef YYLLOC_DEFAULT 525fd7d9bd3Smrg# define YYLLOC_DEFAULT(Current, Rhs, N) \ 526fd7d9bd3Smrg ((Current).first_line = (Rhs)[1].first_line, \ 527fd7d9bd3Smrg (Current).first_column = (Rhs)[1].first_column, \ 528fd7d9bd3Smrg (Current).last_line = (Rhs)[N].last_line, \ 529fd7d9bd3Smrg (Current).last_column = (Rhs)[N].last_column) 530fd7d9bd3Smrg#endif 531fd7d9bd3Smrg 532fd7d9bd3Smrg/* YYLEX -- calling `yylex' with the right arguments. */ 533fd7d9bd3Smrg 534fd7d9bd3Smrg#ifdef YYLEX_PARAM 535fd7d9bd3Smrg# define YYLEX yylex (YYLEX_PARAM) 536fd7d9bd3Smrg#else 537fd7d9bd3Smrg# define YYLEX yylex () 538fd7d9bd3Smrg#endif 539fd7d9bd3Smrg 540fd7d9bd3Smrg/* Enable debugging if requested. */ 541fd7d9bd3Smrg#if YYDEBUG 542fd7d9bd3Smrg 543fd7d9bd3Smrg# ifndef YYFPRINTF 544fd7d9bd3Smrg# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 545fd7d9bd3Smrg# define YYFPRINTF fprintf 546fd7d9bd3Smrg# endif 547fd7d9bd3Smrg 548fd7d9bd3Smrg# define YYDPRINTF(Args) \ 549fd7d9bd3Smrgdo { \ 550fd7d9bd3Smrg if (yydebug) \ 551fd7d9bd3Smrg YYFPRINTF Args; \ 552fd7d9bd3Smrg} while (0) 553fd7d9bd3Smrg 554fd7d9bd3Smrg# define YYDSYMPRINT(Args) \ 555fd7d9bd3Smrgdo { \ 556fd7d9bd3Smrg if (yydebug) \ 557fd7d9bd3Smrg yysymprint Args; \ 558fd7d9bd3Smrg} while (0) 559fd7d9bd3Smrg 560fd7d9bd3Smrg# define YYDSYMPRINTF(Title, Token, Value, Location) \ 561fd7d9bd3Smrgdo { \ 562fd7d9bd3Smrg if (yydebug) \ 563fd7d9bd3Smrg { \ 564fd7d9bd3Smrg YYFPRINTF (stderr, "%s ", Title); \ 565fd7d9bd3Smrg yysymprint (stderr, \ 566fd7d9bd3Smrg Token, Value); \ 567fd7d9bd3Smrg YYFPRINTF (stderr, "\n"); \ 568fd7d9bd3Smrg } \ 569fd7d9bd3Smrg} while (0) 570fd7d9bd3Smrg 571fd7d9bd3Smrg/*------------------------------------------------------------------. 572fd7d9bd3Smrg| yy_stack_print -- Print the state stack from its BOTTOM up to its | 573fd7d9bd3Smrg| TOP (included). | 574fd7d9bd3Smrg`------------------------------------------------------------------*/ 575fd7d9bd3Smrg 576fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 577fd7d9bd3Smrgstatic void 578fd7d9bd3Smrgyy_stack_print (short *bottom, short *top) 579fd7d9bd3Smrg#else 580fd7d9bd3Smrgstatic void 581fd7d9bd3Smrgyy_stack_print (bottom, top) 582fd7d9bd3Smrg short *bottom; 583fd7d9bd3Smrg short *top; 584fd7d9bd3Smrg#endif 585fd7d9bd3Smrg{ 586fd7d9bd3Smrg YYFPRINTF (stderr, "Stack now"); 587fd7d9bd3Smrg for (/* Nothing. */; bottom <= top; ++bottom) 588fd7d9bd3Smrg YYFPRINTF (stderr, " %d", *bottom); 589fd7d9bd3Smrg YYFPRINTF (stderr, "\n"); 590fd7d9bd3Smrg} 591fd7d9bd3Smrg 592fd7d9bd3Smrg# define YY_STACK_PRINT(Bottom, Top) \ 593fd7d9bd3Smrgdo { \ 594fd7d9bd3Smrg if (yydebug) \ 595fd7d9bd3Smrg yy_stack_print ((Bottom), (Top)); \ 596fd7d9bd3Smrg} while (0) 597fd7d9bd3Smrg 598fd7d9bd3Smrg 599fd7d9bd3Smrg/*------------------------------------------------. 600fd7d9bd3Smrg| Report that the YYRULE is going to be reduced. | 601fd7d9bd3Smrg`------------------------------------------------*/ 602fd7d9bd3Smrg 603fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 604fd7d9bd3Smrgstatic void 605fd7d9bd3Smrgyy_reduce_print (int yyrule) 606fd7d9bd3Smrg#else 607fd7d9bd3Smrgstatic void 608fd7d9bd3Smrgyy_reduce_print (yyrule) 609fd7d9bd3Smrg int yyrule; 610fd7d9bd3Smrg#endif 611fd7d9bd3Smrg{ 612fd7d9bd3Smrg int yyi; 613fd7d9bd3Smrg unsigned int yylno = yyrline[yyrule]; 614fd7d9bd3Smrg YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", 615fd7d9bd3Smrg yyrule - 1, yylno); 616fd7d9bd3Smrg /* Print the symbols being reduced, and their result. */ 617fd7d9bd3Smrg for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 618fd7d9bd3Smrg YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); 619fd7d9bd3Smrg YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); 620fd7d9bd3Smrg} 621fd7d9bd3Smrg 622fd7d9bd3Smrg# define YY_REDUCE_PRINT(Rule) \ 623fd7d9bd3Smrgdo { \ 624fd7d9bd3Smrg if (yydebug) \ 625fd7d9bd3Smrg yy_reduce_print (Rule); \ 626fd7d9bd3Smrg} while (0) 627fd7d9bd3Smrg 628fd7d9bd3Smrg/* Nonzero means print parse trace. It is left uninitialized so that 629fd7d9bd3Smrg multiple parsers can coexist. */ 630fd7d9bd3Smrgint yydebug; 631fd7d9bd3Smrg#else /* !YYDEBUG */ 632fd7d9bd3Smrg# define YYDPRINTF(Args) 633fd7d9bd3Smrg# define YYDSYMPRINT(Args) 634fd7d9bd3Smrg# define YYDSYMPRINTF(Title, Token, Value, Location) 635fd7d9bd3Smrg# define YY_STACK_PRINT(Bottom, Top) 636fd7d9bd3Smrg# define YY_REDUCE_PRINT(Rule) 637fd7d9bd3Smrg#endif /* !YYDEBUG */ 638fd7d9bd3Smrg 639fd7d9bd3Smrg 640fd7d9bd3Smrg/* YYINITDEPTH -- initial size of the parser's stacks. */ 641fd7d9bd3Smrg#ifndef YYINITDEPTH 642fd7d9bd3Smrg# define YYINITDEPTH 200 643fd7d9bd3Smrg#endif 644fd7d9bd3Smrg 645fd7d9bd3Smrg/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 646fd7d9bd3Smrg if the built-in stack extension method is used). 647fd7d9bd3Smrg 648fd7d9bd3Smrg Do not make this value too large; the results are undefined if 649fd7d9bd3Smrg SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) 650fd7d9bd3Smrg evaluated with infinite-precision integer arithmetic. */ 651fd7d9bd3Smrg 652fd7d9bd3Smrg#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 653fd7d9bd3Smrg# undef YYMAXDEPTH 654fd7d9bd3Smrg#endif 655fd7d9bd3Smrg 656fd7d9bd3Smrg#ifndef YYMAXDEPTH 657fd7d9bd3Smrg# define YYMAXDEPTH 10000 658fd7d9bd3Smrg#endif 659fd7d9bd3Smrg 660fd7d9bd3Smrg 661fd7d9bd3Smrg 662fd7d9bd3Smrg#if YYERROR_VERBOSE 663fd7d9bd3Smrg 664fd7d9bd3Smrg# ifndef yystrlen 665fd7d9bd3Smrg# if defined (__GLIBC__) && defined (_STRING_H) 666fd7d9bd3Smrg# define yystrlen strlen 667fd7d9bd3Smrg# else 668fd7d9bd3Smrg/* Return the length of YYSTR. */ 669fd7d9bd3Smrgstatic YYSIZE_T 670fd7d9bd3Smrg# if defined (__STDC__) || defined (__cplusplus) 671fd7d9bd3Smrgyystrlen (const char *yystr) 672fd7d9bd3Smrg# else 673fd7d9bd3Smrgyystrlen (yystr) 674fd7d9bd3Smrg const char *yystr; 675fd7d9bd3Smrg# endif 676fd7d9bd3Smrg{ 677fd7d9bd3Smrg register const char *yys = yystr; 678fd7d9bd3Smrg 679fd7d9bd3Smrg while (*yys++ != '\0') 680fd7d9bd3Smrg continue; 681fd7d9bd3Smrg 682fd7d9bd3Smrg return yys - yystr - 1; 683fd7d9bd3Smrg} 684fd7d9bd3Smrg# endif 685fd7d9bd3Smrg# endif 686fd7d9bd3Smrg 687fd7d9bd3Smrg# ifndef yystpcpy 688fd7d9bd3Smrg# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 689fd7d9bd3Smrg# define yystpcpy stpcpy 690fd7d9bd3Smrg# else 691fd7d9bd3Smrg/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 692fd7d9bd3Smrg YYDEST. */ 693fd7d9bd3Smrgstatic char * 694fd7d9bd3Smrg# if defined (__STDC__) || defined (__cplusplus) 695fd7d9bd3Smrgyystpcpy (char *yydest, const char *yysrc) 696fd7d9bd3Smrg# else 697fd7d9bd3Smrgyystpcpy (yydest, yysrc) 698fd7d9bd3Smrg char *yydest; 699fd7d9bd3Smrg const char *yysrc; 700fd7d9bd3Smrg# endif 701fd7d9bd3Smrg{ 702fd7d9bd3Smrg register char *yyd = yydest; 703fd7d9bd3Smrg register const char *yys = yysrc; 704fd7d9bd3Smrg 705fd7d9bd3Smrg while ((*yyd++ = *yys++) != '\0') 706fd7d9bd3Smrg continue; 707fd7d9bd3Smrg 708fd7d9bd3Smrg return yyd - 1; 709fd7d9bd3Smrg} 710fd7d9bd3Smrg# endif 711fd7d9bd3Smrg# endif 712fd7d9bd3Smrg 713fd7d9bd3Smrg#endif /* !YYERROR_VERBOSE */ 714fd7d9bd3Smrg 715fd7d9bd3Smrg 716fd7d9bd3Smrg 717fd7d9bd3Smrg#if YYDEBUG 718fd7d9bd3Smrg/*--------------------------------. 719fd7d9bd3Smrg| Print this symbol on YYOUTPUT. | 720fd7d9bd3Smrg`--------------------------------*/ 721fd7d9bd3Smrg 722fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 723fd7d9bd3Smrgstatic void 724fd7d9bd3Smrgyysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) 725fd7d9bd3Smrg#else 726fd7d9bd3Smrgstatic void 727fd7d9bd3Smrgyysymprint (yyoutput, yytype, yyvaluep) 728fd7d9bd3Smrg FILE *yyoutput; 729fd7d9bd3Smrg int yytype; 730fd7d9bd3Smrg YYSTYPE *yyvaluep; 731fd7d9bd3Smrg#endif 732fd7d9bd3Smrg{ 733fd7d9bd3Smrg /* Pacify ``unused variable'' warnings. */ 734fd7d9bd3Smrg (void) yyvaluep; 735fd7d9bd3Smrg 736fd7d9bd3Smrg if (yytype < YYNTOKENS) 737fd7d9bd3Smrg { 738fd7d9bd3Smrg YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 739fd7d9bd3Smrg# ifdef YYPRINT 740fd7d9bd3Smrg YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 741fd7d9bd3Smrg# endif 742fd7d9bd3Smrg } 743fd7d9bd3Smrg else 744fd7d9bd3Smrg YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 745fd7d9bd3Smrg 746fd7d9bd3Smrg switch (yytype) 747fd7d9bd3Smrg { 748fd7d9bd3Smrg default: 749fd7d9bd3Smrg break; 750fd7d9bd3Smrg } 751fd7d9bd3Smrg YYFPRINTF (yyoutput, ")"); 752fd7d9bd3Smrg} 753fd7d9bd3Smrg 754fd7d9bd3Smrg#endif /* ! YYDEBUG */ 755fd7d9bd3Smrg/*-----------------------------------------------. 756fd7d9bd3Smrg| Release the memory associated to this symbol. | 757fd7d9bd3Smrg`-----------------------------------------------*/ 758fd7d9bd3Smrg 759fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 760fd7d9bd3Smrgstatic void 761fd7d9bd3Smrgyydestruct (int yytype, YYSTYPE *yyvaluep) 762fd7d9bd3Smrg#else 763fd7d9bd3Smrgstatic void 764fd7d9bd3Smrgyydestruct (yytype, yyvaluep) 765fd7d9bd3Smrg int yytype; 766fd7d9bd3Smrg YYSTYPE *yyvaluep; 767fd7d9bd3Smrg#endif 768fd7d9bd3Smrg{ 769fd7d9bd3Smrg /* Pacify ``unused variable'' warnings. */ 770fd7d9bd3Smrg (void) yyvaluep; 771fd7d9bd3Smrg 772fd7d9bd3Smrg switch (yytype) 773fd7d9bd3Smrg { 774fd7d9bd3Smrg 775fd7d9bd3Smrg default: 776fd7d9bd3Smrg break; 777fd7d9bd3Smrg } 778fd7d9bd3Smrg} 779fd7d9bd3Smrg 780fd7d9bd3Smrg 781fd7d9bd3Smrg/* Prevent warnings from -Wmissing-prototypes. */ 782fd7d9bd3Smrg 783fd7d9bd3Smrg#ifdef YYPARSE_PARAM 784fd7d9bd3Smrg# if defined (__STDC__) || defined (__cplusplus) 785fd7d9bd3Smrgint yyparse (void *YYPARSE_PARAM); 786fd7d9bd3Smrg# else 787fd7d9bd3Smrgint yyparse (); 788fd7d9bd3Smrg# endif 789fd7d9bd3Smrg#else /* ! YYPARSE_PARAM */ 790fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 791fd7d9bd3Smrgint yyparse (void); 792fd7d9bd3Smrg#else 793fd7d9bd3Smrgint yyparse (); 794fd7d9bd3Smrg#endif 795fd7d9bd3Smrg#endif /* ! YYPARSE_PARAM */ 796fd7d9bd3Smrg 797fd7d9bd3Smrg 798fd7d9bd3Smrg 799fd7d9bd3Smrg/* The lookahead symbol. */ 800fd7d9bd3Smrgint yychar; 801fd7d9bd3Smrg 802fd7d9bd3Smrg/* The semantic value of the lookahead symbol. */ 803fd7d9bd3SmrgYYSTYPE yylval; 804fd7d9bd3Smrg 805fd7d9bd3Smrg/* Number of syntax errors so far. */ 806fd7d9bd3Smrgint yynerrs; 807fd7d9bd3Smrg 808fd7d9bd3Smrg 809fd7d9bd3Smrg 810fd7d9bd3Smrg/*----------. 811fd7d9bd3Smrg| yyparse. | 812fd7d9bd3Smrg`----------*/ 813fd7d9bd3Smrg 814fd7d9bd3Smrg#ifdef YYPARSE_PARAM 815fd7d9bd3Smrg# if defined (__STDC__) || defined (__cplusplus) 816fd7d9bd3Smrgint yyparse (void *YYPARSE_PARAM) 817fd7d9bd3Smrg# else 818fd7d9bd3Smrgint yyparse (YYPARSE_PARAM) 819fd7d9bd3Smrg void *YYPARSE_PARAM; 820fd7d9bd3Smrg# endif 821fd7d9bd3Smrg#else /* ! YYPARSE_PARAM */ 822fd7d9bd3Smrg#if defined (__STDC__) || defined (__cplusplus) 823fd7d9bd3Smrgint 824fd7d9bd3Smrgyyparse (void) 825fd7d9bd3Smrg#else 826fd7d9bd3Smrgint 827fd7d9bd3Smrgyyparse () 828fd7d9bd3Smrg 829fd7d9bd3Smrg#endif 830fd7d9bd3Smrg#endif 831fd7d9bd3Smrg{ 832fd7d9bd3Smrg 833fd7d9bd3Smrg register int yystate; 834fd7d9bd3Smrg register int yyn; 835fd7d9bd3Smrg int yyresult; 836fd7d9bd3Smrg /* Number of tokens to shift before error messages enabled. */ 837fd7d9bd3Smrg int yyerrstatus; 838fd7d9bd3Smrg /* Lookahead token as an internal (translated) token number. */ 839fd7d9bd3Smrg int yytoken = 0; 840fd7d9bd3Smrg 841fd7d9bd3Smrg /* Three stacks and their tools: 842fd7d9bd3Smrg `yyss': related to states, 843fd7d9bd3Smrg `yyvs': related to semantic values, 844fd7d9bd3Smrg `yyls': related to locations. 845fd7d9bd3Smrg 846fd7d9bd3Smrg Refer to the stacks thru separate pointers, to allow yyoverflow 847fd7d9bd3Smrg to reallocate them elsewhere. */ 848fd7d9bd3Smrg 849fd7d9bd3Smrg /* The state stack. */ 850fd7d9bd3Smrg short yyssa[YYINITDEPTH]; 851fd7d9bd3Smrg short *yyss = yyssa; 852fd7d9bd3Smrg register short *yyssp; 853fd7d9bd3Smrg 854fd7d9bd3Smrg /* The semantic value stack. */ 855fd7d9bd3Smrg YYSTYPE yyvsa[YYINITDEPTH]; 856fd7d9bd3Smrg YYSTYPE *yyvs = yyvsa; 857fd7d9bd3Smrg register YYSTYPE *yyvsp; 858fd7d9bd3Smrg 859fd7d9bd3Smrg 860fd7d9bd3Smrg 861fd7d9bd3Smrg#define YYPOPSTACK (yyvsp--, yyssp--) 862fd7d9bd3Smrg 863fd7d9bd3Smrg YYSIZE_T yystacksize = YYINITDEPTH; 864fd7d9bd3Smrg 865fd7d9bd3Smrg /* The variables used to return semantic value and location from the 866fd7d9bd3Smrg action routines. */ 867fd7d9bd3Smrg YYSTYPE yyval; 868fd7d9bd3Smrg 869fd7d9bd3Smrg 870fd7d9bd3Smrg /* When reducing, the number of symbols on the RHS of the reduced 871fd7d9bd3Smrg rule. */ 872fd7d9bd3Smrg int yylen; 873fd7d9bd3Smrg 874fd7d9bd3Smrg YYDPRINTF ((stderr, "Starting parse\n")); 875fd7d9bd3Smrg 876fd7d9bd3Smrg yystate = 0; 877fd7d9bd3Smrg yyerrstatus = 0; 878fd7d9bd3Smrg yynerrs = 0; 879fd7d9bd3Smrg yychar = YYEMPTY; /* Cause a token to be read. */ 880fd7d9bd3Smrg 881fd7d9bd3Smrg /* Initialize stack pointers. 882fd7d9bd3Smrg Waste one element of value and location stack 883fd7d9bd3Smrg so that they stay on the same level as the state stack. 884fd7d9bd3Smrg The wasted elements are never initialized. */ 885fd7d9bd3Smrg 886fd7d9bd3Smrg yyssp = yyss; 887fd7d9bd3Smrg yyvsp = yyvs; 888fd7d9bd3Smrg 889fd7d9bd3Smrg goto yysetstate; 890fd7d9bd3Smrg 891fd7d9bd3Smrg/*------------------------------------------------------------. 892fd7d9bd3Smrg| yynewstate -- Push a new state, which is found in yystate. | 893fd7d9bd3Smrg`------------------------------------------------------------*/ 894fd7d9bd3Smrg yynewstate: 895fd7d9bd3Smrg /* In all cases, when you get here, the value and location stacks 896fd7d9bd3Smrg have just been pushed. so pushing a state here evens the stacks. 897fd7d9bd3Smrg */ 898fd7d9bd3Smrg yyssp++; 899fd7d9bd3Smrg 900fd7d9bd3Smrg yysetstate: 901fd7d9bd3Smrg *yyssp = yystate; 902fd7d9bd3Smrg 903fd7d9bd3Smrg if (yyss + yystacksize - 1 <= yyssp) 904fd7d9bd3Smrg { 905fd7d9bd3Smrg /* Get the current used size of the three stacks, in elements. */ 906fd7d9bd3Smrg YYSIZE_T yysize = yyssp - yyss + 1; 907fd7d9bd3Smrg 908fd7d9bd3Smrg#ifdef yyoverflow 909fd7d9bd3Smrg { 910fd7d9bd3Smrg /* Give user a chance to reallocate the stack. Use copies of 911fd7d9bd3Smrg these so that the &'s don't force the real ones into 912fd7d9bd3Smrg memory. */ 913fd7d9bd3Smrg YYSTYPE *yyvs1 = yyvs; 914fd7d9bd3Smrg short *yyss1 = yyss; 915fd7d9bd3Smrg 916fd7d9bd3Smrg 917fd7d9bd3Smrg /* Each stack pointer address is followed by the size of the 918fd7d9bd3Smrg data in use in that stack, in bytes. This used to be a 919fd7d9bd3Smrg conditional around just the two extra args, but that might 920fd7d9bd3Smrg be undefined if yyoverflow is a macro. */ 921fd7d9bd3Smrg yyoverflow ("parser stack overflow", 922fd7d9bd3Smrg &yyss1, yysize * sizeof (*yyssp), 923fd7d9bd3Smrg &yyvs1, yysize * sizeof (*yyvsp), 924fd7d9bd3Smrg 925fd7d9bd3Smrg &yystacksize); 926fd7d9bd3Smrg 927fd7d9bd3Smrg yyss = yyss1; 928fd7d9bd3Smrg yyvs = yyvs1; 929fd7d9bd3Smrg } 930fd7d9bd3Smrg#else /* no yyoverflow */ 931fd7d9bd3Smrg# ifndef YYSTACK_RELOCATE 932fd7d9bd3Smrg goto yyoverflowlab; 933fd7d9bd3Smrg# else 934fd7d9bd3Smrg /* Extend the stack our own way. */ 935fd7d9bd3Smrg if (YYMAXDEPTH <= yystacksize) 936fd7d9bd3Smrg goto yyoverflowlab; 937fd7d9bd3Smrg yystacksize *= 2; 938fd7d9bd3Smrg if (YYMAXDEPTH < yystacksize) 939fd7d9bd3Smrg yystacksize = YYMAXDEPTH; 940fd7d9bd3Smrg 941fd7d9bd3Smrg { 942fd7d9bd3Smrg short *yyss1 = yyss; 943fd7d9bd3Smrg union yyalloc *yyptr = 944fd7d9bd3Smrg (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 945fd7d9bd3Smrg if (! yyptr) 946fd7d9bd3Smrg goto yyoverflowlab; 947fd7d9bd3Smrg YYSTACK_RELOCATE (yyss); 948fd7d9bd3Smrg YYSTACK_RELOCATE (yyvs); 949fd7d9bd3Smrg 950fd7d9bd3Smrg# undef YYSTACK_RELOCATE 951fd7d9bd3Smrg if (yyss1 != yyssa) 952fd7d9bd3Smrg YYSTACK_FREE (yyss1); 953fd7d9bd3Smrg } 954fd7d9bd3Smrg# endif 955fd7d9bd3Smrg#endif /* no yyoverflow */ 956fd7d9bd3Smrg 957fd7d9bd3Smrg yyssp = yyss + yysize - 1; 958fd7d9bd3Smrg yyvsp = yyvs + yysize - 1; 959fd7d9bd3Smrg 960fd7d9bd3Smrg 961fd7d9bd3Smrg YYDPRINTF ((stderr, "Stack size increased to %lu\n", 962fd7d9bd3Smrg (unsigned long int) yystacksize)); 963fd7d9bd3Smrg 964fd7d9bd3Smrg if (yyss + yystacksize - 1 <= yyssp) 965fd7d9bd3Smrg YYABORT; 966fd7d9bd3Smrg } 967fd7d9bd3Smrg 968fd7d9bd3Smrg YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 969fd7d9bd3Smrg 970fd7d9bd3Smrg goto yybackup; 971fd7d9bd3Smrg 972fd7d9bd3Smrg/*-----------. 973fd7d9bd3Smrg| yybackup. | 974fd7d9bd3Smrg`-----------*/ 975fd7d9bd3Smrgyybackup: 976fd7d9bd3Smrg 977fd7d9bd3Smrg/* Do appropriate processing given the current state. */ 978fd7d9bd3Smrg/* Read a lookahead token if we need one and don't already have one. */ 979fd7d9bd3Smrg/* yyresume: */ 980fd7d9bd3Smrg 981fd7d9bd3Smrg /* First try to decide what to do without reference to lookahead token. */ 982fd7d9bd3Smrg 983fd7d9bd3Smrg yyn = yypact[yystate]; 984fd7d9bd3Smrg if (yyn == YYPACT_NINF) 985fd7d9bd3Smrg goto yydefault; 986fd7d9bd3Smrg 987fd7d9bd3Smrg /* Not known => get a lookahead token if don't already have one. */ 988fd7d9bd3Smrg 989fd7d9bd3Smrg /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 990fd7d9bd3Smrg if (yychar == YYEMPTY) 991fd7d9bd3Smrg { 992fd7d9bd3Smrg YYDPRINTF ((stderr, "Reading a token: ")); 993fd7d9bd3Smrg yychar = YYLEX; 994fd7d9bd3Smrg } 995fd7d9bd3Smrg 996fd7d9bd3Smrg if (yychar <= YYEOF) 997fd7d9bd3Smrg { 998fd7d9bd3Smrg yychar = yytoken = YYEOF; 999fd7d9bd3Smrg YYDPRINTF ((stderr, "Now at end of input.\n")); 1000fd7d9bd3Smrg } 1001fd7d9bd3Smrg else 1002fd7d9bd3Smrg { 1003fd7d9bd3Smrg yytoken = YYTRANSLATE (yychar); 1004fd7d9bd3Smrg YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); 1005fd7d9bd3Smrg } 1006fd7d9bd3Smrg 1007fd7d9bd3Smrg /* If the proper action on seeing token YYTOKEN is to reduce or to 1008fd7d9bd3Smrg detect an error, take that action. */ 1009fd7d9bd3Smrg yyn += yytoken; 1010fd7d9bd3Smrg if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1011fd7d9bd3Smrg goto yydefault; 1012fd7d9bd3Smrg yyn = yytable[yyn]; 1013fd7d9bd3Smrg if (yyn <= 0) 1014fd7d9bd3Smrg { 1015fd7d9bd3Smrg if (yyn == 0 || yyn == YYTABLE_NINF) 1016fd7d9bd3Smrg goto yyerrlab; 1017fd7d9bd3Smrg yyn = -yyn; 1018fd7d9bd3Smrg goto yyreduce; 1019fd7d9bd3Smrg } 1020fd7d9bd3Smrg 1021fd7d9bd3Smrg if (yyn == YYFINAL) 1022fd7d9bd3Smrg YYACCEPT; 1023fd7d9bd3Smrg 1024fd7d9bd3Smrg /* Shift the lookahead token. */ 1025fd7d9bd3Smrg YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); 1026fd7d9bd3Smrg 1027fd7d9bd3Smrg /* Discard the token being shifted unless it is eof. */ 1028fd7d9bd3Smrg if (yychar != YYEOF) 1029fd7d9bd3Smrg yychar = YYEMPTY; 1030fd7d9bd3Smrg 1031fd7d9bd3Smrg *++yyvsp = yylval; 1032fd7d9bd3Smrg 1033fd7d9bd3Smrg 1034fd7d9bd3Smrg /* Count tokens shifted since error; after three, turn off error 1035fd7d9bd3Smrg status. */ 1036fd7d9bd3Smrg if (yyerrstatus) 1037fd7d9bd3Smrg yyerrstatus--; 1038fd7d9bd3Smrg 1039fd7d9bd3Smrg yystate = yyn; 1040fd7d9bd3Smrg goto yynewstate; 1041fd7d9bd3Smrg 1042fd7d9bd3Smrg 1043fd7d9bd3Smrg/*-----------------------------------------------------------. 1044fd7d9bd3Smrg| yydefault -- do the default action for the current state. | 1045fd7d9bd3Smrg`-----------------------------------------------------------*/ 1046fd7d9bd3Smrgyydefault: 1047fd7d9bd3Smrg yyn = yydefact[yystate]; 1048fd7d9bd3Smrg if (yyn == 0) 1049fd7d9bd3Smrg goto yyerrlab; 1050fd7d9bd3Smrg goto yyreduce; 1051fd7d9bd3Smrg 1052fd7d9bd3Smrg 1053fd7d9bd3Smrg/*-----------------------------. 1054fd7d9bd3Smrg| yyreduce -- Do a reduction. | 1055fd7d9bd3Smrg`-----------------------------*/ 1056fd7d9bd3Smrgyyreduce: 1057fd7d9bd3Smrg /* yyn is the number of a rule to reduce with. */ 1058fd7d9bd3Smrg yylen = yyr2[yyn]; 1059fd7d9bd3Smrg 1060fd7d9bd3Smrg /* If YYLEN is nonzero, implement the default value of the action: 1061fd7d9bd3Smrg `$$ = $1'. 1062fd7d9bd3Smrg 1063fd7d9bd3Smrg Otherwise, the following line sets YYVAL to garbage. 1064fd7d9bd3Smrg This behavior is undocumented and Bison 1065fd7d9bd3Smrg users should not rely upon it. Assigning to YYVAL 1066fd7d9bd3Smrg unconditionally makes the parser a bit smaller, and it avoids a 1067fd7d9bd3Smrg GCC warning that YYVAL may be used uninitialized. */ 1068fd7d9bd3Smrg yyval = yyvsp[1-yylen]; 1069fd7d9bd3Smrg 1070fd7d9bd3Smrg 1071fd7d9bd3Smrg YY_REDUCE_PRINT (yyn); 1072fd7d9bd3Smrg switch (yyn) 1073fd7d9bd3Smrg { 1074fd7d9bd3Smrg case 7: 1075fd7d9bd3Smrg#line 51 "gram.y" 1076fd7d9bd3Smrg { run_test(); } 1077fd7d9bd3Smrg break; 1078fd7d9bd3Smrg 1079fd7d9bd3Smrg case 8: 1080fd7d9bd3Smrg#line 53 "gram.y" 1081fd7d9bd3Smrg { change_test (yyvsp[0].num, TRUE); } 1082fd7d9bd3Smrg break; 1083fd7d9bd3Smrg 1084fd7d9bd3Smrg case 9: 1085fd7d9bd3Smrg#line 55 "gram.y" 1086fd7d9bd3Smrg { GC_change_function (yyvsp[0].num, TRUE); } 1087fd7d9bd3Smrg break; 1088fd7d9bd3Smrg 1089fd7d9bd3Smrg case 10: 1090fd7d9bd3Smrg#line 57 "gram.y" 1091fd7d9bd3Smrg { GC_change_linestyle (yyvsp[0].num, TRUE); } 1092fd7d9bd3Smrg break; 1093fd7d9bd3Smrg 1094fd7d9bd3Smrg case 11: 1095fd7d9bd3Smrg#line 59 "gram.y" 1096fd7d9bd3Smrg { GC_change_linestyle (LineSolid, TRUE); } 1097fd7d9bd3Smrg break; 1098fd7d9bd3Smrg 1099fd7d9bd3Smrg case 12: 1100fd7d9bd3Smrg#line 61 "gram.y" 1101fd7d9bd3Smrg { GC_change_capstyle (yyvsp[0].num, TRUE); } 1102fd7d9bd3Smrg break; 1103fd7d9bd3Smrg 1104fd7d9bd3Smrg case 13: 1105fd7d9bd3Smrg#line 63 "gram.y" 1106fd7d9bd3Smrg { GC_change_capstyle (CapRound, TRUE); } 1107fd7d9bd3Smrg break; 1108fd7d9bd3Smrg 1109fd7d9bd3Smrg case 14: 1110fd7d9bd3Smrg#line 65 "gram.y" 1111fd7d9bd3Smrg { GC_change_joinstyle (yyvsp[0].num, TRUE); } 1112fd7d9bd3Smrg break; 1113fd7d9bd3Smrg 1114fd7d9bd3Smrg case 15: 1115fd7d9bd3Smrg#line 67 "gram.y" 1116fd7d9bd3Smrg { GC_change_joinstyle (JoinRound, TRUE); } 1117fd7d9bd3Smrg break; 1118fd7d9bd3Smrg 1119fd7d9bd3Smrg case 16: 1120fd7d9bd3Smrg#line 69 "gram.y" 1121fd7d9bd3Smrg { GC_change_fillstyle (yyvsp[0].num, TRUE); } 1122fd7d9bd3Smrg break; 1123fd7d9bd3Smrg 1124fd7d9bd3Smrg case 17: 1125fd7d9bd3Smrg#line 71 "gram.y" 1126fd7d9bd3Smrg { GC_change_fillstyle (FillSolid, TRUE); } 1127fd7d9bd3Smrg break; 1128fd7d9bd3Smrg 1129fd7d9bd3Smrg case 18: 1130fd7d9bd3Smrg#line 73 "gram.y" 1131fd7d9bd3Smrg { GC_change_fillrule (yyvsp[0].num, TRUE); } 1132fd7d9bd3Smrg break; 1133fd7d9bd3Smrg 1134fd7d9bd3Smrg case 19: 1135fd7d9bd3Smrg#line 75 "gram.y" 1136fd7d9bd3Smrg { GC_change_arcmode (yyvsp[0].num, TRUE); } 1137fd7d9bd3Smrg break; 1138fd7d9bd3Smrg 1139fd7d9bd3Smrg case 20: 1140fd7d9bd3Smrg#line 77 "gram.y" 1141fd7d9bd3Smrg { GC_change_foreground (yyvsp[0].num, TRUE); } 1142fd7d9bd3Smrg break; 1143fd7d9bd3Smrg 1144fd7d9bd3Smrg case 21: 1145fd7d9bd3Smrg#line 79 "gram.y" 1146fd7d9bd3Smrg { GC_change_background (yyvsp[0].num, TRUE); } 1147fd7d9bd3Smrg break; 1148fd7d9bd3Smrg 1149fd7d9bd3Smrg case 22: 1150fd7d9bd3Smrg#line 81 "gram.y" 1151fd7d9bd3Smrg { GC_change_linewidth (yyvsp[0].num, TRUE); } 1152fd7d9bd3Smrg break; 1153fd7d9bd3Smrg 1154fd7d9bd3Smrg case 23: 1155fd7d9bd3Smrg#line 83 "gram.y" 1156fd7d9bd3Smrg { GC_change_planemask (yyvsp[0].num, TRUE); } 1157fd7d9bd3Smrg break; 1158fd7d9bd3Smrg 1159fd7d9bd3Smrg case 24: 1160fd7d9bd3Smrg#line 85 "gram.y" 1161fd7d9bd3Smrg { GC_change_dashlist (yyvsp[0].num, TRUE); } 1162fd7d9bd3Smrg break; 1163fd7d9bd3Smrg 1164fd7d9bd3Smrg case 25: 1165fd7d9bd3Smrg#line 87 "gram.y" 1166fd7d9bd3Smrg { GC_change_font (yyvsp[0].ptr, TRUE); } 1167fd7d9bd3Smrg break; 1168fd7d9bd3Smrg 1169fd7d9bd3Smrg case 26: 1170fd7d9bd3Smrg#line 89 "gram.y" 1171fd7d9bd3Smrg { change_percent (yyvsp[0].num, TRUE); } 1172fd7d9bd3Smrg break; 1173fd7d9bd3Smrg 1174fd7d9bd3Smrg 1175fd7d9bd3Smrg } 1176fd7d9bd3Smrg 1177fd7d9bd3Smrg/* Line 1000 of yacc.c. */ 1178fd7d9bd3Smrg#line 1179 "gram.c" 1179fd7d9bd3Smrg 1180fd7d9bd3Smrg yyvsp -= yylen; 1181fd7d9bd3Smrg yyssp -= yylen; 1182fd7d9bd3Smrg 1183fd7d9bd3Smrg 1184fd7d9bd3Smrg YY_STACK_PRINT (yyss, yyssp); 1185fd7d9bd3Smrg 1186fd7d9bd3Smrg *++yyvsp = yyval; 1187fd7d9bd3Smrg 1188fd7d9bd3Smrg 1189fd7d9bd3Smrg /* Now `shift' the result of the reduction. Determine what state 1190fd7d9bd3Smrg that goes to, based on the state we popped back to and the rule 1191fd7d9bd3Smrg number reduced by. */ 1192fd7d9bd3Smrg 1193fd7d9bd3Smrg yyn = yyr1[yyn]; 1194fd7d9bd3Smrg 1195fd7d9bd3Smrg yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 1196fd7d9bd3Smrg if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 1197fd7d9bd3Smrg yystate = yytable[yystate]; 1198fd7d9bd3Smrg else 1199fd7d9bd3Smrg yystate = yydefgoto[yyn - YYNTOKENS]; 1200fd7d9bd3Smrg 1201fd7d9bd3Smrg goto yynewstate; 1202fd7d9bd3Smrg 1203fd7d9bd3Smrg 1204fd7d9bd3Smrg/*------------------------------------. 1205fd7d9bd3Smrg| yyerrlab -- here on detecting error | 1206fd7d9bd3Smrg`------------------------------------*/ 1207fd7d9bd3Smrgyyerrlab: 1208fd7d9bd3Smrg /* If not already recovering from an error, report this error. */ 1209fd7d9bd3Smrg if (!yyerrstatus) 1210fd7d9bd3Smrg { 1211fd7d9bd3Smrg ++yynerrs; 1212fd7d9bd3Smrg#if YYERROR_VERBOSE 1213fd7d9bd3Smrg yyn = yypact[yystate]; 1214fd7d9bd3Smrg 1215fd7d9bd3Smrg if (YYPACT_NINF < yyn && yyn < YYLAST) 1216fd7d9bd3Smrg { 1217fd7d9bd3Smrg YYSIZE_T yysize = 0; 1218fd7d9bd3Smrg int yytype = YYTRANSLATE (yychar); 1219fd7d9bd3Smrg const char* yyprefix; 1220fd7d9bd3Smrg char *yymsg; 1221fd7d9bd3Smrg int yyx; 1222fd7d9bd3Smrg 1223fd7d9bd3Smrg /* Start YYX at -YYN if negative to avoid negative indexes in 1224fd7d9bd3Smrg YYCHECK. */ 1225fd7d9bd3Smrg int yyxbegin = yyn < 0 ? -yyn : 0; 1226fd7d9bd3Smrg 1227fd7d9bd3Smrg /* Stay within bounds of both yycheck and yytname. */ 1228fd7d9bd3Smrg int yychecklim = YYLAST - yyn; 1229fd7d9bd3Smrg int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1230fd7d9bd3Smrg int yycount = 0; 1231fd7d9bd3Smrg 1232fd7d9bd3Smrg yyprefix = ", expecting "; 1233fd7d9bd3Smrg for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1234fd7d9bd3Smrg if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1235fd7d9bd3Smrg { 1236fd7d9bd3Smrg yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); 1237fd7d9bd3Smrg yycount += 1; 1238fd7d9bd3Smrg if (yycount == 5) 1239fd7d9bd3Smrg { 1240fd7d9bd3Smrg yysize = 0; 1241fd7d9bd3Smrg break; 1242fd7d9bd3Smrg } 1243fd7d9bd3Smrg } 1244fd7d9bd3Smrg yysize += (sizeof ("syntax error, unexpected ") 1245fd7d9bd3Smrg + yystrlen (yytname[yytype])); 1246fd7d9bd3Smrg yymsg = (char *) YYSTACK_ALLOC (yysize); 1247fd7d9bd3Smrg if (yymsg != 0) 1248fd7d9bd3Smrg { 1249fd7d9bd3Smrg char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); 1250fd7d9bd3Smrg yyp = yystpcpy (yyp, yytname[yytype]); 1251fd7d9bd3Smrg 1252fd7d9bd3Smrg if (yycount < 5) 1253fd7d9bd3Smrg { 1254fd7d9bd3Smrg yyprefix = ", expecting "; 1255fd7d9bd3Smrg for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1256fd7d9bd3Smrg if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1257fd7d9bd3Smrg { 1258fd7d9bd3Smrg yyp = yystpcpy (yyp, yyprefix); 1259fd7d9bd3Smrg yyp = yystpcpy (yyp, yytname[yyx]); 1260fd7d9bd3Smrg yyprefix = " or "; 1261fd7d9bd3Smrg } 1262fd7d9bd3Smrg } 1263fd7d9bd3Smrg yyerror (yymsg); 1264fd7d9bd3Smrg YYSTACK_FREE (yymsg); 1265fd7d9bd3Smrg } 1266fd7d9bd3Smrg else 1267fd7d9bd3Smrg yyerror ("syntax error; also virtual memory exhausted"); 1268fd7d9bd3Smrg } 1269fd7d9bd3Smrg else 1270fd7d9bd3Smrg#endif /* YYERROR_VERBOSE */ 1271fd7d9bd3Smrg yyerror ("syntax error"); 1272fd7d9bd3Smrg } 1273fd7d9bd3Smrg 1274fd7d9bd3Smrg 1275fd7d9bd3Smrg 1276fd7d9bd3Smrg if (yyerrstatus == 3) 1277fd7d9bd3Smrg { 1278fd7d9bd3Smrg /* If just tried and failed to reuse lookahead token after an 1279fd7d9bd3Smrg error, discard it. */ 1280fd7d9bd3Smrg 1281fd7d9bd3Smrg if (yychar <= YYEOF) 1282fd7d9bd3Smrg { 1283fd7d9bd3Smrg /* If at end of input, pop the error token, 1284fd7d9bd3Smrg then the rest of the stack, then return failure. */ 1285fd7d9bd3Smrg if (yychar == YYEOF) 1286fd7d9bd3Smrg for (;;) 1287fd7d9bd3Smrg { 1288fd7d9bd3Smrg YYPOPSTACK; 1289fd7d9bd3Smrg if (yyssp == yyss) 1290fd7d9bd3Smrg YYABORT; 1291fd7d9bd3Smrg YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 1292fd7d9bd3Smrg yydestruct (yystos[*yyssp], yyvsp); 1293fd7d9bd3Smrg } 1294fd7d9bd3Smrg } 1295fd7d9bd3Smrg else 1296fd7d9bd3Smrg { 1297fd7d9bd3Smrg YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); 1298fd7d9bd3Smrg yydestruct (yytoken, &yylval); 1299fd7d9bd3Smrg yychar = YYEMPTY; 1300fd7d9bd3Smrg 1301fd7d9bd3Smrg } 1302fd7d9bd3Smrg } 1303fd7d9bd3Smrg 1304fd7d9bd3Smrg /* Else will try to reuse lookahead token after shifting the error 1305fd7d9bd3Smrg token. */ 1306fd7d9bd3Smrg goto yyerrlab1; 1307fd7d9bd3Smrg 1308fd7d9bd3Smrg 1309fd7d9bd3Smrg/*---------------------------------------------------. 1310fd7d9bd3Smrg| yyerrorlab -- error raised explicitly by YYERROR. | 1311fd7d9bd3Smrg`---------------------------------------------------*/ 1312fd7d9bd3Smrgyyerrorlab: 1313fd7d9bd3Smrg 1314fd7d9bd3Smrg#ifdef __GNUC__ 1315fd7d9bd3Smrg /* Pacify GCC when the user code never invokes YYERROR and the label 1316fd7d9bd3Smrg yyerrorlab therefore never appears in user code. */ 1317fd7d9bd3Smrg if (0) 1318fd7d9bd3Smrg goto yyerrorlab; 1319fd7d9bd3Smrg#endif 1320fd7d9bd3Smrg 1321fd7d9bd3Smrg yyvsp -= yylen; 1322fd7d9bd3Smrg yyssp -= yylen; 1323fd7d9bd3Smrg yystate = *yyssp; 1324fd7d9bd3Smrg goto yyerrlab1; 1325fd7d9bd3Smrg 1326fd7d9bd3Smrg 1327fd7d9bd3Smrg/*-------------------------------------------------------------. 1328fd7d9bd3Smrg| yyerrlab1 -- common code for both syntax error and YYERROR. | 1329fd7d9bd3Smrg`-------------------------------------------------------------*/ 1330fd7d9bd3Smrgyyerrlab1: 1331fd7d9bd3Smrg yyerrstatus = 3; /* Each real token shifted decrements this. */ 1332fd7d9bd3Smrg 1333fd7d9bd3Smrg for (;;) 1334fd7d9bd3Smrg { 1335fd7d9bd3Smrg yyn = yypact[yystate]; 1336fd7d9bd3Smrg if (yyn != YYPACT_NINF) 1337fd7d9bd3Smrg { 1338fd7d9bd3Smrg yyn += YYTERROR; 1339fd7d9bd3Smrg if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 1340fd7d9bd3Smrg { 1341fd7d9bd3Smrg yyn = yytable[yyn]; 1342fd7d9bd3Smrg if (0 < yyn) 1343fd7d9bd3Smrg break; 1344fd7d9bd3Smrg } 1345fd7d9bd3Smrg } 1346fd7d9bd3Smrg 1347fd7d9bd3Smrg /* Pop the current state because it cannot handle the error token. */ 1348fd7d9bd3Smrg if (yyssp == yyss) 1349fd7d9bd3Smrg YYABORT; 1350fd7d9bd3Smrg 1351fd7d9bd3Smrg YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); 1352fd7d9bd3Smrg yydestruct (yystos[yystate], yyvsp); 1353fd7d9bd3Smrg YYPOPSTACK; 1354fd7d9bd3Smrg yystate = *yyssp; 1355fd7d9bd3Smrg YY_STACK_PRINT (yyss, yyssp); 1356fd7d9bd3Smrg } 1357fd7d9bd3Smrg 1358fd7d9bd3Smrg if (yyn == YYFINAL) 1359fd7d9bd3Smrg YYACCEPT; 1360fd7d9bd3Smrg 1361fd7d9bd3Smrg YYDPRINTF ((stderr, "Shifting error token, ")); 1362fd7d9bd3Smrg 1363fd7d9bd3Smrg *++yyvsp = yylval; 1364fd7d9bd3Smrg 1365fd7d9bd3Smrg 1366fd7d9bd3Smrg yystate = yyn; 1367fd7d9bd3Smrg goto yynewstate; 1368fd7d9bd3Smrg 1369fd7d9bd3Smrg 1370fd7d9bd3Smrg/*-------------------------------------. 1371fd7d9bd3Smrg| yyacceptlab -- YYACCEPT comes here. | 1372fd7d9bd3Smrg`-------------------------------------*/ 1373fd7d9bd3Smrgyyacceptlab: 1374fd7d9bd3Smrg yyresult = 0; 1375fd7d9bd3Smrg goto yyreturn; 1376fd7d9bd3Smrg 1377fd7d9bd3Smrg/*-----------------------------------. 1378fd7d9bd3Smrg| yyabortlab -- YYABORT comes here. | 1379fd7d9bd3Smrg`-----------------------------------*/ 1380fd7d9bd3Smrgyyabortlab: 1381fd7d9bd3Smrg yyresult = 1; 1382fd7d9bd3Smrg goto yyreturn; 1383fd7d9bd3Smrg 1384fd7d9bd3Smrg#ifndef yyoverflow 1385fd7d9bd3Smrg/*----------------------------------------------. 1386fd7d9bd3Smrg| yyoverflowlab -- parser overflow comes here. | 1387fd7d9bd3Smrg`----------------------------------------------*/ 1388fd7d9bd3Smrgyyoverflowlab: 1389fd7d9bd3Smrg yyerror ("parser stack overflow"); 1390fd7d9bd3Smrg yyresult = 2; 1391fd7d9bd3Smrg /* Fall through. */ 1392fd7d9bd3Smrg#endif 1393fd7d9bd3Smrg 1394fd7d9bd3Smrgyyreturn: 1395fd7d9bd3Smrg#ifndef yyoverflow 1396fd7d9bd3Smrg if (yyss != yyssa) 1397fd7d9bd3Smrg YYSTACK_FREE (yyss); 1398fd7d9bd3Smrg#endif 1399fd7d9bd3Smrg return yyresult; 1400fd7d9bd3Smrg} 1401fd7d9bd3Smrg 1402fd7d9bd3Smrg 1403fd7d9bd3Smrg#line 92 "gram.y" 1404fd7d9bd3Smrg 1405fd7d9bd3Smrgvoid 1406fd7d9bd3Smrgyyerror(const char *s) 1407fd7d9bd3Smrg{ 1408fd7d9bd3Smrg fprintf(stderr, "xgc: syntax error, line %d\n", yylineno); 1409fd7d9bd3Smrg} 1410fd7d9bd3Smrg 1411