#ifndef lint
static char yysccsid[] = "@(#)yaccpar	1.9 (Berkeley) 02/21/93";
#endif
#define YYBYACC 1
#define YYMAJOR 1
#define YYMINOR 9
#define yyclearin (yychar=(-1))
#define yyerrok (yyerrflag=0)
#define YYRECOVERING (yyerrflag!=0)
#define YYPREFIX "yy"
#line 40 "gram.y"
#include <stdio.h>
#include <ctype.h>
#include "twm.h"
#include "menus.h"
#include "list.h"
#include "util.h"
#include "screen.h"
#include "parse.h"
#include <X11/Xos.h>
#include <X11/Xmu/CharSet.h>

static char *Action = "";
static char *Name = "";
static MenuRoot	*root, *pull = NULL;

static MenuRoot *GetRoot();

static Bool CheckWarpScreenArg(), CheckWarpRingArg();
static Bool CheckColormapArg();
static void GotButton(), GotKey(), GotTitleButton();
static char *ptr;
static name_list **list;
static int cont = 0;
static int color;
int mods = 0;
unsigned int mods_used = (ShiftMask | ControlMask | Mod1Mask);

extern int do_single_keyword(), do_string_keyword(), do_number_keyword();
extern name_list **do_colorlist_keyword();
extern int do_color_keyword();
extern int yylineno;
#line 73 "gram.y"
typedef union
{
    int num;
    char *ptr;
} YYSTYPE;
#line 50 "y.tab.c"
#define LB 257
#define RB 258
#define LP 259
#define RP 260
#define MENUS 261
#define MENU 262
#define BUTTON 263
#define DEFAULT_FUNCTION 264
#define PLUS 265
#define MINUS 266
#define ALL 267
#define OR 268
#define CURSORS 269
#define PIXMAPS 270
#define ICONS 271
#define COLOR 272
#define MONOCHROME 273
#define FUNCTION 274
#define ICONMGR_SHOW 275
#define ICONMGR 276
#define WINDOW_FUNCTION 277
#define ZOOM 278
#define ICONMGRS 279
#define ICONMGR_GEOMETRY 280
#define ICONMGR_NOSHOW 281
#define MAKE_TITLE 282
#define ICONIFY_BY_UNMAPPING 283
#define DONT_ICONIFY_BY_UNMAPPING 284
#define NO_TITLE 285
#define AUTO_RAISE 286
#define NO_HILITE 287
#define ICON_REGION 288
#define META 289
#define SHIFT 290
#define LOCK 291
#define CONTROL 292
#define WINDOW 293
#define TITLE 294
#define ICON 295
#define ROOT 296
#define FRAME 297
#define VIRTUAL 298
#define COLON 299
#define EQUALS 300
#define SQUEEZE_TITLE 301
#define DONT_SQUEEZE_TITLE 302
#define START_ICONIFIED 303
#define NO_TITLE_HILITE 304
#define TITLE_HILITE 305
#define MOVE 306
#define RESIZE 307
#define WAIT 308
#define SELECT 309
#define KILL 310
#define LEFT_TITLEBUTTON 311
#define RIGHT_TITLEBUTTON 312
#define NUMBER 313
#define KEYWORD 314
#define NKEYWORD 315
#define CKEYWORD 316
#define CLKEYWORD 317
#define FKEYWORD 318
#define FSKEYWORD 319
#define SKEYWORD 320
#define DKEYWORD 321
#define JKEYWORD 322
#define WINDOW_RING 323
#define WARP_CURSOR 324
#define ERRORTOKEN 325
#define NO_STACKMODE 326
#define NAILEDDOWN 327
#define VIRTUALDESKTOP 328
#define STRING 329
#define YYERRCODE 256
short yylhs[] = {                                        -1,
    0,    8,    8,    9,    9,    9,    9,    9,    9,    9,
    9,    9,    9,    9,    9,   17,    9,    9,    9,    9,
    9,    9,    9,    9,   18,    9,   19,    9,    9,   21,
    9,   22,    9,   23,    9,    9,   24,    9,    9,   25,
    9,    9,   26,    9,    9,   27,    9,   28,    9,   29,
    9,   31,    9,   32,    9,   34,    9,   36,    9,   38,
    9,   39,    9,    9,    9,   40,    9,    9,   41,    9,
   42,    9,    9,   10,   11,   12,    6,    7,   43,   43,
   46,   46,   46,   46,   46,   46,   44,   44,   47,   47,
   47,   47,   47,   47,   47,   47,   47,   47,   45,   45,
   48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
   48,   14,   49,   49,   50,   15,   51,   51,   52,   52,
   52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
   52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
   37,   53,   53,   54,   56,   54,   54,   55,   57,   57,
   58,   13,   59,   13,   13,   61,   13,   60,   60,   20,
   62,   62,   63,   63,   16,   64,   64,   65,   35,   66,
   66,   67,   33,   68,   68,   69,   30,   70,   70,   71,
   71,    2,    2,    5,    5,    5,    3,    1,    4,
};
short yylen[] = {                                         2,
    1,    0,    2,    1,    1,    1,    1,    1,    6,    3,
    2,    2,    1,    2,    2,    0,    3,    1,    4,    4,
    2,    2,    2,    2,    0,    3,    0,    3,    1,    0,
    3,    0,    3,    0,    3,    1,    0,    3,    1,    0,
    3,    1,    0,    3,    1,    0,    3,    0,    3,    0,
    3,    0,    9,    0,    4,    0,    4,    0,    3,    0,
    3,    0,    3,    2,    2,    0,    3,    1,    0,    3,
    0,    3,    3,    1,    2,    2,    6,    6,    0,    2,
    1,    1,    1,    1,    2,    1,    0,    2,    1,    1,
    1,    1,    1,    1,    1,    1,    1,    1,    0,    2,
    1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
    1,    3,    0,    2,    2,    3,    0,    2,    3,    2,
    3,    2,    3,    2,    3,    2,    3,    2,    3,    2,
    3,    2,    3,    2,    3,    2,    3,    2,    3,    2,
    3,    0,    2,    2,    0,    4,    2,    3,    0,    2,
    2,    1,    0,    5,    1,    0,    3,    0,    5,    3,
    0,    2,    3,    4,    3,    0,    2,    1,    3,    0,
    2,    2,    3,    0,    2,    1,    3,    0,    2,    2,
    7,    1,    2,    1,    2,    2,    2,    1,    1,
};
short yydefred[] = {                                      2,
    0,    0,    4,    0,    0,    0,    0,    0,   58,   60,
   62,    0,   32,    0,    0,   30,    0,    0,   46,    0,
   25,    0,   50,    0,    0,    0,    0,   48,    0,    0,
    0,   74,    0,    0,   69,    0,    0,   71,    0,  188,
    0,    0,    3,    5,    6,    7,    8,    0,  189,  187,
  182,    0,   64,  117,   15,  113,   14,    0,    0,    0,
   56,    0,   65,   12,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
   76,   75,    0,    0,    0,    0,    0,   79,   23,   79,
   21,   22,   24,    0,    0,  183,    0,    0,  170,   59,
  142,   61,   63,    0,  166,   33,  161,   31,   10,   28,
   47,   17,   26,   44,   51,   38,    0,  158,  157,   49,
   35,    0,    0,   70,   67,   41,   72,   73,    0,    0,
    0,  178,   55,  116,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,  118,  112,    0,  114,    0,
    0,  174,   57,    0,    0,    0,    0,   19,   20,   86,
    0,   82,   83,   84,   99,   80,   87,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  115,  169,    0,  171,  141,    0,    0,  143,    0,  165,
  168,  167,  160,    0,  162,    0,  154,    0,   85,    0,
    0,    0,  177,    0,  179,  135,  127,  125,  121,  123,
  119,  129,  131,  133,  137,  139,  172,  147,    0,  173,
  176,  175,    0,    9,    0,  109,  110,  106,  107,  101,
  102,  103,  104,  105,  108,    0,  111,  100,   97,   98,
   94,   95,   89,   90,   91,   92,   93,   96,    0,   88,
   52,    0,  180,    0,    0,  163,    0,    0,  184,    0,
   78,   77,    0,    0,  149,  146,  164,  185,  186,  159,
   53,    0,    0,    0,  148,    0,  150,    0,  151,  181,
};
short yydgoto[] = {                                       1,
   41,   53,   42,   50,  260,   93,   89,    2,   43,   44,
   45,   46,   47,   57,   55,  106,   69,   70,   67,  108,
   65,   62,   78,   73,   85,   71,   68,   77,   72,  133,
  263,   95,  153,  104,  100,   58,  102,   59,   60,   84,
   83,   86,  129,  201,  200,  166,  250,  238,   98,  149,
   97,  146,  151,  188,  266,  254,  273,  277,   75,  157,
   76,  155,  195,  154,  192,  150,  184,  189,  222,  169,
  205,
};
short yysindex[] = {                                      0,
    0, -168,    0, -320, -300, -307, -242, -241,    0,    0,
    0, -320,    0, -307, -300,    0, -320,    0,    0,    0,
    0,    0,    0,    0, -320,    0,    0,    0,    0, -320,
 -320,    0, -300, -320,    0,    0,    0,    0, -320,    0,
 -283, -286,    0,    0,    0,    0,    0, -239,    0,    0,
    0, -320,    0,    0,    0,    0,    0, -236, -233, -233,
    0, -228,    0,    0, -223, -300, -228, -228, -228, -228,
 -228, -228, -228, -294, -222, -228, -228, -228, -264, -263,
    0,    0, -228, -228, -228, -228, -300,    0,    0,    0,
    0,    0,    0, -320, -219,    0,  808, -252,    0,    0,
    0,    0,    0, -217,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0, -280,    0,    0,    0,
    0, -307, -307,    0,    0,    0,    0,    0, -127,  -37,
 -248,    0,    0,    0, -320, -320, -320, -320, -320, -320,
 -320, -320, -320, -320, -320,    0,    0, -320,    0, -258,
 -230,    0,    0, -256, -255, -300, -253,    0,    0,    0,
 -300,    0,    0,    0,    0,    0,    0, -320, -251, -320,
 -320, -320, -320, -320, -320, -320, -320, -320, -320, -320,
    0,    0, -320,    0,    0, -320, -320,    0, -254,    0,
    0,    0,    0, -320,    0, -300,    0, -278,    0, -237,
  -48, -215,    0, -234,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0, -303,    0, -247,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0, -307,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0, -307,    0,
    0, -320,    0, -211, -300,    0, -300, -300,    0, -300,
    0,    0, -219, -245,    0,    0,    0,    0,    0,    0,
    0, -320, -250, -213,    0, -320,    0, -307,    0,    0,
};
short yyrindex[] = {                                      0,
    0,   48,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,  662,    0,    0,    1,    0,   75,
    0,  149,    0,  223,    0,  297,  371,    0,  445,    0,
    0,    0,    0,    0,    0,  519,  593,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0, -242,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,  736,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    9,    0,    0,    0,    0,    0,    0,    0,    0,  833,
  871,  897,  924,  950,  977, 1003, 1030, 1056, 1083, 1109,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0, -235,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
};
short yygindex[] = {                                      0,
   38,  845,    0,  896,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,  741,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0, -214,
    0,    0,    0,    0,    0,    0,    7,    0,    0,    0,
    0,    0,  -20,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,
};
#define YYTABLESIZE 1419
short yytable[] = {                                     182,
   29,  190,  193,  220,  197,  147,  203,  275,   40,   49,
   51,   52,   49,   90,   54,   56,   88,  257,  258,   94,
   99,  145,  144,  101,  252,   40,  117,  185,  105,  226,
  227,   51,   52,  107,  118,  122,  123,  132,  228,  152,
  156,   48,   40,  225,  251,  265,  278,    1,  271,   61,
  168,  229,  148,  272,   66,  230,  231,  232,  233,  234,
  235,  236,   74,   51,   52,   49,  103,   79,   80,  130,
   40,   82,   40,   40,   18,   40,   87,   40,   40,   91,
  144,  144,    0,   51,   52,  186,  187,    3,    0,   96,
    0,   40,    0,    4,    5,    6,    0,    0,    0,    0,
    7,    8,    9,   10,   11,   12,   13,    0,   14,   15,
   16,   17,   18,   19,   20,   21,   22,   23,   24,   25,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,  131,   26,   27,   28,   29,    0,    0,    0,    0,
  160,    0,   30,   31,    0,   32,   33,    0,   45,    0,
    0,   34,    0,    0,   35,   36,    0,   37,   38,   39,
   40,  161,  162,  163,  164,    0,    0,    0,    0,    0,
    0,  165,  170,  171,  172,  173,  174,  175,  176,  177,
  178,  179,  180,    0,    0,  181,    0,  183,    0,    0,
    0,  191,  194,    0,  198,    0,    0,    0,    0,    0,
    0,    0,    0,    0,    0,  202,  204,  206,  207,  208,
  209,  210,  211,  212,  213,  214,  215,  216,  239,  240,
  217,    0,   39,  218,  219,    0,    0,  241,    0,    0,
  160,  223,    0,    0,    0,    0,    0,  237,    0,    0,
  242,    0,    0,    0,  243,  244,  245,  246,  247,  248,
  249,  161,  162,  163,  164,    0,   29,   27,    0,    0,
  255,  167,   29,   29,   29,    0,    0,    0,    0,   29,
   29,   29,   29,   29,   29,   29,   81,   29,   29,   29,
   29,   29,   29,   29,   29,   29,   29,   29,   29,  264,
    0,    0,    0,    0,    0,    0,  152,   81,   81,   81,
   81,   29,   29,   29,   29,    0,    0,   81,    0,  274,
  276,   29,   29,  279,   29,   29,    0,    0,    0,    0,
   29,    0,    0,   29,   29,    0,   29,   29,   29,   29,
   18,   16,    0,    0,    0,    0,   18,   18,   18,    0,
    0,    0,    0,   18,   18,   18,   18,   18,   18,   18,
    0,   18,   18,   18,   18,   18,   18,   18,   18,   18,
   18,   18,   18,    0,    0,    0,    0,    0,    0,    0,
  155,    0,    0,    0,    0,   18,   18,   18,   18,    0,
    0,    0,    0,    0,    0,   18,   18,    0,   18,   18,
    0,    0,    0,    0,   18,    0,    0,   18,   18,    0,
   18,   18,   18,   18,   45,   43,    0,    0,    0,    0,
   45,   45,   45,    0,    0,    0,    0,   45,   45,   45,
   45,   45,   45,   45,    0,   45,   45,   45,   45,   45,
   45,   45,   45,   45,   45,   45,   45,    0,    0,    0,
    0,    0,    0,    0,   36,    0,    0,    0,    0,   45,
   45,   45,   45,    0,    0,    0,    0,    0,    0,   45,
   45,    0,   45,   45,    0,    0,    0,    0,   45,    0,
    0,   45,   45,    0,   45,   45,   45,   45,   39,   37,
    0,    0,    0,    0,   39,   39,   39,    0,    0,    0,
    0,   39,   39,   39,   39,   39,   39,   39,    0,   39,
   39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
   39,    0,    0,    0,    0,    0,    0,    0,   68,    0,
    0,    0,    0,   39,   39,   39,   39,    0,    0,    0,
    0,    0,    0,   39,   39,    0,   39,   39,    0,    0,
    0,    0,   39,    0,    0,   39,   39,    0,   39,   39,
   39,   39,  152,  153,    0,    0,    0,    0,  152,  152,
  152,    0,    0,    0,    0,  152,  152,  152,  152,  152,
  152,  152,    0,  152,  152,  152,  152,  152,  152,  152,
  152,  152,  152,  152,  152,    0,    0,    0,    0,    0,
    0,    0,   42,    0,    0,    0,    0,  152,  152,  152,
  152,    0,    0,    0,    0,    0,    0,  152,  152,    0,
  152,  152,    0,    0,    0,    0,  152,    0,    0,  152,
  152,    0,  152,  152,  152,  152,  155,  156,    0,    0,
    0,    0,  155,  155,  155,    0,    0,    0,    0,  155,
  155,  155,  155,  155,  155,  155,    0,  155,  155,  155,
  155,  155,  155,  155,  155,  155,  155,  155,  155,    0,
    0,   13,    0,    0,    0,    0,    0,    0,    0,    0,
    0,  155,  155,  155,  155,    0,    0,    0,    0,    0,
    0,  155,  155,    0,  155,  155,    0,    0,    0,    0,
  155,    0,    0,  155,  155,    0,  155,  155,  155,  155,
   36,   34,    0,    0,    0,    0,   36,   36,   36,    0,
    0,    0,    0,   36,   36,   36,   36,   36,   36,   36,
    0,   36,   36,   36,   36,   36,   36,   36,   36,   36,
   36,   36,   36,    0,    0,   11,    0,    0,    0,    0,
    0,    0,    0,    0,    0,   36,   36,   36,   36,    0,
    0,    0,    0,    0,    0,   36,   36,    0,   36,   36,
    0,    0,    0,    0,   36,    0,    0,   36,   36,    0,
   36,   36,   36,   36,   68,   66,    0,    0,    0,    0,
   68,   68,   68,    0,    0,    0,    0,   68,   68,   68,
   68,   68,   68,   68,    0,   68,   68,   68,   68,   68,
   68,   68,   68,   68,   68,   68,   68,  110,  111,  112,
  113,  114,  115,  116,    0,    0,  119,  120,  121,   68,
   68,   68,   68,  124,  125,  126,  127,    0,    0,   68,
   68,    0,   68,   68,    0,    0,    0,    0,   68,    0,
    0,   68,   68,    0,   68,   68,   68,   68,   42,   40,
    0,    0,    0,    0,   42,   42,   42,    0,   63,    0,
    0,   42,   42,   42,   42,   42,   42,   42,    0,   42,
   42,   42,   42,   42,   42,   42,   42,   42,   42,   42,
   42,    0,    0,    0,    0,    0,   92,    0,    0,    0,
    0,    0,    0,   42,   42,   42,   42,    0,    0,    0,
    0,    0,    0,   42,   42,    0,   42,   42,    0,    0,
   64,    0,   42,    0,    0,   42,   42,   13,   42,   42,
   42,   42,    0,   13,   13,   13,    0,    0,   81,    0,
   13,   13,   13,   13,   13,   13,   13,    0,   13,   13,
   13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
    0,  109,   13,   13,   13,   13,  158,  159,    0,    0,
    0,    0,   13,   13,    0,   13,   13,    0,    0,    0,
    0,   13,  128,    0,   13,   13,    0,   13,   13,   13,
   13,   11,    0,    0,    0,    0,    0,   11,   11,   11,
    0,    0,    0,    0,   11,   11,   11,   11,   11,   11,
   11,    0,   11,   11,   11,   11,   11,   11,   11,   11,
   11,   11,   11,   11,    0,    0,    0,    0,    0,    0,
    0,    0,    0,  221,    0,    0,   11,   11,   11,   11,
    0,    0,    0,    0,    0,    0,   11,   11,  253,   11,
   11,  196,    0,    0,    0,   11,  199,    0,   11,   11,
    0,   11,   11,   11,   11,  134,    0,    0,    0,  135,
  136,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  261,    0,    0,  137,    0,    0,    0,    0,    0,    0,
  136,  224,    0,  262,  136,  136,    0,    0,    0,    0,
    0,  138,  139,    0,  140,    0,    0,    0,  136,    0,
    0,    0,    0,  141,  142,  143,  144,  145,  256,    0,
  259,    0,  280,    0,    0,    0,  136,  136,  128,  136,
    0,    0,  128,  128,    0,    0,    0,    0,  136,  136,
  136,  136,  136,    0,    0,    0,  128,    0,    0,    0,
  267,    0,  268,  269,  126,  270,    0,    0,  126,  126,
    0,    0,    0,    0,  128,  128,    0,  128,    0,    0,
    0,    0,  126,    0,    0,    0,  128,  128,  128,  128,
  128,  122,    0,    0,    0,  122,  122,    0,    0,    0,
  126,  126,    0,  126,    0,    0,    0,    0,    0,  122,
    0,    0,  126,  126,  126,  126,  126,  124,    0,    0,
    0,  124,  124,    0,    0,    0,    0,  122,  122,    0,
  122,    0,    0,    0,    0,  124,    0,    0,    0,  122,
  122,  122,  122,  122,  120,    0,    0,    0,  120,  120,
    0,    0,    0,  124,  124,    0,  124,    0,    0,    0,
    0,    0,  120,    0,    0,  124,  124,  124,  124,  124,
  130,    0,    0,    0,  130,  130,    0,    0,    0,    0,
  120,  120,    0,  120,    0,    0,    0,    0,  130,    0,
    0,    0,  120,  120,  120,  120,  120,  132,    0,    0,
    0,  132,  132,    0,    0,    0,  130,  130,    0,  130,
    0,    0,    0,    0,    0,  132,    0,    0,  130,  130,
  130,  130,  130,  134,    0,    0,    0,  134,  134,    0,
    0,    0,    0,  132,  132,    0,  132,    0,    0,    0,
    0,  134,    0,    0,    0,  132,  132,  132,  132,  132,
  138,    0,    0,    0,  138,  138,    0,    0,    0,  134,
  134,    0,  134,    0,    0,    0,    0,    0,  138,    0,
    0,  134,  134,  134,  134,  134,  140,    0,    0,    0,
  140,  140,    0,    0,    0,    0,  138,  138,    0,  138,
    0,    0,    0,    0,  140,    0,    0,    0,  138,  138,
  138,  138,  138,    0,    0,    0,    0,    0,    0,    0,
    0,    0,  140,  140,    0,  140,    0,    0,    0,    0,
    0,    0,    0,    0,  140,  140,  140,  140,  140,
};
short yycheck[] = {                                     258,
    0,  258,  258,  258,  258,  258,  258,  258,  329,  313,
  318,  319,  313,  300,  257,  257,  300,  265,  266,  259,
  257,  257,  258,  257,  259,  329,  321,  258,  257,  267,
  268,  318,  319,  257,  257,  300,  300,  257,  276,  257,
  321,    4,  329,  322,  260,  257,  260,    0,  263,   12,
  299,  289,  305,  299,   17,  293,  294,  295,  296,  297,
  298,  299,   25,  318,  319,  313,   60,   30,   31,   90,
  329,   34,  329,  329,    0,  329,   39,  329,  329,   42,
  316,  317,   -1,  318,  319,  316,  317,  256,   -1,   52,
   -1,  329,   -1,  262,  263,  264,   -1,   -1,   -1,   -1,
  269,  270,  271,  272,  273,  274,  275,   -1,  277,  278,
  279,  280,  281,  282,  283,  284,  285,  286,  287,  288,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   94,  301,  302,  303,  304,   -1,   -1,   -1,   -1,
  268,   -1,  311,  312,   -1,  314,  315,   -1,    0,   -1,
   -1,  320,   -1,   -1,  323,  324,   -1,  326,  327,  328,
  329,  289,  290,  291,  292,   -1,   -1,   -1,   -1,   -1,
   -1,  299,  135,  136,  137,  138,  139,  140,  141,  142,
  143,  144,  145,   -1,   -1,  148,   -1,  150,   -1,   -1,
   -1,  154,  155,   -1,  157,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,  168,  169,  170,  171,  172,
  173,  174,  175,  176,  177,  178,  179,  180,  267,  268,
  183,   -1,    0,  186,  187,   -1,   -1,  276,   -1,   -1,
  268,  194,   -1,   -1,   -1,   -1,   -1,  200,   -1,   -1,
  289,   -1,   -1,   -1,  293,  294,  295,  296,  297,  298,
  299,  289,  290,  291,  292,   -1,  256,  257,   -1,   -1,
  223,  299,  262,  263,  264,   -1,   -1,   -1,   -1,  269,
  270,  271,  272,  273,  274,  275,  268,  277,  278,  279,
  280,  281,  282,  283,  284,  285,  286,  287,  288,  252,
   -1,   -1,   -1,   -1,   -1,   -1,    0,  289,  290,  291,
  292,  301,  302,  303,  304,   -1,   -1,  299,   -1,  272,
  273,  311,  312,  276,  314,  315,   -1,   -1,   -1,   -1,
  320,   -1,   -1,  323,  324,   -1,  326,  327,  328,  329,
  256,  257,   -1,   -1,   -1,   -1,  262,  263,  264,   -1,
   -1,   -1,   -1,  269,  270,  271,  272,  273,  274,  275,
   -1,  277,  278,  279,  280,  281,  282,  283,  284,  285,
  286,  287,  288,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
    0,   -1,   -1,   -1,   -1,  301,  302,  303,  304,   -1,
   -1,   -1,   -1,   -1,   -1,  311,  312,   -1,  314,  315,
   -1,   -1,   -1,   -1,  320,   -1,   -1,  323,  324,   -1,
  326,  327,  328,  329,  256,  257,   -1,   -1,   -1,   -1,
  262,  263,  264,   -1,   -1,   -1,   -1,  269,  270,  271,
  272,  273,  274,  275,   -1,  277,  278,  279,  280,  281,
  282,  283,  284,  285,  286,  287,  288,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,    0,   -1,   -1,   -1,   -1,  301,
  302,  303,  304,   -1,   -1,   -1,   -1,   -1,   -1,  311,
  312,   -1,  314,  315,   -1,   -1,   -1,   -1,  320,   -1,
   -1,  323,  324,   -1,  326,  327,  328,  329,  256,  257,
   -1,   -1,   -1,   -1,  262,  263,  264,   -1,   -1,   -1,
   -1,  269,  270,  271,  272,  273,  274,  275,   -1,  277,
  278,  279,  280,  281,  282,  283,  284,  285,  286,  287,
  288,   -1,   -1,   -1,   -1,   -1,   -1,   -1,    0,   -1,
   -1,   -1,   -1,  301,  302,  303,  304,   -1,   -1,   -1,
   -1,   -1,   -1,  311,  312,   -1,  314,  315,   -1,   -1,
   -1,   -1,  320,   -1,   -1,  323,  324,   -1,  326,  327,
  328,  329,  256,  257,   -1,   -1,   -1,   -1,  262,  263,
  264,   -1,   -1,   -1,   -1,  269,  270,  271,  272,  273,
  274,  275,   -1,  277,  278,  279,  280,  281,  282,  283,
  284,  285,  286,  287,  288,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,    0,   -1,   -1,   -1,   -1,  301,  302,  303,
  304,   -1,   -1,   -1,   -1,   -1,   -1,  311,  312,   -1,
  314,  315,   -1,   -1,   -1,   -1,  320,   -1,   -1,  323,
  324,   -1,  326,  327,  328,  329,  256,  257,   -1,   -1,
   -1,   -1,  262,  263,  264,   -1,   -1,   -1,   -1,  269,
  270,  271,  272,  273,  274,  275,   -1,  277,  278,  279,
  280,  281,  282,  283,  284,  285,  286,  287,  288,   -1,
   -1,    0,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,  301,  302,  303,  304,   -1,   -1,   -1,   -1,   -1,
   -1,  311,  312,   -1,  314,  315,   -1,   -1,   -1,   -1,
  320,   -1,   -1,  323,  324,   -1,  326,  327,  328,  329,
  256,  257,   -1,   -1,   -1,   -1,  262,  263,  264,   -1,
   -1,   -1,   -1,  269,  270,  271,  272,  273,  274,  275,
   -1,  277,  278,  279,  280,  281,  282,  283,  284,  285,
  286,  287,  288,   -1,   -1,    0,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,   -1,  301,  302,  303,  304,   -1,
   -1,   -1,   -1,   -1,   -1,  311,  312,   -1,  314,  315,
   -1,   -1,   -1,   -1,  320,   -1,   -1,  323,  324,   -1,
  326,  327,  328,  329,  256,  257,   -1,   -1,   -1,   -1,
  262,  263,  264,   -1,   -1,   -1,   -1,  269,  270,  271,
  272,  273,  274,  275,   -1,  277,  278,  279,  280,  281,
  282,  283,  284,  285,  286,  287,  288,   67,   68,   69,
   70,   71,   72,   73,   -1,   -1,   76,   77,   78,  301,
  302,  303,  304,   83,   84,   85,   86,   -1,   -1,  311,
  312,   -1,  314,  315,   -1,   -1,   -1,   -1,  320,   -1,
   -1,  323,  324,   -1,  326,  327,  328,  329,  256,  257,
   -1,   -1,   -1,   -1,  262,  263,  264,   -1,   14,   -1,
   -1,  269,  270,  271,  272,  273,  274,  275,   -1,  277,
  278,  279,  280,  281,  282,  283,  284,  285,  286,  287,
  288,   -1,   -1,   -1,   -1,   -1,   42,   -1,   -1,   -1,
   -1,   -1,   -1,  301,  302,  303,  304,   -1,   -1,   -1,
   -1,   -1,   -1,  311,  312,   -1,  314,  315,   -1,   -1,
   15,   -1,  320,   -1,   -1,  323,  324,  256,  326,  327,
  328,  329,   -1,  262,  263,  264,   -1,   -1,   33,   -1,
  269,  270,  271,  272,  273,  274,  275,   -1,  277,  278,
  279,  280,  281,  282,  283,  284,  285,  286,  287,  288,
   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   66,  301,  302,  303,  304,  122,  123,   -1,   -1,
   -1,   -1,  311,  312,   -1,  314,  315,   -1,   -1,   -1,
   -1,  320,   87,   -1,  323,  324,   -1,  326,  327,  328,
  329,  256,   -1,   -1,   -1,   -1,   -1,  262,  263,  264,
   -1,   -1,   -1,   -1,  269,  270,  271,  272,  273,  274,
  275,   -1,  277,  278,  279,  280,  281,  282,  283,  284,
  285,  286,  287,  288,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,  189,   -1,   -1,  301,  302,  303,  304,
   -1,   -1,   -1,   -1,   -1,   -1,  311,  312,  204,  314,
  315,  156,   -1,   -1,   -1,  320,  161,   -1,  323,  324,
   -1,  326,  327,  328,  329,  258,   -1,   -1,   -1,  262,
  263,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
  236,   -1,   -1,  276,   -1,   -1,   -1,   -1,   -1,   -1,
  258,  196,   -1,  249,  262,  263,   -1,   -1,   -1,   -1,
   -1,  294,  295,   -1,  297,   -1,   -1,   -1,  276,   -1,
   -1,   -1,   -1,  306,  307,  308,  309,  310,  223,   -1,
  225,   -1,  278,   -1,   -1,   -1,  294,  295,  258,  297,
   -1,   -1,  262,  263,   -1,   -1,   -1,   -1,  306,  307,
  308,  309,  310,   -1,   -1,   -1,  276,   -1,   -1,   -1,
  255,   -1,  257,  258,  258,  260,   -1,   -1,  262,  263,
   -1,   -1,   -1,   -1,  294,  295,   -1,  297,   -1,   -1,
   -1,   -1,  276,   -1,   -1,   -1,  306,  307,  308,  309,
  310,  258,   -1,   -1,   -1,  262,  263,   -1,   -1,   -1,
  294,  295,   -1,  297,   -1,   -1,   -1,   -1,   -1,  276,
   -1,   -1,  306,  307,  308,  309,  310,  258,   -1,   -1,
   -1,  262,  263,   -1,   -1,   -1,   -1,  294,  295,   -1,
  297,   -1,   -1,   -1,   -1,  276,   -1,   -1,   -1,  306,
  307,  308,  309,  310,  258,   -1,   -1,   -1,  262,  263,
   -1,   -1,   -1,  294,  295,   -1,  297,   -1,   -1,   -1,
   -1,   -1,  276,   -1,   -1,  306,  307,  308,  309,  310,
  258,   -1,   -1,   -1,  262,  263,   -1,   -1,   -1,   -1,
  294,  295,   -1,  297,   -1,   -1,   -1,   -1,  276,   -1,
   -1,   -1,  306,  307,  308,  309,  310,  258,   -1,   -1,
   -1,  262,  263,   -1,   -1,   -1,  294,  295,   -1,  297,
   -1,   -1,   -1,   -1,   -1,  276,   -1,   -1,  306,  307,
  308,  309,  310,  258,   -1,   -1,   -1,  262,  263,   -1,
   -1,   -1,   -1,  294,  295,   -1,  297,   -1,   -1,   -1,
   -1,  276,   -1,   -1,   -1,  306,  307,  308,  309,  310,
  258,   -1,   -1,   -1,  262,  263,   -1,   -1,   -1,  294,
  295,   -1,  297,   -1,   -1,   -1,   -1,   -1,  276,   -1,
   -1,  306,  307,  308,  309,  310,  258,   -1,   -1,   -1,
  262,  263,   -1,   -1,   -1,   -1,  294,  295,   -1,  297,
   -1,   -1,   -1,   -1,  276,   -1,   -1,   -1,  306,  307,
  308,  309,  310,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
   -1,   -1,  294,  295,   -1,  297,   -1,   -1,   -1,   -1,
   -1,   -1,   -1,   -1,  306,  307,  308,  309,  310,
};
#define YYFINAL 1
#ifndef YYDEBUG
#define YYDEBUG 0
#endif
#define YYMAXTOKEN 329
#if YYDEBUG
char *yyname[] = {
"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LB","RB","LP","RP","MENUS",
"MENU","BUTTON","DEFAULT_FUNCTION","PLUS","MINUS","ALL","OR","CURSORS",
"PIXMAPS","ICONS","COLOR","MONOCHROME","FUNCTION","ICONMGR_SHOW","ICONMGR",
"WINDOW_FUNCTION","ZOOM","ICONMGRS","ICONMGR_GEOMETRY","ICONMGR_NOSHOW",
"MAKE_TITLE","ICONIFY_BY_UNMAPPING","DONT_ICONIFY_BY_UNMAPPING","NO_TITLE",
"AUTO_RAISE","NO_HILITE","ICON_REGION","META","SHIFT","LOCK","CONTROL","WINDOW",
"TITLE","ICON","ROOT","FRAME","VIRTUAL","COLON","EQUALS","SQUEEZE_TITLE",
"DONT_SQUEEZE_TITLE","START_ICONIFIED","NO_TITLE_HILITE","TITLE_HILITE","MOVE",
"RESIZE","WAIT","SELECT","KILL","LEFT_TITLEBUTTON","RIGHT_TITLEBUTTON","NUMBER",
"KEYWORD","NKEYWORD","CKEYWORD","CLKEYWORD","FKEYWORD","FSKEYWORD","SKEYWORD",
"DKEYWORD","JKEYWORD","WINDOW_RING","WARP_CURSOR","ERRORTOKEN","NO_STACKMODE",
"NAILEDDOWN","VIRTUALDESKTOP","STRING",
};
char *yyrule[] = {
"$accept : twmrc",
"twmrc : stmts",
"stmts :",
"stmts : stmts stmt",
"stmt : error",
"stmt : noarg",
"stmt : sarg",
"stmt : narg",
"stmt : squeeze",
"stmt : ICON_REGION string DKEYWORD DKEYWORD number number",
"stmt : ICONMGR_GEOMETRY string number",
"stmt : ICONMGR_GEOMETRY string",
"stmt : ZOOM number",
"stmt : ZOOM",
"stmt : PIXMAPS pixmap_list",
"stmt : CURSORS cursor_list",
"$$1 :",
"stmt : ICONIFY_BY_UNMAPPING $$1 win_list",
"stmt : ICONIFY_BY_UNMAPPING",
"stmt : LEFT_TITLEBUTTON string EQUALS action",
"stmt : RIGHT_TITLEBUTTON string EQUALS action",
"stmt : button string",
"stmt : button action",
"stmt : string fullkey",
"stmt : button full",
"$$2 :",
"stmt : DONT_ICONIFY_BY_UNMAPPING $$2 win_list",
"$$3 :",
"stmt : ICONMGR_NOSHOW $$3 win_list",
"stmt : ICONMGR_NOSHOW",
"$$4 :",
"stmt : ICONMGRS $$4 iconm_list",
"$$5 :",
"stmt : ICONMGR_SHOW $$5 win_list",
"$$6 :",
"stmt : NO_TITLE_HILITE $$6 win_list",
"stmt : NO_TITLE_HILITE",
"$$7 :",
"stmt : NO_HILITE $$7 win_list",
"stmt : NO_HILITE",
"$$8 :",
"stmt : NO_STACKMODE $$8 win_list",
"stmt : NO_STACKMODE",
"$$9 :",
"stmt : NO_TITLE $$9 win_list",
"stmt : NO_TITLE",
"$$10 :",
"stmt : MAKE_TITLE $$10 win_list",
"$$11 :",
"stmt : START_ICONIFIED $$11 win_list",
"$$12 :",
"stmt : AUTO_RAISE $$12 win_list",
"$$13 :",
"stmt : MENU string LP string COLON string RP $$13 menu",
"$$14 :",
"stmt : MENU string $$14 menu",
"$$15 :",
"stmt : FUNCTION string $$15 function",
"$$16 :",
"stmt : ICONS $$16 icon_list",
"$$17 :",
"stmt : COLOR $$17 color_list",
"$$18 :",
"stmt : MONOCHROME $$18 color_list",
"stmt : DEFAULT_FUNCTION action",
"stmt : WINDOW_FUNCTION action",
"$$19 :",
"stmt : WARP_CURSOR $$19 win_list",
"stmt : WARP_CURSOR",
"$$20 :",
"stmt : WINDOW_RING $$20 win_list",
"$$21 :",
"stmt : NAILEDDOWN $$21 win_list",
"stmt : VIRTUALDESKTOP string number",
"noarg : KEYWORD",
"sarg : SKEYWORD string",
"narg : NKEYWORD number",
"full : EQUALS keys COLON contexts COLON action",
"fullkey : EQUALS keys COLON contextkeys COLON action",
"keys :",
"keys : keys key",
"key : META",
"key : SHIFT",
"key : LOCK",
"key : CONTROL",
"key : META number",
"key : OR",
"contexts :",
"contexts : contexts context",
"context : WINDOW",
"context : TITLE",
"context : ICON",
"context : ROOT",
"context : FRAME",
"context : ICONMGR",
"context : META",
"context : VIRTUAL",
"context : ALL",
"context : OR",
"contextkeys :",
"contextkeys : contextkeys contextkey",
"contextkey : WINDOW",
"contextkey : TITLE",
"contextkey : ICON",
"contextkey : ROOT",
"contextkey : FRAME",
"contextkey : ICONMGR",
"contextkey : META",
"contextkey : VIRTUAL",
"contextkey : ALL",
"contextkey : OR",
"contextkey : string",
"pixmap_list : LB pixmap_entries RB",
"pixmap_entries :",
"pixmap_entries : pixmap_entries pixmap_entry",
"pixmap_entry : TITLE_HILITE string",
"cursor_list : LB cursor_entries RB",
"cursor_entries :",
"cursor_entries : cursor_entries cursor_entry",
"cursor_entry : FRAME string string",
"cursor_entry : FRAME string",
"cursor_entry : TITLE string string",
"cursor_entry : TITLE string",
"cursor_entry : ICON string string",
"cursor_entry : ICON string",
"cursor_entry : ICONMGR string string",
"cursor_entry : ICONMGR string",
"cursor_entry : BUTTON string string",
"cursor_entry : BUTTON string",
"cursor_entry : MOVE string string",
"cursor_entry : MOVE string",
"cursor_entry : RESIZE string string",
"cursor_entry : RESIZE string",
"cursor_entry : WAIT string string",
"cursor_entry : WAIT string",
"cursor_entry : MENU string string",
"cursor_entry : MENU string",
"cursor_entry : SELECT string string",
"cursor_entry : SELECT string",
"cursor_entry : KILL string string",
"cursor_entry : KILL string",
"color_list : LB color_entries RB",
"color_entries :",
"color_entries : color_entries color_entry",
"color_entry : CLKEYWORD string",
"$$22 :",
"color_entry : CLKEYWORD string $$22 win_color_list",
"color_entry : CKEYWORD string",
"win_color_list : LB win_color_entries RB",
"win_color_entries :",
"win_color_entries : win_color_entries win_color_entry",
"win_color_entry : string string",
"squeeze : SQUEEZE_TITLE",
"$$23 :",
"squeeze : SQUEEZE_TITLE $$23 LB win_sqz_entries RB",
"squeeze : DONT_SQUEEZE_TITLE",
"$$24 :",
"squeeze : DONT_SQUEEZE_TITLE $$24 win_list",
"win_sqz_entries :",
"win_sqz_entries : win_sqz_entries string JKEYWORD signed_number number",
"iconm_list : LB iconm_entries RB",
"iconm_entries :",
"iconm_entries : iconm_entries iconm_entry",
"iconm_entry : string string number",
"iconm_entry : string string string number",
"win_list : LB win_entries RB",
"win_entries :",
"win_entries : win_entries win_entry",
"win_entry : string",
"icon_list : LB icon_entries RB",
"icon_entries :",
"icon_entries : icon_entries icon_entry",
"icon_entry : string string",
"function : LB function_entries RB",
"function_entries :",
"function_entries : function_entries function_entry",
"function_entry : action",
"menu : LB menu_entries RB",
"menu_entries :",
"menu_entries : menu_entries menu_entry",
"menu_entry : string action",
"menu_entry : string LP string COLON string RP action",
"action : FKEYWORD",
"action : FSKEYWORD string",
"signed_number : number",
"signed_number : PLUS number",
"signed_number : MINUS number",
"button : BUTTON number",
"string : STRING",
"number : NUMBER",
};
#endif
#ifdef YYSTACKSIZE
#undef YYMAXDEPTH
#define YYMAXDEPTH YYSTACKSIZE
#else
#ifdef YYMAXDEPTH
#define YYSTACKSIZE YYMAXDEPTH
#else
#define YYSTACKSIZE 500
#define YYMAXDEPTH 500
#endif
#endif
int yydebug;
int yynerrs;
int yyerrflag;
int yychar;
short *yyssp;
YYSTYPE *yyvsp;
YYSTYPE yyval;
YYSTYPE yylval;
short yyss[YYSTACKSIZE];
YYSTYPE yyvs[YYSTACKSIZE];
#define yystacksize YYSTACKSIZE
#line 623 "gram.y"
yyerror(s) char *s;
{
    twmrc_error_prefix();
    fprintf (stderr, "error in input file:  %s\n", s ? s : "");
    ParseError = 1;
}
RemoveDQuote(str)
char *str;
{
    register char *i, *o;
    register n;
    register count;

    for (i=str+1, o=str; *i && *i != '\"'; o++)
    {
	if (*i == '\\')
	{
	    switch (*++i)
	    {
	    case 'n':
		*o = '\n';
		i++;
		break;
	    case 'b':
		*o = '\b';
		i++;
		break;
	    case 'r':
		*o = '\r';
		i++;
		break;
	    case 't':
		*o = '\t';
		i++;
		break;
	    case 'f':
		*o = '\f';
		i++;
		break;
	    case '0':
		if (*++i == 'x')
		    goto hex;
		else
		    --i;
	    case '1': case '2': case '3':
	    case '4': case '5': case '6': case '7':
		n = 0;
		count = 0;
		while (*i >= '0' && *i <= '7' && count < 3)
		{
		    n = (n<<3) + (*i++ - '0');
		    count++;
		}
		*o = n;
		break;
	    hex:
	    case 'x':
		n = 0;
		count = 0;
		while (i++, count++ < 2)
		{
		    if (*i >= '0' && *i <= '9')
			n = (n<<4) + (*i - '0');
		    else if (*i >= 'a' && *i <= 'f')
			n = (n<<4) + (*i - 'a') + 10;
		    else if (*i >= 'A' && *i <= 'F')
			n = (n<<4) + (*i - 'A') + 10;
		    else
			break;
		}
		*o = n;
		break;
	    case '\n':
		i++;	/* punt */
		o--;	/* to account for o++ at end of loop */
		break;
	    case '\"':
	    case '\'':
	    case '\\':
	    default:
		*o = *i++;
		break;
	    }
	}
	else
	    *o = *i++;
    }
    *o = '\0';
}

