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