10f66f451Sopenharmony_ci/* A Bison parser, made by GNU Bison 2.1. */ 20f66f451Sopenharmony_ci 30f66f451Sopenharmony_ci/* Skeleton parser for Yacc-like parsing with Bison, 40f66f451Sopenharmony_ci Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 50f66f451Sopenharmony_ci 60f66f451Sopenharmony_ci This program is free software; you can redistribute it and/or modify 70f66f451Sopenharmony_ci it under the terms of the GNU General Public License as published by 80f66f451Sopenharmony_ci the Free Software Foundation; either version 2, or (at your option) 90f66f451Sopenharmony_ci any later version. 100f66f451Sopenharmony_ci 110f66f451Sopenharmony_ci This program is distributed in the hope that it will be useful, 120f66f451Sopenharmony_ci but WITHOUT ANY WARRANTY; without even the implied warranty of 130f66f451Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 140f66f451Sopenharmony_ci GNU General Public License for more details. 150f66f451Sopenharmony_ci 160f66f451Sopenharmony_ci You should have received a copy of the GNU General Public License 170f66f451Sopenharmony_ci along with this program; if not, write to the Free Software 180f66f451Sopenharmony_ci Foundation, Inc., 51 Franklin Street, Fifth Floor, 190f66f451Sopenharmony_ci Boston, MA 02110-1301, USA. */ 200f66f451Sopenharmony_ci 210f66f451Sopenharmony_ci/* As a special exception, when this file is copied by Bison into a 220f66f451Sopenharmony_ci Bison output file, you may use that output file without restriction. 230f66f451Sopenharmony_ci This special exception was added by the Free Software Foundation 240f66f451Sopenharmony_ci in version 1.24 of Bison. */ 250f66f451Sopenharmony_ci 260f66f451Sopenharmony_ci/* Written by Richard Stallman by simplifying the original so called 270f66f451Sopenharmony_ci ``semantic'' parser. */ 280f66f451Sopenharmony_ci 290f66f451Sopenharmony_ci/* All symbols defined below should begin with yy or YY, to avoid 300f66f451Sopenharmony_ci infringing on user name space. This should be done even for local 310f66f451Sopenharmony_ci variables, as they might otherwise be expanded by user macros. 320f66f451Sopenharmony_ci There are some unavoidable exceptions within include files to 330f66f451Sopenharmony_ci define necessary library symbols; they are noted "INFRINGES ON 340f66f451Sopenharmony_ci USER NAME SPACE" below. */ 350f66f451Sopenharmony_ci 360f66f451Sopenharmony_ci/* Identify Bison output. */ 370f66f451Sopenharmony_ci#define YYBISON 1 380f66f451Sopenharmony_ci 390f66f451Sopenharmony_ci/* Bison version. */ 400f66f451Sopenharmony_ci#define YYBISON_VERSION "2.1" 410f66f451Sopenharmony_ci 420f66f451Sopenharmony_ci/* Skeleton name. */ 430f66f451Sopenharmony_ci#define YYSKELETON_NAME "yacc.c" 440f66f451Sopenharmony_ci 450f66f451Sopenharmony_ci/* Pure parsers. */ 460f66f451Sopenharmony_ci#define YYPURE 0 470f66f451Sopenharmony_ci 480f66f451Sopenharmony_ci/* Using locations. */ 490f66f451Sopenharmony_ci#define YYLSP_NEEDED 0 500f66f451Sopenharmony_ci 510f66f451Sopenharmony_ci/* Substitute the variable and function names. */ 520f66f451Sopenharmony_ci#define yyparse zconfparse 530f66f451Sopenharmony_ci#define yylex zconflex 540f66f451Sopenharmony_ci#define yyerror zconferror 550f66f451Sopenharmony_ci#define yylval zconflval 560f66f451Sopenharmony_ci#define yychar zconfchar 570f66f451Sopenharmony_ci#define yydebug zconfdebug 580f66f451Sopenharmony_ci#define yynerrs zconfnerrs 590f66f451Sopenharmony_ci 600f66f451Sopenharmony_ci 610f66f451Sopenharmony_ci/* Tokens. */ 620f66f451Sopenharmony_ci#ifndef YYTOKENTYPE 630f66f451Sopenharmony_ci# define YYTOKENTYPE 640f66f451Sopenharmony_ci /* Put the tokens into the symbol table, so that GDB and other debuggers 650f66f451Sopenharmony_ci know about them. */ 660f66f451Sopenharmony_ci enum yytokentype { 670f66f451Sopenharmony_ci T_MAINMENU = 258, 680f66f451Sopenharmony_ci T_MENU = 259, 690f66f451Sopenharmony_ci T_ENDMENU = 260, 700f66f451Sopenharmony_ci T_SOURCE = 261, 710f66f451Sopenharmony_ci T_CHOICE = 262, 720f66f451Sopenharmony_ci T_ENDCHOICE = 263, 730f66f451Sopenharmony_ci T_COMMENT = 264, 740f66f451Sopenharmony_ci T_CONFIG = 265, 750f66f451Sopenharmony_ci T_MENUCONFIG = 266, 760f66f451Sopenharmony_ci T_HELP = 267, 770f66f451Sopenharmony_ci T_HELPTEXT = 268, 780f66f451Sopenharmony_ci T_IF = 269, 790f66f451Sopenharmony_ci T_ENDIF = 270, 800f66f451Sopenharmony_ci T_DEPENDS = 271, 810f66f451Sopenharmony_ci T_REQUIRES = 272, 820f66f451Sopenharmony_ci T_OPTIONAL = 273, 830f66f451Sopenharmony_ci T_PROMPT = 274, 840f66f451Sopenharmony_ci T_TYPE = 275, 850f66f451Sopenharmony_ci T_DEFAULT = 276, 860f66f451Sopenharmony_ci T_SELECT = 277, 870f66f451Sopenharmony_ci T_RANGE = 278, 880f66f451Sopenharmony_ci T_OPTION = 279, 890f66f451Sopenharmony_ci T_ON = 280, 900f66f451Sopenharmony_ci T_WORD = 281, 910f66f451Sopenharmony_ci T_WORD_QUOTE = 282, 920f66f451Sopenharmony_ci T_UNEQUAL = 283, 930f66f451Sopenharmony_ci T_CLOSE_PAREN = 284, 940f66f451Sopenharmony_ci T_OPEN_PAREN = 285, 950f66f451Sopenharmony_ci T_EOL = 286, 960f66f451Sopenharmony_ci T_OR = 287, 970f66f451Sopenharmony_ci T_AND = 288, 980f66f451Sopenharmony_ci T_EQUAL = 289, 990f66f451Sopenharmony_ci T_NOT = 290 1000f66f451Sopenharmony_ci }; 1010f66f451Sopenharmony_ci#endif 1020f66f451Sopenharmony_ci/* Tokens. */ 1030f66f451Sopenharmony_ci#define T_MAINMENU 258 1040f66f451Sopenharmony_ci#define T_MENU 259 1050f66f451Sopenharmony_ci#define T_ENDMENU 260 1060f66f451Sopenharmony_ci#define T_SOURCE 261 1070f66f451Sopenharmony_ci#define T_CHOICE 262 1080f66f451Sopenharmony_ci#define T_ENDCHOICE 263 1090f66f451Sopenharmony_ci#define T_COMMENT 264 1100f66f451Sopenharmony_ci#define T_CONFIG 265 1110f66f451Sopenharmony_ci#define T_MENUCONFIG 266 1120f66f451Sopenharmony_ci#define T_HELP 267 1130f66f451Sopenharmony_ci#define T_HELPTEXT 268 1140f66f451Sopenharmony_ci#define T_IF 269 1150f66f451Sopenharmony_ci#define T_ENDIF 270 1160f66f451Sopenharmony_ci#define T_DEPENDS 271 1170f66f451Sopenharmony_ci#define T_REQUIRES 272 1180f66f451Sopenharmony_ci#define T_OPTIONAL 273 1190f66f451Sopenharmony_ci#define T_PROMPT 274 1200f66f451Sopenharmony_ci#define T_TYPE 275 1210f66f451Sopenharmony_ci#define T_DEFAULT 276 1220f66f451Sopenharmony_ci#define T_SELECT 277 1230f66f451Sopenharmony_ci#define T_RANGE 278 1240f66f451Sopenharmony_ci#define T_OPTION 279 1250f66f451Sopenharmony_ci#define T_ON 280 1260f66f451Sopenharmony_ci#define T_WORD 281 1270f66f451Sopenharmony_ci#define T_WORD_QUOTE 282 1280f66f451Sopenharmony_ci#define T_UNEQUAL 283 1290f66f451Sopenharmony_ci#define T_CLOSE_PAREN 284 1300f66f451Sopenharmony_ci#define T_OPEN_PAREN 285 1310f66f451Sopenharmony_ci#define T_EOL 286 1320f66f451Sopenharmony_ci#define T_OR 287 1330f66f451Sopenharmony_ci#define T_AND 288 1340f66f451Sopenharmony_ci#define T_EQUAL 289 1350f66f451Sopenharmony_ci#define T_NOT 290 1360f66f451Sopenharmony_ci 1370f66f451Sopenharmony_ci 1380f66f451Sopenharmony_ci 1390f66f451Sopenharmony_ci 1400f66f451Sopenharmony_ci/* Copy the first part of user declarations. */ 1410f66f451Sopenharmony_ci 1420f66f451Sopenharmony_ci 1430f66f451Sopenharmony_ci/* 1440f66f451Sopenharmony_ci * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> 1450f66f451Sopenharmony_ci * Released under the terms of the GNU GPL v2.0. 1460f66f451Sopenharmony_ci */ 1470f66f451Sopenharmony_ci 1480f66f451Sopenharmony_ci#include <ctype.h> 1490f66f451Sopenharmony_ci#include <stdarg.h> 1500f66f451Sopenharmony_ci#include <stdio.h> 1510f66f451Sopenharmony_ci#include <stdlib.h> 1520f66f451Sopenharmony_ci#include <string.h> 1530f66f451Sopenharmony_ci#include <stdbool.h> 1540f66f451Sopenharmony_ci 1550f66f451Sopenharmony_ci#define LKC_DIRECT_LINK 1560f66f451Sopenharmony_ci#include "lkc.h" 1570f66f451Sopenharmony_ci 1580f66f451Sopenharmony_ci#include "zconf.hash.c" 1590f66f451Sopenharmony_ci 1600f66f451Sopenharmony_ci#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) 1610f66f451Sopenharmony_ci 1620f66f451Sopenharmony_ci#define PRINTD 0x0001 1630f66f451Sopenharmony_ci#define DEBUG_PARSE 0x0002 1640f66f451Sopenharmony_ci 1650f66f451Sopenharmony_ciint cdebug = PRINTD; 1660f66f451Sopenharmony_ci 1670f66f451Sopenharmony_ciextern int zconflex(void); 1680f66f451Sopenharmony_cistatic void zconfprint(const char *err, ...); 1690f66f451Sopenharmony_cistatic void zconf_error(const char *err, ...); 1700f66f451Sopenharmony_cistatic void zconferror(const char *err); 1710f66f451Sopenharmony_cistatic bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken); 1720f66f451Sopenharmony_ci 1730f66f451Sopenharmony_cistruct symbol *symbol_hash[257]; 1740f66f451Sopenharmony_ci 1750f66f451Sopenharmony_cistatic struct menu *current_menu, *current_entry; 1760f66f451Sopenharmony_ci 1770f66f451Sopenharmony_ci#define YYDEBUG 0 1780f66f451Sopenharmony_ci#if YYDEBUG 1790f66f451Sopenharmony_ci#define YYERROR_VERBOSE 1800f66f451Sopenharmony_ci#endif 1810f66f451Sopenharmony_ci 1820f66f451Sopenharmony_ci 1830f66f451Sopenharmony_ci/* Enabling traces. */ 1840f66f451Sopenharmony_ci#ifndef YYDEBUG 1850f66f451Sopenharmony_ci# define YYDEBUG 0 1860f66f451Sopenharmony_ci#endif 1870f66f451Sopenharmony_ci 1880f66f451Sopenharmony_ci/* Enabling verbose error messages. */ 1890f66f451Sopenharmony_ci#ifdef YYERROR_VERBOSE 1900f66f451Sopenharmony_ci# undef YYERROR_VERBOSE 1910f66f451Sopenharmony_ci# define YYERROR_VERBOSE 1 1920f66f451Sopenharmony_ci#else 1930f66f451Sopenharmony_ci# define YYERROR_VERBOSE 0 1940f66f451Sopenharmony_ci#endif 1950f66f451Sopenharmony_ci 1960f66f451Sopenharmony_ci/* Enabling the token table. */ 1970f66f451Sopenharmony_ci#ifndef YYTOKEN_TABLE 1980f66f451Sopenharmony_ci# define YYTOKEN_TABLE 0 1990f66f451Sopenharmony_ci#endif 2000f66f451Sopenharmony_ci 2010f66f451Sopenharmony_ci#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) 2020f66f451Sopenharmony_ci 2030f66f451Sopenharmony_citypedef union YYSTYPE { 2040f66f451Sopenharmony_ci char *string; 2050f66f451Sopenharmony_ci struct file *file; 2060f66f451Sopenharmony_ci struct symbol *symbol; 2070f66f451Sopenharmony_ci struct expr *expr; 2080f66f451Sopenharmony_ci struct menu *menu; 2090f66f451Sopenharmony_ci struct kconf_id *id; 2100f66f451Sopenharmony_ci} YYSTYPE; 2110f66f451Sopenharmony_ci/* Line 196 of yacc.c. */ 2120f66f451Sopenharmony_ci 2130f66f451Sopenharmony_ci# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 2140f66f451Sopenharmony_ci# define YYSTYPE_IS_DECLARED 1 2150f66f451Sopenharmony_ci# define YYSTYPE_IS_TRIVIAL 1 2160f66f451Sopenharmony_ci#endif 2170f66f451Sopenharmony_ci 2180f66f451Sopenharmony_ci 2190f66f451Sopenharmony_ci 2200f66f451Sopenharmony_ci/* Copy the second part of user declarations. */ 2210f66f451Sopenharmony_ci 2220f66f451Sopenharmony_ci 2230f66f451Sopenharmony_ci/* Line 219 of yacc.c. */ 2240f66f451Sopenharmony_ci 2250f66f451Sopenharmony_ci 2260f66f451Sopenharmony_ci#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) 2270f66f451Sopenharmony_ci# define YYSIZE_T __SIZE_TYPE__ 2280f66f451Sopenharmony_ci#endif 2290f66f451Sopenharmony_ci#if ! defined (YYSIZE_T) && defined (size_t) 2300f66f451Sopenharmony_ci# define YYSIZE_T size_t 2310f66f451Sopenharmony_ci#endif 2320f66f451Sopenharmony_ci#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) 2330f66f451Sopenharmony_ci# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 2340f66f451Sopenharmony_ci# define YYSIZE_T size_t 2350f66f451Sopenharmony_ci#endif 2360f66f451Sopenharmony_ci#if ! defined (YYSIZE_T) 2370f66f451Sopenharmony_ci# define YYSIZE_T unsigned int 2380f66f451Sopenharmony_ci#endif 2390f66f451Sopenharmony_ci 2400f66f451Sopenharmony_ci#ifndef YY_ 2410f66f451Sopenharmony_ci# if YYENABLE_NLS 2420f66f451Sopenharmony_ci# if ENABLE_NLS 2430f66f451Sopenharmony_ci# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 2440f66f451Sopenharmony_ci# define YY_(msgid) dgettext ("bison-runtime", msgid) 2450f66f451Sopenharmony_ci# endif 2460f66f451Sopenharmony_ci# endif 2470f66f451Sopenharmony_ci# ifndef YY_ 2480f66f451Sopenharmony_ci# define YY_(msgid) msgid 2490f66f451Sopenharmony_ci# endif 2500f66f451Sopenharmony_ci#endif 2510f66f451Sopenharmony_ci 2520f66f451Sopenharmony_ci#if ! defined (yyoverflow) || YYERROR_VERBOSE 2530f66f451Sopenharmony_ci 2540f66f451Sopenharmony_ci/* The parser invokes alloca or malloc; define the necessary symbols. */ 2550f66f451Sopenharmony_ci 2560f66f451Sopenharmony_ci# ifdef YYSTACK_USE_ALLOCA 2570f66f451Sopenharmony_ci# if YYSTACK_USE_ALLOCA 2580f66f451Sopenharmony_ci# ifdef __GNUC__ 2590f66f451Sopenharmony_ci# define YYSTACK_ALLOC __builtin_alloca 2600f66f451Sopenharmony_ci# else 2610f66f451Sopenharmony_ci# define YYSTACK_ALLOC alloca 2620f66f451Sopenharmony_ci# if defined (__STDC__) || defined (__cplusplus) 2630f66f451Sopenharmony_ci# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 2640f66f451Sopenharmony_ci# define YYINCLUDED_STDLIB_H 2650f66f451Sopenharmony_ci# endif 2660f66f451Sopenharmony_ci# endif 2670f66f451Sopenharmony_ci# endif 2680f66f451Sopenharmony_ci# endif 2690f66f451Sopenharmony_ci 2700f66f451Sopenharmony_ci# ifdef YYSTACK_ALLOC 2710f66f451Sopenharmony_ci /* Pacify GCC's `empty if-body' warning. */ 2720f66f451Sopenharmony_ci# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 2730f66f451Sopenharmony_ci# ifndef YYSTACK_ALLOC_MAXIMUM 2740f66f451Sopenharmony_ci /* The OS might guarantee only one guard page at the bottom of the stack, 2750f66f451Sopenharmony_ci and a page size can be as small as 4096 bytes. So we cannot safely 2760f66f451Sopenharmony_ci invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 2770f66f451Sopenharmony_ci to allow for a few compiler-allocated temporary stack slots. */ 2780f66f451Sopenharmony_ci# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ 2790f66f451Sopenharmony_ci# endif 2800f66f451Sopenharmony_ci# else 2810f66f451Sopenharmony_ci# define YYSTACK_ALLOC YYMALLOC 2820f66f451Sopenharmony_ci# define YYSTACK_FREE YYFREE 2830f66f451Sopenharmony_ci# ifndef YYSTACK_ALLOC_MAXIMUM 2840f66f451Sopenharmony_ci# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) 2850f66f451Sopenharmony_ci# endif 2860f66f451Sopenharmony_ci# ifdef __cplusplus 2870f66f451Sopenharmony_ciextern "C" { 2880f66f451Sopenharmony_ci# endif 2890f66f451Sopenharmony_ci# ifndef YYMALLOC 2900f66f451Sopenharmony_ci# define YYMALLOC malloc 2910f66f451Sopenharmony_ci# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ 2920f66f451Sopenharmony_ci && (defined (__STDC__) || defined (__cplusplus))) 2930f66f451Sopenharmony_civoid *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 2940f66f451Sopenharmony_ci# endif 2950f66f451Sopenharmony_ci# endif 2960f66f451Sopenharmony_ci# ifndef YYFREE 2970f66f451Sopenharmony_ci# define YYFREE free 2980f66f451Sopenharmony_ci# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ 2990f66f451Sopenharmony_ci && (defined (__STDC__) || defined (__cplusplus))) 3000f66f451Sopenharmony_civoid free (void *); /* INFRINGES ON USER NAME SPACE */ 3010f66f451Sopenharmony_ci# endif 3020f66f451Sopenharmony_ci# endif 3030f66f451Sopenharmony_ci# ifdef __cplusplus 3040f66f451Sopenharmony_ci} 3050f66f451Sopenharmony_ci# endif 3060f66f451Sopenharmony_ci# endif 3070f66f451Sopenharmony_ci#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ 3080f66f451Sopenharmony_ci 3090f66f451Sopenharmony_ci 3100f66f451Sopenharmony_ci#if (! defined (yyoverflow) \ 3110f66f451Sopenharmony_ci && (! defined (__cplusplus) \ 3120f66f451Sopenharmony_ci || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) 3130f66f451Sopenharmony_ci 3140f66f451Sopenharmony_ci/* A type that is properly aligned for any stack member. */ 3150f66f451Sopenharmony_ciunion yyalloc 3160f66f451Sopenharmony_ci{ 3170f66f451Sopenharmony_ci short int yyss; 3180f66f451Sopenharmony_ci YYSTYPE yyvs; 3190f66f451Sopenharmony_ci }; 3200f66f451Sopenharmony_ci 3210f66f451Sopenharmony_ci/* The size of the maximum gap between one aligned stack and the next. */ 3220f66f451Sopenharmony_ci# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 3230f66f451Sopenharmony_ci 3240f66f451Sopenharmony_ci/* The size of an array large to enough to hold all stacks, each with 3250f66f451Sopenharmony_ci N elements. */ 3260f66f451Sopenharmony_ci# define YYSTACK_BYTES(N) \ 3270f66f451Sopenharmony_ci ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ 3280f66f451Sopenharmony_ci + YYSTACK_GAP_MAXIMUM) 3290f66f451Sopenharmony_ci 3300f66f451Sopenharmony_ci/* Copy COUNT objects from FROM to TO. The source and destination do 3310f66f451Sopenharmony_ci not overlap. */ 3320f66f451Sopenharmony_ci# ifndef YYCOPY 3330f66f451Sopenharmony_ci# if defined (__GNUC__) && 1 < __GNUC__ 3340f66f451Sopenharmony_ci# define YYCOPY(To, From, Count) \ 3350f66f451Sopenharmony_ci __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 3360f66f451Sopenharmony_ci# else 3370f66f451Sopenharmony_ci# define YYCOPY(To, From, Count) \ 3380f66f451Sopenharmony_ci do \ 3390f66f451Sopenharmony_ci { \ 3400f66f451Sopenharmony_ci YYSIZE_T yyi; \ 3410f66f451Sopenharmony_ci for (yyi = 0; yyi < (Count); yyi++) \ 3420f66f451Sopenharmony_ci (To)[yyi] = (From)[yyi]; \ 3430f66f451Sopenharmony_ci } \ 3440f66f451Sopenharmony_ci while (0) 3450f66f451Sopenharmony_ci# endif 3460f66f451Sopenharmony_ci# endif 3470f66f451Sopenharmony_ci 3480f66f451Sopenharmony_ci/* Relocate STACK from its old location to the new one. The 3490f66f451Sopenharmony_ci local variables YYSIZE and YYSTACKSIZE give the old and new number of 3500f66f451Sopenharmony_ci elements in the stack, and YYPTR gives the new location of the 3510f66f451Sopenharmony_ci stack. Advance YYPTR to a properly aligned location for the next 3520f66f451Sopenharmony_ci stack. */ 3530f66f451Sopenharmony_ci# define YYSTACK_RELOCATE(Stack) \ 3540f66f451Sopenharmony_ci do \ 3550f66f451Sopenharmony_ci { \ 3560f66f451Sopenharmony_ci YYSIZE_T yynewbytes; \ 3570f66f451Sopenharmony_ci YYCOPY (&yyptr->Stack, Stack, yysize); \ 3580f66f451Sopenharmony_ci Stack = &yyptr->Stack; \ 3590f66f451Sopenharmony_ci yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 3600f66f451Sopenharmony_ci yyptr += yynewbytes / sizeof (*yyptr); \ 3610f66f451Sopenharmony_ci } \ 3620f66f451Sopenharmony_ci while (0) 3630f66f451Sopenharmony_ci 3640f66f451Sopenharmony_ci#endif 3650f66f451Sopenharmony_ci 3660f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 3670f66f451Sopenharmony_ci typedef signed char yysigned_char; 3680f66f451Sopenharmony_ci#else 3690f66f451Sopenharmony_ci typedef short int yysigned_char; 3700f66f451Sopenharmony_ci#endif 3710f66f451Sopenharmony_ci 3720f66f451Sopenharmony_ci/* YYFINAL -- State number of the termination state. */ 3730f66f451Sopenharmony_ci#define YYFINAL 3 3740f66f451Sopenharmony_ci/* YYLAST -- Last index in YYTABLE. */ 3750f66f451Sopenharmony_ci#define YYLAST 275 3760f66f451Sopenharmony_ci 3770f66f451Sopenharmony_ci/* YYNTOKENS -- Number of terminals. */ 3780f66f451Sopenharmony_ci#define YYNTOKENS 36 3790f66f451Sopenharmony_ci/* YYNNTS -- Number of nonterminals. */ 3800f66f451Sopenharmony_ci#define YYNNTS 45 3810f66f451Sopenharmony_ci/* YYNRULES -- Number of rules. */ 3820f66f451Sopenharmony_ci#define YYNRULES 110 3830f66f451Sopenharmony_ci/* YYNRULES -- Number of states. */ 3840f66f451Sopenharmony_ci#define YYNSTATES 183 3850f66f451Sopenharmony_ci 3860f66f451Sopenharmony_ci/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 3870f66f451Sopenharmony_ci#define YYUNDEFTOK 2 3880f66f451Sopenharmony_ci#define YYMAXUTOK 290 3890f66f451Sopenharmony_ci 3900f66f451Sopenharmony_ci#define YYTRANSLATE(YYX) \ 3910f66f451Sopenharmony_ci ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 3920f66f451Sopenharmony_ci 3930f66f451Sopenharmony_ci/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 3940f66f451Sopenharmony_cistatic const unsigned char yytranslate[] = 3950f66f451Sopenharmony_ci{ 3960f66f451Sopenharmony_ci 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3970f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3980f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3990f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4000f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4010f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4020f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4030f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4040f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4050f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4060f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4070f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4080f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4090f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4100f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4110f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4120f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4130f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4140f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4150f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4160f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4170f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4180f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4190f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4200f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4210f66f451Sopenharmony_ci 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 4220f66f451Sopenharmony_ci 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 4230f66f451Sopenharmony_ci 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 4240f66f451Sopenharmony_ci 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 4250f66f451Sopenharmony_ci 35 4260f66f451Sopenharmony_ci}; 4270f66f451Sopenharmony_ci 4280f66f451Sopenharmony_ci#if YYDEBUG 4290f66f451Sopenharmony_ci/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 4300f66f451Sopenharmony_ci YYRHS. */ 4310f66f451Sopenharmony_cistatic const unsigned short int yyprhs[] = 4320f66f451Sopenharmony_ci{ 4330f66f451Sopenharmony_ci 0, 0, 3, 5, 6, 9, 12, 15, 20, 23, 4340f66f451Sopenharmony_ci 28, 33, 37, 39, 41, 43, 45, 47, 49, 51, 4350f66f451Sopenharmony_ci 53, 55, 57, 59, 61, 63, 67, 70, 74, 77, 4360f66f451Sopenharmony_ci 81, 84, 85, 88, 91, 94, 97, 100, 103, 107, 4370f66f451Sopenharmony_ci 112, 117, 122, 128, 132, 133, 137, 138, 141, 144, 4380f66f451Sopenharmony_ci 147, 149, 153, 154, 157, 160, 163, 166, 169, 174, 4390f66f451Sopenharmony_ci 178, 181, 186, 187, 190, 194, 196, 200, 201, 204, 4400f66f451Sopenharmony_ci 207, 210, 214, 217, 219, 223, 224, 227, 230, 233, 4410f66f451Sopenharmony_ci 237, 241, 244, 247, 250, 251, 254, 257, 260, 265, 4420f66f451Sopenharmony_ci 269, 273, 274, 277, 279, 281, 284, 287, 290, 292, 4430f66f451Sopenharmony_ci 295, 296, 299, 301, 305, 309, 313, 316, 320, 324, 4440f66f451Sopenharmony_ci 326 4450f66f451Sopenharmony_ci}; 4460f66f451Sopenharmony_ci 4470f66f451Sopenharmony_ci/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 4480f66f451Sopenharmony_cistatic const yysigned_char yyrhs[] = 4490f66f451Sopenharmony_ci{ 4500f66f451Sopenharmony_ci 37, 0, -1, 38, -1, -1, 38, 40, -1, 38, 4510f66f451Sopenharmony_ci 54, -1, 38, 65, -1, 38, 3, 75, 77, -1, 4520f66f451Sopenharmony_ci 38, 76, -1, 38, 26, 1, 31, -1, 38, 39, 4530f66f451Sopenharmony_ci 1, 31, -1, 38, 1, 31, -1, 16, -1, 19, 4540f66f451Sopenharmony_ci -1, 20, -1, 22, -1, 18, -1, 23, -1, 21, 4550f66f451Sopenharmony_ci -1, 31, -1, 60, -1, 69, -1, 43, -1, 45, 4560f66f451Sopenharmony_ci -1, 67, -1, 26, 1, 31, -1, 1, 31, -1, 4570f66f451Sopenharmony_ci 10, 26, 31, -1, 42, 46, -1, 11, 26, 31, 4580f66f451Sopenharmony_ci -1, 44, 46, -1, -1, 46, 47, -1, 46, 48, 4590f66f451Sopenharmony_ci -1, 46, 73, -1, 46, 71, -1, 46, 41, -1, 4600f66f451Sopenharmony_ci 46, 31, -1, 20, 74, 31, -1, 19, 75, 78, 4610f66f451Sopenharmony_ci 31, -1, 21, 79, 78, 31, -1, 22, 26, 78, 4620f66f451Sopenharmony_ci 31, -1, 23, 80, 80, 78, 31, -1, 24, 49, 4630f66f451Sopenharmony_ci 31, -1, -1, 49, 26, 50, -1, -1, 34, 75, 4640f66f451Sopenharmony_ci -1, 7, 31, -1, 51, 55, -1, 76, -1, 52, 4650f66f451Sopenharmony_ci 57, 53, -1, -1, 55, 56, -1, 55, 73, -1, 4660f66f451Sopenharmony_ci 55, 71, -1, 55, 31, -1, 55, 41, -1, 19, 4670f66f451Sopenharmony_ci 75, 78, 31, -1, 20, 74, 31, -1, 18, 31, 4680f66f451Sopenharmony_ci -1, 21, 26, 78, 31, -1, -1, 57, 40, -1, 4690f66f451Sopenharmony_ci 14, 79, 77, -1, 76, -1, 58, 61, 59, -1, 4700f66f451Sopenharmony_ci -1, 61, 40, -1, 61, 65, -1, 61, 54, -1, 4710f66f451Sopenharmony_ci 4, 75, 31, -1, 62, 72, -1, 76, -1, 63, 4720f66f451Sopenharmony_ci 66, 64, -1, -1, 66, 40, -1, 66, 65, -1, 4730f66f451Sopenharmony_ci 66, 54, -1, 6, 75, 31, -1, 9, 75, 31, 4740f66f451Sopenharmony_ci -1, 68, 72, -1, 12, 31, -1, 70, 13, -1, 4750f66f451Sopenharmony_ci -1, 72, 73, -1, 72, 31, -1, 72, 41, -1, 4760f66f451Sopenharmony_ci 16, 25, 79, 31, -1, 16, 79, 31, -1, 17, 4770f66f451Sopenharmony_ci 79, 31, -1, -1, 75, 78, -1, 26, -1, 27, 4780f66f451Sopenharmony_ci -1, 5, 31, -1, 8, 31, -1, 15, 31, -1, 4790f66f451Sopenharmony_ci 31, -1, 77, 31, -1, -1, 14, 79, -1, 80, 4800f66f451Sopenharmony_ci -1, 80, 34, 80, -1, 80, 28, 80, -1, 30, 4810f66f451Sopenharmony_ci 79, 29, -1, 35, 79, -1, 79, 32, 79, -1, 4820f66f451Sopenharmony_ci 79, 33, 79, -1, 26, -1, 27, -1 4830f66f451Sopenharmony_ci}; 4840f66f451Sopenharmony_ci 4850f66f451Sopenharmony_ci/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 4860f66f451Sopenharmony_cistatic const unsigned short int yyrline[] = 4870f66f451Sopenharmony_ci{ 4880f66f451Sopenharmony_ci 0, 105, 105, 107, 109, 110, 111, 112, 113, 114, 4890f66f451Sopenharmony_ci 115, 119, 123, 123, 123, 123, 123, 123, 123, 127, 4900f66f451Sopenharmony_ci 128, 129, 130, 131, 132, 136, 137, 143, 151, 157, 4910f66f451Sopenharmony_ci 165, 175, 177, 178, 179, 180, 181, 182, 185, 193, 4920f66f451Sopenharmony_ci 199, 209, 215, 221, 224, 226, 237, 238, 243, 252, 4930f66f451Sopenharmony_ci 257, 265, 268, 270, 271, 272, 273, 274, 277, 283, 4940f66f451Sopenharmony_ci 294, 300, 310, 312, 317, 325, 333, 336, 338, 339, 4950f66f451Sopenharmony_ci 340, 345, 352, 357, 365, 368, 370, 371, 372, 375, 4960f66f451Sopenharmony_ci 383, 390, 397, 403, 410, 412, 413, 414, 417, 422, 4970f66f451Sopenharmony_ci 427, 435, 437, 442, 443, 446, 447, 448, 452, 453, 4980f66f451Sopenharmony_ci 456, 457, 460, 461, 462, 463, 464, 465, 466, 469, 4990f66f451Sopenharmony_ci 470 5000f66f451Sopenharmony_ci}; 5010f66f451Sopenharmony_ci#endif 5020f66f451Sopenharmony_ci 5030f66f451Sopenharmony_ci#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 5040f66f451Sopenharmony_ci/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 5050f66f451Sopenharmony_ci First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 5060f66f451Sopenharmony_cistatic const char *const yytname[] = 5070f66f451Sopenharmony_ci{ 5080f66f451Sopenharmony_ci "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", 5090f66f451Sopenharmony_ci "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 5100f66f451Sopenharmony_ci "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 5110f66f451Sopenharmony_ci "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", 5120f66f451Sopenharmony_ci "T_SELECT", "T_RANGE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", 5130f66f451Sopenharmony_ci "T_UNEQUAL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", 5140f66f451Sopenharmony_ci "T_EQUAL", "T_NOT", "$accept", "input", "stmt_list", "option_name", 5150f66f451Sopenharmony_ci "common_stmt", "option_error", "config_entry_start", "config_stmt", 5160f66f451Sopenharmony_ci "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", 5170f66f451Sopenharmony_ci "config_option", "symbol_option", "symbol_option_list", 5180f66f451Sopenharmony_ci "symbol_option_arg", "choice", "choice_entry", "choice_end", 5190f66f451Sopenharmony_ci "choice_stmt", "choice_option_list", "choice_option", "choice_block", 5200f66f451Sopenharmony_ci "if_entry", "if_end", "if_stmt", "if_block", "menu", "menu_entry", 5210f66f451Sopenharmony_ci "menu_end", "menu_stmt", "menu_block", "source_stmt", "comment", 5220f66f451Sopenharmony_ci "comment_stmt", "help_start", "help", "depends_list", "depends", 5230f66f451Sopenharmony_ci "prompt_stmt_opt", "prompt", "end", "nl", "if_expr", "expr", "symbol", 0 5240f66f451Sopenharmony_ci}; 5250f66f451Sopenharmony_ci#endif 5260f66f451Sopenharmony_ci 5270f66f451Sopenharmony_ci# ifdef YYPRINT 5280f66f451Sopenharmony_ci/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 5290f66f451Sopenharmony_ci token YYLEX-NUM. */ 5300f66f451Sopenharmony_cistatic const unsigned short int yytoknum[] = 5310f66f451Sopenharmony_ci{ 5320f66f451Sopenharmony_ci 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 5330f66f451Sopenharmony_ci 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 5340f66f451Sopenharmony_ci 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 5350f66f451Sopenharmony_ci 285, 286, 287, 288, 289, 290 5360f66f451Sopenharmony_ci}; 5370f66f451Sopenharmony_ci# endif 5380f66f451Sopenharmony_ci 5390f66f451Sopenharmony_ci/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 5400f66f451Sopenharmony_cistatic const unsigned char yyr1[] = 5410f66f451Sopenharmony_ci{ 5420f66f451Sopenharmony_ci 0, 36, 37, 38, 38, 38, 38, 38, 38, 38, 5430f66f451Sopenharmony_ci 38, 38, 39, 39, 39, 39, 39, 39, 39, 40, 5440f66f451Sopenharmony_ci 40, 40, 40, 40, 40, 41, 41, 42, 43, 44, 5450f66f451Sopenharmony_ci 45, 46, 46, 46, 46, 46, 46, 46, 47, 47, 5460f66f451Sopenharmony_ci 47, 47, 47, 48, 49, 49, 50, 50, 51, 52, 5470f66f451Sopenharmony_ci 53, 54, 55, 55, 55, 55, 55, 55, 56, 56, 5480f66f451Sopenharmony_ci 56, 56, 57, 57, 58, 59, 60, 61, 61, 61, 5490f66f451Sopenharmony_ci 61, 62, 63, 64, 65, 66, 66, 66, 66, 67, 5500f66f451Sopenharmony_ci 68, 69, 70, 71, 72, 72, 72, 72, 73, 73, 5510f66f451Sopenharmony_ci 73, 74, 74, 75, 75, 76, 76, 76, 77, 77, 5520f66f451Sopenharmony_ci 78, 78, 79, 79, 79, 79, 79, 79, 79, 80, 5530f66f451Sopenharmony_ci 80 5540f66f451Sopenharmony_ci}; 5550f66f451Sopenharmony_ci 5560f66f451Sopenharmony_ci/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 5570f66f451Sopenharmony_cistatic const unsigned char yyr2[] = 5580f66f451Sopenharmony_ci{ 5590f66f451Sopenharmony_ci 0, 2, 1, 0, 2, 2, 2, 4, 2, 4, 5600f66f451Sopenharmony_ci 4, 3, 1, 1, 1, 1, 1, 1, 1, 1, 5610f66f451Sopenharmony_ci 1, 1, 1, 1, 1, 3, 2, 3, 2, 3, 5620f66f451Sopenharmony_ci 2, 0, 2, 2, 2, 2, 2, 2, 3, 4, 5630f66f451Sopenharmony_ci 4, 4, 5, 3, 0, 3, 0, 2, 2, 2, 5640f66f451Sopenharmony_ci 1, 3, 0, 2, 2, 2, 2, 2, 4, 3, 5650f66f451Sopenharmony_ci 2, 4, 0, 2, 3, 1, 3, 0, 2, 2, 5660f66f451Sopenharmony_ci 2, 3, 2, 1, 3, 0, 2, 2, 2, 3, 5670f66f451Sopenharmony_ci 3, 2, 2, 2, 0, 2, 2, 2, 4, 3, 5680f66f451Sopenharmony_ci 3, 0, 2, 1, 1, 2, 2, 2, 1, 2, 5690f66f451Sopenharmony_ci 0, 2, 1, 3, 3, 3, 2, 3, 3, 1, 5700f66f451Sopenharmony_ci 1 5710f66f451Sopenharmony_ci}; 5720f66f451Sopenharmony_ci 5730f66f451Sopenharmony_ci/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 5740f66f451Sopenharmony_ci STATE-NUM when YYTABLE doesn't specify something else to do. Zero 5750f66f451Sopenharmony_ci means the default is an error. */ 5760f66f451Sopenharmony_cistatic const unsigned char yydefact[] = 5770f66f451Sopenharmony_ci{ 5780f66f451Sopenharmony_ci 3, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5790f66f451Sopenharmony_ci 0, 0, 0, 0, 0, 0, 12, 16, 13, 14, 5800f66f451Sopenharmony_ci 18, 15, 17, 0, 19, 0, 4, 31, 22, 31, 5810f66f451Sopenharmony_ci 23, 52, 62, 5, 67, 20, 84, 75, 6, 24, 5820f66f451Sopenharmony_ci 84, 21, 8, 11, 93, 94, 0, 0, 95, 0, 5830f66f451Sopenharmony_ci 48, 96, 0, 0, 0, 109, 110, 0, 0, 0, 5840f66f451Sopenharmony_ci 102, 97, 0, 0, 0, 0, 0, 0, 0, 0, 5850f66f451Sopenharmony_ci 0, 0, 98, 7, 71, 79, 80, 27, 29, 0, 5860f66f451Sopenharmony_ci 106, 0, 0, 64, 0, 0, 9, 10, 0, 0, 5870f66f451Sopenharmony_ci 0, 0, 0, 91, 0, 0, 0, 44, 0, 37, 5880f66f451Sopenharmony_ci 36, 32, 33, 0, 35, 34, 0, 0, 91, 0, 5890f66f451Sopenharmony_ci 56, 57, 53, 55, 54, 63, 51, 50, 68, 70, 5900f66f451Sopenharmony_ci 66, 69, 65, 86, 87, 85, 76, 78, 74, 77, 5910f66f451Sopenharmony_ci 73, 99, 105, 107, 108, 104, 103, 26, 82, 0, 5920f66f451Sopenharmony_ci 0, 0, 100, 0, 100, 100, 100, 0, 0, 0, 5930f66f451Sopenharmony_ci 83, 60, 100, 0, 100, 0, 89, 90, 0, 0, 5940f66f451Sopenharmony_ci 38, 92, 0, 0, 100, 46, 43, 25, 0, 59, 5950f66f451Sopenharmony_ci 0, 88, 101, 39, 40, 41, 0, 0, 45, 58, 5960f66f451Sopenharmony_ci 61, 42, 47 5970f66f451Sopenharmony_ci}; 5980f66f451Sopenharmony_ci 5990f66f451Sopenharmony_ci/* YYDEFGOTO[NTERM-NUM]. */ 6000f66f451Sopenharmony_cistatic const short int yydefgoto[] = 6010f66f451Sopenharmony_ci{ 6020f66f451Sopenharmony_ci -1, 1, 2, 25, 26, 100, 27, 28, 29, 30, 6030f66f451Sopenharmony_ci 64, 101, 102, 148, 178, 31, 32, 116, 33, 66, 6040f66f451Sopenharmony_ci 112, 67, 34, 120, 35, 68, 36, 37, 128, 38, 6050f66f451Sopenharmony_ci 70, 39, 40, 41, 103, 104, 69, 105, 143, 144, 6060f66f451Sopenharmony_ci 42, 73, 159, 59, 60 6070f66f451Sopenharmony_ci}; 6080f66f451Sopenharmony_ci 6090f66f451Sopenharmony_ci/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 6100f66f451Sopenharmony_ci STATE-NUM. */ 6110f66f451Sopenharmony_ci#define YYPACT_NINF -135 6120f66f451Sopenharmony_cistatic const short int yypact[] = 6130f66f451Sopenharmony_ci{ 6140f66f451Sopenharmony_ci -135, 2, 170, -135, -14, 56, 56, -8, 56, 24, 6150f66f451Sopenharmony_ci 67, 56, 7, 14, 62, 97, -135, -135, -135, -135, 6160f66f451Sopenharmony_ci -135, -135, -135, 156, -135, 166, -135, -135, -135, -135, 6170f66f451Sopenharmony_ci -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 6180f66f451Sopenharmony_ci -135, -135, -135, -135, -135, -135, 138, 151, -135, 152, 6190f66f451Sopenharmony_ci -135, -135, 163, 167, 176, -135, -135, 62, 62, 185, 6200f66f451Sopenharmony_ci -19, -135, 188, 190, 42, 103, 194, 85, 70, 222, 6210f66f451Sopenharmony_ci 70, 132, -135, 191, -135, -135, -135, -135, -135, 127, 6220f66f451Sopenharmony_ci -135, 62, 62, 191, 104, 104, -135, -135, 193, 203, 6230f66f451Sopenharmony_ci 9, 62, 56, 56, 62, 161, 104, -135, 196, -135, 6240f66f451Sopenharmony_ci -135, -135, -135, 233, -135, -135, 204, 56, 56, 221, 6250f66f451Sopenharmony_ci -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 6260f66f451Sopenharmony_ci -135, -135, -135, -135, -135, -135, -135, -135, -135, -135, 6270f66f451Sopenharmony_ci -135, -135, -135, 219, -135, -135, -135, -135, -135, 62, 6280f66f451Sopenharmony_ci 209, 212, 240, 224, 240, -1, 240, 104, 41, 225, 6290f66f451Sopenharmony_ci -135, -135, 240, 226, 240, 218, -135, -135, 62, 227, 6300f66f451Sopenharmony_ci -135, -135, 228, 229, 240, 230, -135, -135, 231, -135, 6310f66f451Sopenharmony_ci 232, -135, 112, -135, -135, -135, 234, 56, -135, -135, 6320f66f451Sopenharmony_ci -135, -135, -135 6330f66f451Sopenharmony_ci}; 6340f66f451Sopenharmony_ci 6350f66f451Sopenharmony_ci/* YYPGOTO[NTERM-NUM]. */ 6360f66f451Sopenharmony_cistatic const short int yypgoto[] = 6370f66f451Sopenharmony_ci{ 6380f66f451Sopenharmony_ci -135, -135, -135, -135, 94, -45, -135, -135, -135, -135, 6390f66f451Sopenharmony_ci 237, -135, -135, -135, -135, -135, -135, -135, -54, -135, 6400f66f451Sopenharmony_ci -135, -135, -135, -135, -135, -135, -135, -135, -135, 1, 6410f66f451Sopenharmony_ci -135, -135, -135, -135, -135, 195, 235, -44, 159, -5, 6420f66f451Sopenharmony_ci 98, 210, -134, -53, -77 6430f66f451Sopenharmony_ci}; 6440f66f451Sopenharmony_ci 6450f66f451Sopenharmony_ci/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 6460f66f451Sopenharmony_ci positive, shift that token. If negative, reduce the rule which 6470f66f451Sopenharmony_ci number is the opposite. If zero, do what YYDEFACT says. 6480f66f451Sopenharmony_ci If YYTABLE_NINF, syntax error. */ 6490f66f451Sopenharmony_ci#define YYTABLE_NINF -82 6500f66f451Sopenharmony_cistatic const short int yytable[] = 6510f66f451Sopenharmony_ci{ 6520f66f451Sopenharmony_ci 46, 47, 3, 49, 79, 80, 52, 135, 136, 84, 6530f66f451Sopenharmony_ci 161, 162, 163, 158, 119, 85, 127, 43, 168, 147, 6540f66f451Sopenharmony_ci 170, 111, 114, 48, 124, 125, 124, 125, 133, 134, 6550f66f451Sopenharmony_ci 176, 81, 82, 53, 139, 55, 56, 140, 141, 57, 6560f66f451Sopenharmony_ci 54, 145, -28, 88, 58, -28, -28, -28, -28, -28, 6570f66f451Sopenharmony_ci -28, -28, -28, -28, 89, 50, -28, -28, 90, 91, 6580f66f451Sopenharmony_ci -28, 92, 93, 94, 95, 96, 97, 165, 98, 121, 6590f66f451Sopenharmony_ci 164, 129, 166, 99, 6, 7, 8, 9, 10, 11, 6600f66f451Sopenharmony_ci 12, 13, 44, 45, 14, 15, 155, 142, 55, 56, 6610f66f451Sopenharmony_ci 7, 8, 57, 10, 11, 12, 13, 58, 51, 14, 6620f66f451Sopenharmony_ci 15, 24, 152, -30, 88, 172, -30, -30, -30, -30, 6630f66f451Sopenharmony_ci -30, -30, -30, -30, -30, 89, 24, -30, -30, 90, 6640f66f451Sopenharmony_ci 91, -30, 92, 93, 94, 95, 96, 97, 61, 98, 6650f66f451Sopenharmony_ci 55, 56, -81, 88, 99, -81, -81, -81, -81, -81, 6660f66f451Sopenharmony_ci -81, -81, -81, -81, 81, 82, -81, -81, 90, 91, 6670f66f451Sopenharmony_ci -81, -81, -81, -81, -81, -81, 132, 62, 98, 81, 6680f66f451Sopenharmony_ci 82, 115, 118, 123, 126, 117, 122, 63, 130, 72, 6690f66f451Sopenharmony_ci -2, 4, 182, 5, 6, 7, 8, 9, 10, 11, 6700f66f451Sopenharmony_ci 12, 13, 74, 75, 14, 15, 16, 146, 17, 18, 6710f66f451Sopenharmony_ci 19, 20, 21, 22, 76, 88, 23, 149, 77, -49, 6720f66f451Sopenharmony_ci -49, 24, -49, -49, -49, -49, 89, 78, -49, -49, 6730f66f451Sopenharmony_ci 90, 91, 106, 107, 108, 109, 72, 81, 82, 86, 6740f66f451Sopenharmony_ci 98, 87, 131, 88, 137, 110, -72, -72, -72, -72, 6750f66f451Sopenharmony_ci -72, -72, -72, -72, 138, 151, -72, -72, 90, 91, 6760f66f451Sopenharmony_ci 156, 81, 82, 157, 81, 82, 150, 154, 98, 171, 6770f66f451Sopenharmony_ci 81, 82, 82, 123, 158, 160, 167, 169, 173, 174, 6780f66f451Sopenharmony_ci 175, 113, 179, 180, 177, 181, 65, 153, 0, 83, 6790f66f451Sopenharmony_ci 0, 0, 0, 0, 0, 71 6800f66f451Sopenharmony_ci}; 6810f66f451Sopenharmony_ci 6820f66f451Sopenharmony_cistatic const short int yycheck[] = 6830f66f451Sopenharmony_ci{ 6840f66f451Sopenharmony_ci 5, 6, 0, 8, 57, 58, 11, 84, 85, 28, 6850f66f451Sopenharmony_ci 144, 145, 146, 14, 68, 34, 70, 31, 152, 96, 6860f66f451Sopenharmony_ci 154, 66, 66, 31, 69, 69, 71, 71, 81, 82, 6870f66f451Sopenharmony_ci 164, 32, 33, 26, 25, 26, 27, 90, 91, 30, 6880f66f451Sopenharmony_ci 26, 94, 0, 1, 35, 3, 4, 5, 6, 7, 6890f66f451Sopenharmony_ci 8, 9, 10, 11, 12, 31, 14, 15, 16, 17, 6900f66f451Sopenharmony_ci 18, 19, 20, 21, 22, 23, 24, 26, 26, 68, 6910f66f451Sopenharmony_ci 147, 70, 31, 31, 4, 5, 6, 7, 8, 9, 6920f66f451Sopenharmony_ci 10, 11, 26, 27, 14, 15, 139, 92, 26, 27, 6930f66f451Sopenharmony_ci 5, 6, 30, 8, 9, 10, 11, 35, 31, 14, 6940f66f451Sopenharmony_ci 15, 31, 107, 0, 1, 158, 3, 4, 5, 6, 6950f66f451Sopenharmony_ci 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, 6960f66f451Sopenharmony_ci 17, 18, 19, 20, 21, 22, 23, 24, 31, 26, 6970f66f451Sopenharmony_ci 26, 27, 0, 1, 31, 3, 4, 5, 6, 7, 6980f66f451Sopenharmony_ci 8, 9, 10, 11, 32, 33, 14, 15, 16, 17, 6990f66f451Sopenharmony_ci 18, 19, 20, 21, 22, 23, 29, 1, 26, 32, 7000f66f451Sopenharmony_ci 33, 67, 68, 31, 70, 67, 68, 1, 70, 31, 7010f66f451Sopenharmony_ci 0, 1, 177, 3, 4, 5, 6, 7, 8, 9, 7020f66f451Sopenharmony_ci 10, 11, 31, 31, 14, 15, 16, 26, 18, 19, 7030f66f451Sopenharmony_ci 20, 21, 22, 23, 31, 1, 26, 1, 31, 5, 7040f66f451Sopenharmony_ci 6, 31, 8, 9, 10, 11, 12, 31, 14, 15, 7050f66f451Sopenharmony_ci 16, 17, 18, 19, 20, 21, 31, 32, 33, 31, 7060f66f451Sopenharmony_ci 26, 31, 31, 1, 31, 31, 4, 5, 6, 7, 7070f66f451Sopenharmony_ci 8, 9, 10, 11, 31, 31, 14, 15, 16, 17, 7080f66f451Sopenharmony_ci 31, 32, 33, 31, 32, 33, 13, 26, 26, 31, 7090f66f451Sopenharmony_ci 32, 33, 33, 31, 14, 31, 31, 31, 31, 31, 7100f66f451Sopenharmony_ci 31, 66, 31, 31, 34, 31, 29, 108, -1, 59, 7110f66f451Sopenharmony_ci -1, -1, -1, -1, -1, 40 7120f66f451Sopenharmony_ci}; 7130f66f451Sopenharmony_ci 7140f66f451Sopenharmony_ci/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 7150f66f451Sopenharmony_ci symbol of state STATE-NUM. */ 7160f66f451Sopenharmony_cistatic const unsigned char yystos[] = 7170f66f451Sopenharmony_ci{ 7180f66f451Sopenharmony_ci 0, 37, 38, 0, 1, 3, 4, 5, 6, 7, 7190f66f451Sopenharmony_ci 8, 9, 10, 11, 14, 15, 16, 18, 19, 20, 7200f66f451Sopenharmony_ci 21, 22, 23, 26, 31, 39, 40, 42, 43, 44, 7210f66f451Sopenharmony_ci 45, 51, 52, 54, 58, 60, 62, 63, 65, 67, 7220f66f451Sopenharmony_ci 68, 69, 76, 31, 26, 27, 75, 75, 31, 75, 7230f66f451Sopenharmony_ci 31, 31, 75, 26, 26, 26, 27, 30, 35, 79, 7240f66f451Sopenharmony_ci 80, 31, 1, 1, 46, 46, 55, 57, 61, 72, 7250f66f451Sopenharmony_ci 66, 72, 31, 77, 31, 31, 31, 31, 31, 79, 7260f66f451Sopenharmony_ci 79, 32, 33, 77, 28, 34, 31, 31, 1, 12, 7270f66f451Sopenharmony_ci 16, 17, 19, 20, 21, 22, 23, 24, 26, 31, 7280f66f451Sopenharmony_ci 41, 47, 48, 70, 71, 73, 18, 19, 20, 21, 7290f66f451Sopenharmony_ci 31, 41, 56, 71, 73, 40, 53, 76, 40, 54, 7300f66f451Sopenharmony_ci 59, 65, 76, 31, 41, 73, 40, 54, 64, 65, 7310f66f451Sopenharmony_ci 76, 31, 29, 79, 79, 80, 80, 31, 31, 25, 7320f66f451Sopenharmony_ci 79, 79, 75, 74, 75, 79, 26, 80, 49, 1, 7330f66f451Sopenharmony_ci 13, 31, 75, 74, 26, 79, 31, 31, 14, 78, 7340f66f451Sopenharmony_ci 31, 78, 78, 78, 80, 26, 31, 31, 78, 31, 7350f66f451Sopenharmony_ci 78, 31, 79, 31, 31, 31, 78, 34, 50, 31, 7360f66f451Sopenharmony_ci 31, 31, 75 7370f66f451Sopenharmony_ci}; 7380f66f451Sopenharmony_ci 7390f66f451Sopenharmony_ci#define yyerrok (yyerrstatus = 0) 7400f66f451Sopenharmony_ci#define yyclearin (yychar = YYEMPTY) 7410f66f451Sopenharmony_ci#define YYEMPTY (-2) 7420f66f451Sopenharmony_ci#define YYEOF 0 7430f66f451Sopenharmony_ci 7440f66f451Sopenharmony_ci#define YYACCEPT goto yyacceptlab 7450f66f451Sopenharmony_ci#define YYABORT goto yyabortlab 7460f66f451Sopenharmony_ci#define YYERROR goto yyerrorlab 7470f66f451Sopenharmony_ci 7480f66f451Sopenharmony_ci 7490f66f451Sopenharmony_ci/* Like YYERROR except do call yyerror. This remains here temporarily 7500f66f451Sopenharmony_ci to ease the transition to the new meaning of YYERROR, for GCC. 7510f66f451Sopenharmony_ci Once GCC version 2 has supplanted version 1, this can go. */ 7520f66f451Sopenharmony_ci 7530f66f451Sopenharmony_ci#define YYFAIL goto yyerrlab 7540f66f451Sopenharmony_ci 7550f66f451Sopenharmony_ci#define YYRECOVERING() (!!yyerrstatus) 7560f66f451Sopenharmony_ci 7570f66f451Sopenharmony_ci#define YYBACKUP(Token, Value) \ 7580f66f451Sopenharmony_cido \ 7590f66f451Sopenharmony_ci if (yychar == YYEMPTY && yylen == 1) \ 7600f66f451Sopenharmony_ci { \ 7610f66f451Sopenharmony_ci yychar = (Token); \ 7620f66f451Sopenharmony_ci yylval = (Value); \ 7630f66f451Sopenharmony_ci yytoken = YYTRANSLATE (yychar); \ 7640f66f451Sopenharmony_ci YYPOPSTACK; \ 7650f66f451Sopenharmony_ci goto yybackup; \ 7660f66f451Sopenharmony_ci } \ 7670f66f451Sopenharmony_ci else \ 7680f66f451Sopenharmony_ci { \ 7690f66f451Sopenharmony_ci yyerror (YY_("syntax error: cannot back up")); \ 7700f66f451Sopenharmony_ci YYERROR; \ 7710f66f451Sopenharmony_ci } \ 7720f66f451Sopenharmony_ciwhile (0) 7730f66f451Sopenharmony_ci 7740f66f451Sopenharmony_ci 7750f66f451Sopenharmony_ci#define YYTERROR 1 7760f66f451Sopenharmony_ci#define YYERRCODE 256 7770f66f451Sopenharmony_ci 7780f66f451Sopenharmony_ci 7790f66f451Sopenharmony_ci/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 7800f66f451Sopenharmony_ci If N is 0, then set CURRENT to the empty location which ends 7810f66f451Sopenharmony_ci the previous symbol: RHS[0] (always defined). */ 7820f66f451Sopenharmony_ci 7830f66f451Sopenharmony_ci#define YYRHSLOC(Rhs, K) ((Rhs)[K]) 7840f66f451Sopenharmony_ci#ifndef YYLLOC_DEFAULT 7850f66f451Sopenharmony_ci# define YYLLOC_DEFAULT(Current, Rhs, N) \ 7860f66f451Sopenharmony_ci do \ 7870f66f451Sopenharmony_ci if (N) \ 7880f66f451Sopenharmony_ci { \ 7890f66f451Sopenharmony_ci (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 7900f66f451Sopenharmony_ci (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 7910f66f451Sopenharmony_ci (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 7920f66f451Sopenharmony_ci (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 7930f66f451Sopenharmony_ci } \ 7940f66f451Sopenharmony_ci else \ 7950f66f451Sopenharmony_ci { \ 7960f66f451Sopenharmony_ci (Current).first_line = (Current).last_line = \ 7970f66f451Sopenharmony_ci YYRHSLOC (Rhs, 0).last_line; \ 7980f66f451Sopenharmony_ci (Current).first_column = (Current).last_column = \ 7990f66f451Sopenharmony_ci YYRHSLOC (Rhs, 0).last_column; \ 8000f66f451Sopenharmony_ci } \ 8010f66f451Sopenharmony_ci while (0) 8020f66f451Sopenharmony_ci#endif 8030f66f451Sopenharmony_ci 8040f66f451Sopenharmony_ci 8050f66f451Sopenharmony_ci/* YY_LOCATION_PRINT -- Print the location on the stream. 8060f66f451Sopenharmony_ci This macro was not mandated originally: define only if we know 8070f66f451Sopenharmony_ci we won't break user code: when these are the locations we know. */ 8080f66f451Sopenharmony_ci 8090f66f451Sopenharmony_ci#ifndef YY_LOCATION_PRINT 8100f66f451Sopenharmony_ci# if YYLTYPE_IS_TRIVIAL 8110f66f451Sopenharmony_ci# define YY_LOCATION_PRINT(File, Loc) \ 8120f66f451Sopenharmony_ci fprintf (File, "%d.%d-%d.%d", \ 8130f66f451Sopenharmony_ci (Loc).first_line, (Loc).first_column, \ 8140f66f451Sopenharmony_ci (Loc).last_line, (Loc).last_column) 8150f66f451Sopenharmony_ci# else 8160f66f451Sopenharmony_ci# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 8170f66f451Sopenharmony_ci# endif 8180f66f451Sopenharmony_ci#endif 8190f66f451Sopenharmony_ci 8200f66f451Sopenharmony_ci 8210f66f451Sopenharmony_ci/* YYLEX -- calling `yylex' with the right arguments. */ 8220f66f451Sopenharmony_ci 8230f66f451Sopenharmony_ci#ifdef YYLEX_PARAM 8240f66f451Sopenharmony_ci# define YYLEX yylex (YYLEX_PARAM) 8250f66f451Sopenharmony_ci#else 8260f66f451Sopenharmony_ci# define YYLEX yylex () 8270f66f451Sopenharmony_ci#endif 8280f66f451Sopenharmony_ci 8290f66f451Sopenharmony_ci/* Enable debugging if requested. */ 8300f66f451Sopenharmony_ci#if YYDEBUG 8310f66f451Sopenharmony_ci 8320f66f451Sopenharmony_ci# ifndef YYFPRINTF 8330f66f451Sopenharmony_ci# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 8340f66f451Sopenharmony_ci# define YYFPRINTF fprintf 8350f66f451Sopenharmony_ci# endif 8360f66f451Sopenharmony_ci 8370f66f451Sopenharmony_ci# define YYDPRINTF(Args) \ 8380f66f451Sopenharmony_cido { \ 8390f66f451Sopenharmony_ci if (yydebug) \ 8400f66f451Sopenharmony_ci YYFPRINTF Args; \ 8410f66f451Sopenharmony_ci} while (0) 8420f66f451Sopenharmony_ci 8430f66f451Sopenharmony_ci# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 8440f66f451Sopenharmony_cido { \ 8450f66f451Sopenharmony_ci if (yydebug) \ 8460f66f451Sopenharmony_ci { \ 8470f66f451Sopenharmony_ci YYFPRINTF (stderr, "%s ", Title); \ 8480f66f451Sopenharmony_ci yysymprint (stderr, \ 8490f66f451Sopenharmony_ci Type, Value); \ 8500f66f451Sopenharmony_ci YYFPRINTF (stderr, "\n"); \ 8510f66f451Sopenharmony_ci } \ 8520f66f451Sopenharmony_ci} while (0) 8530f66f451Sopenharmony_ci 8540f66f451Sopenharmony_ci/*------------------------------------------------------------------. 8550f66f451Sopenharmony_ci| yy_stack_print -- Print the state stack from its BOTTOM up to its | 8560f66f451Sopenharmony_ci| TOP (included). | 8570f66f451Sopenharmony_ci`------------------------------------------------------------------*/ 8580f66f451Sopenharmony_ci 8590f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 8600f66f451Sopenharmony_cistatic void 8610f66f451Sopenharmony_ciyy_stack_print (short int *bottom, short int *top) 8620f66f451Sopenharmony_ci#else 8630f66f451Sopenharmony_cistatic void 8640f66f451Sopenharmony_ciyy_stack_print (bottom, top) 8650f66f451Sopenharmony_ci short int *bottom; 8660f66f451Sopenharmony_ci short int *top; 8670f66f451Sopenharmony_ci#endif 8680f66f451Sopenharmony_ci{ 8690f66f451Sopenharmony_ci YYFPRINTF (stderr, "Stack now"); 8700f66f451Sopenharmony_ci for (/* Nothing. */; bottom <= top; ++bottom) 8710f66f451Sopenharmony_ci YYFPRINTF (stderr, " %d", *bottom); 8720f66f451Sopenharmony_ci YYFPRINTF (stderr, "\n"); 8730f66f451Sopenharmony_ci} 8740f66f451Sopenharmony_ci 8750f66f451Sopenharmony_ci# define YY_STACK_PRINT(Bottom, Top) \ 8760f66f451Sopenharmony_cido { \ 8770f66f451Sopenharmony_ci if (yydebug) \ 8780f66f451Sopenharmony_ci yy_stack_print ((Bottom), (Top)); \ 8790f66f451Sopenharmony_ci} while (0) 8800f66f451Sopenharmony_ci 8810f66f451Sopenharmony_ci 8820f66f451Sopenharmony_ci/*------------------------------------------------. 8830f66f451Sopenharmony_ci| Report that the YYRULE is going to be reduced. | 8840f66f451Sopenharmony_ci`------------------------------------------------*/ 8850f66f451Sopenharmony_ci 8860f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 8870f66f451Sopenharmony_cistatic void 8880f66f451Sopenharmony_ciyy_reduce_print (int yyrule) 8890f66f451Sopenharmony_ci#else 8900f66f451Sopenharmony_cistatic void 8910f66f451Sopenharmony_ciyy_reduce_print (yyrule) 8920f66f451Sopenharmony_ci int yyrule; 8930f66f451Sopenharmony_ci#endif 8940f66f451Sopenharmony_ci{ 8950f66f451Sopenharmony_ci int yyi; 8960f66f451Sopenharmony_ci unsigned long int yylno = yyrline[yyrule]; 8970f66f451Sopenharmony_ci YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", 8980f66f451Sopenharmony_ci yyrule - 1, yylno); 8990f66f451Sopenharmony_ci /* Print the symbols being reduced, and their result. */ 9000f66f451Sopenharmony_ci for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) 9010f66f451Sopenharmony_ci YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); 9020f66f451Sopenharmony_ci YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); 9030f66f451Sopenharmony_ci} 9040f66f451Sopenharmony_ci 9050f66f451Sopenharmony_ci# define YY_REDUCE_PRINT(Rule) \ 9060f66f451Sopenharmony_cido { \ 9070f66f451Sopenharmony_ci if (yydebug) \ 9080f66f451Sopenharmony_ci yy_reduce_print (Rule); \ 9090f66f451Sopenharmony_ci} while (0) 9100f66f451Sopenharmony_ci 9110f66f451Sopenharmony_ci/* Nonzero means print parse trace. It is left uninitialized so that 9120f66f451Sopenharmony_ci multiple parsers can coexist. */ 9130f66f451Sopenharmony_ciint yydebug; 9140f66f451Sopenharmony_ci#else /* !YYDEBUG */ 9150f66f451Sopenharmony_ci# define YYDPRINTF(Args) 9160f66f451Sopenharmony_ci# define YY_SYMBOL_PRINT(Title, Type, Value, Location) 9170f66f451Sopenharmony_ci# define YY_STACK_PRINT(Bottom, Top) 9180f66f451Sopenharmony_ci# define YY_REDUCE_PRINT(Rule) 9190f66f451Sopenharmony_ci#endif /* !YYDEBUG */ 9200f66f451Sopenharmony_ci 9210f66f451Sopenharmony_ci 9220f66f451Sopenharmony_ci/* YYINITDEPTH -- initial size of the parser's stacks. */ 9230f66f451Sopenharmony_ci#ifndef YYINITDEPTH 9240f66f451Sopenharmony_ci# define YYINITDEPTH 200 9250f66f451Sopenharmony_ci#endif 9260f66f451Sopenharmony_ci 9270f66f451Sopenharmony_ci/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 9280f66f451Sopenharmony_ci if the built-in stack extension method is used). 9290f66f451Sopenharmony_ci 9300f66f451Sopenharmony_ci Do not make this value too large; the results are undefined if 9310f66f451Sopenharmony_ci YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 9320f66f451Sopenharmony_ci evaluated with infinite-precision integer arithmetic. */ 9330f66f451Sopenharmony_ci 9340f66f451Sopenharmony_ci#ifndef YYMAXDEPTH 9350f66f451Sopenharmony_ci# define YYMAXDEPTH 10000 9360f66f451Sopenharmony_ci#endif 9370f66f451Sopenharmony_ci 9380f66f451Sopenharmony_ci 9390f66f451Sopenharmony_ci 9400f66f451Sopenharmony_ci#if YYERROR_VERBOSE 9410f66f451Sopenharmony_ci 9420f66f451Sopenharmony_ci# ifndef yystrlen 9430f66f451Sopenharmony_ci# if defined (__GLIBC__) && defined (_STRING_H) 9440f66f451Sopenharmony_ci# define yystrlen strlen 9450f66f451Sopenharmony_ci# else 9460f66f451Sopenharmony_ci/* Return the length of YYSTR. */ 9470f66f451Sopenharmony_cistatic YYSIZE_T 9480f66f451Sopenharmony_ci# if defined (__STDC__) || defined (__cplusplus) 9490f66f451Sopenharmony_ciyystrlen (const char *yystr) 9500f66f451Sopenharmony_ci# else 9510f66f451Sopenharmony_ciyystrlen (yystr) 9520f66f451Sopenharmony_ci const char *yystr; 9530f66f451Sopenharmony_ci# endif 9540f66f451Sopenharmony_ci{ 9550f66f451Sopenharmony_ci const char *yys = yystr; 9560f66f451Sopenharmony_ci 9570f66f451Sopenharmony_ci while (*yys++ != '\0') 9580f66f451Sopenharmony_ci continue; 9590f66f451Sopenharmony_ci 9600f66f451Sopenharmony_ci return yys - yystr - 1; 9610f66f451Sopenharmony_ci} 9620f66f451Sopenharmony_ci# endif 9630f66f451Sopenharmony_ci# endif 9640f66f451Sopenharmony_ci 9650f66f451Sopenharmony_ci# ifndef yystpcpy 9660f66f451Sopenharmony_ci# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) 9670f66f451Sopenharmony_ci# define yystpcpy stpcpy 9680f66f451Sopenharmony_ci# else 9690f66f451Sopenharmony_ci/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 9700f66f451Sopenharmony_ci YYDEST. */ 9710f66f451Sopenharmony_cistatic char * 9720f66f451Sopenharmony_ci# if defined (__STDC__) || defined (__cplusplus) 9730f66f451Sopenharmony_ciyystpcpy (char *yydest, const char *yysrc) 9740f66f451Sopenharmony_ci# else 9750f66f451Sopenharmony_ciyystpcpy (yydest, yysrc) 9760f66f451Sopenharmony_ci char *yydest; 9770f66f451Sopenharmony_ci const char *yysrc; 9780f66f451Sopenharmony_ci# endif 9790f66f451Sopenharmony_ci{ 9800f66f451Sopenharmony_ci char *yyd = yydest; 9810f66f451Sopenharmony_ci const char *yys = yysrc; 9820f66f451Sopenharmony_ci 9830f66f451Sopenharmony_ci while ((*yyd++ = *yys++) != '\0') 9840f66f451Sopenharmony_ci continue; 9850f66f451Sopenharmony_ci 9860f66f451Sopenharmony_ci return yyd - 1; 9870f66f451Sopenharmony_ci} 9880f66f451Sopenharmony_ci# endif 9890f66f451Sopenharmony_ci# endif 9900f66f451Sopenharmony_ci 9910f66f451Sopenharmony_ci# ifndef yytnamerr 9920f66f451Sopenharmony_ci/* Copy to YYRES the contents of YYSTR after stripping away unnecessary 9930f66f451Sopenharmony_ci quotes and backslashes, so that it's suitable for yyerror. The 9940f66f451Sopenharmony_ci heuristic is that double-quoting is unnecessary unless the string 9950f66f451Sopenharmony_ci contains an apostrophe, a comma, or backslash (other than 9960f66f451Sopenharmony_ci backslash-backslash). YYSTR is taken from yytname. If YYRES is 9970f66f451Sopenharmony_ci null, do not copy; instead, return the length of what the result 9980f66f451Sopenharmony_ci would have been. */ 9990f66f451Sopenharmony_cistatic YYSIZE_T 10000f66f451Sopenharmony_ciyytnamerr (char *yyres, const char *yystr) 10010f66f451Sopenharmony_ci{ 10020f66f451Sopenharmony_ci if (*yystr == '"') 10030f66f451Sopenharmony_ci { 10040f66f451Sopenharmony_ci size_t yyn = 0; 10050f66f451Sopenharmony_ci char const *yyp = yystr; 10060f66f451Sopenharmony_ci 10070f66f451Sopenharmony_ci for (;;) 10080f66f451Sopenharmony_ci switch (*++yyp) 10090f66f451Sopenharmony_ci { 10100f66f451Sopenharmony_ci case '\'': 10110f66f451Sopenharmony_ci case ',': 10120f66f451Sopenharmony_ci goto do_not_strip_quotes; 10130f66f451Sopenharmony_ci 10140f66f451Sopenharmony_ci case '\\': 10150f66f451Sopenharmony_ci if (*++yyp != '\\') 10160f66f451Sopenharmony_ci goto do_not_strip_quotes; 10170f66f451Sopenharmony_ci /* Fall through. */ 10180f66f451Sopenharmony_ci default: 10190f66f451Sopenharmony_ci if (yyres) 10200f66f451Sopenharmony_ci yyres[yyn] = *yyp; 10210f66f451Sopenharmony_ci yyn++; 10220f66f451Sopenharmony_ci break; 10230f66f451Sopenharmony_ci 10240f66f451Sopenharmony_ci case '"': 10250f66f451Sopenharmony_ci if (yyres) 10260f66f451Sopenharmony_ci yyres[yyn] = '\0'; 10270f66f451Sopenharmony_ci return yyn; 10280f66f451Sopenharmony_ci } 10290f66f451Sopenharmony_ci do_not_strip_quotes: ; 10300f66f451Sopenharmony_ci } 10310f66f451Sopenharmony_ci 10320f66f451Sopenharmony_ci if (! yyres) 10330f66f451Sopenharmony_ci return yystrlen (yystr); 10340f66f451Sopenharmony_ci 10350f66f451Sopenharmony_ci return yystpcpy (yyres, yystr) - yyres; 10360f66f451Sopenharmony_ci} 10370f66f451Sopenharmony_ci# endif 10380f66f451Sopenharmony_ci 10390f66f451Sopenharmony_ci#endif /* YYERROR_VERBOSE */ 10400f66f451Sopenharmony_ci 10410f66f451Sopenharmony_ci 10420f66f451Sopenharmony_ci 10430f66f451Sopenharmony_ci#if YYDEBUG 10440f66f451Sopenharmony_ci/*--------------------------------. 10450f66f451Sopenharmony_ci| Print this symbol on YYOUTPUT. | 10460f66f451Sopenharmony_ci`--------------------------------*/ 10470f66f451Sopenharmony_ci 10480f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 10490f66f451Sopenharmony_cistatic void 10500f66f451Sopenharmony_ciyysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) 10510f66f451Sopenharmony_ci#else 10520f66f451Sopenharmony_cistatic void 10530f66f451Sopenharmony_ciyysymprint (yyoutput, yytype, yyvaluep) 10540f66f451Sopenharmony_ci FILE *yyoutput; 10550f66f451Sopenharmony_ci int yytype; 10560f66f451Sopenharmony_ci YYSTYPE *yyvaluep; 10570f66f451Sopenharmony_ci#endif 10580f66f451Sopenharmony_ci{ 10590f66f451Sopenharmony_ci /* Pacify ``unused variable'' warnings. */ 10600f66f451Sopenharmony_ci (void) yyvaluep; 10610f66f451Sopenharmony_ci 10620f66f451Sopenharmony_ci if (yytype < YYNTOKENS) 10630f66f451Sopenharmony_ci YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 10640f66f451Sopenharmony_ci else 10650f66f451Sopenharmony_ci YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 10660f66f451Sopenharmony_ci 10670f66f451Sopenharmony_ci 10680f66f451Sopenharmony_ci# ifdef YYPRINT 10690f66f451Sopenharmony_ci if (yytype < YYNTOKENS) 10700f66f451Sopenharmony_ci YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 10710f66f451Sopenharmony_ci# endif 10720f66f451Sopenharmony_ci switch (yytype) 10730f66f451Sopenharmony_ci { 10740f66f451Sopenharmony_ci default: 10750f66f451Sopenharmony_ci break; 10760f66f451Sopenharmony_ci } 10770f66f451Sopenharmony_ci YYFPRINTF (yyoutput, ")"); 10780f66f451Sopenharmony_ci} 10790f66f451Sopenharmony_ci 10800f66f451Sopenharmony_ci#endif /* ! YYDEBUG */ 10810f66f451Sopenharmony_ci/*-----------------------------------------------. 10820f66f451Sopenharmony_ci| Release the memory associated to this symbol. | 10830f66f451Sopenharmony_ci`-----------------------------------------------*/ 10840f66f451Sopenharmony_ci 10850f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 10860f66f451Sopenharmony_cistatic void 10870f66f451Sopenharmony_ciyydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 10880f66f451Sopenharmony_ci#else 10890f66f451Sopenharmony_cistatic void 10900f66f451Sopenharmony_ciyydestruct (yymsg, yytype, yyvaluep) 10910f66f451Sopenharmony_ci const char *yymsg; 10920f66f451Sopenharmony_ci int yytype; 10930f66f451Sopenharmony_ci YYSTYPE *yyvaluep; 10940f66f451Sopenharmony_ci#endif 10950f66f451Sopenharmony_ci{ 10960f66f451Sopenharmony_ci /* Pacify ``unused variable'' warnings. */ 10970f66f451Sopenharmony_ci (void) yyvaluep; 10980f66f451Sopenharmony_ci 10990f66f451Sopenharmony_ci if (!yymsg) 11000f66f451Sopenharmony_ci yymsg = "Deleting"; 11010f66f451Sopenharmony_ci YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 11020f66f451Sopenharmony_ci 11030f66f451Sopenharmony_ci switch (yytype) 11040f66f451Sopenharmony_ci { 11050f66f451Sopenharmony_ci case 52: /* "choice_entry" */ 11060f66f451Sopenharmony_ci 11070f66f451Sopenharmony_ci { 11080f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: missing end statement for this entry\n", 11090f66f451Sopenharmony_ci (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 11100f66f451Sopenharmony_ci if (current_menu == (yyvaluep->menu)) 11110f66f451Sopenharmony_ci menu_end_menu(); 11120f66f451Sopenharmony_ci}; 11130f66f451Sopenharmony_ci 11140f66f451Sopenharmony_ci break; 11150f66f451Sopenharmony_ci case 58: /* "if_entry" */ 11160f66f451Sopenharmony_ci 11170f66f451Sopenharmony_ci { 11180f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: missing end statement for this entry\n", 11190f66f451Sopenharmony_ci (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 11200f66f451Sopenharmony_ci if (current_menu == (yyvaluep->menu)) 11210f66f451Sopenharmony_ci menu_end_menu(); 11220f66f451Sopenharmony_ci}; 11230f66f451Sopenharmony_ci 11240f66f451Sopenharmony_ci break; 11250f66f451Sopenharmony_ci case 63: /* "menu_entry" */ 11260f66f451Sopenharmony_ci 11270f66f451Sopenharmony_ci { 11280f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: missing end statement for this entry\n", 11290f66f451Sopenharmony_ci (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); 11300f66f451Sopenharmony_ci if (current_menu == (yyvaluep->menu)) 11310f66f451Sopenharmony_ci menu_end_menu(); 11320f66f451Sopenharmony_ci}; 11330f66f451Sopenharmony_ci 11340f66f451Sopenharmony_ci break; 11350f66f451Sopenharmony_ci 11360f66f451Sopenharmony_ci default: 11370f66f451Sopenharmony_ci break; 11380f66f451Sopenharmony_ci } 11390f66f451Sopenharmony_ci} 11400f66f451Sopenharmony_ci 11410f66f451Sopenharmony_ci 11420f66f451Sopenharmony_ci/* Prevent warnings from -Wmissing-prototypes. */ 11430f66f451Sopenharmony_ci 11440f66f451Sopenharmony_ci#ifdef YYPARSE_PARAM 11450f66f451Sopenharmony_ci# if defined (__STDC__) || defined (__cplusplus) 11460f66f451Sopenharmony_ciint yyparse (void *YYPARSE_PARAM); 11470f66f451Sopenharmony_ci# else 11480f66f451Sopenharmony_ciint yyparse (); 11490f66f451Sopenharmony_ci# endif 11500f66f451Sopenharmony_ci#else /* ! YYPARSE_PARAM */ 11510f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 11520f66f451Sopenharmony_ciint yyparse (void); 11530f66f451Sopenharmony_ci#else 11540f66f451Sopenharmony_ciint yyparse (); 11550f66f451Sopenharmony_ci#endif 11560f66f451Sopenharmony_ci#endif /* ! YYPARSE_PARAM */ 11570f66f451Sopenharmony_ci 11580f66f451Sopenharmony_ci 11590f66f451Sopenharmony_ci 11600f66f451Sopenharmony_ci/* The look-ahead symbol. */ 11610f66f451Sopenharmony_ciint yychar; 11620f66f451Sopenharmony_ci 11630f66f451Sopenharmony_ci/* The semantic value of the look-ahead symbol. */ 11640f66f451Sopenharmony_ciYYSTYPE yylval; 11650f66f451Sopenharmony_ci 11660f66f451Sopenharmony_ci/* Number of syntax errors so far. */ 11670f66f451Sopenharmony_ciint yynerrs; 11680f66f451Sopenharmony_ci 11690f66f451Sopenharmony_ci 11700f66f451Sopenharmony_ci 11710f66f451Sopenharmony_ci/*----------. 11720f66f451Sopenharmony_ci| yyparse. | 11730f66f451Sopenharmony_ci`----------*/ 11740f66f451Sopenharmony_ci 11750f66f451Sopenharmony_ci#ifdef YYPARSE_PARAM 11760f66f451Sopenharmony_ci# if defined (__STDC__) || defined (__cplusplus) 11770f66f451Sopenharmony_ciint yyparse (void *YYPARSE_PARAM) 11780f66f451Sopenharmony_ci# else 11790f66f451Sopenharmony_ciint yyparse (YYPARSE_PARAM) 11800f66f451Sopenharmony_ci void *YYPARSE_PARAM; 11810f66f451Sopenharmony_ci# endif 11820f66f451Sopenharmony_ci#else /* ! YYPARSE_PARAM */ 11830f66f451Sopenharmony_ci#if defined (__STDC__) || defined (__cplusplus) 11840f66f451Sopenharmony_ciint 11850f66f451Sopenharmony_ciyyparse (void) 11860f66f451Sopenharmony_ci#else 11870f66f451Sopenharmony_ciint 11880f66f451Sopenharmony_ciyyparse () 11890f66f451Sopenharmony_ci ; 11900f66f451Sopenharmony_ci#endif 11910f66f451Sopenharmony_ci#endif 11920f66f451Sopenharmony_ci{ 11930f66f451Sopenharmony_ci 11940f66f451Sopenharmony_ci int yystate; 11950f66f451Sopenharmony_ci int yyn; 11960f66f451Sopenharmony_ci int yyresult; 11970f66f451Sopenharmony_ci /* Number of tokens to shift before error messages enabled. */ 11980f66f451Sopenharmony_ci int yyerrstatus; 11990f66f451Sopenharmony_ci /* Look-ahead token as an internal (translated) token number. */ 12000f66f451Sopenharmony_ci int yytoken = 0; 12010f66f451Sopenharmony_ci 12020f66f451Sopenharmony_ci /* Three stacks and their tools: 12030f66f451Sopenharmony_ci `yyss': related to states, 12040f66f451Sopenharmony_ci `yyvs': related to semantic values, 12050f66f451Sopenharmony_ci `yyls': related to locations. 12060f66f451Sopenharmony_ci 12070f66f451Sopenharmony_ci Refer to the stacks thru separate pointers, to allow yyoverflow 12080f66f451Sopenharmony_ci to reallocate them elsewhere. */ 12090f66f451Sopenharmony_ci 12100f66f451Sopenharmony_ci /* The state stack. */ 12110f66f451Sopenharmony_ci short int yyssa[YYINITDEPTH]; 12120f66f451Sopenharmony_ci short int *yyss = yyssa; 12130f66f451Sopenharmony_ci short int *yyssp; 12140f66f451Sopenharmony_ci 12150f66f451Sopenharmony_ci /* The semantic value stack. */ 12160f66f451Sopenharmony_ci YYSTYPE yyvsa[YYINITDEPTH]; 12170f66f451Sopenharmony_ci YYSTYPE *yyvs = yyvsa; 12180f66f451Sopenharmony_ci YYSTYPE *yyvsp; 12190f66f451Sopenharmony_ci 12200f66f451Sopenharmony_ci 12210f66f451Sopenharmony_ci 12220f66f451Sopenharmony_ci#define YYPOPSTACK (yyvsp--, yyssp--) 12230f66f451Sopenharmony_ci 12240f66f451Sopenharmony_ci YYSIZE_T yystacksize = YYINITDEPTH; 12250f66f451Sopenharmony_ci 12260f66f451Sopenharmony_ci /* The variables used to return semantic value and location from the 12270f66f451Sopenharmony_ci action routines. */ 12280f66f451Sopenharmony_ci YYSTYPE yyval; 12290f66f451Sopenharmony_ci 12300f66f451Sopenharmony_ci 12310f66f451Sopenharmony_ci /* When reducing, the number of symbols on the RHS of the reduced 12320f66f451Sopenharmony_ci rule. */ 12330f66f451Sopenharmony_ci int yylen; 12340f66f451Sopenharmony_ci 12350f66f451Sopenharmony_ci YYDPRINTF ((stderr, "Starting parse\n")); 12360f66f451Sopenharmony_ci 12370f66f451Sopenharmony_ci yystate = 0; 12380f66f451Sopenharmony_ci yyerrstatus = 0; 12390f66f451Sopenharmony_ci yynerrs = 0; 12400f66f451Sopenharmony_ci yychar = YYEMPTY; /* Cause a token to be read. */ 12410f66f451Sopenharmony_ci 12420f66f451Sopenharmony_ci /* Initialize stack pointers. 12430f66f451Sopenharmony_ci Waste one element of value and location stack 12440f66f451Sopenharmony_ci so that they stay on the same level as the state stack. 12450f66f451Sopenharmony_ci The wasted elements are never initialized. */ 12460f66f451Sopenharmony_ci 12470f66f451Sopenharmony_ci yyssp = yyss; 12480f66f451Sopenharmony_ci yyvsp = yyvs; 12490f66f451Sopenharmony_ci 12500f66f451Sopenharmony_ci goto yysetstate; 12510f66f451Sopenharmony_ci 12520f66f451Sopenharmony_ci/*------------------------------------------------------------. 12530f66f451Sopenharmony_ci| yynewstate -- Push a new state, which is found in yystate. | 12540f66f451Sopenharmony_ci`------------------------------------------------------------*/ 12550f66f451Sopenharmony_ci yynewstate: 12560f66f451Sopenharmony_ci /* In all cases, when you get here, the value and location stacks 12570f66f451Sopenharmony_ci have just been pushed. so pushing a state here evens the stacks. 12580f66f451Sopenharmony_ci */ 12590f66f451Sopenharmony_ci yyssp++; 12600f66f451Sopenharmony_ci 12610f66f451Sopenharmony_ci yysetstate: 12620f66f451Sopenharmony_ci *yyssp = yystate; 12630f66f451Sopenharmony_ci 12640f66f451Sopenharmony_ci if (yyss + yystacksize - 1 <= yyssp) 12650f66f451Sopenharmony_ci { 12660f66f451Sopenharmony_ci /* Get the current used size of the three stacks, in elements. */ 12670f66f451Sopenharmony_ci YYSIZE_T yysize = yyssp - yyss + 1; 12680f66f451Sopenharmony_ci 12690f66f451Sopenharmony_ci#ifdef yyoverflow 12700f66f451Sopenharmony_ci { 12710f66f451Sopenharmony_ci /* Give user a chance to reallocate the stack. Use copies of 12720f66f451Sopenharmony_ci these so that the &'s don't force the real ones into 12730f66f451Sopenharmony_ci memory. */ 12740f66f451Sopenharmony_ci YYSTYPE *yyvs1 = yyvs; 12750f66f451Sopenharmony_ci short int *yyss1 = yyss; 12760f66f451Sopenharmony_ci 12770f66f451Sopenharmony_ci 12780f66f451Sopenharmony_ci /* Each stack pointer address is followed by the size of the 12790f66f451Sopenharmony_ci data in use in that stack, in bytes. This used to be a 12800f66f451Sopenharmony_ci conditional around just the two extra args, but that might 12810f66f451Sopenharmony_ci be undefined if yyoverflow is a macro. */ 12820f66f451Sopenharmony_ci yyoverflow (YY_("memory exhausted"), 12830f66f451Sopenharmony_ci &yyss1, yysize * sizeof (*yyssp), 12840f66f451Sopenharmony_ci &yyvs1, yysize * sizeof (*yyvsp), 12850f66f451Sopenharmony_ci 12860f66f451Sopenharmony_ci &yystacksize); 12870f66f451Sopenharmony_ci 12880f66f451Sopenharmony_ci yyss = yyss1; 12890f66f451Sopenharmony_ci yyvs = yyvs1; 12900f66f451Sopenharmony_ci } 12910f66f451Sopenharmony_ci#else /* no yyoverflow */ 12920f66f451Sopenharmony_ci# ifndef YYSTACK_RELOCATE 12930f66f451Sopenharmony_ci goto yyexhaustedlab; 12940f66f451Sopenharmony_ci# else 12950f66f451Sopenharmony_ci /* Extend the stack our own way. */ 12960f66f451Sopenharmony_ci if (YYMAXDEPTH <= yystacksize) 12970f66f451Sopenharmony_ci goto yyexhaustedlab; 12980f66f451Sopenharmony_ci yystacksize *= 2; 12990f66f451Sopenharmony_ci if (YYMAXDEPTH < yystacksize) 13000f66f451Sopenharmony_ci yystacksize = YYMAXDEPTH; 13010f66f451Sopenharmony_ci 13020f66f451Sopenharmony_ci { 13030f66f451Sopenharmony_ci short int *yyss1 = yyss; 13040f66f451Sopenharmony_ci union yyalloc *yyptr = 13050f66f451Sopenharmony_ci (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 13060f66f451Sopenharmony_ci if (! yyptr) 13070f66f451Sopenharmony_ci goto yyexhaustedlab; 13080f66f451Sopenharmony_ci YYSTACK_RELOCATE (yyss); 13090f66f451Sopenharmony_ci YYSTACK_RELOCATE (yyvs); 13100f66f451Sopenharmony_ci 13110f66f451Sopenharmony_ci# undef YYSTACK_RELOCATE 13120f66f451Sopenharmony_ci if (yyss1 != yyssa) 13130f66f451Sopenharmony_ci YYSTACK_FREE (yyss1); 13140f66f451Sopenharmony_ci } 13150f66f451Sopenharmony_ci# endif 13160f66f451Sopenharmony_ci#endif /* no yyoverflow */ 13170f66f451Sopenharmony_ci 13180f66f451Sopenharmony_ci yyssp = yyss + yysize - 1; 13190f66f451Sopenharmony_ci yyvsp = yyvs + yysize - 1; 13200f66f451Sopenharmony_ci 13210f66f451Sopenharmony_ci 13220f66f451Sopenharmony_ci YYDPRINTF ((stderr, "Stack size increased to %lu\n", 13230f66f451Sopenharmony_ci (unsigned long int) yystacksize)); 13240f66f451Sopenharmony_ci 13250f66f451Sopenharmony_ci if (yyss + yystacksize - 1 <= yyssp) 13260f66f451Sopenharmony_ci YYABORT; 13270f66f451Sopenharmony_ci } 13280f66f451Sopenharmony_ci 13290f66f451Sopenharmony_ci YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 13300f66f451Sopenharmony_ci 13310f66f451Sopenharmony_ci goto yybackup; 13320f66f451Sopenharmony_ci 13330f66f451Sopenharmony_ci/*-----------. 13340f66f451Sopenharmony_ci| yybackup. | 13350f66f451Sopenharmony_ci`-----------*/ 13360f66f451Sopenharmony_ciyybackup: 13370f66f451Sopenharmony_ci 13380f66f451Sopenharmony_ci/* Do appropriate processing given the current state. */ 13390f66f451Sopenharmony_ci/* Read a look-ahead token if we need one and don't already have one. */ 13400f66f451Sopenharmony_ci/* yyresume: */ 13410f66f451Sopenharmony_ci 13420f66f451Sopenharmony_ci /* First try to decide what to do without reference to look-ahead token. */ 13430f66f451Sopenharmony_ci 13440f66f451Sopenharmony_ci yyn = yypact[yystate]; 13450f66f451Sopenharmony_ci if (yyn == YYPACT_NINF) 13460f66f451Sopenharmony_ci goto yydefault; 13470f66f451Sopenharmony_ci 13480f66f451Sopenharmony_ci /* Not known => get a look-ahead token if don't already have one. */ 13490f66f451Sopenharmony_ci 13500f66f451Sopenharmony_ci /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ 13510f66f451Sopenharmony_ci if (yychar == YYEMPTY) 13520f66f451Sopenharmony_ci { 13530f66f451Sopenharmony_ci YYDPRINTF ((stderr, "Reading a token: ")); 13540f66f451Sopenharmony_ci yychar = YYLEX; 13550f66f451Sopenharmony_ci } 13560f66f451Sopenharmony_ci 13570f66f451Sopenharmony_ci if (yychar <= YYEOF) 13580f66f451Sopenharmony_ci { 13590f66f451Sopenharmony_ci yychar = yytoken = YYEOF; 13600f66f451Sopenharmony_ci YYDPRINTF ((stderr, "Now at end of input.\n")); 13610f66f451Sopenharmony_ci } 13620f66f451Sopenharmony_ci else 13630f66f451Sopenharmony_ci { 13640f66f451Sopenharmony_ci yytoken = YYTRANSLATE (yychar); 13650f66f451Sopenharmony_ci YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 13660f66f451Sopenharmony_ci } 13670f66f451Sopenharmony_ci 13680f66f451Sopenharmony_ci /* If the proper action on seeing token YYTOKEN is to reduce or to 13690f66f451Sopenharmony_ci detect an error, take that action. */ 13700f66f451Sopenharmony_ci yyn += yytoken; 13710f66f451Sopenharmony_ci if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 13720f66f451Sopenharmony_ci goto yydefault; 13730f66f451Sopenharmony_ci yyn = yytable[yyn]; 13740f66f451Sopenharmony_ci if (yyn <= 0) 13750f66f451Sopenharmony_ci { 13760f66f451Sopenharmony_ci if (yyn == 0 || yyn == YYTABLE_NINF) 13770f66f451Sopenharmony_ci goto yyerrlab; 13780f66f451Sopenharmony_ci yyn = -yyn; 13790f66f451Sopenharmony_ci goto yyreduce; 13800f66f451Sopenharmony_ci } 13810f66f451Sopenharmony_ci 13820f66f451Sopenharmony_ci if (yyn == YYFINAL) 13830f66f451Sopenharmony_ci YYACCEPT; 13840f66f451Sopenharmony_ci 13850f66f451Sopenharmony_ci /* Shift the look-ahead token. */ 13860f66f451Sopenharmony_ci YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 13870f66f451Sopenharmony_ci 13880f66f451Sopenharmony_ci /* Discard the token being shifted unless it is eof. */ 13890f66f451Sopenharmony_ci if (yychar != YYEOF) 13900f66f451Sopenharmony_ci yychar = YYEMPTY; 13910f66f451Sopenharmony_ci 13920f66f451Sopenharmony_ci *++yyvsp = yylval; 13930f66f451Sopenharmony_ci 13940f66f451Sopenharmony_ci 13950f66f451Sopenharmony_ci /* Count tokens shifted since error; after three, turn off error 13960f66f451Sopenharmony_ci status. */ 13970f66f451Sopenharmony_ci if (yyerrstatus) 13980f66f451Sopenharmony_ci yyerrstatus--; 13990f66f451Sopenharmony_ci 14000f66f451Sopenharmony_ci yystate = yyn; 14010f66f451Sopenharmony_ci goto yynewstate; 14020f66f451Sopenharmony_ci 14030f66f451Sopenharmony_ci 14040f66f451Sopenharmony_ci/*-----------------------------------------------------------. 14050f66f451Sopenharmony_ci| yydefault -- do the default action for the current state. | 14060f66f451Sopenharmony_ci`-----------------------------------------------------------*/ 14070f66f451Sopenharmony_ciyydefault: 14080f66f451Sopenharmony_ci yyn = yydefact[yystate]; 14090f66f451Sopenharmony_ci if (yyn == 0) 14100f66f451Sopenharmony_ci goto yyerrlab; 14110f66f451Sopenharmony_ci goto yyreduce; 14120f66f451Sopenharmony_ci 14130f66f451Sopenharmony_ci 14140f66f451Sopenharmony_ci/*-----------------------------. 14150f66f451Sopenharmony_ci| yyreduce -- Do a reduction. | 14160f66f451Sopenharmony_ci`-----------------------------*/ 14170f66f451Sopenharmony_ciyyreduce: 14180f66f451Sopenharmony_ci /* yyn is the number of a rule to reduce with. */ 14190f66f451Sopenharmony_ci yylen = yyr2[yyn]; 14200f66f451Sopenharmony_ci 14210f66f451Sopenharmony_ci /* If YYLEN is nonzero, implement the default value of the action: 14220f66f451Sopenharmony_ci `$$ = $1'. 14230f66f451Sopenharmony_ci 14240f66f451Sopenharmony_ci Otherwise, the following line sets YYVAL to garbage. 14250f66f451Sopenharmony_ci This behavior is undocumented and Bison 14260f66f451Sopenharmony_ci users should not rely upon it. Assigning to YYVAL 14270f66f451Sopenharmony_ci unconditionally makes the parser a bit smaller, and it avoids a 14280f66f451Sopenharmony_ci GCC warning that YYVAL may be used uninitialized. */ 14290f66f451Sopenharmony_ci yyval = yyvsp[1-yylen]; 14300f66f451Sopenharmony_ci 14310f66f451Sopenharmony_ci 14320f66f451Sopenharmony_ci YY_REDUCE_PRINT (yyn); 14330f66f451Sopenharmony_ci switch (yyn) 14340f66f451Sopenharmony_ci { 14350f66f451Sopenharmony_ci case 8: 14360f66f451Sopenharmony_ci 14370f66f451Sopenharmony_ci { zconf_error("unexpected end statement"); ;} 14380f66f451Sopenharmony_ci break; 14390f66f451Sopenharmony_ci 14400f66f451Sopenharmony_ci case 9: 14410f66f451Sopenharmony_ci 14420f66f451Sopenharmony_ci { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); ;} 14430f66f451Sopenharmony_ci break; 14440f66f451Sopenharmony_ci 14450f66f451Sopenharmony_ci case 10: 14460f66f451Sopenharmony_ci 14470f66f451Sopenharmony_ci { 14480f66f451Sopenharmony_ci zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[-2].id)->name); 14490f66f451Sopenharmony_ci;} 14500f66f451Sopenharmony_ci break; 14510f66f451Sopenharmony_ci 14520f66f451Sopenharmony_ci case 11: 14530f66f451Sopenharmony_ci 14540f66f451Sopenharmony_ci { zconf_error("invalid statement"); ;} 14550f66f451Sopenharmony_ci break; 14560f66f451Sopenharmony_ci 14570f66f451Sopenharmony_ci case 25: 14580f66f451Sopenharmony_ci 14590f66f451Sopenharmony_ci { zconf_error("unknown option \"%s\"", (yyvsp[-2].string)); ;} 14600f66f451Sopenharmony_ci break; 14610f66f451Sopenharmony_ci 14620f66f451Sopenharmony_ci case 26: 14630f66f451Sopenharmony_ci 14640f66f451Sopenharmony_ci { zconf_error("invalid option"); ;} 14650f66f451Sopenharmony_ci break; 14660f66f451Sopenharmony_ci 14670f66f451Sopenharmony_ci case 27: 14680f66f451Sopenharmony_ci 14690f66f451Sopenharmony_ci { 14700f66f451Sopenharmony_ci struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); 14710f66f451Sopenharmony_ci sym->flags |= SYMBOL_OPTIONAL; 14720f66f451Sopenharmony_ci menu_add_entry(sym); 14730f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 14740f66f451Sopenharmony_ci;} 14750f66f451Sopenharmony_ci break; 14760f66f451Sopenharmony_ci 14770f66f451Sopenharmony_ci case 28: 14780f66f451Sopenharmony_ci 14790f66f451Sopenharmony_ci { 14800f66f451Sopenharmony_ci menu_end_entry(); 14810f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); 14820f66f451Sopenharmony_ci;} 14830f66f451Sopenharmony_ci break; 14840f66f451Sopenharmony_ci 14850f66f451Sopenharmony_ci case 29: 14860f66f451Sopenharmony_ci 14870f66f451Sopenharmony_ci { 14880f66f451Sopenharmony_ci struct symbol *sym = sym_lookup((yyvsp[-1].string), 0); 14890f66f451Sopenharmony_ci sym->flags |= SYMBOL_OPTIONAL; 14900f66f451Sopenharmony_ci menu_add_entry(sym); 14910f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 14920f66f451Sopenharmony_ci;} 14930f66f451Sopenharmony_ci break; 14940f66f451Sopenharmony_ci 14950f66f451Sopenharmony_ci case 30: 14960f66f451Sopenharmony_ci 14970f66f451Sopenharmony_ci { 14980f66f451Sopenharmony_ci if (current_entry->prompt) 14990f66f451Sopenharmony_ci current_entry->prompt->type = P_MENU; 15000f66f451Sopenharmony_ci else 15010f66f451Sopenharmony_ci zconfprint("warning: menuconfig statement without prompt"); 15020f66f451Sopenharmony_ci menu_end_entry(); 15030f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); 15040f66f451Sopenharmony_ci;} 15050f66f451Sopenharmony_ci break; 15060f66f451Sopenharmony_ci 15070f66f451Sopenharmony_ci case 38: 15080f66f451Sopenharmony_ci 15090f66f451Sopenharmony_ci { 15100f66f451Sopenharmony_ci menu_set_type((yyvsp[-2].id)->stype); 15110f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 15120f66f451Sopenharmony_ci zconf_curname(), zconf_lineno(), 15130f66f451Sopenharmony_ci (yyvsp[-2].id)->stype); 15140f66f451Sopenharmony_ci;} 15150f66f451Sopenharmony_ci break; 15160f66f451Sopenharmony_ci 15170f66f451Sopenharmony_ci case 39: 15180f66f451Sopenharmony_ci 15190f66f451Sopenharmony_ci { 15200f66f451Sopenharmony_ci menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 15210f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 15220f66f451Sopenharmony_ci;} 15230f66f451Sopenharmony_ci break; 15240f66f451Sopenharmony_ci 15250f66f451Sopenharmony_ci case 40: 15260f66f451Sopenharmony_ci 15270f66f451Sopenharmony_ci { 15280f66f451Sopenharmony_ci menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); 15290f66f451Sopenharmony_ci if ((yyvsp[-3].id)->stype != S_UNKNOWN) 15300f66f451Sopenharmony_ci menu_set_type((yyvsp[-3].id)->stype); 15310f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:default(%u)\n", 15320f66f451Sopenharmony_ci zconf_curname(), zconf_lineno(), 15330f66f451Sopenharmony_ci (yyvsp[-3].id)->stype); 15340f66f451Sopenharmony_ci;} 15350f66f451Sopenharmony_ci break; 15360f66f451Sopenharmony_ci 15370f66f451Sopenharmony_ci case 41: 15380f66f451Sopenharmony_ci 15390f66f451Sopenharmony_ci { 15400f66f451Sopenharmony_ci menu_add_symbol(P_SELECT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 15410f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); 15420f66f451Sopenharmony_ci;} 15430f66f451Sopenharmony_ci break; 15440f66f451Sopenharmony_ci 15450f66f451Sopenharmony_ci case 42: 15460f66f451Sopenharmony_ci 15470f66f451Sopenharmony_ci { 15480f66f451Sopenharmony_ci menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); 15490f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); 15500f66f451Sopenharmony_ci;} 15510f66f451Sopenharmony_ci break; 15520f66f451Sopenharmony_ci 15530f66f451Sopenharmony_ci case 45: 15540f66f451Sopenharmony_ci 15550f66f451Sopenharmony_ci { 15560f66f451Sopenharmony_ci struct kconf_id *id = kconf_id_lookup((yyvsp[-1].string), strlen((yyvsp[-1].string))); 15570f66f451Sopenharmony_ci if (id && id->flags & TF_OPTION) 15580f66f451Sopenharmony_ci menu_add_option(id->token, (yyvsp[0].string)); 15590f66f451Sopenharmony_ci else 15600f66f451Sopenharmony_ci zconfprint("warning: ignoring unknown option %s", (yyvsp[-1].string)); 15610f66f451Sopenharmony_ci free((yyvsp[-1].string)); 15620f66f451Sopenharmony_ci;} 15630f66f451Sopenharmony_ci break; 15640f66f451Sopenharmony_ci 15650f66f451Sopenharmony_ci case 46: 15660f66f451Sopenharmony_ci 15670f66f451Sopenharmony_ci { (yyval.string) = NULL; ;} 15680f66f451Sopenharmony_ci break; 15690f66f451Sopenharmony_ci 15700f66f451Sopenharmony_ci case 47: 15710f66f451Sopenharmony_ci 15720f66f451Sopenharmony_ci { (yyval.string) = (yyvsp[0].string); ;} 15730f66f451Sopenharmony_ci break; 15740f66f451Sopenharmony_ci 15750f66f451Sopenharmony_ci case 48: 15760f66f451Sopenharmony_ci 15770f66f451Sopenharmony_ci { 15780f66f451Sopenharmony_ci struct symbol *sym = sym_lookup(NULL, 0); 15790f66f451Sopenharmony_ci sym->flags |= SYMBOL_CHOICE; 15800f66f451Sopenharmony_ci menu_add_entry(sym); 15810f66f451Sopenharmony_ci menu_add_expr(P_CHOICE, NULL, NULL); 15820f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); 15830f66f451Sopenharmony_ci;} 15840f66f451Sopenharmony_ci break; 15850f66f451Sopenharmony_ci 15860f66f451Sopenharmony_ci case 49: 15870f66f451Sopenharmony_ci 15880f66f451Sopenharmony_ci { 15890f66f451Sopenharmony_ci (yyval.menu) = menu_add_menu(); 15900f66f451Sopenharmony_ci;} 15910f66f451Sopenharmony_ci break; 15920f66f451Sopenharmony_ci 15930f66f451Sopenharmony_ci case 50: 15940f66f451Sopenharmony_ci 15950f66f451Sopenharmony_ci { 15960f66f451Sopenharmony_ci if (zconf_endtoken((yyvsp[0].id), T_CHOICE, T_ENDCHOICE)) { 15970f66f451Sopenharmony_ci menu_end_menu(); 15980f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); 15990f66f451Sopenharmony_ci } 16000f66f451Sopenharmony_ci;} 16010f66f451Sopenharmony_ci break; 16020f66f451Sopenharmony_ci 16030f66f451Sopenharmony_ci case 58: 16040f66f451Sopenharmony_ci 16050f66f451Sopenharmony_ci { 16060f66f451Sopenharmony_ci menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); 16070f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); 16080f66f451Sopenharmony_ci;} 16090f66f451Sopenharmony_ci break; 16100f66f451Sopenharmony_ci 16110f66f451Sopenharmony_ci case 59: 16120f66f451Sopenharmony_ci 16130f66f451Sopenharmony_ci { 16140f66f451Sopenharmony_ci if ((yyvsp[-2].id)->stype == S_BOOLEAN || (yyvsp[-2].id)->stype == S_TRISTATE) { 16150f66f451Sopenharmony_ci menu_set_type((yyvsp[-2].id)->stype); 16160f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:type(%u)\n", 16170f66f451Sopenharmony_ci zconf_curname(), zconf_lineno(), 16180f66f451Sopenharmony_ci (yyvsp[-2].id)->stype); 16190f66f451Sopenharmony_ci } else 16200f66f451Sopenharmony_ci YYERROR; 16210f66f451Sopenharmony_ci;} 16220f66f451Sopenharmony_ci break; 16230f66f451Sopenharmony_ci 16240f66f451Sopenharmony_ci case 60: 16250f66f451Sopenharmony_ci 16260f66f451Sopenharmony_ci { 16270f66f451Sopenharmony_ci current_entry->sym->flags |= SYMBOL_OPTIONAL; 16280f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); 16290f66f451Sopenharmony_ci;} 16300f66f451Sopenharmony_ci break; 16310f66f451Sopenharmony_ci 16320f66f451Sopenharmony_ci case 61: 16330f66f451Sopenharmony_ci 16340f66f451Sopenharmony_ci { 16350f66f451Sopenharmony_ci if ((yyvsp[-3].id)->stype == S_UNKNOWN) { 16360f66f451Sopenharmony_ci menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[-2].string), 0), (yyvsp[-1].expr)); 16370f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:default\n", 16380f66f451Sopenharmony_ci zconf_curname(), zconf_lineno()); 16390f66f451Sopenharmony_ci } else 16400f66f451Sopenharmony_ci YYERROR; 16410f66f451Sopenharmony_ci;} 16420f66f451Sopenharmony_ci break; 16430f66f451Sopenharmony_ci 16440f66f451Sopenharmony_ci case 64: 16450f66f451Sopenharmony_ci 16460f66f451Sopenharmony_ci { 16470f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); 16480f66f451Sopenharmony_ci menu_add_entry(NULL); 16490f66f451Sopenharmony_ci menu_add_dep((yyvsp[-1].expr)); 16500f66f451Sopenharmony_ci (yyval.menu) = menu_add_menu(); 16510f66f451Sopenharmony_ci;} 16520f66f451Sopenharmony_ci break; 16530f66f451Sopenharmony_ci 16540f66f451Sopenharmony_ci case 65: 16550f66f451Sopenharmony_ci 16560f66f451Sopenharmony_ci { 16570f66f451Sopenharmony_ci if (zconf_endtoken((yyvsp[0].id), T_IF, T_ENDIF)) { 16580f66f451Sopenharmony_ci menu_end_menu(); 16590f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); 16600f66f451Sopenharmony_ci } 16610f66f451Sopenharmony_ci;} 16620f66f451Sopenharmony_ci break; 16630f66f451Sopenharmony_ci 16640f66f451Sopenharmony_ci case 71: 16650f66f451Sopenharmony_ci 16660f66f451Sopenharmony_ci { 16670f66f451Sopenharmony_ci menu_add_entry(NULL); 16680f66f451Sopenharmony_ci menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); 16690f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 16700f66f451Sopenharmony_ci;} 16710f66f451Sopenharmony_ci break; 16720f66f451Sopenharmony_ci 16730f66f451Sopenharmony_ci case 72: 16740f66f451Sopenharmony_ci 16750f66f451Sopenharmony_ci { 16760f66f451Sopenharmony_ci (yyval.menu) = menu_add_menu(); 16770f66f451Sopenharmony_ci;} 16780f66f451Sopenharmony_ci break; 16790f66f451Sopenharmony_ci 16800f66f451Sopenharmony_ci case 73: 16810f66f451Sopenharmony_ci 16820f66f451Sopenharmony_ci { 16830f66f451Sopenharmony_ci if (zconf_endtoken((yyvsp[0].id), T_MENU, T_ENDMENU)) { 16840f66f451Sopenharmony_ci menu_end_menu(); 16850f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); 16860f66f451Sopenharmony_ci } 16870f66f451Sopenharmony_ci;} 16880f66f451Sopenharmony_ci break; 16890f66f451Sopenharmony_ci 16900f66f451Sopenharmony_ci case 79: 16910f66f451Sopenharmony_ci 16920f66f451Sopenharmony_ci { 16930f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[-1].string)); 16940f66f451Sopenharmony_ci zconf_nextfile((yyvsp[-1].string)); 16950f66f451Sopenharmony_ci;} 16960f66f451Sopenharmony_ci break; 16970f66f451Sopenharmony_ci 16980f66f451Sopenharmony_ci case 80: 16990f66f451Sopenharmony_ci 17000f66f451Sopenharmony_ci { 17010f66f451Sopenharmony_ci menu_add_entry(NULL); 17020f66f451Sopenharmony_ci menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); 17030f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 17040f66f451Sopenharmony_ci;} 17050f66f451Sopenharmony_ci break; 17060f66f451Sopenharmony_ci 17070f66f451Sopenharmony_ci case 81: 17080f66f451Sopenharmony_ci 17090f66f451Sopenharmony_ci { 17100f66f451Sopenharmony_ci menu_end_entry(); 17110f66f451Sopenharmony_ci;} 17120f66f451Sopenharmony_ci break; 17130f66f451Sopenharmony_ci 17140f66f451Sopenharmony_ci case 82: 17150f66f451Sopenharmony_ci 17160f66f451Sopenharmony_ci { 17170f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); 17180f66f451Sopenharmony_ci zconf_starthelp(); 17190f66f451Sopenharmony_ci;} 17200f66f451Sopenharmony_ci break; 17210f66f451Sopenharmony_ci 17220f66f451Sopenharmony_ci case 83: 17230f66f451Sopenharmony_ci 17240f66f451Sopenharmony_ci { 17250f66f451Sopenharmony_ci current_entry->sym->help = (yyvsp[0].string); 17260f66f451Sopenharmony_ci;} 17270f66f451Sopenharmony_ci break; 17280f66f451Sopenharmony_ci 17290f66f451Sopenharmony_ci case 88: 17300f66f451Sopenharmony_ci 17310f66f451Sopenharmony_ci { 17320f66f451Sopenharmony_ci menu_add_dep((yyvsp[-1].expr)); 17330f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); 17340f66f451Sopenharmony_ci;} 17350f66f451Sopenharmony_ci break; 17360f66f451Sopenharmony_ci 17370f66f451Sopenharmony_ci case 89: 17380f66f451Sopenharmony_ci 17390f66f451Sopenharmony_ci { 17400f66f451Sopenharmony_ci menu_add_dep((yyvsp[-1].expr)); 17410f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno()); 17420f66f451Sopenharmony_ci;} 17430f66f451Sopenharmony_ci break; 17440f66f451Sopenharmony_ci 17450f66f451Sopenharmony_ci case 90: 17460f66f451Sopenharmony_ci 17470f66f451Sopenharmony_ci { 17480f66f451Sopenharmony_ci menu_add_dep((yyvsp[-1].expr)); 17490f66f451Sopenharmony_ci printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno()); 17500f66f451Sopenharmony_ci;} 17510f66f451Sopenharmony_ci break; 17520f66f451Sopenharmony_ci 17530f66f451Sopenharmony_ci case 92: 17540f66f451Sopenharmony_ci 17550f66f451Sopenharmony_ci { 17560f66f451Sopenharmony_ci menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); 17570f66f451Sopenharmony_ci;} 17580f66f451Sopenharmony_ci break; 17590f66f451Sopenharmony_ci 17600f66f451Sopenharmony_ci case 95: 17610f66f451Sopenharmony_ci 17620f66f451Sopenharmony_ci { (yyval.id) = (yyvsp[-1].id); ;} 17630f66f451Sopenharmony_ci break; 17640f66f451Sopenharmony_ci 17650f66f451Sopenharmony_ci case 96: 17660f66f451Sopenharmony_ci 17670f66f451Sopenharmony_ci { (yyval.id) = (yyvsp[-1].id); ;} 17680f66f451Sopenharmony_ci break; 17690f66f451Sopenharmony_ci 17700f66f451Sopenharmony_ci case 97: 17710f66f451Sopenharmony_ci 17720f66f451Sopenharmony_ci { (yyval.id) = (yyvsp[-1].id); ;} 17730f66f451Sopenharmony_ci break; 17740f66f451Sopenharmony_ci 17750f66f451Sopenharmony_ci case 100: 17760f66f451Sopenharmony_ci 17770f66f451Sopenharmony_ci { (yyval.expr) = NULL; ;} 17780f66f451Sopenharmony_ci break; 17790f66f451Sopenharmony_ci 17800f66f451Sopenharmony_ci case 101: 17810f66f451Sopenharmony_ci 17820f66f451Sopenharmony_ci { (yyval.expr) = (yyvsp[0].expr); ;} 17830f66f451Sopenharmony_ci break; 17840f66f451Sopenharmony_ci 17850f66f451Sopenharmony_ci case 102: 17860f66f451Sopenharmony_ci 17870f66f451Sopenharmony_ci { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); ;} 17880f66f451Sopenharmony_ci break; 17890f66f451Sopenharmony_ci 17900f66f451Sopenharmony_ci case 103: 17910f66f451Sopenharmony_ci 17920f66f451Sopenharmony_ci { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 17930f66f451Sopenharmony_ci break; 17940f66f451Sopenharmony_ci 17950f66f451Sopenharmony_ci case 104: 17960f66f451Sopenharmony_ci 17970f66f451Sopenharmony_ci { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); ;} 17980f66f451Sopenharmony_ci break; 17990f66f451Sopenharmony_ci 18000f66f451Sopenharmony_ci case 105: 18010f66f451Sopenharmony_ci 18020f66f451Sopenharmony_ci { (yyval.expr) = (yyvsp[-1].expr); ;} 18030f66f451Sopenharmony_ci break; 18040f66f451Sopenharmony_ci 18050f66f451Sopenharmony_ci case 106: 18060f66f451Sopenharmony_ci 18070f66f451Sopenharmony_ci { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); ;} 18080f66f451Sopenharmony_ci break; 18090f66f451Sopenharmony_ci 18100f66f451Sopenharmony_ci case 107: 18110f66f451Sopenharmony_ci 18120f66f451Sopenharmony_ci { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 18130f66f451Sopenharmony_ci break; 18140f66f451Sopenharmony_ci 18150f66f451Sopenharmony_ci case 108: 18160f66f451Sopenharmony_ci 18170f66f451Sopenharmony_ci { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); ;} 18180f66f451Sopenharmony_ci break; 18190f66f451Sopenharmony_ci 18200f66f451Sopenharmony_ci case 109: 18210f66f451Sopenharmony_ci 18220f66f451Sopenharmony_ci { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); ;} 18230f66f451Sopenharmony_ci break; 18240f66f451Sopenharmony_ci 18250f66f451Sopenharmony_ci case 110: 18260f66f451Sopenharmony_ci 18270f66f451Sopenharmony_ci { (yyval.symbol) = sym_lookup((yyvsp[0].string), 1); free((yyvsp[0].string)); ;} 18280f66f451Sopenharmony_ci break; 18290f66f451Sopenharmony_ci 18300f66f451Sopenharmony_ci 18310f66f451Sopenharmony_ci default: break; 18320f66f451Sopenharmony_ci } 18330f66f451Sopenharmony_ci 18340f66f451Sopenharmony_ci/* Line 1126 of yacc.c. */ 18350f66f451Sopenharmony_ci 18360f66f451Sopenharmony_ci 18370f66f451Sopenharmony_ci yyvsp -= yylen; 18380f66f451Sopenharmony_ci yyssp -= yylen; 18390f66f451Sopenharmony_ci 18400f66f451Sopenharmony_ci 18410f66f451Sopenharmony_ci YY_STACK_PRINT (yyss, yyssp); 18420f66f451Sopenharmony_ci 18430f66f451Sopenharmony_ci *++yyvsp = yyval; 18440f66f451Sopenharmony_ci 18450f66f451Sopenharmony_ci 18460f66f451Sopenharmony_ci /* Now `shift' the result of the reduction. Determine what state 18470f66f451Sopenharmony_ci that goes to, based on the state we popped back to and the rule 18480f66f451Sopenharmony_ci number reduced by. */ 18490f66f451Sopenharmony_ci 18500f66f451Sopenharmony_ci yyn = yyr1[yyn]; 18510f66f451Sopenharmony_ci 18520f66f451Sopenharmony_ci yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 18530f66f451Sopenharmony_ci if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 18540f66f451Sopenharmony_ci yystate = yytable[yystate]; 18550f66f451Sopenharmony_ci else 18560f66f451Sopenharmony_ci yystate = yydefgoto[yyn - YYNTOKENS]; 18570f66f451Sopenharmony_ci 18580f66f451Sopenharmony_ci goto yynewstate; 18590f66f451Sopenharmony_ci 18600f66f451Sopenharmony_ci 18610f66f451Sopenharmony_ci/*------------------------------------. 18620f66f451Sopenharmony_ci| yyerrlab -- here on detecting error | 18630f66f451Sopenharmony_ci`------------------------------------*/ 18640f66f451Sopenharmony_ciyyerrlab: 18650f66f451Sopenharmony_ci /* If not already recovering from an error, report this error. */ 18660f66f451Sopenharmony_ci if (!yyerrstatus) 18670f66f451Sopenharmony_ci { 18680f66f451Sopenharmony_ci ++yynerrs; 18690f66f451Sopenharmony_ci#if YYERROR_VERBOSE 18700f66f451Sopenharmony_ci yyn = yypact[yystate]; 18710f66f451Sopenharmony_ci 18720f66f451Sopenharmony_ci if (YYPACT_NINF < yyn && yyn < YYLAST) 18730f66f451Sopenharmony_ci { 18740f66f451Sopenharmony_ci int yytype = YYTRANSLATE (yychar); 18750f66f451Sopenharmony_ci YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 18760f66f451Sopenharmony_ci YYSIZE_T yysize = yysize0; 18770f66f451Sopenharmony_ci YYSIZE_T yysize1; 18780f66f451Sopenharmony_ci int yysize_overflow = 0; 18790f66f451Sopenharmony_ci char *yymsg = 0; 18800f66f451Sopenharmony_ci# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 18810f66f451Sopenharmony_ci char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 18820f66f451Sopenharmony_ci int yyx; 18830f66f451Sopenharmony_ci 18840f66f451Sopenharmony_ci#if 0 18850f66f451Sopenharmony_ci /* This is so xgettext sees the translatable formats that are 18860f66f451Sopenharmony_ci constructed on the fly. */ 18870f66f451Sopenharmony_ci YY_("syntax error, unexpected %s"); 18880f66f451Sopenharmony_ci YY_("syntax error, unexpected %s, expecting %s"); 18890f66f451Sopenharmony_ci YY_("syntax error, unexpected %s, expecting %s or %s"); 18900f66f451Sopenharmony_ci YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 18910f66f451Sopenharmony_ci YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 18920f66f451Sopenharmony_ci#endif 18930f66f451Sopenharmony_ci char *yyfmt; 18940f66f451Sopenharmony_ci char const *yyf; 18950f66f451Sopenharmony_ci static char const yyunexpected[] = "syntax error, unexpected %s"; 18960f66f451Sopenharmony_ci static char const yyexpecting[] = ", expecting %s"; 18970f66f451Sopenharmony_ci static char const yyor[] = " or %s"; 18980f66f451Sopenharmony_ci char yyformat[sizeof yyunexpected 18990f66f451Sopenharmony_ci + sizeof yyexpecting - 1 19000f66f451Sopenharmony_ci + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 19010f66f451Sopenharmony_ci * (sizeof yyor - 1))]; 19020f66f451Sopenharmony_ci char const *yyprefix = yyexpecting; 19030f66f451Sopenharmony_ci 19040f66f451Sopenharmony_ci /* Start YYX at -YYN if negative to avoid negative indexes in 19050f66f451Sopenharmony_ci YYCHECK. */ 19060f66f451Sopenharmony_ci int yyxbegin = yyn < 0 ? -yyn : 0; 19070f66f451Sopenharmony_ci 19080f66f451Sopenharmony_ci /* Stay within bounds of both yycheck and yytname. */ 19090f66f451Sopenharmony_ci int yychecklim = YYLAST - yyn; 19100f66f451Sopenharmony_ci int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 19110f66f451Sopenharmony_ci int yycount = 1; 19120f66f451Sopenharmony_ci 19130f66f451Sopenharmony_ci yyarg[0] = yytname[yytype]; 19140f66f451Sopenharmony_ci yyfmt = yystpcpy (yyformat, yyunexpected); 19150f66f451Sopenharmony_ci 19160f66f451Sopenharmony_ci for (yyx = yyxbegin; yyx < yyxend; ++yyx) 19170f66f451Sopenharmony_ci if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 19180f66f451Sopenharmony_ci { 19190f66f451Sopenharmony_ci if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 19200f66f451Sopenharmony_ci { 19210f66f451Sopenharmony_ci yycount = 1; 19220f66f451Sopenharmony_ci yysize = yysize0; 19230f66f451Sopenharmony_ci yyformat[sizeof yyunexpected - 1] = '\0'; 19240f66f451Sopenharmony_ci break; 19250f66f451Sopenharmony_ci } 19260f66f451Sopenharmony_ci yyarg[yycount++] = yytname[yyx]; 19270f66f451Sopenharmony_ci yysize1 = yysize + yytnamerr (0, yytname[yyx]); 19280f66f451Sopenharmony_ci yysize_overflow |= yysize1 < yysize; 19290f66f451Sopenharmony_ci yysize = yysize1; 19300f66f451Sopenharmony_ci yyfmt = yystpcpy (yyfmt, yyprefix); 19310f66f451Sopenharmony_ci yyprefix = yyor; 19320f66f451Sopenharmony_ci } 19330f66f451Sopenharmony_ci 19340f66f451Sopenharmony_ci yyf = YY_(yyformat); 19350f66f451Sopenharmony_ci yysize1 = yysize + yystrlen (yyf); 19360f66f451Sopenharmony_ci yysize_overflow |= yysize1 < yysize; 19370f66f451Sopenharmony_ci yysize = yysize1; 19380f66f451Sopenharmony_ci 19390f66f451Sopenharmony_ci if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) 19400f66f451Sopenharmony_ci yymsg = (char *) YYSTACK_ALLOC (yysize); 19410f66f451Sopenharmony_ci if (yymsg) 19420f66f451Sopenharmony_ci { 19430f66f451Sopenharmony_ci /* Avoid sprintf, as that infringes on the user's name space. 19440f66f451Sopenharmony_ci Don't have undefined behavior even if the translation 19450f66f451Sopenharmony_ci produced a string with the wrong number of "%s"s. */ 19460f66f451Sopenharmony_ci char *yyp = yymsg; 19470f66f451Sopenharmony_ci int yyi = 0; 19480f66f451Sopenharmony_ci while ((*yyp = *yyf)) 19490f66f451Sopenharmony_ci { 19500f66f451Sopenharmony_ci if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 19510f66f451Sopenharmony_ci { 19520f66f451Sopenharmony_ci yyp += yytnamerr (yyp, yyarg[yyi++]); 19530f66f451Sopenharmony_ci yyf += 2; 19540f66f451Sopenharmony_ci } 19550f66f451Sopenharmony_ci else 19560f66f451Sopenharmony_ci { 19570f66f451Sopenharmony_ci yyp++; 19580f66f451Sopenharmony_ci yyf++; 19590f66f451Sopenharmony_ci } 19600f66f451Sopenharmony_ci } 19610f66f451Sopenharmony_ci yyerror (yymsg); 19620f66f451Sopenharmony_ci YYSTACK_FREE (yymsg); 19630f66f451Sopenharmony_ci } 19640f66f451Sopenharmony_ci else 19650f66f451Sopenharmony_ci { 19660f66f451Sopenharmony_ci yyerror (YY_("syntax error")); 19670f66f451Sopenharmony_ci goto yyexhaustedlab; 19680f66f451Sopenharmony_ci } 19690f66f451Sopenharmony_ci } 19700f66f451Sopenharmony_ci else 19710f66f451Sopenharmony_ci#endif /* YYERROR_VERBOSE */ 19720f66f451Sopenharmony_ci yyerror (YY_("syntax error")); 19730f66f451Sopenharmony_ci } 19740f66f451Sopenharmony_ci 19750f66f451Sopenharmony_ci 19760f66f451Sopenharmony_ci 19770f66f451Sopenharmony_ci if (yyerrstatus == 3) 19780f66f451Sopenharmony_ci { 19790f66f451Sopenharmony_ci /* If just tried and failed to reuse look-ahead token after an 19800f66f451Sopenharmony_ci error, discard it. */ 19810f66f451Sopenharmony_ci 19820f66f451Sopenharmony_ci if (yychar <= YYEOF) 19830f66f451Sopenharmony_ci { 19840f66f451Sopenharmony_ci /* Return failure if at end of input. */ 19850f66f451Sopenharmony_ci if (yychar == YYEOF) 19860f66f451Sopenharmony_ci YYABORT; 19870f66f451Sopenharmony_ci } 19880f66f451Sopenharmony_ci else 19890f66f451Sopenharmony_ci { 19900f66f451Sopenharmony_ci yydestruct ("Error: discarding", yytoken, &yylval); 19910f66f451Sopenharmony_ci yychar = YYEMPTY; 19920f66f451Sopenharmony_ci } 19930f66f451Sopenharmony_ci } 19940f66f451Sopenharmony_ci 19950f66f451Sopenharmony_ci /* Else will try to reuse look-ahead token after shifting the error 19960f66f451Sopenharmony_ci token. */ 19970f66f451Sopenharmony_ci goto yyerrlab1; 19980f66f451Sopenharmony_ci 19990f66f451Sopenharmony_ci 20000f66f451Sopenharmony_ci/*---------------------------------------------------. 20010f66f451Sopenharmony_ci| yyerrorlab -- error raised explicitly by YYERROR. | 20020f66f451Sopenharmony_ci`---------------------------------------------------*/ 20030f66f451Sopenharmony_ciyyerrorlab: 20040f66f451Sopenharmony_ci 20050f66f451Sopenharmony_ci /* Pacify compilers like GCC when the user code never invokes 20060f66f451Sopenharmony_ci YYERROR and the label yyerrorlab therefore never appears in user 20070f66f451Sopenharmony_ci code. */ 20080f66f451Sopenharmony_ci if (0) 20090f66f451Sopenharmony_ci goto yyerrorlab; 20100f66f451Sopenharmony_ci 20110f66f451Sopenharmony_ciyyvsp -= yylen; 20120f66f451Sopenharmony_ci yyssp -= yylen; 20130f66f451Sopenharmony_ci yystate = *yyssp; 20140f66f451Sopenharmony_ci goto yyerrlab1; 20150f66f451Sopenharmony_ci 20160f66f451Sopenharmony_ci 20170f66f451Sopenharmony_ci/*-------------------------------------------------------------. 20180f66f451Sopenharmony_ci| yyerrlab1 -- common code for both syntax error and YYERROR. | 20190f66f451Sopenharmony_ci`-------------------------------------------------------------*/ 20200f66f451Sopenharmony_ciyyerrlab1: 20210f66f451Sopenharmony_ci yyerrstatus = 3; /* Each real token shifted decrements this. */ 20220f66f451Sopenharmony_ci 20230f66f451Sopenharmony_ci for (;;) 20240f66f451Sopenharmony_ci { 20250f66f451Sopenharmony_ci yyn = yypact[yystate]; 20260f66f451Sopenharmony_ci if (yyn != YYPACT_NINF) 20270f66f451Sopenharmony_ci { 20280f66f451Sopenharmony_ci yyn += YYTERROR; 20290f66f451Sopenharmony_ci if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 20300f66f451Sopenharmony_ci { 20310f66f451Sopenharmony_ci yyn = yytable[yyn]; 20320f66f451Sopenharmony_ci if (0 < yyn) 20330f66f451Sopenharmony_ci break; 20340f66f451Sopenharmony_ci } 20350f66f451Sopenharmony_ci } 20360f66f451Sopenharmony_ci 20370f66f451Sopenharmony_ci /* Pop the current state because it cannot handle the error token. */ 20380f66f451Sopenharmony_ci if (yyssp == yyss) 20390f66f451Sopenharmony_ci YYABORT; 20400f66f451Sopenharmony_ci 20410f66f451Sopenharmony_ci 20420f66f451Sopenharmony_ci yydestruct ("Error: popping", yystos[yystate], yyvsp); 20430f66f451Sopenharmony_ci YYPOPSTACK; 20440f66f451Sopenharmony_ci yystate = *yyssp; 20450f66f451Sopenharmony_ci YY_STACK_PRINT (yyss, yyssp); 20460f66f451Sopenharmony_ci } 20470f66f451Sopenharmony_ci 20480f66f451Sopenharmony_ci if (yyn == YYFINAL) 20490f66f451Sopenharmony_ci YYACCEPT; 20500f66f451Sopenharmony_ci 20510f66f451Sopenharmony_ci *++yyvsp = yylval; 20520f66f451Sopenharmony_ci 20530f66f451Sopenharmony_ci 20540f66f451Sopenharmony_ci /* Shift the error token. */ 20550f66f451Sopenharmony_ci YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 20560f66f451Sopenharmony_ci 20570f66f451Sopenharmony_ci yystate = yyn; 20580f66f451Sopenharmony_ci goto yynewstate; 20590f66f451Sopenharmony_ci 20600f66f451Sopenharmony_ci 20610f66f451Sopenharmony_ci/*-------------------------------------. 20620f66f451Sopenharmony_ci| yyacceptlab -- YYACCEPT comes here. | 20630f66f451Sopenharmony_ci`-------------------------------------*/ 20640f66f451Sopenharmony_ciyyacceptlab: 20650f66f451Sopenharmony_ci yyresult = 0; 20660f66f451Sopenharmony_ci goto yyreturn; 20670f66f451Sopenharmony_ci 20680f66f451Sopenharmony_ci/*-----------------------------------. 20690f66f451Sopenharmony_ci| yyabortlab -- YYABORT comes here. | 20700f66f451Sopenharmony_ci`-----------------------------------*/ 20710f66f451Sopenharmony_ciyyabortlab: 20720f66f451Sopenharmony_ci yyresult = 1; 20730f66f451Sopenharmony_ci goto yyreturn; 20740f66f451Sopenharmony_ci 20750f66f451Sopenharmony_ci#ifndef yyoverflow 20760f66f451Sopenharmony_ci/*-------------------------------------------------. 20770f66f451Sopenharmony_ci| yyexhaustedlab -- memory exhaustion comes here. | 20780f66f451Sopenharmony_ci`-------------------------------------------------*/ 20790f66f451Sopenharmony_ciyyexhaustedlab: 20800f66f451Sopenharmony_ci yyerror (YY_("memory exhausted")); 20810f66f451Sopenharmony_ci yyresult = 2; 20820f66f451Sopenharmony_ci /* Fall through. */ 20830f66f451Sopenharmony_ci#endif 20840f66f451Sopenharmony_ci 20850f66f451Sopenharmony_ciyyreturn: 20860f66f451Sopenharmony_ci if (yychar != YYEOF && yychar != YYEMPTY) 20870f66f451Sopenharmony_ci yydestruct ("Cleanup: discarding lookahead", 20880f66f451Sopenharmony_ci yytoken, &yylval); 20890f66f451Sopenharmony_ci while (yyssp != yyss) 20900f66f451Sopenharmony_ci { 20910f66f451Sopenharmony_ci yydestruct ("Cleanup: popping", 20920f66f451Sopenharmony_ci yystos[*yyssp], yyvsp); 20930f66f451Sopenharmony_ci YYPOPSTACK; 20940f66f451Sopenharmony_ci } 20950f66f451Sopenharmony_ci#ifndef yyoverflow 20960f66f451Sopenharmony_ci if (yyss != yyssa) 20970f66f451Sopenharmony_ci YYSTACK_FREE (yyss); 20980f66f451Sopenharmony_ci#endif 20990f66f451Sopenharmony_ci return yyresult; 21000f66f451Sopenharmony_ci} 21010f66f451Sopenharmony_ci 21020f66f451Sopenharmony_ci 21030f66f451Sopenharmony_ci 21040f66f451Sopenharmony_ci 21050f66f451Sopenharmony_ci 21060f66f451Sopenharmony_civoid conf_parse(const char *name) 21070f66f451Sopenharmony_ci{ 21080f66f451Sopenharmony_ci struct symbol *sym; 21090f66f451Sopenharmony_ci int i; 21100f66f451Sopenharmony_ci 21110f66f451Sopenharmony_ci zconf_initscan(name); 21120f66f451Sopenharmony_ci 21130f66f451Sopenharmony_ci sym_init(); 21140f66f451Sopenharmony_ci menu_init(); 21150f66f451Sopenharmony_ci modules_sym = sym_lookup(NULL, 0); 21160f66f451Sopenharmony_ci modules_sym->type = S_BOOLEAN; 21170f66f451Sopenharmony_ci modules_sym->flags |= SYMBOL_AUTO; 21180f66f451Sopenharmony_ci rootmenu.prompt = menu_add_prompt(P_MENU, PROJECT_NAME" Configuration", NULL); 21190f66f451Sopenharmony_ci 21200f66f451Sopenharmony_ci#if YYDEBUG 21210f66f451Sopenharmony_ci if (getenv("ZCONF_DEBUG")) 21220f66f451Sopenharmony_ci zconfdebug = 1; 21230f66f451Sopenharmony_ci#endif 21240f66f451Sopenharmony_ci zconfparse(); 21250f66f451Sopenharmony_ci if (zconfnerrs) 21260f66f451Sopenharmony_ci exit(1); 21270f66f451Sopenharmony_ci if (!modules_sym->prop) { 21280f66f451Sopenharmony_ci struct property *prop; 21290f66f451Sopenharmony_ci 21300f66f451Sopenharmony_ci prop = prop_alloc(P_DEFAULT, modules_sym); 21310f66f451Sopenharmony_ci prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0)); 21320f66f451Sopenharmony_ci } 21330f66f451Sopenharmony_ci menu_finalize(&rootmenu); 21340f66f451Sopenharmony_ci for_all_symbols(i, sym) { 21350f66f451Sopenharmony_ci sym_check_deps(sym); 21360f66f451Sopenharmony_ci } 21370f66f451Sopenharmony_ci 21380f66f451Sopenharmony_ci sym_change_count = 1; 21390f66f451Sopenharmony_ci} 21400f66f451Sopenharmony_ci 21410f66f451Sopenharmony_ciconst char *zconf_tokenname(int token) 21420f66f451Sopenharmony_ci{ 21430f66f451Sopenharmony_ci switch (token) { 21440f66f451Sopenharmony_ci case T_MENU: return "menu"; 21450f66f451Sopenharmony_ci case T_ENDMENU: return "endmenu"; 21460f66f451Sopenharmony_ci case T_CHOICE: return "choice"; 21470f66f451Sopenharmony_ci case T_ENDCHOICE: return "endchoice"; 21480f66f451Sopenharmony_ci case T_IF: return "if"; 21490f66f451Sopenharmony_ci case T_ENDIF: return "endif"; 21500f66f451Sopenharmony_ci case T_DEPENDS: return "depends"; 21510f66f451Sopenharmony_ci } 21520f66f451Sopenharmony_ci return "<token>"; 21530f66f451Sopenharmony_ci} 21540f66f451Sopenharmony_ci 21550f66f451Sopenharmony_cistatic bool zconf_endtoken(struct kconf_id *id, int starttoken, int endtoken) 21560f66f451Sopenharmony_ci{ 21570f66f451Sopenharmony_ci if (id->token != endtoken) { 21580f66f451Sopenharmony_ci zconf_error("unexpected '%s' within %s block", 21590f66f451Sopenharmony_ci kconf_id_strings + id->name, zconf_tokenname(starttoken)); 21600f66f451Sopenharmony_ci zconfnerrs++; 21610f66f451Sopenharmony_ci return false; 21620f66f451Sopenharmony_ci } 21630f66f451Sopenharmony_ci if (current_menu->file != current_file) { 21640f66f451Sopenharmony_ci zconf_error("'%s' in different file than '%s'", 21650f66f451Sopenharmony_ci kconf_id_strings + id->name, zconf_tokenname(starttoken)); 21660f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: location of the '%s'\n", 21670f66f451Sopenharmony_ci current_menu->file->name, current_menu->lineno, 21680f66f451Sopenharmony_ci zconf_tokenname(starttoken)); 21690f66f451Sopenharmony_ci zconfnerrs++; 21700f66f451Sopenharmony_ci return false; 21710f66f451Sopenharmony_ci } 21720f66f451Sopenharmony_ci return true; 21730f66f451Sopenharmony_ci} 21740f66f451Sopenharmony_ci 21750f66f451Sopenharmony_cistatic void zconfprint(const char *err, ...) 21760f66f451Sopenharmony_ci{ 21770f66f451Sopenharmony_ci va_list ap; 21780f66f451Sopenharmony_ci 21790f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); 21800f66f451Sopenharmony_ci va_start(ap, err); 21810f66f451Sopenharmony_ci vfprintf(stderr, err, ap); 21820f66f451Sopenharmony_ci va_end(ap); 21830f66f451Sopenharmony_ci fprintf(stderr, "\n"); 21840f66f451Sopenharmony_ci} 21850f66f451Sopenharmony_ci 21860f66f451Sopenharmony_cistatic void zconf_error(const char *err, ...) 21870f66f451Sopenharmony_ci{ 21880f66f451Sopenharmony_ci va_list ap; 21890f66f451Sopenharmony_ci 21900f66f451Sopenharmony_ci zconfnerrs++; 21910f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); 21920f66f451Sopenharmony_ci va_start(ap, err); 21930f66f451Sopenharmony_ci vfprintf(stderr, err, ap); 21940f66f451Sopenharmony_ci va_end(ap); 21950f66f451Sopenharmony_ci fprintf(stderr, "\n"); 21960f66f451Sopenharmony_ci} 21970f66f451Sopenharmony_ci 21980f66f451Sopenharmony_cistatic void zconferror(const char *err) 21990f66f451Sopenharmony_ci{ 22000f66f451Sopenharmony_ci#if YYDEBUG 22010f66f451Sopenharmony_ci fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); 22020f66f451Sopenharmony_ci#endif 22030f66f451Sopenharmony_ci} 22040f66f451Sopenharmony_ci 22050f66f451Sopenharmony_civoid print_quoted_string(FILE *out, const char *str) 22060f66f451Sopenharmony_ci{ 22070f66f451Sopenharmony_ci const char *p; 22080f66f451Sopenharmony_ci int len; 22090f66f451Sopenharmony_ci 22100f66f451Sopenharmony_ci putc('"', out); 22110f66f451Sopenharmony_ci while ((p = strchr(str, '"'))) { 22120f66f451Sopenharmony_ci len = p - str; 22130f66f451Sopenharmony_ci if (len) 22140f66f451Sopenharmony_ci fprintf(out, "%.*s", len, str); 22150f66f451Sopenharmony_ci fputs("\\\"", out); 22160f66f451Sopenharmony_ci str = p + 1; 22170f66f451Sopenharmony_ci } 22180f66f451Sopenharmony_ci fputs(str, out); 22190f66f451Sopenharmony_ci putc('"', out); 22200f66f451Sopenharmony_ci} 22210f66f451Sopenharmony_ci 22220f66f451Sopenharmony_civoid print_symbol(FILE *out, struct menu *menu) 22230f66f451Sopenharmony_ci{ 22240f66f451Sopenharmony_ci struct symbol *sym = menu->sym; 22250f66f451Sopenharmony_ci struct property *prop; 22260f66f451Sopenharmony_ci 22270f66f451Sopenharmony_ci if (sym_is_choice(sym)) 22280f66f451Sopenharmony_ci fprintf(out, "choice\n"); 22290f66f451Sopenharmony_ci else 22300f66f451Sopenharmony_ci fprintf(out, "config %s\n", sym->name); 22310f66f451Sopenharmony_ci switch (sym->type) { 22320f66f451Sopenharmony_ci case S_BOOLEAN: 22330f66f451Sopenharmony_ci fputs(" boolean\n", out); 22340f66f451Sopenharmony_ci break; 22350f66f451Sopenharmony_ci case S_TRISTATE: 22360f66f451Sopenharmony_ci fputs(" tristate\n", out); 22370f66f451Sopenharmony_ci break; 22380f66f451Sopenharmony_ci case S_STRING: 22390f66f451Sopenharmony_ci fputs(" string\n", out); 22400f66f451Sopenharmony_ci break; 22410f66f451Sopenharmony_ci case S_INT: 22420f66f451Sopenharmony_ci fputs(" integer\n", out); 22430f66f451Sopenharmony_ci break; 22440f66f451Sopenharmony_ci case S_HEX: 22450f66f451Sopenharmony_ci fputs(" hex\n", out); 22460f66f451Sopenharmony_ci break; 22470f66f451Sopenharmony_ci default: 22480f66f451Sopenharmony_ci fputs(" ???\n", out); 22490f66f451Sopenharmony_ci break; 22500f66f451Sopenharmony_ci } 22510f66f451Sopenharmony_ci for (prop = sym->prop; prop; prop = prop->next) { 22520f66f451Sopenharmony_ci if (prop->menu != menu) 22530f66f451Sopenharmony_ci continue; 22540f66f451Sopenharmony_ci switch (prop->type) { 22550f66f451Sopenharmony_ci case P_PROMPT: 22560f66f451Sopenharmony_ci fputs(" prompt ", out); 22570f66f451Sopenharmony_ci print_quoted_string(out, prop->text); 22580f66f451Sopenharmony_ci if (!expr_is_yes(prop->visible.expr)) { 22590f66f451Sopenharmony_ci fputs(" if ", out); 22600f66f451Sopenharmony_ci expr_fprint(prop->visible.expr, out); 22610f66f451Sopenharmony_ci } 22620f66f451Sopenharmony_ci fputc('\n', out); 22630f66f451Sopenharmony_ci break; 22640f66f451Sopenharmony_ci case P_DEFAULT: 22650f66f451Sopenharmony_ci fputs( " default ", out); 22660f66f451Sopenharmony_ci expr_fprint(prop->expr, out); 22670f66f451Sopenharmony_ci if (!expr_is_yes(prop->visible.expr)) { 22680f66f451Sopenharmony_ci fputs(" if ", out); 22690f66f451Sopenharmony_ci expr_fprint(prop->visible.expr, out); 22700f66f451Sopenharmony_ci } 22710f66f451Sopenharmony_ci fputc('\n', out); 22720f66f451Sopenharmony_ci break; 22730f66f451Sopenharmony_ci case P_CHOICE: 22740f66f451Sopenharmony_ci fputs(" #choice value\n", out); 22750f66f451Sopenharmony_ci break; 22760f66f451Sopenharmony_ci default: 22770f66f451Sopenharmony_ci fprintf(out, " unknown prop %d!\n", prop->type); 22780f66f451Sopenharmony_ci break; 22790f66f451Sopenharmony_ci } 22800f66f451Sopenharmony_ci } 22810f66f451Sopenharmony_ci if (sym->help) { 22820f66f451Sopenharmony_ci int len = strlen(sym->help); 22830f66f451Sopenharmony_ci while (sym->help[--len] == '\n') 22840f66f451Sopenharmony_ci sym->help[len] = 0; 22850f66f451Sopenharmony_ci fprintf(out, " help\n%s\n", sym->help); 22860f66f451Sopenharmony_ci } 22870f66f451Sopenharmony_ci fputc('\n', out); 22880f66f451Sopenharmony_ci} 22890f66f451Sopenharmony_ci 22900f66f451Sopenharmony_civoid zconfdump(FILE *out) 22910f66f451Sopenharmony_ci{ 22920f66f451Sopenharmony_ci struct property *prop; 22930f66f451Sopenharmony_ci struct symbol *sym; 22940f66f451Sopenharmony_ci struct menu *menu; 22950f66f451Sopenharmony_ci 22960f66f451Sopenharmony_ci menu = rootmenu.list; 22970f66f451Sopenharmony_ci while (menu) { 22980f66f451Sopenharmony_ci if ((sym = menu->sym)) 22990f66f451Sopenharmony_ci print_symbol(out, menu); 23000f66f451Sopenharmony_ci else if ((prop = menu->prompt)) { 23010f66f451Sopenharmony_ci switch (prop->type) { 23020f66f451Sopenharmony_ci case P_COMMENT: 23030f66f451Sopenharmony_ci fputs("\ncomment ", out); 23040f66f451Sopenharmony_ci print_quoted_string(out, prop->text); 23050f66f451Sopenharmony_ci fputs("\n", out); 23060f66f451Sopenharmony_ci break; 23070f66f451Sopenharmony_ci case P_MENU: 23080f66f451Sopenharmony_ci fputs("\nmenu ", out); 23090f66f451Sopenharmony_ci print_quoted_string(out, prop->text); 23100f66f451Sopenharmony_ci fputs("\n", out); 23110f66f451Sopenharmony_ci break; 23120f66f451Sopenharmony_ci default: 23130f66f451Sopenharmony_ci ; 23140f66f451Sopenharmony_ci } 23150f66f451Sopenharmony_ci if (!expr_is_yes(prop->visible.expr)) { 23160f66f451Sopenharmony_ci fputs(" depends ", out); 23170f66f451Sopenharmony_ci expr_fprint(prop->visible.expr, out); 23180f66f451Sopenharmony_ci fputc('\n', out); 23190f66f451Sopenharmony_ci } 23200f66f451Sopenharmony_ci fputs("\n", out); 23210f66f451Sopenharmony_ci } 23220f66f451Sopenharmony_ci 23230f66f451Sopenharmony_ci if (menu->list) 23240f66f451Sopenharmony_ci menu = menu->list; 23250f66f451Sopenharmony_ci else if (menu->next) 23260f66f451Sopenharmony_ci menu = menu->next; 23270f66f451Sopenharmony_ci else while ((menu = menu->parent)) { 23280f66f451Sopenharmony_ci if (menu->prompt && menu->prompt->type == P_MENU) 23290f66f451Sopenharmony_ci fputs("\nendmenu\n", out); 23300f66f451Sopenharmony_ci if (menu->next) { 23310f66f451Sopenharmony_ci menu = menu->next; 23320f66f451Sopenharmony_ci break; 23330f66f451Sopenharmony_ci } 23340f66f451Sopenharmony_ci } 23350f66f451Sopenharmony_ci } 23360f66f451Sopenharmony_ci} 23370f66f451Sopenharmony_ci 23380f66f451Sopenharmony_ci#include "lex.zconf.c" 23390f66f451Sopenharmony_ci#include "util.c" 23400f66f451Sopenharmony_ci#include "confdata.c" 23410f66f451Sopenharmony_ci#include "expr.c" 23420f66f451Sopenharmony_ci#include "symbol.c" 23430f66f451Sopenharmony_ci#include "menu.c" 23440f66f451Sopenharmony_ci 23450f66f451Sopenharmony_ci 2346