static MenuRoot *GetRoot(name, fore, back)
char *name;
char *fore, *back;
{
    MenuRoot *tmp;

    tmp = FindMenuRoot(name);
    if (tmp == NULL)
	tmp = NewMenuRoot(name);

    if (fore)
    {
	int save;

	save = Scr->FirstTime;
	Scr->FirstTime = TRUE;
	GetColor(COLOR, &tmp->hi_fore, fore);
	GetColor(COLOR, &tmp->hi_back, back);
	Scr->FirstTime = save;
    }

    return tmp;
}

static void GotButton(butt, func)
int butt, func;
{
    int i;

    for (i = 0; i < NUM_CONTEXTS; i++)
    {
	if ((cont & (1 << i)) == 0)
	    continue;

	Scr->Mouse[butt][i][mods].func = func;
	if (func == F_MENU)
	{
	    pull->prev = NULL;
	    Scr->Mouse[butt][i][mods].menu = pull;
	}
	else
	{
	    root = GetRoot(TWM_ROOT, NULLSTR, NULLSTR);
	    Scr->Mouse[butt][i][mods].item = AddToMenu(root,"x",Action,
		    NULLSTR, func, NULLSTR, NULLSTR);
	}
    }
    Action = "";
    pull = NULL;
    cont = 0;
    mods_used |= mods;
    mods = 0;
}

