winprefsyacc.c revision dc61d50d
1dc61d50dSmrg/* A Bison parser, made by GNU Bison 3.7.5.  */
205b261ecSmrg
39ace9065Smrg/* Bison implementation for Yacc-like parsers in C
435c4bbdfSmrg
5dc61d50dSmrg   Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
65a7dfde8Smrg   Inc.
735c4bbdfSmrg
84642e01fSmrg   This program is free software: you can redistribute it and/or modify
905b261ecSmrg   it under the terms of the GNU General Public License as published by
104642e01fSmrg   the Free Software Foundation, either version 3 of the License, or
114642e01fSmrg   (at your option) any later version.
1235c4bbdfSmrg
1305b261ecSmrg   This program is distributed in the hope that it will be useful,
1405b261ecSmrg   but WITHOUT ANY WARRANTY; without even the implied warranty of
1505b261ecSmrg   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1605b261ecSmrg   GNU General Public License for more details.
1735c4bbdfSmrg
1805b261ecSmrg   You should have received a copy of the GNU General Public License
19ed6184dfSmrg   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
2005b261ecSmrg
2105b261ecSmrg/* As a special exception, you may create a larger work that contains
2205b261ecSmrg   part or all of the Bison parser skeleton and distribute that work
2305b261ecSmrg   under terms of your choice, so long as that work isn't itself a
2405b261ecSmrg   parser generator using the skeleton or a modified version thereof
2505b261ecSmrg   as a parser skeleton.  Alternatively, if you modify or redistribute
2605b261ecSmrg   the parser skeleton itself, you may (at your option) remove this
2705b261ecSmrg   special exception, which will cause the skeleton and the resulting
2805b261ecSmrg   Bison output files to be licensed under the GNU General Public
2905b261ecSmrg   License without this special exception.
3035c4bbdfSmrg
3105b261ecSmrg   This special exception was added by the Free Software Foundation in
3205b261ecSmrg   version 2.2 of Bison.  */
3305b261ecSmrg
3405b261ecSmrg/* C LALR(1) parser skeleton written by Richard Stallman, by
3505b261ecSmrg   simplifying the original so-called "semantic" parser.  */
3605b261ecSmrg
37dc61d50dSmrg/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38dc61d50dSmrg   especially those whose name start with YY_ or yy_.  They are
39dc61d50dSmrg   private implementation details that can be changed or removed.  */
40dc61d50dSmrg
4105b261ecSmrg/* All symbols defined below should begin with yy or YY, to avoid
4205b261ecSmrg   infringing on user name space.  This should be done even for local
4305b261ecSmrg   variables, as they might otherwise be expanded by user macros.
4405b261ecSmrg   There are some unavoidable exceptions within include files to
4505b261ecSmrg   define necessary library symbols; they are noted "INFRINGES ON
4605b261ecSmrg   USER NAME SPACE" below.  */
4705b261ecSmrg
48dc61d50dSmrg/* Identify Bison output, and Bison version.  */
49dc61d50dSmrg#define YYBISON 30705
5005b261ecSmrg
51dc61d50dSmrg/* Bison version string.  */
52dc61d50dSmrg#define YYBISON_VERSION "3.7.5"
5305b261ecSmrg
5405b261ecSmrg/* Skeleton name.  */
5505b261ecSmrg#define YYSKELETON_NAME "yacc.c"
5605b261ecSmrg
5705b261ecSmrg/* Pure parsers.  */
5805b261ecSmrg#define YYPURE 0
5905b261ecSmrg
604642e01fSmrg/* Push parsers.  */
614642e01fSmrg#define YYPUSH 0
6205b261ecSmrg
634642e01fSmrg/* Pull parsers.  */
644642e01fSmrg#define YYPULL 1
6505b261ecSmrg
6605b261ecSmrg
6705b261ecSmrg
6805b261ecSmrg
695a7dfde8Smrg/* First part of user prologue.  */
705a7dfde8Smrg#line 1 "winprefsyacc.y"
7105b261ecSmrg
7205b261ecSmrg/*
7305b261ecSmrg * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved.
746747b715Smrg * Copyright (C) Colin Harrison 2005-2008
7505b261ecSmrg *
7605b261ecSmrg * Permission is hereby granted, free of charge, to any person obtaining
7705b261ecSmrg * a copy of this software and associated documentation files (the
7805b261ecSmrg * "Software"), to deal in the Software without restriction, including
7905b261ecSmrg * without limitation the rights to use, copy, modify, merge, publish,
8005b261ecSmrg * distribute, sublicense, and/or sell copies of the Software, and to
8105b261ecSmrg * permit persons to whom the Software is furnished to do so, subject to
8205b261ecSmrg * the following conditions:
8305b261ecSmrg *
8405b261ecSmrg * The above copyright notice and this permission notice shall be
8505b261ecSmrg * included in all copies or substantial portions of the Software.
8605b261ecSmrg *
8705b261ecSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
8805b261ecSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8905b261ecSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
9005b261ecSmrg * NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR
9105b261ecSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
9205b261ecSmrg * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
9305b261ecSmrg * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9405b261ecSmrg *
9505b261ecSmrg * Except as contained in this notice, the name of the XFree86 Project
9605b261ecSmrg * shall not be used in advertising or otherwise to promote the sale, use
9705b261ecSmrg * or other dealings in this Software without prior written authorization
9805b261ecSmrg * from the XFree86 Project.
9905b261ecSmrg *
10005b261ecSmrg * Authors:     Earle F. Philhower, III
1016747b715Smrg *              Colin Harrison
10205b261ecSmrg */
10305b261ecSmrg/* $XFree86: $ */
10405b261ecSmrg
10505b261ecSmrg#ifdef HAVE_XWIN_CONFIG_H
10605b261ecSmrg#include <xwin-config.h>
10705b261ecSmrg#endif
10805b261ecSmrg#include <stdio.h>
10905b261ecSmrg#include <stdlib.h>
11035c4bbdfSmrg#define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */
11105b261ecSmrg#include <string.h>
11205b261ecSmrg#include "winprefs.h"
11305b261ecSmrg
11405b261ecSmrg/* The following give better error messages in bison at the cost of a few KB */
11505b261ecSmrg#define YYERROR_VERBOSE 1
11605b261ecSmrg
1176747b715Smrg/* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */
1186747b715Smrg#define YYLTYPE_IS_TRIVIAL 1
1196747b715Smrg#define YYENABLE_NLS 0
1206747b715Smrg
12105b261ecSmrg/* The global pref settings */
12205b261ecSmrgWINPREFS pref;
12305b261ecSmrg
12405b261ecSmrg/* The working menu */
12505b261ecSmrgstatic MENUPARSED menu;
12605b261ecSmrg
12705b261ecSmrg/* Functions for parsing the tokens into out structure */
12805b261ecSmrg/* Defined at the end section of this file */
12905b261ecSmrg
13005b261ecSmrgstatic void SetIconDirectory (char *path);
13105b261ecSmrgstatic void SetDefaultIcon (char *fname);
13205b261ecSmrgstatic void SetRootMenu (char *menu);
13305b261ecSmrgstatic void SetDefaultSysMenu (char *menu, int pos);
13405b261ecSmrgstatic void SetTrayIcon (char *fname);
13505b261ecSmrg
13605b261ecSmrgstatic void OpenMenu(char *menuname);
13735c4bbdfSmrgstatic void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param);
13805b261ecSmrgstatic void CloseMenu(void);
13905b261ecSmrg
14005b261ecSmrgstatic void OpenIcons(void);
14105b261ecSmrgstatic void AddIconLine(char *matchstr, char *iconfile);
14205b261ecSmrgstatic void CloseIcons(void);
14305b261ecSmrg
1446747b715Smrgstatic void OpenStyles(void);
1456747b715Smrgstatic void AddStyleLine(char *matchstr, unsigned long style);
1466747b715Smrgstatic void CloseStyles(void);
1476747b715Smrg
14805b261ecSmrgstatic void OpenSysMenu(void);
14905b261ecSmrgstatic void AddSysMenuLine(char *matchstr, char *menuname, int pos);
15005b261ecSmrgstatic void CloseSysMenu(void);
15105b261ecSmrg
15235c4bbdfSmrgstatic int yyerror (const char *s);
15305b261ecSmrg
15405b261ecSmrgextern char *yytext;
15535c4bbdfSmrgextern int yylineno;
15605b261ecSmrgextern int yylex(void);
15705b261ecSmrg
15805b261ecSmrg
159dc61d50dSmrg#line 160 "winprefsyacc.c"
16005b261ecSmrg
1615a7dfde8Smrg# ifndef YY_CAST
1625a7dfde8Smrg#  ifdef __cplusplus
1635a7dfde8Smrg#   define YY_CAST(Type, Val) static_cast<Type> (Val)
1645a7dfde8Smrg#   define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
1655a7dfde8Smrg#  else
1665a7dfde8Smrg#   define YY_CAST(Type, Val) ((Type) (Val))
1675a7dfde8Smrg#   define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
1685a7dfde8Smrg#  endif
1695a7dfde8Smrg# endif
17035c4bbdfSmrg# ifndef YY_NULLPTR
1715a7dfde8Smrg#  if defined __cplusplus
1725a7dfde8Smrg#   if 201103L <= __cplusplus
1735a7dfde8Smrg#    define YY_NULLPTR nullptr
1745a7dfde8Smrg#   else
1755a7dfde8Smrg#    define YY_NULLPTR 0
1765a7dfde8Smrg#   endif
17735c4bbdfSmrg#  else
1785a7dfde8Smrg#   define YY_NULLPTR ((void*)0)
17935c4bbdfSmrg#  endif
18035c4bbdfSmrg# endif
18105b261ecSmrg
1825a7dfde8Smrg/* Use api.header.include to #include this header
1835a7dfde8Smrg   instead of duplicating it here.  */
18435c4bbdfSmrg#ifndef YY_YY_WINPREFSYACC_H_INCLUDED
18535c4bbdfSmrg# define YY_YY_WINPREFSYACC_H_INCLUDED
18635c4bbdfSmrg/* Debug traces.  */
18735c4bbdfSmrg#ifndef YYDEBUG
18835c4bbdfSmrg# define YYDEBUG 0
18935c4bbdfSmrg#endif
19035c4bbdfSmrg#if YYDEBUG
19135c4bbdfSmrgextern int yydebug;
19205b261ecSmrg#endif
19305b261ecSmrg
194dc61d50dSmrg/* Token kinds.  */
1954642e01fSmrg#ifndef YYTOKENTYPE
1964642e01fSmrg# define YYTOKENTYPE
19735c4bbdfSmrg  enum yytokentype
19835c4bbdfSmrg  {
199dc61d50dSmrg    YYEMPTY = -2,
200dc61d50dSmrg    YYEOF = 0,                     /* "end of file"  */
201dc61d50dSmrg    YYerror = 256,                 /* error  */
202dc61d50dSmrg    YYUNDEF = 257,                 /* "invalid token"  */
203dc61d50dSmrg    NEWLINE = 258,                 /* NEWLINE  */
204dc61d50dSmrg    MENU = 259,                    /* MENU  */
205dc61d50dSmrg    LB = 260,                      /* LB  */
206dc61d50dSmrg    RB = 261,                      /* RB  */
207dc61d50dSmrg    ICONDIRECTORY = 262,           /* ICONDIRECTORY  */
208dc61d50dSmrg    DEFAULTICON = 263,             /* DEFAULTICON  */
209dc61d50dSmrg    ICONS = 264,                   /* ICONS  */
210dc61d50dSmrg    STYLES = 265,                  /* STYLES  */
211dc61d50dSmrg    TOPMOST = 266,                 /* TOPMOST  */
212dc61d50dSmrg    MAXIMIZE = 267,                /* MAXIMIZE  */
213dc61d50dSmrg    MINIMIZE = 268,                /* MINIMIZE  */
214dc61d50dSmrg    BOTTOM = 269,                  /* BOTTOM  */
215dc61d50dSmrg    NOTITLE = 270,                 /* NOTITLE  */
216dc61d50dSmrg    OUTLINE = 271,                 /* OUTLINE  */
217dc61d50dSmrg    NOFRAME = 272,                 /* NOFRAME  */
218dc61d50dSmrg    DEFAULTSYSMENU = 273,          /* DEFAULTSYSMENU  */
219dc61d50dSmrg    SYSMENU = 274,                 /* SYSMENU  */
220dc61d50dSmrg    ROOTMENU = 275,                /* ROOTMENU  */
221dc61d50dSmrg    SEPARATOR = 276,               /* SEPARATOR  */
222dc61d50dSmrg    ATSTART = 277,                 /* ATSTART  */
223dc61d50dSmrg    ATEND = 278,                   /* ATEND  */
224dc61d50dSmrg    EXEC = 279,                    /* EXEC  */
225dc61d50dSmrg    ALWAYSONTOP = 280,             /* ALWAYSONTOP  */
226dc61d50dSmrg    DEBUGOUTPUT = 281,             /* "DEBUG"  */
227dc61d50dSmrg    RELOAD = 282,                  /* RELOAD  */
228dc61d50dSmrg    TRAYICON = 283,                /* TRAYICON  */
229dc61d50dSmrg    FORCEEXIT = 284,               /* FORCEEXIT  */
230dc61d50dSmrg    SILENTEXIT = 285,              /* SILENTEXIT  */
231dc61d50dSmrg    STRING = 286                   /* STRING  */
23235c4bbdfSmrg  };
233dc61d50dSmrg  typedef enum yytokentype yytoken_kind_t;
2344642e01fSmrg#endif
235dc61d50dSmrg/* Token kinds.  */
236dc61d50dSmrg#define YYEMPTY -2
237dc61d50dSmrg#define YYEOF 0
238dc61d50dSmrg#define YYerror 256
239dc61d50dSmrg#define YYUNDEF 257
2404642e01fSmrg#define NEWLINE 258
2414642e01fSmrg#define MENU 259
2424642e01fSmrg#define LB 260
2434642e01fSmrg#define RB 261
2444642e01fSmrg#define ICONDIRECTORY 262
2454642e01fSmrg#define DEFAULTICON 263
2464642e01fSmrg#define ICONS 264
2476747b715Smrg#define STYLES 265
2486747b715Smrg#define TOPMOST 266
2496747b715Smrg#define MAXIMIZE 267
2506747b715Smrg#define MINIMIZE 268
2516747b715Smrg#define BOTTOM 269
2526747b715Smrg#define NOTITLE 270
2536747b715Smrg#define OUTLINE 271
2546747b715Smrg#define NOFRAME 272
2556747b715Smrg#define DEFAULTSYSMENU 273
2566747b715Smrg#define SYSMENU 274
2576747b715Smrg#define ROOTMENU 275
2586747b715Smrg#define SEPARATOR 276
2596747b715Smrg#define ATSTART 277
2606747b715Smrg#define ATEND 278
2616747b715Smrg#define EXEC 279
2626747b715Smrg#define ALWAYSONTOP 280
2636747b715Smrg#define DEBUGOUTPUT 281
2646747b715Smrg#define RELOAD 282
2656747b715Smrg#define TRAYICON 283
2666747b715Smrg#define FORCEEXIT 284
2676747b715Smrg#define SILENTEXIT 285
2686747b715Smrg#define STRING 286
2694642e01fSmrg
27035c4bbdfSmrg/* Value type.  */
27105b261ecSmrg#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
27235c4bbdfSmrgunion YYSTYPE
27335c4bbdfSmrg{
2745a7dfde8Smrg#line 90 "winprefsyacc.y"
2754642e01fSmrg
27605b261ecSmrg  char *sVal;
2776747b715Smrg  unsigned long uVal;
27805b261ecSmrg  int iVal;
2794642e01fSmrg
280dc61d50dSmrg#line 281 "winprefsyacc.c"
2814642e01fSmrg
2825a7dfde8Smrg};
28335c4bbdfSmrgtypedef union YYSTYPE YYSTYPE;
2844642e01fSmrg# define YYSTYPE_IS_TRIVIAL 1
28505b261ecSmrg# define YYSTYPE_IS_DECLARED 1
28605b261ecSmrg#endif
28705b261ecSmrg
28805b261ecSmrg
28935c4bbdfSmrgextern YYSTYPE yylval;
29035c4bbdfSmrg
29135c4bbdfSmrgint yyparse (void);
29205b261ecSmrg
29335c4bbdfSmrg#endif /* !YY_YY_WINPREFSYACC_H_INCLUDED  */
294dc61d50dSmrg/* Symbol kind.  */
295dc61d50dSmrgenum yysymbol_kind_t
296dc61d50dSmrg{
297dc61d50dSmrg  YYSYMBOL_YYEMPTY = -2,
298dc61d50dSmrg  YYSYMBOL_YYEOF = 0,                      /* "end of file"  */
299dc61d50dSmrg  YYSYMBOL_YYerror = 1,                    /* error  */
300dc61d50dSmrg  YYSYMBOL_YYUNDEF = 2,                    /* "invalid token"  */
301dc61d50dSmrg  YYSYMBOL_NEWLINE = 3,                    /* NEWLINE  */
302dc61d50dSmrg  YYSYMBOL_MENU = 4,                       /* MENU  */
303dc61d50dSmrg  YYSYMBOL_LB = 5,                         /* LB  */
304dc61d50dSmrg  YYSYMBOL_RB = 6,                         /* RB  */
305dc61d50dSmrg  YYSYMBOL_ICONDIRECTORY = 7,              /* ICONDIRECTORY  */
306dc61d50dSmrg  YYSYMBOL_DEFAULTICON = 8,                /* DEFAULTICON  */
307dc61d50dSmrg  YYSYMBOL_ICONS = 9,                      /* ICONS  */
308dc61d50dSmrg  YYSYMBOL_STYLES = 10,                    /* STYLES  */
309dc61d50dSmrg  YYSYMBOL_TOPMOST = 11,                   /* TOPMOST  */
310dc61d50dSmrg  YYSYMBOL_MAXIMIZE = 12,                  /* MAXIMIZE  */
311dc61d50dSmrg  YYSYMBOL_MINIMIZE = 13,                  /* MINIMIZE  */
312dc61d50dSmrg  YYSYMBOL_BOTTOM = 14,                    /* BOTTOM  */
313dc61d50dSmrg  YYSYMBOL_NOTITLE = 15,                   /* NOTITLE  */
314dc61d50dSmrg  YYSYMBOL_OUTLINE = 16,                   /* OUTLINE  */
315dc61d50dSmrg  YYSYMBOL_NOFRAME = 17,                   /* NOFRAME  */
316dc61d50dSmrg  YYSYMBOL_DEFAULTSYSMENU = 18,            /* DEFAULTSYSMENU  */
317dc61d50dSmrg  YYSYMBOL_SYSMENU = 19,                   /* SYSMENU  */
318dc61d50dSmrg  YYSYMBOL_ROOTMENU = 20,                  /* ROOTMENU  */
319dc61d50dSmrg  YYSYMBOL_SEPARATOR = 21,                 /* SEPARATOR  */
320dc61d50dSmrg  YYSYMBOL_ATSTART = 22,                   /* ATSTART  */
321dc61d50dSmrg  YYSYMBOL_ATEND = 23,                     /* ATEND  */
322dc61d50dSmrg  YYSYMBOL_EXEC = 24,                      /* EXEC  */
323dc61d50dSmrg  YYSYMBOL_ALWAYSONTOP = 25,               /* ALWAYSONTOP  */
324dc61d50dSmrg  YYSYMBOL_DEBUGOUTPUT = 26,               /* "DEBUG"  */
325dc61d50dSmrg  YYSYMBOL_RELOAD = 27,                    /* RELOAD  */
326dc61d50dSmrg  YYSYMBOL_TRAYICON = 28,                  /* TRAYICON  */
327dc61d50dSmrg  YYSYMBOL_FORCEEXIT = 29,                 /* FORCEEXIT  */
328dc61d50dSmrg  YYSYMBOL_SILENTEXIT = 30,                /* SILENTEXIT  */
329dc61d50dSmrg  YYSYMBOL_STRING = 31,                    /* STRING  */
330dc61d50dSmrg  YYSYMBOL_YYACCEPT = 32,                  /* $accept  */
331dc61d50dSmrg  YYSYMBOL_input = 33,                     /* input  */
332dc61d50dSmrg  YYSYMBOL_line = 34,                      /* line  */
333dc61d50dSmrg  YYSYMBOL_newline_or_nada = 35,           /* newline_or_nada  */
334dc61d50dSmrg  YYSYMBOL_command = 36,                   /* command  */
335dc61d50dSmrg  YYSYMBOL_trayicon = 37,                  /* trayicon  */
336dc61d50dSmrg  YYSYMBOL_rootmenu = 38,                  /* rootmenu  */
337dc61d50dSmrg  YYSYMBOL_defaultsysmenu = 39,            /* defaultsysmenu  */
338dc61d50dSmrg  YYSYMBOL_defaulticon = 40,               /* defaulticon  */
339dc61d50dSmrg  YYSYMBOL_icondirectory = 41,             /* icondirectory  */
340dc61d50dSmrg  YYSYMBOL_menuline = 42,                  /* menuline  */
341dc61d50dSmrg  YYSYMBOL_menulist = 43,                  /* menulist  */
342dc61d50dSmrg  YYSYMBOL_menu = 44,                      /* menu  */
343dc61d50dSmrg  YYSYMBOL_45_1 = 45,                      /* $@1  */
344dc61d50dSmrg  YYSYMBOL_iconline = 46,                  /* iconline  */
345dc61d50dSmrg  YYSYMBOL_iconlist = 47,                  /* iconlist  */
346dc61d50dSmrg  YYSYMBOL_icons = 48,                     /* icons  */
347dc61d50dSmrg  YYSYMBOL_49_2 = 49,                      /* $@2  */
348dc61d50dSmrg  YYSYMBOL_group1 = 50,                    /* group1  */
349dc61d50dSmrg  YYSYMBOL_group2 = 51,                    /* group2  */
350dc61d50dSmrg  YYSYMBOL_stylecombo = 52,                /* stylecombo  */
351dc61d50dSmrg  YYSYMBOL_styleline = 53,                 /* styleline  */
352dc61d50dSmrg  YYSYMBOL_stylelist = 54,                 /* stylelist  */
353dc61d50dSmrg  YYSYMBOL_styles = 55,                    /* styles  */
354dc61d50dSmrg  YYSYMBOL_56_3 = 56,                      /* $@3  */
355dc61d50dSmrg  YYSYMBOL_atspot = 57,                    /* atspot  */
356dc61d50dSmrg  YYSYMBOL_sysmenuline = 58,               /* sysmenuline  */
357dc61d50dSmrg  YYSYMBOL_sysmenulist = 59,               /* sysmenulist  */
358dc61d50dSmrg  YYSYMBOL_sysmenu = 60,                   /* sysmenu  */
359dc61d50dSmrg  YYSYMBOL_61_4 = 61,                      /* $@4  */
360dc61d50dSmrg  YYSYMBOL_forceexit = 62,                 /* forceexit  */
361dc61d50dSmrg  YYSYMBOL_silentexit = 63,                /* silentexit  */
362dc61d50dSmrg  YYSYMBOL_debug = 64                      /* debug  */
363dc61d50dSmrg};
364dc61d50dSmrgtypedef enum yysymbol_kind_t yysymbol_kind_t;
365dc61d50dSmrg
36635c4bbdfSmrg
36705b261ecSmrg
36805b261ecSmrg
36905b261ecSmrg#ifdef short
37005b261ecSmrg# undef short
37105b261ecSmrg#endif
37205b261ecSmrg
3735a7dfde8Smrg/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
3745a7dfde8Smrg   <limits.h> and (if available) <stdint.h> are included
3755a7dfde8Smrg   so that the code can choose integer types of a good width.  */
3765a7dfde8Smrg
3775a7dfde8Smrg#ifndef __PTRDIFF_MAX__
3785a7dfde8Smrg# include <limits.h> /* INFRINGES ON USER NAME SPACE */
3795a7dfde8Smrg# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
3805a7dfde8Smrg#  include <stdint.h> /* INFRINGES ON USER NAME SPACE */
3815a7dfde8Smrg#  define YY_STDINT_H
3825a7dfde8Smrg# endif
38305b261ecSmrg#endif
38405b261ecSmrg
3855a7dfde8Smrg/* Narrow types that promote to a signed type and that can represent a
3865a7dfde8Smrg   signed or unsigned integer of at least N bits.  In tables they can
3875a7dfde8Smrg   save space and decrease cache pressure.  Promoting to a signed type
3885a7dfde8Smrg   helps avoid bugs in integer arithmetic.  */
3895a7dfde8Smrg
3905a7dfde8Smrg#ifdef __INT_LEAST8_MAX__
3915a7dfde8Smrgtypedef __INT_LEAST8_TYPE__ yytype_int8;
3925a7dfde8Smrg#elif defined YY_STDINT_H
3935a7dfde8Smrgtypedef int_least8_t yytype_int8;
39405b261ecSmrg#else
39535c4bbdfSmrgtypedef signed char yytype_int8;
39605b261ecSmrg#endif
39705b261ecSmrg
3985a7dfde8Smrg#ifdef __INT_LEAST16_MAX__
3995a7dfde8Smrgtypedef __INT_LEAST16_TYPE__ yytype_int16;
4005a7dfde8Smrg#elif defined YY_STDINT_H
4015a7dfde8Smrgtypedef int_least16_t yytype_int16;
40205b261ecSmrg#else
4035a7dfde8Smrgtypedef short yytype_int16;
40405b261ecSmrg#endif
40505b261ecSmrg
406dc61d50dSmrg/* Work around bug in HP-UX 11.23, which defines these macros
407dc61d50dSmrg   incorrectly for preprocessor constants.  This workaround can likely
408dc61d50dSmrg   be removed in 2023, as HPE has promised support for HP-UX 11.23
409dc61d50dSmrg   (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
410dc61d50dSmrg   <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>.  */
411dc61d50dSmrg#ifdef __hpux
412dc61d50dSmrg# undef UINT_LEAST8_MAX
413dc61d50dSmrg# undef UINT_LEAST16_MAX
414dc61d50dSmrg# define UINT_LEAST8_MAX 255
415dc61d50dSmrg# define UINT_LEAST16_MAX 65535
416dc61d50dSmrg#endif
417dc61d50dSmrg
4185a7dfde8Smrg#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
4195a7dfde8Smrgtypedef __UINT_LEAST8_TYPE__ yytype_uint8;
4205a7dfde8Smrg#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
4215a7dfde8Smrg       && UINT_LEAST8_MAX <= INT_MAX)
4225a7dfde8Smrgtypedef uint_least8_t yytype_uint8;
4235a7dfde8Smrg#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
4245a7dfde8Smrgtypedef unsigned char yytype_uint8;
42505b261ecSmrg#else
4265a7dfde8Smrgtypedef short yytype_uint8;
4275a7dfde8Smrg#endif
4285a7dfde8Smrg
4295a7dfde8Smrg#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
4305a7dfde8Smrgtypedef __UINT_LEAST16_TYPE__ yytype_uint16;
4315a7dfde8Smrg#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
4325a7dfde8Smrg       && UINT_LEAST16_MAX <= INT_MAX)
4335a7dfde8Smrgtypedef uint_least16_t yytype_uint16;
4345a7dfde8Smrg#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
4355a7dfde8Smrgtypedef unsigned short yytype_uint16;
4365a7dfde8Smrg#else
4375a7dfde8Smrgtypedef int yytype_uint16;
4385a7dfde8Smrg#endif
4395a7dfde8Smrg
4405a7dfde8Smrg#ifndef YYPTRDIFF_T
4415a7dfde8Smrg# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
4425a7dfde8Smrg#  define YYPTRDIFF_T __PTRDIFF_TYPE__
4435a7dfde8Smrg#  define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
4445a7dfde8Smrg# elif defined PTRDIFF_MAX
4455a7dfde8Smrg#  ifndef ptrdiff_t
4465a7dfde8Smrg#   include <stddef.h> /* INFRINGES ON USER NAME SPACE */
4475a7dfde8Smrg#  endif
4485a7dfde8Smrg#  define YYPTRDIFF_T ptrdiff_t
4495a7dfde8Smrg#  define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
4505a7dfde8Smrg# else
4515a7dfde8Smrg#  define YYPTRDIFF_T long
4525a7dfde8Smrg#  define YYPTRDIFF_MAXIMUM LONG_MAX
4535a7dfde8Smrg# endif
45405b261ecSmrg#endif
45505b261ecSmrg
45605b261ecSmrg#ifndef YYSIZE_T
45705b261ecSmrg# ifdef __SIZE_TYPE__
45805b261ecSmrg#  define YYSIZE_T __SIZE_TYPE__
45905b261ecSmrg# elif defined size_t
46005b261ecSmrg#  define YYSIZE_T size_t
4615a7dfde8Smrg# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
46205b261ecSmrg#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
46305b261ecSmrg#  define YYSIZE_T size_t
46405b261ecSmrg# else
46525da500fSmrg#  define YYSIZE_T unsigned
46605b261ecSmrg# endif
46705b261ecSmrg#endif
46805b261ecSmrg
4695a7dfde8Smrg#define YYSIZE_MAXIMUM                                  \
4705a7dfde8Smrg  YY_CAST (YYPTRDIFF_T,                                 \
4715a7dfde8Smrg           (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1)  \
4725a7dfde8Smrg            ? YYPTRDIFF_MAXIMUM                         \
4735a7dfde8Smrg            : YY_CAST (YYSIZE_T, -1)))
4745a7dfde8Smrg
4755a7dfde8Smrg#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
4765a7dfde8Smrg
477dc61d50dSmrg
4785a7dfde8Smrg/* Stored state numbers (used for stacks). */
4795a7dfde8Smrgtypedef yytype_int8 yy_state_t;
4805a7dfde8Smrg
4815a7dfde8Smrg/* State numbers in computations.  */
4825a7dfde8Smrgtypedef int yy_state_fast_t;
48305b261ecSmrg
48405b261ecSmrg#ifndef YY_
4856747b715Smrg# if defined YYENABLE_NLS && YYENABLE_NLS
48605b261ecSmrg#  if ENABLE_NLS
48705b261ecSmrg#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
48835c4bbdfSmrg#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
48905b261ecSmrg#  endif
49005b261ecSmrg# endif
49105b261ecSmrg# ifndef YY_
49235c4bbdfSmrg#  define YY_(Msgid) Msgid
49335c4bbdfSmrg# endif
49435c4bbdfSmrg#endif
49535c4bbdfSmrg
496dc61d50dSmrg
49735c4bbdfSmrg#ifndef YY_ATTRIBUTE_PURE
4985a7dfde8Smrg# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
4995a7dfde8Smrg#  define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
5005a7dfde8Smrg# else
5015a7dfde8Smrg#  define YY_ATTRIBUTE_PURE
5025a7dfde8Smrg# endif
50335c4bbdfSmrg#endif
50435c4bbdfSmrg
50535c4bbdfSmrg#ifndef YY_ATTRIBUTE_UNUSED
5065a7dfde8Smrg# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
5075a7dfde8Smrg#  define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
50835c4bbdfSmrg# else
5095a7dfde8Smrg#  define YY_ATTRIBUTE_UNUSED
51005b261ecSmrg# endif
51105b261ecSmrg#endif
51205b261ecSmrg
51305b261ecSmrg/* Suppress unused-variable warnings by "using" E.  */
51405b261ecSmrg#if ! defined lint || defined __GNUC__
515dc61d50dSmrg# define YY_USE(E) ((void) (E))
51605b261ecSmrg#else
517dc61d50dSmrg# define YY_USE(E) /* empty */
51805b261ecSmrg#endif
51905b261ecSmrg
52025da500fSmrg#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
52135c4bbdfSmrg/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
5225a7dfde8Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                            \
5235a7dfde8Smrg    _Pragma ("GCC diagnostic push")                                     \
5245a7dfde8Smrg    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")              \
52535c4bbdfSmrg    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
5265a7dfde8Smrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END      \
52735c4bbdfSmrg    _Pragma ("GCC diagnostic pop")
52805b261ecSmrg#else
52935c4bbdfSmrg# define YY_INITIAL_VALUE(Value) Value
53005b261ecSmrg#endif
53135c4bbdfSmrg#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
53235c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
53335c4bbdfSmrg# define YY_IGNORE_MAYBE_UNINITIALIZED_END
53435c4bbdfSmrg#endif
53535c4bbdfSmrg#ifndef YY_INITIAL_VALUE
53635c4bbdfSmrg# define YY_INITIAL_VALUE(Value) /* Nothing. */
53705b261ecSmrg#endif
53805b261ecSmrg
5395a7dfde8Smrg#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
5405a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_BEGIN                          \
5415a7dfde8Smrg    _Pragma ("GCC diagnostic push")                            \
5425a7dfde8Smrg    _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
5435a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_END            \
5445a7dfde8Smrg    _Pragma ("GCC diagnostic pop")
5455a7dfde8Smrg#endif
5465a7dfde8Smrg#ifndef YY_IGNORE_USELESS_CAST_BEGIN
5475a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_BEGIN
5485a7dfde8Smrg# define YY_IGNORE_USELESS_CAST_END
5495a7dfde8Smrg#endif
5505a7dfde8Smrg
55135c4bbdfSmrg
5525a7dfde8Smrg#define YY_ASSERT(E) ((void) (0 && (E)))
5535a7dfde8Smrg
554dc61d50dSmrg#if !defined yyoverflow
55505b261ecSmrg
55605b261ecSmrg/* The parser invokes alloca or malloc; define the necessary symbols.  */
55705b261ecSmrg
55805b261ecSmrg# ifdef YYSTACK_USE_ALLOCA
55905b261ecSmrg#  if YYSTACK_USE_ALLOCA
56005b261ecSmrg#   ifdef __GNUC__
56105b261ecSmrg#    define YYSTACK_ALLOC __builtin_alloca
56205b261ecSmrg#   elif defined __BUILTIN_VA_ARG_INCR
56305b261ecSmrg#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
56405b261ecSmrg#   elif defined _AIX
56505b261ecSmrg#    define YYSTACK_ALLOC __alloca
56605b261ecSmrg#   elif defined _MSC_VER
56705b261ecSmrg#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
56805b261ecSmrg#    define alloca _alloca
56905b261ecSmrg#   else
57005b261ecSmrg#    define YYSTACK_ALLOC alloca
57135c4bbdfSmrg#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
57205b261ecSmrg#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
57335c4bbdfSmrg      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
5749ace9065Smrg#     ifndef EXIT_SUCCESS
5759ace9065Smrg#      define EXIT_SUCCESS 0
57605b261ecSmrg#     endif
57705b261ecSmrg#    endif
57805b261ecSmrg#   endif
57905b261ecSmrg#  endif
58005b261ecSmrg# endif
58105b261ecSmrg
58205b261ecSmrg# ifdef YYSTACK_ALLOC
58335c4bbdfSmrg   /* Pacify GCC's 'empty if-body' warning.  */
58435c4bbdfSmrg#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
58505b261ecSmrg#  ifndef YYSTACK_ALLOC_MAXIMUM
58605b261ecSmrg    /* The OS might guarantee only one guard page at the bottom of the stack,
58705b261ecSmrg       and a page size can be as small as 4096 bytes.  So we cannot safely
58805b261ecSmrg       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
58905b261ecSmrg       to allow for a few compiler-allocated temporary stack slots.  */
59005b261ecSmrg#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
59105b261ecSmrg#  endif
59205b261ecSmrg# else
59305b261ecSmrg#  define YYSTACK_ALLOC YYMALLOC
59405b261ecSmrg#  define YYSTACK_FREE YYFREE
59505b261ecSmrg#  ifndef YYSTACK_ALLOC_MAXIMUM
59605b261ecSmrg#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
59705b261ecSmrg#  endif
5989ace9065Smrg#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
59905b261ecSmrg       && ! ((defined YYMALLOC || defined malloc) \
60035c4bbdfSmrg             && (defined YYFREE || defined free)))
60105b261ecSmrg#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
6029ace9065Smrg#   ifndef EXIT_SUCCESS
6039ace9065Smrg#    define EXIT_SUCCESS 0
60405b261ecSmrg#   endif
60505b261ecSmrg#  endif
60605b261ecSmrg#  ifndef YYMALLOC
60705b261ecSmrg#   define YYMALLOC malloc
60835c4bbdfSmrg#   if ! defined malloc && ! defined EXIT_SUCCESS
60905b261ecSmrgvoid *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
61005b261ecSmrg#   endif
61105b261ecSmrg#  endif
61205b261ecSmrg#  ifndef YYFREE
61305b261ecSmrg#   define YYFREE free
61435c4bbdfSmrg#   if ! defined free && ! defined EXIT_SUCCESS
61505b261ecSmrgvoid free (void *); /* INFRINGES ON USER NAME SPACE */
61605b261ecSmrg#   endif
61705b261ecSmrg#  endif
61805b261ecSmrg# endif
619dc61d50dSmrg#endif /* !defined yyoverflow */
62005b261ecSmrg
62105b261ecSmrg#if (! defined yyoverflow \
62205b261ecSmrg     && (! defined __cplusplus \
62335c4bbdfSmrg         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
62405b261ecSmrg
62505b261ecSmrg/* A type that is properly aligned for any stack member.  */
62605b261ecSmrgunion yyalloc
62705b261ecSmrg{
6285a7dfde8Smrg  yy_state_t yyss_alloc;
6294642e01fSmrg  YYSTYPE yyvs_alloc;
6304642e01fSmrg};
63105b261ecSmrg
63205b261ecSmrg/* The size of the maximum gap between one aligned stack and the next.  */
6335a7dfde8Smrg# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
63405b261ecSmrg
63505b261ecSmrg/* The size of an array large to enough to hold all stacks, each with
63605b261ecSmrg   N elements.  */
63705b261ecSmrg# define YYSTACK_BYTES(N) \
6385a7dfde8Smrg     ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
63905b261ecSmrg      + YYSTACK_GAP_MAXIMUM)
64005b261ecSmrg
6419ace9065Smrg# define YYCOPY_NEEDED 1
64205b261ecSmrg
64305b261ecSmrg/* Relocate STACK from its old location to the new one.  The
64405b261ecSmrg   local variables YYSIZE and YYSTACKSIZE give the old and new number of
64505b261ecSmrg   elements in the stack, and YYPTR gives the new location of the
64605b261ecSmrg   stack.  Advance YYPTR to a properly aligned location for the next
64705b261ecSmrg   stack.  */
64835c4bbdfSmrg# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
64935c4bbdfSmrg    do                                                                  \
65035c4bbdfSmrg      {                                                                 \
6515a7dfde8Smrg        YYPTRDIFF_T yynewbytes;                                         \
65235c4bbdfSmrg        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
65335c4bbdfSmrg        Stack = &yyptr->Stack_alloc;                                    \
6545a7dfde8Smrg        yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
6555a7dfde8Smrg        yyptr += yynewbytes / YYSIZEOF (*yyptr);                        \
65635c4bbdfSmrg      }                                                                 \
65735c4bbdfSmrg    while (0)
65805b261ecSmrg
65905b261ecSmrg#endif
66005b261ecSmrg
6619ace9065Smrg#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
66235c4bbdfSmrg/* Copy COUNT objects from SRC to DST.  The source and destination do
6639ace9065Smrg   not overlap.  */
6649ace9065Smrg# ifndef YYCOPY
6659ace9065Smrg#  if defined __GNUC__ && 1 < __GNUC__
66635c4bbdfSmrg#   define YYCOPY(Dst, Src, Count) \
6675a7dfde8Smrg      __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
6689ace9065Smrg#  else
66935c4bbdfSmrg#   define YYCOPY(Dst, Src, Count)              \
67035c4bbdfSmrg      do                                        \
67135c4bbdfSmrg        {                                       \
6725a7dfde8Smrg          YYPTRDIFF_T yyi;                      \
67335c4bbdfSmrg          for (yyi = 0; yyi < (Count); yyi++)   \
67435c4bbdfSmrg            (Dst)[yyi] = (Src)[yyi];            \
67535c4bbdfSmrg        }                                       \
67635c4bbdfSmrg      while (0)
6779ace9065Smrg#  endif
6789ace9065Smrg# endif
6799ace9065Smrg#endif /* !YYCOPY_NEEDED */
6809ace9065Smrg
68105b261ecSmrg/* YYFINAL -- State number of the termination state.  */
68205b261ecSmrg#define YYFINAL  2
68305b261ecSmrg/* YYLAST -- Last index in YYTABLE.  */
6846747b715Smrg#define YYLAST   98
68505b261ecSmrg
68605b261ecSmrg/* YYNTOKENS -- Number of terminals.  */
6876747b715Smrg#define YYNTOKENS  32
68805b261ecSmrg/* YYNNTS -- Number of nonterminals.  */
6896747b715Smrg#define YYNNTS  33
69005b261ecSmrg/* YYNRULES -- Number of rules.  */
6916747b715Smrg#define YYNRULES  65
69235c4bbdfSmrg/* YYNSTATES -- Number of states.  */
6936747b715Smrg#define YYNSTATES  121
69405b261ecSmrg
695dc61d50dSmrg/* YYMAXUTOK -- Last valid token kind.  */
6966747b715Smrg#define YYMAXUTOK   286
69705b261ecSmrg
6985a7dfde8Smrg
6995a7dfde8Smrg/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
7005a7dfde8Smrg   as returned by yylex, with out-of-bounds checking.  */
701dc61d50dSmrg#define YYTRANSLATE(YYX)                                \
702dc61d50dSmrg  (0 <= (YYX) && (YYX) <= YYMAXUTOK                     \
703dc61d50dSmrg   ? YY_CAST (yysymbol_kind_t, yytranslate[YYX])        \
704dc61d50dSmrg   : YYSYMBOL_YYUNDEF)
70505b261ecSmrg
70635c4bbdfSmrg/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
7075a7dfde8Smrg   as returned by yylex.  */
7085a7dfde8Smrgstatic const yytype_int8 yytranslate[] =
70905b261ecSmrg{
71005b261ecSmrg       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
71905b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72005b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72505b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72605b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72705b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72805b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
72905b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
73005b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
73105b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
73205b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
73305b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
73405b261ecSmrg       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
73505b261ecSmrg       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
73605b261ecSmrg       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
7376747b715Smrg      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
7386747b715Smrg      25,    26,    27,    28,    29,    30,    31
73905b261ecSmrg};
74005b261ecSmrg
74105b261ecSmrg#if YYDEBUG
74235c4bbdfSmrg  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
74305b261ecSmrgstatic const yytype_uint8 yyrline[] =
74405b261ecSmrg{
74535c4bbdfSmrg       0,   133,   133,   134,   137,   138,   142,   143,   146,   147,
74635c4bbdfSmrg     148,   149,   150,   151,   152,   153,   154,   155,   156,   157,
74735c4bbdfSmrg     160,   163,   166,   169,   172,   175,   176,   177,   178,   179,
74835c4bbdfSmrg     182,   183,   186,   186,   189,   192,   193,   196,   196,   199,
74935c4bbdfSmrg     200,   201,   202,   205,   206,   207,   210,   211,   212,   213,
75035c4bbdfSmrg     216,   219,   220,   223,   223,   226,   227,   228,   231,   234,
75135c4bbdfSmrg     235,   238,   238,   241,   244,   247
75205b261ecSmrg};
75305b261ecSmrg#endif
75405b261ecSmrg
755dc61d50dSmrg/** Accessing symbol of state STATE.  */
756dc61d50dSmrg#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
757dc61d50dSmrg
758dc61d50dSmrg#if YYDEBUG || 0
759dc61d50dSmrg/* The user-facing name of the symbol whose (internal) number is
760dc61d50dSmrg   YYSYMBOL.  No bounds checking.  */
761dc61d50dSmrgstatic const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
762dc61d50dSmrg
76305b261ecSmrg/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
76405b261ecSmrg   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
76505b261ecSmrgstatic const char *const yytname[] =
76605b261ecSmrg{
767dc61d50dSmrg  "\"end of file\"", "error", "\"invalid token\"", "NEWLINE", "MENU",
768dc61d50dSmrg  "LB", "RB", "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST",
769dc61d50dSmrg  "MAXIMIZE", "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME",
770dc61d50dSmrg  "DEFAULTSYSMENU", "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND",
771dc61d50dSmrg  "EXEC", "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT",
7726747b715Smrg  "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada",
7736747b715Smrg  "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon",
7746747b715Smrg  "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline",
7756747b715Smrg  "iconlist", "icons", "$@2", "group1", "group2", "stylecombo",
7766747b715Smrg  "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline",
77735c4bbdfSmrg  "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR
77805b261ecSmrg};
779dc61d50dSmrg
780dc61d50dSmrgstatic const char *
781dc61d50dSmrgyysymbol_name (yysymbol_kind_t yysymbol)
782dc61d50dSmrg{
783dc61d50dSmrg  return yytname[yysymbol];
784dc61d50dSmrg}
78505b261ecSmrg#endif
78605b261ecSmrg
787dc61d50dSmrg#ifdef YYPRINT
78835c4bbdfSmrg/* YYTOKNUM[NUM] -- (External) token number corresponding to the
78935c4bbdfSmrg   (internal) symbol number NUM (which must be that of a token).  */
7905a7dfde8Smrgstatic const yytype_int16 yytoknum[] =
79105b261ecSmrg{
79205b261ecSmrg       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
79305b261ecSmrg     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
7946747b715Smrg     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
7956747b715Smrg     285,   286
79605b261ecSmrg};
797dc61d50dSmrg#endif
79805b261ecSmrg
7995a7dfde8Smrg#define YYPACT_NINF (-47)
80005b261ecSmrg
8015a7dfde8Smrg#define yypact_value_is_default(Yyn) \
8025a7dfde8Smrg  ((Yyn) == YYPACT_NINF)
80305b261ecSmrg
8045a7dfde8Smrg#define YYTABLE_NINF (-1)
80505b261ecSmrg
8065a7dfde8Smrg#define yytable_value_is_error(Yyn) \
80735c4bbdfSmrg  0
80805b261ecSmrg
80935c4bbdfSmrg  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
81035c4bbdfSmrg     STATE-NUM.  */
81105b261ecSmrgstatic const yytype_int8 yypact[] =
81205b261ecSmrg{
8136747b715Smrg     -47,     7,   -47,   -47,    -1,     0,     1,    18,    29,    15,
8146747b715Smrg      42,    17,    19,    20,    46,    50,   -47,   -47,   -47,   -47,
8156747b715Smrg     -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,   -47,
8166747b715Smrg      49,    53,    54,   -47,   -47,     6,    55,    56,    57,    58,
8176747b715Smrg     -47,   -47,   -47,   -47,   -47,    61,    61,   -47,   -47,    62,
8186747b715Smrg     -47,   -47,   -47,   -47,    61,    61,    35,    38,   -47,    61,
8196747b715Smrg     -19,   -47,    39,    35,    66,    27,    38,    67,    43,    72,
8206747b715Smrg      -3,   -19,    70,    74,   -47,   -47,   -47,   -47,   -47,   -47,
8216747b715Smrg     -47,   -47,   -47,     3,    -8,    75,   -47,   -47,    48,    43,
8226747b715Smrg      76,    61,    52,    59,    77,    78,   -47,   -47,    61,   -47,
8236747b715Smrg     -47,    61,     6,   -47,   -47,   -47,    81,    82,    61,    61,
8246747b715Smrg     -47,   -47,    83,    61,    61,   -47,   -47,    61,   -47,   -47,
8256747b715Smrg     -47
82605b261ecSmrg};
82705b261ecSmrg
82835c4bbdfSmrg  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
82935c4bbdfSmrg     Performed when YYTABLE does not specify something else to do.  Zero
83035c4bbdfSmrg     means the default is an error.  */
8315a7dfde8Smrgstatic const yytype_int8 yydefact[] =
83235c4bbdfSmrg{
83335c4bbdfSmrg       2,     0,     1,     4,     0,     0,     0,     0,     0,     0,
83435c4bbdfSmrg       0,     0,     0,     0,     0,     0,     3,     5,    17,    14,
83535c4bbdfSmrg      15,     8,     9,    10,    11,    12,    13,    18,    19,    16,
83635c4bbdfSmrg       0,     0,     0,    37,    53,    55,     0,     0,     0,     0,
83735c4bbdfSmrg      63,    64,    32,    24,    23,     6,     6,    56,    57,     0,
83835c4bbdfSmrg      61,    21,    65,    20,     6,     6,     0,     0,    22,     6,
83935c4bbdfSmrg       0,     7,     0,    35,     0,     0,    51,     0,     0,     0,
84035c4bbdfSmrg       0,    30,     0,     0,    36,    38,    39,    40,    41,    42,
84135c4bbdfSmrg      43,    44,    45,    46,    47,     0,    52,    54,     0,    59,
84235c4bbdfSmrg       0,     6,     0,     0,     0,     0,    31,    33,     6,    48,
84335c4bbdfSmrg      49,     6,    55,    60,    62,    25,     0,     0,     6,     6,
84435c4bbdfSmrg      34,    50,     0,     6,     6,    26,    29,     6,    28,    27,
84535c4bbdfSmrg      58
84635c4bbdfSmrg};
84735c4bbdfSmrg
84835c4bbdfSmrg  /* YYPGOTO[NTERM-NUM].  */
84905b261ecSmrgstatic const yytype_int8 yypgoto[] =
85005b261ecSmrg{
8516747b715Smrg     -47,   -47,   -47,   -46,   -47,   -47,   -47,   -47,   -47,   -47,
8526747b715Smrg     -47,    16,   -47,   -47,   -47,    25,   -47,   -47,     5,     8,
8536747b715Smrg     -47,   -47,    26,   -47,   -47,    -9,   -47,     9,   -47,   -47,
8546747b715Smrg     -47,   -47,   -47
85505b261ecSmrg};
85605b261ecSmrg
85735c4bbdfSmrg  /* YYDEFGOTO[NTERM-NUM].  */
85835c4bbdfSmrgstatic const yytype_int8 yydefgoto[] =
85935c4bbdfSmrg{
860dc61d50dSmrg       0,     1,    16,    56,    17,    18,    19,    20,    21,    22,
86135c4bbdfSmrg      71,    72,    23,    54,    63,    64,    24,    45,    83,    84,
86235c4bbdfSmrg      85,    66,    67,    25,    46,    49,    89,    90,    26,    59,
86335c4bbdfSmrg      27,    28,    29
86435c4bbdfSmrg};
86535c4bbdfSmrg
86635c4bbdfSmrg  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
86735c4bbdfSmrg     positive, shift that token.  If negative, reduce the rule whose
86835c4bbdfSmrg     number is the opposite.  If YYTABLE_NINF, syntax error.  */
8695a7dfde8Smrgstatic const yytype_int8 yytable[] =
87005b261ecSmrg{
8716747b715Smrg      57,    92,    69,    76,    77,    78,    79,     2,    60,    61,
8726747b715Smrg       3,     4,    70,    68,     5,     6,     7,     8,    80,    81,
8736747b715Smrg      82,    93,    94,    33,    95,     9,    10,    11,    47,    48,
8746747b715Smrg      30,    31,    32,    12,    34,    13,    14,    15,    76,    77,
8756747b715Smrg      78,    79,    80,    81,    82,   105,    35,    36,    37,    40,
8766747b715Smrg      38,    39,   110,    41,    42,   111,    43,    44,    50,    51,
8776747b715Smrg      52,    53,   115,   116,    55,    58,    62,   118,   119,    65,
8786747b715Smrg      73,   120,    75,    87,    88,    91,    97,    98,   101,   102,
8796747b715Smrg     108,   109,   104,   106,   113,   114,   117,    96,    74,   100,
8806747b715Smrg     107,    99,    86,   112,     0,     0,     0,     0,   103
88105b261ecSmrg};
88205b261ecSmrg
8836747b715Smrgstatic const yytype_int8 yycheck[] =
88405b261ecSmrg{
8856747b715Smrg      46,     4,    21,    11,    12,    13,    14,     0,    54,    55,
8866747b715Smrg       3,     4,    31,    59,     7,     8,     9,    10,    15,    16,
8876747b715Smrg      17,    24,    25,     5,    27,    18,    19,    20,    22,    23,
8886747b715Smrg      31,    31,    31,    26,     5,    28,    29,    30,    11,    12,
8896747b715Smrg      13,    14,    15,    16,    17,    91,    31,     5,    31,     3,
8906747b715Smrg      31,    31,    98,     3,     5,   101,     3,     3,     3,     3,
8916747b715Smrg       3,     3,   108,   109,     3,     3,    31,   113,   114,    31,
8926747b715Smrg      31,   117,     6,     6,    31,     3,     6,     3,     3,    31,
8936747b715Smrg       3,     3,     6,    31,     3,     3,     3,    71,    63,    84,
8946747b715Smrg      31,    83,    66,   102,    -1,    -1,    -1,    -1,    89
89505b261ecSmrg};
89605b261ecSmrg
89735c4bbdfSmrg  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
89835c4bbdfSmrg     symbol of state STATE-NUM.  */
8995a7dfde8Smrgstatic const yytype_int8 yystos[] =
90005b261ecSmrg{
9016747b715Smrg       0,    33,     0,     3,     4,     7,     8,     9,    10,    18,
9026747b715Smrg      19,    20,    26,    28,    29,    30,    34,    36,    37,    38,
9036747b715Smrg      39,    40,    41,    44,    48,    55,    60,    62,    63,    64,
9046747b715Smrg      31,    31,    31,     5,     5,    31,     5,    31,    31,    31,
9056747b715Smrg       3,     3,     5,     3,     3,    49,    56,    22,    23,    57,
9066747b715Smrg       3,     3,     3,     3,    45,     3,    35,    35,     3,    61,
9076747b715Smrg      35,    35,    31,    46,    47,    31,    53,    54,    35,    21,
9086747b715Smrg      31,    42,    43,    31,    47,     6,    11,    12,    13,    14,
9096747b715Smrg      15,    16,    17,    50,    51,    52,    54,     6,    31,    58,
9106747b715Smrg      59,     3,     4,    24,    25,    27,    43,     6,     3,    51,
9116747b715Smrg      50,     3,    31,    59,     6,    35,    31,    31,     3,     3,
9126747b715Smrg      35,    35,    57,     3,     3,    35,    35,     3,    35,    35,
9136747b715Smrg      35
91405b261ecSmrg};
91505b261ecSmrg
91635c4bbdfSmrg  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
9175a7dfde8Smrgstatic const yytype_int8 yyr1[] =
91835c4bbdfSmrg{
91935c4bbdfSmrg       0,    32,    33,    33,    34,    34,    35,    35,    36,    36,
92035c4bbdfSmrg      36,    36,    36,    36,    36,    36,    36,    36,    36,    36,
92135c4bbdfSmrg      37,    38,    39,    40,    41,    42,    42,    42,    42,    42,
92235c4bbdfSmrg      43,    43,    45,    44,    46,    47,    47,    49,    48,    50,
92335c4bbdfSmrg      50,    50,    50,    51,    51,    51,    52,    52,    52,    52,
92435c4bbdfSmrg      53,    54,    54,    56,    55,    57,    57,    57,    58,    59,
92535c4bbdfSmrg      59,    61,    60,    62,    63,    64
92635c4bbdfSmrg};
92705b261ecSmrg
92835c4bbdfSmrg  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
9295a7dfde8Smrgstatic const yytype_int8 yyr2[] =
93035c4bbdfSmrg{
93135c4bbdfSmrg       0,     2,     0,     2,     1,     1,     0,     2,     1,     1,
93235c4bbdfSmrg       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
93335c4bbdfSmrg       3,     3,     4,     3,     3,     3,     4,     5,     5,     4,
93435c4bbdfSmrg       1,     2,     0,     7,     4,     1,     2,     0,     6,     1,
93535c4bbdfSmrg       1,     1,     1,     1,     1,     1,     1,     1,     2,     2,
93635c4bbdfSmrg       4,     1,     2,     0,     6,     0,     1,     1,     5,     1,
93735c4bbdfSmrg       2,     0,     7,     2,     2,     3
93835c4bbdfSmrg};
93905b261ecSmrg
94005b261ecSmrg
941dc61d50dSmrgenum { YYENOMEM = -2 };
942dc61d50dSmrg
94335c4bbdfSmrg#define yyerrok         (yyerrstatus = 0)
94435c4bbdfSmrg#define yyclearin       (yychar = YYEMPTY)
94505b261ecSmrg
94635c4bbdfSmrg#define YYACCEPT        goto yyacceptlab
94735c4bbdfSmrg#define YYABORT         goto yyabortlab
94835c4bbdfSmrg#define YYERROR         goto yyerrorlab
94905b261ecSmrg
95005b261ecSmrg
95135c4bbdfSmrg#define YYRECOVERING()  (!!yyerrstatus)
95235c4bbdfSmrg
9535a7dfde8Smrg#define YYBACKUP(Token, Value)                                    \
9545a7dfde8Smrg  do                                                              \
9555a7dfde8Smrg    if (yychar == YYEMPTY)                                        \
9565a7dfde8Smrg      {                                                           \
9575a7dfde8Smrg        yychar = (Token);                                         \
9585a7dfde8Smrg        yylval = (Value);                                         \
9595a7dfde8Smrg        YYPOPSTACK (yylen);                                       \
9605a7dfde8Smrg        yystate = *yyssp;                                         \
9615a7dfde8Smrg        goto yybackup;                                            \
9625a7dfde8Smrg      }                                                           \
9635a7dfde8Smrg    else                                                          \
9645a7dfde8Smrg      {                                                           \
9655a7dfde8Smrg        yyerror (YY_("syntax error: cannot back up")); \
9665a7dfde8Smrg        YYERROR;                                                  \
9675a7dfde8Smrg      }                                                           \
9685a7dfde8Smrg  while (0)
9695a7dfde8Smrg
970dc61d50dSmrg/* Backward compatibility with an undocumented macro.
971dc61d50dSmrg   Use YYerror or YYUNDEF. */
972dc61d50dSmrg#define YYERRCODE YYUNDEF
97305b261ecSmrg
97405b261ecSmrg
97505b261ecSmrg/* Enable debugging if requested.  */
97605b261ecSmrg#if YYDEBUG
97705b261ecSmrg
97805b261ecSmrg# ifndef YYFPRINTF
97905b261ecSmrg#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
98005b261ecSmrg#  define YYFPRINTF fprintf
98105b261ecSmrg# endif
98205b261ecSmrg
98335c4bbdfSmrg# define YYDPRINTF(Args)                        \
98435c4bbdfSmrgdo {                                            \
98535c4bbdfSmrg  if (yydebug)                                  \
98635c4bbdfSmrg    YYFPRINTF Args;                             \
98735c4bbdfSmrg} while (0)
98805b261ecSmrg
98935c4bbdfSmrg/* This macro is provided for backward compatibility. */
990dc61d50dSmrg# ifndef YY_LOCATION_PRINT
991dc61d50dSmrg#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
992dc61d50dSmrg# endif
99305b261ecSmrg
99405b261ecSmrg
995dc61d50dSmrg# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)                    \
99635c4bbdfSmrgdo {                                                                      \
99735c4bbdfSmrg  if (yydebug)                                                            \
99835c4bbdfSmrg    {                                                                     \
99935c4bbdfSmrg      YYFPRINTF (stderr, "%s ", Title);                                   \
100035c4bbdfSmrg      yy_symbol_print (stderr,                                            \
1001dc61d50dSmrg                  Kind, Value); \
100235c4bbdfSmrg      YYFPRINTF (stderr, "\n");                                           \
100335c4bbdfSmrg    }                                                                     \
100435c4bbdfSmrg} while (0)
100535c4bbdfSmrg
100635c4bbdfSmrg
10075a7dfde8Smrg/*-----------------------------------.
10085a7dfde8Smrg| Print this symbol's value on YYO.  |
10095a7dfde8Smrg`-----------------------------------*/
101005b261ecSmrg
101105b261ecSmrgstatic void
1012dc61d50dSmrgyy_symbol_value_print (FILE *yyo,
1013dc61d50dSmrg                       yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
101405b261ecSmrg{
10155a7dfde8Smrg  FILE *yyoutput = yyo;
1016dc61d50dSmrg  YY_USE (yyoutput);
101705b261ecSmrg  if (!yyvaluep)
101805b261ecSmrg    return;
101905b261ecSmrg# ifdef YYPRINT
1020dc61d50dSmrg  if (yykind < YYNTOKENS)
1021dc61d50dSmrg    YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
102205b261ecSmrg# endif
10235a7dfde8Smrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1024dc61d50dSmrg  YY_USE (yykind);
10255a7dfde8Smrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
102605b261ecSmrg}
102705b261ecSmrg
102805b261ecSmrg
10295a7dfde8Smrg/*---------------------------.
10305a7dfde8Smrg| Print this symbol on YYO.  |
10315a7dfde8Smrg`---------------------------*/
103205b261ecSmrg
103305b261ecSmrgstatic void
1034dc61d50dSmrgyy_symbol_print (FILE *yyo,
1035dc61d50dSmrg                 yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
103605b261ecSmrg{
10375a7dfde8Smrg  YYFPRINTF (yyo, "%s %s (",
1038dc61d50dSmrg             yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
103905b261ecSmrg
1040dc61d50dSmrg  yy_symbol_value_print (yyo, yykind, yyvaluep);
10415a7dfde8Smrg  YYFPRINTF (yyo, ")");
104205b261ecSmrg}
104305b261ecSmrg
104405b261ecSmrg/*------------------------------------------------------------------.
104505b261ecSmrg| yy_stack_print -- Print the state stack from its BOTTOM up to its |
104605b261ecSmrg| TOP (included).                                                   |
104705b261ecSmrg`------------------------------------------------------------------*/
104805b261ecSmrg
104905b261ecSmrgstatic void
10505a7dfde8Smrgyy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
105105b261ecSmrg{
105205b261ecSmrg  YYFPRINTF (stderr, "Stack now");
10534642e01fSmrg  for (; yybottom <= yytop; yybottom++)
10544642e01fSmrg    {
10554642e01fSmrg      int yybot = *yybottom;
10564642e01fSmrg      YYFPRINTF (stderr, " %d", yybot);
10574642e01fSmrg    }
105805b261ecSmrg  YYFPRINTF (stderr, "\n");
105905b261ecSmrg}
106005b261ecSmrg
106135c4bbdfSmrg# define YY_STACK_PRINT(Bottom, Top)                            \
106235c4bbdfSmrgdo {                                                            \
106335c4bbdfSmrg  if (yydebug)                                                  \
106435c4bbdfSmrg    yy_stack_print ((Bottom), (Top));                           \
106535c4bbdfSmrg} while (0)
106605b261ecSmrg
106705b261ecSmrg
106805b261ecSmrg/*------------------------------------------------.
106905b261ecSmrg| Report that the YYRULE is going to be reduced.  |
107005b261ecSmrg`------------------------------------------------*/
107105b261ecSmrg
107205b261ecSmrgstatic void
1073dc61d50dSmrgyy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1074dc61d50dSmrg                 int yyrule)
107505b261ecSmrg{
10765a7dfde8Smrg  int yylno = yyrline[yyrule];
107705b261ecSmrg  int yynrhs = yyr2[yyrule];
107805b261ecSmrg  int yyi;
10795a7dfde8Smrg  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
108035c4bbdfSmrg             yyrule - 1, yylno);
108105b261ecSmrg  /* The symbols being reduced.  */
108205b261ecSmrg  for (yyi = 0; yyi < yynrhs; yyi++)
108305b261ecSmrg    {
10844642e01fSmrg      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
108535c4bbdfSmrg      yy_symbol_print (stderr,
1086dc61d50dSmrg                       YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1087dc61d50dSmrg                       &yyvsp[(yyi + 1) - (yynrhs)]);
10884642e01fSmrg      YYFPRINTF (stderr, "\n");
108905b261ecSmrg    }
109005b261ecSmrg}
109105b261ecSmrg
109235c4bbdfSmrg# define YY_REDUCE_PRINT(Rule)          \
109335c4bbdfSmrgdo {                                    \
109435c4bbdfSmrg  if (yydebug)                          \
109535c4bbdfSmrg    yy_reduce_print (yyssp, yyvsp, Rule); \
109635c4bbdfSmrg} while (0)
109705b261ecSmrg
109805b261ecSmrg/* Nonzero means print parse trace.  It is left uninitialized so that
109905b261ecSmrg   multiple parsers can coexist.  */
110005b261ecSmrgint yydebug;
110105b261ecSmrg#else /* !YYDEBUG */
1102dc61d50dSmrg# define YYDPRINTF(Args) ((void) 0)
1103dc61d50dSmrg# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
110405b261ecSmrg# define YY_STACK_PRINT(Bottom, Top)
110505b261ecSmrg# define YY_REDUCE_PRINT(Rule)
110605b261ecSmrg#endif /* !YYDEBUG */
110705b261ecSmrg
110805b261ecSmrg
110905b261ecSmrg/* YYINITDEPTH -- initial size of the parser's stacks.  */
111035c4bbdfSmrg#ifndef YYINITDEPTH
111105b261ecSmrg# define YYINITDEPTH 200
111205b261ecSmrg#endif
111305b261ecSmrg
111405b261ecSmrg/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
111505b261ecSmrg   if the built-in stack extension method is used).
111605b261ecSmrg
111705b261ecSmrg   Do not make this value too large; the results are undefined if
111805b261ecSmrg   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
111905b261ecSmrg   evaluated with infinite-precision integer arithmetic.  */
112005b261ecSmrg
112105b261ecSmrg#ifndef YYMAXDEPTH
112205b261ecSmrg# define YYMAXDEPTH 10000
112305b261ecSmrg#endif
112405b261ecSmrg
112505b261ecSmrg
112605b261ecSmrg
112705b261ecSmrg
112805b261ecSmrg
112905b261ecSmrg
113005b261ecSmrg/*-----------------------------------------------.
113105b261ecSmrg| Release the memory associated to this symbol.  |
113205b261ecSmrg`-----------------------------------------------*/
113305b261ecSmrg
113405b261ecSmrgstatic void
1135dc61d50dSmrgyydestruct (const char *yymsg,
1136dc61d50dSmrg            yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
113705b261ecSmrg{
1138dc61d50dSmrg  YY_USE (yyvaluep);
113905b261ecSmrg  if (!yymsg)
114005b261ecSmrg    yymsg = "Deleting";
1141dc61d50dSmrg  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
114205b261ecSmrg
114335c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1144dc61d50dSmrg  YY_USE (yykind);
114535c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
114605b261ecSmrg}
114705b261ecSmrg
11489ace9065Smrg
1149dc61d50dSmrg/* Lookahead token kind.  */
115005b261ecSmrgint yychar;
115105b261ecSmrg
11524642e01fSmrg/* The semantic value of the lookahead symbol.  */
115305b261ecSmrgYYSTYPE yylval;
115405b261ecSmrg/* Number of syntax errors so far.  */
115505b261ecSmrgint yynerrs;
115605b261ecSmrg
115705b261ecSmrg
1158dc61d50dSmrg
1159dc61d50dSmrg
11609ace9065Smrg/*----------.
11619ace9065Smrg| yyparse.  |
11629ace9065Smrg`----------*/
116305b261ecSmrg
116405b261ecSmrgint
116505b261ecSmrgyyparse (void)
116605b261ecSmrg{
1167dc61d50dSmrg    yy_state_fast_t yystate = 0;
11684642e01fSmrg    /* Number of tokens to shift before error messages enabled.  */
1169dc61d50dSmrg    int yyerrstatus = 0;
117005b261ecSmrg
1171dc61d50dSmrg    /* Refer to the stacks through separate pointers, to allow yyoverflow
1172ed6184dfSmrg       to reallocate them elsewhere.  */
117305b261ecSmrg
1174dc61d50dSmrg    /* Their size.  */
1175dc61d50dSmrg    YYPTRDIFF_T yystacksize = YYINITDEPTH;
1176dc61d50dSmrg
1177dc61d50dSmrg    /* The state stack: array, bottom, top.  */
11785a7dfde8Smrg    yy_state_t yyssa[YYINITDEPTH];
1179dc61d50dSmrg    yy_state_t *yyss = yyssa;
1180dc61d50dSmrg    yy_state_t *yyssp = yyss;
118105b261ecSmrg
1182dc61d50dSmrg    /* The semantic value stack: array, bottom, top.  */
11835a7dfde8Smrg    YYSTYPE yyvsa[YYINITDEPTH];
1184dc61d50dSmrg    YYSTYPE *yyvs = yyvsa;
1185dc61d50dSmrg    YYSTYPE *yyvsp = yyvs;
118605b261ecSmrg
11874642e01fSmrg  int yyn;
1188dc61d50dSmrg  /* The return value of yyparse.  */
11894642e01fSmrg  int yyresult;
1190dc61d50dSmrg  /* Lookahead symbol kind.  */
1191dc61d50dSmrg  yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
119205b261ecSmrg  /* The variables used to return semantic value and location from the
119305b261ecSmrg     action routines.  */
119405b261ecSmrg  YYSTYPE yyval;
119505b261ecSmrg
1196dc61d50dSmrg
11974642e01fSmrg
11984642e01fSmrg#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
119905b261ecSmrg
120005b261ecSmrg  /* The number of symbols on the RHS of the reduced rule.
120105b261ecSmrg     Keep to zero when no symbol should be popped.  */
120205b261ecSmrg  int yylen = 0;
120305b261ecSmrg
120405b261ecSmrg  YYDPRINTF ((stderr, "Starting parse\n"));
120505b261ecSmrg
12064642e01fSmrg  yychar = YYEMPTY; /* Cause a token to be read.  */
120705b261ecSmrg  goto yysetstate;
120805b261ecSmrg
12095a7dfde8Smrg
121005b261ecSmrg/*------------------------------------------------------------.
12115a7dfde8Smrg| yynewstate -- push a new state, which is found in yystate.  |
121205b261ecSmrg`------------------------------------------------------------*/
12135a7dfde8Smrgyynewstate:
121405b261ecSmrg  /* In all cases, when you get here, the value and location stacks
121505b261ecSmrg     have just been pushed.  So pushing a state here evens the stacks.  */
121605b261ecSmrg  yyssp++;
121705b261ecSmrg
12185a7dfde8Smrg
12195a7dfde8Smrg/*--------------------------------------------------------------------.
12205a7dfde8Smrg| yysetstate -- set current state (the top of the stack) to yystate.  |
12215a7dfde8Smrg`--------------------------------------------------------------------*/
12225a7dfde8Smrgyysetstate:
12235a7dfde8Smrg  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
12245a7dfde8Smrg  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
12255a7dfde8Smrg  YY_IGNORE_USELESS_CAST_BEGIN
12265a7dfde8Smrg  *yyssp = YY_CAST (yy_state_t, yystate);
12275a7dfde8Smrg  YY_IGNORE_USELESS_CAST_END
1228dc61d50dSmrg  YY_STACK_PRINT (yyss, yyssp);
122905b261ecSmrg
123005b261ecSmrg  if (yyss + yystacksize - 1 <= yyssp)
12315a7dfde8Smrg#if !defined yyoverflow && !defined YYSTACK_RELOCATE
12325a7dfde8Smrg    goto yyexhaustedlab;
12335a7dfde8Smrg#else
123405b261ecSmrg    {
123505b261ecSmrg      /* Get the current used size of the three stacks, in elements.  */
12365a7dfde8Smrg      YYPTRDIFF_T yysize = yyssp - yyss + 1;
123705b261ecSmrg
12385a7dfde8Smrg# if defined yyoverflow
123905b261ecSmrg      {
124035c4bbdfSmrg        /* Give user a chance to reallocate the stack.  Use copies of
124135c4bbdfSmrg           these so that the &'s don't force the real ones into
124235c4bbdfSmrg           memory.  */
12435a7dfde8Smrg        yy_state_t *yyss1 = yyss;
124435c4bbdfSmrg        YYSTYPE *yyvs1 = yyvs;
124535c4bbdfSmrg
124635c4bbdfSmrg        /* Each stack pointer address is followed by the size of the
124735c4bbdfSmrg           data in use in that stack, in bytes.  This used to be a
124835c4bbdfSmrg           conditional around just the two extra args, but that might
124935c4bbdfSmrg           be undefined if yyoverflow is a macro.  */
125035c4bbdfSmrg        yyoverflow (YY_("memory exhausted"),
12515a7dfde8Smrg                    &yyss1, yysize * YYSIZEOF (*yyssp),
12525a7dfde8Smrg                    &yyvs1, yysize * YYSIZEOF (*yyvsp),
125335c4bbdfSmrg                    &yystacksize);
125435c4bbdfSmrg        yyss = yyss1;
125535c4bbdfSmrg        yyvs = yyvs1;
125605b261ecSmrg      }
12575a7dfde8Smrg# else /* defined YYSTACK_RELOCATE */
125805b261ecSmrg      /* Extend the stack our own way.  */
125905b261ecSmrg      if (YYMAXDEPTH <= yystacksize)
126035c4bbdfSmrg        goto yyexhaustedlab;
126105b261ecSmrg      yystacksize *= 2;
126205b261ecSmrg      if (YYMAXDEPTH < yystacksize)
126335c4bbdfSmrg        yystacksize = YYMAXDEPTH;
126405b261ecSmrg
126505b261ecSmrg      {
12665a7dfde8Smrg        yy_state_t *yyss1 = yyss;
126735c4bbdfSmrg        union yyalloc *yyptr =
12685a7dfde8Smrg          YY_CAST (union yyalloc *,
12695a7dfde8Smrg                   YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
127035c4bbdfSmrg        if (! yyptr)
127135c4bbdfSmrg          goto yyexhaustedlab;
127235c4bbdfSmrg        YYSTACK_RELOCATE (yyss_alloc, yyss);
127335c4bbdfSmrg        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1274dc61d50dSmrg#  undef YYSTACK_RELOCATE
127535c4bbdfSmrg        if (yyss1 != yyssa)
127635c4bbdfSmrg          YYSTACK_FREE (yyss1);
127705b261ecSmrg      }
127805b261ecSmrg# endif
127905b261ecSmrg
128005b261ecSmrg      yyssp = yyss + yysize - 1;
128105b261ecSmrg      yyvsp = yyvs + yysize - 1;
128205b261ecSmrg
12835a7dfde8Smrg      YY_IGNORE_USELESS_CAST_BEGIN
12845a7dfde8Smrg      YYDPRINTF ((stderr, "Stack size increased to %ld\n",
12855a7dfde8Smrg                  YY_CAST (long, yystacksize)));
12865a7dfde8Smrg      YY_IGNORE_USELESS_CAST_END
128705b261ecSmrg
128805b261ecSmrg      if (yyss + yystacksize - 1 <= yyssp)
128935c4bbdfSmrg        YYABORT;
129005b261ecSmrg    }
12915a7dfde8Smrg#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
129205b261ecSmrg
12934642e01fSmrg  if (yystate == YYFINAL)
12944642e01fSmrg    YYACCEPT;
12954642e01fSmrg
129605b261ecSmrg  goto yybackup;
129705b261ecSmrg
12985a7dfde8Smrg
129905b261ecSmrg/*-----------.
130005b261ecSmrg| yybackup.  |
130105b261ecSmrg`-----------*/
130205b261ecSmrgyybackup:
130305b261ecSmrg  /* Do appropriate processing given the current state.  Read a
13044642e01fSmrg     lookahead token if we need one and don't already have one.  */
130505b261ecSmrg
13064642e01fSmrg  /* First try to decide what to do without reference to lookahead token.  */
130705b261ecSmrg  yyn = yypact[yystate];
13089ace9065Smrg  if (yypact_value_is_default (yyn))
130905b261ecSmrg    goto yydefault;
131005b261ecSmrg
13114642e01fSmrg  /* Not known => get a lookahead token if don't already have one.  */
131205b261ecSmrg
1313dc61d50dSmrg  /* YYCHAR is either empty, or end-of-input, or a valid lookahead.  */
131405b261ecSmrg  if (yychar == YYEMPTY)
131505b261ecSmrg    {
1316dc61d50dSmrg      YYDPRINTF ((stderr, "Reading a token\n"));
131735c4bbdfSmrg      yychar = yylex ();
131805b261ecSmrg    }
131905b261ecSmrg
132005b261ecSmrg  if (yychar <= YYEOF)
132105b261ecSmrg    {
1322dc61d50dSmrg      yychar = YYEOF;
1323dc61d50dSmrg      yytoken = YYSYMBOL_YYEOF;
132405b261ecSmrg      YYDPRINTF ((stderr, "Now at end of input.\n"));
132505b261ecSmrg    }
1326dc61d50dSmrg  else if (yychar == YYerror)
1327dc61d50dSmrg    {
1328dc61d50dSmrg      /* The scanner already issued an error message, process directly
1329dc61d50dSmrg         to error recovery.  But do not keep the error token as
1330dc61d50dSmrg         lookahead, it is too special and may lead us to an endless
1331dc61d50dSmrg         loop in error recovery. */
1332dc61d50dSmrg      yychar = YYUNDEF;
1333dc61d50dSmrg      yytoken = YYSYMBOL_YYerror;
1334dc61d50dSmrg      goto yyerrlab1;
1335dc61d50dSmrg    }
133605b261ecSmrg  else
133705b261ecSmrg    {
133805b261ecSmrg      yytoken = YYTRANSLATE (yychar);
133905b261ecSmrg      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
134005b261ecSmrg    }
134105b261ecSmrg
134205b261ecSmrg  /* If the proper action on seeing token YYTOKEN is to reduce or to
134305b261ecSmrg     detect an error, take that action.  */
134405b261ecSmrg  yyn += yytoken;
134505b261ecSmrg  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
134605b261ecSmrg    goto yydefault;
134705b261ecSmrg  yyn = yytable[yyn];
134805b261ecSmrg  if (yyn <= 0)
134905b261ecSmrg    {
13509ace9065Smrg      if (yytable_value_is_error (yyn))
13519ace9065Smrg        goto yyerrlab;
135205b261ecSmrg      yyn = -yyn;
135305b261ecSmrg      goto yyreduce;
135405b261ecSmrg    }
135505b261ecSmrg
135605b261ecSmrg  /* Count tokens shifted since error; after three, turn off error
135705b261ecSmrg     status.  */
135805b261ecSmrg  if (yyerrstatus)
135905b261ecSmrg    yyerrstatus--;
136005b261ecSmrg
13614642e01fSmrg  /* Shift the lookahead token.  */
136205b261ecSmrg  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
136305b261ecSmrg  yystate = yyn;
136435c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
136505b261ecSmrg  *++yyvsp = yylval;
136635c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
136705b261ecSmrg
13685a7dfde8Smrg  /* Discard the shifted token.  */
13695a7dfde8Smrg  yychar = YYEMPTY;
137005b261ecSmrg  goto yynewstate;
137105b261ecSmrg
137205b261ecSmrg
137305b261ecSmrg/*-----------------------------------------------------------.
137405b261ecSmrg| yydefault -- do the default action for the current state.  |
137505b261ecSmrg`-----------------------------------------------------------*/
137605b261ecSmrgyydefault:
137705b261ecSmrg  yyn = yydefact[yystate];
137805b261ecSmrg  if (yyn == 0)
137905b261ecSmrg    goto yyerrlab;
138005b261ecSmrg  goto yyreduce;
138105b261ecSmrg
138205b261ecSmrg
138305b261ecSmrg/*-----------------------------.
13845a7dfde8Smrg| yyreduce -- do a reduction.  |
138505b261ecSmrg`-----------------------------*/
138605b261ecSmrgyyreduce:
138705b261ecSmrg  /* yyn is the number of a rule to reduce with.  */
138805b261ecSmrg  yylen = yyr2[yyn];
138905b261ecSmrg
139005b261ecSmrg  /* If YYLEN is nonzero, implement the default value of the action:
139135c4bbdfSmrg     '$$ = $1'.
139205b261ecSmrg
139305b261ecSmrg     Otherwise, the following line sets YYVAL to garbage.
139405b261ecSmrg     This behavior is undocumented and Bison
139505b261ecSmrg     users should not rely upon it.  Assigning to YYVAL
139605b261ecSmrg     unconditionally makes the parser a bit smaller, and it avoids a
139705b261ecSmrg     GCC warning that YYVAL may be used uninitialized.  */
139805b261ecSmrg  yyval = yyvsp[1-yylen];
139905b261ecSmrg
140005b261ecSmrg
140105b261ecSmrg  YY_REDUCE_PRINT (yyn);
140205b261ecSmrg  switch (yyn)
140305b261ecSmrg    {
1404dc61d50dSmrg  case 20: /* trayicon: TRAYICON STRING NEWLINE  */
14055a7dfde8Smrg#line 160 "winprefsyacc.y"
14065a7dfde8Smrg                                        { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1407dc61d50dSmrg#line 1408 "winprefsyacc.c"
140805b261ecSmrg    break;
140905b261ecSmrg
1410dc61d50dSmrg  case 21: /* rootmenu: ROOTMENU STRING NEWLINE  */
14115a7dfde8Smrg#line 163 "winprefsyacc.y"
14125a7dfde8Smrg                                        { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1413dc61d50dSmrg#line 1414 "winprefsyacc.c"
141405b261ecSmrg    break;
141505b261ecSmrg
1416dc61d50dSmrg  case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE  */
14175a7dfde8Smrg#line 166 "winprefsyacc.y"
14185a7dfde8Smrg                                                     { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); }
1419dc61d50dSmrg#line 1420 "winprefsyacc.c"
142005b261ecSmrg    break;
142105b261ecSmrg
1422dc61d50dSmrg  case 23: /* defaulticon: DEFAULTICON STRING NEWLINE  */
14235a7dfde8Smrg#line 169 "winprefsyacc.y"
14245a7dfde8Smrg                                           { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1425dc61d50dSmrg#line 1426 "winprefsyacc.c"
142605b261ecSmrg    break;
142705b261ecSmrg
1428dc61d50dSmrg  case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE  */
14295a7dfde8Smrg#line 172 "winprefsyacc.y"
14305a7dfde8Smrg                                             { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1431dc61d50dSmrg#line 1432 "winprefsyacc.c"
143205b261ecSmrg    break;
143305b261ecSmrg
1434dc61d50dSmrg  case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada  */
14355a7dfde8Smrg#line 175 "winprefsyacc.y"
14365a7dfde8Smrg                                                   { AddMenuLine("-", CMD_SEPARATOR, ""); }
1437dc61d50dSmrg#line 1438 "winprefsyacc.c"
143805b261ecSmrg    break;
143905b261ecSmrg
1440dc61d50dSmrg  case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada  */
14415a7dfde8Smrg#line 176 "winprefsyacc.y"
14425a7dfde8Smrg                                                      { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); }
1443dc61d50dSmrg#line 1444 "winprefsyacc.c"
144405b261ecSmrg    break;
144505b261ecSmrg
1446dc61d50dSmrg  case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada  */
14475a7dfde8Smrg#line 177 "winprefsyacc.y"
14485a7dfde8Smrg                                                      { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
1449dc61d50dSmrg#line 1450 "winprefsyacc.c"
145005b261ecSmrg    break;
145105b261ecSmrg
1452dc61d50dSmrg  case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada  */
14535a7dfde8Smrg#line 178 "winprefsyacc.y"
14545a7dfde8Smrg                                                      { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); }
1455dc61d50dSmrg#line 1456 "winprefsyacc.c"
145605b261ecSmrg    break;
145705b261ecSmrg
1458dc61d50dSmrg  case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada  */
14595a7dfde8Smrg#line 179 "winprefsyacc.y"
14605a7dfde8Smrg                                                 { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); }
1461dc61d50dSmrg#line 1462 "winprefsyacc.c"
146205b261ecSmrg    break;
146305b261ecSmrg
1464dc61d50dSmrg  case 32: /* $@1: %empty  */
14655a7dfde8Smrg#line 186 "winprefsyacc.y"
14665a7dfde8Smrg                       { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1467dc61d50dSmrg#line 1468 "winprefsyacc.c"
146805b261ecSmrg    break;
146905b261ecSmrg
1470dc61d50dSmrg  case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB  */
14715a7dfde8Smrg#line 186 "winprefsyacc.y"
14725a7dfde8Smrg                                                                               {CloseMenu();}
1473dc61d50dSmrg#line 1474 "winprefsyacc.c"
147405b261ecSmrg    break;
147505b261ecSmrg
1476dc61d50dSmrg  case 34: /* iconline: STRING STRING NEWLINE newline_or_nada  */
14775a7dfde8Smrg#line 189 "winprefsyacc.y"
14785a7dfde8Smrg                                                      { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); }
1479dc61d50dSmrg#line 1480 "winprefsyacc.c"
148005b261ecSmrg    break;
148105b261ecSmrg
1482dc61d50dSmrg  case 37: /* $@2: %empty  */
14835a7dfde8Smrg#line 196 "winprefsyacc.y"
14845a7dfde8Smrg                 {OpenIcons();}
1485dc61d50dSmrg#line 1486 "winprefsyacc.c"
148605b261ecSmrg    break;
148705b261ecSmrg
1488dc61d50dSmrg  case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB  */
14895a7dfde8Smrg#line 196 "winprefsyacc.y"
14905a7dfde8Smrg                                                            {CloseIcons();}
1491dc61d50dSmrg#line 1492 "winprefsyacc.c"
149205b261ecSmrg    break;
149305b261ecSmrg
1494dc61d50dSmrg  case 39: /* group1: TOPMOST  */
14955a7dfde8Smrg#line 199 "winprefsyacc.y"
14965a7dfde8Smrg                { (yyval.uVal)=STYLE_TOPMOST; }
1497dc61d50dSmrg#line 1498 "winprefsyacc.c"
14986747b715Smrg    break;
14996747b715Smrg
1500dc61d50dSmrg  case 40: /* group1: MAXIMIZE  */
15015a7dfde8Smrg#line 200 "winprefsyacc.y"
15025a7dfde8Smrg                   { (yyval.uVal)=STYLE_MAXIMIZE; }
1503dc61d50dSmrg#line 1504 "winprefsyacc.c"
15046747b715Smrg    break;
15056747b715Smrg
1506dc61d50dSmrg  case 41: /* group1: MINIMIZE  */
15075a7dfde8Smrg#line 201 "winprefsyacc.y"
15085a7dfde8Smrg                   { (yyval.uVal)=STYLE_MINIMIZE; }
1509dc61d50dSmrg#line 1510 "winprefsyacc.c"
15106747b715Smrg    break;
15116747b715Smrg
1512dc61d50dSmrg  case 42: /* group1: BOTTOM  */
15135a7dfde8Smrg#line 202 "winprefsyacc.y"
15145a7dfde8Smrg                 { (yyval.uVal)=STYLE_BOTTOM; }
1515dc61d50dSmrg#line 1516 "winprefsyacc.c"
15166747b715Smrg    break;
15176747b715Smrg
1518dc61d50dSmrg  case 43: /* group2: NOTITLE  */
15195a7dfde8Smrg#line 205 "winprefsyacc.y"
15205a7dfde8Smrg                { (yyval.uVal)=STYLE_NOTITLE; }
1521dc61d50dSmrg#line 1522 "winprefsyacc.c"
15226747b715Smrg    break;
15236747b715Smrg
1524dc61d50dSmrg  case 44: /* group2: OUTLINE  */
15255a7dfde8Smrg#line 206 "winprefsyacc.y"
15265a7dfde8Smrg                  { (yyval.uVal)=STYLE_OUTLINE; }
1527dc61d50dSmrg#line 1528 "winprefsyacc.c"
15286747b715Smrg    break;
15296747b715Smrg
1530dc61d50dSmrg  case 45: /* group2: NOFRAME  */
15315a7dfde8Smrg#line 207 "winprefsyacc.y"
15325a7dfde8Smrg                  { (yyval.uVal)=STYLE_NOFRAME; }
1533dc61d50dSmrg#line 1534 "winprefsyacc.c"
15346747b715Smrg    break;
15356747b715Smrg
1536dc61d50dSmrg  case 46: /* stylecombo: group1  */
15375a7dfde8Smrg#line 210 "winprefsyacc.y"
15385a7dfde8Smrg                       { (yyval.uVal)=(yyvsp[0].uVal); }
1539dc61d50dSmrg#line 1540 "winprefsyacc.c"
15406747b715Smrg    break;
15416747b715Smrg
1542dc61d50dSmrg  case 47: /* stylecombo: group2  */
15435a7dfde8Smrg#line 211 "winprefsyacc.y"
15445a7dfde8Smrg                 { (yyval.uVal)=(yyvsp[0].uVal); }
1545dc61d50dSmrg#line 1546 "winprefsyacc.c"
15466747b715Smrg    break;
15476747b715Smrg
1548dc61d50dSmrg  case 48: /* stylecombo: group1 group2  */
15495a7dfde8Smrg#line 212 "winprefsyacc.y"
15505a7dfde8Smrg                        { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
1551dc61d50dSmrg#line 1552 "winprefsyacc.c"
15526747b715Smrg    break;
15536747b715Smrg
1554dc61d50dSmrg  case 49: /* stylecombo: group2 group1  */
15555a7dfde8Smrg#line 213 "winprefsyacc.y"
15565a7dfde8Smrg                        { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); }
1557dc61d50dSmrg#line 1558 "winprefsyacc.c"
15586747b715Smrg    break;
15596747b715Smrg
1560dc61d50dSmrg  case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada  */
15615a7dfde8Smrg#line 216 "winprefsyacc.y"
15625a7dfde8Smrg                                                          { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); }
1563dc61d50dSmrg#line 1564 "winprefsyacc.c"
15646747b715Smrg    break;
15656747b715Smrg
1566dc61d50dSmrg  case 53: /* $@3: %empty  */
15675a7dfde8Smrg#line 223 "winprefsyacc.y"
15685a7dfde8Smrg                  {OpenStyles();}
1569dc61d50dSmrg#line 1570 "winprefsyacc.c"
15706747b715Smrg    break;
15716747b715Smrg
1572dc61d50dSmrg  case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB  */
15735a7dfde8Smrg#line 223 "winprefsyacc.y"
15745a7dfde8Smrg                                                               {CloseStyles();}
1575dc61d50dSmrg#line 1576 "winprefsyacc.c"
15766747b715Smrg    break;
15776747b715Smrg
1578dc61d50dSmrg  case 55: /* atspot: %empty  */
15795a7dfde8Smrg#line 226 "winprefsyacc.y"
15805a7dfde8Smrg        { (yyval.iVal)=AT_END; }
1581dc61d50dSmrg#line 1582 "winprefsyacc.c"
158205b261ecSmrg    break;
158305b261ecSmrg
1584dc61d50dSmrg  case 56: /* atspot: ATSTART  */
15855a7dfde8Smrg#line 227 "winprefsyacc.y"
15865a7dfde8Smrg                  { (yyval.iVal)=AT_START; }
1587dc61d50dSmrg#line 1588 "winprefsyacc.c"
158805b261ecSmrg    break;
158905b261ecSmrg
1590dc61d50dSmrg  case 57: /* atspot: ATEND  */
15915a7dfde8Smrg#line 228 "winprefsyacc.y"
15925a7dfde8Smrg                { (yyval.iVal)=AT_END; }
1593dc61d50dSmrg#line 1594 "winprefsyacc.c"
159405b261ecSmrg    break;
159505b261ecSmrg
1596dc61d50dSmrg  case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada  */
15975a7dfde8Smrg#line 231 "winprefsyacc.y"
15985a7dfde8Smrg                                                             { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); }
1599dc61d50dSmrg#line 1600 "winprefsyacc.c"
160005b261ecSmrg    break;
160105b261ecSmrg
1602dc61d50dSmrg  case 61: /* $@4: %empty  */
16035a7dfde8Smrg#line 238 "winprefsyacc.y"
16045a7dfde8Smrg                                   {OpenSysMenu();}
1605dc61d50dSmrg#line 1606 "winprefsyacc.c"
160605b261ecSmrg    break;
160705b261ecSmrg
1608dc61d50dSmrg  case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB  */
16095a7dfde8Smrg#line 238 "winprefsyacc.y"
16105a7dfde8Smrg                                                                                   {CloseSysMenu();}
1611dc61d50dSmrg#line 1612 "winprefsyacc.c"
161205b261ecSmrg    break;
161305b261ecSmrg
1614dc61d50dSmrg  case 63: /* forceexit: FORCEEXIT NEWLINE  */
16155a7dfde8Smrg#line 241 "winprefsyacc.y"
16165a7dfde8Smrg                                  { pref.fForceExit = TRUE; }
1617dc61d50dSmrg#line 1618 "winprefsyacc.c"
16186747b715Smrg    break;
16196747b715Smrg
1620dc61d50dSmrg  case 64: /* silentexit: SILENTEXIT NEWLINE  */
16215a7dfde8Smrg#line 244 "winprefsyacc.y"
16225a7dfde8Smrg                                   { pref.fSilentExit = TRUE; }
1623dc61d50dSmrg#line 1624 "winprefsyacc.c"
162405b261ecSmrg    break;
162505b261ecSmrg
1626dc61d50dSmrg  case 65: /* debug: "DEBUG" STRING NEWLINE  */
16275a7dfde8Smrg#line 247 "winprefsyacc.y"
16285a7dfde8Smrg                                   { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); }
1629dc61d50dSmrg#line 1630 "winprefsyacc.c"
163005b261ecSmrg    break;
163105b261ecSmrg
163205b261ecSmrg
1633dc61d50dSmrg#line 1634 "winprefsyacc.c"
16345a7dfde8Smrg
163505b261ecSmrg      default: break;
163605b261ecSmrg    }
16379ace9065Smrg  /* User semantic actions sometimes alter yychar, and that requires
16389ace9065Smrg     that yytoken be updated with the new translation.  We take the
16399ace9065Smrg     approach of translating immediately before every use of yytoken.
16409ace9065Smrg     One alternative is translating here after every semantic action,
16419ace9065Smrg     but that translation would be missed if the semantic action invokes
16429ace9065Smrg     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
16439ace9065Smrg     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
16449ace9065Smrg     incorrect destructor might then be invoked immediately.  In the
16459ace9065Smrg     case of YYERROR or YYBACKUP, subsequent parser actions might lead
16469ace9065Smrg     to an incorrect destructor call or verbose syntax error message
16479ace9065Smrg     before the lookahead is translated.  */
1648dc61d50dSmrg  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
164905b261ecSmrg
165005b261ecSmrg  YYPOPSTACK (yylen);
165105b261ecSmrg  yylen = 0;
165205b261ecSmrg
165305b261ecSmrg  *++yyvsp = yyval;
165405b261ecSmrg
165535c4bbdfSmrg  /* Now 'shift' the result of the reduction.  Determine what state
165605b261ecSmrg     that goes to, based on the state we popped back to and the rule
165705b261ecSmrg     number reduced by.  */
16585a7dfde8Smrg  {
16595a7dfde8Smrg    const int yylhs = yyr1[yyn] - YYNTOKENS;
16605a7dfde8Smrg    const int yyi = yypgoto[yylhs] + *yyssp;
16615a7dfde8Smrg    yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
16625a7dfde8Smrg               ? yytable[yyi]
16635a7dfde8Smrg               : yydefgoto[yylhs]);
16645a7dfde8Smrg  }
166505b261ecSmrg
166605b261ecSmrg  goto yynewstate;
166705b261ecSmrg
166805b261ecSmrg
166935c4bbdfSmrg/*--------------------------------------.
167035c4bbdfSmrg| yyerrlab -- here on detecting error.  |
167135c4bbdfSmrg`--------------------------------------*/
167205b261ecSmrgyyerrlab:
16739ace9065Smrg  /* Make sure we have latest lookahead translation.  See comments at
16749ace9065Smrg     user semantic actions for why this is necessary.  */
1675dc61d50dSmrg  yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
167605b261ecSmrg  /* If not already recovering from an error, report this error.  */
167705b261ecSmrg  if (!yyerrstatus)
167805b261ecSmrg    {
167905b261ecSmrg      ++yynerrs;
168005b261ecSmrg      yyerror (YY_("syntax error"));
168105b261ecSmrg    }
168205b261ecSmrg
168305b261ecSmrg  if (yyerrstatus == 3)
168405b261ecSmrg    {
16854642e01fSmrg      /* If just tried and failed to reuse lookahead token after an
168635c4bbdfSmrg         error, discard it.  */
168705b261ecSmrg
168805b261ecSmrg      if (yychar <= YYEOF)
168935c4bbdfSmrg        {
169035c4bbdfSmrg          /* Return failure if at end of input.  */
169135c4bbdfSmrg          if (yychar == YYEOF)
169235c4bbdfSmrg            YYABORT;
169335c4bbdfSmrg        }
169405b261ecSmrg      else
169535c4bbdfSmrg        {
169635c4bbdfSmrg          yydestruct ("Error: discarding",
169735c4bbdfSmrg                      yytoken, &yylval);
169835c4bbdfSmrg          yychar = YYEMPTY;
169935c4bbdfSmrg        }
170005b261ecSmrg    }
170105b261ecSmrg
17024642e01fSmrg  /* Else will try to reuse lookahead token after shifting the error
170305b261ecSmrg     token.  */
170405b261ecSmrg  goto yyerrlab1;
170505b261ecSmrg
170605b261ecSmrg
170705b261ecSmrg/*---------------------------------------------------.
170805b261ecSmrg| yyerrorlab -- error raised explicitly by YYERROR.  |
170905b261ecSmrg`---------------------------------------------------*/
171005b261ecSmrgyyerrorlab:
17115a7dfde8Smrg  /* Pacify compilers when the user code never invokes YYERROR and the
17125a7dfde8Smrg     label yyerrorlab therefore never appears in user code.  */
17135a7dfde8Smrg  if (0)
17145a7dfde8Smrg    YYERROR;
171505b261ecSmrg
171635c4bbdfSmrg  /* Do not reclaim the symbols of the rule whose action triggered
171705b261ecSmrg     this YYERROR.  */
171805b261ecSmrg  YYPOPSTACK (yylen);
171905b261ecSmrg  yylen = 0;
172005b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
172105b261ecSmrg  yystate = *yyssp;
172205b261ecSmrg  goto yyerrlab1;
172305b261ecSmrg
172405b261ecSmrg
172505b261ecSmrg/*-------------------------------------------------------------.
172605b261ecSmrg| yyerrlab1 -- common code for both syntax error and YYERROR.  |
172705b261ecSmrg`-------------------------------------------------------------*/
172805b261ecSmrgyyerrlab1:
172935c4bbdfSmrg  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
173005b261ecSmrg
1731dc61d50dSmrg  /* Pop stack until we find a state that shifts the error token.  */
173205b261ecSmrg  for (;;)
173305b261ecSmrg    {
173405b261ecSmrg      yyn = yypact[yystate];
17359ace9065Smrg      if (!yypact_value_is_default (yyn))
173635c4bbdfSmrg        {
1737dc61d50dSmrg          yyn += YYSYMBOL_YYerror;
1738dc61d50dSmrg          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
173935c4bbdfSmrg            {
174035c4bbdfSmrg              yyn = yytable[yyn];
174135c4bbdfSmrg              if (0 < yyn)
174235c4bbdfSmrg                break;
174335c4bbdfSmrg            }
174435c4bbdfSmrg        }
174505b261ecSmrg
174605b261ecSmrg      /* Pop the current state because it cannot handle the error token.  */
174705b261ecSmrg      if (yyssp == yyss)
174835c4bbdfSmrg        YYABORT;
174905b261ecSmrg
175005b261ecSmrg
175105b261ecSmrg      yydestruct ("Error: popping",
1752dc61d50dSmrg                  YY_ACCESSING_SYMBOL (yystate), yyvsp);
175305b261ecSmrg      YYPOPSTACK (1);
175405b261ecSmrg      yystate = *yyssp;
175505b261ecSmrg      YY_STACK_PRINT (yyss, yyssp);
175605b261ecSmrg    }
175705b261ecSmrg
175835c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
175905b261ecSmrg  *++yyvsp = yylval;
176035c4bbdfSmrg  YY_IGNORE_MAYBE_UNINITIALIZED_END
176105b261ecSmrg
176205b261ecSmrg
176305b261ecSmrg  /* Shift the error token.  */
1764dc61d50dSmrg  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
176505b261ecSmrg
176605b261ecSmrg  yystate = yyn;
176705b261ecSmrg  goto yynewstate;
176805b261ecSmrg
176905b261ecSmrg
177005b261ecSmrg/*-------------------------------------.
177105b261ecSmrg| yyacceptlab -- YYACCEPT comes here.  |
177205b261ecSmrg`-------------------------------------*/
177305b261ecSmrgyyacceptlab:
177405b261ecSmrg  yyresult = 0;
177505b261ecSmrg  goto yyreturn;
177605b261ecSmrg
17775a7dfde8Smrg
177805b261ecSmrg/*-----------------------------------.
177905b261ecSmrg| yyabortlab -- YYABORT comes here.  |
178005b261ecSmrg`-----------------------------------*/
178105b261ecSmrgyyabortlab:
178205b261ecSmrg  yyresult = 1;
178305b261ecSmrg  goto yyreturn;
178405b261ecSmrg
17855a7dfde8Smrg
1786dc61d50dSmrg#if !defined yyoverflow
178705b261ecSmrg/*-------------------------------------------------.
178805b261ecSmrg| yyexhaustedlab -- memory exhaustion comes here.  |
178905b261ecSmrg`-------------------------------------------------*/
179005b261ecSmrgyyexhaustedlab:
179105b261ecSmrg  yyerror (YY_("memory exhausted"));
179205b261ecSmrg  yyresult = 2;
1793dc61d50dSmrg  goto yyreturn;
179405b261ecSmrg#endif
179505b261ecSmrg
17965a7dfde8Smrg
1797dc61d50dSmrg/*-------------------------------------------------------.
1798dc61d50dSmrg| yyreturn -- parsing is finished, clean up and return.  |
1799dc61d50dSmrg`-------------------------------------------------------*/
180005b261ecSmrgyyreturn:
18014642e01fSmrg  if (yychar != YYEMPTY)
18029ace9065Smrg    {
18039ace9065Smrg      /* Make sure we have latest lookahead translation.  See comments at
18049ace9065Smrg         user semantic actions for why this is necessary.  */
18059ace9065Smrg      yytoken = YYTRANSLATE (yychar);
18069ace9065Smrg      yydestruct ("Cleanup: discarding lookahead",
18079ace9065Smrg                  yytoken, &yylval);
18089ace9065Smrg    }
180935c4bbdfSmrg  /* Do not reclaim the symbols of the rule whose action triggered
181005b261ecSmrg     this YYABORT or YYACCEPT.  */
181105b261ecSmrg  YYPOPSTACK (yylen);
181205b261ecSmrg  YY_STACK_PRINT (yyss, yyssp);
181305b261ecSmrg  while (yyssp != yyss)
181405b261ecSmrg    {
181505b261ecSmrg      yydestruct ("Cleanup: popping",
1816dc61d50dSmrg                  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
181705b261ecSmrg      YYPOPSTACK (1);
181805b261ecSmrg    }
181905b261ecSmrg#ifndef yyoverflow
182005b261ecSmrg  if (yyss != yyssa)
182105b261ecSmrg    YYSTACK_FREE (yyss);
182205b261ecSmrg#endif
1823dc61d50dSmrg
182435c4bbdfSmrg  return yyresult;
182505b261ecSmrg}
1826dc61d50dSmrg
18275a7dfde8Smrg#line 251 "winprefsyacc.y"
182805b261ecSmrg
182905b261ecSmrg/*
183005b261ecSmrg * Errors in parsing abort and print log messages
183105b261ecSmrg */
183205b261ecSmrgstatic int
183335c4bbdfSmrgyyerror (const char *s)
183405b261ecSmrg{
183505b261ecSmrg  ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
183605b261ecSmrg  return 1;
183705b261ecSmrg}
183805b261ecSmrg
183905b261ecSmrg/* Miscellaneous functions to store TOKENs into the structure */
184005b261ecSmrgstatic void
184105b261ecSmrgSetIconDirectory (char *path)
184205b261ecSmrg{
184305b261ecSmrg  strncpy (pref.iconDirectory, path, PATH_MAX);
184405b261ecSmrg  pref.iconDirectory[PATH_MAX] = 0;
184505b261ecSmrg}
184605b261ecSmrg
184705b261ecSmrgstatic void
184805b261ecSmrgSetDefaultIcon (char *fname)
184905b261ecSmrg{
185005b261ecSmrg  strncpy (pref.defaultIconName, fname, NAME_MAX);
185105b261ecSmrg  pref.defaultIconName[NAME_MAX] = 0;
185205b261ecSmrg}
185305b261ecSmrg
185405b261ecSmrgstatic void
185505b261ecSmrgSetTrayIcon (char *fname)
185605b261ecSmrg{
185705b261ecSmrg  strncpy (pref.trayIconName, fname, NAME_MAX);
185805b261ecSmrg  pref.trayIconName[NAME_MAX] = 0;
185905b261ecSmrg}
186005b261ecSmrg
186105b261ecSmrgstatic void
186235c4bbdfSmrgSetRootMenu (char *menuname)
186305b261ecSmrg{
186435c4bbdfSmrg  strncpy (pref.rootMenuName, menuname, MENU_MAX);
186505b261ecSmrg  pref.rootMenuName[MENU_MAX] = 0;
186605b261ecSmrg}
186705b261ecSmrg
186805b261ecSmrgstatic void
186935c4bbdfSmrgSetDefaultSysMenu (char *menuname, int pos)
187005b261ecSmrg{
187135c4bbdfSmrg  strncpy (pref.defaultSysMenuName, menuname, MENU_MAX);
187205b261ecSmrg  pref.defaultSysMenuName[MENU_MAX] = 0;
187305b261ecSmrg  pref.defaultSysMenuPos = pos;
187405b261ecSmrg}
187505b261ecSmrg
187605b261ecSmrgstatic void
187705b261ecSmrgOpenMenu (char *menuname)
187805b261ecSmrg{
187905b261ecSmrg  if (menu.menuItem) free(menu.menuItem);
188005b261ecSmrg  menu.menuItem = NULL;
188105b261ecSmrg  strncpy(menu.menuName, menuname, MENU_MAX);
188205b261ecSmrg  menu.menuName[MENU_MAX] = 0;
188305b261ecSmrg  menu.menuItems = 0;
188405b261ecSmrg}
188505b261ecSmrg
188605b261ecSmrgstatic void
188735c4bbdfSmrgAddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param)
188805b261ecSmrg{
188905b261ecSmrg  if (menu.menuItem==NULL)
189035c4bbdfSmrg    menu.menuItem = malloc(sizeof(MENUITEM));
189105b261ecSmrg  else
189235c4bbdfSmrg    menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1));
189305b261ecSmrg
189405b261ecSmrg  strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX);
189505b261ecSmrg  menu.menuItem[menu.menuItems].text[MENU_MAX] = 0;
189605b261ecSmrg
189705b261ecSmrg  menu.menuItem[menu.menuItems].cmd = cmd;
189805b261ecSmrg
189905b261ecSmrg  strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX);
190005b261ecSmrg  menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0;
190105b261ecSmrg
190205b261ecSmrg  menu.menuItem[menu.menuItems].commandID = 0;
190305b261ecSmrg
190405b261ecSmrg  menu.menuItems++;
190505b261ecSmrg}
190605b261ecSmrg
190705b261ecSmrgstatic void
190805b261ecSmrgCloseMenu (void)
190905b261ecSmrg{
191005b261ecSmrg  if (menu.menuItem==NULL || menu.menuItems==0)
191105b261ecSmrg    {
191205b261ecSmrg      ErrorF("LoadPreferences: Empty menu detected\n");
191305b261ecSmrg      return;
191405b261ecSmrg    }
191505b261ecSmrg
191605b261ecSmrg  if (pref.menuItems)
191735c4bbdfSmrg    pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
191805b261ecSmrg  else
191935c4bbdfSmrg    pref.menu = malloc (sizeof(MENUPARSED));
192005b261ecSmrg
192105b261ecSmrg  memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
192205b261ecSmrg  pref.menuItems++;
192305b261ecSmrg
192405b261ecSmrg  memset (&menu, 0, sizeof(MENUPARSED));
192505b261ecSmrg}
192605b261ecSmrg
192705b261ecSmrgstatic void
192805b261ecSmrgOpenIcons (void)
192905b261ecSmrg{
193005b261ecSmrg  if (pref.icon != NULL) {
193105b261ecSmrg    ErrorF("LoadPreferences: Redefining icon mappings\n");
193205b261ecSmrg    free(pref.icon);
193305b261ecSmrg    pref.icon = NULL;
193405b261ecSmrg  }
193505b261ecSmrg  pref.iconItems = 0;
193605b261ecSmrg}
193705b261ecSmrg
193805b261ecSmrgstatic void
193905b261ecSmrgAddIconLine (char *matchstr, char *iconfile)
194005b261ecSmrg{
194105b261ecSmrg  if (pref.icon==NULL)
194235c4bbdfSmrg    pref.icon = malloc(sizeof(ICONITEM));
194305b261ecSmrg  else
194435c4bbdfSmrg    pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1));
194505b261ecSmrg
194605b261ecSmrg  strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX);
194705b261ecSmrg  pref.icon[pref.iconItems].match[MENU_MAX] = 0;
194805b261ecSmrg
194905b261ecSmrg  strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1);
195005b261ecSmrg  pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0;
195105b261ecSmrg
195205b261ecSmrg  pref.icon[pref.iconItems].hicon = 0;
195305b261ecSmrg
195405b261ecSmrg  pref.iconItems++;
195505b261ecSmrg}
195605b261ecSmrg
195705b261ecSmrgstatic void
195805b261ecSmrgCloseIcons (void)
195905b261ecSmrg{
196005b261ecSmrg}
196105b261ecSmrg
19626747b715Smrgstatic void
19636747b715SmrgOpenStyles (void)
19646747b715Smrg{
19656747b715Smrg  if (pref.style != NULL) {
19666747b715Smrg    ErrorF("LoadPreferences: Redefining window style\n");
19676747b715Smrg    free(pref.style);
19686747b715Smrg    pref.style = NULL;
19696747b715Smrg  }
19706747b715Smrg  pref.styleItems = 0;
19716747b715Smrg}
19726747b715Smrg
19736747b715Smrgstatic void
19746747b715SmrgAddStyleLine (char *matchstr, unsigned long style)
19756747b715Smrg{
19766747b715Smrg  if (pref.style==NULL)
197735c4bbdfSmrg    pref.style = malloc(sizeof(STYLEITEM));
19786747b715Smrg  else
197935c4bbdfSmrg    pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1));
19806747b715Smrg
19816747b715Smrg  strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX);
19826747b715Smrg  pref.style[pref.styleItems].match[MENU_MAX] = 0;
19836747b715Smrg
19846747b715Smrg  pref.style[pref.styleItems].type = style;
19856747b715Smrg
19866747b715Smrg  pref.styleItems++;
19876747b715Smrg}
19886747b715Smrg
19896747b715Smrgstatic void
19906747b715SmrgCloseStyles (void)
19916747b715Smrg{
19926747b715Smrg}
19936747b715Smrg
199405b261ecSmrgstatic void
199505b261ecSmrgOpenSysMenu (void)
199605b261ecSmrg{
199705b261ecSmrg  if (pref.sysMenu != NULL) {
199805b261ecSmrg    ErrorF("LoadPreferences: Redefining system menu\n");
199905b261ecSmrg    free(pref.sysMenu);
200005b261ecSmrg    pref.sysMenu = NULL;
200105b261ecSmrg  }
200205b261ecSmrg  pref.sysMenuItems = 0;
200305b261ecSmrg}
200405b261ecSmrg
200505b261ecSmrgstatic void
200605b261ecSmrgAddSysMenuLine (char *matchstr, char *menuname, int pos)
200705b261ecSmrg{
200805b261ecSmrg  if (pref.sysMenu==NULL)
200935c4bbdfSmrg    pref.sysMenu = malloc(sizeof(SYSMENUITEM));
201005b261ecSmrg  else
201135c4bbdfSmrg    pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1));
201205b261ecSmrg
201305b261ecSmrg  strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX);
201405b261ecSmrg  pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0;
201505b261ecSmrg
201605b261ecSmrg  strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX);
201705b261ecSmrg  pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0;
201805b261ecSmrg
201905b261ecSmrg  pref.sysMenu[pref.sysMenuItems].menuPos = pos;
202005b261ecSmrg
202105b261ecSmrg  pref.sysMenuItems++;
202205b261ecSmrg}
202305b261ecSmrg
202405b261ecSmrgstatic void
202505b261ecSmrgCloseSysMenu (void)
202605b261ecSmrg{
202705b261ecSmrg}
202805b261ecSmrg
2029