| File: | gram.c |
| Location: | line 1521, column 5 |
| Description: | Value stored to 'yymsg' is never read |
| 1 | /* A Bison parser, made by GNU Bison 2.4.3. */ |
| 2 | |
| 3 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
| 4 | |
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, |
| 6 | 2009, 2010 Free Software Foundation, Inc. |
| 7 | |
| 8 | This program is free software: you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation, either version 3 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 20 | |
| 21 | /* As a special exception, you may create a larger work that contains |
| 22 | part or all of the Bison parser skeleton and distribute that work |
| 23 | under terms of your choice, so long as that work isn't itself a |
| 24 | parser generator using the skeleton or a modified version thereof |
| 25 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 26 | the parser skeleton itself, you may (at your option) remove this |
| 27 | special exception, which will cause the skeleton and the resulting |
| 28 | Bison output files to be licensed under the GNU General Public |
| 29 | License without this special exception. |
| 30 | |
| 31 | This special exception was added by the Free Software Foundation in |
| 32 | version 2.2 of Bison. */ |
| 33 | |
| 34 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 35 | simplifying the original so-called "semantic" parser. */ |
| 36 | |
| 37 | /* All symbols defined below should begin with yy or YY, to avoid |
| 38 | infringing on user name space. This should be done even for local |
| 39 | variables, as they might otherwise be expanded by user macros. |
| 40 | There are some unavoidable exceptions within include files to |
| 41 | define necessary library symbols; they are noted "INFRINGES ON |
| 42 | USER NAME SPACE" below. */ |
| 43 | |
| 44 | /* Identify Bison output. */ |
| 45 | #define YYBISON1 1 |
| 46 | |
| 47 | /* Bison version. */ |
| 48 | #define YYBISON_VERSION"2.4.3" "2.4.3" |
| 49 | |
| 50 | /* Skeleton name. */ |
| 51 | #define YYSKELETON_NAME"yacc.c" "yacc.c" |
| 52 | |
| 53 | /* Pure parsers. */ |
| 54 | #define YYPURE0 0 |
| 55 | |
| 56 | /* Push parsers. */ |
| 57 | #define YYPUSH0 0 |
| 58 | |
| 59 | /* Pull parsers. */ |
| 60 | #define YYPULL1 1 |
| 61 | |
| 62 | /* Using locations. */ |
| 63 | #define YYLSP_NEEDED0 0 |
| 64 | |
| 65 | |
| 66 | |
| 67 | /* Copy the first part of user declarations. */ |
| 68 | |
| 69 | /* Line 189 of yacc.c */ |
| 70 | #line 67 "gram.y" |
| 71 | |
| 72 | #include <stdio.h> |
| 73 | #include <ctype.h> |
| 74 | #include "twm.h" |
| 75 | #include "menus.h" |
| 76 | #include "list.h" |
| 77 | #include "util.h" |
| 78 | #include "screen.h" |
| 79 | #include "parse.h" |
| 80 | #include "add_window.h" |
| 81 | #include "icons.h" |
| 82 | #include <X11/Xos.h> |
| 83 | #include <X11/Xmu/CharSet.h> |
| 84 | |
| 85 | static char *Action = ""; |
| 86 | static char *Name = ""; |
| 87 | static MenuRoot *root, *pull = NULL((void*)0); |
| 88 | |
| 89 | static MenuRoot *GetRoot ( char *name, char *fore, char *back ); |
| 90 | static void GotButton ( int butt, int func ); |
| 91 | static void GotKey ( char *key, int func ); |
| 92 | static void GotTitleButton ( char *bitmapname, int func, Boolint rightside ); |
| 93 | static Boolint CheckWarpScreenArg ( char *s ); |
| 94 | static Boolint CheckWarpRingArg ( char *s ); |
| 95 | static Boolint CheckColormapArg ( char *s ); |
| 96 | |
| 97 | static char *ptr; |
| 98 | static name_list **list; |
| 99 | static int cont = 0; |
| 100 | static int color; |
| 101 | int mods = 0; |
| 102 | unsigned int mods_used = (ShiftMask(1<<0) | ControlMask(1<<2) | Mod1Mask(1<<3)); |
| 103 | |
| 104 | extern int yylineno; |
| 105 | |
| 106 | |
| 107 | /* Line 189 of yacc.c */ |
| 108 | #line 109 "gram.c" |
| 109 | |
| 110 | /* Enabling traces. */ |
| 111 | #ifndef YYDEBUG0 |
| 112 | # define YYDEBUG0 0 |
| 113 | #endif |
| 114 | |
| 115 | /* Enabling verbose error messages. */ |
| 116 | #ifdef YYERROR_VERBOSE0 |
| 117 | # undef YYERROR_VERBOSE0 |
| 118 | # define YYERROR_VERBOSE0 1 |
| 119 | #else |
| 120 | # define YYERROR_VERBOSE0 0 |
| 121 | #endif |
| 122 | |
| 123 | /* Enabling the token table. */ |
| 124 | #ifndef YYTOKEN_TABLE0 |
| 125 | # define YYTOKEN_TABLE0 0 |
| 126 | #endif |
| 127 | |
| 128 | |
| 129 | /* Tokens. */ |
| 130 | #ifndef YYTOKENTYPE |
| 131 | # define YYTOKENTYPE |
| 132 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 133 | know about them. */ |
| 134 | enum yytokentype { |
| 135 | LB258 = 258, |
| 136 | RB259 = 259, |
| 137 | LP260 = 260, |
| 138 | RP261 = 261, |
| 139 | MENUS262 = 262, |
| 140 | MENU263 = 263, |
| 141 | BUTTON264 = 264, |
| 142 | DEFAULT_FUNCTION265 = 265, |
| 143 | PLUS266 = 266, |
| 144 | MINUS267 = 267, |
| 145 | ALL268 = 268, |
| 146 | OR269 = 269, |
| 147 | CURSORS270 = 270, |
| 148 | PIXMAPS271 = 271, |
| 149 | ICONS272 = 272, |
| 150 | COLOR273 = 273, |
| 151 | SAVECOLOR274 = 274, |
| 152 | MONOCHROME275 = 275, |
| 153 | FUNCTION276 = 276, |
| 154 | ICONMGR_SHOW277 = 277, |
| 155 | ICONMGR278 = 278, |
| 156 | WINDOW_FUNCTION279 = 279, |
| 157 | ZOOM280 = 280, |
| 158 | ICONMGRS281 = 281, |
| 159 | ICONMGR_GEOMETRY282 = 282, |
| 160 | ICONMGR_NOSHOW283 = 283, |
| 161 | MAKE_TITLE284 = 284, |
| 162 | GRAYSCALE285 = 285, |
| 163 | ICONIFY_BY_UNMAPPING286 = 286, |
| 164 | DONT_ICONIFY_BY_UNMAPPING287 = 287, |
| 165 | NO_TITLE288 = 288, |
| 166 | AUTO_RAISE289 = 289, |
| 167 | NO_HILITE290 = 290, |
| 168 | ICON_REGION291 = 291, |
| 169 | META292 = 292, |
| 170 | SHIFT293 = 293, |
| 171 | LOCK294 = 294, |
| 172 | CONTROL295 = 295, |
| 173 | WINDOW296 = 296, |
| 174 | TITLE297 = 297, |
| 175 | ICON298 = 298, |
| 176 | ROOT299 = 299, |
| 177 | FRAME300 = 300, |
| 178 | COLON301 = 301, |
| 179 | EQUALS302 = 302, |
| 180 | SQUEEZE_TITLE303 = 303, |
| 181 | DONT_SQUEEZE_TITLE304 = 304, |
| 182 | START_ICONIFIED305 = 305, |
| 183 | NO_TITLE_HILITE306 = 306, |
| 184 | TITLE_HILITE307 = 307, |
| 185 | MOVE308 = 308, |
| 186 | RESIZE309 = 309, |
| 187 | WAIT310 = 310, |
| 188 | SELECT311 = 311, |
| 189 | KILL312 = 312, |
| 190 | LEFT_TITLEBUTTON313 = 313, |
| 191 | RIGHT_TITLEBUTTON314 = 314, |
| 192 | NUMBER315 = 315, |
| 193 | KEYWORD316 = 316, |
| 194 | NKEYWORD317 = 317, |
| 195 | CKEYWORD318 = 318, |
| 196 | CLKEYWORD319 = 319, |
| 197 | FKEYWORD320 = 320, |
| 198 | FSKEYWORD321 = 321, |
| 199 | SKEYWORD322 = 322, |
| 200 | DKEYWORD323 = 323, |
| 201 | JKEYWORD324 = 324, |
| 202 | WINDOW_RING325 = 325, |
| 203 | WARP_CURSOR326 = 326, |
| 204 | ERRORTOKEN327 = 327, |
| 205 | NO_STACKMODE328 = 328, |
| 206 | STRING329 = 329 |
| 207 | }; |
| 208 | #endif |
| 209 | /* Tokens. */ |
| 210 | #define LB258 258 |
| 211 | #define RB259 259 |
| 212 | #define LP260 260 |
| 213 | #define RP261 261 |
| 214 | #define MENUS262 262 |
| 215 | #define MENU263 263 |
| 216 | #define BUTTON264 264 |
| 217 | #define DEFAULT_FUNCTION265 265 |
| 218 | #define PLUS266 266 |
| 219 | #define MINUS267 267 |
| 220 | #define ALL268 268 |
| 221 | #define OR269 269 |
| 222 | #define CURSORS270 270 |
| 223 | #define PIXMAPS271 271 |
| 224 | #define ICONS272 272 |
| 225 | #define COLOR273 273 |
| 226 | #define SAVECOLOR274 274 |
| 227 | #define MONOCHROME275 275 |
| 228 | #define FUNCTION276 276 |
| 229 | #define ICONMGR_SHOW277 277 |
| 230 | #define ICONMGR278 278 |
| 231 | #define WINDOW_FUNCTION279 279 |
| 232 | #define ZOOM280 280 |
| 233 | #define ICONMGRS281 281 |
| 234 | #define ICONMGR_GEOMETRY282 282 |
| 235 | #define ICONMGR_NOSHOW283 283 |
| 236 | #define MAKE_TITLE284 284 |
| 237 | #define GRAYSCALE285 285 |
| 238 | #define ICONIFY_BY_UNMAPPING286 286 |
| 239 | #define DONT_ICONIFY_BY_UNMAPPING287 287 |
| 240 | #define NO_TITLE288 288 |
| 241 | #define AUTO_RAISE289 289 |
| 242 | #define NO_HILITE290 290 |
| 243 | #define ICON_REGION291 291 |
| 244 | #define META292 292 |
| 245 | #define SHIFT293 293 |
| 246 | #define LOCK294 294 |
| 247 | #define CONTROL295 295 |
| 248 | #define WINDOW296 296 |
| 249 | #define TITLE297 297 |
| 250 | #define ICON298 298 |
| 251 | #define ROOT299 299 |
| 252 | #define FRAME300 300 |
| 253 | #define COLON301 301 |
| 254 | #define EQUALS302 302 |
| 255 | #define SQUEEZE_TITLE303 303 |
| 256 | #define DONT_SQUEEZE_TITLE304 304 |
| 257 | #define START_ICONIFIED305 305 |
| 258 | #define NO_TITLE_HILITE306 306 |
| 259 | #define TITLE_HILITE307 307 |
| 260 | #define MOVE308 308 |
| 261 | #define RESIZE309 309 |
| 262 | #define WAIT310 310 |
| 263 | #define SELECT311 311 |
| 264 | #define KILL312 312 |
| 265 | #define LEFT_TITLEBUTTON313 313 |
| 266 | #define RIGHT_TITLEBUTTON314 314 |
| 267 | #define NUMBER315 315 |
| 268 | #define KEYWORD316 316 |
| 269 | #define NKEYWORD317 317 |
| 270 | #define CKEYWORD318 318 |
| 271 | #define CLKEYWORD319 319 |
| 272 | #define FKEYWORD320 320 |
| 273 | #define FSKEYWORD321 321 |
| 274 | #define SKEYWORD322 322 |
| 275 | #define DKEYWORD323 323 |
| 276 | #define JKEYWORD324 324 |
| 277 | #define WINDOW_RING325 325 |
| 278 | #define WARP_CURSOR326 326 |
| 279 | #define ERRORTOKEN327 327 |
| 280 | #define NO_STACKMODE328 328 |
| 281 | #define STRING329 329 |
| 282 | |
| 283 | |
| 284 | |
| 285 | |
| 286 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED1 |
| 287 | typedef union YYSTYPE |
| 288 | { |
| 289 | |
| 290 | /* Line 214 of yacc.c */ |
| 291 | #line 104 "gram.y" |
| 292 | |
| 293 | int num; |
| 294 | char *ptr; |
| 295 | |
| 296 | |
| 297 | |
| 298 | /* Line 214 of yacc.c */ |
| 299 | #line 300 "gram.c" |
| 300 | } YYSTYPE; |
| 301 | # define YYSTYPE_IS_TRIVIAL1 1 |
| 302 | # define yystypeYYSTYPE YYSTYPE /* obsolescent; will be withdrawn */ |
| 303 | # define YYSTYPE_IS_DECLARED1 1 |
| 304 | #endif |
| 305 | |
| 306 | |
| 307 | /* Copy the second part of user declarations. */ |
| 308 | |
| 309 | |
| 310 | /* Line 264 of yacc.c */ |
| 311 | #line 312 "gram.c" |
| 312 | |
| 313 | #ifdef short |
| 314 | # undef short |
| 315 | #endif |
| 316 | |
| 317 | #ifdef YYTYPE_UINT8 |
| 318 | typedef YYTYPE_UINT8 yytype_uint8; |
| 319 | #else |
| 320 | typedef unsigned char yytype_uint8; |
| 321 | #endif |
| 322 | |
| 323 | #ifdef YYTYPE_INT8 |
| 324 | typedef YYTYPE_INT8 yytype_int8; |
| 325 | #elif (defined __STDC__1 || defined __C99__FUNC__ \ |
| 326 | || defined __cplusplus || defined _MSC_VER) |
| 327 | typedef signed char yytype_int8; |
| 328 | #else |
| 329 | typedef short int yytype_int8; |
| 330 | #endif |
| 331 | |
| 332 | #ifdef YYTYPE_UINT16 |
| 333 | typedef YYTYPE_UINT16 yytype_uint16; |
| 334 | #else |
| 335 | typedef unsigned short int yytype_uint16; |
| 336 | #endif |
| 337 | |
| 338 | #ifdef YYTYPE_INT16 |
| 339 | typedef YYTYPE_INT16 yytype_int16; |
| 340 | #else |
| 341 | typedef short int yytype_int16; |
| 342 | #endif |
| 343 | |
| 344 | #ifndef YYSIZE_Tlong unsigned int |
| 345 | # ifdef __SIZE_TYPE__long unsigned int |
| 346 | # define YYSIZE_Tlong unsigned int __SIZE_TYPE__long unsigned int |
| 347 | # elif defined size_t |
| 348 | # define YYSIZE_Tlong unsigned int size_t |
| 349 | # elif ! defined YYSIZE_Tlong unsigned int && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 350 | || defined __cplusplus || defined _MSC_VER) |
| 351 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 352 | # define YYSIZE_Tlong unsigned int size_t |
| 353 | # else |
| 354 | # define YYSIZE_Tlong unsigned int unsigned int |
| 355 | # endif |
| 356 | #endif |
| 357 | |
| 358 | #define YYSIZE_MAXIMUM((long unsigned int) -1) ((YYSIZE_Tlong unsigned int) -1) |
| 359 | |
| 360 | #ifndef YY_ |
| 361 | # if defined YYENABLE_NLS && YYENABLE_NLS |
| 362 | # if ENABLE_NLS |
| 363 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 364 | # define YY_(msgid)msgid dgettext ("bison-runtime", msgid) |
| 365 | # endif |
| 366 | # endif |
| 367 | # ifndef YY_ |
| 368 | # define YY_(msgid)msgid msgid |
| 369 | # endif |
| 370 | #endif |
| 371 | |
| 372 | /* Suppress unused-variable warnings by "using" E. */ |
| 373 | #if ! defined lint || defined __GNUC__4 |
| 374 | # define YYUSE(e)((void) (e)) ((void) (e)) |
| 375 | #else |
| 376 | # define YYUSE(e)((void) (e)) /* empty */ |
| 377 | #endif |
| 378 | |
| 379 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 380 | #ifndef lint |
| 381 | # define YYID(n)(n) (n) |
| 382 | #else |
| 383 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 384 | || defined __cplusplus || defined _MSC_VER) |
| 385 | static int |
| 386 | YYID (int yyi)(int yyi) |
| 387 | #else |
| 388 | static int |
| 389 | YYID (yyi)(yyi) |
| 390 | int yyi; |
| 391 | #endif |
| 392 | { |
| 393 | return yyi; |
| 394 | } |
| 395 | #endif |
| 396 | |
| 397 | #if ! defined yyoverflow || YYERROR_VERBOSE0 |
| 398 | |
| 399 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 400 | |
| 401 | # ifdef YYSTACK_USE_ALLOCA |
| 402 | # if YYSTACK_USE_ALLOCA |
| 403 | # ifdef __GNUC__4 |
| 404 | # define YYSTACK_ALLOCmalloc __builtin_alloca |
| 405 | # elif defined __BUILTIN_VA_ARG_INCR |
| 406 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 407 | # elif defined _AIX |
| 408 | # define YYSTACK_ALLOCmalloc __alloca |
| 409 | # elif defined _MSC_VER |
| 410 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 411 | # define alloca _alloca |
| 412 | # else |
| 413 | # define YYSTACK_ALLOCmalloc alloca |
| 414 | # if ! defined _ALLOCA_H1 && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 415 | || defined __cplusplus || defined _MSC_VER) |
| 416 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 417 | # ifndef _STDLIB_H1 |
| 418 | # define _STDLIB_H1 1 |
| 419 | # endif |
| 420 | # endif |
| 421 | # endif |
| 422 | # endif |
| 423 | # endif |
| 424 | |
| 425 | # ifdef YYSTACK_ALLOCmalloc |
| 426 | /* Pacify GCC's `empty if-body' warning. */ |
| 427 | # define YYSTACK_FREEfree(Ptr) do { /* empty */; } while (YYID (0)(0)) |
| 428 | # ifndef YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) |
| 429 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 430 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 431 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 432 | to allow for a few compiler-allocated temporary stack slots. */ |
| 433 | # define YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) 4032 /* reasonable circa 2006 */ |
| 434 | # endif |
| 435 | # else |
| 436 | # define YYSTACK_ALLOCmalloc YYMALLOCmalloc |
| 437 | # define YYSTACK_FREEfree YYFREEfree |
| 438 | # ifndef YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) |
| 439 | # define YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1) YYSIZE_MAXIMUM((long unsigned int) -1) |
| 440 | # endif |
| 441 | # if (defined __cplusplus && ! defined _STDLIB_H1 \ |
| 442 | && ! ((defined YYMALLOCmalloc || defined malloc) \ |
| 443 | && (defined YYFREEfree || defined free))) |
| 444 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 445 | # ifndef _STDLIB_H1 |
| 446 | # define _STDLIB_H1 1 |
| 447 | # endif |
| 448 | # endif |
| 449 | # ifndef YYMALLOCmalloc |
| 450 | # define YYMALLOCmalloc malloc |
| 451 | # if ! defined malloc && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 452 | || defined __cplusplus || defined _MSC_VER) |
| 453 | void *malloc (YYSIZE_Tlong unsigned int); /* INFRINGES ON USER NAME SPACE */ |
| 454 | # endif |
| 455 | # endif |
| 456 | # ifndef YYFREEfree |
| 457 | # define YYFREEfree free |
| 458 | # if ! defined free && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 459 | || defined __cplusplus || defined _MSC_VER) |
| 460 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 461 | # endif |
| 462 | # endif |
| 463 | # endif |
| 464 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 465 | |
| 466 | |
| 467 | #if (! defined yyoverflow \ |
| 468 | && (! defined __cplusplus \ |
| 469 | || (defined YYSTYPE_IS_TRIVIAL1 && YYSTYPE_IS_TRIVIAL1))) |
| 470 | |
| 471 | /* A type that is properly aligned for any stack member. */ |
| 472 | union yyalloc |
| 473 | { |
| 474 | yytype_int16 yyss_alloc; |
| 475 | YYSTYPE yyvs_alloc; |
| 476 | }; |
| 477 | |
| 478 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 479 | # define YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1) (sizeof (union yyalloc) - 1) |
| 480 | |
| 481 | /* The size of an array large to enough to hold all stacks, each with |
| 482 | N elements. */ |
| 483 | # define YYSTACK_BYTES(N)((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof ( union yyalloc) - 1)) \ |
| 484 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 485 | + YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1)) |
| 486 | |
| 487 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 488 | not overlap. */ |
| 489 | # ifndef YYCOPY |
| 490 | # if defined __GNUC__4 && 1 < __GNUC__4 |
| 491 | # define YYCOPY(To, From, Count)__builtin_memcpy (To, From, (Count) * sizeof (*(From))) \ |
| 492 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 493 | # else |
| 494 | # define YYCOPY(To, From, Count)__builtin_memcpy (To, From, (Count) * sizeof (*(From))) \ |
| 495 | do \ |
| 496 | { \ |
| 497 | YYSIZE_Tlong unsigned int yyi; \ |
| 498 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 499 | (To)[yyi] = (From)[yyi]; \ |
| 500 | } \ |
| 501 | while (YYID (0)(0)) |
| 502 | # endif |
| 503 | # endif |
| 504 | |
| 505 | /* Relocate STACK from its old location to the new one. The |
| 506 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 507 | elements in the stack, and YYPTR gives the new location of the |
| 508 | stack. Advance YYPTR to a properly aligned location for the next |
| 509 | stack. */ |
| 510 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 511 | do \ |
| 512 | { \ |
| 513 | YYSIZE_Tlong unsigned int yynewbytes; \ |
| 514 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize)__builtin_memcpy (&yyptr->Stack_alloc, Stack, (yysize) * sizeof (*(Stack))); \ |
| 515 | Stack = &yyptr->Stack_alloc; \ |
| 516 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1); \ |
| 517 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 518 | } \ |
| 519 | while (YYID (0)(0)) |
| 520 | |
| 521 | #endif |
| 522 | |
| 523 | /* YYFINAL -- State number of the termination state. */ |
| 524 | #define YYFINAL3 3 |
| 525 | /* YYLAST -- Last index in YYTABLE. */ |
| 526 | #define YYLAST339 339 |
| 527 | |
| 528 | /* YYNTOKENS -- Number of terminals. */ |
| 529 | #define YYNTOKENS75 75 |
| 530 | /* YYNNTS -- Number of nonterminals. */ |
| 531 | #define YYNNTS76 76 |
| 532 | /* YYNRULES -- Number of rules. */ |
| 533 | #define YYNRULES193 193 |
| 534 | /* YYNRULES -- Number of states. */ |
| 535 | #define YYNSTATES285 285 |
| 536 | |
| 537 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 538 | #define YYUNDEFTOK2 2 |
| 539 | #define YYMAXUTOK329 329 |
| 540 | |
| 541 | #define YYTRANSLATE(YYX)((unsigned int) (YYX) <= 329 ? yytranslate[YYX] : 2) \ |
| 542 | ((unsigned int) (YYX) <= YYMAXUTOK329 ? yytranslate[YYX] : YYUNDEFTOK2) |
| 543 | |
| 544 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
| 545 | static const yytype_uint8 yytranslate[] = |
| 546 | { |
| 547 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 548 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 549 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 550 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 551 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 552 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 553 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 554 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 555 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 556 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 557 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 558 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 559 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 560 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 561 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 562 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 563 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 564 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 565 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 566 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 567 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 568 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 569 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 570 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 571 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 572 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
| 573 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 574 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
| 575 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 576 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
| 577 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
| 578 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
| 579 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 |
| 580 | }; |
| 581 | |
| 582 | #if YYDEBUG0 |
| 583 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 584 | YYRHS. */ |
| 585 | static const yytype_uint16 yyprhs[] = |
| 586 | { |
| 587 | 0, 0, 3, 5, 6, 9, 11, 13, 15, 17, |
| 588 | 19, 26, 30, 33, 36, 38, 41, 44, 45, 49, |
| 589 | 51, 56, 61, 64, 67, 70, 73, 74, 78, 79, |
| 590 | 83, 85, 86, 90, 91, 95, 96, 100, 102, 103, |
| 591 | 107, 109, 110, 114, 116, 117, 121, 123, 124, 128, |
| 592 | 129, 133, 134, 138, 139, 149, 150, 155, 156, 161, |
| 593 | 162, 166, 167, 171, 172, 176, 179, 180, 184, 187, |
| 594 | 190, 191, 195, 197, 198, 202, 204, 207, 210, 217, |
| 595 | 224, 225, 228, 230, 232, 234, 236, 239, 241, 242, |
| 596 | 245, 247, 249, 251, 253, 255, 257, 259, 261, 263, |
| 597 | 264, 267, 269, 271, 273, 275, 277, 279, 281, 283, |
| 598 | 285, 287, 291, 292, 295, 298, 302, 303, 306, 310, |
| 599 | 313, 317, 320, 324, 327, 331, 334, 338, 341, 345, |
| 600 | 348, 352, 355, 359, 362, 366, 369, 373, 376, 380, |
| 601 | 383, 387, 388, 391, 394, 395, 400, 403, 407, 408, |
| 602 | 411, 413, 415, 419, 420, 423, 426, 428, 429, 435, |
| 603 | 437, 438, 442, 443, 449, 453, 454, 457, 461, 466, |
| 604 | 470, 471, 474, 476, 480, 481, 484, 487, 491, 492, |
| 605 | 495, 497, 501, 502, 505, 508, 516, 518, 521, 523, |
| 606 | 526, 529, 532, 534 |
| 607 | }; |
| 608 | |
| 609 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 610 | static const yytype_int16 yyrhs[] = |
| 611 | { |
| 612 | 76, 0, -1, 77, -1, -1, 77, 78, -1, 1, |
| 613 | -1, 100, -1, 101, -1, 102, -1, 127, -1, 36, |
| 614 | 149, 68, 68, 150, 150, -1, 27, 149, 150, -1, |
| 615 | 27, 149, -1, 25, 150, -1, 25, -1, 16, 111, |
| 616 | -1, 15, 114, -1, -1, 31, 79, 134, -1, 31, |
| 617 | -1, 58, 149, 47, 146, -1, 59, 149, 47, 146, |
| 618 | -1, 148, 149, -1, 148, 146, -1, 149, 104, -1, |
| 619 | 148, 103, -1, -1, 32, 80, 134, -1, -1, 28, |
| 620 | 81, 134, -1, 28, -1, -1, 26, 82, 131, -1, |
| 621 | -1, 22, 83, 134, -1, -1, 51, 84, 134, -1, |
| 622 | 51, -1, -1, 35, 85, 134, -1, 35, -1, -1, |
| 623 | 73, 86, 134, -1, 73, -1, -1, 33, 87, 134, |
| 624 | -1, 33, -1, -1, 29, 88, 134, -1, -1, 50, |
| 625 | 89, 134, -1, -1, 34, 90, 134, -1, -1, 8, |
| 626 | 149, 5, 149, 46, 149, 6, 91, 143, -1, -1, |
| 627 | 8, 149, 92, 143, -1, -1, 21, 149, 93, 140, |
| 628 | -1, -1, 17, 94, 137, -1, -1, 18, 95, 117, |
| 629 | -1, -1, 30, 96, 117, -1, 19, 121, -1, -1, |
| 630 | 20, 97, 117, -1, 10, 146, -1, 24, 146, -1, |
| 631 | -1, 71, 98, 134, -1, 71, -1, -1, 70, 99, |
| 632 | 134, -1, 61, -1, 67, 149, -1, 62, 150, -1, |
| 633 | 47, 105, 46, 107, 46, 146, -1, 47, 105, 46, |
| 634 | 109, 46, 146, -1, -1, 105, 106, -1, 37, -1, |
| 635 | 38, -1, 39, -1, 40, -1, 37, 150, -1, 14, |
| 636 | -1, -1, 107, 108, -1, 41, -1, 42, -1, 43, |
| 637 | -1, 44, -1, 45, -1, 23, -1, 37, -1, 13, |
| 638 | -1, 14, -1, -1, 109, 110, -1, 41, -1, 42, |
| 639 | -1, 43, -1, 44, -1, 45, -1, 23, -1, 37, |
| 640 | -1, 13, -1, 14, -1, 149, -1, 3, 112, 4, |
| 641 | -1, -1, 112, 113, -1, 52, 149, -1, 3, 115, |
| 642 | 4, -1, -1, 115, 116, -1, 45, 149, 149, -1, |
| 643 | 45, 149, -1, 42, 149, 149, -1, 42, 149, -1, |
| 644 | 43, 149, 149, -1, 43, 149, -1, 23, 149, 149, |
| 645 | -1, 23, 149, -1, 9, 149, 149, -1, 9, 149, |
| 646 | -1, 53, 149, 149, -1, 53, 149, -1, 54, 149, |
| 647 | 149, -1, 54, 149, -1, 55, 149, 149, -1, 55, |
| 648 | 149, -1, 8, 149, 149, -1, 8, 149, -1, 56, |
| 649 | 149, 149, -1, 56, 149, -1, 57, 149, 149, -1, |
| 650 | 57, 149, -1, 3, 118, 4, -1, -1, 118, 119, |
| 651 | -1, 64, 149, -1, -1, 64, 149, 120, 124, -1, |
| 652 | 63, 149, -1, 3, 122, 4, -1, -1, 122, 123, |
| 653 | -1, 149, -1, 64, -1, 3, 125, 4, -1, -1, |
| 654 | 125, 126, -1, 149, 149, -1, 48, -1, -1, 48, |
| 655 | 128, 3, 130, 4, -1, 49, -1, -1, 49, 129, |
| 656 | 134, -1, -1, 130, 149, 69, 147, 150, -1, 3, |
| 657 | 132, 4, -1, -1, 132, 133, -1, 149, 149, 150, |
| 658 | -1, 149, 149, 149, 150, -1, 3, 135, 4, -1, |
| 659 | -1, 135, 136, -1, 149, -1, 3, 138, 4, -1, |
| 660 | -1, 138, 139, -1, 149, 149, -1, 3, 141, 4, |
| 661 | -1, -1, 141, 142, -1, 146, -1, 3, 144, 4, |
| 662 | -1, -1, 144, 145, -1, 149, 146, -1, 149, 5, |
| 663 | 149, 46, 149, 6, 146, -1, 65, -1, 66, 149, |
| 664 | -1, 150, -1, 11, 150, -1, 12, 150, -1, 9, |
| 665 | 150, -1, 74, -1, 60, -1 |
| 666 | }; |
| 667 | |
| 668 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 669 | static const yytype_uint16 yyrline[] = |
| 670 | { |
| 671 | 0, 133, 133, 136, 137, 140, 141, 142, 143, 144, |
| 672 | 145, 147, 153, 156, 162, 164, 165, 166, 166, 168, |
| 673 | 170, 173, 176, 180, 196, 197, 198, 198, 200, 200, |
| 674 | 202, 203, 203, 205, 205, 207, 207, 209, 211, 211, |
| 675 | 213, 215, 215, 217, 219, 219, 221, 223, 223, 225, |
| 676 | 225, 227, 227, 229, 229, 232, 232, 234, 234, 236, |
| 677 | 236, 238, 238, 240, 240, 242, 244, 244, 246, 262, |
| 678 | 270, 270, 272, 274, 274, 279, 289, 299, 311, 314, |
| 679 | 317, 318, 321, 322, 323, 324, 325, 335, 338, 339, |
| 680 | 342, 343, 344, 345, 346, 347, 348, 349, 350, 353, |
| 681 | 354, 357, 358, 359, 360, 361, 362, 363, 364, 365, |
| 682 | 366, 370, 373, 374, 377, 381, 384, 385, 388, 390, |
| 683 | 392, 394, 396, 398, 400, 402, 404, 406, 408, 410, |
| 684 | 412, 414, 416, 418, 420, 422, 424, 426, 428, 430, |
| 685 | 434, 438, 439, 442, 451, 451, 462, 473, 476, 477, |
| 686 | 480, 481, 484, 487, 488, 491, 496, 499, 499, 504, |
| 687 | 505, 505, 509, 510, 518, 521, 522, 525, 530, 538, |
| 688 | 541, 542, 545, 550, 553, 554, 557, 560, 563, 564, |
| 689 | 567, 573, 576, 577, 580, 585, 593, 594, 635, 636, |
| 690 | 637, 640, 652, 658 |
| 691 | }; |
| 692 | #endif |
| 693 | |
| 694 | #if YYDEBUG0 || YYERROR_VERBOSE0 || YYTOKEN_TABLE0 |
| 695 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 696 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 697 | static const char *const yytname[] = |
| 698 | { |
| 699 | "$end", "error", "$undefined", "LB", "RB", "LP", "RP", "MENUS", "MENU", |
| 700 | "BUTTON", "DEFAULT_FUNCTION", "PLUS", "MINUS", "ALL", "OR", "CURSORS", |
| 701 | "PIXMAPS", "ICONS", "COLOR", "SAVECOLOR", "MONOCHROME", "FUNCTION", |
| 702 | "ICONMGR_SHOW", "ICONMGR", "WINDOW_FUNCTION", "ZOOM", "ICONMGRS", |
| 703 | "ICONMGR_GEOMETRY", "ICONMGR_NOSHOW", "MAKE_TITLE", "GRAYSCALE", |
| 704 | "ICONIFY_BY_UNMAPPING", "DONT_ICONIFY_BY_UNMAPPING", "NO_TITLE", |
| 705 | "AUTO_RAISE", "NO_HILITE", "ICON_REGION", "META", "SHIFT", "LOCK", |
| 706 | "CONTROL", "WINDOW", "TITLE", "ICON", "ROOT", "FRAME", "COLON", "EQUALS", |
| 707 | "SQUEEZE_TITLE", "DONT_SQUEEZE_TITLE", "START_ICONIFIED", |
| 708 | "NO_TITLE_HILITE", "TITLE_HILITE", "MOVE", "RESIZE", "WAIT", "SELECT", |
| 709 | "KILL", "LEFT_TITLEBUTTON", "RIGHT_TITLEBUTTON", "NUMBER", "KEYWORD", |
| 710 | "NKEYWORD", "CKEYWORD", "CLKEYWORD", "FKEYWORD", "FSKEYWORD", "SKEYWORD", |
| 711 | "DKEYWORD", "JKEYWORD", "WINDOW_RING", "WARP_CURSOR", "ERRORTOKEN", |
| 712 | "NO_STACKMODE", "STRING", "$accept", "twmrc", "stmts", "stmt", "$@1", |
| 713 | "$@2", "$@3", "$@4", "$@5", "$@6", "$@7", "$@8", "$@9", "$@10", "$@11", |
| 714 | "$@12", "$@13", "$@14", "$@15", "$@16", "$@17", "$@18", "$@19", "$@20", |
| 715 | "$@21", "noarg", "sarg", "narg", "full", "fullkey", "keys", "key", |
| 716 | "contexts", "context", "contextkeys", "contextkey", "pixmap_list", |
| 717 | "pixmap_entries", "pixmap_entry", "cursor_list", "cursor_entries", |
| 718 | "cursor_entry", "color_list", "color_entries", "color_entry", "$@22", |
| 719 | "save_color_list", "s_color_entries", "s_color_entry", "win_color_list", |
| 720 | "win_color_entries", "win_color_entry", "squeeze", "$@23", "$@24", |
| 721 | "win_sqz_entries", "iconm_list", "iconm_entries", "iconm_entry", |
| 722 | "win_list", "win_entries", "win_entry", "icon_list", "icon_entries", |
| 723 | "icon_entry", "function", "function_entries", "function_entry", "menu", |
| 724 | "menu_entries", "menu_entry", "action", "signed_number", "button", |
| 725 | "string", "number", 0 |
| 726 | }; |
| 727 | #endif |
| 728 | |
| 729 | # ifdef YYPRINT |
| 730 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 731 | token YYLEX-NUM. */ |
| 732 | static const yytype_uint16 yytoknum[] = |
| 733 | { |
| 734 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 735 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 736 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
| 737 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
| 738 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
| 739 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
| 740 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
| 741 | 325, 326, 327, 328, 329 |
| 742 | }; |
| 743 | # endif |
| 744 | |
| 745 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 746 | static const yytype_uint8 yyr1[] = |
| 747 | { |
| 748 | 0, 75, 76, 77, 77, 78, 78, 78, 78, 78, |
| 749 | 78, 78, 78, 78, 78, 78, 78, 79, 78, 78, |
| 750 | 78, 78, 78, 78, 78, 78, 80, 78, 81, 78, |
| 751 | 78, 82, 78, 83, 78, 84, 78, 78, 85, 78, |
| 752 | 78, 86, 78, 78, 87, 78, 78, 88, 78, 89, |
| 753 | 78, 90, 78, 91, 78, 92, 78, 93, 78, 94, |
| 754 | 78, 95, 78, 96, 78, 78, 97, 78, 78, 78, |
| 755 | 98, 78, 78, 99, 78, 100, 101, 102, 103, 104, |
| 756 | 105, 105, 106, 106, 106, 106, 106, 106, 107, 107, |
| 757 | 108, 108, 108, 108, 108, 108, 108, 108, 108, 109, |
| 758 | 109, 110, 110, 110, 110, 110, 110, 110, 110, 110, |
| 759 | 110, 111, 112, 112, 113, 114, 115, 115, 116, 116, |
| 760 | 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, |
| 761 | 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, |
| 762 | 117, 118, 118, 119, 120, 119, 119, 121, 122, 122, |
| 763 | 123, 123, 124, 125, 125, 126, 127, 128, 127, 127, |
| 764 | 129, 127, 130, 130, 131, 132, 132, 133, 133, 134, |
| 765 | 135, 135, 136, 137, 138, 138, 139, 140, 141, 141, |
| 766 | 142, 143, 144, 144, 145, 145, 146, 146, 147, 147, |
| 767 | 147, 148, 149, 150 |
| 768 | }; |
| 769 | |
| 770 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 771 | static const yytype_uint8 yyr2[] = |
| 772 | { |
| 773 | 0, 2, 1, 0, 2, 1, 1, 1, 1, 1, |
| 774 | 6, 3, 2, 2, 1, 2, 2, 0, 3, 1, |
| 775 | 4, 4, 2, 2, 2, 2, 0, 3, 0, 3, |
| 776 | 1, 0, 3, 0, 3, 0, 3, 1, 0, 3, |
| 777 | 1, 0, 3, 1, 0, 3, 1, 0, 3, 0, |
| 778 | 3, 0, 3, 0, 9, 0, 4, 0, 4, 0, |
| 779 | 3, 0, 3, 0, 3, 2, 0, 3, 2, 2, |
| 780 | 0, 3, 1, 0, 3, 1, 2, 2, 6, 6, |
| 781 | 0, 2, 1, 1, 1, 1, 2, 1, 0, 2, |
| 782 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, |
| 783 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, |
| 784 | 1, 3, 0, 2, 2, 3, 0, 2, 3, 2, |
| 785 | 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, |
| 786 | 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, |
| 787 | 3, 0, 2, 2, 0, 4, 2, 3, 0, 2, |
| 788 | 1, 1, 3, 0, 2, 2, 1, 0, 5, 1, |
| 789 | 0, 3, 0, 5, 3, 0, 2, 3, 4, 3, |
| 790 | 0, 2, 1, 3, 0, 2, 2, 3, 0, 2, |
| 791 | 1, 3, 0, 2, 2, 7, 1, 2, 1, 2, |
| 792 | 2, 2, 1, 1 |
| 793 | }; |
| 794 | |
| 795 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 796 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 797 | means the default is an error. */ |
| 798 | static const yytype_uint8 yydefact[] = |
| 799 | { |
| 800 | 3, 0, 0, 1, 5, 0, 0, 0, 0, 0, |
| 801 | 59, 61, 0, 66, 0, 33, 0, 14, 31, 0, |
| 802 | 30, 47, 63, 19, 26, 46, 51, 40, 0, 156, |
| 803 | 159, 49, 37, 0, 0, 75, 0, 0, 73, 72, |
| 804 | 43, 192, 4, 6, 7, 8, 9, 0, 0, 55, |
| 805 | 193, 191, 186, 0, 68, 116, 16, 112, 15, 0, |
| 806 | 0, 148, 65, 0, 57, 0, 69, 13, 0, 12, |
| 807 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 808 | 0, 0, 0, 0, 0, 77, 76, 0, 0, 0, |
| 809 | 80, 25, 23, 22, 80, 24, 0, 0, 187, 0, |
| 810 | 0, 174, 60, 141, 62, 0, 67, 0, 170, 34, |
| 811 | 165, 32, 11, 29, 48, 64, 18, 27, 45, 52, |
| 812 | 39, 0, 162, 161, 50, 36, 0, 0, 74, 71, |
| 813 | 42, 0, 0, 0, 182, 56, 115, 0, 0, 0, |
| 814 | 0, 0, 0, 0, 0, 0, 0, 0, 117, 111, |
| 815 | 0, 113, 0, 0, 147, 151, 149, 150, 178, 58, |
| 816 | 0, 0, 0, 0, 20, 21, 87, 82, 83, 84, |
| 817 | 85, 88, 81, 99, 0, 0, 135, 127, 125, 121, |
| 818 | 123, 119, 129, 131, 133, 137, 139, 114, 173, 175, |
| 819 | 0, 140, 0, 0, 142, 0, 169, 171, 172, 164, |
| 820 | 166, 0, 0, 158, 0, 86, 0, 0, 0, 181, |
| 821 | 183, 0, 134, 126, 124, 120, 122, 118, 128, 130, |
| 822 | 132, 136, 138, 176, 146, 143, 177, 179, 180, 0, |
| 823 | 10, 0, 97, 98, 95, 96, 90, 91, 92, 93, |
| 824 | 94, 0, 89, 108, 109, 106, 107, 101, 102, 103, |
| 825 | 104, 105, 0, 100, 110, 53, 0, 184, 0, 0, |
| 826 | 167, 0, 0, 0, 188, 78, 79, 0, 0, 153, |
| 827 | 145, 168, 189, 190, 163, 54, 0, 0, 0, 152, |
| 828 | 154, 0, 0, 155, 185 |
| 829 | }; |
| 830 | |
| 831 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 832 | static const yytype_int16 yydefgoto[] = |
| 833 | { |
| 834 | -1, 1, 2, 42, 73, 74, 70, 68, 65, 82, |
| 835 | 77, 89, 75, 71, 81, 76, 267, 97, 107, 59, |
| 836 | 60, 72, 63, 88, 87, 43, 44, 45, 91, 95, |
| 837 | 131, 172, 206, 242, 207, 253, 58, 100, 151, 56, |
| 838 | 99, 148, 104, 153, 194, 258, 62, 105, 156, 270, |
| 839 | 277, 280, 46, 79, 80, 163, 111, 161, 200, 109, |
| 840 | 160, 197, 102, 152, 189, 159, 195, 227, 135, 175, |
| 841 | 210, 54, 263, 47, 48, 51 |
| 842 | }; |
| 843 | |
| 844 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 845 | STATE-NUM. */ |
| 846 | #define YYPACT_NINF-159 -159 |
| 847 | static const yytype_int16 yypact[] = |
| 848 | { |
| 849 | -159, 15, 265, -159, -159, -56, -30, -25, 28, 30, |
| 850 | -159, -159, 32, -159, -56, -159, -25, -30, -159, -56, |
| 851 | 40, -159, -159, 41, -159, 42, -159, 44, -56, 46, |
| 852 | 48, -159, 49, -56, -56, -159, -30, -56, -159, 58, |
| 853 | 60, -159, -159, -159, -159, -159, -159, -28, 20, 61, |
| 854 | -159, -159, -159, -56, -159, -159, -159, -159, -159, 65, |
| 855 | 66, -159, -159, 66, -159, 76, -159, -159, 78, -30, |
| 856 | 76, 76, 66, 76, 76, 76, 76, 76, -4, 83, |
| 857 | 76, 76, 76, 43, 45, -159, -159, 76, 76, 76, |
| 858 | -159, -159, -159, -159, -159, -159, -56, 85, -159, 107, |
| 859 | 8, -159, -159, -159, -159, -2, -159, 86, -159, -159, |
| 860 | -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, |
| 861 | -159, 27, -159, -159, -159, -159, -25, -25, -159, -159, |
| 862 | -159, 59, 153, 55, -159, -159, -159, -56, -56, -56, |
| 863 | -56, -56, -56, -56, -56, -56, -56, -56, -159, -159, |
| 864 | -56, -159, 0, 7, -159, -159, -159, -159, -159, -159, |
| 865 | 1, 2, -30, 3, -159, -159, -159, -30, -159, -159, |
| 866 | -159, -159, -159, -159, -56, 4, -56, -56, -56, -56, |
| 867 | -56, -56, -56, -56, -56, -56, -56, -159, -159, -159, |
| 868 | -56, -159, -56, -56, -159, 17, -159, -159, -159, -159, |
| 869 | -159, -56, -30, -159, 33, -159, 80, 13, 98, -159, |
| 870 | -159, 19, -159, -159, -159, -159, -159, -159, -159, -159, |
| 871 | -159, -159, -159, -159, -159, 103, -159, -159, -159, -35, |
| 872 | -159, 5, -159, -159, -159, -159, -159, -159, -159, -159, |
| 873 | -159, -25, -159, -159, -159, -159, -159, -159, -159, -159, |
| 874 | -159, -159, -25, -159, -159, -159, -56, -159, 104, -30, |
| 875 | -159, -30, -30, -30, -159, -159, -159, 85, 62, -159, |
| 876 | -159, -159, -159, -159, -159, -159, -56, 6, 106, -159, |
| 877 | -159, -56, -25, -159, -159 |
| 878 | }; |
| 879 | |
| 880 | /* YYPGOTO[NTERM-NUM]. */ |
| 881 | static const yytype_int16 yypgoto[] = |
| 882 | { |
| 883 | -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, |
| 884 | -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, |
| 885 | -159, -159, -159, -159, -159, -159, -159, -159, -159, -159, |
| 886 | 16, -159, -159, -159, -159, -159, -159, -159, -159, -159, |
| 887 | -159, -159, -50, -159, -159, -159, -159, -159, -159, -159, |
| 888 | -159, -159, -159, -159, -159, -159, -159, -159, -159, 130, |
| 889 | -159, -159, -159, -159, -159, -159, -159, -159, -158, -159, |
| 890 | -159, -13, -159, -159, -5, -16 |
| 891 | }; |
| 892 | |
| 893 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 894 | positive, shift that token. If negative, reduce the rule which |
| 895 | number is the opposite. If zero, do what YYDEFACT says. |
| 896 | If YYTABLE_NINF, syntax error. */ |
| 897 | #define YYTABLE_NINF-161 -161 |
| 898 | static const yytype_int16 yytable[] = |
| 899 | { |
| 900 | 49, 67, 154, 66, 188, 196, 199, 203, 209, 64, |
| 901 | 279, 191, 149, 106, 69, 3, 261, 262, 41, 90, |
| 902 | 85, 226, 115, 78, 256, 50, 243, 244, 83, 84, |
| 903 | 50, 55, 86, 57, 92, 61, 245, 52, 53, 41, |
| 904 | 52, 53, 93, -28, -17, -44, 41, -38, 98, -157, |
| 905 | 246, -160, -35, 112, 247, 248, 249, 250, 251, 252, |
| 906 | 150, -70, 155, -41, 121, 50, 96, 94, 101, 103, |
| 907 | 192, 193, 41, 166, 41, 41, 41, 41, 41, 108, |
| 908 | 41, 110, 52, 53, 52, 53, 122, 41, 134, 158, |
| 909 | 126, 133, 127, 232, 233, 162, 167, 168, 169, 170, |
| 910 | 157, 174, 231, 234, 255, 171, -144, 269, 276, 275, |
| 911 | 132, 136, 282, 164, 165, 137, 138, 235, 0, 0, |
| 912 | 0, 236, 237, 238, 239, 240, 241, 0, 0, 0, |
| 913 | 139, 0, 176, 177, 178, 179, 180, 181, 182, 183, |
| 914 | 184, 185, 186, 0, 0, 187, 202, 190, 0, 140, |
| 915 | 141, 205, 142, 0, 0, 198, 201, 0, 204, 0, |
| 916 | 143, 144, 145, 146, 147, 0, 0, 166, 0, 208, |
| 917 | 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, |
| 918 | 221, 222, 228, 0, 0, 223, 230, 224, 225, 0, |
| 919 | 167, 168, 169, 170, 0, 0, 229, 0, 257, 173, |
| 920 | 113, 114, 254, 116, 117, 118, 119, 120, 0, 0, |
| 921 | 123, 124, 125, 260, 0, 264, 0, 128, 129, 130, |
| 922 | 0, 0, 0, 0, 259, 0, 0, 0, 265, 0, |
| 923 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 266, |
| 924 | 0, 0, 0, 271, 0, 272, 273, 274, 0, 0, |
| 925 | 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, |
| 926 | 0, 0, 0, 0, 0, -2, 4, 0, 0, 284, |
| 927 | 0, 278, 281, 5, 6, 7, 283, 0, 0, 0, |
| 928 | 8, 9, 10, 11, 12, 13, 14, 15, 0, 16, |
| 929 | 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, |
| 930 | 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, |
| 931 | 0, 0, 0, 29, 30, 31, 32, 0, 0, 0, |
| 932 | 0, 0, 0, 33, 34, 0, 35, 36, 0, 0, |
| 933 | 0, 0, 37, 0, 0, 38, 39, 0, 40, 41 |
| 934 | }; |
| 935 | |
| 936 | static const yytype_int16 yycheck[] = |
| 937 | { |
| 938 | 5, 17, 4, 16, 4, 4, 4, 4, 4, 14, |
| 939 | 4, 4, 4, 63, 19, 0, 11, 12, 74, 47, |
| 940 | 36, 4, 72, 28, 5, 60, 13, 14, 33, 34, |
| 941 | 60, 3, 37, 3, 47, 3, 23, 65, 66, 74, |
| 942 | 65, 66, 47, 3, 3, 3, 74, 3, 53, 3, |
| 943 | 37, 3, 3, 69, 41, 42, 43, 44, 45, 46, |
| 944 | 52, 3, 64, 3, 68, 60, 5, 47, 3, 3, |
| 945 | 63, 64, 74, 14, 74, 74, 74, 74, 74, 3, |
| 946 | 74, 3, 65, 66, 65, 66, 3, 74, 3, 3, |
| 947 | 47, 96, 47, 13, 14, 68, 37, 38, 39, 40, |
| 948 | 105, 46, 69, 23, 6, 46, 3, 3, 46, 267, |
| 949 | 94, 4, 6, 126, 127, 8, 9, 37, -1, -1, |
| 950 | -1, 41, 42, 43, 44, 45, 46, -1, -1, -1, |
| 951 | 23, -1, 137, 138, 139, 140, 141, 142, 143, 144, |
| 952 | 145, 146, 147, -1, -1, 150, 162, 152, -1, 42, |
| 953 | 43, 167, 45, -1, -1, 160, 161, -1, 163, -1, |
| 954 | 53, 54, 55, 56, 57, -1, -1, 14, -1, 174, |
| 955 | 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, |
| 956 | 185, 186, 195, -1, -1, 190, 202, 192, 193, -1, |
| 957 | 37, 38, 39, 40, -1, -1, 201, -1, 211, 46, |
| 958 | 70, 71, 207, 73, 74, 75, 76, 77, -1, -1, |
| 959 | 80, 81, 82, 229, -1, 231, -1, 87, 88, 89, |
| 960 | -1, -1, -1, -1, 229, -1, -1, -1, 241, -1, |
| 961 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 252, |
| 962 | -1, -1, -1, 259, -1, 261, 262, 263, -1, -1, |
| 963 | -1, 256, -1, -1, -1, -1, -1, -1, -1, -1, |
| 964 | -1, -1, -1, -1, -1, 0, 1, -1, -1, 282, |
| 965 | -1, 276, 277, 8, 9, 10, 281, -1, -1, -1, |
| 966 | 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, |
| 967 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
| 968 | 35, 36, -1, -1, -1, -1, -1, -1, -1, -1, |
| 969 | -1, -1, -1, 48, 49, 50, 51, -1, -1, -1, |
| 970 | -1, -1, -1, 58, 59, -1, 61, 62, -1, -1, |
| 971 | -1, -1, 67, -1, -1, 70, 71, -1, 73, 74 |
| 972 | }; |
| 973 | |
| 974 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 975 | symbol of state STATE-NUM. */ |
| 976 | static const yytype_uint8 yystos[] = |
| 977 | { |
| 978 | 0, 76, 77, 0, 1, 8, 9, 10, 15, 16, |
| 979 | 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, |
| 980 | 28, 29, 30, 31, 32, 33, 34, 35, 36, 48, |
| 981 | 49, 50, 51, 58, 59, 61, 62, 67, 70, 71, |
| 982 | 73, 74, 78, 100, 101, 102, 127, 148, 149, 149, |
| 983 | 60, 150, 65, 66, 146, 3, 114, 3, 111, 94, |
| 984 | 95, 3, 121, 97, 149, 83, 146, 150, 82, 149, |
| 985 | 81, 88, 96, 79, 80, 87, 90, 85, 149, 128, |
| 986 | 129, 89, 84, 149, 149, 150, 149, 99, 98, 86, |
| 987 | 47, 103, 146, 149, 47, 104, 5, 92, 149, 115, |
| 988 | 112, 3, 137, 3, 117, 122, 117, 93, 3, 134, |
| 989 | 3, 131, 150, 134, 134, 117, 134, 134, 134, 134, |
| 990 | 134, 68, 3, 134, 134, 134, 47, 47, 134, 134, |
| 991 | 134, 105, 105, 149, 3, 143, 4, 8, 9, 23, |
| 992 | 42, 43, 45, 53, 54, 55, 56, 57, 116, 4, |
| 993 | 52, 113, 138, 118, 4, 64, 123, 149, 3, 140, |
| 994 | 135, 132, 68, 130, 146, 146, 14, 37, 38, 39, |
| 995 | 40, 46, 106, 46, 46, 144, 149, 149, 149, 149, |
| 996 | 149, 149, 149, 149, 149, 149, 149, 149, 4, 139, |
| 997 | 149, 4, 63, 64, 119, 141, 4, 136, 149, 4, |
| 998 | 133, 149, 150, 4, 149, 150, 107, 109, 149, 4, |
| 999 | 145, 149, 149, 149, 149, 149, 149, 149, 149, 149, |
| 1000 | 149, 149, 149, 149, 149, 149, 4, 142, 146, 149, |
| 1001 | 150, 69, 13, 14, 23, 37, 41, 42, 43, 44, |
| 1002 | 45, 46, 108, 13, 14, 23, 37, 41, 42, 43, |
| 1003 | 44, 45, 46, 110, 149, 6, 5, 146, 120, 149, |
| 1004 | 150, 11, 12, 147, 150, 146, 146, 91, 149, 3, |
| 1005 | 124, 150, 150, 150, 150, 143, 46, 125, 149, 4, |
| 1006 | 126, 149, 6, 149, 146 |
| 1007 | }; |
| 1008 | |
| 1009 | #define yyerrok(yyerrstatus = 0) (yyerrstatus = 0) |
| 1010 | #define yyclearin(yychar = (-2)) (yychar = YYEMPTY(-2)) |
| 1011 | #define YYEMPTY(-2) (-2) |
| 1012 | #define YYEOF0 0 |
| 1013 | |
| 1014 | #define YYACCEPTgoto yyacceptlab goto yyacceptlab |
| 1015 | #define YYABORTgoto yyabortlab goto yyabortlab |
| 1016 | #define YYERRORgoto yyerrorlab goto yyerrorlab |
| 1017 | |
| 1018 | |
| 1019 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 1020 | to ease the transition to the new meaning of YYERROR, for GCC. |
| 1021 | Once GCC version 2 has supplanted version 1, this can go. However, |
| 1022 | YYFAIL appears to be in use. Nevertheless, it is formally deprecated |
| 1023 | in Bison 2.4.2's NEWS entry, where a plan to phase it out is |
| 1024 | discussed. */ |
| 1025 | |
| 1026 | #define YYFAILgoto yyerrlab goto yyerrlab |
| 1027 | #if defined YYFAILgoto yyerrlab |
| 1028 | /* This is here to suppress warnings from the GCC cpp's |
| 1029 | -Wunused-macros. Normally we don't worry about that warning, but |
| 1030 | some users do, and we want to make it easy for users to remove |
| 1031 | YYFAIL uses, which will produce warnings from Bison 2.5. */ |
| 1032 | #endif |
| 1033 | |
| 1034 | #define YYRECOVERING()(!!yyerrstatus) (!!yyerrstatus) |
| 1035 | |
| 1036 | #define YYBACKUP(Token, Value)do if (yychar == (-2) && yylen == 1) { yychar = (Token ); yylval = (Value); yytoken = ((unsigned int) (yychar) <= 329 ? yytranslate[yychar] : 2); (yyvsp -= (1), yyssp -= (1)) ; goto yybackup; } else { yyerror ("syntax error: cannot back up" ); goto yyerrorlab; } while ((0)) \ |
| 1037 | do \ |
| 1038 | if (yychar == YYEMPTY(-2) && yylen == 1) \ |
| 1039 | { \ |
| 1040 | yychar = (Token); \ |
| 1041 | yylval = (Value); \ |
| 1042 | yytoken = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 329 ? yytranslate[yychar] : 2); \ |
| 1043 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); \ |
| 1044 | goto yybackup; \ |
| 1045 | } \ |
| 1046 | else \ |
| 1047 | { \ |
| 1048 | yyerror (YY_("syntax error: cannot back up")"syntax error: cannot back up"); \ |
| 1049 | YYERRORgoto yyerrorlab; \ |
| 1050 | } \ |
| 1051 | while (YYID (0)(0)) |
| 1052 | |
| 1053 | |
| 1054 | #define YYTERROR1 1 |
| 1055 | #define YYERRCODE256 256 |
| 1056 | |
| 1057 | |
| 1058 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 1059 | If N is 0, then set CURRENT to the empty location which ends |
| 1060 | the previous symbol: RHS[0] (always defined). */ |
| 1061 | |
| 1062 | #define YYRHSLOC(Rhs, K)((Rhs)[K]) ((Rhs)[K]) |
| 1063 | #ifndef YYLLOC_DEFAULT |
| 1064 | # define YYLLOC_DEFAULT(Current, Rhs, N)do if ((N)) { (Current).first_line = ((Rhs)[1]).first_line; ( Current).first_column = ((Rhs)[1]).first_column; (Current).last_line = ((Rhs)[N]).last_line; (Current).last_column = ((Rhs)[N]).last_column ; } else { (Current).first_line = (Current).last_line = ((Rhs )[0]).last_line; (Current).first_column = (Current).last_column = ((Rhs)[0]).last_column; } while ((0)) \ |
| 1065 | do \ |
| 1066 | if (YYID (N)(N)) \ |
| 1067 | { \ |
| 1068 | (Current).first_line = YYRHSLOC (Rhs, 1)((Rhs)[1]).first_line; \ |
| 1069 | (Current).first_column = YYRHSLOC (Rhs, 1)((Rhs)[1]).first_column; \ |
| 1070 | (Current).last_line = YYRHSLOC (Rhs, N)((Rhs)[N]).last_line; \ |
| 1071 | (Current).last_column = YYRHSLOC (Rhs, N)((Rhs)[N]).last_column; \ |
| 1072 | } \ |
| 1073 | else \ |
| 1074 | { \ |
| 1075 | (Current).first_line = (Current).last_line = \ |
| 1076 | YYRHSLOC (Rhs, 0)((Rhs)[0]).last_line; \ |
| 1077 | (Current).first_column = (Current).last_column = \ |
| 1078 | YYRHSLOC (Rhs, 0)((Rhs)[0]).last_column; \ |
| 1079 | } \ |
| 1080 | while (YYID (0)(0)) |
| 1081 | #endif |
| 1082 | |
| 1083 | |
| 1084 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 1085 | This macro was not mandated originally: define only if we know |
| 1086 | we won't break user code: when these are the locations we know. */ |
| 1087 | |
| 1088 | #ifndef YY_LOCATION_PRINT |
| 1089 | # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL |
| 1090 | # define YY_LOCATION_PRINT(File, Loc)((void) 0) \ |
| 1091 | fprintf (File, "%d.%d-%d.%d", \ |
| 1092 | (Loc).first_line, (Loc).first_column, \ |
| 1093 | (Loc).last_line, (Loc).last_column) |
| 1094 | # else |
| 1095 | # define YY_LOCATION_PRINT(File, Loc)((void) 0) ((void) 0) |
| 1096 | # endif |
| 1097 | #endif |
| 1098 | |
| 1099 | |
| 1100 | /* YYLEX -- calling `yylex' with the right arguments. */ |
| 1101 | |
| 1102 | #ifdef YYLEX_PARAM |
| 1103 | # define YYLEXyylex () yylex (YYLEX_PARAM) |
| 1104 | #else |
| 1105 | # define YYLEXyylex () yylex () |
| 1106 | #endif |
| 1107 | |
| 1108 | /* Enable debugging if requested. */ |
| 1109 | #if YYDEBUG0 |
| 1110 | |
| 1111 | # ifndef YYFPRINTF |
| 1112 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 1113 | # define YYFPRINTF fprintf |
| 1114 | # endif |
| 1115 | |
| 1116 | # define YYDPRINTF(Args) \ |
| 1117 | do { \ |
| 1118 | if (yydebug) \ |
| 1119 | YYFPRINTF Args; \ |
| 1120 | } while (YYID (0)(0)) |
| 1121 | |
| 1122 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 1123 | do { \ |
| 1124 | if (yydebug) \ |
| 1125 | { \ |
| 1126 | YYFPRINTF (stderrstderr, "%s ", Title); \ |
| 1127 | yy_symbol_print (stderrstderr, \ |
| 1128 | Type, Value); \ |
| 1129 | YYFPRINTF (stderrstderr, "\n"); \ |
| 1130 | } \ |
| 1131 | } while (YYID (0)(0)) |
| 1132 | |
| 1133 | |
| 1134 | /*--------------------------------. |
| 1135 | | Print this symbol on YYOUTPUT. | |
| 1136 | `--------------------------------*/ |
| 1137 | |
| 1138 | /*ARGSUSED*/ |
| 1139 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1140 | || defined __cplusplus || defined _MSC_VER) |
| 1141 | static void |
| 1142 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1143 | #else |
| 1144 | static void |
| 1145 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 1146 | FILE *yyoutput; |
| 1147 | int yytype; |
| 1148 | YYSTYPE const * const yyvaluep; |
| 1149 | #endif |
| 1150 | { |
| 1151 | if (!yyvaluep) |
| 1152 | return; |
| 1153 | # ifdef YYPRINT |
| 1154 | if (yytype < YYNTOKENS75) |
| 1155 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 1156 | # else |
| 1157 | YYUSE (yyoutput)((void) (yyoutput)); |
| 1158 | # endif |
| 1159 | switch (yytype) |
| 1160 | { |
| 1161 | default: |
| 1162 | break; |
| 1163 | } |
| 1164 | } |
| 1165 | |
| 1166 | |
| 1167 | /*--------------------------------. |
| 1168 | | Print this symbol on YYOUTPUT. | |
| 1169 | `--------------------------------*/ |
| 1170 | |
| 1171 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1172 | || defined __cplusplus || defined _MSC_VER) |
| 1173 | static void |
| 1174 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 1175 | #else |
| 1176 | static void |
| 1177 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 1178 | FILE *yyoutput; |
| 1179 | int yytype; |
| 1180 | YYSTYPE const * const yyvaluep; |
| 1181 | #endif |
| 1182 | { |
| 1183 | if (yytype < YYNTOKENS75) |
| 1184 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 1185 | else |
| 1186 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 1187 | |
| 1188 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 1189 | YYFPRINTF (yyoutput, ")"); |
| 1190 | } |
| 1191 | |
| 1192 | /*------------------------------------------------------------------. |
| 1193 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 1194 | | TOP (included). | |
| 1195 | `------------------------------------------------------------------*/ |
| 1196 | |
| 1197 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1198 | || defined __cplusplus || defined _MSC_VER) |
| 1199 | static void |
| 1200 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
| 1201 | #else |
| 1202 | static void |
| 1203 | yy_stack_print (yybottom, yytop) |
| 1204 | yytype_int16 *yybottom; |
| 1205 | yytype_int16 *yytop; |
| 1206 | #endif |
| 1207 | { |
| 1208 | YYFPRINTF (stderrstderr, "Stack now"); |
| 1209 | for (; yybottom <= yytop; yybottom++) |
| 1210 | { |
| 1211 | int yybot = *yybottom; |
| 1212 | YYFPRINTF (stderrstderr, " %d", yybot); |
| 1213 | } |
| 1214 | YYFPRINTF (stderrstderr, "\n"); |
| 1215 | } |
| 1216 | |
| 1217 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 1218 | do { \ |
| 1219 | if (yydebug) \ |
| 1220 | yy_stack_print ((Bottom), (Top)); \ |
| 1221 | } while (YYID (0)(0)) |
| 1222 | |
| 1223 | |
| 1224 | /*------------------------------------------------. |
| 1225 | | Report that the YYRULE is going to be reduced. | |
| 1226 | `------------------------------------------------*/ |
| 1227 | |
| 1228 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1229 | || defined __cplusplus || defined _MSC_VER) |
| 1230 | static void |
| 1231 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
| 1232 | #else |
| 1233 | static void |
| 1234 | yy_reduce_print (yyvsp, yyrule) |
| 1235 | YYSTYPE *yyvsp; |
| 1236 | int yyrule; |
| 1237 | #endif |
| 1238 | { |
| 1239 | int yynrhs = yyr2[yyrule]; |
| 1240 | int yyi; |
| 1241 | unsigned long int yylno = yyrline[yyrule]; |
| 1242 | YYFPRINTF (stderrstderr, "Reducing stack by rule %d (line %lu):\n", |
| 1243 | yyrule - 1, yylno); |
| 1244 | /* The symbols being reduced. */ |
| 1245 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 1246 | { |
| 1247 | YYFPRINTF (stderrstderr, " $%d = ", yyi + 1); |
| 1248 | yy_symbol_print (stderrstderr, yyrhs[yyprhs[yyrule] + yyi], |
| 1249 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 1250 | ); |
| 1251 | YYFPRINTF (stderrstderr, "\n"); |
| 1252 | } |
| 1253 | } |
| 1254 | |
| 1255 | # define YY_REDUCE_PRINT(Rule) \ |
| 1256 | do { \ |
| 1257 | if (yydebug) \ |
| 1258 | yy_reduce_print (yyvsp, Rule); \ |
| 1259 | } while (YYID (0)(0)) |
| 1260 | |
| 1261 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 1262 | multiple parsers can coexist. */ |
| 1263 | int yydebug; |
| 1264 | #else /* !YYDEBUG */ |
| 1265 | # define YYDPRINTF(Args) |
| 1266 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 1267 | # define YY_STACK_PRINT(Bottom, Top) |
| 1268 | # define YY_REDUCE_PRINT(Rule) |
| 1269 | #endif /* !YYDEBUG */ |
| 1270 | |
| 1271 | |
| 1272 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 1273 | #ifndef YYINITDEPTH200 |
| 1274 | # define YYINITDEPTH200 200 |
| 1275 | #endif |
| 1276 | |
| 1277 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 1278 | if the built-in stack extension method is used). |
| 1279 | |
| 1280 | Do not make this value too large; the results are undefined if |
| 1281 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 1282 | evaluated with infinite-precision integer arithmetic. */ |
| 1283 | |
| 1284 | #ifndef YYMAXDEPTH10000 |
| 1285 | # define YYMAXDEPTH10000 10000 |
| 1286 | #endif |
| 1287 | |
| 1288 | |
| 1289 | |
| 1290 | #if YYERROR_VERBOSE0 |
| 1291 | |
| 1292 | # ifndef yystrlen |
| 1293 | # if defined __GLIBC__2 && defined _STRING_H1 |
| 1294 | # define yystrlen strlen |
| 1295 | # else |
| 1296 | /* Return the length of YYSTR. */ |
| 1297 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1298 | || defined __cplusplus || defined _MSC_VER) |
| 1299 | static YYSIZE_Tlong unsigned int |
| 1300 | yystrlen (const char *yystr) |
| 1301 | #else |
| 1302 | static YYSIZE_Tlong unsigned int |
| 1303 | yystrlen (yystr) |
| 1304 | const char *yystr; |
| 1305 | #endif |
| 1306 | { |
| 1307 | YYSIZE_Tlong unsigned int yylen; |
| 1308 | for (yylen = 0; yystr[yylen]; yylen++) |
| 1309 | continue; |
| 1310 | return yylen; |
| 1311 | } |
| 1312 | # endif |
| 1313 | # endif |
| 1314 | |
| 1315 | # ifndef yystpcpy |
| 1316 | # if defined __GLIBC__2 && defined _STRING_H1 && defined _GNU_SOURCE1 |
| 1317 | # define yystpcpy stpcpy |
| 1318 | # else |
| 1319 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 1320 | YYDEST. */ |
| 1321 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1322 | || defined __cplusplus || defined _MSC_VER) |
| 1323 | static char * |
| 1324 | yystpcpy (char *yydest, const char *yysrc) |
| 1325 | #else |
| 1326 | static char * |
| 1327 | yystpcpy (yydest, yysrc) |
| 1328 | char *yydest; |
| 1329 | const char *yysrc; |
| 1330 | #endif |
| 1331 | { |
| 1332 | char *yyd = yydest; |
| 1333 | const char *yys = yysrc; |
| 1334 | |
| 1335 | while ((*yyd++ = *yys++) != '\0') |
| 1336 | continue; |
| 1337 | |
| 1338 | return yyd - 1; |
| 1339 | } |
| 1340 | # endif |
| 1341 | # endif |
| 1342 | |
| 1343 | # ifndef yytnamerr |
| 1344 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 1345 | quotes and backslashes, so that it's suitable for yyerror. The |
| 1346 | heuristic is that double-quoting is unnecessary unless the string |
| 1347 | contains an apostrophe, a comma, or backslash (other than |
| 1348 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 1349 | null, do not copy; instead, return the length of what the result |
| 1350 | would have been. */ |
| 1351 | static YYSIZE_Tlong unsigned int |
| 1352 | yytnamerr (char *yyres, const char *yystr) |
| 1353 | { |
| 1354 | if (*yystr == '"') |
| 1355 | { |
| 1356 | YYSIZE_Tlong unsigned int yyn = 0; |
| 1357 | char const *yyp = yystr; |
| 1358 | |
| 1359 | for (;;) |
| 1360 | switch (*++yyp) |
| 1361 | { |
| 1362 | case '\'': |
| 1363 | case ',': |
| 1364 | goto do_not_strip_quotes; |
| 1365 | |
| 1366 | case '\\': |
| 1367 | if (*++yyp != '\\') |
| 1368 | goto do_not_strip_quotes; |
| 1369 | /* Fall through. */ |
| 1370 | default: |
| 1371 | if (yyres) |
| 1372 | yyres[yyn] = *yyp; |
| 1373 | yyn++; |
| 1374 | break; |
| 1375 | |
| 1376 | case '"': |
| 1377 | if (yyres) |
| 1378 | yyres[yyn] = '\0'; |
| 1379 | return yyn; |
| 1380 | } |
| 1381 | do_not_strip_quotes: ; |
| 1382 | } |
| 1383 | |
| 1384 | if (! yyres) |
| 1385 | return yystrlen (yystr); |
| 1386 | |
| 1387 | return yystpcpy (yyres, yystr) - yyres; |
| 1388 | } |
| 1389 | # endif |
| 1390 | |
| 1391 | /* Copy into YYRESULT an error message about the unexpected token |
| 1392 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 1393 | including the terminating null byte. If YYRESULT is null, do not |
| 1394 | copy anything; just return the number of bytes that would be |
| 1395 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 1396 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 1397 | size calculation. */ |
| 1398 | static YYSIZE_Tlong unsigned int |
| 1399 | yysyntax_error (char *yyresult, int yystate, int yychar) |
| 1400 | { |
| 1401 | int yyn = yypact[yystate]; |
| 1402 | |
| 1403 | if (! (YYPACT_NINF-159 < yyn && yyn <= YYLAST339)) |
| 1404 | return 0; |
| 1405 | else |
| 1406 | { |
| 1407 | int yytype = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 329 ? yytranslate[yychar] : 2); |
| 1408 | YYSIZE_Tlong unsigned int yysize0 = yytnamerr (0, yytname[yytype]); |
| 1409 | YYSIZE_Tlong unsigned int yysize = yysize0; |
| 1410 | YYSIZE_Tlong unsigned int yysize1; |
| 1411 | int yysize_overflow = 0; |
| 1412 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1413 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1414 | int yyx; |
| 1415 | |
| 1416 | # if 0 |
| 1417 | /* This is so xgettext sees the translatable formats that are |
| 1418 | constructed on the fly. */ |
| 1419 | YY_("syntax error, unexpected %s")"syntax error, unexpected %s"; |
| 1420 | YY_("syntax error, unexpected %s, expecting %s")"syntax error, unexpected %s, expecting %s"; |
| 1421 | YY_("syntax error, unexpected %s, expecting %s or %s")"syntax error, unexpected %s, expecting %s or %s"; |
| 1422 | YY_("syntax error, unexpected %s, expecting %s or %s or %s")"syntax error, unexpected %s, expecting %s or %s or %s"; |
| 1423 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")"syntax error, unexpected %s, expecting %s or %s or %s or %s"; |
| 1424 | # endif |
| 1425 | char *yyfmt; |
| 1426 | char const *yyf; |
| 1427 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 1428 | static char const yyexpecting[] = ", expecting %s"; |
| 1429 | static char const yyor[] = " or %s"; |
| 1430 | char yyformat[sizeof yyunexpected |
| 1431 | + sizeof yyexpecting - 1 |
| 1432 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 1433 | * (sizeof yyor - 1))]; |
| 1434 | char const *yyprefix = yyexpecting; |
| 1435 | |
| 1436 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1437 | YYCHECK. */ |
| 1438 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1439 | |
| 1440 | /* Stay within bounds of both yycheck and yytname. */ |
| 1441 | int yychecklim = YYLAST339 - yyn + 1; |
| 1442 | int yyxend = yychecklim < YYNTOKENS75 ? yychecklim : YYNTOKENS75; |
| 1443 | int yycount = 1; |
| 1444 | |
| 1445 | yyarg[0] = yytname[yytype]; |
| 1446 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 1447 | |
| 1448 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1449 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR1) |
| 1450 | { |
| 1451 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1452 | { |
| 1453 | yycount = 1; |
| 1454 | yysize = yysize0; |
| 1455 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 1456 | break; |
| 1457 | } |
| 1458 | yyarg[yycount++] = yytname[yyx]; |
| 1459 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 1460 | yysize_overflow |= (yysize1 < yysize); |
| 1461 | yysize = yysize1; |
| 1462 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 1463 | yyprefix = yyor; |
| 1464 | } |
| 1465 | |
| 1466 | yyf = YY_(yyformat)yyformat; |
| 1467 | yysize1 = yysize + yystrlen (yyf); |
| 1468 | yysize_overflow |= (yysize1 < yysize); |
| 1469 | yysize = yysize1; |
| 1470 | |
| 1471 | if (yysize_overflow) |
| 1472 | return YYSIZE_MAXIMUM((long unsigned int) -1); |
| 1473 | |
| 1474 | if (yyresult) |
| 1475 | { |
| 1476 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1477 | Don't have undefined behavior even if the translation |
| 1478 | produced a string with the wrong number of "%s"s. */ |
| 1479 | char *yyp = yyresult; |
| 1480 | int yyi = 0; |
| 1481 | while ((*yyp = *yyf) != '\0') |
| 1482 | { |
| 1483 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 1484 | { |
| 1485 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1486 | yyf += 2; |
| 1487 | } |
| 1488 | else |
| 1489 | { |
| 1490 | yyp++; |
| 1491 | yyf++; |
| 1492 | } |
| 1493 | } |
| 1494 | } |
| 1495 | return yysize; |
| 1496 | } |
| 1497 | } |
| 1498 | #endif /* YYERROR_VERBOSE */ |
| 1499 | |
| 1500 | |
| 1501 | /*-----------------------------------------------. |
| 1502 | | Release the memory associated to this symbol. | |
| 1503 | `-----------------------------------------------*/ |
| 1504 | |
| 1505 | /*ARGSUSED*/ |
| 1506 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1507 | || defined __cplusplus || defined _MSC_VER) |
| 1508 | static void |
| 1509 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
| 1510 | #else |
| 1511 | static void |
| 1512 | yydestruct (yymsg, yytype, yyvaluep) |
| 1513 | const char *yymsg; |
| 1514 | int yytype; |
| 1515 | YYSTYPE *yyvaluep; |
| 1516 | #endif |
| 1517 | { |
| 1518 | YYUSE (yyvaluep)((void) (yyvaluep)); |
| 1519 | |
| 1520 | if (!yymsg) |
| 1521 | yymsg = "Deleting"; |
Value stored to 'yymsg' is never read | |
| 1522 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1523 | |
| 1524 | switch (yytype) |
| 1525 | { |
| 1526 | |
| 1527 | default: |
| 1528 | break; |
| 1529 | } |
| 1530 | } |
| 1531 | |
| 1532 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 1533 | #ifdef YYPARSE_PARAM |
| 1534 | #if defined __STDC__1 || defined __cplusplus |
| 1535 | int yyparse (void *YYPARSE_PARAM); |
| 1536 | #else |
| 1537 | int yyparse (); |
| 1538 | #endif |
| 1539 | #else /* ! YYPARSE_PARAM */ |
| 1540 | #if defined __STDC__1 || defined __cplusplus |
| 1541 | int yyparse (void); |
| 1542 | #else |
| 1543 | int yyparse (); |
| 1544 | #endif |
| 1545 | #endif /* ! YYPARSE_PARAM */ |
| 1546 | |
| 1547 | |
| 1548 | /* The lookahead symbol. */ |
| 1549 | int yychar; |
| 1550 | |
| 1551 | /* The semantic value of the lookahead symbol. */ |
| 1552 | YYSTYPE yylval; |
| 1553 | |
| 1554 | /* Number of syntax errors so far. */ |
| 1555 | int yynerrs; |
| 1556 | |
| 1557 | |
| 1558 | |
| 1559 | /*-------------------------. |
| 1560 | | yyparse or yypush_parse. | |
| 1561 | `-------------------------*/ |
| 1562 | |
| 1563 | #ifdef YYPARSE_PARAM |
| 1564 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1565 | || defined __cplusplus || defined _MSC_VER) |
| 1566 | int |
| 1567 | yyparse (void *YYPARSE_PARAM) |
| 1568 | #else |
| 1569 | int |
| 1570 | yyparse (YYPARSE_PARAM) |
| 1571 | void *YYPARSE_PARAM; |
| 1572 | #endif |
| 1573 | #else /* ! YYPARSE_PARAM */ |
| 1574 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1575 | || defined __cplusplus || defined _MSC_VER) |
| 1576 | int |
| 1577 | yyparse (void) |
| 1578 | #else |
| 1579 | int |
| 1580 | yyparse () |
| 1581 | |
| 1582 | #endif |
| 1583 | #endif |
| 1584 | { |
| 1585 | |
| 1586 | |
| 1587 | int yystate; |
| 1588 | /* Number of tokens to shift before error messages enabled. */ |
| 1589 | int yyerrstatus; |
| 1590 | |
| 1591 | /* The stacks and their tools: |
| 1592 | `yyss': related to states. |
| 1593 | `yyvs': related to semantic values. |
| 1594 | |
| 1595 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 1596 | to reallocate them elsewhere. */ |
| 1597 | |
| 1598 | /* The state stack. */ |
| 1599 | yytype_int16 yyssa[YYINITDEPTH200]; |
| 1600 | yytype_int16 *yyss; |
| 1601 | yytype_int16 *yyssp; |
| 1602 | |
| 1603 | /* The semantic value stack. */ |
| 1604 | YYSTYPE yyvsa[YYINITDEPTH200]; |
| 1605 | YYSTYPE *yyvs; |
| 1606 | YYSTYPE *yyvsp; |
| 1607 | |
| 1608 | YYSIZE_Tlong unsigned int yystacksize; |
| 1609 | |
| 1610 | int yyn; |
| 1611 | int yyresult; |
| 1612 | /* Lookahead token as an internal (translated) token number. */ |
| 1613 | int yytoken; |
| 1614 | /* The variables used to return semantic value and location from the |
| 1615 | action routines. */ |
| 1616 | YYSTYPE yyval; |
| 1617 | |
| 1618 | #if YYERROR_VERBOSE0 |
| 1619 | /* Buffer for error messages, and its allocated size. */ |
| 1620 | char yymsgbuf[128]; |
| 1621 | char *yymsg = yymsgbuf; |
| 1622 | YYSIZE_Tlong unsigned int yymsg_alloc = sizeof yymsgbuf; |
| 1623 | #endif |
| 1624 | |
| 1625 | #define YYPOPSTACK(N)(yyvsp -= (N), yyssp -= (N)) (yyvsp -= (N), yyssp -= (N)) |
| 1626 | |
| 1627 | /* The number of symbols on the RHS of the reduced rule. |
| 1628 | Keep to zero when no symbol should be popped. */ |
| 1629 | int yylen = 0; |
| 1630 | |
| 1631 | yytoken = 0; |
| 1632 | yyss = yyssa; |
| 1633 | yyvs = yyvsa; |
| 1634 | yystacksize = YYINITDEPTH200; |
| 1635 | |
| 1636 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 1637 | |
| 1638 | yystate = 0; |
| 1639 | yyerrstatus = 0; |
| 1640 | yynerrs = 0; |
| 1641 | yychar = YYEMPTY(-2); /* Cause a token to be read. */ |
| 1642 | |
| 1643 | /* Initialize stack pointers. |
| 1644 | Waste one element of value and location stack |
| 1645 | so that they stay on the same level as the state stack. |
| 1646 | The wasted elements are never initialized. */ |
| 1647 | yyssp = yyss; |
| 1648 | yyvsp = yyvs; |
| 1649 | |
| 1650 | goto yysetstate; |
| 1651 | |
| 1652 | /*------------------------------------------------------------. |
| 1653 | | yynewstate -- Push a new state, which is found in yystate. | |
| 1654 | `------------------------------------------------------------*/ |
| 1655 | yynewstate: |
| 1656 | /* In all cases, when you get here, the value and location stacks |
| 1657 | have just been pushed. So pushing a state here evens the stacks. */ |
| 1658 | yyssp++; |
| 1659 | |
| 1660 | yysetstate: |
| 1661 | *yyssp = yystate; |
| 1662 | |
| 1663 | if (yyss + yystacksize - 1 <= yyssp) |
| 1664 | { |
| 1665 | /* Get the current used size of the three stacks, in elements. */ |
| 1666 | YYSIZE_Tlong unsigned int yysize = yyssp - yyss + 1; |
| 1667 | |
| 1668 | #ifdef yyoverflow |
| 1669 | { |
| 1670 | /* Give user a chance to reallocate the stack. Use copies of |
| 1671 | these so that the &'s don't force the real ones into |
| 1672 | memory. */ |
| 1673 | YYSTYPE *yyvs1 = yyvs; |
| 1674 | yytype_int16 *yyss1 = yyss; |
| 1675 | |
| 1676 | /* Each stack pointer address is followed by the size of the |
| 1677 | data in use in that stack, in bytes. This used to be a |
| 1678 | conditional around just the two extra args, but that might |
| 1679 | be undefined if yyoverflow is a macro. */ |
| 1680 | yyoverflow (YY_("memory exhausted")"memory exhausted", |
| 1681 | &yyss1, yysize * sizeof (*yyssp), |
| 1682 | &yyvs1, yysize * sizeof (*yyvsp), |
| 1683 | &yystacksize); |
| 1684 | |
| 1685 | yyss = yyss1; |
| 1686 | yyvs = yyvs1; |
| 1687 | } |
| 1688 | #else /* no yyoverflow */ |
| 1689 | # ifndef YYSTACK_RELOCATE |
| 1690 | goto yyexhaustedlab; |
| 1691 | # else |
| 1692 | /* Extend the stack our own way. */ |
| 1693 | if (YYMAXDEPTH10000 <= yystacksize) |
| 1694 | goto yyexhaustedlab; |
| 1695 | yystacksize *= 2; |
| 1696 | if (YYMAXDEPTH10000 < yystacksize) |
| 1697 | yystacksize = YYMAXDEPTH10000; |
| 1698 | |
| 1699 | { |
| 1700 | yytype_int16 *yyss1 = yyss; |
| 1701 | union yyalloc *yyptr = |
| 1702 | (union yyalloc *) YYSTACK_ALLOCmalloc (YYSTACK_BYTES (yystacksize)((yystacksize) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof (union yyalloc) - 1))); |
| 1703 | if (! yyptr) |
| 1704 | goto yyexhaustedlab; |
| 1705 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1706 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
| 1707 | # undef YYSTACK_RELOCATE |
| 1708 | if (yyss1 != yyssa) |
| 1709 | YYSTACK_FREEfree (yyss1); |
| 1710 | } |
| 1711 | # endif |
| 1712 | #endif /* no yyoverflow */ |
| 1713 | |
| 1714 | yyssp = yyss + yysize - 1; |
| 1715 | yyvsp = yyvs + yysize - 1; |
| 1716 | |
| 1717 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 1718 | (unsigned long int) yystacksize)); |
| 1719 | |
| 1720 | if (yyss + yystacksize - 1 <= yyssp) |
| 1721 | YYABORTgoto yyabortlab; |
| 1722 | } |
| 1723 | |
| 1724 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 1725 | |
| 1726 | if (yystate == YYFINAL3) |
| 1727 | YYACCEPTgoto yyacceptlab; |
| 1728 | |
| 1729 | goto yybackup; |
| 1730 | |
| 1731 | /*-----------. |
| 1732 | | yybackup. | |
| 1733 | `-----------*/ |
| 1734 | yybackup: |
| 1735 | |
| 1736 | /* Do appropriate processing given the current state. Read a |
| 1737 | lookahead token if we need one and don't already have one. */ |
| 1738 | |
| 1739 | /* First try to decide what to do without reference to lookahead token. */ |
| 1740 | yyn = yypact[yystate]; |
| 1741 | if (yyn == YYPACT_NINF-159) |
| 1742 | goto yydefault; |
| 1743 | |
| 1744 | /* Not known => get a lookahead token if don't already have one. */ |
| 1745 | |
| 1746 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 1747 | if (yychar == YYEMPTY(-2)) |
| 1748 | { |
| 1749 | YYDPRINTF ((stderr, "Reading a token: ")); |
| 1750 | yychar = YYLEXyylex (); |
| 1751 | } |
| 1752 | |
| 1753 | if (yychar <= YYEOF0) |
| 1754 | { |
| 1755 | yychar = yytoken = YYEOF0; |
| 1756 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 1757 | } |
| 1758 | else |
| 1759 | { |
| 1760 | yytoken = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 329 ? yytranslate[yychar] : 2); |
| 1761 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 1762 | } |
| 1763 | |
| 1764 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 1765 | detect an error, take that action. */ |
| 1766 | yyn += yytoken; |
| 1767 | if (yyn < 0 || YYLAST339 < yyn || yycheck[yyn] != yytoken) |
| 1768 | goto yydefault; |
| 1769 | yyn = yytable[yyn]; |
| 1770 | if (yyn <= 0) |
| 1771 | { |
| 1772 | if (yyn == 0 || yyn == YYTABLE_NINF-161) |
| 1773 | goto yyerrlab; |
| 1774 | yyn = -yyn; |
| 1775 | goto yyreduce; |
| 1776 | } |
| 1777 | |
| 1778 | /* Count tokens shifted since error; after three, turn off error |
| 1779 | status. */ |
| 1780 | if (yyerrstatus) |
| 1781 | yyerrstatus--; |
| 1782 | |
| 1783 | /* Shift the lookahead token. */ |
| 1784 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 1785 | |
| 1786 | /* Discard the shifted token. */ |
| 1787 | yychar = YYEMPTY(-2); |
| 1788 | |
| 1789 | yystate = yyn; |
| 1790 | *++yyvsp = yylval; |
| 1791 | |
| 1792 | goto yynewstate; |
| 1793 | |
| 1794 | |
| 1795 | /*-----------------------------------------------------------. |
| 1796 | | yydefault -- do the default action for the current state. | |
| 1797 | `-----------------------------------------------------------*/ |
| 1798 | yydefault: |
| 1799 | yyn = yydefact[yystate]; |
| 1800 | if (yyn == 0) |
| 1801 | goto yyerrlab; |
| 1802 | goto yyreduce; |
| 1803 | |
| 1804 | |
| 1805 | /*-----------------------------. |
| 1806 | | yyreduce -- Do a reduction. | |
| 1807 | `-----------------------------*/ |
| 1808 | yyreduce: |
| 1809 | /* yyn is the number of a rule to reduce with. */ |
| 1810 | yylen = yyr2[yyn]; |
| 1811 | |
| 1812 | /* If YYLEN is nonzero, implement the default value of the action: |
| 1813 | `$$ = $1'. |
| 1814 | |
| 1815 | Otherwise, the following line sets YYVAL to garbage. |
| 1816 | This behavior is undocumented and Bison |
| 1817 | users should not rely upon it. Assigning to YYVAL |
| 1818 | unconditionally makes the parser a bit smaller, and it avoids a |
| 1819 | GCC warning that YYVAL may be used uninitialized. */ |
| 1820 | yyval = yyvsp[1-yylen]; |
| 1821 | |
| 1822 | |
| 1823 | YY_REDUCE_PRINT (yyn); |
| 1824 | switch (yyn) |
| 1825 | { |
| 1826 | case 10: |
| 1827 | |
| 1828 | /* Line 1464 of yacc.c */ |
| 1829 | #line 146 "gram.y" |
| 1830 | { AddIconRegion((yyvsp[(2) - (6)].ptr), (yyvsp[(3) - (6)].num), (yyvsp[(4) - (6)].num), (yyvsp[(5) - (6)].num), (yyvsp[(6) - (6)].num)); } |
| 1831 | break; |
| 1832 | |
| 1833 | case 11: |
| 1834 | |
| 1835 | /* Line 1464 of yacc.c */ |
| 1836 | #line 147 "gram.y" |
| 1837 | { if (Scr->FirstTime) |
| 1838 | { |
| 1839 | Scr->iconmgr.geometry=(yyvsp[(2) - (3)].ptr); |
| 1840 | Scr->iconmgr.columns=(yyvsp[(3) - (3)].num); |
| 1841 | } |
| 1842 | } |
| 1843 | break; |
| 1844 | |
| 1845 | case 12: |
| 1846 | |
| 1847 | /* Line 1464 of yacc.c */ |
| 1848 | #line 153 "gram.y" |
| 1849 | { if (Scr->FirstTime) |
| 1850 | Scr->iconmgr.geometry = (yyvsp[(2) - (2)].ptr); |
| 1851 | } |
| 1852 | break; |
| 1853 | |
| 1854 | case 13: |
| 1855 | |
| 1856 | /* Line 1464 of yacc.c */ |
| 1857 | #line 156 "gram.y" |
| 1858 | { if (Scr->FirstTime) |
| 1859 | { |
| 1860 | Scr->DoZoom = TRUE1; |
| 1861 | Scr->ZoomCount = (yyvsp[(2) - (2)].num); |
| 1862 | } |
| 1863 | } |
| 1864 | break; |
| 1865 | |
| 1866 | case 14: |
| 1867 | |
| 1868 | /* Line 1464 of yacc.c */ |
| 1869 | #line 162 "gram.y" |
| 1870 | { if (Scr->FirstTime) |
| 1871 | Scr->DoZoom = TRUE1; } |
| 1872 | break; |
| 1873 | |
| 1874 | case 15: |
| 1875 | |
| 1876 | /* Line 1464 of yacc.c */ |
| 1877 | #line 164 "gram.y" |
| 1878 | {} |
| 1879 | break; |
| 1880 | |
| 1881 | case 16: |
| 1882 | |
| 1883 | /* Line 1464 of yacc.c */ |
| 1884 | #line 165 "gram.y" |
| 1885 | {} |
| 1886 | break; |
| 1887 | |
| 1888 | case 17: |
| 1889 | |
| 1890 | /* Line 1464 of yacc.c */ |
| 1891 | #line 166 "gram.y" |
| 1892 | { list = &Scr->IconifyByUn; } |
| 1893 | break; |
| 1894 | |
| 1895 | case 19: |
| 1896 | |
| 1897 | /* Line 1464 of yacc.c */ |
| 1898 | #line 168 "gram.y" |
| 1899 | { if (Scr->FirstTime) |
| 1900 | Scr->IconifyByUnmapping = TRUE1; } |
| 1901 | break; |
| 1902 | |
| 1903 | case 20: |
| 1904 | |
| 1905 | /* Line 1464 of yacc.c */ |
| 1906 | #line 170 "gram.y" |
| 1907 | { |
| 1908 | GotTitleButton ((yyvsp[(2) - (4)].ptr), (yyvsp[(4) - (4)].num), False0); |
| 1909 | } |
| 1910 | break; |
| 1911 | |
| 1912 | case 21: |
| 1913 | |
| 1914 | /* Line 1464 of yacc.c */ |
| 1915 | #line 173 "gram.y" |
| 1916 | { |
| 1917 | GotTitleButton ((yyvsp[(2) - (4)].ptr), (yyvsp[(4) - (4)].num), True1); |
| 1918 | } |
| 1919 | break; |
| 1920 | |
| 1921 | case 22: |
| 1922 | |
| 1923 | /* Line 1464 of yacc.c */ |
| 1924 | #line 176 "gram.y" |
| 1925 | { root = GetRoot((yyvsp[(2) - (2)].ptr), NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 1926 | Scr->Mouse[(yyvsp[(1) - (2)].num)][C_ROOT3][0].func = F_MENU101; |
| 1927 | Scr->Mouse[(yyvsp[(1) - (2)].num)][C_ROOT3][0].menu = root; |
| 1928 | } |
| 1929 | break; |
| 1930 | |
| 1931 | case 23: |
| 1932 | |
| 1933 | /* Line 1464 of yacc.c */ |
| 1934 | #line 180 "gram.y" |
| 1935 | { Scr->Mouse[(yyvsp[(1) - (2)].num)][C_ROOT3][0].func = (yyvsp[(2) - (2)].num); |
| 1936 | if ((yyvsp[(2) - (2)].num) == F_MENU101) |
| 1937 | { |
| 1938 | pull->prev = NULL((void*)0); |
| 1939 | Scr->Mouse[(yyvsp[(1) - (2)].num)][C_ROOT3][0].menu = pull; |
| 1940 | } |
| 1941 | else |
| 1942 | { |
| 1943 | root = GetRoot(TWM_ROOT"bLoB_GoOp",NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0))); |
| 1944 | Scr->Mouse[(yyvsp[(1) - (2)].num)][C_ROOT3][0].item = |
| 1945 | AddToMenu(root,"x",Action, |
| 1946 | NULL((void*)0),(yyvsp[(2) - (2)].num),NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0))); |
| 1947 | } |
| 1948 | Action = ""; |
| 1949 | pull = NULL((void*)0); |
| 1950 | } |
| 1951 | break; |
| 1952 | |
| 1953 | case 24: |
| 1954 | |
| 1955 | /* Line 1464 of yacc.c */ |
| 1956 | #line 196 "gram.y" |
| 1957 | { GotKey((yyvsp[(1) - (2)].ptr), (yyvsp[(2) - (2)].num)); } |
| 1958 | break; |
| 1959 | |
| 1960 | case 25: |
| 1961 | |
| 1962 | /* Line 1464 of yacc.c */ |
| 1963 | #line 197 "gram.y" |
| 1964 | { GotButton((yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].num)); } |
| 1965 | break; |
| 1966 | |
| 1967 | case 26: |
| 1968 | |
| 1969 | /* Line 1464 of yacc.c */ |
| 1970 | #line 198 "gram.y" |
| 1971 | { list = &Scr->DontIconify; } |
| 1972 | break; |
| 1973 | |
| 1974 | case 28: |
| 1975 | |
| 1976 | /* Line 1464 of yacc.c */ |
| 1977 | #line 200 "gram.y" |
| 1978 | { list = &Scr->IconMgrNoShow; } |
| 1979 | break; |
| 1980 | |
| 1981 | case 30: |
| 1982 | |
| 1983 | /* Line 1464 of yacc.c */ |
| 1984 | #line 202 "gram.y" |
| 1985 | { Scr->IconManagerDontShow = TRUE1; } |
| 1986 | break; |
| 1987 | |
| 1988 | case 31: |
| 1989 | |
| 1990 | /* Line 1464 of yacc.c */ |
| 1991 | #line 203 "gram.y" |
| 1992 | { list = &Scr->IconMgrs; } |
| 1993 | break; |
| 1994 | |
| 1995 | case 33: |
| 1996 | |
| 1997 | /* Line 1464 of yacc.c */ |
| 1998 | #line 205 "gram.y" |
| 1999 | { list = &Scr->IconMgrShow; } |
| 2000 | break; |
| 2001 | |
| 2002 | case 35: |
| 2003 | |
| 2004 | /* Line 1464 of yacc.c */ |
| 2005 | #line 207 "gram.y" |
| 2006 | { list = &Scr->NoTitleHighlight; } |
| 2007 | break; |
| 2008 | |
| 2009 | case 37: |
| 2010 | |
| 2011 | /* Line 1464 of yacc.c */ |
| 2012 | #line 209 "gram.y" |
| 2013 | { if (Scr->FirstTime) |
| 2014 | Scr->TitleHighlight = FALSE0; } |
| 2015 | break; |
| 2016 | |
| 2017 | case 38: |
| 2018 | |
| 2019 | /* Line 1464 of yacc.c */ |
| 2020 | #line 211 "gram.y" |
| 2021 | { list = &Scr->NoHighlight; } |
| 2022 | break; |
| 2023 | |
| 2024 | case 40: |
| 2025 | |
| 2026 | /* Line 1464 of yacc.c */ |
| 2027 | #line 213 "gram.y" |
| 2028 | { if (Scr->FirstTime) |
| 2029 | Scr->Highlight = FALSE0; } |
| 2030 | break; |
| 2031 | |
| 2032 | case 41: |
| 2033 | |
| 2034 | /* Line 1464 of yacc.c */ |
| 2035 | #line 215 "gram.y" |
| 2036 | { list = &Scr->NoStackModeL; } |
| 2037 | break; |
| 2038 | |
| 2039 | case 43: |
| 2040 | |
| 2041 | /* Line 1464 of yacc.c */ |
| 2042 | #line 217 "gram.y" |
| 2043 | { if (Scr->FirstTime) |
| 2044 | Scr->StackMode = FALSE0; } |
| 2045 | break; |
| 2046 | |
| 2047 | case 44: |
| 2048 | |
| 2049 | /* Line 1464 of yacc.c */ |
| 2050 | #line 219 "gram.y" |
| 2051 | { list = &Scr->NoTitle; } |
| 2052 | break; |
| 2053 | |
| 2054 | case 46: |
| 2055 | |
| 2056 | /* Line 1464 of yacc.c */ |
| 2057 | #line 221 "gram.y" |
| 2058 | { if (Scr->FirstTime) |
| 2059 | Scr->NoTitlebar = TRUE1; } |
| 2060 | break; |
| 2061 | |
| 2062 | case 47: |
| 2063 | |
| 2064 | /* Line 1464 of yacc.c */ |
| 2065 | #line 223 "gram.y" |
| 2066 | { list = &Scr->MakeTitle; } |
| 2067 | break; |
| 2068 | |
| 2069 | case 49: |
| 2070 | |
| 2071 | /* Line 1464 of yacc.c */ |
| 2072 | #line 225 "gram.y" |
| 2073 | { list = &Scr->StartIconified; } |
| 2074 | break; |
| 2075 | |
| 2076 | case 51: |
| 2077 | |
| 2078 | /* Line 1464 of yacc.c */ |
| 2079 | #line 227 "gram.y" |
| 2080 | { list = &Scr->AutoRaise; } |
| 2081 | break; |
| 2082 | |
| 2083 | case 53: |
| 2084 | |
| 2085 | /* Line 1464 of yacc.c */ |
| 2086 | #line 229 "gram.y" |
| 2087 | { |
| 2088 | root = GetRoot((yyvsp[(2) - (7)].ptr), (yyvsp[(4) - (7)].ptr), (yyvsp[(6) - (7)].ptr)); } |
| 2089 | break; |
| 2090 | |
| 2091 | case 54: |
| 2092 | |
| 2093 | /* Line 1464 of yacc.c */ |
| 2094 | #line 231 "gram.y" |
| 2095 | { root->real_menu = TRUE1;} |
| 2096 | break; |
| 2097 | |
| 2098 | case 55: |
| 2099 | |
| 2100 | /* Line 1464 of yacc.c */ |
| 2101 | #line 232 "gram.y" |
| 2102 | { root = GetRoot((yyvsp[(2) - (2)].ptr), NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); } |
| 2103 | break; |
| 2104 | |
| 2105 | case 56: |
| 2106 | |
| 2107 | /* Line 1464 of yacc.c */ |
| 2108 | #line 233 "gram.y" |
| 2109 | { root->real_menu = TRUE1; } |
| 2110 | break; |
| 2111 | |
| 2112 | case 57: |
| 2113 | |
| 2114 | /* Line 1464 of yacc.c */ |
| 2115 | #line 234 "gram.y" |
| 2116 | { root = GetRoot((yyvsp[(2) - (2)].ptr), NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); } |
| 2117 | break; |
| 2118 | |
| 2119 | case 59: |
| 2120 | |
| 2121 | /* Line 1464 of yacc.c */ |
| 2122 | #line 236 "gram.y" |
| 2123 | { list = &Scr->IconNames; } |
| 2124 | break; |
| 2125 | |
| 2126 | case 61: |
| 2127 | |
| 2128 | /* Line 1464 of yacc.c */ |
| 2129 | #line 238 "gram.y" |
| 2130 | { color = COLOR273; } |
| 2131 | break; |
| 2132 | |
| 2133 | case 63: |
| 2134 | |
| 2135 | /* Line 1464 of yacc.c */ |
| 2136 | #line 240 "gram.y" |
| 2137 | { color = GRAYSCALE285; } |
| 2138 | break; |
| 2139 | |
| 2140 | case 66: |
| 2141 | |
| 2142 | /* Line 1464 of yacc.c */ |
| 2143 | #line 244 "gram.y" |
| 2144 | { color = MONOCHROME275; } |
| 2145 | break; |
| 2146 | |
| 2147 | case 68: |
| 2148 | |
| 2149 | /* Line 1464 of yacc.c */ |
| 2150 | #line 246 "gram.y" |
| 2151 | { Scr->DefaultFunction.func = (yyvsp[(2) - (2)].num); |
| 2152 | if ((yyvsp[(2) - (2)].num) == F_MENU101) |
| 2153 | { |
| 2154 | pull->prev = NULL((void*)0); |
| 2155 | Scr->DefaultFunction.menu = pull; |
| 2156 | } |
| 2157 | else |
| 2158 | { |
| 2159 | root = GetRoot(TWM_ROOT"bLoB_GoOp",NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0))); |
| 2160 | Scr->DefaultFunction.item = |
| 2161 | AddToMenu(root,"x",Action, |
| 2162 | NULL((void*)0),(yyvsp[(2) - (2)].num), NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 2163 | } |
| 2164 | Action = ""; |
| 2165 | pull = NULL((void*)0); |
| 2166 | } |
| 2167 | break; |
| 2168 | |
| 2169 | case 69: |
| 2170 | |
| 2171 | /* Line 1464 of yacc.c */ |
| 2172 | #line 262 "gram.y" |
| 2173 | { Scr->WindowFunction.func = (yyvsp[(2) - (2)].num); |
| 2174 | root = GetRoot(TWM_ROOT"bLoB_GoOp",NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0))); |
| 2175 | Scr->WindowFunction.item = |
| 2176 | AddToMenu(root,"x",Action, |
| 2177 | NULL((void*)0),(yyvsp[(2) - (2)].num), NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 2178 | Action = ""; |
| 2179 | pull = NULL((void*)0); |
| 2180 | } |
| 2181 | break; |
| 2182 | |
| 2183 | case 70: |
| 2184 | |
| 2185 | /* Line 1464 of yacc.c */ |
| 2186 | #line 270 "gram.y" |
| 2187 | { list = &Scr->WarpCursorL; } |
| 2188 | break; |
| 2189 | |
| 2190 | case 72: |
| 2191 | |
| 2192 | /* Line 1464 of yacc.c */ |
| 2193 | #line 272 "gram.y" |
| 2194 | { if (Scr->FirstTime) |
| 2195 | Scr->WarpCursor = TRUE1; } |
| 2196 | break; |
| 2197 | |
| 2198 | case 73: |
| 2199 | |
| 2200 | /* Line 1464 of yacc.c */ |
| 2201 | #line 274 "gram.y" |
| 2202 | { list = &Scr->WindowRingL; } |
| 2203 | break; |
| 2204 | |
| 2205 | case 75: |
| 2206 | |
| 2207 | /* Line 1464 of yacc.c */ |
| 2208 | #line 279 "gram.y" |
| 2209 | { if (!do_single_keyword ((yyvsp[(1) - (1)].num))) { |
| 2210 | twmrc_error_prefix(); |
| 2211 | fprintf (stderrstderr, |
| 2212 | "unknown singleton keyword %d\n", |
| 2213 | (yyvsp[(1) - (1)].num)); |
| 2214 | ParseError = 1; |
| 2215 | } |
| 2216 | } |
| 2217 | break; |
| 2218 | |
| 2219 | case 76: |
| 2220 | |
| 2221 | /* Line 1464 of yacc.c */ |
| 2222 | #line 289 "gram.y" |
| 2223 | { if (!do_string_keyword ((yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].ptr))) { |
| 2224 | twmrc_error_prefix(); |
| 2225 | fprintf (stderrstderr, |
| 2226 | "unknown string keyword %d (value \"%s\")\n", |
| 2227 | (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].ptr)); |
| 2228 | ParseError = 1; |
| 2229 | } |
| 2230 | } |
| 2231 | break; |
| 2232 | |
| 2233 | case 77: |
| 2234 | |
| 2235 | /* Line 1464 of yacc.c */ |
| 2236 | #line 299 "gram.y" |
| 2237 | { if (!do_number_keyword ((yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].num))) { |
| 2238 | twmrc_error_prefix(); |
| 2239 | fprintf (stderrstderr, |
| 2240 | "unknown numeric keyword %d (value %d)\n", |
| 2241 | (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].num)); |
| 2242 | ParseError = 1; |
| 2243 | } |
| 2244 | } |
| 2245 | break; |
| 2246 | |
| 2247 | case 78: |
| 2248 | |
| 2249 | /* Line 1464 of yacc.c */ |
| 2250 | #line 311 "gram.y" |
| 2251 | { (yyval.num) = (yyvsp[(6) - (6)].num); } |
| 2252 | break; |
| 2253 | |
| 2254 | case 79: |
| 2255 | |
| 2256 | /* Line 1464 of yacc.c */ |
| 2257 | #line 314 "gram.y" |
| 2258 | { (yyval.num) = (yyvsp[(6) - (6)].num); } |
| 2259 | break; |
| 2260 | |
| 2261 | case 82: |
| 2262 | |
| 2263 | /* Line 1464 of yacc.c */ |
| 2264 | #line 321 "gram.y" |
| 2265 | { mods |= Mod1Mask(1<<3); } |
| 2266 | break; |
| 2267 | |
| 2268 | case 83: |
| 2269 | |
| 2270 | /* Line 1464 of yacc.c */ |
| 2271 | #line 322 "gram.y" |
| 2272 | { mods |= ShiftMask(1<<0); } |
| 2273 | break; |
| 2274 | |
| 2275 | case 84: |
| 2276 | |
| 2277 | /* Line 1464 of yacc.c */ |
| 2278 | #line 323 "gram.y" |
| 2279 | { mods |= LockMask(1<<1); } |
| 2280 | break; |
| 2281 | |
| 2282 | case 85: |
| 2283 | |
| 2284 | /* Line 1464 of yacc.c */ |
| 2285 | #line 324 "gram.y" |
| 2286 | { mods |= ControlMask(1<<2); } |
| 2287 | break; |
| 2288 | |
| 2289 | case 86: |
| 2290 | |
| 2291 | /* Line 1464 of yacc.c */ |
| 2292 | #line 325 "gram.y" |
| 2293 | { if ((yyvsp[(2) - (2)].num) < 1 || (yyvsp[(2) - (2)].num) > 5) { |
| 2294 | twmrc_error_prefix(); |
| 2295 | fprintf (stderrstderr, |
| 2296 | "bad modifier number (%d), must be 1-5\n", |
| 2297 | (yyvsp[(2) - (2)].num)); |
| 2298 | ParseError = 1; |
| 2299 | } else { |
| 2300 | mods |= (Mod1Mask(1<<3) << ((yyvsp[(2) - (2)].num) - 1)); |
| 2301 | } |
| 2302 | } |
| 2303 | break; |
| 2304 | |
| 2305 | case 87: |
| 2306 | |
| 2307 | /* Line 1464 of yacc.c */ |
| 2308 | #line 335 "gram.y" |
| 2309 | { } |
| 2310 | break; |
| 2311 | |
| 2312 | case 90: |
| 2313 | |
| 2314 | /* Line 1464 of yacc.c */ |
| 2315 | #line 342 "gram.y" |
| 2316 | { cont |= C_WINDOW_BIT(1 << 0); } |
| 2317 | break; |
| 2318 | |
| 2319 | case 91: |
| 2320 | |
| 2321 | /* Line 1464 of yacc.c */ |
| 2322 | #line 343 "gram.y" |
| 2323 | { cont |= C_TITLE_BIT(1 << 1); } |
| 2324 | break; |
| 2325 | |
| 2326 | case 92: |
| 2327 | |
| 2328 | /* Line 1464 of yacc.c */ |
| 2329 | #line 344 "gram.y" |
| 2330 | { cont |= C_ICON_BIT(1 << 2); } |
| 2331 | break; |
| 2332 | |
| 2333 | case 93: |
| 2334 | |
| 2335 | /* Line 1464 of yacc.c */ |
| 2336 | #line 345 "gram.y" |
| 2337 | { cont |= C_ROOT_BIT(1 << 3); } |
| 2338 | break; |
| 2339 | |
| 2340 | case 94: |
| 2341 | |
| 2342 | /* Line 1464 of yacc.c */ |
| 2343 | #line 346 "gram.y" |
| 2344 | { cont |= C_FRAME_BIT(1 << 4); } |
| 2345 | break; |
| 2346 | |
| 2347 | case 95: |
| 2348 | |
| 2349 | /* Line 1464 of yacc.c */ |
| 2350 | #line 347 "gram.y" |
| 2351 | { cont |= C_ICONMGR_BIT(1 << 5); } |
| 2352 | break; |
| 2353 | |
| 2354 | case 96: |
| 2355 | |
| 2356 | /* Line 1464 of yacc.c */ |
| 2357 | #line 348 "gram.y" |
| 2358 | { cont |= C_ICONMGR_BIT(1 << 5); } |
| 2359 | break; |
| 2360 | |
| 2361 | case 97: |
| 2362 | |
| 2363 | /* Line 1464 of yacc.c */ |
| 2364 | #line 349 "gram.y" |
| 2365 | { cont |= C_ALL_BITS((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5)); } |
| 2366 | break; |
| 2367 | |
| 2368 | case 98: |
| 2369 | |
| 2370 | /* Line 1464 of yacc.c */ |
| 2371 | #line 350 "gram.y" |
| 2372 | { } |
| 2373 | break; |
| 2374 | |
| 2375 | case 101: |
| 2376 | |
| 2377 | /* Line 1464 of yacc.c */ |
| 2378 | #line 357 "gram.y" |
| 2379 | { cont |= C_WINDOW_BIT(1 << 0); } |
| 2380 | break; |
| 2381 | |
| 2382 | case 102: |
| 2383 | |
| 2384 | /* Line 1464 of yacc.c */ |
| 2385 | #line 358 "gram.y" |
| 2386 | { cont |= C_TITLE_BIT(1 << 1); } |
| 2387 | break; |
| 2388 | |
| 2389 | case 103: |
| 2390 | |
| 2391 | /* Line 1464 of yacc.c */ |
| 2392 | #line 359 "gram.y" |
| 2393 | { cont |= C_ICON_BIT(1 << 2); } |
| 2394 | break; |
| 2395 | |
| 2396 | case 104: |
| 2397 | |
| 2398 | /* Line 1464 of yacc.c */ |
| 2399 | #line 360 "gram.y" |
| 2400 | { cont |= C_ROOT_BIT(1 << 3); } |
| 2401 | break; |
| 2402 | |
| 2403 | case 105: |
| 2404 | |
| 2405 | /* Line 1464 of yacc.c */ |
| 2406 | #line 361 "gram.y" |
| 2407 | { cont |= C_FRAME_BIT(1 << 4); } |
| 2408 | break; |
| 2409 | |
| 2410 | case 106: |
| 2411 | |
| 2412 | /* Line 1464 of yacc.c */ |
| 2413 | #line 362 "gram.y" |
| 2414 | { cont |= C_ICONMGR_BIT(1 << 5); } |
| 2415 | break; |
| 2416 | |
| 2417 | case 107: |
| 2418 | |
| 2419 | /* Line 1464 of yacc.c */ |
| 2420 | #line 363 "gram.y" |
| 2421 | { cont |= C_ICONMGR_BIT(1 << 5); } |
| 2422 | break; |
| 2423 | |
| 2424 | case 108: |
| 2425 | |
| 2426 | /* Line 1464 of yacc.c */ |
| 2427 | #line 364 "gram.y" |
| 2428 | { cont |= C_ALL_BITS((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4) | (1 << 5)); } |
| 2429 | break; |
| 2430 | |
| 2431 | case 109: |
| 2432 | |
| 2433 | /* Line 1464 of yacc.c */ |
| 2434 | #line 365 "gram.y" |
| 2435 | { } |
| 2436 | break; |
| 2437 | |
| 2438 | case 110: |
| 2439 | |
| 2440 | /* Line 1464 of yacc.c */ |
| 2441 | #line 366 "gram.y" |
| 2442 | { Name = (yyvsp[(1) - (1)].ptr); cont |= C_NAME_BIT(1 << 6); } |
| 2443 | break; |
| 2444 | |
| 2445 | case 114: |
| 2446 | |
| 2447 | /* Line 1464 of yacc.c */ |
| 2448 | #line 377 "gram.y" |
| 2449 | { SetHighlightPixmap ((yyvsp[(2) - (2)].ptr)); } |
| 2450 | break; |
| 2451 | |
| 2452 | case 118: |
| 2453 | |
| 2454 | /* Line 1464 of yacc.c */ |
| 2455 | #line 388 "gram.y" |
| 2456 | { |
| 2457 | NewBitmapCursor(&Scr->FrameCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2458 | break; |
| 2459 | |
| 2460 | case 119: |
| 2461 | |
| 2462 | /* Line 1464 of yacc.c */ |
| 2463 | #line 390 "gram.y" |
| 2464 | { |
| 2465 | NewFontCursor(&Scr->FrameCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2466 | break; |
| 2467 | |
| 2468 | case 120: |
| 2469 | |
| 2470 | /* Line 1464 of yacc.c */ |
| 2471 | #line 392 "gram.y" |
| 2472 | { |
| 2473 | NewBitmapCursor(&Scr->TitleCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2474 | break; |
| 2475 | |
| 2476 | case 121: |
| 2477 | |
| 2478 | /* Line 1464 of yacc.c */ |
| 2479 | #line 394 "gram.y" |
| 2480 | { |
| 2481 | NewFontCursor(&Scr->TitleCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2482 | break; |
| 2483 | |
| 2484 | case 122: |
| 2485 | |
| 2486 | /* Line 1464 of yacc.c */ |
| 2487 | #line 396 "gram.y" |
| 2488 | { |
| 2489 | NewBitmapCursor(&Scr->IconCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2490 | break; |
| 2491 | |
| 2492 | case 123: |
| 2493 | |
| 2494 | /* Line 1464 of yacc.c */ |
| 2495 | #line 398 "gram.y" |
| 2496 | { |
| 2497 | NewFontCursor(&Scr->IconCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2498 | break; |
| 2499 | |
| 2500 | case 124: |
| 2501 | |
| 2502 | /* Line 1464 of yacc.c */ |
| 2503 | #line 400 "gram.y" |
| 2504 | { |
| 2505 | NewBitmapCursor(&Scr->IconMgrCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2506 | break; |
| 2507 | |
| 2508 | case 125: |
| 2509 | |
| 2510 | /* Line 1464 of yacc.c */ |
| 2511 | #line 402 "gram.y" |
| 2512 | { |
| 2513 | NewFontCursor(&Scr->IconMgrCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2514 | break; |
| 2515 | |
| 2516 | case 126: |
| 2517 | |
| 2518 | /* Line 1464 of yacc.c */ |
| 2519 | #line 404 "gram.y" |
| 2520 | { |
| 2521 | NewBitmapCursor(&Scr->ButtonCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2522 | break; |
| 2523 | |
| 2524 | case 127: |
| 2525 | |
| 2526 | /* Line 1464 of yacc.c */ |
| 2527 | #line 406 "gram.y" |
| 2528 | { |
| 2529 | NewFontCursor(&Scr->ButtonCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2530 | break; |
| 2531 | |
| 2532 | case 128: |
| 2533 | |
| 2534 | /* Line 1464 of yacc.c */ |
| 2535 | #line 408 "gram.y" |
| 2536 | { |
| 2537 | NewBitmapCursor(&Scr->MoveCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2538 | break; |
| 2539 | |
| 2540 | case 129: |
| 2541 | |
| 2542 | /* Line 1464 of yacc.c */ |
| 2543 | #line 410 "gram.y" |
| 2544 | { |
| 2545 | NewFontCursor(&Scr->MoveCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2546 | break; |
| 2547 | |
| 2548 | case 130: |
| 2549 | |
| 2550 | /* Line 1464 of yacc.c */ |
| 2551 | #line 412 "gram.y" |
| 2552 | { |
| 2553 | NewBitmapCursor(&Scr->ResizeCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2554 | break; |
| 2555 | |
| 2556 | case 131: |
| 2557 | |
| 2558 | /* Line 1464 of yacc.c */ |
| 2559 | #line 414 "gram.y" |
| 2560 | { |
| 2561 | NewFontCursor(&Scr->ResizeCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2562 | break; |
| 2563 | |
| 2564 | case 132: |
| 2565 | |
| 2566 | /* Line 1464 of yacc.c */ |
| 2567 | #line 416 "gram.y" |
| 2568 | { |
| 2569 | NewBitmapCursor(&Scr->WaitCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2570 | break; |
| 2571 | |
| 2572 | case 133: |
| 2573 | |
| 2574 | /* Line 1464 of yacc.c */ |
| 2575 | #line 418 "gram.y" |
| 2576 | { |
| 2577 | NewFontCursor(&Scr->WaitCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2578 | break; |
| 2579 | |
| 2580 | case 134: |
| 2581 | |
| 2582 | /* Line 1464 of yacc.c */ |
| 2583 | #line 420 "gram.y" |
| 2584 | { |
| 2585 | NewBitmapCursor(&Scr->MenuCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2586 | break; |
| 2587 | |
| 2588 | case 135: |
| 2589 | |
| 2590 | /* Line 1464 of yacc.c */ |
| 2591 | #line 422 "gram.y" |
| 2592 | { |
| 2593 | NewFontCursor(&Scr->MenuCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2594 | break; |
| 2595 | |
| 2596 | case 136: |
| 2597 | |
| 2598 | /* Line 1464 of yacc.c */ |
| 2599 | #line 424 "gram.y" |
| 2600 | { |
| 2601 | NewBitmapCursor(&Scr->SelectCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2602 | break; |
| 2603 | |
| 2604 | case 137: |
| 2605 | |
| 2606 | /* Line 1464 of yacc.c */ |
| 2607 | #line 426 "gram.y" |
| 2608 | { |
| 2609 | NewFontCursor(&Scr->SelectCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2610 | break; |
| 2611 | |
| 2612 | case 138: |
| 2613 | |
| 2614 | /* Line 1464 of yacc.c */ |
| 2615 | #line 428 "gram.y" |
| 2616 | { |
| 2617 | NewBitmapCursor(&Scr->DestroyCursor, (yyvsp[(2) - (3)].ptr), (yyvsp[(3) - (3)].ptr)); } |
| 2618 | break; |
| 2619 | |
| 2620 | case 139: |
| 2621 | |
| 2622 | /* Line 1464 of yacc.c */ |
| 2623 | #line 430 "gram.y" |
| 2624 | { |
| 2625 | NewFontCursor(&Scr->DestroyCursor, (yyvsp[(2) - (2)].ptr)); } |
| 2626 | break; |
| 2627 | |
| 2628 | case 143: |
| 2629 | |
| 2630 | /* Line 1464 of yacc.c */ |
| 2631 | #line 442 "gram.y" |
| 2632 | { if (!do_colorlist_keyword ((yyvsp[(1) - (2)].num), color, |
| 2633 | (yyvsp[(2) - (2)].ptr))) { |
| 2634 | twmrc_error_prefix(); |
| 2635 | fprintf (stderrstderr, |
| 2636 | "unhandled list color keyword %d (string \"%s\")\n", |
| 2637 | (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].ptr)); |
| 2638 | ParseError = 1; |
| 2639 | } |
| 2640 | } |
| 2641 | break; |
| 2642 | |
| 2643 | case 144: |
| 2644 | |
| 2645 | /* Line 1464 of yacc.c */ |
| 2646 | #line 451 "gram.y" |
| 2647 | { list = do_colorlist_keyword((yyvsp[(1) - (2)].num),color, |
| 2648 | (yyvsp[(2) - (2)].ptr)); |
| 2649 | if (!list) { |
| 2650 | twmrc_error_prefix(); |
| 2651 | fprintf (stderrstderr, |
| 2652 | "unhandled color list keyword %d (string \"%s\")\n", |
| 2653 | (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].ptr)); |
| 2654 | ParseError = 1; |
| 2655 | } |
| 2656 | } |
| 2657 | break; |
| 2658 | |
| 2659 | case 145: |
| 2660 | |
| 2661 | /* Line 1464 of yacc.c */ |
| 2662 | #line 461 "gram.y" |
| 2663 | { /* No action */; } |
| 2664 | break; |
| 2665 | |
| 2666 | case 146: |
| 2667 | |
| 2668 | /* Line 1464 of yacc.c */ |
| 2669 | #line 462 "gram.y" |
| 2670 | { if (!do_color_keyword ((yyvsp[(1) - (2)].num), color, |
| 2671 | (yyvsp[(2) - (2)].ptr))) { |
| 2672 | twmrc_error_prefix(); |
| 2673 | fprintf (stderrstderr, |
| 2674 | "unhandled color keyword %d (string \"%s\")\n", |
| 2675 | (yyvsp[(1) - (2)].num), (yyvsp[(2) - (2)].ptr)); |
| 2676 | ParseError = 1; |
| 2677 | } |
| 2678 | } |
| 2679 | break; |
| 2680 | |
| 2681 | case 150: |
| 2682 | |
| 2683 | /* Line 1464 of yacc.c */ |
| 2684 | #line 480 "gram.y" |
| 2685 | { do_string_savecolor(color, (yyvsp[(1) - (1)].ptr)); } |
| 2686 | break; |
| 2687 | |
| 2688 | case 151: |
| 2689 | |
| 2690 | /* Line 1464 of yacc.c */ |
| 2691 | #line 481 "gram.y" |
| 2692 | { do_var_savecolor((yyvsp[(1) - (1)].num)); } |
| 2693 | break; |
| 2694 | |
| 2695 | case 155: |
| 2696 | |
| 2697 | /* Line 1464 of yacc.c */ |
| 2698 | #line 491 "gram.y" |
| 2699 | { if (Scr->FirstTime && |
| 2700 | color == Scr->Monochrome) |
| 2701 | AddToList(list, (yyvsp[(1) - (2)].ptr), (yyvsp[(2) - (2)].ptr)); } |
| 2702 | break; |
| 2703 | |
| 2704 | case 156: |
| 2705 | |
| 2706 | /* Line 1464 of yacc.c */ |
| 2707 | #line 496 "gram.y" |
| 2708 | { |
| 2709 | if (HasShape) Scr->SqueezeTitle = TRUE1; |
| 2710 | } |
| 2711 | break; |
| 2712 | |
| 2713 | case 157: |
| 2714 | |
| 2715 | /* Line 1464 of yacc.c */ |
| 2716 | #line 499 "gram.y" |
| 2717 | { list = &Scr->SqueezeTitleL; |
| 2718 | if (HasShape && Scr->SqueezeTitle == -1) |
| 2719 | Scr->SqueezeTitle = TRUE1; |
| 2720 | } |
| 2721 | break; |
| 2722 | |
| 2723 | case 159: |
| 2724 | |
| 2725 | /* Line 1464 of yacc.c */ |
| 2726 | #line 504 "gram.y" |
| 2727 | { Scr->SqueezeTitle = FALSE0; } |
| 2728 | break; |
| 2729 | |
| 2730 | case 160: |
| 2731 | |
| 2732 | /* Line 1464 of yacc.c */ |
| 2733 | #line 505 "gram.y" |
| 2734 | { list = &Scr->DontSqueezeTitleL; } |
| 2735 | break; |
| 2736 | |
| 2737 | case 163: |
| 2738 | |
| 2739 | /* Line 1464 of yacc.c */ |
| 2740 | #line 510 "gram.y" |
| 2741 | { |
| 2742 | if (Scr->FirstTime) { |
| 2743 | do_squeeze_entry (list, (yyvsp[(2) - (5)].ptr), (yyvsp[(3) - (5)].num), (yyvsp[(4) - (5)].num), (yyvsp[(5) - (5)].num)); |
| 2744 | } |
| 2745 | } |
| 2746 | break; |
| 2747 | |
| 2748 | case 167: |
| 2749 | |
| 2750 | /* Line 1464 of yacc.c */ |
| 2751 | #line 525 "gram.y" |
| 2752 | { if (Scr->FirstTime) |
| 2753 | AddToList(list, (yyvsp[(1) - (3)].ptr), (char *) |
| 2754 | AllocateIconManager((yyvsp[(1) - (3)].ptr), NULLSTR((char *) ((void*)0)), |
| 2755 | (yyvsp[(2) - (3)].ptr),(yyvsp[(3) - (3)].num))); |
| 2756 | } |
| 2757 | break; |
| 2758 | |
| 2759 | case 168: |
| 2760 | |
| 2761 | /* Line 1464 of yacc.c */ |
| 2762 | #line 531 "gram.y" |
| 2763 | { if (Scr->FirstTime) |
| 2764 | AddToList(list, (yyvsp[(1) - (4)].ptr), (char *) |
| 2765 | AllocateIconManager((yyvsp[(1) - (4)].ptr),(yyvsp[(2) - (4)].ptr), |
| 2766 | (yyvsp[(3) - (4)].ptr), (yyvsp[(4) - (4)].num))); |
| 2767 | } |
| 2768 | break; |
| 2769 | |
| 2770 | case 172: |
| 2771 | |
| 2772 | /* Line 1464 of yacc.c */ |
| 2773 | #line 545 "gram.y" |
| 2774 | { if (Scr->FirstTime) |
| 2775 | AddToList(list, (yyvsp[(1) - (1)].ptr), 0); |
| 2776 | } |
| 2777 | break; |
| 2778 | |
| 2779 | case 176: |
| 2780 | |
| 2781 | /* Line 1464 of yacc.c */ |
| 2782 | #line 557 "gram.y" |
| 2783 | { if (Scr->FirstTime) AddToList(list, (yyvsp[(1) - (2)].ptr), (yyvsp[(2) - (2)].ptr)); } |
| 2784 | break; |
| 2785 | |
| 2786 | case 180: |
| 2787 | |
| 2788 | /* Line 1464 of yacc.c */ |
| 2789 | #line 567 "gram.y" |
| 2790 | { AddToMenu(root, "", Action, NULL((void*)0), (yyvsp[(1) - (1)].num), |
| 2791 | NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 2792 | Action = ""; |
| 2793 | } |
| 2794 | break; |
| 2795 | |
| 2796 | case 184: |
| 2797 | |
| 2798 | /* Line 1464 of yacc.c */ |
| 2799 | #line 580 "gram.y" |
| 2800 | { AddToMenu(root, (yyvsp[(1) - (2)].ptr), Action, pull, (yyvsp[(2) - (2)].num), |
| 2801 | NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 2802 | Action = ""; |
| 2803 | pull = NULL((void*)0); |
| 2804 | } |
| 2805 | break; |
| 2806 | |
| 2807 | case 185: |
| 2808 | |
| 2809 | /* Line 1464 of yacc.c */ |
| 2810 | #line 585 "gram.y" |
| 2811 | { |
| 2812 | AddToMenu(root, (yyvsp[(1) - (7)].ptr), Action, pull, (yyvsp[(7) - (7)].num), |
| 2813 | (yyvsp[(3) - (7)].ptr), (yyvsp[(5) - (7)].ptr)); |
| 2814 | Action = ""; |
| 2815 | pull = NULL((void*)0); |
| 2816 | } |
| 2817 | break; |
| 2818 | |
| 2819 | case 186: |
| 2820 | |
| 2821 | /* Line 1464 of yacc.c */ |
| 2822 | #line 593 "gram.y" |
| 2823 | { (yyval.num) = (yyvsp[(1) - (1)].num); } |
| 2824 | break; |
| 2825 | |
| 2826 | case 187: |
| 2827 | |
| 2828 | /* Line 1464 of yacc.c */ |
| 2829 | #line 594 "gram.y" |
| 2830 | { |
| 2831 | (yyval.num) = (yyvsp[(1) - (2)].num); |
| 2832 | Action = (yyvsp[(2) - (2)].ptr); |
| 2833 | switch ((yyvsp[(1) - (2)].num)) { |
| 2834 | case F_MENU101: |
| 2835 | pull = GetRoot ((yyvsp[(2) - (2)].ptr), NULLSTR((char *) ((void*)0)),NULLSTR((char *) ((void*)0))); |
| 2836 | pull->prev = root; |
| 2837 | break; |
| 2838 | case F_WARPRING104: |
| 2839 | if (!CheckWarpRingArg (Action)) { |
| 2840 | twmrc_error_prefix(); |
| 2841 | fprintf (stderrstderr, |
| 2842 | "ignoring invalid f.warptoring argument \"%s\"\n", |
| 2843 | Action); |
| 2844 | (yyval.num) = F_NOP0; |
| 2845 | } |
| 2846 | case F_WARPTOSCREEN109: |
| 2847 | if (!CheckWarpScreenArg (Action)) { |
| 2848 | twmrc_error_prefix(); |
| 2849 | fprintf (stderrstderr, |
| 2850 | "ignoring invalid f.warptoscreen argument \"%s\"\n", |
| 2851 | Action); |
| 2852 | (yyval.num) = F_NOP0; |
| 2853 | } |
| 2854 | break; |
| 2855 | case F_COLORMAP110: |
| 2856 | if (CheckColormapArg (Action)) { |
| 2857 | (yyval.num) = F_COLORMAP110; |
| 2858 | } else { |
| 2859 | twmrc_error_prefix(); |
| 2860 | fprintf (stderrstderr, |
| 2861 | "ignoring invalid f.colormap argument \"%s\"\n", |
| 2862 | Action); |
| 2863 | (yyval.num) = F_NOP0; |
| 2864 | } |
| 2865 | break; |
| 2866 | } /* end switch */ |
| 2867 | } |
| 2868 | break; |
| 2869 | |
| 2870 | case 188: |
| 2871 | |
| 2872 | /* Line 1464 of yacc.c */ |
| 2873 | #line 635 "gram.y" |
| 2874 | { (yyval.num) = (yyvsp[(1) - (1)].num); } |
| 2875 | break; |
| 2876 | |
| 2877 | case 189: |
| 2878 | |
| 2879 | /* Line 1464 of yacc.c */ |
| 2880 | #line 636 "gram.y" |
| 2881 | { (yyval.num) = (yyvsp[(2) - (2)].num); } |
| 2882 | break; |
| 2883 | |
| 2884 | case 190: |
| 2885 | |
| 2886 | /* Line 1464 of yacc.c */ |
| 2887 | #line 637 "gram.y" |
| 2888 | { (yyval.num) = -((yyvsp[(2) - (2)].num)); } |
| 2889 | break; |
| 2890 | |
| 2891 | case 191: |
| 2892 | |
| 2893 | /* Line 1464 of yacc.c */ |
| 2894 | #line 640 "gram.y" |
| 2895 | { (yyval.num) = (yyvsp[(2) - (2)].num); |
| 2896 | if ((yyvsp[(2) - (2)].num) == 0) |
| 2897 | yyerror("bad button 0"); |
| 2898 | |
| 2899 | if ((yyvsp[(2) - (2)].num) > MAX_BUTTONS16) |
| 2900 | { |
| 2901 | (yyval.num) = 0; |
| 2902 | yyerror("button number too large"); |
| 2903 | } |
| 2904 | } |
| 2905 | break; |
| 2906 | |
| 2907 | case 192: |
| 2908 | |
| 2909 | /* Line 1464 of yacc.c */ |
| 2910 | #line 652 "gram.y" |
| 2911 | { ptr = (char *)malloc(strlen((yyvsp[(1) - (1)].ptr))+1); |
| 2912 | strcpy(ptr, (yyvsp[(1) - (1)].ptr)); |
| 2913 | RemoveDQuote(ptr); |
| 2914 | (yyval.ptr) = ptr; |
| 2915 | } |
| 2916 | break; |
| 2917 | |
| 2918 | case 193: |
| 2919 | |
| 2920 | /* Line 1464 of yacc.c */ |
| 2921 | #line 658 "gram.y" |
| 2922 | { (yyval.num) = (yyvsp[(1) - (1)].num); } |
| 2923 | break; |
| 2924 | |
| 2925 | |
| 2926 | |
| 2927 | /* Line 1464 of yacc.c */ |
| 2928 | #line 2929 "gram.c" |
| 2929 | default: break; |
| 2930 | } |
| 2931 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 2932 | |
| 2933 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
| 2934 | yylen = 0; |
| 2935 | YY_STACK_PRINT (yyss, yyssp); |
| 2936 | |
| 2937 | *++yyvsp = yyval; |
| 2938 | |
| 2939 | /* Now `shift' the result of the reduction. Determine what state |
| 2940 | that goes to, based on the state we popped back to and the rule |
| 2941 | number reduced by. */ |
| 2942 | |
| 2943 | yyn = yyr1[yyn]; |
| 2944 | |
| 2945 | yystate = yypgoto[yyn - YYNTOKENS75] + *yyssp; |
| 2946 | if (0 <= yystate && yystate <= YYLAST339 && yycheck[yystate] == *yyssp) |
| 2947 | yystate = yytable[yystate]; |
| 2948 | else |
| 2949 | yystate = yydefgoto[yyn - YYNTOKENS75]; |
| 2950 | |
| 2951 | goto yynewstate; |
| 2952 | |
| 2953 | |
| 2954 | /*------------------------------------. |
| 2955 | | yyerrlab -- here on detecting error | |
| 2956 | `------------------------------------*/ |
| 2957 | yyerrlab: |
| 2958 | /* If not already recovering from an error, report this error. */ |
| 2959 | if (!yyerrstatus) |
| 2960 | { |
| 2961 | ++yynerrs; |
| 2962 | #if ! YYERROR_VERBOSE0 |
| 2963 | yyerror (YY_("syntax error")"syntax error"); |
| 2964 | #else |
| 2965 | { |
| 2966 | YYSIZE_Tlong unsigned int yysize = yysyntax_error (0, yystate, yychar); |
| 2967 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1)) |
| 2968 | { |
| 2969 | YYSIZE_Tlong unsigned int yyalloc = 2 * yysize; |
| 2970 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1))) |
| 2971 | yyalloc = YYSTACK_ALLOC_MAXIMUM((long unsigned int) -1); |
| 2972 | if (yymsg != yymsgbuf) |
| 2973 | YYSTACK_FREEfree (yymsg); |
| 2974 | yymsg = (char *) YYSTACK_ALLOCmalloc (yyalloc); |
| 2975 | if (yymsg) |
| 2976 | yymsg_alloc = yyalloc; |
| 2977 | else |
| 2978 | { |
| 2979 | yymsg = yymsgbuf; |
| 2980 | yymsg_alloc = sizeof yymsgbuf; |
| 2981 | } |
| 2982 | } |
| 2983 | |
| 2984 | if (0 < yysize && yysize <= yymsg_alloc) |
| 2985 | { |
| 2986 | (void) yysyntax_error (yymsg, yystate, yychar); |
| 2987 | yyerror (yymsg); |
| 2988 | } |
| 2989 | else |
| 2990 | { |
| 2991 | yyerror (YY_("syntax error")"syntax error"); |
| 2992 | if (yysize != 0) |
| 2993 | goto yyexhaustedlab; |
| 2994 | } |
| 2995 | } |
| 2996 | #endif |
| 2997 | } |
| 2998 | |
| 2999 | |
| 3000 | |
| 3001 | if (yyerrstatus == 3) |
| 3002 | { |
| 3003 | /* If just tried and failed to reuse lookahead token after an |
| 3004 | error, discard it. */ |
| 3005 | |
| 3006 | if (yychar <= YYEOF0) |
| 3007 | { |
| 3008 | /* Return failure if at end of input. */ |
| 3009 | if (yychar == YYEOF0) |
| 3010 | YYABORTgoto yyabortlab; |
| 3011 | } |
| 3012 | else |
| 3013 | { |
| 3014 | yydestruct ("Error: discarding", |
| 3015 | yytoken, &yylval); |
| 3016 | yychar = YYEMPTY(-2); |
| 3017 | } |
| 3018 | } |
| 3019 | |
| 3020 | /* Else will try to reuse lookahead token after shifting the error |
| 3021 | token. */ |
| 3022 | goto yyerrlab1; |
| 3023 | |
| 3024 | |
| 3025 | /*---------------------------------------------------. |
| 3026 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 3027 | `---------------------------------------------------*/ |
| 3028 | yyerrorlab: |
| 3029 | |
| 3030 | /* Pacify compilers like GCC when the user code never invokes |
| 3031 | YYERROR and the label yyerrorlab therefore never appears in user |
| 3032 | code. */ |
| 3033 | if (/*CONSTCOND*/ 0) |
| 3034 | goto yyerrorlab; |
| 3035 | |
| 3036 | /* Do not reclaim the symbols of the rule which action triggered |
| 3037 | this YYERROR. */ |
| 3038 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
| 3039 | yylen = 0; |
| 3040 | YY_STACK_PRINT (yyss, yyssp); |
| 3041 | yystate = *yyssp; |
| 3042 | goto yyerrlab1; |
| 3043 | |
| 3044 | |
| 3045 | /*-------------------------------------------------------------. |
| 3046 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 3047 | `-------------------------------------------------------------*/ |
| 3048 | yyerrlab1: |
| 3049 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 3050 | |
| 3051 | for (;;) |
| 3052 | { |
| 3053 | yyn = yypact[yystate]; |
| 3054 | if (yyn != YYPACT_NINF-159) |
| 3055 | { |
| 3056 | yyn += YYTERROR1; |
| 3057 | if (0 <= yyn && yyn <= YYLAST339 && yycheck[yyn] == YYTERROR1) |
| 3058 | { |
| 3059 | yyn = yytable[yyn]; |
| 3060 | if (0 < yyn) |
| 3061 | break; |
| 3062 | } |
| 3063 | } |
| 3064 | |
| 3065 | /* Pop the current state because it cannot handle the error token. */ |
| 3066 | if (yyssp == yyss) |
| 3067 | YYABORTgoto yyabortlab; |
| 3068 | |
| 3069 | |
| 3070 | yydestruct ("Error: popping", |
| 3071 | yystos[yystate], yyvsp); |
| 3072 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); |
| 3073 | yystate = *yyssp; |
| 3074 | YY_STACK_PRINT (yyss, yyssp); |
| 3075 | } |
| 3076 | |
| 3077 | *++yyvsp = yylval; |
| 3078 | |
| 3079 | |
| 3080 | /* Shift the error token. */ |
| 3081 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 3082 | |
| 3083 | yystate = yyn; |
| 3084 | goto yynewstate; |
| 3085 | |
| 3086 | |
| 3087 | /*-------------------------------------. |
| 3088 | | yyacceptlab -- YYACCEPT comes here. | |
| 3089 | `-------------------------------------*/ |
| 3090 | yyacceptlab: |
| 3091 | yyresult = 0; |
| 3092 | goto yyreturn; |
| 3093 | |
| 3094 | /*-----------------------------------. |
| 3095 | | yyabortlab -- YYABORT comes here. | |
| 3096 | `-----------------------------------*/ |
| 3097 | yyabortlab: |
| 3098 | yyresult = 1; |
| 3099 | goto yyreturn; |
| 3100 | |
| 3101 | #if !defined(yyoverflow) || YYERROR_VERBOSE0 |
| 3102 | /*-------------------------------------------------. |
| 3103 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 3104 | `-------------------------------------------------*/ |
| 3105 | yyexhaustedlab: |
| 3106 | yyerror (YY_("memory exhausted")"memory exhausted"); |
| 3107 | yyresult = 2; |
| 3108 | /* Fall through. */ |
| 3109 | #endif |
| 3110 | |
| 3111 | yyreturn: |
| 3112 | if (yychar != YYEMPTY(-2)) |
| 3113 | yydestruct ("Cleanup: discarding lookahead", |
| 3114 | yytoken, &yylval); |
| 3115 | /* Do not reclaim the symbols of the rule which action triggered |
| 3116 | this YYABORT or YYACCEPT. */ |
| 3117 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
| 3118 | YY_STACK_PRINT (yyss, yyssp); |
| 3119 | while (yyssp != yyss) |
| 3120 | { |
| 3121 | yydestruct ("Cleanup: popping", |
| 3122 | yystos[*yyssp], yyvsp); |
| 3123 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); |
| 3124 | } |
| 3125 | #ifndef yyoverflow |
| 3126 | if (yyss != yyssa) |
| 3127 | YYSTACK_FREEfree (yyss); |
| 3128 | #endif |
| 3129 | #if YYERROR_VERBOSE0 |
| 3130 | if (yymsg != yymsgbuf) |
| 3131 | YYSTACK_FREEfree (yymsg); |
| 3132 | #endif |
| 3133 | /* Make sure YYID is used. */ |
| 3134 | return YYID (yyresult)(yyresult); |
| 3135 | } |
| 3136 | |
| 3137 | |
| 3138 | |
| 3139 | /* Line 1684 of yacc.c */ |
| 3140 | #line 661 "gram.y" |
| 3141 | |
| 3142 | void |
| 3143 | yyerror(char *s) |
| 3144 | { |
| 3145 | twmrc_error_prefix(); |
| 3146 | fprintf (stderrstderr, "error in input file: %s\n", s ? s : ""); |
| 3147 | ParseError = 1; |
| 3148 | } |
| 3149 | |
| 3150 | void |
| 3151 | RemoveDQuote(char *str) |
| 3152 | { |
| 3153 | register char *i, *o; |
| 3154 | register int n; |
| 3155 | register int count; |
| 3156 | |
| 3157 | for (i=str+1, o=str; *i && *i != '\"'; o++) |
| 3158 | { |
| 3159 | if (*i == '\\') |
| 3160 | { |
| 3161 | switch (*++i) |
| 3162 | { |
| 3163 | case 'n': |
| 3164 | *o = '\n'; |
| 3165 | i++; |
| 3166 | break; |
| 3167 | case 'b': |
| 3168 | *o = '\b'; |
| 3169 | i++; |
| 3170 | break; |
| 3171 | case 'r': |
| 3172 | *o = '\r'; |
| 3173 | i++; |
| 3174 | break; |
| 3175 | case 't': |
| 3176 | *o = '\t'; |
| 3177 | i++; |
| 3178 | break; |
| 3179 | case 'f': |
| 3180 | *o = '\f'; |
| 3181 | i++; |
| 3182 | break; |
| 3183 | case '0': |
| 3184 | if (*++i == 'x') |
| 3185 | goto hex; |
| 3186 | else |
| 3187 | --i; |
| 3188 | case '1': case '2': case '3': |
| 3189 | case '4': case '5': case '6': case '7': |
| 3190 | n = 0; |
| 3191 | count = 0; |
| 3192 | while (*i >= '0' && *i <= '7' && count < 3) |
| 3193 | { |
| 3194 | n = (n<<3) + (*i++ - '0'); |
| 3195 | count++; |
| 3196 | } |
| 3197 | *o = n; |
| 3198 | break; |
| 3199 | hex: |
| 3200 | case 'x': |
| 3201 | n = 0; |
| 3202 | count = 0; |
| 3203 | while (i++, count++ < 2) |
| 3204 | { |
| 3205 | if (*i >= '0' && *i <= '9') |
| 3206 | n = (n<<4) + (*i - '0'); |
| 3207 | else if (*i >= 'a' && *i <= 'f') |
| 3208 | n = (n<<4) + (*i - 'a') + 10; |
| 3209 | else if (*i >= 'A' && *i <= 'F') |
| 3210 | n = (n<<4) + (*i - 'A') + 10; |
| 3211 | else |
| 3212 | break; |
| 3213 | } |
| 3214 | *o = n; |
| 3215 | break; |
| 3216 | case '\n': |
| 3217 | i++; /* punt */ |
| 3218 | o--; /* to account for o++ at end of loop */ |
| 3219 | break; |
| 3220 | case '\"': |
| 3221 | case '\'': |
| 3222 | case '\\': |
| 3223 | default: |
| 3224 | *o = *i++; |
| 3225 | break; |
| 3226 | } |
| 3227 | } |
| 3228 | else |
| 3229 | *o = *i++; |
| 3230 | } |
| 3231 | *o = '\0'; |
| 3232 | } |
| 3233 | |
| 3234 | static MenuRoot *GetRoot(char *name, char* fore, char *back) |
| 3235 | { |
| 3236 | MenuRoot *tmp; |
| 3237 | |
| 3238 | tmp = FindMenuRoot(name); |
| 3239 | if (tmp == NULL((void*)0)) |
| 3240 | tmp = NewMenuRoot(name); |
| 3241 | |
| 3242 | if (fore) |
| 3243 | { |
| 3244 | int save; |
| 3245 | |
| 3246 | save = Scr->FirstTime; |
| 3247 | Scr->FirstTime = TRUE1; |
| 3248 | GetColor(COLOR273, &tmp->hi_fore, fore); |
| 3249 | GetColor(COLOR273, &tmp->hi_back, back); |
| 3250 | Scr->FirstTime = save; |
| 3251 | } |
| 3252 | |
| 3253 | return tmp; |
| 3254 | } |
| 3255 | |
| 3256 | static void GotButton(int butt, int func) |
| 3257 | { |
| 3258 | int i; |
| 3259 | |
| 3260 | for (i = 0; i < NUM_CONTEXTS8; i++) |
| 3261 | { |
| 3262 | if ((cont & (1 << i)) == 0) |
| 3263 | continue; |
| 3264 | |
| 3265 | Scr->Mouse[butt][i][mods].func = func; |
| 3266 | if (func == F_MENU101) |
| 3267 | { |
| 3268 | pull->prev = NULL((void*)0); |
| 3269 | Scr->Mouse[butt][i][mods].menu = pull; |
| 3270 | } |
| 3271 | else |
| 3272 | { |
| 3273 | root = GetRoot(TWM_ROOT"bLoB_GoOp", NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 3274 | Scr->Mouse[butt][i][mods].item = AddToMenu(root,"x",Action, |
| 3275 | NULL((void*)0), func, NULLSTR((char *) ((void*)0)), NULLSTR((char *) ((void*)0))); |
| 3276 | } |
| 3277 | } |
| 3278 | Action = ""; |
| 3279 | pull = NULL((void*)0); |
| 3280 | cont = 0; |
| 3281 | mods_used |= mods; |
| 3282 | mods = 0; |
| 3283 | } |
| 3284 | |
| 3285 | static void GotKey(char *key, int func) |
| 3286 | { |
| 3287 | int i; |
| 3288 | |
| 3289 | for (i = 0; i < NUM_CONTEXTS8; i++) |
| 3290 | { |
| 3291 | if ((cont & (1 << i)) == 0) |
| 3292 | continue; |
| 3293 | if (!AddFuncKey(key, i, mods, func, Name, Action)) |
| 3294 | break; |
| 3295 | } |
| 3296 | |
| 3297 | Action = ""; |
| 3298 | pull = NULL((void*)0); |
| 3299 | cont = 0; |
| 3300 | mods_used |= mods; |
| 3301 | mods = 0; |
| 3302 | } |
| 3303 | |
| 3304 | |
| 3305 | static void GotTitleButton (char *bitmapname, int func, Boolint rightside) |
| 3306 | { |
| 3307 | if (!CreateTitleButton (bitmapname, func, Action, pull, rightside, True1)) { |
| 3308 | twmrc_error_prefix(); |
| 3309 | fprintf (stderrstderr, |
| 3310 | "unable to create %s titlebutton \"%s\"\n", |
| 3311 | rightside ? "right" : "left", bitmapname); |
| 3312 | } |
| 3313 | Action = ""; |
| 3314 | pull = NULL((void*)0); |
| 3315 | } |
| 3316 | |
| 3317 | static Boolint CheckWarpScreenArg (char *s) |
| 3318 | { |
| 3319 | XmuCopyISOLatin1Lowered (s, s); |
| 3320 | |
| 3321 | if (strcmp (s, WARPSCREEN_NEXT"next") == 0 || |
| 3322 | strcmp (s, WARPSCREEN_PREV"prev") == 0 || |
| 3323 | strcmp (s, WARPSCREEN_BACK"back") == 0) |
| 3324 | return True1; |
| 3325 | |
| 3326 | for (; *s && isascii(*s)(((*s) & ~0x7f) == 0) && isdigit(*s)((*__ctype_b_loc ())[(int) ((*s))] & (unsigned short int) _ISdigit); s++) ; /* SUPPRESS 530 */ |
| 3327 | return (*s ? False0 : True1); |
| 3328 | } |
| 3329 | |
| 3330 | |
| 3331 | static Boolint CheckWarpRingArg (char *s) |
| 3332 | { |
| 3333 | XmuCopyISOLatin1Lowered (s, s); |
| 3334 | |
| 3335 | if (strcmp (s, WARPSCREEN_NEXT"next") == 0 || |
| 3336 | strcmp (s, WARPSCREEN_PREV"prev") == 0) |
| 3337 | return True1; |
| 3338 | |
| 3339 | return False0; |
| 3340 | } |
| 3341 | |
| 3342 | |
| 3343 | static Boolint CheckColormapArg (char *s) |
| 3344 | { |
| 3345 | XmuCopyISOLatin1Lowered (s, s); |
| 3346 | |
| 3347 | if (strcmp (s, COLORMAP_NEXT"next") == 0 || |
| 3348 | strcmp (s, COLORMAP_PREV"prev") == 0 || |
| 3349 | strcmp (s, COLORMAP_DEFAULT"default") == 0) |
| 3350 | return True1; |
| 3351 | |
| 3352 | return False0; |
| 3353 | } |
| 3354 | |
| 3355 | |
| 3356 | void |
| 3357 | twmrc_error_prefix () |
| 3358 | { |
| 3359 | fprintf (stderrstderr, "%s: line %d: ", ProgramName, yylineno); |
| 3360 | } |
| 3361 |