static void GotKey(key, func)
char *key;
int func;
{
    int i;

    for (i = 0; i < NUM_CONTEXTS; i++)
    {
	if ((cont & (1 << i)) == 0) 
	  continue;
	if (!AddFuncKey(key, i, mods, func, Name, Action)) 
	  break;
    }

    Action = "";
    pull = NULL;
    cont = 0;
    mods_used |= mods;
    mods = 0;
}


static void GotTitleButton (bitmapname, func, rightside)
    char *bitmapname;
    int func;
    Bool rightside;
{
    if (!CreateTitleButton (bitmapname, func, Action, pull, rightside, True)) {
	twmrc_error_prefix();
	fprintf (stderr, 
		 "unable to create %s titlebutton \"%s\"\n",
		 rightside ? "right" : "left", bitmapname);
    }
    Action = "";
    pull = NULL;
}

static Bool CheckWarpScreenArg (s)
    register char *s;
{
    XmuCopyISOLatin1Lowered (s, s);

    if (strcmp (s,  WARPSCREEN_NEXT) == 0 ||
	strcmp (s,  WARPSCREEN_PREV) == 0 ||
	strcmp (s,  WARPSCREEN_BACK) == 0)
      return True;

    for (; *s && isascii(*s) && isdigit(*s); s++) ;
    return (*s ? False : True);
}


