/* A Bison parser, made from gram.y
by GNU bison 1.35. */
#define YYBISON 1 /* Identify Bison output. */
# define LB 257
# define RB 258
# define LP 259
# define RP 260
# define AT 261
# define MENUS 262
# define MENU 263
# define PIEMENU 264
# define BUTTON 265
# define DEFAULT_FUNCTION 266
# define PLUS 267
# define MINUS 268
# define ALL 269
# define OR 270
# define CURSORS 271
# define PIXMAPS 272
# define ICONS 273
# define COLOR 274
# define MONOCHROME 275
# define FUNCTION 276
# define ICONMGR_SHOW 277
# define ICONMGR 278
# define WINDOW_FUNCTION 279
# define ZOOM 280
# define ICONMGRS 281
# define ICONMGR_GEOMETRY 282
# define ICONMGR_NOSHOW 283
# define MAKE_TITLE 284
# define ICONIFY_BY_UNMAPPING 285
# define DONT_ICONIFY_BY_UNMAPPING 286
# define STICKY 287
# define NO_TITLE 288
# define AUTO_RAISE 289
# define NO_HILITE 290
# define ICON_REGION 291
# define META 292
# define SHIFT 293
# define LOCK 294
# define CONTROL 295
# define WINDOW 296
# define TITLE 297
# define ICON 298
# define ROOT 299
# define FRAME 300
# define COLON 301
# define EQUALS 302
# define SQUEEZE_TITLE 303
# define DONT_SQUEEZE_TITLE 304
# define START_ICONIFIED 305
# define NO_TITLE_HILITE 306
# define TITLE_HILITE 307
# define MOVE 308
# define RESIZE 309
# define WAIT 310
# define SELECT 311
# define KILL 312
# define LEFT_TITLEBUTTON 313
# define RIGHT_TITLEBUTTON 314
# define NUMBER 315
# define KEYWORD 316
# define NKEYWORD 317
# define CKEYWORD 318
# define CLKEYWORD 319
# define FKEYWORD 320
# define FSKEYWORD 321
# define SKEYWORD 322
# define DKEYWORD 323
# define JKEYWORD 324
# define PKEYWORD 325
# define WINDOW_RING 326
# define WARP_CURSOR 327
# define ERRORTOKEN 328
# define NO_STACKMODE 329
# define ICON_TITLE 330
# define NO_ICON_TITLE 331
# define STRING 332
#line 39 "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>
#define PI 3.1415926535897932
#define TWO_PI 6.2831853071795865
#define DEG_TO_RAD(d) (((float)(d) * TWO_PI) / 360.0)
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();
int yylineno;
#line 77 "gram.y"
#ifndef YYSTYPE
typedef union
{
int num;
char *ptr;
} yystype;
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#define YYFINAL 302
#define YYFLAG -32768
#define YYNTBASE 79
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
#define YYTRANSLATE(x) ((unsigned)(x) <= 332 ? yytranslate[x] : 157)
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
static const char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
76, 77, 78
};
#if YYDEBUG
static const short yyprhs[] =
{
0, 0, 2, 3, 6, 8, 10, 12, 14, 16,
23, 27, 30, 33, 35, 38, 41, 42, 46, 48,
53, 58, 61, 64, 67, 70, 71, 75, 76, 80,
82, 83, 87, 88, 92, 93, 97, 99, 100, 104,
106, 107, 111, 113, 114, 118, 120, 121, 125, 127,
128, 132, 133, 137, 138, 142, 143, 147, 148, 152,
153, 163, 164, 169, 170, 180, 181, 186, 187, 199,
200, 207, 208, 213, 214, 218, 219, 223, 224, 228,
231, 234, 235, 239, 241, 242, 246, 248, 251, 254,
261, 268, 269, 272, 274, 276, 278, 280, 283, 285,
286, 289, 291, 293, 295, 297, 299, 301, 303, 305,
307, 308, 311, 313, 315, 317, 319, 321, 323, 325,
327, 329, 331, 335, 336, 339, 342, 346, 347, 350,
354, 357, 361, 364, 368, 371, 375, 378, 382, 385,
389, 392, 396, 399, 403, 406, 410, 413, 417, 420,
424, 427, 431, 432, 435, 438, 439, 444, 447, 451,
452, 455, 458, 460, 461, 467, 469, 470, 474, 475,
481, 485, 486, 489, 493, 498, 502, 503, 506, 508,
512, 513, 516, 519, 523, 524, 527, 529, 533, 534,
537, 540, 548, 550, 553, 555, 558, 561, 564, 566
};
static const short yyrhs[] =
{
80, 0, 0, 80, 81, 0, 1, 0, 109, 0,
110, 0, 111, 0, 133, 0, 37, 155, 69, 69,
156, 156, 0, 28, 155, 156, 0, 28, 155, 0,
26, 156, 0, 26, 0, 18, 120, 0, 17, 123,
0, 0, 31, 82, 140, 0, 31, 0, 59, 155,
48, 152, 0, 60, 155, 48, 152, 0, 154, 155,
0, 154, 152, 0, 155, 113, 0, 154, 112, 0,
0, 32, 83, 140, 0, 0, 29, 84, 140, 0,
29, 0, 0, 27, 85, 137, 0, 0, 23, 86,
140, 0, 0, 52, 87, 140, 0, 52, 0, 0,
36, 88, 140, 0, 36, 0, 0, 75, 89, 140,
0, 75, 0, 0, 34, 90, 140, 0, 34, 0,
0, 77, 91, 140, 0, 77, 0, 0, 76, 92,
140, 0, 0, 30, 93, 140, 0, 0, 51, 94,
140, 0, 0, 35, 95, 140, 0, 0, 33, 96,
140, 0, 0, 9, 155, 5, 155, 47, 155, 6,
97, 149, 0, 0, 9, 155, 98, 149, 0, 0,
10, 155, 5, 155, 47, 155, 6, 99, 149, 0,
0, 10, 155, 100, 149, 0, 0, 10, 155, 5,
155, 47, 155, 6, 7, 156, 101, 149, 0, 0,
10, 155, 7, 156, 102, 149, 0, 0, 22, 155,
103, 146, 0, 0, 19, 104, 143, 0, 0, 20,
105, 126, 0, 0, 21, 106, 126, 0, 12, 152,
0, 25, 152, 0, 0, 73, 107, 140, 0, 73,
0, 0, 72, 108, 140, 0, 62, 0, 68, 155,
0, 63, 156, 0, 48, 114, 47, 116, 47, 152,
0, 48, 114, 47, 118, 47, 152, 0, 0, 114,
115, 0, 38, 0, 39, 0, 40, 0, 41, 0,
38, 156, 0, 16, 0, 0, 116, 117, 0, 42,
0, 43, 0, 44, 0, 45, 0, 46, 0, 24,
0, 38, 0, 15, 0, 16, 0, 0, 118, 119,
0, 42, 0, 43, 0, 44, 0, 45, 0, 46,
0, 24, 0, 38, 0, 15, 0, 16, 0, 155,
0, 3, 121, 4, 0, 0, 121, 122, 0, 71,
155, 0, 3, 124, 4, 0, 0, 124, 125, 0,
46, 155, 155, 0, 46, 155, 0, 43, 155, 155,
0, 43, 155, 0, 44, 155, 155, 0, 44, 155,
0, 24, 155, 155, 0, 24, 155, 0, 11, 155,
155, 0, 11, 155, 0, 54, 155, 155, 0, 54,
155, 0, 55, 155, 155, 0, 55, 155, 0, 56,
155, 155, 0, 56, 155, 0, 9, 155, 155, 0,
9, 155, 0, 57, 155, 155, 0, 57, 155, 0,
58, 155, 155, 0, 58, 155, 0, 3, 127, 4,
0, 0, 127, 128, 0, 65, 155, 0, 0, 65,
155, 129, 130, 0, 64, 155, 0, 3, 131, 4,
0, 0, 131, 132, 0, 155, 155, 0, 49, 0,
0, 49, 134, 3, 136, 4, 0, 50, 0, 0,
50, 135, 140, 0, 0, 136, 155, 70, 153, 156,
0, 3, 138, 4, 0, 0, 138, 139, 0, 155,
155, 156, 0, 155, 155, 155, 156, 0, 3, 141,
4, 0, 0, 141, 142, 0, 155, 0, 3, 144,
4, 0, 0, 144, 145, 0, 155, 155, 0, 3,
147, 4, 0, 0, 147, 148, 0, 152, 0, 3,
150, 4, 0, 0, 150, 151, 0, 155, 152, 0,
155, 5, 155, 47, 155, 6, 152, 0, 66, 0,
67, 155, 0, 156, 0, 13, 156, 0, 14, 156,
0, 11, 156, 0, 78, 0, 61, 0
};
#endif
#if YYDEBUG
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const short yyrline[] =
{
0, 104, 107, 108, 111, 112, 113, 114, 115, 116,
118, 124, 127, 133, 135, 136, 137, 137, 139, 141,
144, 147, 151, 167, 168, 169, 169, 171, 171, 173,
174, 174, 176, 176, 178, 178, 180, 182, 182, 184,
186, 186, 188, 190, 190, 192, 194, 194, 196, 198,
198, 200, 200, 202, 202, 204, 204, 206, 206, 208,
208, 211, 211, 213, 213, 217, 217, 220, 220, 225,
225, 230, 230, 232, 232, 234, 234, 236, 236, 238,
254, 262, 262, 264, 266, 266, 271, 281, 291, 303,
306, 309, 310, 313, 314, 315, 316, 317, 327, 330,
331, 334, 335, 336, 337, 338, 339, 340, 341, 342,
345, 346, 349, 350, 351, 352, 353, 354, 355, 356,
357, 358, 363, 366, 367, 370, 374, 377, 378, 381,
383, 385, 387, 389, 391, 393, 395, 397, 399, 401,
403, 405, 407, 409, 411, 413, 415, 417, 419, 421,
423, 427, 430, 431, 434, 443, 443, 454, 466, 469,
470, 473, 478, 483, 483, 490, 491, 491, 495, 496,
504, 507, 508, 511, 516, 524, 527, 528, 531, 536,
539, 540, 543, 546, 549, 550, 553, 559, 562, 563,
566, 571, 579, 580, 622, 623, 624, 627, 639, 644
};
#endif
#if (YYDEBUG) || defined YYERROR_VERBOSE
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
static const char *const yytname[] =
{
"$", "error", "$undefined.", "LB", "RB", "LP", "RP", "AT", "MENUS",
"MENU", "PIEMENU", "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", "STICKY",
"NO_TITLE", "AUTO_RAISE", "NO_HILITE", "ICON_REGION", "META", "SHIFT",
"LOCK", "CONTROL", "WINDOW", "TITLE", "ICON", "ROOT", "FRAME", "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", "PKEYWORD", "WINDOW_RING",
"WARP_CURSOR", "ERRORTOKEN", "NO_STACKMODE", "ICON_TITLE",
"NO_ICON_TITLE", "STRING", "twmrc", "stmts", "stmt", "@1", "@2", "@3",
"@4", "@5", "@6", "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14",
"@15", "@16", "@17", "@18", "@19", "@20", "@21", "@22", "@23", "@24",
"@25", "@26", "@27", "noarg", "sarg", "narg", "full", "fullkey", "keys",
"key", "contexts", "context", "contextkeys", "contextkey",
"pixmap_list", "pixmap_entries", "pixmap_entry", "cursor_list",
"cursor_entries", "cursor_entry", "color_list", "color_entries",
"color_entry", "@28", "win_color_list", "win_color_entries",
"win_color_entry", "squeeze", "@29", "@30", "win_sqz_entries",
"iconm_list", "iconm_entries", "iconm_entry", "win_list", "win_entries",
"win_entry", "icon_list", "icon_entries", "icon_entry", "function",
"function_entries", "function_entry", "menu", "menu_entries",
"menu_entry", "action", "signed_number", "button", "string", "number", 0
};
#endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const short yyr1[] =
{
0, 79, 80, 80, 81, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 81, 82, 81, 81, 81,
81, 81, 81, 81, 81, 83, 81, 84, 81, 81,
85, 81, 86, 81, 87, 81, 81, 88, 81, 81,
89, 81, 81, 90, 81, 81, 91, 81, 81, 92,
81, 93, 81, 94, 81, 95, 81, 96, 81, 97,
81, 98, 81, 99, 81, 100, 81, 101, 81, 102,
81, 103, 81, 104, 81, 105, 81, 106, 81, 81,
81, 107, 81, 81, 108, 81, 109, 110, 111, 112,
113, 114, 114, 115, 115, 115, 115, 115, 115, 116,
116, 117, 117, 117, 117, 117, 117, 117, 117, 117,
118, 118, 119, 119, 119, 119, 119, 119, 119, 119,
119, 119, 120, 121, 121, 122, 123, 124, 124, 125,
125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
125, 126, 127, 127, 128, 129, 128, 128, 130, 131,
131, 132, 133, 134, 133, 133, 135, 133, 136, 136,
137, 138, 138, 139, 139, 140, 141, 141, 142, 143,
144, 144, 145, 146, 147, 147, 148, 149, 150, 150,
151, 151, 152, 152, 153, 153, 153, 154, 155, 156
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const short yyr2[] =
{
0, 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, 1, 0,
3, 0, 3, 0, 3, 0, 3, 0, 3, 0,
9, 0, 4, 0, 9, 0, 4, 0, 11, 0,
6, 0, 4, 0, 3, 0, 3, 0, 3, 2,
2, 0, 3, 1, 0, 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,
0, 2, 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
};
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
doesn't specify something else to do. Zero means the default is an
error. */
static const short yydefact[] =
{
2, 0, 4, 0, 0, 0, 0, 0, 0, 73,
75, 77, 0, 32, 0, 13, 30, 0, 29, 51,
18, 25, 57, 45, 55, 39, 0, 162, 165, 53,
36, 0, 0, 86, 0, 0, 84, 83, 42, 49,
48, 198, 3, 5, 6, 7, 8, 0, 0, 61,
65, 199, 197, 192, 0, 79, 127, 15, 123, 14,
0, 0, 0, 71, 0, 80, 12, 0, 11, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 88, 87, 0, 0, 0, 0,
0, 91, 24, 22, 21, 91, 23, 0, 0, 0,
0, 0, 193, 0, 0, 180, 74, 152, 76, 78,
0, 176, 33, 171, 31, 10, 28, 52, 17, 26,
58, 44, 56, 38, 0, 168, 167, 54, 35, 0,
0, 85, 82, 41, 50, 47, 0, 0, 0, 188,
62, 0, 69, 66, 126, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 128, 122, 0, 124,
0, 0, 184, 72, 0, 0, 0, 0, 19, 20,
98, 93, 94, 95, 96, 99, 92, 110, 0, 0,
0, 0, 146, 138, 136, 132, 134, 130, 140, 142,
144, 148, 150, 125, 179, 181, 0, 151, 0, 0,
153, 0, 175, 177, 178, 170, 172, 0, 0, 164,
0, 97, 0, 0, 0, 187, 189, 0, 0, 70,
145, 137, 135, 131, 133, 129, 139, 141, 143, 147,
149, 182, 157, 154, 183, 185, 186, 0, 9, 0,
108, 109, 106, 107, 101, 102, 103, 104, 105, 0,
100, 119, 120, 117, 118, 112, 113, 114, 115, 116,
0, 111, 121, 59, 0, 190, 63, 0, 0, 173,
0, 0, 0, 194, 89, 90, 0, 0, 0, 0,
159, 156, 174, 195, 196, 169, 60, 0, 67, 64,
0, 0, 0, 158, 160, 0, 0, 68, 161, 191,
0, 0, 0
};
static const short yydefgoto[] =
{
300, 1, 42, 71, 72, 69, 67, 64, 81, 76,
88, 74, 90, 89, 70, 80, 75, 73, 276, 98,
279, 101, 292, 181, 110, 60, 61, 62, 87, 86,
43, 44, 45, 92, 96, 136, 176, 212, 250, 213,
261, 59, 104, 159, 57, 103, 156, 108, 161, 200,
267, 281, 290, 294, 46, 78, 79, 167, 114, 165,
206, 112, 164, 203, 106, 160, 195, 163, 201, 235,
140, 179, 216, 55, 272, 47, 48, 52
};
static const short yypact[] =
{
-32768, 279,-32768, -65, -65, -42, -19, 30, 46,-32768,
-32768,-32768, -65,-32768, -19, -42,-32768, -65, 47,-32768,
49,-32768,-32768, 55,-32768, 56, -65, 60, 61,-32768,
62, -65, -65,-32768, -42, -65,-32768, 64, 67,-32768,
68,-32768,-32768,-32768,-32768,-32768,-32768, -21, 24, 70,
10,-32768,-32768,-32768, -65,-32768,-32768,-32768,-32768,-32768,
74, 82, 82,-32768, 83,-32768,-32768, 90, -42, 83,
83, 83, 83, 83, 83, 83, 83, 20, 94, 83,
83, 83, 25, 58,-32768,-32768, 83, 83, 83, 83,
83,-32768,-32768,-32768,-32768,-32768,-32768, -65, 102, -65,
-42, 102,-32768, 57, 12,-32768,-32768,-32768,-32768,-32768,
106,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768, 41,-32768,-32768,-32768,-32768, -19,
-19,-32768,-32768,-32768,-32768,-32768, 15, 86, 48,-32768,
-32768, 73,-32768,-32768,-32768, -65, -65, -65, -65, -65,
-65, -65, -65, -65, -65, -65,-32768,-32768, -65,-32768,
-2, 26,-32768,-32768, 0, 1, -42, 2,-32768,-32768,
-32768, -42,-32768,-32768,-32768,-32768,-32768,-32768, -65, 4,
-65, 102, -65, -65, -65, -65, -65, -65, -65, -65,
-65, -65, -65,-32768,-32768,-32768, -65,-32768, -65, -65,
-32768, 21,-32768,-32768,-32768,-32768,-32768, -65, -42,-32768,
51,-32768, 92, -4, 111,-32768,-32768, 32, 116,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768, 120,-32768,-32768,-32768, -43,-32768, 8,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -19,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-19,-32768,-32768,-32768, -65,-32768, 121, 126, -42,-32768,
-42, -42, -42,-32768,-32768,-32768, 102, 84, -42, 102,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, -65,-32768,-32768,
6, 134, 102,-32768,-32768, -65, -19,-32768,-32768,-32768,
132, 141,-32768
};
static const short yypgoto[] =
{
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768, 59,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768, 91,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768, 289,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-77,-32768,-32768, -11,-32768,-32768, -3, -8
};
#define YYLAST 379
static const short yytable[] =
{
49, 50, 194, 65, 202, 205, 209, 66, 215, 63,
293, 251, 252, 41, 68, 99, 157, 100, 51, 51,
253, 270, 271, 77, 143, 234, 84, 91, 82, 83,
197, 170, 85, 56, 254, 41, 93, 264, 255, 256,
257, 258, 259, 260, 94, 53, 54, 53, 54, 58,
-27, 102, -16, 171, 172, 173, 174, 41, -43, -37,
115, 144, 175, -163, -166, -34, 145, -81, 146, 51,
-40, -46, 95, 129, 41, 97, 41, 105, 41, 41,
41, 147, 41, 158, 41, 107, 111, 53, 54, 124,
198, 199, 142, 113, 138, 178, 141, 125, 53, 54,
148, 149, 170, 150, 219, 139, 130, 240, 241, 162,
166, 151, 152, 153, 154, 155, 242, 263, 168, 169,
180, 239, 266, -155, 171, 172, 173, 174, 278, 280,
243, 287, 301, 177, 244, 245, 246, 247, 248, 249,
296, 302, 182, 183, 184, 185, 186, 187, 188, 189,
190, 191, 192, 109, 137, 193, 0, 196, 208, 0,
0, 204, 207, 211, 210, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 214, 217, 218, 0, 220,
221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
236, 0, 0, 231, 0, 232, 233, 0, 0, 286,
238, 0, 289, 0, 237, 0, 265, 0, 0, 0,
262, 0, 0, 0, 0, 297, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 269,
0, 273, 0, 0, 268, 0, 0, 0, 274, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 275,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
282, 277, 283, 284, 285, 0, 0, 0, 0, 0,
288, 0, 0, 0, 0, 0, 0, 0, 0, -1,
2, 0, 0, 0, 291, 299, 0, 295, 3, 4,
5, 6, 298, 0, 0, 0, 7, 8, 9, 10,
11, 12, 13, 0, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 27, 28,
29, 30, 0, 0, 0, 0, 0, 0, 31, 32,
0, 33, 34, 0, 0, 0, 0, 35, 0, 0,
0, 36, 37, 0, 38, 39, 40, 41, 116, 117,
118, 119, 120, 121, 122, 123, 0, 0, 126, 127,
128, 0, 0, 0, 0, 131, 132, 133, 134, 135
};
static const short yycheck[] =
{
3, 4, 4, 14, 4, 4, 4, 15, 4, 12,
4, 15, 16, 78, 17, 5, 4, 7, 61, 61,
24, 13, 14, 26, 101, 4, 34, 48, 31, 32,
4, 16, 35, 3, 38, 78, 47, 5, 42, 43,
44, 45, 46, 47, 47, 66, 67, 66, 67, 3,
3, 54, 3, 38, 39, 40, 41, 78, 3, 3,
68, 4, 47, 3, 3, 3, 9, 3, 11, 61,
3, 3, 48, 48, 78, 5, 78, 3, 78, 78,
78, 24, 78, 71, 78, 3, 3, 66, 67, 69,
64, 65, 100, 3, 97, 47, 99, 3, 66, 67,
43, 44, 16, 46, 181, 3, 48, 15, 16, 3,
69, 54, 55, 56, 57, 58, 24, 6, 129, 130,
47, 70, 6, 3, 38, 39, 40, 41, 7, 3,
38, 47, 0, 47, 42, 43, 44, 45, 46, 47,
6, 0, 145, 146, 147, 148, 149, 150, 151, 152,
153, 154, 155, 62, 95, 158, -1, 160, 166, -1,
-1, 164, 165, 171, 167, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 178, 179, 180, -1, 182,
183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
201, -1, -1, 196, -1, 198, 199, -1, -1, 276,
208, -1, 279, -1, 207, -1, 217, -1, -1, -1,
213, -1, -1, -1, -1, 292, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 237,
-1, 239, -1, -1, 237, -1, -1, -1, 249, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 260,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
268, 264, 270, 271, 272, -1, -1, -1, -1, -1,
278, -1, -1, -1, -1, -1, -1, -1, -1, 0,
1, -1, -1, -1, 287, 296, -1, 290, 9, 10,
11, 12, 295, -1, -1, -1, 17, 18, 19, 20,
21, 22, 23, -1, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 49, 50,
51, 52, -1, -1, -1, -1, -1, -1, 59, 60,
-1, 62, 63, -1, -1, -1, -1, 68, -1, -1,
-1, 72, 73, -1, 75, 76, 77, 78, 69, 70,
71, 72, 73, 74, 75, 76, -1, -1, 79, 80,
81, -1, -1, -1, -1, 86, 87, 88, 89, 90
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/local/share/bison/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* This is the parser code that is written into each bison parser when
the %semantic_parser declaration is not specified in the grammar.
It was written by Richard Stallman by simplifying the hairy parser
used when %semantic_parser is specified. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short yyss;
YYSTYPE yyvs;
# if YYLSP_NEEDED
YYLTYPE yyls;
# endif
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# if YYLSP_NEEDED
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAX)
# else
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
# endif
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
register YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (0)
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ \
yyerror ("syntax error: cannot back up"); \
YYERROR; \
} \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run).
When YYLLOC_DEFAULT is run, CURRENT is set the location of the
first token. By default, to implement support for ranges, extend
its range to the last symbol. */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#if YYPURE
# if YYLSP_NEEDED
# ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
# else
# define YYLEX yylex (&yylval, &yylloc)
# endif
# else /* !YYLSP_NEEDED */
# ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
# else
# define YYLEX yylex (&yylval)
# endif
# endif /* !YYLSP_NEEDED */
#else /* !YYPURE */
# define YYLEX yylex ()
#endif /* !YYPURE */
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
#ifdef YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
static YYSIZE_T
# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
# else
yystrlen (yystr)
const char *yystr;
# endif
{
register const char *yys = yystr;
while (*yys++ != '\0')
continue;
return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
static char *
# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
# else
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
# endif
{
register char *yyd = yydest;
register const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
#endif
#line 315 "/usr/local/share/bison/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
# define YYPARSE_PARAM_DECL
# else
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
# ifdef YYPARSE_PARAM
int yyparse (void *);
# else
int yyparse (void);
# endif
#endif
/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
variables are global, or local to YYPARSE. */
#define YY_DECL_NON_LSP_VARIABLES \
/* The lookahead symbol. */ \
int yychar; \
\
/* The semantic value of the lookahead symbol. */ \
YYSTYPE yylval; \
\
/* Number of parse errors so far. */ \
int yynerrs;
#if YYLSP_NEEDED
# define YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES \
\
/* Location data for the lookahead symbol. */ \
YYLTYPE yylloc;
#else
# define YY_DECL_VARIABLES \
YY_DECL_NON_LSP_VARIABLES
#endif
/* If nonreentrant, generate the variables here. */
#if !YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
int
yyparse (YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
/* If reentrant, generate the variables here. */
#if YYPURE
YY_DECL_VARIABLES
#endif /* !YYPURE */
register int yystate;
register int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
int yychar1 = 0;
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp;
#if YYLSP_NEEDED
/* The location stack. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp;
#endif
#if YYLSP_NEEDED
# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
#else
# define YYPOPSTACK (yyvsp--, yyssp--)
#endif
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYLSP_NEEDED
YYLTYPE yyloc;
#endif
/* When reducing, the number of symbols on the RHS of the reduced
rule. */
int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
#if YYLSP_NEEDED
yylsp = yyls;
#endif
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks.
*/
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. */
# if YYLSP_NEEDED
YYLTYPE *yyls1 = yyls;
/* This used to be a conditional around just the two extra args,
but that might be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yyls1, yysize * sizeof (*yylsp),
&yystacksize);
yyls = yyls1;
# else
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
# endif
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyoverflowlab;
# else
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
goto yyoverflowlab;
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
{
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyoverflowlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
# if YYLSP_NEEDED
YYSTACK_RELOCATE (yyls);
# endif
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
#if YYLSP_NEEDED
yylsp = yyls + yysize - 1;
#endif
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more */
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yychar1 = YYTRANSLATE (yychar);
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables
which are defined only if `YYDEBUG' is set. */
if (yydebug)
{
YYFPRINTF (stderr, "Next token is %d (%s",
yychar, yytname[yychar1]);
/* Give the individual parser a way to print the precise
meaning of a token, for further debugging info. */
# ifdef YYPRINT
YYPRINT (stderr, yychar, yylval);
# endif
YYFPRINTF (stderr, ")\n");
}
#endif
}
yyn += yychar1;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
/* yyn is what to do for this token type in this state.
Negative => reduce, -yyn is rule number.
Positive => shift, yyn is new state.
New state is final state => don't bother to shift,
just return success.
0, or most negative number => error. */
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrlab;
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yylsp = yylloc;
#endif
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
yystate = yyn;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to the semantic value of
the lookahead token. This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
#if YYLSP_NEEDED
/* Similarly for the default location. Let the user run additional
commands if for instance locations are ranges. */
yyloc = yylsp[1-yylen];
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
#endif
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables which
are defined only if `YYDEBUG' is set. */
if (yydebug)
{
int yyi;
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn) {
case 9:
#line 117 "gram.y"
{ AddIconRegion(yyvsp[-4].ptr, yyvsp[-3].num, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num); }
break;
case 10:
#line 118 "gram.y"
{ if (Scr->FirstTime)
{
Scr->iconmgr.geometry=yyvsp[-1].ptr;
Scr->iconmgr.columns=yyvsp[0].num;
}
}
break;
case 11:
#line 124 "gram.y"
{ if (Scr->FirstTime)
Scr->iconmgr.geometry = yyvsp[0].ptr;
}
break;
case 12:
#line 127 "gram.y"
{ if (Scr->FirstTime)
{
Scr->DoZoom = TRUE;
Scr->ZoomCount = yyvsp[0].num;
}
}
break;
case 13:
#line 133 "gram.y"
{ if (Scr->FirstTime)
Scr->DoZoom = TRUE; }
break;
case 14:
#line 135 "gram.y"
{}
break;
case 15:
#line 136 "gram.y"
{}
break;
case 16:
#line 137 "gram.y"
{ list = &Scr->IconifyByUn; }
break;
case 18:
#line 139 "gram.y"
{ if (Scr->FirstTime)
Scr->IconifyByUnmapping = TRUE; }
break;
case 19:
#line 141 "gram.y"
{
GotTitleButton (yyvsp[-2].ptr, yyvsp[0].num, False);
}
break;
case 20:
#line 144 "gram.y"
{
GotTitleButton (yyvsp[-2].ptr, yyvsp[0].num, True);
}
break;
case 21:
#line 147 "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 151 "gram.y"
{ Scr->Mouse[yyvsp[-1].num][C_ROOT][0].func = yyvsp[0].num;
if (yyvsp[0].num == F_MENU || yyvsp[0].num == F_PIEMENU)
{
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,
NULL,yyvsp[0].num,NULLSTR,NULLSTR);
}
Action = "";
pull = NULL;
}
break;
case 23:
#line 167 "gram.y"
{ GotKey(yyvsp[-1].ptr, yyvsp[0].num); }
break;
case 24:
#line 168 "gram.y"
{ GotButton(yyvsp[-1].num, yyvsp[0].num); }
break;
case 25:
#line 169 "gram.y"
{ list = &Scr->DontIconify; }
break;
case 27:
#line 171 "gram.y"
{ list = &Scr->IconMgrNoShow; }
break;
case 29:
#line 173 "gram.y"
{ Scr->IconManagerDontShow = TRUE; }
break;
case 30:
#line 174 "gram.y"
{ list = &Scr->IconMgrs; }
break;
case 32:
#line 176 "gram.y"
{ list = &Scr->IconMgrShow; }
break;
case 34:
#line 178 "gram.y"
{ list = &Scr->NoTitleHighlight; }
break;
case 36:
#line 180 "gram.y"
{ if (Scr->FirstTime)
Scr->TitleHighlight = FALSE; }
break;
case 37:
#line 182 "gram.y"
{ list = &Scr->NoHighlight; }
break;
case 39:
#line 184 "gram.y"
{ if (Scr->FirstTime)
Scr->Highlight = FALSE; }
break;
case 40:
#line 186 "gram.y"
{ list = &Scr->NoStackModeL; }
break;
case 42:
#line 188 "gram.y"
{ if (Scr->FirstTime)
Scr->StackMode = FALSE; }
break;
case 43:
#line 190 "gram.y"
{ list = &Scr->NoTitle; }
break;
case 45:
#line 192 "gram.y"
{ if (Scr->FirstTime)
Scr->NoTitlebar = TRUE; }
break;
case 46:
#line 194 "gram.y"
{ list = &Scr->NoIconTitleL; }
break;
case 48:
#line 196 "gram.y"
{ if (Scr->FirstTime)
Scr->NoIconTitle = TRUE; }
break;
case 49:
#line 198 "gram.y"
{ list = &Scr->IconTitleL; }
break;
case 51:
#line 200 "gram.y"
{ list = &Scr->MakeTitle; }
break;
case 53:
#line 202 "gram.y"
{ list = &Scr->StartIconified; }
break;
case 55:
#line 204 "gram.y"
{ list = &Scr->AutoRaise; }
break;
case 57:
#line 206 "gram.y"
{ list = &Scr->StickyL; }
break;
case 59:
#line 209 "gram.y"
{ root = GetRoot(yyvsp[-5].ptr, yyvsp[-3].ptr, yyvsp[-1].ptr); }
break;
case 60:
#line 210 "gram.y"
{ root->real_menu = TRUE;}
break;
case 61:
#line 211 "gram.y"
{ root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); }
break;
case 62:
#line 212 "gram.y"
{ root->real_menu = TRUE; }
break;
case 63:
#line 214 "gram.y"
{ root = GetRoot(yyvsp[-5].ptr, yyvsp[-3].ptr, yyvsp[-1].ptr);
root->pie_menu = 1; }
break;
case 64:
#line 216 "gram.y"
{ root->real_menu = TRUE;}
break;
case 65:
#line 217 "gram.y"
{ root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR);
root->pie_menu = 1; }
break;
case 66:
#line 219 "gram.y"
{ root->real_menu = TRUE; }
break;
case 67:
#line 221 "gram.y"
{ root = GetRoot(yyvsp[-7].ptr, yyvsp[-5].ptr, yyvsp[-3].ptr);
root->pie_menu = 1;
root->initial_angle = DEG_TO_RAD(yyvsp[0].num); }
break;
case 68:
#line 224 "gram.y"
{ root->real_menu = TRUE;}
break;
case 69:
#line 226 "gram.y"
{ root = GetRoot(yyvsp[-2].ptr, NULLSTR, NULLSTR);
root->pie_menu = 1;
root->initial_angle = DEG_TO_RAD(yyvsp[0].num); }
break;
case 70:
#line 229 "gram.y"
{ root->real_menu = TRUE; }
break;
case 71:
#line 230 "gram.y"
{ root = GetRoot(yyvsp[0].ptr, NULLSTR, NULLSTR); }
break;
case 73:
#line 232 "gram.y"
{ list = &Scr->IconNames; }
break;
case 75:
#line 234 "gram.y"
{ color = COLOR; }
break;
case 77:
#line 236 "gram.y"
{ color = MONOCHROME; }
break;
case 79:
#line 238 "gram.y"
{ Scr->DefaultFunction.func = yyvsp[0].num;
if (yyvsp[0].num == F_MENU || yyvsp[0].num == F_PIEMENU)
{
pull->prev = NULL;
Scr->DefaultFunction.menu = pull;
}
else
{
root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
Scr->DefaultFunction.item =
AddToMenu(root,"x",Action,
NULL,yyvsp[0].num, NULLSTR, NULLSTR);
}
Action = "";
pull = NULL;
}
break;
case 80:
#line 254 "gram.y"
{ Scr->WindowFunction.func = yyvsp[0].num;
root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
Scr->WindowFunction.item =
AddToMenu(root,"x",Action,
NULL,yyvsp[0].num, NULLSTR, NULLSTR);
Action = "";
pull = NULL;
}
break;
case 81:
#line 262 "gram.y"
{ list = &Scr->WarpCursorL; }
break;
case 83:
#line 264 "gram.y"
{ if (Scr->FirstTime)
Scr->WarpCursor = TRUE; }
break;
case 84:
#line 266 "gram.y"
{ list = &Scr->WindowRingL; }
break;
case 86:
#line 271 "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 87:
#line 281 "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 88:
#line 291 "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 89:
#line 303 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 90:
#line 306 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 93:
#line 313 "gram.y"
{ mods |= Mod1Mask; }
break;
case 94:
#line 314 "gram.y"
{ mods |= ShiftMask; }
break;
case 95:
#line 315 "gram.y"
{ mods |= LockMask; }
break;
case 96:
#line 316 "gram.y"
{ mods |= ControlMask; }
break;
case 97:
#line 317 "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 98:
#line 327 "gram.y"
{ }
break;
case 101:
#line 334 "gram.y"
{ cont |= C_WINDOW_BIT; }
break;
case 102:
#line 335 "gram.y"
{ cont |= C_TITLE_BIT; }
break;
case 103:
#line 336 "gram.y"
{ cont |= C_ICON_BIT; }
break;
case 104:
#line 337 "gram.y"
{ cont |= C_ROOT_BIT; }
break;
case 105:
#line 338 "gram.y"
{ cont |= C_FRAME_BIT; }
break;
case 106:
#line 339 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 107:
#line 340 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 108:
#line 341 "gram.y"
{ cont |= C_ALL_BITS; }
break;
case 109:
#line 342 "gram.y"
{ }
break;
case 112:
#line 349 "gram.y"
{ cont |= C_WINDOW_BIT; }
break;
case 113:
#line 350 "gram.y"
{ cont |= C_TITLE_BIT; }
break;
case 114:
#line 351 "gram.y"
{ cont |= C_ICON_BIT; }
break;
case 115:
#line 352 "gram.y"
{ cont |= C_ROOT_BIT; }
break;
case 116:
#line 353 "gram.y"
{ cont |= C_FRAME_BIT; }
break;
case 117:
#line 354 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 118:
#line 355 "gram.y"
{ cont |= C_ICONMGR_BIT; }
break;
case 119:
#line 356 "gram.y"
{ cont |= C_ALL_BITS; }
break;
case 120:
#line 357 "gram.y"
{ }
break;
case 121:
#line 358 "gram.y"
{ Name = yyvsp[0].ptr; cont |= C_NAME_BIT; }
break;
case 122:
#line 363 "gram.y"
{}
break;
case 125:
#line 370 "gram.y"
{ do_pixmap_keyword(yyvsp[-1].num,yyvsp[0].ptr); }
break;
case 126:
#line 374 "gram.y"
{}
break;
case 129:
#line 381 "gram.y"
{
NewBitmapCursor(&Scr->FrameCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 130:
#line 383 "gram.y"
{
NewFontCursor(&Scr->FrameCursor, yyvsp[0].ptr); }
break;
case 131:
#line 385 "gram.y"
{
NewBitmapCursor(&Scr->TitleCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 132:
#line 387 "gram.y"
{
NewFontCursor(&Scr->TitleCursor, yyvsp[0].ptr); }
break;
case 133:
#line 389 "gram.y"
{
NewBitmapCursor(&Scr->IconCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 134:
#line 391 "gram.y"
{
NewFontCursor(&Scr->IconCursor, yyvsp[0].ptr); }
break;
case 135:
#line 393 "gram.y"
{
NewBitmapCursor(&Scr->IconMgrCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 136:
#line 395 "gram.y"
{
NewFontCursor(&Scr->IconMgrCursor, yyvsp[0].ptr); }
break;
case 137:
#line 397 "gram.y"
{
NewBitmapCursor(&Scr->ButtonCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 138:
#line 399 "gram.y"
{
NewFontCursor(&Scr->ButtonCursor, yyvsp[0].ptr); }
break;
case 139:
#line 401 "gram.y"
{
NewBitmapCursor(&Scr->MoveCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 140:
#line 403 "gram.y"
{
NewFontCursor(&Scr->MoveCursor, yyvsp[0].ptr); }
break;
case 141:
#line 405 "gram.y"
{
NewBitmapCursor(&Scr->ResizeCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 142:
#line 407 "gram.y"
{
NewFontCursor(&Scr->ResizeCursor, yyvsp[0].ptr); }
break;
case 143:
#line 409 "gram.y"
{
NewBitmapCursor(&Scr->WaitCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 144:
#line 411 "gram.y"
{
NewFontCursor(&Scr->WaitCursor, yyvsp[0].ptr); }
break;
case 145:
#line 413 "gram.y"
{
NewBitmapCursor(&Scr->MenuCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 146:
#line 415 "gram.y"
{
NewFontCursor(&Scr->MenuCursor, yyvsp[0].ptr); }
break;
case 147:
#line 417 "gram.y"
{
NewBitmapCursor(&Scr->SelectCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 148:
#line 419 "gram.y"
{
NewFontCursor(&Scr->SelectCursor, yyvsp[0].ptr); }
break;
case 149:
#line 421 "gram.y"
{
NewBitmapCursor(&Scr->DestroyCursor, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 150:
#line 423 "gram.y"
{
NewFontCursor(&Scr->DestroyCursor, yyvsp[0].ptr); }
break;
case 151:
#line 427 "gram.y"
{}
break;
case 154:
#line 434 "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 155:
#line 443 "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 157:
#line 454 "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 158:
#line 466 "gram.y"
{}
break;
case 161:
#line 473 "gram.y"
{ if (Scr->FirstTime &&
color == Scr->Monochrome)
AddToList(list, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 162:
#line 478 "gram.y"
{
#ifdef SHAPE
if (HasShape) Scr->SqueezeTitle = TRUE;
#endif
}
break;
case 163:
#line 483 "gram.y"
{ list = &Scr->SqueezeTitleL;
#ifdef SHAPE
if (HasShape && Scr->SqueezeTitle == -1)
Scr->SqueezeTitle = TRUE;
#endif
}
break;
case 165:
#line 490 "gram.y"
{ Scr->SqueezeTitle = FALSE; }
break;
case 166:
#line 491 "gram.y"
{ list = &Scr->DontSqueezeTitleL; }
break;
case 169:
#line 496 "gram.y"
{
if (Scr->FirstTime) {
do_squeeze_entry (list, yyvsp[-3].ptr, yyvsp[-2].num, yyvsp[-1].num, yyvsp[0].num);
}
}
break;
case 170:
#line 504 "gram.y"
{}
break;
case 173:
#line 511 "gram.y"
{ if (Scr->FirstTime)
AddToList(list, yyvsp[-2].ptr, (char *)
AllocateIconManager(yyvsp[-2].ptr, NULLSTR,
yyvsp[-1].ptr,yyvsp[0].num));
}
break;
case 174:
#line 517 "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 175:
#line 524 "gram.y"
{}
break;
case 178:
#line 531 "gram.y"
{ if (Scr->FirstTime)
AddToList(list, yyvsp[0].ptr, 0);
}
break;
case 179:
#line 536 "gram.y"
{}
break;
case 182:
#line 543 "gram.y"
{ if (Scr->FirstTime) AddToList(list, yyvsp[-1].ptr, yyvsp[0].ptr); }
break;
case 183:
#line 546 "gram.y"
{}
break;
case 186:
#line 553 "gram.y"
{ AddToMenu(root, "", Action, NULL, yyvsp[0].num,
NULLSTR, NULLSTR);
Action = "";
}
break;
case 187:
#line 559 "gram.y"
{}
break;
case 190:
#line 566 "gram.y"
{ AddToMenu(root, yyvsp[-1].ptr, Action, pull, yyvsp[0].num,
NULLSTR, NULLSTR);
Action = "";
pull = NULL;
}
break;
case 191:
#line 571 "gram.y"
{
AddToMenu(root, yyvsp[-6].ptr, Action, pull, yyvsp[0].num,
yyvsp[-4].ptr, yyvsp[-2].ptr);
Action = "";
pull = NULL;
}
break;
case 192:
#line 579 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 193:
#line 580 "gram.y"
{
yyval.num = yyvsp[-1].num;
Action = yyvsp[0].ptr;
switch (yyvsp[-1].num) {
case F_MENU:
case F_PIEMENU:
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 194:
#line 622 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 195:
#line 623 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
case 196:
#line 624 "gram.y"
{ yyval.num = -(yyvsp[0].num); }
break;
case 197:
#line 627 "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 198:
#line 639 "gram.y"
{ ptr = (char *)malloc(strlen(yyvsp[0].ptr)+1);
strcpy(ptr, yyvsp[0].ptr);
RemoveDQuote(ptr);
yyval.ptr = ptr;
}
break;
case 199:
#line 644 "gram.y"
{ yyval.num = yyvsp[0].num; }
break;
}
#line 705 "/usr/local/share/bison/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
#if YYLSP_NEEDED
yylsp -= yylen;
#endif
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
*++yyvsp = yyval;
#if YYLSP_NEEDED
*++yylsp = yyloc;
#endif
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTBASE];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#ifdef YYERROR_VERBOSE
yyn = yypact[yystate];
if (yyn > YYFLAG && yyn < YYLAST)
{
YYSIZE_T yysize = 0;
char *yymsg;
int yyx, yycount;
yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx)
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("parse error, unexpected ") + 1;
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
if (yycount < 5)
{
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)
if (yycheck[yyx + yyn] == yyx)
{
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yycount++;
}
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exhausted");
}
else
#endif /* defined (YYERROR_VERBOSE) */
yyerror ("parse error");
}
goto yyerrlab1;
/*--------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action |
`--------------------------------------------------*/
yyerrlab1:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
/* return failure if at end of input */
if (yychar == YYEOF)
YYABORT;
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token after shifting the error
token. */
yyerrstatus = 3; /* Each real token shifted decrements this */
goto yyerrhandle;
/*-------------------------------------------------------------------.
| yyerrdefault -- current state does not do anything special for the |
| error token. |
`-------------------------------------------------------------------*/
yyerrdefault:
#if 0
/* This is wrong; only states that explicitly want error tokens
should shift them. */
/* If its default is to accept any token, ok. Otherwise pop it. */
yyn = yydefact[yystate];
if (yyn)
goto yydefault;
#endif
/*---------------------------------------------------------------.
| yyerrpop -- pop the current state because it cannot handle the |
| error token |
`---------------------------------------------------------------*/
yyerrpop:
if (yyssp == yyss)
YYABORT;
yyvsp--;
yystate = *--yyssp;
#if YYLSP_NEEDED
yylsp--;
#endif
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
/*--------------.
| yyerrhandle. |
`--------------*/
yyerrhandle:
yyn = yypact[yystate];
if (yyn == YYFLAG)
goto yyerrdefault;
yyn += YYTERROR;
if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
goto yyerrdefault;
yyn = yytable[yyn];
if (yyn < 0)
{
if (yyn == YYFLAG)
goto yyerrpop;
yyn = -yyn;
goto yyreduce;
}
else if (yyn == 0)
goto yyerrpop;
if (yyn == YYFINAL)
YYACCEPT;
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
#if YYLSP_NEEDED
*++yylsp = yylloc;
#endif
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
/*---------------------------------------------.
| yyoverflowab -- parser overflow comes here. |
`---------------------------------------------*/
yyoverflowlab:
yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */
yyreturn:
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
return yyresult;
}
#line 647 "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 || func == F_PIEMENU)
{
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,
NULL, 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);
}
syntax highlighted by Code2HTML, v. 0.9.1