xref: /OK3568_Linux_fs/external/xserver/hw/xwin/winprefsyacc.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* A Bison parser, made by GNU Bison 3.7.3.  */
2*4882a593Smuzhiyun 
3*4882a593Smuzhiyun /* Bison implementation for Yacc-like parsers in C
4*4882a593Smuzhiyun 
5*4882a593Smuzhiyun    Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6*4882a593Smuzhiyun    Inc.
7*4882a593Smuzhiyun 
8*4882a593Smuzhiyun    This program is free software: you can redistribute it and/or modify
9*4882a593Smuzhiyun    it under the terms of the GNU General Public License as published by
10*4882a593Smuzhiyun    the Free Software Foundation, either version 3 of the License, or
11*4882a593Smuzhiyun    (at your option) any later version.
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun    This program is distributed in the hope that it will be useful,
14*4882a593Smuzhiyun    but WITHOUT ANY WARRANTY; without even the implied warranty of
15*4882a593Smuzhiyun    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16*4882a593Smuzhiyun    GNU General Public License for more details.
17*4882a593Smuzhiyun 
18*4882a593Smuzhiyun    You should have received a copy of the GNU General Public License
19*4882a593Smuzhiyun    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun /* As a special exception, you may create a larger work that contains
22*4882a593Smuzhiyun    part or all of the Bison parser skeleton and distribute that work
23*4882a593Smuzhiyun    under terms of your choice, so long as that work isn't itself a
24*4882a593Smuzhiyun    parser generator using the skeleton or a modified version thereof
25*4882a593Smuzhiyun    as a parser skeleton.  Alternatively, if you modify or redistribute
26*4882a593Smuzhiyun    the parser skeleton itself, you may (at your option) remove this
27*4882a593Smuzhiyun    special exception, which will cause the skeleton and the resulting
28*4882a593Smuzhiyun    Bison output files to be licensed under the GNU General Public
29*4882a593Smuzhiyun    License without this special exception.
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun    This special exception was added by the Free Software Foundation in
32*4882a593Smuzhiyun    version 2.2 of Bison.  */
33*4882a593Smuzhiyun 
34*4882a593Smuzhiyun /* C LALR(1) parser skeleton written by Richard Stallman, by
35*4882a593Smuzhiyun    simplifying the original so-called "semantic" parser.  */
36*4882a593Smuzhiyun 
37*4882a593Smuzhiyun /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38*4882a593Smuzhiyun    especially those whose name start with YY_ or yy_.  They are
39*4882a593Smuzhiyun    private implementation details that can be changed or removed.  */
40*4882a593Smuzhiyun 
41*4882a593Smuzhiyun /* All symbols defined below should begin with yy or YY, to avoid
42*4882a593Smuzhiyun    infringing on user name space.  This should be done even for local
43*4882a593Smuzhiyun    variables, as they might otherwise be expanded by user macros.
44*4882a593Smuzhiyun    There are some unavoidable exceptions within include files to
45*4882a593Smuzhiyun    define necessary library symbols; they are noted "INFRINGES ON
46*4882a593Smuzhiyun    USER NAME SPACE" below.  */
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun /* Identify Bison output.  */
49*4882a593Smuzhiyun #define YYBISON 1
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun /* Bison version.  */
52*4882a593Smuzhiyun #define YYBISON_VERSION "3.7.3"
53*4882a593Smuzhiyun 
54*4882a593Smuzhiyun /* Skeleton name.  */
55*4882a593Smuzhiyun #define YYSKELETON_NAME "yacc.c"
56*4882a593Smuzhiyun 
57*4882a593Smuzhiyun /* Pure parsers.  */
58*4882a593Smuzhiyun #define YYPURE 0
59*4882a593Smuzhiyun 
60*4882a593Smuzhiyun /* Push parsers.  */
61*4882a593Smuzhiyun #define YYPUSH 0
62*4882a593Smuzhiyun 
63*4882a593Smuzhiyun /* Pull parsers.  */
64*4882a593Smuzhiyun #define YYPULL 1
65*4882a593Smuzhiyun 
66*4882a593Smuzhiyun 
67*4882a593Smuzhiyun 
68*4882a593Smuzhiyun 
69*4882a593Smuzhiyun /* First part of user prologue.  */
70*4882a593Smuzhiyun #line 1 "winprefsyacc.y"
71*4882a593Smuzhiyun 
72*4882a593Smuzhiyun /*
73*4882a593Smuzhiyun  * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
74*4882a593Smuzhiyun  * Copyright (C) Colin Harrison 2005-2008
75*4882a593Smuzhiyun  *
76*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining
77*4882a593Smuzhiyun  * a copy of this software and associated documentation files (the
78*4882a593Smuzhiyun  * "Software"), to deal in the Software without restriction, including
79*4882a593Smuzhiyun  * without limitation the rights to use, copy, modify, merge, publish,
80*4882a593Smuzhiyun  * distribute, sublicense, and/or sell copies of the Software, and to
81*4882a593Smuzhiyun  * permit persons to whom the Software is furnished to do so, subject to
82*4882a593Smuzhiyun  * the following conditions:
83*4882a593Smuzhiyun  *
84*4882a593Smuzhiyun  * The above copyright notice and this permission notice shall be
85*4882a593Smuzhiyun  * included in all copies or substantial portions of the Software.
86*4882a593Smuzhiyun  *
87*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
88*4882a593Smuzhiyun  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
89*4882a593Smuzhiyun  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
90*4882a593Smuzhiyun  * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
91*4882a593Smuzhiyun  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
92*4882a593Smuzhiyun  * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
93*4882a593Smuzhiyun  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
94*4882a593Smuzhiyun  *
95*4882a593Smuzhiyun  * Except as contained in this notice, the name of the XFree86 Project
96*4882a593Smuzhiyun  * shall not be used in advertising or otherwise to promote the sale, use
97*4882a593Smuzhiyun  * or other dealings in this Software without prior written authorization
98*4882a593Smuzhiyun  * from the XFree86 Project.
99*4882a593Smuzhiyun  *
100*4882a593Smuzhiyun  * Authors:     Earle F. Philhower, III
101*4882a593Smuzhiyun  *              Colin Harrison
102*4882a593Smuzhiyun  */
103*4882a593Smuzhiyun /* $XFree86: $ */
104*4882a593Smuzhiyun 
105*4882a593Smuzhiyun #ifdef HAVE_XWIN_CONFIG_H
106*4882a593Smuzhiyun #include <xwin-config.h>
107*4882a593Smuzhiyun #endif
108*4882a593Smuzhiyun #include <stdio.h>
109*4882a593Smuzhiyun #include <stdlib.h>
110*4882a593Smuzhiyun #define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */
111*4882a593Smuzhiyun #include <string.h>
112*4882a593Smuzhiyun #include "winprefs.h"
113*4882a593Smuzhiyun 
114*4882a593Smuzhiyun /* The following give better error messages in bison at the cost of a few KB */
115*4882a593Smuzhiyun #define YYERROR_VERBOSE 1
116*4882a593Smuzhiyun 
117*4882a593Smuzhiyun /* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
118*4882a593Smuzhiyun #define YYLTYPE_IS_TRIVIAL 1
119*4882a593Smuzhiyun #define YYENABLE_NLS 0
120*4882a593Smuzhiyun 
121*4882a593Smuzhiyun /* The global pref settings */
122*4882a593Smuzhiyun WINPREFS pref;
123*4882a593Smuzhiyun 
124*4882a593Smuzhiyun /* The working menu */
125*4882a593Smuzhiyun static MENUPARSED menu;
126*4882a593Smuzhiyun 
127*4882a593Smuzhiyun /* Functions for parsing the tokens into out structure */
128*4882a593Smuzhiyun /* Defined at the end section of this file */
129*4882a593Smuzhiyun 
130*4882a593Smuzhiyun static void SetIconDirectory (char *path);
131*4882a593Smuzhiyun static void SetDefaultIcon (char *fname);
132*4882a593Smuzhiyun static void SetRootMenu (char *menu);
133*4882a593Smuzhiyun static void SetDefaultSysMenu (char *menu, int pos);
134*4882a593Smuzhiyun static void SetTrayIcon (char *fname);
135*4882a593Smuzhiyun 
136*4882a593Smuzhiyun static void OpenMenu(char *menuname);
137*4882a593Smuzhiyun static void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param);
138*4882a593Smuzhiyun static void CloseMenu(void);
139*4882a593Smuzhiyun 
140*4882a593Smuzhiyun static void OpenIcons(void);
141*4882a593Smuzhiyun static void AddIconLine(char *matchstr, char *iconfile);
142*4882a593Smuzhiyun static void CloseIcons(void);
143*4882a593Smuzhiyun 
144*4882a593Smuzhiyun static void OpenStyles(void);
145*4882a593Smuzhiyun static void AddStyleLine(char *matchstr, unsigned long style);
146*4882a593Smuzhiyun static void CloseStyles(void);
147*4882a593Smuzhiyun 
148*4882a593Smuzhiyun static void OpenSysMenu(void);
149*4882a593Smuzhiyun static void AddSysMenuLine(char *matchstr, char *menuname, int pos);
150*4882a593Smuzhiyun static void CloseSysMenu(void);
151*4882a593Smuzhiyun 
152*4882a593Smuzhiyun static int yyerror (const char *s);
153*4882a593Smuzhiyun 
154*4882a593Smuzhiyun extern char *yytext;
155*4882a593Smuzhiyun extern int yylineno;
156*4882a593Smuzhiyun extern int yylex(void);
157*4882a593Smuzhiyun 
158*4882a593Smuzhiyun 
159*4882a593Smuzhiyun #line 160 "winprefsyacc.c"
160*4882a593Smuzhiyun 
161*4882a593Smuzhiyun # ifndef YY_CAST
162*4882a593Smuzhiyun #  ifdef __cplusplus
163*4882a593Smuzhiyun #   define YY_CAST(Type, Val) static_cast<Type> (Val)
164*4882a593Smuzhiyun #   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
165*4882a593Smuzhiyun #  else
166*4882a593Smuzhiyun #   define YY_CAST(Type, Val) ((Type) (Val))
167*4882a593Smuzhiyun #   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
168*4882a593Smuzhiyun #  endif
169*4882a593Smuzhiyun # endif
170*4882a593Smuzhiyun # ifndef YY_NULLPTR
171*4882a593Smuzhiyun #  if defined __cplusplus
172*4882a593Smuzhiyun #   if 201103L <= __cplusplus
173*4882a593Smuzhiyun #    define YY_NULLPTR nullptr
174*4882a593Smuzhiyun #   else
175*4882a593Smuzhiyun #    define YY_NULLPTR 0
176*4882a593Smuzhiyun #   endif
177*4882a593Smuzhiyun #  else
178*4882a593Smuzhiyun #   define YY_NULLPTR ((void*)0)
179*4882a593Smuzhiyun #  endif
180*4882a593Smuzhiyun # endif
181*4882a593Smuzhiyun 
182*4882a593Smuzhiyun /* Use api.header.include to #include this header
183*4882a593Smuzhiyun    instead of duplicating it here.  */
184*4882a593Smuzhiyun #ifndef YY_YY_WINPREFSYACC_H_INCLUDED
185*4882a593Smuzhiyun # define YY_YY_WINPREFSYACC_H_INCLUDED
186*4882a593Smuzhiyun /* Debug traces.  */
187*4882a593Smuzhiyun #ifndef YYDEBUG
188*4882a593Smuzhiyun # define YYDEBUG 0
189*4882a593Smuzhiyun #endif
190*4882a593Smuzhiyun #if YYDEBUG
191*4882a593Smuzhiyun extern int yydebug;
192*4882a593Smuzhiyun #endif
193*4882a593Smuzhiyun 
194*4882a593Smuzhiyun /* Token kinds.  */
195*4882a593Smuzhiyun #ifndef YYTOKENTYPE
196*4882a593Smuzhiyun # define YYTOKENTYPE
197*4882a593Smuzhiyun   enum yytokentype
198*4882a593Smuzhiyun   {
199*4882a593Smuzhiyun     YYEMPTY = -2,
200*4882a593Smuzhiyun     YYEOF = 0,                     /* "end of file"  */
201*4882a593Smuzhiyun     YYerror = 256,                 /* error  */
202*4882a593Smuzhiyun     YYUNDEF = 257,                 /* "invalid token"  */
203*4882a593Smuzhiyun     NEWLINE = 258,                 /* NEWLINE  */
204*4882a593Smuzhiyun     MENU = 259,                    /* MENU  */
205*4882a593Smuzhiyun     LB = 260,                      /* LB  */
206*4882a593Smuzhiyun     RB = 261,                      /* RB  */
207*4882a593Smuzhiyun     ICONDIRECTORY = 262,           /* ICONDIRECTORY  */
208*4882a593Smuzhiyun     DEFAULTICON = 263,             /* DEFAULTICON  */
209*4882a593Smuzhiyun     ICONS = 264,                   /* ICONS  */
210*4882a593Smuzhiyun     STYLES = 265,                  /* STYLES  */
211*4882a593Smuzhiyun     TOPMOST = 266,                 /* TOPMOST  */
212*4882a593Smuzhiyun     MAXIMIZE = 267,                /* MAXIMIZE  */
213*4882a593Smuzhiyun     MINIMIZE = 268,                /* MINIMIZE  */
214*4882a593Smuzhiyun     BOTTOM = 269,                  /* BOTTOM  */
215*4882a593Smuzhiyun     NOTITLE = 270,                 /* NOTITLE  */
216*4882a593Smuzhiyun     OUTLINE = 271,                 /* OUTLINE  */
217*4882a593Smuzhiyun     NOFRAME = 272,                 /* NOFRAME  */
218*4882a593Smuzhiyun     DEFAULTSYSMENU = 273,          /* DEFAULTSYSMENU  */
219*4882a593Smuzhiyun     SYSMENU = 274,                 /* SYSMENU  */
220*4882a593Smuzhiyun     ROOTMENU = 275,                /* ROOTMENU  */
221*4882a593Smuzhiyun     SEPARATOR = 276,               /* SEPARATOR  */
222*4882a593Smuzhiyun     ATSTART = 277,                 /* ATSTART  */
223*4882a593Smuzhiyun     ATEND = 278,                   /* ATEND  */
224*4882a593Smuzhiyun     EXEC = 279,                    /* EXEC  */
225*4882a593Smuzhiyun     ALWAYSONTOP = 280,             /* ALWAYSONTOP  */
226*4882a593Smuzhiyun     DEBUGOUTPUT = 281,             /* "DEBUG"  */
227*4882a593Smuzhiyun     RELOAD = 282,                  /* RELOAD  */
228*4882a593Smuzhiyun     TRAYICON = 283,                /* TRAYICON  */
229*4882a593Smuzhiyun     FORCEEXIT = 284,               /* FORCEEXIT  */
230*4882a593Smuzhiyun     SILENTEXIT = 285,              /* SILENTEXIT  */
231*4882a593Smuzhiyun     STRING = 286                   /* STRING  */
232*4882a593Smuzhiyun   };
233*4882a593Smuzhiyun   typedef enum yytokentype yytoken_kind_t;
234*4882a593Smuzhiyun #endif
235*4882a593Smuzhiyun /* Token kinds.  */
236*4882a593Smuzhiyun #define YYEOF 0
237*4882a593Smuzhiyun #define YYerror 256
238*4882a593Smuzhiyun #define YYUNDEF 257
239*4882a593Smuzhiyun #define NEWLINE 258
240*4882a593Smuzhiyun #define MENU 259
241*4882a593Smuzhiyun #define LB 260
242*4882a593Smuzhiyun #define RB 261
243*4882a593Smuzhiyun #define ICONDIRECTORY 262
244*4882a593Smuzhiyun #define DEFAULTICON 263
245*4882a593Smuzhiyun #define ICONS 264
246*4882a593Smuzhiyun #define STYLES 265
247*4882a593Smuzhiyun #define TOPMOST 266
248*4882a593Smuzhiyun #define MAXIMIZE 267
249*4882a593Smuzhiyun #define MINIMIZE 268
250*4882a593Smuzhiyun #define BOTTOM 269
251*4882a593Smuzhiyun #define NOTITLE 270
252*4882a593Smuzhiyun #define OUTLINE 271
253*4882a593Smuzhiyun #define NOFRAME 272
254*4882a593Smuzhiyun #define DEFAULTSYSMENU 273
255*4882a593Smuzhiyun #define SYSMENU 274
256*4882a593Smuzhiyun #define ROOTMENU 275
257*4882a593Smuzhiyun #define SEPARATOR 276
258*4882a593Smuzhiyun #define ATSTART 277
259*4882a593Smuzhiyun #define ATEND 278
260*4882a593Smuzhiyun #define EXEC 279
261*4882a593Smuzhiyun #define ALWAYSONTOP 280
262*4882a593Smuzhiyun #define DEBUGOUTPUT 281
263*4882a593Smuzhiyun #define RELOAD 282
264*4882a593Smuzhiyun #define TRAYICON 283
265*4882a593Smuzhiyun #define FORCEEXIT 284
266*4882a593Smuzhiyun #define SILENTEXIT 285
267*4882a593Smuzhiyun #define STRING 286
268*4882a593Smuzhiyun 
269*4882a593Smuzhiyun /* Value type.  */
270*4882a593Smuzhiyun #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
271*4882a593Smuzhiyun union YYSTYPE
272*4882a593Smuzhiyun {
273*4882a593Smuzhiyun #line 90 "winprefsyacc.y"
274*4882a593Smuzhiyun 
275*4882a593Smuzhiyun   char *sVal;
276*4882a593Smuzhiyun   unsigned long uVal;
277*4882a593Smuzhiyun   int iVal;
278*4882a593Smuzhiyun 
279*4882a593Smuzhiyun #line 280 "winprefsyacc.c"
280*4882a593Smuzhiyun 
281*4882a593Smuzhiyun };
282*4882a593Smuzhiyun typedef union YYSTYPE YYSTYPE;
283*4882a593Smuzhiyun # define YYSTYPE_IS_TRIVIAL 1
284*4882a593Smuzhiyun # define YYSTYPE_IS_DECLARED 1
285*4882a593Smuzhiyun #endif
286*4882a593Smuzhiyun 
287*4882a593Smuzhiyun 
288*4882a593Smuzhiyun extern YYSTYPE yylval;
289*4882a593Smuzhiyun 
290*4882a593Smuzhiyun int yyparse (void);
291*4882a593Smuzhiyun 
292*4882a593Smuzhiyun #endif /* !YY_YY_WINPREFSYACC_H_INCLUDED  */
293*4882a593Smuzhiyun /* Symbol kind.  */
294*4882a593Smuzhiyun enum yysymbol_kind_t
295*4882a593Smuzhiyun {
296*4882a593Smuzhiyun   YYSYMBOL_YYEMPTY = -2,
297*4882a593Smuzhiyun   YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
298*4882a593Smuzhiyun   YYSYMBOL_YYerror = 1,                    /* error  */
299*4882a593Smuzhiyun   YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
300*4882a593Smuzhiyun   YYSYMBOL_NEWLINE = 3,                    /* NEWLINE  */
301*4882a593Smuzhiyun   YYSYMBOL_MENU = 4,                       /* MENU  */
302*4882a593Smuzhiyun   YYSYMBOL_LB = 5,                         /* LB  */
303*4882a593Smuzhiyun   YYSYMBOL_RB = 6,                         /* RB  */
304*4882a593Smuzhiyun   YYSYMBOL_ICONDIRECTORY = 7,              /* ICONDIRECTORY  */
305*4882a593Smuzhiyun   YYSYMBOL_DEFAULTICON = 8,                /* DEFAULTICON  */
306*4882a593Smuzhiyun   YYSYMBOL_ICONS = 9,                      /* ICONS  */
307*4882a593Smuzhiyun   YYSYMBOL_STYLES = 10,                    /* STYLES  */
308*4882a593Smuzhiyun   YYSYMBOL_TOPMOST = 11,                   /* TOPMOST  */
309*4882a593Smuzhiyun   YYSYMBOL_MAXIMIZE = 12,                  /* MAXIMIZE  */
310*4882a593Smuzhiyun   YYSYMBOL_MINIMIZE = 13,                  /* MINIMIZE  */
311*4882a593Smuzhiyun   YYSYMBOL_BOTTOM = 14,                    /* BOTTOM  */
312*4882a593Smuzhiyun   YYSYMBOL_NOTITLE = 15,                   /* NOTITLE  */
313*4882a593Smuzhiyun   YYSYMBOL_OUTLINE = 16,                   /* OUTLINE  */
314*4882a593Smuzhiyun   YYSYMBOL_NOFRAME = 17,                   /* NOFRAME  */
315*4882a593Smuzhiyun   YYSYMBOL_DEFAULTSYSMENU = 18,            /* DEFAULTSYSMENU  */
316*4882a593Smuzhiyun   YYSYMBOL_SYSMENU = 19,                   /* SYSMENU  */
317*4882a593Smuzhiyun   YYSYMBOL_ROOTMENU = 20,                  /* ROOTMENU  */
318*4882a593Smuzhiyun   YYSYMBOL_SEPARATOR = 21,                 /* SEPARATOR  */
319*4882a593Smuzhiyun   YYSYMBOL_ATSTART = 22,                   /* ATSTART  */
320*4882a593Smuzhiyun   YYSYMBOL_ATEND = 23,                     /* ATEND  */
321*4882a593Smuzhiyun   YYSYMBOL_EXEC = 24,                      /* EXEC  */
322*4882a593Smuzhiyun   YYSYMBOL_ALWAYSONTOP = 25,               /* ALWAYSONTOP  */
323*4882a593Smuzhiyun   YYSYMBOL_DEBUGOUTPUT = 26,               /* "DEBUG"  */
324*4882a593Smuzhiyun   YYSYMBOL_RELOAD = 27,                    /* RELOAD  */
325*4882a593Smuzhiyun   YYSYMBOL_TRAYICON = 28,                  /* TRAYICON  */
326*4882a593Smuzhiyun   YYSYMBOL_FORCEEXIT = 29,                 /* FORCEEXIT  */
327*4882a593Smuzhiyun   YYSYMBOL_SILENTEXIT = 30,                /* SILENTEXIT  */
328*4882a593Smuzhiyun   YYSYMBOL_STRING = 31,                    /* STRING  */
329*4882a593Smuzhiyun   YYSYMBOL_YYACCEPT = 32,                  /* $accept  */
330*4882a593Smuzhiyun   YYSYMBOL_input = 33,                     /* input  */
331*4882a593Smuzhiyun   YYSYMBOL_line = 34,                      /* line  */
332*4882a593Smuzhiyun   YYSYMBOL_newline_or_nada = 35,           /* newline_or_nada  */
333*4882a593Smuzhiyun   YYSYMBOL_command = 36,                   /* command  */
334*4882a593Smuzhiyun   YYSYMBOL_trayicon = 37,                  /* trayicon  */
335*4882a593Smuzhiyun   YYSYMBOL_rootmenu = 38,                  /* rootmenu  */
336*4882a593Smuzhiyun   YYSYMBOL_defaultsysmenu = 39,            /* defaultsysmenu  */
337*4882a593Smuzhiyun   YYSYMBOL_defaulticon = 40,               /* defaulticon  */
338*4882a593Smuzhiyun   YYSYMBOL_icondirectory = 41,             /* icondirectory  */
339*4882a593Smuzhiyun   YYSYMBOL_menuline = 42,                  /* menuline  */
340*4882a593Smuzhiyun   YYSYMBOL_menulist = 43,                  /* menulist  */
341*4882a593Smuzhiyun   YYSYMBOL_menu = 44,                      /* menu  */
342*4882a593Smuzhiyun   YYSYMBOL_45_1 = 45,                      /* $@1  */
343*4882a593Smuzhiyun   YYSYMBOL_iconline = 46,                  /* iconline  */
344*4882a593Smuzhiyun   YYSYMBOL_iconlist = 47,                  /* iconlist  */
345*4882a593Smuzhiyun   YYSYMBOL_icons = 48,                     /* icons  */
346*4882a593Smuzhiyun   YYSYMBOL_49_2 = 49,                      /* $@2  */
347*4882a593Smuzhiyun   YYSYMBOL_group1 = 50,                    /* group1  */
348*4882a593Smuzhiyun   YYSYMBOL_group2 = 51,                    /* group2  */
349*4882a593Smuzhiyun   YYSYMBOL_stylecombo = 52,                /* stylecombo  */
350*4882a593Smuzhiyun   YYSYMBOL_styleline = 53,                 /* styleline  */
351*4882a593Smuzhiyun   YYSYMBOL_stylelist = 54,                 /* stylelist  */
352*4882a593Smuzhiyun   YYSYMBOL_styles = 55,                    /* styles  */
353*4882a593Smuzhiyun   YYSYMBOL_56_3 = 56,                      /* $@3  */
354*4882a593Smuzhiyun   YYSYMBOL_atspot = 57,                    /* atspot  */
355*4882a593Smuzhiyun   YYSYMBOL_sysmenuline = 58,               /* sysmenuline  */
356*4882a593Smuzhiyun   YYSYMBOL_sysmenulist = 59,               /* sysmenulist  */
357*4882a593Smuzhiyun   YYSYMBOL_sysmenu = 60,                   /* sysmenu  */
358*4882a593Smuzhiyun   YYSYMBOL_61_4 = 61,                      /* $@4  */
359*4882a593Smuzhiyun   YYSYMBOL_forceexit = 62,                 /* forceexit  */
360*4882a593Smuzhiyun   YYSYMBOL_silentexit = 63,                /* silentexit  */
361*4882a593Smuzhiyun   YYSYMBOL_debug = 64                      /* debug  */
362*4882a593Smuzhiyun };
363*4882a593Smuzhiyun typedef enum yysymbol_kind_t yysymbol_kind_t;
364*4882a593Smuzhiyun 
365*4882a593Smuzhiyun 
366*4882a593Smuzhiyun 
367*4882a593Smuzhiyun 
368*4882a593Smuzhiyun #ifdef short
369*4882a593Smuzhiyun # undef short
370*4882a593Smuzhiyun #endif
371*4882a593Smuzhiyun 
372*4882a593Smuzhiyun /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
373*4882a593Smuzhiyun    <limits.h> and (if available) <stdint.h> are included
374*4882a593Smuzhiyun    so that the code can choose integer types of a good width.  */
375*4882a593Smuzhiyun 
376*4882a593Smuzhiyun #ifndef __PTRDIFF_MAX__
377*4882a593Smuzhiyun # include <limits.h> /* INFRINGES ON USER NAME SPACE */
378*4882a593Smuzhiyun # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
379*4882a593Smuzhiyun #  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
380*4882a593Smuzhiyun #  define YY_STDINT_H
381*4882a593Smuzhiyun # endif
382*4882a593Smuzhiyun #endif
383*4882a593Smuzhiyun 
384*4882a593Smuzhiyun /* Narrow types that promote to a signed type and that can represent a
385*4882a593Smuzhiyun    signed or unsigned integer of at least N bits.  In tables they can
386*4882a593Smuzhiyun    save space and decrease cache pressure.  Promoting to a signed type
387*4882a593Smuzhiyun    helps avoid bugs in integer arithmetic.  */
388*4882a593Smuzhiyun 
389*4882a593Smuzhiyun #ifdef __INT_LEAST8_MAX__
390*4882a593Smuzhiyun typedef __INT_LEAST8_TYPE__ yytype_int8;
391*4882a593Smuzhiyun #elif defined YY_STDINT_H
392*4882a593Smuzhiyun typedef int_least8_t yytype_int8;
393*4882a593Smuzhiyun #else
394*4882a593Smuzhiyun typedef signed char yytype_int8;
395*4882a593Smuzhiyun #endif
396*4882a593Smuzhiyun 
397*4882a593Smuzhiyun #ifdef __INT_LEAST16_MAX__
398*4882a593Smuzhiyun typedef __INT_LEAST16_TYPE__ yytype_int16;
399*4882a593Smuzhiyun #elif defined YY_STDINT_H
400*4882a593Smuzhiyun typedef int_least16_t yytype_int16;
401*4882a593Smuzhiyun #else
402*4882a593Smuzhiyun typedef short yytype_int16;
403*4882a593Smuzhiyun #endif
404*4882a593Smuzhiyun 
405*4882a593Smuzhiyun #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
406*4882a593Smuzhiyun typedef __UINT_LEAST8_TYPE__ yytype_uint8;
407*4882a593Smuzhiyun #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
408*4882a593Smuzhiyun        && UINT_LEAST8_MAX <= INT_MAX)
409*4882a593Smuzhiyun typedef uint_least8_t yytype_uint8;
410*4882a593Smuzhiyun #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
411*4882a593Smuzhiyun typedef unsigned char yytype_uint8;
412*4882a593Smuzhiyun #else
413*4882a593Smuzhiyun typedef short yytype_uint8;
414*4882a593Smuzhiyun #endif
415*4882a593Smuzhiyun 
416*4882a593Smuzhiyun #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
417*4882a593Smuzhiyun typedef __UINT_LEAST16_TYPE__ yytype_uint16;
418*4882a593Smuzhiyun #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
419*4882a593Smuzhiyun        && UINT_LEAST16_MAX <= INT_MAX)
420*4882a593Smuzhiyun typedef uint_least16_t yytype_uint16;
421*4882a593Smuzhiyun #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
422*4882a593Smuzhiyun typedef unsigned short yytype_uint16;
423*4882a593Smuzhiyun #else
424*4882a593Smuzhiyun typedef int yytype_uint16;
425*4882a593Smuzhiyun #endif
426*4882a593Smuzhiyun 
427*4882a593Smuzhiyun #ifndef YYPTRDIFF_T
428*4882a593Smuzhiyun # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
429*4882a593Smuzhiyun #  define YYPTRDIFF_T __PTRDIFF_TYPE__
430*4882a593Smuzhiyun #  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
431*4882a593Smuzhiyun # elif defined PTRDIFF_MAX
432*4882a593Smuzhiyun #  ifndef ptrdiff_t
433*4882a593Smuzhiyun #   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
434*4882a593Smuzhiyun #  endif
435*4882a593Smuzhiyun #  define YYPTRDIFF_T ptrdiff_t
436*4882a593Smuzhiyun #  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
437*4882a593Smuzhiyun # else
438*4882a593Smuzhiyun #  define YYPTRDIFF_T long
439*4882a593Smuzhiyun #  define YYPTRDIFF_MAXIMUM LONG_MAX
440*4882a593Smuzhiyun # endif
441*4882a593Smuzhiyun #endif
442*4882a593Smuzhiyun 
443*4882a593Smuzhiyun #ifndef YYSIZE_T
444*4882a593Smuzhiyun # ifdef __SIZE_TYPE__
445*4882a593Smuzhiyun #  define YYSIZE_T __SIZE_TYPE__
446*4882a593Smuzhiyun # elif defined size_t
447*4882a593Smuzhiyun #  define YYSIZE_T size_t
448*4882a593Smuzhiyun # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
449*4882a593Smuzhiyun #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
450*4882a593Smuzhiyun #  define YYSIZE_T size_t
451*4882a593Smuzhiyun # else
452*4882a593Smuzhiyun #  define YYSIZE_T unsigned
453*4882a593Smuzhiyun # endif
454*4882a593Smuzhiyun #endif
455*4882a593Smuzhiyun 
456*4882a593Smuzhiyun #define YYSIZE_MAXIMUM                                  \
457*4882a593Smuzhiyun   YY_CAST (YYPTRDIFF_T,                                 \
458*4882a593Smuzhiyun            (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
459*4882a593Smuzhiyun             ? YYPTRDIFF_MAXIMUM                         \
460*4882a593Smuzhiyun             : YY_CAST (YYSIZE_T, -1)))
461*4882a593Smuzhiyun 
462*4882a593Smuzhiyun #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
463*4882a593Smuzhiyun 
464*4882a593Smuzhiyun 
465*4882a593Smuzhiyun /* Stored state numbers (used for stacks). */
466*4882a593Smuzhiyun typedef yytype_int8 yy_state_t;
467*4882a593Smuzhiyun 
468*4882a593Smuzhiyun /* State numbers in computations.  */
469*4882a593Smuzhiyun typedef int yy_state_fast_t;
470*4882a593Smuzhiyun 
471*4882a593Smuzhiyun #ifndef YY_
472*4882a593Smuzhiyun # if defined YYENABLE_NLS && YYENABLE_NLS
473*4882a593Smuzhiyun #  if ENABLE_NLS
474*4882a593Smuzhiyun #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
475*4882a593Smuzhiyun #   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
476*4882a593Smuzhiyun #  endif
477*4882a593Smuzhiyun # endif
478*4882a593Smuzhiyun # ifndef YY_
479*4882a593Smuzhiyun #  define YY_(Msgid) Msgid
480*4882a593Smuzhiyun # endif
481*4882a593Smuzhiyun #endif
482*4882a593Smuzhiyun 
483*4882a593Smuzhiyun 
484*4882a593Smuzhiyun #ifndef YY_ATTRIBUTE_PURE
485*4882a593Smuzhiyun # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
486*4882a593Smuzhiyun #  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
487*4882a593Smuzhiyun # else
488*4882a593Smuzhiyun #  define YY_ATTRIBUTE_PURE
489*4882a593Smuzhiyun # endif
490*4882a593Smuzhiyun #endif
491*4882a593Smuzhiyun 
492*4882a593Smuzhiyun #ifndef YY_ATTRIBUTE_UNUSED
493*4882a593Smuzhiyun # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
494*4882a593Smuzhiyun #  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
495*4882a593Smuzhiyun # else
496*4882a593Smuzhiyun #  define YY_ATTRIBUTE_UNUSED
497*4882a593Smuzhiyun # endif
498*4882a593Smuzhiyun #endif
499*4882a593Smuzhiyun 
500*4882a593Smuzhiyun /* Suppress unused-variable warnings by "using" E.  */
501*4882a593Smuzhiyun #if ! defined lint || defined __GNUC__
502*4882a593Smuzhiyun # define YYUSE(E) ((void) (E))
503*4882a593Smuzhiyun #else
504*4882a593Smuzhiyun # define YYUSE(E) /* empty */
505*4882a593Smuzhiyun #endif
506*4882a593Smuzhiyun 
507*4882a593Smuzhiyun #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
508*4882a593Smuzhiyun /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
509*4882a593Smuzhiyun # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
510*4882a593Smuzhiyun     _Pragma ("GCC diagnostic push")                                     \
511*4882a593Smuzhiyun     _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
512*4882a593Smuzhiyun     _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
513*4882a593Smuzhiyun # define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
514*4882a593Smuzhiyun     _Pragma ("GCC diagnostic pop")
515*4882a593Smuzhiyun #else
516*4882a593Smuzhiyun # define YY_INITIAL_VALUE(Value) Value
517*4882a593Smuzhiyun #endif
518*4882a593Smuzhiyun #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
519*4882a593Smuzhiyun # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
520*4882a593Smuzhiyun # define YY_IGNORE_MAYBE_UNINITIALIZED_END
521*4882a593Smuzhiyun #endif
522*4882a593Smuzhiyun #ifndef YY_INITIAL_VALUE
523*4882a593Smuzhiyun # define YY_INITIAL_VALUE(Value) /* Nothing. */
524*4882a593Smuzhiyun #endif
525*4882a593Smuzhiyun 
526*4882a593Smuzhiyun #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
527*4882a593Smuzhiyun # define YY_IGNORE_USELESS_CAST_BEGIN                          \
528*4882a593Smuzhiyun     _Pragma ("GCC diagnostic push")                            \
529*4882a593Smuzhiyun     _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
530*4882a593Smuzhiyun # define YY_IGNORE_USELESS_CAST_END            \
531*4882a593Smuzhiyun     _Pragma ("GCC diagnostic pop")
532*4882a593Smuzhiyun #endif
533*4882a593Smuzhiyun #ifndef YY_IGNORE_USELESS_CAST_BEGIN
534*4882a593Smuzhiyun # define YY_IGNORE_USELESS_CAST_BEGIN
535*4882a593Smuzhiyun # define YY_IGNORE_USELESS_CAST_END
536*4882a593Smuzhiyun #endif
537*4882a593Smuzhiyun 
538*4882a593Smuzhiyun 
539*4882a593Smuzhiyun #define YY_ASSERT(E) ((void) (0 && (E)))
540*4882a593Smuzhiyun 
541*4882a593Smuzhiyun #if !defined yyoverflow
542*4882a593Smuzhiyun 
543*4882a593Smuzhiyun /* The parser invokes alloca or malloc; define the necessary symbols.  */
544*4882a593Smuzhiyun 
545*4882a593Smuzhiyun # ifdef YYSTACK_USE_ALLOCA
546*4882a593Smuzhiyun #  if YYSTACK_USE_ALLOCA
547*4882a593Smuzhiyun #   ifdef __GNUC__
548*4882a593Smuzhiyun #    define YYSTACK_ALLOC __builtin_alloca
549*4882a593Smuzhiyun #   elif defined __BUILTIN_VA_ARG_INCR
550*4882a593Smuzhiyun #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
551*4882a593Smuzhiyun #   elif defined _AIX
552*4882a593Smuzhiyun #    define YYSTACK_ALLOC __alloca
553*4882a593Smuzhiyun #   elif defined _MSC_VER
554*4882a593Smuzhiyun #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
555*4882a593Smuzhiyun #    define alloca _alloca
556*4882a593Smuzhiyun #   else
557*4882a593Smuzhiyun #    define YYSTACK_ALLOC alloca
558*4882a593Smuzhiyun #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
559*4882a593Smuzhiyun #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
560*4882a593Smuzhiyun       /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
561*4882a593Smuzhiyun #     ifndef EXIT_SUCCESS
562*4882a593Smuzhiyun #      define EXIT_SUCCESS 0
563*4882a593Smuzhiyun #     endif
564*4882a593Smuzhiyun #    endif
565*4882a593Smuzhiyun #   endif
566*4882a593Smuzhiyun #  endif
567*4882a593Smuzhiyun # endif
568*4882a593Smuzhiyun 
569*4882a593Smuzhiyun # ifdef YYSTACK_ALLOC
570*4882a593Smuzhiyun    /* Pacify GCC's 'empty if-body' warning.  */
571*4882a593Smuzhiyun #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
572*4882a593Smuzhiyun #  ifndef YYSTACK_ALLOC_MAXIMUM
573*4882a593Smuzhiyun     /* The OS might guarantee only one guard page at the bottom of the stack,
574*4882a593Smuzhiyun        and a page size can be as small as 4096 bytes.  So we cannot safely
575*4882a593Smuzhiyun        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
576*4882a593Smuzhiyun        to allow for a few compiler-allocated temporary stack slots.  */
577*4882a593Smuzhiyun #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
578*4882a593Smuzhiyun #  endif
579*4882a593Smuzhiyun # else
580*4882a593Smuzhiyun #  define YYSTACK_ALLOC YYMALLOC
581*4882a593Smuzhiyun #  define YYSTACK_FREE YYFREE
582*4882a593Smuzhiyun #  ifndef YYSTACK_ALLOC_MAXIMUM
583*4882a593Smuzhiyun #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
584*4882a593Smuzhiyun #  endif
585*4882a593Smuzhiyun #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
586*4882a593Smuzhiyun        && ! ((defined YYMALLOC || defined malloc) \
587*4882a593Smuzhiyun              && (defined YYFREE || defined free)))
588*4882a593Smuzhiyun #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
589*4882a593Smuzhiyun #   ifndef EXIT_SUCCESS
590*4882a593Smuzhiyun #    define EXIT_SUCCESS 0
591*4882a593Smuzhiyun #   endif
592*4882a593Smuzhiyun #  endif
593*4882a593Smuzhiyun #  ifndef YYMALLOC
594*4882a593Smuzhiyun #   define YYMALLOC malloc
595*4882a593Smuzhiyun #   if ! defined malloc && ! defined EXIT_SUCCESS
596*4882a593Smuzhiyun void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
597*4882a593Smuzhiyun #   endif
598*4882a593Smuzhiyun #  endif
599*4882a593Smuzhiyun #  ifndef YYFREE
600*4882a593Smuzhiyun #   define YYFREE free
601*4882a593Smuzhiyun #   if ! defined free && ! defined EXIT_SUCCESS
602*4882a593Smuzhiyun void free (void *); /* INFRINGES ON USER NAME SPACE */
603*4882a593Smuzhiyun #   endif
604*4882a593Smuzhiyun #  endif
605*4882a593Smuzhiyun # endif
606*4882a593Smuzhiyun #endif /* !defined yyoverflow */
607*4882a593Smuzhiyun 
608*4882a593Smuzhiyun #if (! defined yyoverflow \
609*4882a593Smuzhiyun      && (! defined __cplusplus \
610*4882a593Smuzhiyun          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
611*4882a593Smuzhiyun 
612*4882a593Smuzhiyun /* A type that is properly aligned for any stack member.  */
613*4882a593Smuzhiyun union yyalloc
614*4882a593Smuzhiyun {
615*4882a593Smuzhiyun   yy_state_t yyss_alloc;
616*4882a593Smuzhiyun   YYSTYPE yyvs_alloc;
617*4882a593Smuzhiyun };
618*4882a593Smuzhiyun 
619*4882a593Smuzhiyun /* The size of the maximum gap between one aligned stack and the next.  */
620*4882a593Smuzhiyun # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
621*4882a593Smuzhiyun 
622*4882a593Smuzhiyun /* The size of an array large to enough to hold all stacks, each with
623*4882a593Smuzhiyun    N elements.  */
624*4882a593Smuzhiyun # define YYSTACK_BYTES(N) \
625*4882a593Smuzhiyun      ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
626*4882a593Smuzhiyun       + YYSTACK_GAP_MAXIMUM)
627*4882a593Smuzhiyun 
628*4882a593Smuzhiyun # define YYCOPY_NEEDED 1
629*4882a593Smuzhiyun 
630*4882a593Smuzhiyun /* Relocate STACK from its old location to the new one.  The
631*4882a593Smuzhiyun    local variables YYSIZE and YYSTACKSIZE give the old and new number of
632*4882a593Smuzhiyun    elements in the stack, and YYPTR gives the new location of the
633*4882a593Smuzhiyun    stack.  Advance YYPTR to a properly aligned location for the next
634*4882a593Smuzhiyun    stack.  */
635*4882a593Smuzhiyun # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
636*4882a593Smuzhiyun     do                                                                  \
637*4882a593Smuzhiyun       {                                                                 \
638*4882a593Smuzhiyun         YYPTRDIFF_T yynewbytes;                                         \
639*4882a593Smuzhiyun         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
640*4882a593Smuzhiyun         Stack = &yyptr->Stack_alloc;                                    \
641*4882a593Smuzhiyun         yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
642*4882a593Smuzhiyun         yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
643*4882a593Smuzhiyun       }                                                                 \
644*4882a593Smuzhiyun     while (0)
645*4882a593Smuzhiyun 
646*4882a593Smuzhiyun #endif
647*4882a593Smuzhiyun 
648*4882a593Smuzhiyun #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
649*4882a593Smuzhiyun /* Copy COUNT objects from SRC to DST.  The source and destination do
650*4882a593Smuzhiyun    not overlap.  */
651*4882a593Smuzhiyun # ifndef YYCOPY
652*4882a593Smuzhiyun #  if defined __GNUC__ && 1 < __GNUC__
653*4882a593Smuzhiyun #   define YYCOPY(Dst, Src, Count) \
654*4882a593Smuzhiyun       __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
655*4882a593Smuzhiyun #  else
656*4882a593Smuzhiyun #   define YYCOPY(Dst, Src, Count)              \
657*4882a593Smuzhiyun       do                                        \
658*4882a593Smuzhiyun         {                                       \
659*4882a593Smuzhiyun           YYPTRDIFF_T yyi;                      \
660*4882a593Smuzhiyun           for (yyi = 0; yyi < (Count); yyi++)   \
661*4882a593Smuzhiyun             (Dst)[yyi] = (Src)[yyi];            \
662*4882a593Smuzhiyun         }                                       \
663*4882a593Smuzhiyun       while (0)
664*4882a593Smuzhiyun #  endif
665*4882a593Smuzhiyun # endif
666*4882a593Smuzhiyun #endif /* !YYCOPY_NEEDED */
667*4882a593Smuzhiyun 
668*4882a593Smuzhiyun /* YYFINAL -- State number of the termination state.  */
669*4882a593Smuzhiyun #define YYFINAL  2
670*4882a593Smuzhiyun /* YYLAST -- Last index in YYTABLE.  */
671*4882a593Smuzhiyun #define YYLAST   98
672*4882a593Smuzhiyun 
673*4882a593Smuzhiyun /* YYNTOKENS -- Number of terminals.  */
674*4882a593Smuzhiyun #define YYNTOKENS  32
675*4882a593Smuzhiyun /* YYNNTS -- Number of nonterminals.  */
676*4882a593Smuzhiyun #define YYNNTS  33
677*4882a593Smuzhiyun /* YYNRULES -- Number of rules.  */
678*4882a593Smuzhiyun #define YYNRULES  65
679*4882a593Smuzhiyun /* YYNSTATES -- Number of states.  */
680*4882a593Smuzhiyun #define YYNSTATES  121
681*4882a593Smuzhiyun 
682*4882a593Smuzhiyun /* YYMAXUTOK -- Last valid token kind.  */
683*4882a593Smuzhiyun #define YYMAXUTOK   286
684*4882a593Smuzhiyun 
685*4882a593Smuzhiyun 
686*4882a593Smuzhiyun /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
687*4882a593Smuzhiyun    as returned by yylex, with out-of-bounds checking.  */
688*4882a593Smuzhiyun #define YYTRANSLATE(YYX)                                \
689*4882a593Smuzhiyun   (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
690*4882a593Smuzhiyun    ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
691*4882a593Smuzhiyun    : YYSYMBOL_YYUNDEF)
692*4882a593Smuzhiyun 
693*4882a593Smuzhiyun /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
694*4882a593Smuzhiyun    as returned by yylex.  */
695*4882a593Smuzhiyun static const yytype_int8 yytranslate[] =
696*4882a593Smuzhiyun {
697*4882a593Smuzhiyun        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
698*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
699*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
700*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
701*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
702*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
703*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
704*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
705*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
706*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
707*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
708*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
709*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
710*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
711*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
712*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
713*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
714*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
715*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
716*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
717*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
718*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
719*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
720*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
721*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
722*4882a593Smuzhiyun        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
723*4882a593Smuzhiyun        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
724*4882a593Smuzhiyun       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
725*4882a593Smuzhiyun       25,    26,    27,    28,    29,    30,    31
726*4882a593Smuzhiyun };
727*4882a593Smuzhiyun 
728*4882a593Smuzhiyun #if YYDEBUG
729*4882a593Smuzhiyun   /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
730*4882a593Smuzhiyun static const yytype_uint8 yyrline[] =
731*4882a593Smuzhiyun {
732*4882a593Smuzhiyun        0,   133,   133,   134,   137,   138,   142,   143,   146,   147,
733*4882a593Smuzhiyun      148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
734*4882a593Smuzhiyun      160,   163,   166,   169,   172,   175,   176,   177,   178,   179,
735*4882a593Smuzhiyun      182,   183,   186,   186,   189,   192,   193,   196,   196,   199,
736*4882a593Smuzhiyun      200,   201,   202,   205,   206,   207,   210,   211,   212,   213,
737*4882a593Smuzhiyun      216,   219,   220,   223,   223,   226,   227,   228,   231,   234,
738*4882a593Smuzhiyun      235,   238,   238,   241,   244,   247
739*4882a593Smuzhiyun };
740*4882a593Smuzhiyun #endif
741*4882a593Smuzhiyun 
742*4882a593Smuzhiyun /** Accessing symbol of state STATE.  */
743*4882a593Smuzhiyun #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
744*4882a593Smuzhiyun 
745*4882a593Smuzhiyun #if YYDEBUG || 0
746*4882a593Smuzhiyun /* The user-facing name of the symbol whose (internal) number is
747*4882a593Smuzhiyun    YYSYMBOL.  No bounds checking.  */
748*4882a593Smuzhiyun static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
749*4882a593Smuzhiyun 
750*4882a593Smuzhiyun /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
751*4882a593Smuzhiyun    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
752*4882a593Smuzhiyun static const char *const yytname[] =
753*4882a593Smuzhiyun {
754*4882a593Smuzhiyun   "\"end of file\"", "error", "\"invalid token\"", "NEWLINE", "MENU",
755*4882a593Smuzhiyun   "LB", "RB", "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST",
756*4882a593Smuzhiyun   "MAXIMIZE", "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME",
757*4882a593Smuzhiyun   "DEFAULTSYSMENU", "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND",
758*4882a593Smuzhiyun   "EXEC", "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT",
759*4882a593Smuzhiyun   "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada",
760*4882a593Smuzhiyun   "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon",
761*4882a593Smuzhiyun   "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline",
762*4882a593Smuzhiyun   "iconlist", "icons", "$@2", "group1", "group2", "stylecombo",
763*4882a593Smuzhiyun   "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline",
764*4882a593Smuzhiyun   "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR
765*4882a593Smuzhiyun };
766*4882a593Smuzhiyun 
767*4882a593Smuzhiyun static const char *
yysymbol_name(yysymbol_kind_t yysymbol)768*4882a593Smuzhiyun yysymbol_name (yysymbol_kind_t yysymbol)
769*4882a593Smuzhiyun {
770*4882a593Smuzhiyun   return yytname[yysymbol];
771*4882a593Smuzhiyun }
772*4882a593Smuzhiyun #endif
773*4882a593Smuzhiyun 
774*4882a593Smuzhiyun #ifdef YYPRINT
775*4882a593Smuzhiyun /* YYTOKNUM[NUM] -- (External) token number corresponding to the
776*4882a593Smuzhiyun    (internal) symbol number NUM (which must be that of a token).  */
777*4882a593Smuzhiyun static const yytype_int16 yytoknum[] =
778*4882a593Smuzhiyun {
779*4882a593Smuzhiyun        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
780*4882a593Smuzhiyun      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
781*4882a593Smuzhiyun      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
782*4882a593Smuzhiyun      285,   286
783*4882a593Smuzhiyun };
784*4882a593Smuzhiyun #endif
785*4882a593Smuzhiyun 
786*4882a593Smuzhiyun #define YYPACT_NINF (-47)
787*4882a593Smuzhiyun 
788*4882a593Smuzhiyun #define yypact_value_is_default(Yyn) \
789*4882a593Smuzhiyun   ((Yyn) == YYPACT_NINF)
790*4882a593Smuzhiyun 
791*4882a593Smuzhiyun #define YYTABLE_NINF (-1)
792*4882a593Smuzhiyun 
793*4882a593Smuzhiyun #define yytable_value_is_error(Yyn) \
794*4882a593Smuzhiyun   0
795*4882a593Smuzhiyun 
796*4882a593Smuzhiyun   /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
797*4882a593Smuzhiyun      STATE-NUM.  */
798*4882a593Smuzhiyun static const yytype_int8 yypact[] =
799*4882a593Smuzhiyun {
800*4882a593Smuzhiyun      -47,     7,   -47,   -47,    -1,     0,     1,    18,    29,    15,
801*4882a593Smuzhiyun       42,    17,    19,    20,    46,    50,   -47,   -47,   -47,   -47,
802*4882a593Smuzhiyun      -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,
803*4882a593Smuzhiyun       49,    53,    54,   -47,   -47,     6,    55,    56,    57,    58,
804*4882a593Smuzhiyun      -47,   -47,   -47,   -47,   -47,    61,    61,   -47,   -47,    62,
805*4882a593Smuzhiyun      -47,   -47,   -47,   -47,    61,    61,    35,    38,   -47,    61,
806*4882a593Smuzhiyun      -19,   -47,    39,    35,    66,    27,    38,    67,    43,    72,
807*4882a593Smuzhiyun       -3,   -19,    70,    74,   -47,   -47,   -47,   -47,   -47,   -47,
808*4882a593Smuzhiyun      -47,   -47,   -47,     3,    -8,    75,   -47,   -47,    48,    43,
809*4882a593Smuzhiyun       76,    61,    52,    59,    77,    78,   -47,   -47,    61,   -47,
810*4882a593Smuzhiyun      -47,    61,     6,   -47,   -47,   -47,    81,    82,    61,    61,
811*4882a593Smuzhiyun      -47,   -47,    83,    61,    61,   -47,   -47,    61,   -47,   -47,
812*4882a593Smuzhiyun      -47
813*4882a593Smuzhiyun };
814*4882a593Smuzhiyun 
815*4882a593Smuzhiyun   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
816*4882a593Smuzhiyun      Performed when YYTABLE does not specify something else to do.  Zero
817*4882a593Smuzhiyun      means the default is an error.  */
818*4882a593Smuzhiyun static const yytype_int8 yydefact[] =
819*4882a593Smuzhiyun {
820*4882a593Smuzhiyun        2,     0,     1,     4,     0,     0,     0,     0,     0,     0,
821*4882a593Smuzhiyun        0,     0,     0,     0,     0,     0,     3,     5,    17,    14,
822*4882a593Smuzhiyun       15,     8,     9,    10,    11,    12,    13,    18,    19,    16,
823*4882a593Smuzhiyun        0,     0,     0,    37,    53,    55,     0,     0,     0,     0,
824*4882a593Smuzhiyun       63,    64,    32,    24,    23,     6,     6,    56,    57,     0,
825*4882a593Smuzhiyun       61,    21,    65,    20,     6,     6,     0,     0,    22,     6,
826*4882a593Smuzhiyun        0,     7,     0,    35,     0,     0,    51,     0,     0,     0,
827*4882a593Smuzhiyun        0,    30,     0,     0,    36,    38,    39,    40,    41,    42,
828*4882a593Smuzhiyun       43,    44,    45,    46,    47,     0,    52,    54,     0,    59,
829*4882a593Smuzhiyun        0,     6,     0,     0,     0,     0,    31,    33,     6,    48,
830*4882a593Smuzhiyun       49,     6,    55,    60,    62,    25,     0,     0,     6,     6,
831*4882a593Smuzhiyun       34,    50,     0,     6,     6,    26,    29,     6,    28,    27,
832*4882a593Smuzhiyun       58
833*4882a593Smuzhiyun };
834*4882a593Smuzhiyun 
835*4882a593Smuzhiyun   /* YYPGOTO[NTERM-NUM].  */
836*4882a593Smuzhiyun static const yytype_int8 yypgoto[] =
837*4882a593Smuzhiyun {
838*4882a593Smuzhiyun      -47,   -47,   -47,   -46,   -47,   -47,   -47,   -47,   -47,   -47,
839*4882a593Smuzhiyun      -47,    16,   -47,   -47,   -47,    25,   -47,   -47,     5,     8,
840*4882a593Smuzhiyun      -47,   -47,    26,   -47,   -47,    -9,   -47,     9,   -47,   -47,
841*4882a593Smuzhiyun      -47,   -47,   -47
842*4882a593Smuzhiyun };
843*4882a593Smuzhiyun 
844*4882a593Smuzhiyun   /* YYDEFGOTO[NTERM-NUM].  */
845*4882a593Smuzhiyun static const yytype_int8 yydefgoto[] =
846*4882a593Smuzhiyun {
847*4882a593Smuzhiyun       -1,     1,    16,    56,    17,    18,    19,    20,    21,    22,
848*4882a593Smuzhiyun       71,    72,    23,    54,    63,    64,    24,    45,    83,    84,
849*4882a593Smuzhiyun       85,    66,    67,    25,    46,    49,    89,    90,    26,    59,
850*4882a593Smuzhiyun       27,    28,    29
851*4882a593Smuzhiyun };
852*4882a593Smuzhiyun 
853*4882a593Smuzhiyun   /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
854*4882a593Smuzhiyun      positive, shift that token.  If negative, reduce the rule whose
855*4882a593Smuzhiyun      number is the opposite.  If YYTABLE_NINF, syntax error.  */
856*4882a593Smuzhiyun static const yytype_int8 yytable[] =
857*4882a593Smuzhiyun {
858*4882a593Smuzhiyun       57,    92,    69,    76,    77,    78,    79,     2,    60,    61,
859*4882a593Smuzhiyun        3,     4,    70,    68,     5,     6,     7,     8,    80,    81,
860*4882a593Smuzhiyun       82,    93,    94,    33,    95,     9,    10,    11,    47,    48,
861*4882a593Smuzhiyun       30,    31,    32,    12,    34,    13,    14,    15,    76,    77,
862*4882a593Smuzhiyun       78,    79,    80,    81,    82,   105,    35,    36,    37,    40,
863*4882a593Smuzhiyun       38,    39,   110,    41,    42,   111,    43,    44,    50,    51,
864*4882a593Smuzhiyun       52,    53,   115,   116,    55,    58,    62,   118,   119,    65,
865*4882a593Smuzhiyun       73,   120,    75,    87,    88,    91,    97,    98,   101,   102,
866*4882a593Smuzhiyun      108,   109,   104,   106,   113,   114,   117,    96,    74,   100,
867*4882a593Smuzhiyun      107,    99,    86,   112,     0,     0,     0,     0,   103
868*4882a593Smuzhiyun };
869*4882a593Smuzhiyun 
870*4882a593Smuzhiyun static const yytype_int8 yycheck[] =
871*4882a593Smuzhiyun {
872*4882a593Smuzhiyun       46,     4,    21,    11,    12,    13,    14,     0,    54,    55,
873*4882a593Smuzhiyun        3,     4,    31,    59,     7,     8,     9,    10,    15,    16,
874*4882a593Smuzhiyun       17,    24,    25,     5,    27,    18,    19,    20,    22,    23,
875*4882a593Smuzhiyun       31,    31,    31,    26,     5,    28,    29,    30,    11,    12,
876*4882a593Smuzhiyun       13,    14,    15,    16,    17,    91,    31,     5,    31,     3,
877*4882a593Smuzhiyun       31,    31,    98,     3,     5,   101,     3,     3,     3,     3,
878*4882a593Smuzhiyun        3,     3,   108,   109,     3,     3,    31,   113,   114,    31,
879*4882a593Smuzhiyun       31,   117,     6,     6,    31,     3,     6,     3,     3,    31,
880*4882a593Smuzhiyun        3,     3,     6,    31,     3,     3,     3,    71,    63,    84,
881*4882a593Smuzhiyun       31,    83,    66,   102,    -1,    -1,    -1,    -1,    89
882*4882a593Smuzhiyun };
883*4882a593Smuzhiyun 
884*4882a593Smuzhiyun   /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
885*4882a593Smuzhiyun      symbol of state STATE-NUM.  */
886*4882a593Smuzhiyun static const yytype_int8 yystos[] =
887*4882a593Smuzhiyun {
888*4882a593Smuzhiyun        0,    33,     0,     3,     4,     7,     8,     9,    10,    18,
889*4882a593Smuzhiyun       19,    20,    26,    28,    29,    30,    34,    36,    37,    38,
890*4882a593Smuzhiyun       39,    40,    41,    44,    48,    55,    60,    62,    63,    64,
891*4882a593Smuzhiyun       31,    31,    31,     5,     5,    31,     5,    31,    31,    31,
892*4882a593Smuzhiyun        3,     3,     5,     3,     3,    49,    56,    22,    23,    57,
893*4882a593Smuzhiyun        3,     3,     3,     3,    45,     3,    35,    35,     3,    61,
894*4882a593Smuzhiyun       35,    35,    31,    46,    47,    31,    53,    54,    35,    21,
895*4882a593Smuzhiyun       31,    42,    43,    31,    47,     6,    11,    12,    13,    14,
896*4882a593Smuzhiyun       15,    16,    17,    50,    51,    52,    54,     6,    31,    58,
897*4882a593Smuzhiyun       59,     3,     4,    24,    25,    27,    43,     6,     3,    51,
898*4882a593Smuzhiyun       50,     3,    31,    59,     6,    35,    31,    31,     3,     3,
899*4882a593Smuzhiyun       35,    35,    57,     3,     3,    35,    35,     3,    35,    35,
900*4882a593Smuzhiyun       35
901*4882a593Smuzhiyun };
902*4882a593Smuzhiyun 
903*4882a593Smuzhiyun   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
904*4882a593Smuzhiyun static const yytype_int8 yyr1[] =
905*4882a593Smuzhiyun {
906*4882a593Smuzhiyun        0,    32,    33,    33,    34,    34,    35,    35,    36,    36,
907*4882a593Smuzhiyun       36,    36,    36,    36,    36,    36,    36,    36,    36,    36,
908*4882a593Smuzhiyun       37,    38,    39,    40,    41,    42,    42,    42,    42,    42,
909*4882a593Smuzhiyun       43,    43,    45,    44,    46,    47,    47,    49,    48,    50,
910*4882a593Smuzhiyun       50,    50,    50,    51,    51,    51,    52,    52,    52,    52,
911*4882a593Smuzhiyun       53,    54,    54,    56,    55,    57,    57,    57,    58,    59,
912*4882a593Smuzhiyun       59,    61,    60,    62,    63,    64
913*4882a593Smuzhiyun };
914*4882a593Smuzhiyun 
915*4882a593Smuzhiyun   /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
916*4882a593Smuzhiyun static const yytype_int8 yyr2[] =
917*4882a593Smuzhiyun {
918*4882a593Smuzhiyun        0,     2,     0,     2,     1,     1,     0,     2,     1,     1,
919*4882a593Smuzhiyun        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
920*4882a593Smuzhiyun        3,     3,     4,     3,     3,     3,     4,     5,     5,     4,
921*4882a593Smuzhiyun        1,     2,     0,     7,     4,     1,     2,     0,     6,     1,
922*4882a593Smuzhiyun        1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
923*4882a593Smuzhiyun        4,     1,     2,     0,     6,     0,     1,     1,     5,     1,
924*4882a593Smuzhiyun        2,     0,     7,     2,     2,     3
925*4882a593Smuzhiyun };
926*4882a593Smuzhiyun 
927*4882a593Smuzhiyun 
928*4882a593Smuzhiyun enum { YYENOMEM = -2 };
929*4882a593Smuzhiyun 
930*4882a593Smuzhiyun #define yyerrok         (yyerrstatus = 0)
931*4882a593Smuzhiyun #define yyclearin       (yychar = YYEMPTY)
932*4882a593Smuzhiyun 
933*4882a593Smuzhiyun #define YYACCEPT        goto yyacceptlab
934*4882a593Smuzhiyun #define YYABORT         goto yyabortlab
935*4882a593Smuzhiyun #define YYERROR         goto yyerrorlab
936*4882a593Smuzhiyun 
937*4882a593Smuzhiyun 
938*4882a593Smuzhiyun #define YYRECOVERING()  (!!yyerrstatus)
939*4882a593Smuzhiyun 
940*4882a593Smuzhiyun #define YYBACKUP(Token, Value)                                    \
941*4882a593Smuzhiyun   do                                                              \
942*4882a593Smuzhiyun     if (yychar == YYEMPTY)                                        \
943*4882a593Smuzhiyun       {                                                           \
944*4882a593Smuzhiyun         yychar = (Token);                                         \
945*4882a593Smuzhiyun         yylval = (Value);                                         \
946*4882a593Smuzhiyun         YYPOPSTACK (yylen);                                       \
947*4882a593Smuzhiyun         yystate = *yyssp;                                         \
948*4882a593Smuzhiyun         goto yybackup;                                            \
949*4882a593Smuzhiyun       }                                                           \
950*4882a593Smuzhiyun     else                                                          \
951*4882a593Smuzhiyun       {                                                           \
952*4882a593Smuzhiyun         yyerror (YY_("syntax error: cannot back up")); \
953*4882a593Smuzhiyun         YYERROR;                                                  \
954*4882a593Smuzhiyun       }                                                           \
955*4882a593Smuzhiyun   while (0)
956*4882a593Smuzhiyun 
957*4882a593Smuzhiyun /* Backward compatibility with an undocumented macro.
958*4882a593Smuzhiyun    Use YYerror or YYUNDEF. */
959*4882a593Smuzhiyun #define YYERRCODE YYUNDEF
960*4882a593Smuzhiyun 
961*4882a593Smuzhiyun 
962*4882a593Smuzhiyun /* Enable debugging if requested.  */
963*4882a593Smuzhiyun #if YYDEBUG
964*4882a593Smuzhiyun 
965*4882a593Smuzhiyun # ifndef YYFPRINTF
966*4882a593Smuzhiyun #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
967*4882a593Smuzhiyun #  define YYFPRINTF fprintf
968*4882a593Smuzhiyun # endif
969*4882a593Smuzhiyun 
970*4882a593Smuzhiyun # define YYDPRINTF(Args)                        \
971*4882a593Smuzhiyun do {                                            \
972*4882a593Smuzhiyun   if (yydebug)                                  \
973*4882a593Smuzhiyun     YYFPRINTF Args;                             \
974*4882a593Smuzhiyun } while (0)
975*4882a593Smuzhiyun 
976*4882a593Smuzhiyun /* This macro is provided for backward compatibility. */
977*4882a593Smuzhiyun # ifndef YY_LOCATION_PRINT
978*4882a593Smuzhiyun #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
979*4882a593Smuzhiyun # endif
980*4882a593Smuzhiyun 
981*4882a593Smuzhiyun 
982*4882a593Smuzhiyun # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
983*4882a593Smuzhiyun do {                                                                      \
984*4882a593Smuzhiyun   if (yydebug)                                                            \
985*4882a593Smuzhiyun     {                                                                     \
986*4882a593Smuzhiyun       YYFPRINTF (stderr, "%s ", Title);                                   \
987*4882a593Smuzhiyun       yy_symbol_print (stderr,                                            \
988*4882a593Smuzhiyun                   Kind, Value); \
989*4882a593Smuzhiyun       YYFPRINTF (stderr, "\n");                                           \
990*4882a593Smuzhiyun     }                                                                     \
991*4882a593Smuzhiyun } while (0)
992*4882a593Smuzhiyun 
993*4882a593Smuzhiyun 
994*4882a593Smuzhiyun /*-----------------------------------.
995*4882a593Smuzhiyun | Print this symbol's value on YYO.  |
996*4882a593Smuzhiyun `-----------------------------------*/
997*4882a593Smuzhiyun 
998*4882a593Smuzhiyun static void
yy_symbol_value_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)999*4882a593Smuzhiyun yy_symbol_value_print (FILE *yyo,
1000*4882a593Smuzhiyun                        yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1001*4882a593Smuzhiyun {
1002*4882a593Smuzhiyun   FILE *yyoutput = yyo;
1003*4882a593Smuzhiyun   YYUSE (yyoutput);
1004*4882a593Smuzhiyun   if (!yyvaluep)
1005*4882a593Smuzhiyun     return;
1006*4882a593Smuzhiyun # ifdef YYPRINT
1007*4882a593Smuzhiyun   if (yykind < YYNTOKENS)
1008*4882a593Smuzhiyun     YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
1009*4882a593Smuzhiyun # endif
1010*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1011*4882a593Smuzhiyun   YYUSE (yykind);
1012*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_END
1013*4882a593Smuzhiyun }
1014*4882a593Smuzhiyun 
1015*4882a593Smuzhiyun 
1016*4882a593Smuzhiyun /*---------------------------.
1017*4882a593Smuzhiyun | Print this symbol on YYO.  |
1018*4882a593Smuzhiyun `---------------------------*/
1019*4882a593Smuzhiyun 
1020*4882a593Smuzhiyun static void
yy_symbol_print(FILE * yyo,yysymbol_kind_t yykind,YYSTYPE const * const yyvaluep)1021*4882a593Smuzhiyun yy_symbol_print (FILE *yyo,
1022*4882a593Smuzhiyun                  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1023*4882a593Smuzhiyun {
1024*4882a593Smuzhiyun   YYFPRINTF (yyo, "%s %s (",
1025*4882a593Smuzhiyun              yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1026*4882a593Smuzhiyun 
1027*4882a593Smuzhiyun   yy_symbol_value_print (yyo, yykind, yyvaluep);
1028*4882a593Smuzhiyun   YYFPRINTF (yyo, ")");
1029*4882a593Smuzhiyun }
1030*4882a593Smuzhiyun 
1031*4882a593Smuzhiyun /*------------------------------------------------------------------.
1032*4882a593Smuzhiyun | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1033*4882a593Smuzhiyun | TOP (included).                                                   |
1034*4882a593Smuzhiyun `------------------------------------------------------------------*/
1035*4882a593Smuzhiyun 
1036*4882a593Smuzhiyun static void
yy_stack_print(yy_state_t * yybottom,yy_state_t * yytop)1037*4882a593Smuzhiyun yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1038*4882a593Smuzhiyun {
1039*4882a593Smuzhiyun   YYFPRINTF (stderr, "Stack now");
1040*4882a593Smuzhiyun   for (; yybottom <= yytop; yybottom++)
1041*4882a593Smuzhiyun     {
1042*4882a593Smuzhiyun       int yybot = *yybottom;
1043*4882a593Smuzhiyun       YYFPRINTF (stderr, " %d", yybot);
1044*4882a593Smuzhiyun     }
1045*4882a593Smuzhiyun   YYFPRINTF (stderr, "\n");
1046*4882a593Smuzhiyun }
1047*4882a593Smuzhiyun 
1048*4882a593Smuzhiyun # define YY_STACK_PRINT(Bottom, Top)                            \
1049*4882a593Smuzhiyun do {                                                            \
1050*4882a593Smuzhiyun   if (yydebug)                                                  \
1051*4882a593Smuzhiyun     yy_stack_print ((Bottom), (Top));                           \
1052*4882a593Smuzhiyun } while (0)
1053*4882a593Smuzhiyun 
1054*4882a593Smuzhiyun 
1055*4882a593Smuzhiyun /*------------------------------------------------.
1056*4882a593Smuzhiyun | Report that the YYRULE is going to be reduced.  |
1057*4882a593Smuzhiyun `------------------------------------------------*/
1058*4882a593Smuzhiyun 
1059*4882a593Smuzhiyun static void
yy_reduce_print(yy_state_t * yyssp,YYSTYPE * yyvsp,int yyrule)1060*4882a593Smuzhiyun yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1061*4882a593Smuzhiyun                  int yyrule)
1062*4882a593Smuzhiyun {
1063*4882a593Smuzhiyun   int yylno = yyrline[yyrule];
1064*4882a593Smuzhiyun   int yynrhs = yyr2[yyrule];
1065*4882a593Smuzhiyun   int yyi;
1066*4882a593Smuzhiyun   YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1067*4882a593Smuzhiyun              yyrule - 1, yylno);
1068*4882a593Smuzhiyun   /* The symbols being reduced.  */
1069*4882a593Smuzhiyun   for (yyi = 0; yyi < yynrhs; yyi++)
1070*4882a593Smuzhiyun     {
1071*4882a593Smuzhiyun       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1072*4882a593Smuzhiyun       yy_symbol_print (stderr,
1073*4882a593Smuzhiyun                        YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1074*4882a593Smuzhiyun                        &yyvsp[(yyi + 1) - (yynrhs)]);
1075*4882a593Smuzhiyun       YYFPRINTF (stderr, "\n");
1076*4882a593Smuzhiyun     }
1077*4882a593Smuzhiyun }
1078*4882a593Smuzhiyun 
1079*4882a593Smuzhiyun # define YY_REDUCE_PRINT(Rule)          \
1080*4882a593Smuzhiyun do {                                    \
1081*4882a593Smuzhiyun   if (yydebug)                          \
1082*4882a593Smuzhiyun     yy_reduce_print (yyssp, yyvsp, Rule); \
1083*4882a593Smuzhiyun } while (0)
1084*4882a593Smuzhiyun 
1085*4882a593Smuzhiyun /* Nonzero means print parse trace.  It is left uninitialized so that
1086*4882a593Smuzhiyun    multiple parsers can coexist.  */
1087*4882a593Smuzhiyun int yydebug;
1088*4882a593Smuzhiyun #else /* !YYDEBUG */
1089*4882a593Smuzhiyun # define YYDPRINTF(Args) ((void) 0)
1090*4882a593Smuzhiyun # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1091*4882a593Smuzhiyun # define YY_STACK_PRINT(Bottom, Top)
1092*4882a593Smuzhiyun # define YY_REDUCE_PRINT(Rule)
1093*4882a593Smuzhiyun #endif /* !YYDEBUG */
1094*4882a593Smuzhiyun 
1095*4882a593Smuzhiyun 
1096*4882a593Smuzhiyun /* YYINITDEPTH -- initial size of the parser's stacks.  */
1097*4882a593Smuzhiyun #ifndef YYINITDEPTH
1098*4882a593Smuzhiyun # define YYINITDEPTH 200
1099*4882a593Smuzhiyun #endif
1100*4882a593Smuzhiyun 
1101*4882a593Smuzhiyun /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1102*4882a593Smuzhiyun    if the built-in stack extension method is used).
1103*4882a593Smuzhiyun 
1104*4882a593Smuzhiyun    Do not make this value too large; the results are undefined if
1105*4882a593Smuzhiyun    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1106*4882a593Smuzhiyun    evaluated with infinite-precision integer arithmetic.  */
1107*4882a593Smuzhiyun 
1108*4882a593Smuzhiyun #ifndef YYMAXDEPTH
1109*4882a593Smuzhiyun # define YYMAXDEPTH 10000
1110*4882a593Smuzhiyun #endif
1111*4882a593Smuzhiyun 
1112*4882a593Smuzhiyun 
1113*4882a593Smuzhiyun 
1114*4882a593Smuzhiyun 
1115*4882a593Smuzhiyun 
1116*4882a593Smuzhiyun 
1117*4882a593Smuzhiyun /*-----------------------------------------------.
1118*4882a593Smuzhiyun | Release the memory associated to this symbol.  |
1119*4882a593Smuzhiyun `-----------------------------------------------*/
1120*4882a593Smuzhiyun 
1121*4882a593Smuzhiyun static void
yydestruct(const char * yymsg,yysymbol_kind_t yykind,YYSTYPE * yyvaluep)1122*4882a593Smuzhiyun yydestruct (const char *yymsg,
1123*4882a593Smuzhiyun             yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
1124*4882a593Smuzhiyun {
1125*4882a593Smuzhiyun   YYUSE (yyvaluep);
1126*4882a593Smuzhiyun   if (!yymsg)
1127*4882a593Smuzhiyun     yymsg = "Deleting";
1128*4882a593Smuzhiyun   YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1129*4882a593Smuzhiyun 
1130*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1131*4882a593Smuzhiyun   YYUSE (yykind);
1132*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_END
1133*4882a593Smuzhiyun }
1134*4882a593Smuzhiyun 
1135*4882a593Smuzhiyun 
1136*4882a593Smuzhiyun /* Lookahead token kind.  */
1137*4882a593Smuzhiyun int yychar;
1138*4882a593Smuzhiyun 
1139*4882a593Smuzhiyun /* The semantic value of the lookahead symbol.  */
1140*4882a593Smuzhiyun YYSTYPE yylval;
1141*4882a593Smuzhiyun /* Number of syntax errors so far.  */
1142*4882a593Smuzhiyun int yynerrs;
1143*4882a593Smuzhiyun 
1144*4882a593Smuzhiyun 
1145*4882a593Smuzhiyun 
1146*4882a593Smuzhiyun 
1147*4882a593Smuzhiyun /*----------.
1148*4882a593Smuzhiyun | yyparse.  |
1149*4882a593Smuzhiyun `----------*/
1150*4882a593Smuzhiyun 
1151*4882a593Smuzhiyun int
yyparse(void)1152*4882a593Smuzhiyun yyparse (void)
1153*4882a593Smuzhiyun {
1154*4882a593Smuzhiyun     yy_state_fast_t yystate = 0;
1155*4882a593Smuzhiyun     /* Number of tokens to shift before error messages enabled.  */
1156*4882a593Smuzhiyun     int yyerrstatus = 0;
1157*4882a593Smuzhiyun 
1158*4882a593Smuzhiyun     /* Refer to the stacks through separate pointers, to allow yyoverflow
1159*4882a593Smuzhiyun        to reallocate them elsewhere.  */
1160*4882a593Smuzhiyun 
1161*4882a593Smuzhiyun     /* Their size.  */
1162*4882a593Smuzhiyun     YYPTRDIFF_T yystacksize = YYINITDEPTH;
1163*4882a593Smuzhiyun 
1164*4882a593Smuzhiyun     /* The state stack: array, bottom, top.  */
1165*4882a593Smuzhiyun     yy_state_t yyssa[YYINITDEPTH];
1166*4882a593Smuzhiyun     yy_state_t *yyss = yyssa;
1167*4882a593Smuzhiyun     yy_state_t *yyssp = yyss;
1168*4882a593Smuzhiyun 
1169*4882a593Smuzhiyun     /* The semantic value stack: array, bottom, top.  */
1170*4882a593Smuzhiyun     YYSTYPE yyvsa[YYINITDEPTH];
1171*4882a593Smuzhiyun     YYSTYPE *yyvs = yyvsa;
1172*4882a593Smuzhiyun     YYSTYPE *yyvsp = yyvs;
1173*4882a593Smuzhiyun 
1174*4882a593Smuzhiyun   int yyn;
1175*4882a593Smuzhiyun   /* The return value of yyparse.  */
1176*4882a593Smuzhiyun   int yyresult;
1177*4882a593Smuzhiyun   /* Lookahead symbol kind.  */
1178*4882a593Smuzhiyun   yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
1179*4882a593Smuzhiyun   /* The variables used to return semantic value and location from the
1180*4882a593Smuzhiyun      action routines.  */
1181*4882a593Smuzhiyun   YYSTYPE yyval;
1182*4882a593Smuzhiyun 
1183*4882a593Smuzhiyun 
1184*4882a593Smuzhiyun 
1185*4882a593Smuzhiyun #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1186*4882a593Smuzhiyun 
1187*4882a593Smuzhiyun   /* The number of symbols on the RHS of the reduced rule.
1188*4882a593Smuzhiyun      Keep to zero when no symbol should be popped.  */
1189*4882a593Smuzhiyun   int yylen = 0;
1190*4882a593Smuzhiyun 
1191*4882a593Smuzhiyun   YYDPRINTF ((stderr, "Starting parse\n"));
1192*4882a593Smuzhiyun 
1193*4882a593Smuzhiyun   yychar = YYEMPTY; /* Cause a token to be read.  */
1194*4882a593Smuzhiyun   goto yysetstate;
1195*4882a593Smuzhiyun 
1196*4882a593Smuzhiyun 
1197*4882a593Smuzhiyun /*------------------------------------------------------------.
1198*4882a593Smuzhiyun | yynewstate -- push a new state, which is found in yystate.  |
1199*4882a593Smuzhiyun `------------------------------------------------------------*/
1200*4882a593Smuzhiyun yynewstate:
1201*4882a593Smuzhiyun   /* In all cases, when you get here, the value and location stacks
1202*4882a593Smuzhiyun      have just been pushed.  So pushing a state here evens the stacks.  */
1203*4882a593Smuzhiyun   yyssp++;
1204*4882a593Smuzhiyun 
1205*4882a593Smuzhiyun 
1206*4882a593Smuzhiyun /*--------------------------------------------------------------------.
1207*4882a593Smuzhiyun | yysetstate -- set current state (the top of the stack) to yystate.  |
1208*4882a593Smuzhiyun `--------------------------------------------------------------------*/
1209*4882a593Smuzhiyun yysetstate:
1210*4882a593Smuzhiyun   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1211*4882a593Smuzhiyun   YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1212*4882a593Smuzhiyun   YY_IGNORE_USELESS_CAST_BEGIN
1213*4882a593Smuzhiyun   *yyssp = YY_CAST (yy_state_t, yystate);
1214*4882a593Smuzhiyun   YY_IGNORE_USELESS_CAST_END
1215*4882a593Smuzhiyun   YY_STACK_PRINT (yyss, yyssp);
1216*4882a593Smuzhiyun 
1217*4882a593Smuzhiyun   if (yyss + yystacksize - 1 <= yyssp)
1218*4882a593Smuzhiyun #if !defined yyoverflow && !defined YYSTACK_RELOCATE
1219*4882a593Smuzhiyun     goto yyexhaustedlab;
1220*4882a593Smuzhiyun #else
1221*4882a593Smuzhiyun     {
1222*4882a593Smuzhiyun       /* Get the current used size of the three stacks, in elements.  */
1223*4882a593Smuzhiyun       YYPTRDIFF_T yysize = yyssp - yyss + 1;
1224*4882a593Smuzhiyun 
1225*4882a593Smuzhiyun # if defined yyoverflow
1226*4882a593Smuzhiyun       {
1227*4882a593Smuzhiyun         /* Give user a chance to reallocate the stack.  Use copies of
1228*4882a593Smuzhiyun            these so that the &'s don't force the real ones into
1229*4882a593Smuzhiyun            memory.  */
1230*4882a593Smuzhiyun         yy_state_t *yyss1 = yyss;
1231*4882a593Smuzhiyun         YYSTYPE *yyvs1 = yyvs;
1232*4882a593Smuzhiyun 
1233*4882a593Smuzhiyun         /* Each stack pointer address is followed by the size of the
1234*4882a593Smuzhiyun            data in use in that stack, in bytes.  This used to be a
1235*4882a593Smuzhiyun            conditional around just the two extra args, but that might
1236*4882a593Smuzhiyun            be undefined if yyoverflow is a macro.  */
1237*4882a593Smuzhiyun         yyoverflow (YY_("memory exhausted"),
1238*4882a593Smuzhiyun                     &yyss1, yysize * YYSIZEOF (*yyssp),
1239*4882a593Smuzhiyun                     &yyvs1, yysize * YYSIZEOF (*yyvsp),
1240*4882a593Smuzhiyun                     &yystacksize);
1241*4882a593Smuzhiyun         yyss = yyss1;
1242*4882a593Smuzhiyun         yyvs = yyvs1;
1243*4882a593Smuzhiyun       }
1244*4882a593Smuzhiyun # else /* defined YYSTACK_RELOCATE */
1245*4882a593Smuzhiyun       /* Extend the stack our own way.  */
1246*4882a593Smuzhiyun       if (YYMAXDEPTH <= yystacksize)
1247*4882a593Smuzhiyun         goto yyexhaustedlab;
1248*4882a593Smuzhiyun       yystacksize *= 2;
1249*4882a593Smuzhiyun       if (YYMAXDEPTH < yystacksize)
1250*4882a593Smuzhiyun         yystacksize = YYMAXDEPTH;
1251*4882a593Smuzhiyun 
1252*4882a593Smuzhiyun       {
1253*4882a593Smuzhiyun         yy_state_t *yyss1 = yyss;
1254*4882a593Smuzhiyun         union yyalloc *yyptr =
1255*4882a593Smuzhiyun           YY_CAST (union yyalloc *,
1256*4882a593Smuzhiyun                    YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1257*4882a593Smuzhiyun         if (! yyptr)
1258*4882a593Smuzhiyun           goto yyexhaustedlab;
1259*4882a593Smuzhiyun         YYSTACK_RELOCATE (yyss_alloc, yyss);
1260*4882a593Smuzhiyun         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1261*4882a593Smuzhiyun #  undef YYSTACK_RELOCATE
1262*4882a593Smuzhiyun         if (yyss1 != yyssa)
1263*4882a593Smuzhiyun           YYSTACK_FREE (yyss1);
1264*4882a593Smuzhiyun       }
1265*4882a593Smuzhiyun # endif
1266*4882a593Smuzhiyun 
1267*4882a593Smuzhiyun       yyssp = yyss + yysize - 1;
1268*4882a593Smuzhiyun       yyvsp = yyvs + yysize - 1;
1269*4882a593Smuzhiyun 
1270*4882a593Smuzhiyun       YY_IGNORE_USELESS_CAST_BEGIN
1271*4882a593Smuzhiyun       YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1272*4882a593Smuzhiyun                   YY_CAST (long, yystacksize)));
1273*4882a593Smuzhiyun       YY_IGNORE_USELESS_CAST_END
1274*4882a593Smuzhiyun 
1275*4882a593Smuzhiyun       if (yyss + yystacksize - 1 <= yyssp)
1276*4882a593Smuzhiyun         YYABORT;
1277*4882a593Smuzhiyun     }
1278*4882a593Smuzhiyun #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1279*4882a593Smuzhiyun 
1280*4882a593Smuzhiyun   if (yystate == YYFINAL)
1281*4882a593Smuzhiyun     YYACCEPT;
1282*4882a593Smuzhiyun 
1283*4882a593Smuzhiyun   goto yybackup;
1284*4882a593Smuzhiyun 
1285*4882a593Smuzhiyun 
1286*4882a593Smuzhiyun /*-----------.
1287*4882a593Smuzhiyun | yybackup.  |
1288*4882a593Smuzhiyun `-----------*/
1289*4882a593Smuzhiyun yybackup:
1290*4882a593Smuzhiyun   /* Do appropriate processing given the current state.  Read a
1291*4882a593Smuzhiyun      lookahead token if we need one and don't already have one.  */
1292*4882a593Smuzhiyun 
1293*4882a593Smuzhiyun   /* First try to decide what to do without reference to lookahead token.  */
1294*4882a593Smuzhiyun   yyn = yypact[yystate];
1295*4882a593Smuzhiyun   if (yypact_value_is_default (yyn))
1296*4882a593Smuzhiyun     goto yydefault;
1297*4882a593Smuzhiyun 
1298*4882a593Smuzhiyun   /* Not known => get a lookahead token if don't already have one.  */
1299*4882a593Smuzhiyun 
1300*4882a593Smuzhiyun   /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
1301*4882a593Smuzhiyun   if (yychar == YYEMPTY)
1302*4882a593Smuzhiyun     {
1303*4882a593Smuzhiyun       YYDPRINTF ((stderr, "Reading a token\n"));
1304*4882a593Smuzhiyun       yychar = yylex ();
1305*4882a593Smuzhiyun     }
1306*4882a593Smuzhiyun 
1307*4882a593Smuzhiyun   if (yychar <= YYEOF)
1308*4882a593Smuzhiyun     {
1309*4882a593Smuzhiyun       yychar = YYEOF;
1310*4882a593Smuzhiyun       yytoken = YYSYMBOL_YYEOF;
1311*4882a593Smuzhiyun       YYDPRINTF ((stderr, "Now at end of input.\n"));
1312*4882a593Smuzhiyun     }
1313*4882a593Smuzhiyun   else if (yychar == YYerror)
1314*4882a593Smuzhiyun     {
1315*4882a593Smuzhiyun       /* The scanner already issued an error message, process directly
1316*4882a593Smuzhiyun          to error recovery.  But do not keep the error token as
1317*4882a593Smuzhiyun          lookahead, it is too special and may lead us to an endless
1318*4882a593Smuzhiyun          loop in error recovery. */
1319*4882a593Smuzhiyun       yychar = YYUNDEF;
1320*4882a593Smuzhiyun       yytoken = YYSYMBOL_YYerror;
1321*4882a593Smuzhiyun       goto yyerrlab1;
1322*4882a593Smuzhiyun     }
1323*4882a593Smuzhiyun   else
1324*4882a593Smuzhiyun     {
1325*4882a593Smuzhiyun       yytoken = YYTRANSLATE (yychar);
1326*4882a593Smuzhiyun       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1327*4882a593Smuzhiyun     }
1328*4882a593Smuzhiyun 
1329*4882a593Smuzhiyun   /* If the proper action on seeing token YYTOKEN is to reduce or to
1330*4882a593Smuzhiyun      detect an error, take that action.  */
1331*4882a593Smuzhiyun   yyn += yytoken;
1332*4882a593Smuzhiyun   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1333*4882a593Smuzhiyun     goto yydefault;
1334*4882a593Smuzhiyun   yyn = yytable[yyn];
1335*4882a593Smuzhiyun   if (yyn <= 0)
1336*4882a593Smuzhiyun     {
1337*4882a593Smuzhiyun       if (yytable_value_is_error (yyn))
1338*4882a593Smuzhiyun         goto yyerrlab;
1339*4882a593Smuzhiyun       yyn = -yyn;
1340*4882a593Smuzhiyun       goto yyreduce;
1341*4882a593Smuzhiyun     }
1342*4882a593Smuzhiyun 
1343*4882a593Smuzhiyun   /* Count tokens shifted since error; after three, turn off error
1344*4882a593Smuzhiyun      status.  */
1345*4882a593Smuzhiyun   if (yyerrstatus)
1346*4882a593Smuzhiyun     yyerrstatus--;
1347*4882a593Smuzhiyun 
1348*4882a593Smuzhiyun   /* Shift the lookahead token.  */
1349*4882a593Smuzhiyun   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1350*4882a593Smuzhiyun   yystate = yyn;
1351*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1352*4882a593Smuzhiyun   *++yyvsp = yylval;
1353*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_END
1354*4882a593Smuzhiyun 
1355*4882a593Smuzhiyun   /* Discard the shifted token.  */
1356*4882a593Smuzhiyun   yychar = YYEMPTY;
1357*4882a593Smuzhiyun   goto yynewstate;
1358*4882a593Smuzhiyun 
1359*4882a593Smuzhiyun 
1360*4882a593Smuzhiyun /*-----------------------------------------------------------.
1361*4882a593Smuzhiyun | yydefault -- do the default action for the current state.  |
1362*4882a593Smuzhiyun `-----------------------------------------------------------*/
1363*4882a593Smuzhiyun yydefault:
1364*4882a593Smuzhiyun   yyn = yydefact[yystate];
1365*4882a593Smuzhiyun   if (yyn == 0)
1366*4882a593Smuzhiyun     goto yyerrlab;
1367*4882a593Smuzhiyun   goto yyreduce;
1368*4882a593Smuzhiyun 
1369*4882a593Smuzhiyun 
1370*4882a593Smuzhiyun /*-----------------------------.
1371*4882a593Smuzhiyun | yyreduce -- do a reduction.  |
1372*4882a593Smuzhiyun `-----------------------------*/
1373*4882a593Smuzhiyun yyreduce:
1374*4882a593Smuzhiyun   /* yyn is the number of a rule to reduce with.  */
1375*4882a593Smuzhiyun   yylen = yyr2[yyn];
1376*4882a593Smuzhiyun 
1377*4882a593Smuzhiyun   /* If YYLEN is nonzero, implement the default value of the action:
1378*4882a593Smuzhiyun      '$$ = $1'.
1379*4882a593Smuzhiyun 
1380*4882a593Smuzhiyun      Otherwise, the following line sets YYVAL to garbage.
1381*4882a593Smuzhiyun      This behavior is undocumented and Bison
1382*4882a593Smuzhiyun      users should not rely upon it.  Assigning to YYVAL
1383*4882a593Smuzhiyun      unconditionally makes the parser a bit smaller, and it avoids a
1384*4882a593Smuzhiyun      GCC warning that YYVAL may be used uninitialized.  */
1385*4882a593Smuzhiyun   yyval = yyvsp[1-yylen];
1386*4882a593Smuzhiyun 
1387*4882a593Smuzhiyun 
1388*4882a593Smuzhiyun   YY_REDUCE_PRINT (yyn);
1389*4882a593Smuzhiyun   switch (yyn)
1390*4882a593Smuzhiyun     {
1391*4882a593Smuzhiyun   case 20: /* trayicon: TRAYICON STRING NEWLINE  */
1392*4882a593Smuzhiyun #line 160 "winprefsyacc.y"
1393*4882a593Smuzhiyun                                         { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1394*4882a593Smuzhiyun #line 1395 "winprefsyacc.c"
1395*4882a593Smuzhiyun     break;
1396*4882a593Smuzhiyun 
1397*4882a593Smuzhiyun   case 21: /* rootmenu: ROOTMENU STRING NEWLINE  */
1398*4882a593Smuzhiyun #line 163 "winprefsyacc.y"
1399*4882a593Smuzhiyun                                         { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1400*4882a593Smuzhiyun #line 1401 "winprefsyacc.c"
1401*4882a593Smuzhiyun     break;
1402*4882a593Smuzhiyun 
1403*4882a593Smuzhiyun   case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE  */
1404*4882a593Smuzhiyun #line 166 "winprefsyacc.y"
1405*4882a593Smuzhiyun                                                      { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); }
1406*4882a593Smuzhiyun #line 1407 "winprefsyacc.c"
1407*4882a593Smuzhiyun     break;
1408*4882a593Smuzhiyun 
1409*4882a593Smuzhiyun   case 23: /* defaulticon: DEFAULTICON STRING NEWLINE  */
1410*4882a593Smuzhiyun #line 169 "winprefsyacc.y"
1411*4882a593Smuzhiyun                                            { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1412*4882a593Smuzhiyun #line 1413 "winprefsyacc.c"
1413*4882a593Smuzhiyun     break;
1414*4882a593Smuzhiyun 
1415*4882a593Smuzhiyun   case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE  */
1416*4882a593Smuzhiyun #line 172 "winprefsyacc.y"
1417*4882a593Smuzhiyun                                              { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1418*4882a593Smuzhiyun #line 1419 "winprefsyacc.c"
1419*4882a593Smuzhiyun     break;
1420*4882a593Smuzhiyun 
1421*4882a593Smuzhiyun   case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada  */
1422*4882a593Smuzhiyun #line 175 "winprefsyacc.y"
1423*4882a593Smuzhiyun                                                    { AddMenuLine("-", CMD_SEPARATOR, ""); }
1424*4882a593Smuzhiyun #line 1425 "winprefsyacc.c"
1425*4882a593Smuzhiyun     break;
1426*4882a593Smuzhiyun 
1427*4882a593Smuzhiyun   case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada  */
1428*4882a593Smuzhiyun #line 176 "winprefsyacc.y"
1429*4882a593Smuzhiyun                                                       { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); }
1430*4882a593Smuzhiyun #line 1431 "winprefsyacc.c"
1431*4882a593Smuzhiyun     break;
1432*4882a593Smuzhiyun 
1433*4882a593Smuzhiyun   case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada  */
1434*4882a593Smuzhiyun #line 177 "winprefsyacc.y"
1435*4882a593Smuzhiyun                                                       { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
1436*4882a593Smuzhiyun #line 1437 "winprefsyacc.c"
1437*4882a593Smuzhiyun     break;
1438*4882a593Smuzhiyun 
1439*4882a593Smuzhiyun   case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada  */
1440*4882a593Smuzhiyun #line 178 "winprefsyacc.y"
1441*4882a593Smuzhiyun                                                       { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
1442*4882a593Smuzhiyun #line 1443 "winprefsyacc.c"
1443*4882a593Smuzhiyun     break;
1444*4882a593Smuzhiyun 
1445*4882a593Smuzhiyun   case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada  */
1446*4882a593Smuzhiyun #line 179 "winprefsyacc.y"
1447*4882a593Smuzhiyun                                                  { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); }
1448*4882a593Smuzhiyun #line 1449 "winprefsyacc.c"
1449*4882a593Smuzhiyun     break;
1450*4882a593Smuzhiyun 
1451*4882a593Smuzhiyun   case 32: /* $@1: %empty  */
1452*4882a593Smuzhiyun #line 186 "winprefsyacc.y"
1453*4882a593Smuzhiyun                        { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1454*4882a593Smuzhiyun #line 1455 "winprefsyacc.c"
1455*4882a593Smuzhiyun     break;
1456*4882a593Smuzhiyun 
1457*4882a593Smuzhiyun   case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB  */
1458*4882a593Smuzhiyun #line 186 "winprefsyacc.y"
1459*4882a593Smuzhiyun                                                                                {CloseMenu();}
1460*4882a593Smuzhiyun #line 1461 "winprefsyacc.c"
1461*4882a593Smuzhiyun     break;
1462*4882a593Smuzhiyun 
1463*4882a593Smuzhiyun   case 34: /* iconline: STRING STRING NEWLINE newline_or_nada  */
1464*4882a593Smuzhiyun #line 189 "winprefsyacc.y"
1465*4882a593Smuzhiyun                                                       { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); }
1466*4882a593Smuzhiyun #line 1467 "winprefsyacc.c"
1467*4882a593Smuzhiyun     break;
1468*4882a593Smuzhiyun 
1469*4882a593Smuzhiyun   case 37: /* $@2: %empty  */
1470*4882a593Smuzhiyun #line 196 "winprefsyacc.y"
1471*4882a593Smuzhiyun                  {OpenIcons();}
1472*4882a593Smuzhiyun #line 1473 "winprefsyacc.c"
1473*4882a593Smuzhiyun     break;
1474*4882a593Smuzhiyun 
1475*4882a593Smuzhiyun   case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB  */
1476*4882a593Smuzhiyun #line 196 "winprefsyacc.y"
1477*4882a593Smuzhiyun                                                             {CloseIcons();}
1478*4882a593Smuzhiyun #line 1479 "winprefsyacc.c"
1479*4882a593Smuzhiyun     break;
1480*4882a593Smuzhiyun 
1481*4882a593Smuzhiyun   case 39: /* group1: TOPMOST  */
1482*4882a593Smuzhiyun #line 199 "winprefsyacc.y"
1483*4882a593Smuzhiyun                 { (yyval.uVal)=STYLE_TOPMOST; }
1484*4882a593Smuzhiyun #line 1485 "winprefsyacc.c"
1485*4882a593Smuzhiyun     break;
1486*4882a593Smuzhiyun 
1487*4882a593Smuzhiyun   case 40: /* group1: MAXIMIZE  */
1488*4882a593Smuzhiyun #line 200 "winprefsyacc.y"
1489*4882a593Smuzhiyun                    { (yyval.uVal)=STYLE_MAXIMIZE; }
1490*4882a593Smuzhiyun #line 1491 "winprefsyacc.c"
1491*4882a593Smuzhiyun     break;
1492*4882a593Smuzhiyun 
1493*4882a593Smuzhiyun   case 41: /* group1: MINIMIZE  */
1494*4882a593Smuzhiyun #line 201 "winprefsyacc.y"
1495*4882a593Smuzhiyun                    { (yyval.uVal)=STYLE_MINIMIZE; }
1496*4882a593Smuzhiyun #line 1497 "winprefsyacc.c"
1497*4882a593Smuzhiyun     break;
1498*4882a593Smuzhiyun 
1499*4882a593Smuzhiyun   case 42: /* group1: BOTTOM  */
1500*4882a593Smuzhiyun #line 202 "winprefsyacc.y"
1501*4882a593Smuzhiyun                  { (yyval.uVal)=STYLE_BOTTOM; }
1502*4882a593Smuzhiyun #line 1503 "winprefsyacc.c"
1503*4882a593Smuzhiyun     break;
1504*4882a593Smuzhiyun 
1505*4882a593Smuzhiyun   case 43: /* group2: NOTITLE  */
1506*4882a593Smuzhiyun #line 205 "winprefsyacc.y"
1507*4882a593Smuzhiyun                 { (yyval.uVal)=STYLE_NOTITLE; }
1508*4882a593Smuzhiyun #line 1509 "winprefsyacc.c"
1509*4882a593Smuzhiyun     break;
1510*4882a593Smuzhiyun 
1511*4882a593Smuzhiyun   case 44: /* group2: OUTLINE  */
1512*4882a593Smuzhiyun #line 206 "winprefsyacc.y"
1513*4882a593Smuzhiyun                   { (yyval.uVal)=STYLE_OUTLINE; }
1514*4882a593Smuzhiyun #line 1515 "winprefsyacc.c"
1515*4882a593Smuzhiyun     break;
1516*4882a593Smuzhiyun 
1517*4882a593Smuzhiyun   case 45: /* group2: NOFRAME  */
1518*4882a593Smuzhiyun #line 207 "winprefsyacc.y"
1519*4882a593Smuzhiyun                   { (yyval.uVal)=STYLE_NOFRAME; }
1520*4882a593Smuzhiyun #line 1521 "winprefsyacc.c"
1521*4882a593Smuzhiyun     break;
1522*4882a593Smuzhiyun 
1523*4882a593Smuzhiyun   case 46: /* stylecombo: group1  */
1524*4882a593Smuzhiyun #line 210 "winprefsyacc.y"
1525*4882a593Smuzhiyun                        { (yyval.uVal)=(yyvsp[0].uVal); }
1526*4882a593Smuzhiyun #line 1527 "winprefsyacc.c"
1527*4882a593Smuzhiyun     break;
1528*4882a593Smuzhiyun 
1529*4882a593Smuzhiyun   case 47: /* stylecombo: group2  */
1530*4882a593Smuzhiyun #line 211 "winprefsyacc.y"
1531*4882a593Smuzhiyun                  { (yyval.uVal)=(yyvsp[0].uVal); }
1532*4882a593Smuzhiyun #line 1533 "winprefsyacc.c"
1533*4882a593Smuzhiyun     break;
1534*4882a593Smuzhiyun 
1535*4882a593Smuzhiyun   case 48: /* stylecombo: group1 group2  */
1536*4882a593Smuzhiyun #line 212 "winprefsyacc.y"
1537*4882a593Smuzhiyun                         { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
1538*4882a593Smuzhiyun #line 1539 "winprefsyacc.c"
1539*4882a593Smuzhiyun     break;
1540*4882a593Smuzhiyun 
1541*4882a593Smuzhiyun   case 49: /* stylecombo: group2 group1  */
1542*4882a593Smuzhiyun #line 213 "winprefsyacc.y"
1543*4882a593Smuzhiyun                         { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
1544*4882a593Smuzhiyun #line 1545 "winprefsyacc.c"
1545*4882a593Smuzhiyun     break;
1546*4882a593Smuzhiyun 
1547*4882a593Smuzhiyun   case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada  */
1548*4882a593Smuzhiyun #line 216 "winprefsyacc.y"
1549*4882a593Smuzhiyun                                                           { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); }
1550*4882a593Smuzhiyun #line 1551 "winprefsyacc.c"
1551*4882a593Smuzhiyun     break;
1552*4882a593Smuzhiyun 
1553*4882a593Smuzhiyun   case 53: /* $@3: %empty  */
1554*4882a593Smuzhiyun #line 223 "winprefsyacc.y"
1555*4882a593Smuzhiyun                   {OpenStyles();}
1556*4882a593Smuzhiyun #line 1557 "winprefsyacc.c"
1557*4882a593Smuzhiyun     break;
1558*4882a593Smuzhiyun 
1559*4882a593Smuzhiyun   case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB  */
1560*4882a593Smuzhiyun #line 223 "winprefsyacc.y"
1561*4882a593Smuzhiyun                                                                {CloseStyles();}
1562*4882a593Smuzhiyun #line 1563 "winprefsyacc.c"
1563*4882a593Smuzhiyun     break;
1564*4882a593Smuzhiyun 
1565*4882a593Smuzhiyun   case 55: /* atspot: %empty  */
1566*4882a593Smuzhiyun #line 226 "winprefsyacc.y"
1567*4882a593Smuzhiyun         { (yyval.iVal)=AT_END; }
1568*4882a593Smuzhiyun #line 1569 "winprefsyacc.c"
1569*4882a593Smuzhiyun     break;
1570*4882a593Smuzhiyun 
1571*4882a593Smuzhiyun   case 56: /* atspot: ATSTART  */
1572*4882a593Smuzhiyun #line 227 "winprefsyacc.y"
1573*4882a593Smuzhiyun                   { (yyval.iVal)=AT_START; }
1574*4882a593Smuzhiyun #line 1575 "winprefsyacc.c"
1575*4882a593Smuzhiyun     break;
1576*4882a593Smuzhiyun 
1577*4882a593Smuzhiyun   case 57: /* atspot: ATEND  */
1578*4882a593Smuzhiyun #line 228 "winprefsyacc.y"
1579*4882a593Smuzhiyun                 { (yyval.iVal)=AT_END; }
1580*4882a593Smuzhiyun #line 1581 "winprefsyacc.c"
1581*4882a593Smuzhiyun     break;
1582*4882a593Smuzhiyun 
1583*4882a593Smuzhiyun   case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada  */
1584*4882a593Smuzhiyun #line 231 "winprefsyacc.y"
1585*4882a593Smuzhiyun                                                              { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); }
1586*4882a593Smuzhiyun #line 1587 "winprefsyacc.c"
1587*4882a593Smuzhiyun     break;
1588*4882a593Smuzhiyun 
1589*4882a593Smuzhiyun   case 61: /* $@4: %empty  */
1590*4882a593Smuzhiyun #line 238 "winprefsyacc.y"
1591*4882a593Smuzhiyun                                    {OpenSysMenu();}
1592*4882a593Smuzhiyun #line 1593 "winprefsyacc.c"
1593*4882a593Smuzhiyun     break;
1594*4882a593Smuzhiyun 
1595*4882a593Smuzhiyun   case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB  */
1596*4882a593Smuzhiyun #line 238 "winprefsyacc.y"
1597*4882a593Smuzhiyun                                                                                    {CloseSysMenu();}
1598*4882a593Smuzhiyun #line 1599 "winprefsyacc.c"
1599*4882a593Smuzhiyun     break;
1600*4882a593Smuzhiyun 
1601*4882a593Smuzhiyun   case 63: /* forceexit: FORCEEXIT NEWLINE  */
1602*4882a593Smuzhiyun #line 241 "winprefsyacc.y"
1603*4882a593Smuzhiyun                                   { pref.fForceExit = TRUE; }
1604*4882a593Smuzhiyun #line 1605 "winprefsyacc.c"
1605*4882a593Smuzhiyun     break;
1606*4882a593Smuzhiyun 
1607*4882a593Smuzhiyun   case 64: /* silentexit: SILENTEXIT NEWLINE  */
1608*4882a593Smuzhiyun #line 244 "winprefsyacc.y"
1609*4882a593Smuzhiyun                                    { pref.fSilentExit = TRUE; }
1610*4882a593Smuzhiyun #line 1611 "winprefsyacc.c"
1611*4882a593Smuzhiyun     break;
1612*4882a593Smuzhiyun 
1613*4882a593Smuzhiyun   case 65: /* debug: "DEBUG" STRING NEWLINE  */
1614*4882a593Smuzhiyun #line 247 "winprefsyacc.y"
1615*4882a593Smuzhiyun                                    { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1616*4882a593Smuzhiyun #line 1617 "winprefsyacc.c"
1617*4882a593Smuzhiyun     break;
1618*4882a593Smuzhiyun 
1619*4882a593Smuzhiyun 
1620*4882a593Smuzhiyun #line 1621 "winprefsyacc.c"
1621*4882a593Smuzhiyun 
1622*4882a593Smuzhiyun       default: break;
1623*4882a593Smuzhiyun     }
1624*4882a593Smuzhiyun   /* User semantic actions sometimes alter yychar, and that requires
1625*4882a593Smuzhiyun      that yytoken be updated with the new translation.  We take the
1626*4882a593Smuzhiyun      approach of translating immediately before every use of yytoken.
1627*4882a593Smuzhiyun      One alternative is translating here after every semantic action,
1628*4882a593Smuzhiyun      but that translation would be missed if the semantic action invokes
1629*4882a593Smuzhiyun      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
1630*4882a593Smuzhiyun      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
1631*4882a593Smuzhiyun      incorrect destructor might then be invoked immediately.  In the
1632*4882a593Smuzhiyun      case of YYERROR or YYBACKUP, subsequent parser actions might lead
1633*4882a593Smuzhiyun      to an incorrect destructor call or verbose syntax error message
1634*4882a593Smuzhiyun      before the lookahead is translated.  */
1635*4882a593Smuzhiyun   YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
1636*4882a593Smuzhiyun 
1637*4882a593Smuzhiyun   YYPOPSTACK (yylen);
1638*4882a593Smuzhiyun   yylen = 0;
1639*4882a593Smuzhiyun 
1640*4882a593Smuzhiyun   *++yyvsp = yyval;
1641*4882a593Smuzhiyun 
1642*4882a593Smuzhiyun   /* Now 'shift' the result of the reduction.  Determine what state
1643*4882a593Smuzhiyun      that goes to, based on the state we popped back to and the rule
1644*4882a593Smuzhiyun      number reduced by.  */
1645*4882a593Smuzhiyun   {
1646*4882a593Smuzhiyun     const int yylhs = yyr1[yyn] - YYNTOKENS;
1647*4882a593Smuzhiyun     const int yyi = yypgoto[yylhs] + *yyssp;
1648*4882a593Smuzhiyun     yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
1649*4882a593Smuzhiyun                ? yytable[yyi]
1650*4882a593Smuzhiyun                : yydefgoto[yylhs]);
1651*4882a593Smuzhiyun   }
1652*4882a593Smuzhiyun 
1653*4882a593Smuzhiyun   goto yynewstate;
1654*4882a593Smuzhiyun 
1655*4882a593Smuzhiyun 
1656*4882a593Smuzhiyun /*--------------------------------------.
1657*4882a593Smuzhiyun | yyerrlab -- here on detecting error.  |
1658*4882a593Smuzhiyun `--------------------------------------*/
1659*4882a593Smuzhiyun yyerrlab:
1660*4882a593Smuzhiyun   /* Make sure we have latest lookahead translation.  See comments at
1661*4882a593Smuzhiyun      user semantic actions for why this is necessary.  */
1662*4882a593Smuzhiyun   yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
1663*4882a593Smuzhiyun   /* If not already recovering from an error, report this error.  */
1664*4882a593Smuzhiyun   if (!yyerrstatus)
1665*4882a593Smuzhiyun     {
1666*4882a593Smuzhiyun       ++yynerrs;
1667*4882a593Smuzhiyun       yyerror (YY_("syntax error"));
1668*4882a593Smuzhiyun     }
1669*4882a593Smuzhiyun 
1670*4882a593Smuzhiyun   if (yyerrstatus == 3)
1671*4882a593Smuzhiyun     {
1672*4882a593Smuzhiyun       /* If just tried and failed to reuse lookahead token after an
1673*4882a593Smuzhiyun          error, discard it.  */
1674*4882a593Smuzhiyun 
1675*4882a593Smuzhiyun       if (yychar <= YYEOF)
1676*4882a593Smuzhiyun         {
1677*4882a593Smuzhiyun           /* Return failure if at end of input.  */
1678*4882a593Smuzhiyun           if (yychar == YYEOF)
1679*4882a593Smuzhiyun             YYABORT;
1680*4882a593Smuzhiyun         }
1681*4882a593Smuzhiyun       else
1682*4882a593Smuzhiyun         {
1683*4882a593Smuzhiyun           yydestruct ("Error: discarding",
1684*4882a593Smuzhiyun                       yytoken, &yylval);
1685*4882a593Smuzhiyun           yychar = YYEMPTY;
1686*4882a593Smuzhiyun         }
1687*4882a593Smuzhiyun     }
1688*4882a593Smuzhiyun 
1689*4882a593Smuzhiyun   /* Else will try to reuse lookahead token after shifting the error
1690*4882a593Smuzhiyun      token.  */
1691*4882a593Smuzhiyun   goto yyerrlab1;
1692*4882a593Smuzhiyun 
1693*4882a593Smuzhiyun 
1694*4882a593Smuzhiyun /*---------------------------------------------------.
1695*4882a593Smuzhiyun | yyerrorlab -- error raised explicitly by YYERROR.  |
1696*4882a593Smuzhiyun `---------------------------------------------------*/
1697*4882a593Smuzhiyun yyerrorlab:
1698*4882a593Smuzhiyun   /* Pacify compilers when the user code never invokes YYERROR and the
1699*4882a593Smuzhiyun      label yyerrorlab therefore never appears in user code.  */
1700*4882a593Smuzhiyun   if (0)
1701*4882a593Smuzhiyun     YYERROR;
1702*4882a593Smuzhiyun 
1703*4882a593Smuzhiyun   /* Do not reclaim the symbols of the rule whose action triggered
1704*4882a593Smuzhiyun      this YYERROR.  */
1705*4882a593Smuzhiyun   YYPOPSTACK (yylen);
1706*4882a593Smuzhiyun   yylen = 0;
1707*4882a593Smuzhiyun   YY_STACK_PRINT (yyss, yyssp);
1708*4882a593Smuzhiyun   yystate = *yyssp;
1709*4882a593Smuzhiyun   goto yyerrlab1;
1710*4882a593Smuzhiyun 
1711*4882a593Smuzhiyun 
1712*4882a593Smuzhiyun /*-------------------------------------------------------------.
1713*4882a593Smuzhiyun | yyerrlab1 -- common code for both syntax error and YYERROR.  |
1714*4882a593Smuzhiyun `-------------------------------------------------------------*/
1715*4882a593Smuzhiyun yyerrlab1:
1716*4882a593Smuzhiyun   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
1717*4882a593Smuzhiyun 
1718*4882a593Smuzhiyun   /* Pop stack until we find a state that shifts the error token.  */
1719*4882a593Smuzhiyun   for (;;)
1720*4882a593Smuzhiyun     {
1721*4882a593Smuzhiyun       yyn = yypact[yystate];
1722*4882a593Smuzhiyun       if (!yypact_value_is_default (yyn))
1723*4882a593Smuzhiyun         {
1724*4882a593Smuzhiyun           yyn += YYSYMBOL_YYerror;
1725*4882a593Smuzhiyun           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
1726*4882a593Smuzhiyun             {
1727*4882a593Smuzhiyun               yyn = yytable[yyn];
1728*4882a593Smuzhiyun               if (0 < yyn)
1729*4882a593Smuzhiyun                 break;
1730*4882a593Smuzhiyun             }
1731*4882a593Smuzhiyun         }
1732*4882a593Smuzhiyun 
1733*4882a593Smuzhiyun       /* Pop the current state because it cannot handle the error token.  */
1734*4882a593Smuzhiyun       if (yyssp == yyss)
1735*4882a593Smuzhiyun         YYABORT;
1736*4882a593Smuzhiyun 
1737*4882a593Smuzhiyun 
1738*4882a593Smuzhiyun       yydestruct ("Error: popping",
1739*4882a593Smuzhiyun                   YY_ACCESSING_SYMBOL (yystate), yyvsp);
1740*4882a593Smuzhiyun       YYPOPSTACK (1);
1741*4882a593Smuzhiyun       yystate = *yyssp;
1742*4882a593Smuzhiyun       YY_STACK_PRINT (yyss, yyssp);
1743*4882a593Smuzhiyun     }
1744*4882a593Smuzhiyun 
1745*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1746*4882a593Smuzhiyun   *++yyvsp = yylval;
1747*4882a593Smuzhiyun   YY_IGNORE_MAYBE_UNINITIALIZED_END
1748*4882a593Smuzhiyun 
1749*4882a593Smuzhiyun 
1750*4882a593Smuzhiyun   /* Shift the error token.  */
1751*4882a593Smuzhiyun   YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
1752*4882a593Smuzhiyun 
1753*4882a593Smuzhiyun   yystate = yyn;
1754*4882a593Smuzhiyun   goto yynewstate;
1755*4882a593Smuzhiyun 
1756*4882a593Smuzhiyun 
1757*4882a593Smuzhiyun /*-------------------------------------.
1758*4882a593Smuzhiyun | yyacceptlab -- YYACCEPT comes here.  |
1759*4882a593Smuzhiyun `-------------------------------------*/
1760*4882a593Smuzhiyun yyacceptlab:
1761*4882a593Smuzhiyun   yyresult = 0;
1762*4882a593Smuzhiyun   goto yyreturn;
1763*4882a593Smuzhiyun 
1764*4882a593Smuzhiyun 
1765*4882a593Smuzhiyun /*-----------------------------------.
1766*4882a593Smuzhiyun | yyabortlab -- YYABORT comes here.  |
1767*4882a593Smuzhiyun `-----------------------------------*/
1768*4882a593Smuzhiyun yyabortlab:
1769*4882a593Smuzhiyun   yyresult = 1;
1770*4882a593Smuzhiyun   goto yyreturn;
1771*4882a593Smuzhiyun 
1772*4882a593Smuzhiyun 
1773*4882a593Smuzhiyun #if !defined yyoverflow
1774*4882a593Smuzhiyun /*-------------------------------------------------.
1775*4882a593Smuzhiyun | yyexhaustedlab -- memory exhaustion comes here.  |
1776*4882a593Smuzhiyun `-------------------------------------------------*/
1777*4882a593Smuzhiyun yyexhaustedlab:
1778*4882a593Smuzhiyun   yyerror (YY_("memory exhausted"));
1779*4882a593Smuzhiyun   yyresult = 2;
1780*4882a593Smuzhiyun   goto yyreturn;
1781*4882a593Smuzhiyun #endif
1782*4882a593Smuzhiyun 
1783*4882a593Smuzhiyun 
1784*4882a593Smuzhiyun /*-------------------------------------------------------.
1785*4882a593Smuzhiyun | yyreturn -- parsing is finished, clean up and return.  |
1786*4882a593Smuzhiyun `-------------------------------------------------------*/
1787*4882a593Smuzhiyun yyreturn:
1788*4882a593Smuzhiyun   if (yychar != YYEMPTY)
1789*4882a593Smuzhiyun     {
1790*4882a593Smuzhiyun       /* Make sure we have latest lookahead translation.  See comments at
1791*4882a593Smuzhiyun          user semantic actions for why this is necessary.  */
1792*4882a593Smuzhiyun       yytoken = YYTRANSLATE (yychar);
1793*4882a593Smuzhiyun       yydestruct ("Cleanup: discarding lookahead",
1794*4882a593Smuzhiyun                   yytoken, &yylval);
1795*4882a593Smuzhiyun     }
1796*4882a593Smuzhiyun   /* Do not reclaim the symbols of the rule whose action triggered
1797*4882a593Smuzhiyun      this YYABORT or YYACCEPT.  */
1798*4882a593Smuzhiyun   YYPOPSTACK (yylen);
1799*4882a593Smuzhiyun   YY_STACK_PRINT (yyss, yyssp);
1800*4882a593Smuzhiyun   while (yyssp != yyss)
1801*4882a593Smuzhiyun     {
1802*4882a593Smuzhiyun       yydestruct ("Cleanup: popping",
1803*4882a593Smuzhiyun                   YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
1804*4882a593Smuzhiyun       YYPOPSTACK (1);
1805*4882a593Smuzhiyun     }
1806*4882a593Smuzhiyun #ifndef yyoverflow
1807*4882a593Smuzhiyun   if (yyss != yyssa)
1808*4882a593Smuzhiyun     YYSTACK_FREE (yyss);
1809*4882a593Smuzhiyun #endif
1810*4882a593Smuzhiyun 
1811*4882a593Smuzhiyun   return yyresult;
1812*4882a593Smuzhiyun }
1813*4882a593Smuzhiyun 
1814*4882a593Smuzhiyun #line 251 "winprefsyacc.y"
1815*4882a593Smuzhiyun 
1816*4882a593Smuzhiyun /*
1817*4882a593Smuzhiyun  * Errors in parsing abort and print log messages
1818*4882a593Smuzhiyun  */
1819*4882a593Smuzhiyun static int
yyerror(const char * s)1820*4882a593Smuzhiyun yyerror (const char *s)
1821*4882a593Smuzhiyun {
1822*4882a593Smuzhiyun   ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
1823*4882a593Smuzhiyun   return 1;
1824*4882a593Smuzhiyun }
1825*4882a593Smuzhiyun 
1826*4882a593Smuzhiyun /* Miscellaneous functions to store TOKENs into the structure */
1827*4882a593Smuzhiyun static void
SetIconDirectory(char * path)1828*4882a593Smuzhiyun SetIconDirectory (char *path)
1829*4882a593Smuzhiyun {
1830*4882a593Smuzhiyun   strncpy (pref.iconDirectory, path, PATH_MAX);
1831*4882a593Smuzhiyun   pref.iconDirectory[PATH_MAX] = 0;
1832*4882a593Smuzhiyun }
1833*4882a593Smuzhiyun 
1834*4882a593Smuzhiyun static void
SetDefaultIcon(char * fname)1835*4882a593Smuzhiyun SetDefaultIcon (char *fname)
1836*4882a593Smuzhiyun {
1837*4882a593Smuzhiyun   strncpy (pref.defaultIconName, fname, NAME_MAX);
1838*4882a593Smuzhiyun   pref.defaultIconName[NAME_MAX] = 0;
1839*4882a593Smuzhiyun }
1840*4882a593Smuzhiyun 
1841*4882a593Smuzhiyun static void
SetTrayIcon(char * fname)1842*4882a593Smuzhiyun SetTrayIcon (char *fname)
1843*4882a593Smuzhiyun {
1844*4882a593Smuzhiyun   strncpy (pref.trayIconName, fname, NAME_MAX);
1845*4882a593Smuzhiyun   pref.trayIconName[NAME_MAX] = 0;
1846*4882a593Smuzhiyun }
1847*4882a593Smuzhiyun 
1848*4882a593Smuzhiyun static void
SetRootMenu(char * menuname)1849*4882a593Smuzhiyun SetRootMenu (char *menuname)
1850*4882a593Smuzhiyun {
1851*4882a593Smuzhiyun   strncpy (pref.rootMenuName, menuname, MENU_MAX);
1852*4882a593Smuzhiyun   pref.rootMenuName[MENU_MAX] = 0;
1853*4882a593Smuzhiyun }
1854*4882a593Smuzhiyun 
1855*4882a593Smuzhiyun static void
SetDefaultSysMenu(char * menuname,int pos)1856*4882a593Smuzhiyun SetDefaultSysMenu (char *menuname, int pos)
1857*4882a593Smuzhiyun {
1858*4882a593Smuzhiyun   strncpy (pref.defaultSysMenuName, menuname, MENU_MAX);
1859*4882a593Smuzhiyun   pref.defaultSysMenuName[MENU_MAX] = 0;
1860*4882a593Smuzhiyun   pref.defaultSysMenuPos = pos;
1861*4882a593Smuzhiyun }
1862*4882a593Smuzhiyun 
1863*4882a593Smuzhiyun static void
OpenMenu(char * menuname)1864*4882a593Smuzhiyun OpenMenu (char *menuname)
1865*4882a593Smuzhiyun {
1866*4882a593Smuzhiyun   if (menu.menuItem) free(menu.menuItem);
1867*4882a593Smuzhiyun   menu.menuItem = NULL;
1868*4882a593Smuzhiyun   strncpy(menu.menuName, menuname, MENU_MAX);
1869*4882a593Smuzhiyun   menu.menuName[MENU_MAX] = 0;
1870*4882a593Smuzhiyun   menu.menuItems = 0;
1871*4882a593Smuzhiyun }
1872*4882a593Smuzhiyun 
1873*4882a593Smuzhiyun static void
AddMenuLine(const char * text,MENUCOMMANDTYPE cmd,const char * param)1874*4882a593Smuzhiyun AddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param)
1875*4882a593Smuzhiyun {
1876*4882a593Smuzhiyun   if (menu.menuItem==NULL)
1877*4882a593Smuzhiyun     menu.menuItem = malloc(sizeof(MENUITEM));
1878*4882a593Smuzhiyun   else
1879*4882a593Smuzhiyun     menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
1880*4882a593Smuzhiyun 
1881*4882a593Smuzhiyun   strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
1882*4882a593Smuzhiyun   menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
1883*4882a593Smuzhiyun 
1884*4882a593Smuzhiyun   menu.menuItem[menu.menuItems].cmd = cmd;
1885*4882a593Smuzhiyun 
1886*4882a593Smuzhiyun   strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
1887*4882a593Smuzhiyun   menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
1888*4882a593Smuzhiyun 
1889*4882a593Smuzhiyun   menu.menuItem[menu.menuItems].commandID = 0;
1890*4882a593Smuzhiyun 
1891*4882a593Smuzhiyun   menu.menuItems++;
1892*4882a593Smuzhiyun }
1893*4882a593Smuzhiyun 
1894*4882a593Smuzhiyun static void
CloseMenu(void)1895*4882a593Smuzhiyun CloseMenu (void)
1896*4882a593Smuzhiyun {
1897*4882a593Smuzhiyun   if (menu.menuItem==NULL || menu.menuItems==0)
1898*4882a593Smuzhiyun     {
1899*4882a593Smuzhiyun       ErrorF("LoadPreferences: Empty menu detected\n");
1900*4882a593Smuzhiyun       return;
1901*4882a593Smuzhiyun     }
1902*4882a593Smuzhiyun 
1903*4882a593Smuzhiyun   if (pref.menuItems)
1904*4882a593Smuzhiyun     pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
1905*4882a593Smuzhiyun   else
1906*4882a593Smuzhiyun     pref.menu = malloc (sizeof(MENUPARSED));
1907*4882a593Smuzhiyun 
1908*4882a593Smuzhiyun   memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
1909*4882a593Smuzhiyun   pref.menuItems++;
1910*4882a593Smuzhiyun 
1911*4882a593Smuzhiyun   memset (&menu, 0, sizeof(MENUPARSED));
1912*4882a593Smuzhiyun }
1913*4882a593Smuzhiyun 
1914*4882a593Smuzhiyun static void
OpenIcons(void)1915*4882a593Smuzhiyun OpenIcons (void)
1916*4882a593Smuzhiyun {
1917*4882a593Smuzhiyun   if (pref.icon != NULL) {
1918*4882a593Smuzhiyun     ErrorF("LoadPreferences: Redefining icon mappings\n");
1919*4882a593Smuzhiyun     free(pref.icon);
1920*4882a593Smuzhiyun     pref.icon = NULL;
1921*4882a593Smuzhiyun   }
1922*4882a593Smuzhiyun   pref.iconItems = 0;
1923*4882a593Smuzhiyun }
1924*4882a593Smuzhiyun 
1925*4882a593Smuzhiyun static void
AddIconLine(char * matchstr,char * iconfile)1926*4882a593Smuzhiyun AddIconLine (char *matchstr, char *iconfile)
1927*4882a593Smuzhiyun {
1928*4882a593Smuzhiyun   if (pref.icon==NULL)
1929*4882a593Smuzhiyun     pref.icon = malloc(sizeof(ICONITEM));
1930*4882a593Smuzhiyun   else
1931*4882a593Smuzhiyun     pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
1932*4882a593Smuzhiyun 
1933*4882a593Smuzhiyun   strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
1934*4882a593Smuzhiyun   pref.icon[pref.iconItems].match[MENU_MAX] = 0;
1935*4882a593Smuzhiyun 
1936*4882a593Smuzhiyun   strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
1937*4882a593Smuzhiyun   pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
1938*4882a593Smuzhiyun 
1939*4882a593Smuzhiyun   pref.icon[pref.iconItems].hicon = 0;
1940*4882a593Smuzhiyun 
1941*4882a593Smuzhiyun   pref.iconItems++;
1942*4882a593Smuzhiyun }
1943*4882a593Smuzhiyun 
1944*4882a593Smuzhiyun static void
CloseIcons(void)1945*4882a593Smuzhiyun CloseIcons (void)
1946*4882a593Smuzhiyun {
1947*4882a593Smuzhiyun }
1948*4882a593Smuzhiyun 
1949*4882a593Smuzhiyun static void
OpenStyles(void)1950*4882a593Smuzhiyun OpenStyles (void)
1951*4882a593Smuzhiyun {
1952*4882a593Smuzhiyun   if (pref.style != NULL) {
1953*4882a593Smuzhiyun     ErrorF("LoadPreferences: Redefining window style\n");
1954*4882a593Smuzhiyun     free(pref.style);
1955*4882a593Smuzhiyun     pref.style = NULL;
1956*4882a593Smuzhiyun   }
1957*4882a593Smuzhiyun   pref.styleItems = 0;
1958*4882a593Smuzhiyun }
1959*4882a593Smuzhiyun 
1960*4882a593Smuzhiyun static void
AddStyleLine(char * matchstr,unsigned long style)1961*4882a593Smuzhiyun AddStyleLine (char *matchstr, unsigned long style)
1962*4882a593Smuzhiyun {
1963*4882a593Smuzhiyun   if (pref.style==NULL)
1964*4882a593Smuzhiyun     pref.style = malloc(sizeof(STYLEITEM));
1965*4882a593Smuzhiyun   else
1966*4882a593Smuzhiyun     pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
1967*4882a593Smuzhiyun 
1968*4882a593Smuzhiyun   strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
1969*4882a593Smuzhiyun   pref.style[pref.styleItems].match[MENU_MAX] = 0;
1970*4882a593Smuzhiyun 
1971*4882a593Smuzhiyun   pref.style[pref.styleItems].type = style;
1972*4882a593Smuzhiyun 
1973*4882a593Smuzhiyun   pref.styleItems++;
1974*4882a593Smuzhiyun }
1975*4882a593Smuzhiyun 
1976*4882a593Smuzhiyun static void
CloseStyles(void)1977*4882a593Smuzhiyun CloseStyles (void)
1978*4882a593Smuzhiyun {
1979*4882a593Smuzhiyun }
1980*4882a593Smuzhiyun 
1981*4882a593Smuzhiyun static void
OpenSysMenu(void)1982*4882a593Smuzhiyun OpenSysMenu (void)
1983*4882a593Smuzhiyun {
1984*4882a593Smuzhiyun   if (pref.sysMenu != NULL) {
1985*4882a593Smuzhiyun     ErrorF("LoadPreferences: Redefining system menu\n");
1986*4882a593Smuzhiyun     free(pref.sysMenu);
1987*4882a593Smuzhiyun     pref.sysMenu = NULL;
1988*4882a593Smuzhiyun   }
1989*4882a593Smuzhiyun   pref.sysMenuItems = 0;
1990*4882a593Smuzhiyun }
1991*4882a593Smuzhiyun 
1992*4882a593Smuzhiyun static void
AddSysMenuLine(char * matchstr,char * menuname,int pos)1993*4882a593Smuzhiyun AddSysMenuLine (char *matchstr, char *menuname, int pos)
1994*4882a593Smuzhiyun {
1995*4882a593Smuzhiyun   if (pref.sysMenu==NULL)
1996*4882a593Smuzhiyun     pref.sysMenu = malloc(sizeof(SYSMENUITEM));
1997*4882a593Smuzhiyun   else
1998*4882a593Smuzhiyun     pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
1999*4882a593Smuzhiyun 
2000*4882a593Smuzhiyun   strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
2001*4882a593Smuzhiyun   pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
2002*4882a593Smuzhiyun 
2003*4882a593Smuzhiyun   strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
2004*4882a593Smuzhiyun   pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
2005*4882a593Smuzhiyun 
2006*4882a593Smuzhiyun   pref.sysMenu[pref.sysMenuItems].menuPos = pos;
2007*4882a593Smuzhiyun 
2008*4882a593Smuzhiyun   pref.sysMenuItems++;
2009*4882a593Smuzhiyun }
2010*4882a593Smuzhiyun 
2011*4882a593Smuzhiyun static void
CloseSysMenu(void)2012*4882a593Smuzhiyun CloseSysMenu (void)
2013*4882a593Smuzhiyun {
2014*4882a593Smuzhiyun }
2015*4882a593Smuzhiyun 
2016