static Bool CheckWarpRingArg (s)
    register char *s;
{
    XmuCopyISOLatin1Lowered (s, s);

    if (strcmp (s,  WARPSCREEN_NEXT) == 0 ||
	strcmp (s,  WARPSCREEN_PREV) == 0)
      return True;

    return False;
}


static Bool CheckColormapArg (s)
    register char *s;
{
    XmuCopyISOLatin1Lowered (s, s);

    if (strcmp (s, COLORMAP_NEXT) == 0 ||
	strcmp (s, COLORMAP_PREV) == 0 ||
	strcmp (s, COLORMAP_DEFAULT) == 0)
      return True;

    return False;
}


twmrc_error_prefix ()
{
    fprintf (stderr, "%s:  line %d:  ", ProgramName, yylineno);
}
#line 1035 "y.tab.c"
#define YYABORT goto yyabort
#define YYREJECT goto yyabort
#define YYACCEPT goto yyaccept
#define YYERROR goto yyerrlab
int
yyparse()
{
    register int yym, yyn, yystate;
#if YYDEBUG
    register char *yys;
    extern char *getenv();

    if (yys = getenv("YYDEBUG"))
    {
        yyn = *yys;
        if (yyn >= '0' && yyn <= '9')
            yydebug = yyn - '0';
    }
#endif

    yynerrs = 0;
    yyerrflag = 0;
    yychar = (-1);

    yyssp = yyss;
    yyvsp = yyvs;
    *yyssp = yystate = 0;

yyloop:
    if (yyn = yydefred[yystate]) goto yyreduce;
    if (yychar < 0)
    {
        if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
        if (yydebug)
        {
            yys = 0;
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
            if (!yys) yys = "illegal-symbol";
            printf("%sdebug: state %d, reading %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
    }
    if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: state %d, shifting to state %d\n",
                    YYPREFIX, yystate, yytable[yyn]);
#endif
        if (yyssp >= yyss + yystacksize - 1)
        {
            goto yyoverflow;
        }
        *++yyssp = yystate = yytable[yyn];
        *++yyvsp = yylval;
        yychar = (-1);
        if (yyerrflag > 0)  --yyerrflag;
        goto yyloop;
    }
    if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
    {
        yyn = yytable[yyn];
        goto yyreduce;
    }
    if (yyerrflag) goto yyinrecovery;
#ifdef lint
    goto yynewerror;
#endif
yynewerror:
    yyerror("syntax error");
#ifdef lint
    goto yyerrlab;
#endif
yyerrlab:
    ++yynerrs;
yyinrecovery:
    if (yyerrflag < 3)
    {
        yyerrflag = 3;
        for (;;)
        {
            if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
                    yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: state %d, error recovery shifting\
 to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
#endif
                if (yyssp >= yyss + yystacksize - 1)
                {
                    goto yyoverflow;
                }
                *++yyssp = yystate = yytable[yyn];
                *++yyvsp = yylval;
                goto yyloop;
            }
            else
            {
#if YYDEBUG
                if (yydebug)
                    printf("%sdebug: error recovery discarding state %d\n",
                            YYPREFIX, *yyssp);
#endif
                if (yyssp <= yyss) goto yyabort;
                --yyssp;
                --yyvsp;
            }
        }
    }
    else
    {
        if (yychar == 0) goto yyabort;
#if YYDEBUG
        if (yydebug)
        {
            yys = 0;
            if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
            if (!yys) yys = "illegal-symbol";
            printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
                    YYPREFIX, yystate, yychar, yys);
        }
#endif
        yychar = (-1);
        goto yyloop;
    }
yyreduce:
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: state %d, reducing by rule %d (%s)\n",
                YYPREFIX, yystate, yyn, yyrule[yyn]);
#endif
    yym = yylen[yyn];
    yyval = yyvsp[1-yym];
    switch (yyn)
    {
case 9:
#line 113 "gram.y"
{ AddIconRegion(yyvsp[-4].ptr, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num); }
break;
case 10:
#line 114 "gram.y"
{ if (Scr->FirstTime)
						  {
						    Scr->iconmgr.geometry=yyvsp[-1].ptr;
						    Scr->iconmgr.columns=yyvsp[0].num;
						  }
						}
break;
case 11:
#line 120 "gram.y"
{ if (Scr->FirstTime)
						    Scr->iconmgr.geometry = yyvsp[0].ptr;
						}
break;
case 12:
#line 123 "gram.y"
{ if (Scr->FirstTime)
					  {
						Scr->DoZoom = TRUE;
						Scr->ZoomCount = yyvsp[0].num;
					  }
					}
break;
case 13:
#line 129 "gram.y"
{ if (Scr->FirstTime) 
						Scr->DoZoom = TRUE; }
break;
case 14:
#line 131 "gram.y"
{}
break;
case 15:
#line 132 "gram.y"
{}
break;
case 16:
#line 133 "gram.y"
{ list = &Scr->IconifyByUn; }
break;
case 18:
#line 135 "gram.y"
{ if (Scr->FirstTime) 
		    Scr->IconifyByUnmapping = TRUE; }
break;
case 19:
#line 137 "gram.y"
{ 
					  GotTitleButton (yyvsp[-2].ptr, yyvsp[0].num, False);
					}
break;
case 20:
#line 140 "gram.y"
{ 
					  GotTitleButton (yyvsp[-2].ptr, yyvsp[0].num, True);
					}
break;
case 21:
#line 143 "gram.y"
{ root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR);
					  Scr->Mouse[yyvsp[-1].num][C_ROOT][0].func = F_MENU;
					  Scr->Mouse[yyvsp[-1].num][C_ROOT][0].menu = root;
					}
break;
case 22:
#line 147 "gram.y"
{ Scr->Mouse[yyvsp[-1].num][C_ROOT][0].func = yyvsp[0].num;
					  if (yyvsp[0].num == F_MENU)
					  {
					    pull->prev = NULL;
					    Scr->Mouse[yyvsp[-1].num][C_ROOT][0].menu = pull;
					  }
					  else
					  {
					    root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
					    Scr->Mouse[yyvsp[-1].num][C_ROOT][0].item = 
						AddToMenu(root,"x",Action,
							  NULLSTR,yyvsp[0].num,NULLSTR,NULLSTR);
					  }
					  Action = "";
					  pull = NULL;
					}
break;
case 23:
#line 163 "gram.y"
{ GotKey(yyvsp[-1].ptr, yyvsp[0].num); }
break;
case 24:
#line 164 "gram.y"
{ GotButton(yyvsp[-1].num, yyvsp[0].num); }
break;
case 25:
#line 165 "gram.y"
{ list = &Scr->DontIconify; }
break;
case 27:
#line 167 "gram.y"
{ list = &Scr->IconMgrNoShow; }
break;
case 29:
#line 169 "gram.y"
{ Scr->IconManagerDontShow = TRUE; }
break;
case 30:
#line 170 "gram.y"
{ list = &Scr->IconMgrs; }
break;
case 32:
#line 172 "gram.y"
{ list = &Scr->IconMgrShow; }
break;
case 34:
#line 174 "gram.y"
{ list = &Scr->NoTitleHighlight; }
break;
case 36:
#line 176 "gram.y"
{ if (Scr->FirstTime)
						Scr->TitleHighlight = FALSE; }
break;
case 37:
#line 178 "gram.y"
{ list = &Scr->NoHighlight; }
break;
case 39:
#line 180 "gram.y"
{ if (Scr->FirstTime)
						Scr->Highlight = FALSE; }
break;
case 40:
#line 182 "gram.y"
{ list = &Scr->NoStackModeL; }
break;
case 42:
#line 184 "gram.y"
{ if (Scr->FirstTime)
						Scr->StackMode = FALSE; }
break;
case 43:
#line 186 "gram.y"
{ list = &Scr->NoTitle; }
break;
case 45:
#line 188 "gram.y"
{ if (Scr->FirstTime)
						Scr->NoTitlebar = TRUE; }
break;
case 46:
#line 190 "gram.y"
{ list = &Scr->MakeTitle; }
break;
case 48:
#line 192 "gram.y"
{ list = &Scr->StartIconified; }
break;
case 50:
#line 194 "gram.y"
{ list = &Scr->AutoRaise; }
break;
case 52:
#line 196 "gram.y"
{
					root = GetRoot(yyvsp[-5].ptr, yyvsp[-3].ptr, yyvsp[-1].ptr); }
break;
case 53:
#line 198 "gram.y"
{ root->real_menu = TRUE;}
break;
case 54:
#line 199 "gram.y"
{ root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); }
break;
case 55:
#line 200 "gram.y"
{ root->real_menu = TRUE; }
break;
case 56:
#line 201 "gram.y"
{ root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); }
break;
case 58:
#line 203 "gram.y"
{ list = &Scr->IconNames; }
break;
case 60:
#line 205 "gram.y"
{ color = COLOR; }
break;
case 62:
#line 207 "gram.y"
{ color = MONOCHROME; }
break;
case 64:
#line 209 "gram.y"
{ Scr->DefaultFunction.func = yyvsp[0].num;
					  if (yyvsp[0].num == F_MENU)
					  {
					    pull->prev = NULL;
					    Scr->DefaultFunction.menu = pull;
					  }
					  else
					  {
					    root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
					    Scr->DefaultFunction.item = 
						AddToMenu(root,"x",Action,
							  NULLSTR,yyvsp[0].num, NULLSTR, NULLSTR);
					  }
					  Action = "";
					  pull = NULL;
					}
break;
case 65:
#line 225 "gram.y"
{ Scr->WindowFunction.func = yyvsp[0].num;
					   root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
					   Scr->WindowFunction.item = 
						AddToMenu(root,"x",Action,
							  NULLSTR,yyvsp[0].num, NULLSTR, NULLSTR);
					   Action = "";
					   pull = NULL;
					}
break;
case 66:
#line 233 "gram.y"
{ list = &Scr->WarpCursorL; }
break;
case 68:
#line 235 "gram.y"
{ if (Scr->FirstTime) 
					    Scr->WarpCursor = TRUE; }
break;
case 69:
#line 237 "gram.y"
{ list = &Scr->WindowRingL; }
break;
case 71:
#line 239 "gram.y"
{ list = &Scr->NailedDown; }
break;
case 73:
#line 242 "gram.y"
{ SetVirtualDesktop(yyvsp[-1].ptr, yyvsp[0].num); }
break;
case 74:
#line 246 "gram.y"
{ if (!do_single_keyword (yyvsp[0].num)) {
					    twmrc_error_prefix();
					    fprintf (stderr,
					"unknown singleton keyword %d\n",
						     yyvsp[0].num);
					    ParseError = 1;
					  }
					}
break;
case 75:
#line 256 "gram.y"
{ if (!do_string_keyword (yyvsp[-1].num, yyvsp[0].ptr)) {
					    twmrc_error_prefix();
					    fprintf (stderr,
				"unknown string keyword %d (value \"%s\")\n",
						     yyvsp[-1].num, yyvsp[0].ptr);
					    ParseError = 1;
					  }
					}
break;
case 76:
#line 266 "gram.y"
{ if (!do_number_keyword (yyvsp[-1].num, yyvsp[0].num)) {
					    twmrc_error_prefix();
					    fprintf (stderr,
				"unknown numeric keyword %d (value %d)\n",
						     yyvsp[-1].num, yyvsp[0].num);
					    ParseError = 1;
					  }
					}
break;
case 77:
#line 278 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 78:
#line 281 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 81:
#line 288 "gram.y"
{ mods |= Mod1Mask; }
break;
case 82:
#line 289 "gram.y"
{ mods |= ShiftMask; }
break;
case 83:
#line 290 "gram.y"
{ mods |= LockMask; }
break;
case 84:
#line 291 "gram.y"
{ mods |= ControlMask; }
break;
case 85:
#line 292 "gram.y"
{ if (yyvsp[0].num < 1 || yyvsp[0].num > 5) {
					     twmrc_error_prefix();
					     fprintf (stderr, 
				"bad modifier number (%d), must be 1-5\n",
						      yyvsp[0].num);
					     ParseError = 1;
					  } else {
					     mods |= (Mod1Mask << (yyvsp[0].num - 1));
					  }
					}
break;
case 86:
#line 302 "gram.y"
{ }
break;
case 89:
#line 309 "gram.y"
{ cont |= C_WINDOW_BIT; }
break;
case 90:
#line 310 "gram.y"
{ cont |= C_TITLE_BIT; }
break;
case 91:
#line 311 "gram.y"
{ cont |= C_ICON_BIT; }
break;
case 92:
#line 312 "gram.y"
{ cont |= C_ROOT_BIT; }
break;
case 93:
#line 313 "gram.y"
{ cont |= C_FRAME_BIT; }
break;
case 94:
#line 314 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 95:
#line 315 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 96:
#line 316 "gram.y"
{ cont |= C_VIRTUAL_BIT; }
break;
case 97:
#line 317 "gram.y"
{ cont |= C_ALL_BITS; }
break;
case 98:
#line 318 "gram.y"
{  }
break;
case 101:
#line 325 "gram.y"
{ cont |= C_WINDOW_BIT; }
break;
case 102:
#line 326 "gram.y"
{ cont |= C_TITLE_BIT; }
break;
case 103:
#line 327 "gram.y"
{ cont |= C_ICON_BIT; }
break;
case 104:
#line 328 "gram.y"
{ cont |= C_ROOT_BIT; }
break;
case 105:
#line 329 "gram.y"
{ cont |= C_FRAME_BIT; }
break;
case 106:
#line 330 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 107:
#line 331 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 108:
#line 332 "gram.y"
{ cont |= C_VIRTUAL_BIT; }
break;
case 109:
#line 333 "gram.y"
{ cont |= C_ALL_BITS; }
break;
case 110:
#line 334 "gram.y"
{ }
break;
case 111:
#line 335 "gram.y"
{ Name = yyvsp[0].ptr; cont |= C_NAME_BIT; }
break;
case 115:
#line 346 "gram.y"
{ SetHighlightPixmap (yyvsp[0].ptr); }
break;
case 119:
#line 357 "gram.y"
{
			NewBitmapCursor(&Scr->FrameCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 120:
#line 359 "gram.y"
{
			NewFontCursor(&Scr->FrameCursor, yyvsp[0].ptr); }
break;
case 121:
#line 361 "gram.y"
{
			NewBitmapCursor(&Scr->TitleCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 122:
#line 363 "gram.y"
{
			NewFontCursor(&Scr->TitleCursor, yyvsp[0].ptr); }
break;
case 123:
#line 365 "gram.y"
{
			NewBitmapCursor(&Scr->IconCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 124:
#line 367 "gram.y"
{
			NewFontCursor(&Scr->IconCursor, yyvsp[0].ptr); }
break;
case 125:
#line 369 "gram.y"
{
			NewBitmapCursor(&Scr->IconMgrCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 126:
#line 371 "gram.y"
{
			NewFontCursor(&Scr->IconMgrCursor, yyvsp[0].ptr); }
break;
case 127:
#line 373 "gram.y"
{
			NewBitmapCursor(&Scr->ButtonCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 128:
#line 375 "gram.y"
{
			NewFontCursor(&Scr->ButtonCursor, yyvsp[0].ptr); }
break;
case 129:
#line 377 "gram.y"
{
			NewBitmapCursor(&Scr->MoveCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 130:
#line 379 "gram.y"
{
			NewFontCursor(&Scr->MoveCursor, yyvsp[0].ptr); }
break;
case 131:
#line 381 "gram.y"
{
			NewBitmapCursor(&Scr->ResizeCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 132:
#line 383 "gram.y"
{
			NewFontCursor(&Scr->ResizeCursor, yyvsp[0].ptr); }
break;
case 133:
#line 385 "gram.y"
{
			NewBitmapCursor(&Scr->WaitCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 134:
#line 387 "gram.y"
{
			NewFontCursor(&Scr->WaitCursor, yyvsp[0].ptr); }
break;
case 135:
#line 389 "gram.y"
{
			NewBitmapCursor(&Scr->MenuCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 136:
#line 391 "gram.y"
{
			NewFontCursor(&Scr->MenuCursor, yyvsp[0].ptr); }
break;
case 137:
#line 393 "gram.y"
{
			NewBitmapCursor(&Scr->SelectCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 138:
#line 395 "gram.y"
{
			NewFontCursor(&Scr->SelectCursor, yyvsp[0].ptr); }
break;
case 139:
#line 397 "gram.y"
{
			NewBitmapCursor(&Scr->DestroyCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 140:
#line 399 "gram.y"
{
			NewFontCursor(&Scr->DestroyCursor, yyvsp[0].ptr); }
break;
case 144:
#line 410 "gram.y"
{ if (!do_colorlist_keyword (yyvsp[-1].num, color,
								     yyvsp[0].ptr)) {
					    twmrc_error_prefix();
					    fprintf (stderr,
			"unhandled list color keyword %d (string \"%s\")\n",
						     yyvsp[-1].num, yyvsp[0].ptr);
					    ParseError = 1;
					  }
					}
break;
case 145:
#line 419 "gram.y"
{ list = do_colorlist_keyword(yyvsp[-1].num,color,
								      yyvsp[0].ptr);
					  if (!list) {
					    twmrc_error_prefix();
					    fprintf (stderr,
			"unhandled color list keyword %d (string \"%s\")\n",
						     yyvsp[-1].num, yyvsp[0].ptr);
					    ParseError = 1;
					  }
					}
break;
case 147:
#line 430 "gram.y"
{ if (!do_color_keyword (yyvsp[-1].num, color,
								 yyvsp[0].ptr)) {
					    twmrc_error_prefix();
					    fprintf (stderr,
			"unhandled color keyword %d (string \"%s\")\n",
						     yyvsp[-1].num, yyvsp[0].ptr);
					    ParseError = 1;
					  }
					}
break;
case 151:
#line 449 "gram.y"
{ if (Scr->FirstTime &&
					      color == Scr->Monochrome)
					    AddToList(list, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 152:
#line 454 "gram.y"
{ 
#ifdef SHAPE
				    if (HasShape) Scr->SqueezeTitle = TRUE;
#endif
				}
break;
case 153:
#line 459 "gram.y"
{ list = &Scr->SqueezeTitleL; 
#ifdef SHAPE
				  if (HasShape && Scr->SqueezeTitle == -1)
				    Scr->SqueezeTitle = TRUE;
#endif
				}
break;
case 155:
#line 466 "gram.y"
{ Scr->SqueezeTitle = FALSE; }
break;
case 156:
#line 467 "gram.y"
{ list = &Scr->DontSqueezeTitleL; }
break;
case 159:
#line 472 "gram.y"
{
				if (Scr->FirstTime) {
				   do_squeeze_entry (list, yyvsp[-3].ptr, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num);
				}
			}
break;
case 163:
#line 487 "gram.y"
{ if (Scr->FirstTime)
					    AddToList(list, yyvsp[-2].ptr, (char *)
						AllocateIconManager(yyvsp[-2].ptr, NULLSTR,
							yyvsp[-1].ptr,yyvsp[0].num));
					}
break;
case 164:
#line 493 "gram.y"
{ if (Scr->FirstTime)
					    AddToList(list, yyvsp[-3].ptr, (char *)
						AllocateIconManager(yyvsp[-3].ptr,yyvsp[-2].ptr,
						yyvsp[-1].ptr, yyvsp[0].num));
					}
break;
case 168:
#line 507 "gram.y"
{ if (Scr->FirstTime)
					    AddToList(list, yyvsp[0].ptr, 0);
					}
break;
case 172:
#line 519 "gram.y"
{ if (Scr->FirstTime) AddToList(list, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 176:
#line 529 "gram.y"
{ AddToMenu(root, "", Action, NULLSTR, yyvsp[0].num,
						NULLSTR, NULLSTR);
					  Action = "";
					}
break;
case 180:
#line 542 "gram.y"
{ AddToMenu(root, yyvsp[-1].ptr, Action, pull, yyvsp[0].num,
						NULLSTR, NULLSTR);
					  Action = "";
					  pull = NULL;
					}
break;
case 181:
#line 547 "gram.y"
{
					  AddToMenu(root, yyvsp[-6].ptr, Action, pull, yyvsp[0].num,
						yyvsp[-4].ptr, yyvsp[-2].ptr);
					  Action = "";
					  pull = NULL;
					}
break;
case 182:
#line 555 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 183:
#line 556 "gram.y"
{
				yyval.num = yyvsp[-1].num;
				Action = yyvsp[0].ptr;
				switch (yyvsp[-1].num) {
				  case F_MENU:
				    pull = GetRoot (yyvsp[0].ptr, NULLSTR,NULLSTR);
				    pull->prev = root;
				    break;
				  case F_WARPRING:
				    if (!CheckWarpRingArg (Action)) {
					twmrc_error_prefix();
					fprintf (stderr,
			"ignoring invalid f.warptoring argument \"%s\"\n",
						 Action);
					yyval.num = F_NOP;
				    }
				  case F_WARPTOSCREEN:
				    if (!CheckWarpScreenArg (Action)) {
					twmrc_error_prefix();
					fprintf (stderr, 
			"ignoring invalid f.warptoscreen argument \"%s\"\n", 
					         Action);
					yyval.num = F_NOP;
				    }
				    break;
				  case F_COLORMAP:
				    if (CheckColormapArg (Action)) {
					yyval.num = F_COLORMAP;
				    } else {
					twmrc_error_prefix();
					fprintf (stderr,
			"ignoring invalid f.colormap argument \"%s\"\n", 
						 Action);
					yyval.num = F_NOP;
				    }
				    break;
				} /* end switch */
				   }
break;
case 184:
#line 597 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 185:
#line 598 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 186:
#line 599 "gram.y"
{ yyval.num = -(yyvsp[0].num); }
break;
case 187:
#line 602 "gram.y"
{ yyval.num = yyvsp[0].num;
					  if (yyvsp[0].num == 0)
						yyerror("bad button 0");

					  if (yyvsp[0].num > MAX_BUTTONS)
					  {
						yyval.num = 0;
						yyerror("button number too large");
					  }
					}
break;
case 188:
#line 614 "gram.y"
{ ptr = (char *)malloc(strlen(yyvsp[0].ptr)+1);
					  strcpy(ptr, yyvsp[0].ptr);
					  RemoveDQuote(ptr);
					  yyval.ptr = ptr;
					}
break;
case 189:
#line 619 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
#line 1904 "y.tab.c"
    }
    yyssp -= yym;
    yystate = *yyssp;
    yyvsp -= yym;
    yym = yylhs[yyn];
    if (yystate == 0 && yym == 0)
    {
#if YYDEBUG
        if (yydebug)
            printf("%sdebug: after reduction, shifting from state 0 to\
 state %d\n", YYPREFIX, YYFINAL);
#endif
        yystate = YYFINAL;
        *++yyssp = YYFINAL;
        *++yyvsp = yyval;
        if (yychar < 0)
        {
            if ((yychar = yylex()) < 0) yychar = 0;
#if YYDEBUG
            if (yydebug)
            {
                yys = 0;
                if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
                if (!yys) yys = "illegal-symbol";
                printf("%sdebug: state %d, reading %d (%s)\n",
                        YYPREFIX, YYFINAL, yychar, yys);
            }
#endif
        }
        if (yychar == 0) goto yyaccept;
        goto yyloop;
    }
    if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
            yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
        yystate = yytable[yyn];
    else
        yystate = yydgoto[yym];
#if YYDEBUG
    if (yydebug)
        printf("%sdebug: after reduction, shifting from state %d \
to state %d\n", YYPREFIX, *yyssp, yystate);
#endif
    if (yyssp >= yyss + yystacksize - 1)
    {
        goto yyoverflow;
    }
    *++yyssp = yystate;
    *++yyvsp = yyval;
    goto yyloop;
yyoverflow:
    yyerror("yacc stack overflow");
yyabort:
    return (1);
yyaccept:
    return (0);
}
