| File: | cfgparse.c |
| Location: | line 1113, column 5 |
| Description: | Value stored to 'yymsg' is never read |
| 1 | |
| 2 | /* A Bison parser, made by GNU Bison 2.4.1. */ |
| 3 | |
| 4 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
| 5 | |
| 6 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
| 7 | Free Software Foundation, Inc. |
| 8 | |
| 9 | This program is free software: you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation, either version 3 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | This program is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 21 | |
| 22 | /* As a special exception, you may create a larger work that contains |
| 23 | part or all of the Bison parser skeleton and distribute that work |
| 24 | under terms of your choice, so long as that work isn't itself a |
| 25 | parser generator using the skeleton or a modified version thereof |
| 26 | as a parser skeleton. Alternatively, if you modify or redistribute |
| 27 | the parser skeleton itself, you may (at your option) remove this |
| 28 | special exception, which will cause the skeleton and the resulting |
| 29 | Bison output files to be licensed under the GNU General Public |
| 30 | License without this special exception. |
| 31 | |
| 32 | This special exception was added by the Free Software Foundation in |
| 33 | version 2.2 of Bison. */ |
| 34 | |
| 35 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
| 36 | simplifying the original so-called "semantic" parser. */ |
| 37 | |
| 38 | /* All symbols defined below should begin with yy or YY, to avoid |
| 39 | infringing on user name space. This should be done even for local |
| 40 | variables, as they might otherwise be expanded by user macros. |
| 41 | There are some unavoidable exceptions within include files to |
| 42 | define necessary library symbols; they are noted "INFRINGES ON |
| 43 | USER NAME SPACE" below. */ |
| 44 | |
| 45 | /* Identify Bison output. */ |
| 46 | #define YYBISON1 1 |
| 47 | |
| 48 | /* Bison version. */ |
| 49 | #define YYBISON_VERSION"2.4.1" "2.4.1" |
| 50 | |
| 51 | /* Skeleton name. */ |
| 52 | #define YYSKELETON_NAME"yacc.c" "yacc.c" |
| 53 | |
| 54 | /* Pure parsers. */ |
| 55 | #define YYPURE0 0 |
| 56 | |
| 57 | /* Push parsers. */ |
| 58 | #define YYPUSH0 0 |
| 59 | |
| 60 | /* Pull parsers. */ |
| 61 | #define YYPULL1 1 |
| 62 | |
| 63 | /* Using locations. */ |
| 64 | #define YYLSP_NEEDED0 0 |
| 65 | |
| 66 | |
| 67 | |
| 68 | /* Copy the first part of user declarations. */ |
| 69 | |
| 70 | /* Line 189 of yacc.c */ |
| 71 | #line 62 "cfgparse.y" |
| 72 | |
| 73 | #ifdef DEBUG |
| 74 | #define YYDEBUG0 1 |
| 75 | #endif |
| 76 | #define DEBUG_VARparseDebug parseDebug |
| 77 | #include "xkbevd.h" |
| 78 | #include <stdlib.h> |
| 79 | |
| 80 | |
| 81 | /* Line 189 of yacc.c */ |
| 82 | #line 83 "cfgparse.c" |
| 83 | |
| 84 | /* Enabling traces. */ |
| 85 | #ifndef YYDEBUG0 |
| 86 | # define YYDEBUG0 0 |
| 87 | #endif |
| 88 | |
| 89 | /* Enabling verbose error messages. */ |
| 90 | #ifdef YYERROR_VERBOSE0 |
| 91 | # undef YYERROR_VERBOSE0 |
| 92 | # define YYERROR_VERBOSE0 1 |
| 93 | #else |
| 94 | # define YYERROR_VERBOSE0 0 |
| 95 | #endif |
| 96 | |
| 97 | /* Enabling the token table. */ |
| 98 | #ifndef YYTOKEN_TABLE0 |
| 99 | # define YYTOKEN_TABLE0 0 |
| 100 | #endif |
| 101 | |
| 102 | |
| 103 | /* Tokens. */ |
| 104 | #ifndef YYTOKENTYPE |
| 105 | # define YYTOKENTYPE |
| 106 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
| 107 | know about them. */ |
| 108 | enum yytokentype { |
| 109 | END_OF_FILE0 = 0, |
| 110 | ERROR255 = 255, |
| 111 | BELL1 = 1, |
| 112 | ACCESSX2 = 2, |
| 113 | MESSAGE3 = 3, |
| 114 | NONE20 = 20, |
| 115 | IGNORE21 = 21, |
| 116 | ECHO22 = 22, |
| 117 | PRINT_EV23 = 23, |
| 118 | SHELL24 = 24, |
| 119 | SOUND25 = 25, |
| 120 | EQUALS40 = 40, |
| 121 | PLUS41 = 41, |
| 122 | MINUS42 = 42, |
| 123 | DIVIDE43 = 43, |
| 124 | TIMES44 = 44, |
| 125 | OBRACE45 = 45, |
| 126 | CBRACE46 = 46, |
| 127 | OPAREN47 = 47, |
| 128 | CPAREN48 = 48, |
| 129 | OBRACKET49 = 49, |
| 130 | CBRACKET50 = 50, |
| 131 | DOT51 = 51, |
| 132 | COMMA52 = 52, |
| 133 | SEMI53 = 53, |
| 134 | EXCLAM54 = 54, |
| 135 | INVERT55 = 55, |
| 136 | STRING60 = 60, |
| 137 | INTEGER61 = 61, |
| 138 | FLOAT62 = 62, |
| 139 | IDENT63 = 63, |
| 140 | KEYNAME64 = 64 |
| 141 | }; |
| 142 | #endif |
| 143 | /* Tokens. */ |
| 144 | #define END_OF_FILE0 0 |
| 145 | #define ERROR255 255 |
| 146 | #define BELL1 1 |
| 147 | #define ACCESSX2 2 |
| 148 | #define MESSAGE3 3 |
| 149 | #define NONE20 20 |
| 150 | #define IGNORE21 21 |
| 151 | #define ECHO22 22 |
| 152 | #define PRINT_EV23 23 |
| 153 | #define SHELL24 24 |
| 154 | #define SOUND25 25 |
| 155 | #define EQUALS40 40 |
| 156 | #define PLUS41 41 |
| 157 | #define MINUS42 42 |
| 158 | #define DIVIDE43 43 |
| 159 | #define TIMES44 44 |
| 160 | #define OBRACE45 45 |
| 161 | #define CBRACE46 46 |
| 162 | #define OPAREN47 47 |
| 163 | #define CPAREN48 48 |
| 164 | #define OBRACKET49 49 |
| 165 | #define CBRACKET50 50 |
| 166 | #define DOT51 51 |
| 167 | #define COMMA52 52 |
| 168 | #define SEMI53 53 |
| 169 | #define EXCLAM54 54 |
| 170 | #define INVERT55 55 |
| 171 | #define STRING60 60 |
| 172 | #define INTEGER61 61 |
| 173 | #define FLOAT62 62 |
| 174 | #define IDENT63 63 |
| 175 | #define KEYNAME64 64 |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED1 |
| 181 | typedef union YYSTYPE |
| 182 | { |
| 183 | |
| 184 | /* Line 214 of yacc.c */ |
| 185 | #line 76 "cfgparse.y" |
| 186 | |
| 187 | char * str; |
| 188 | int ival; |
| 189 | CfgEntryPtr entry; |
| 190 | ActDefPtr act; |
| 191 | |
| 192 | |
| 193 | |
| 194 | /* Line 214 of yacc.c */ |
| 195 | #line 196 "cfgparse.c" |
| 196 | } YYSTYPE; |
| 197 | # define YYSTYPE_IS_TRIVIAL1 1 |
| 198 | # define yystypeYYSTYPE YYSTYPE /* obsolescent; will be withdrawn */ |
| 199 | # define YYSTYPE_IS_DECLARED1 1 |
| 200 | #endif |
| 201 | |
| 202 | |
| 203 | /* Copy the second part of user declarations. */ |
| 204 | |
| 205 | |
| 206 | /* Line 264 of yacc.c */ |
| 207 | #line 208 "cfgparse.c" |
| 208 | |
| 209 | #ifdef short |
| 210 | # undef short |
| 211 | #endif |
| 212 | |
| 213 | #ifdef YYTYPE_UINT8 |
| 214 | typedef YYTYPE_UINT8 yytype_uint8; |
| 215 | #else |
| 216 | typedef unsigned char yytype_uint8; |
| 217 | #endif |
| 218 | |
| 219 | #ifdef YYTYPE_INT8 |
| 220 | typedef YYTYPE_INT8 yytype_int8; |
| 221 | #elif (defined __STDC__1 || defined __C99__FUNC__ \ |
| 222 | || defined __cplusplus || defined _MSC_VER) |
| 223 | typedef signed char yytype_int8; |
| 224 | #else |
| 225 | typedef short int yytype_int8; |
| 226 | #endif |
| 227 | |
| 228 | #ifdef YYTYPE_UINT16 |
| 229 | typedef YYTYPE_UINT16 yytype_uint16; |
| 230 | #else |
| 231 | typedef unsigned short int yytype_uint16; |
| 232 | #endif |
| 233 | |
| 234 | #ifdef YYTYPE_INT16 |
| 235 | typedef YYTYPE_INT16 yytype_int16; |
| 236 | #else |
| 237 | typedef short int yytype_int16; |
| 238 | #endif |
| 239 | |
| 240 | #ifndef YYSIZE_Tunsigned int |
| 241 | # ifdef __SIZE_TYPE__unsigned int |
| 242 | # define YYSIZE_Tunsigned int __SIZE_TYPE__unsigned int |
| 243 | # elif defined size_t |
| 244 | # define YYSIZE_Tunsigned int size_t |
| 245 | # elif ! defined YYSIZE_Tunsigned int && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 246 | || defined __cplusplus || defined _MSC_VER) |
| 247 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 248 | # define YYSIZE_Tunsigned int size_t |
| 249 | # else |
| 250 | # define YYSIZE_Tunsigned int unsigned int |
| 251 | # endif |
| 252 | #endif |
| 253 | |
| 254 | #define YYSIZE_MAXIMUM((unsigned int) -1) ((YYSIZE_Tunsigned int) -1) |
| 255 | |
| 256 | #ifndef YY_ |
| 257 | # if YYENABLE_NLS |
| 258 | # if ENABLE_NLS |
| 259 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 260 | # define YY_(msgid)msgid dgettext ("bison-runtime", msgid) |
| 261 | # endif |
| 262 | # endif |
| 263 | # ifndef YY_ |
| 264 | # define YY_(msgid)msgid msgid |
| 265 | # endif |
| 266 | #endif |
| 267 | |
| 268 | /* Suppress unused-variable warnings by "using" E. */ |
| 269 | #if ! defined lint || defined __GNUC__4 |
| 270 | # define YYUSE(e)((void) (e)) ((void) (e)) |
| 271 | #else |
| 272 | # define YYUSE(e)((void) (e)) /* empty */ |
| 273 | #endif |
| 274 | |
| 275 | /* Identity function, used to suppress warnings about constant conditions. */ |
| 276 | #ifndef lint |
| 277 | # define YYID(n)(n) (n) |
| 278 | #else |
| 279 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 280 | || defined __cplusplus || defined _MSC_VER) |
| 281 | static int |
| 282 | YYID (int yyi)(int yyi) |
| 283 | #else |
| 284 | static int |
| 285 | YYID (yyi)(yyi) |
| 286 | int yyi; |
| 287 | #endif |
| 288 | { |
| 289 | return yyi; |
| 290 | } |
| 291 | #endif |
| 292 | |
| 293 | #if ! defined yyoverflow || YYERROR_VERBOSE0 |
| 294 | |
| 295 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 296 | |
| 297 | # ifdef YYSTACK_USE_ALLOCA |
| 298 | # if YYSTACK_USE_ALLOCA |
| 299 | # ifdef __GNUC__4 |
| 300 | # define YYSTACK_ALLOCmalloc __builtin_alloca |
| 301 | # elif defined __BUILTIN_VA_ARG_INCR |
| 302 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 303 | # elif defined _AIX |
| 304 | # define YYSTACK_ALLOCmalloc __alloca |
| 305 | # elif defined _MSC_VER |
| 306 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 307 | # define alloca _alloca |
| 308 | # else |
| 309 | # define YYSTACK_ALLOCmalloc alloca |
| 310 | # if ! defined _ALLOCA_H1 && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 311 | || defined __cplusplus || defined _MSC_VER) |
| 312 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 313 | # ifndef _STDLIB_H1 |
| 314 | # define _STDLIB_H1 1 |
| 315 | # endif |
| 316 | # endif |
| 317 | # endif |
| 318 | # endif |
| 319 | # endif |
| 320 | |
| 321 | # ifdef YYSTACK_ALLOCmalloc |
| 322 | /* Pacify GCC's `empty if-body' warning. */ |
| 323 | # define YYSTACK_FREEfree(Ptr) do { /* empty */; } while (YYID (0)(0)) |
| 324 | # ifndef YYSTACK_ALLOC_MAXIMUM((unsigned int) -1) |
| 325 | /* The OS might guarantee only one guard page at the bottom of the stack, |
| 326 | and a page size can be as small as 4096 bytes. So we cannot safely |
| 327 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 328 | to allow for a few compiler-allocated temporary stack slots. */ |
| 329 | # define YYSTACK_ALLOC_MAXIMUM((unsigned int) -1) 4032 /* reasonable circa 2006 */ |
| 330 | # endif |
| 331 | # else |
| 332 | # define YYSTACK_ALLOCmalloc YYMALLOCmalloc |
| 333 | # define YYSTACK_FREEfree YYFREEfree |
| 334 | # ifndef YYSTACK_ALLOC_MAXIMUM((unsigned int) -1) |
| 335 | # define YYSTACK_ALLOC_MAXIMUM((unsigned int) -1) YYSIZE_MAXIMUM((unsigned int) -1) |
| 336 | # endif |
| 337 | # if (defined __cplusplus && ! defined _STDLIB_H1 \ |
| 338 | && ! ((defined YYMALLOCmalloc || defined malloc) \ |
| 339 | && (defined YYFREEfree || defined free))) |
| 340 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 341 | # ifndef _STDLIB_H1 |
| 342 | # define _STDLIB_H1 1 |
| 343 | # endif |
| 344 | # endif |
| 345 | # ifndef YYMALLOCmalloc |
| 346 | # define YYMALLOCmalloc malloc |
| 347 | # if ! defined malloc && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 348 | || defined __cplusplus || defined _MSC_VER) |
| 349 | void *malloc (YYSIZE_Tunsigned int); /* INFRINGES ON USER NAME SPACE */ |
| 350 | # endif |
| 351 | # endif |
| 352 | # ifndef YYFREEfree |
| 353 | # define YYFREEfree free |
| 354 | # if ! defined free && ! defined _STDLIB_H1 && (defined __STDC__1 || defined __C99__FUNC__ \ |
| 355 | || defined __cplusplus || defined _MSC_VER) |
| 356 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 357 | # endif |
| 358 | # endif |
| 359 | # endif |
| 360 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 361 | |
| 362 | |
| 363 | #if (! defined yyoverflow \ |
| 364 | && (! defined __cplusplus \ |
| 365 | || (defined YYSTYPE_IS_TRIVIAL1 && YYSTYPE_IS_TRIVIAL1))) |
| 366 | |
| 367 | /* A type that is properly aligned for any stack member. */ |
| 368 | union yyalloc |
| 369 | { |
| 370 | yytype_int16 yyss_alloc; |
| 371 | YYSTYPE yyvs_alloc; |
| 372 | }; |
| 373 | |
| 374 | /* The size of the maximum gap between one aligned stack and the next. */ |
| 375 | # define YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1) (sizeof (union yyalloc) - 1) |
| 376 | |
| 377 | /* The size of an array large to enough to hold all stacks, each with |
| 378 | N elements. */ |
| 379 | # define YYSTACK_BYTES(N)((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof ( union yyalloc) - 1)) \ |
| 380 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 381 | + YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1)) |
| 382 | |
| 383 | /* Copy COUNT objects from FROM to TO. The source and destination do |
| 384 | not overlap. */ |
| 385 | # ifndef YYCOPY |
| 386 | # if defined __GNUC__4 && 1 < __GNUC__4 |
| 387 | # define YYCOPY(To, From, Count)__builtin_memcpy (To, From, (Count) * sizeof (*(From))) \ |
| 388 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
| 389 | # else |
| 390 | # define YYCOPY(To, From, Count)__builtin_memcpy (To, From, (Count) * sizeof (*(From))) \ |
| 391 | do \ |
| 392 | { \ |
| 393 | YYSIZE_Tunsigned int yyi; \ |
| 394 | for (yyi = 0; yyi < (Count); yyi++) \ |
| 395 | (To)[yyi] = (From)[yyi]; \ |
| 396 | } \ |
| 397 | while (YYID (0)(0)) |
| 398 | # endif |
| 399 | # endif |
| 400 | |
| 401 | /* Relocate STACK from its old location to the new one. The |
| 402 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 403 | elements in the stack, and YYPTR gives the new location of the |
| 404 | stack. Advance YYPTR to a properly aligned location for the next |
| 405 | stack. */ |
| 406 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 407 | do \ |
| 408 | { \ |
| 409 | YYSIZE_Tunsigned int yynewbytes; \ |
| 410 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize)__builtin_memcpy (&yyptr->Stack_alloc, Stack, (yysize) * sizeof (*(Stack))); \ |
| 411 | Stack = &yyptr->Stack_alloc; \ |
| 412 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM(sizeof (union yyalloc) - 1); \ |
| 413 | yyptr += yynewbytes / sizeof (*yyptr); \ |
| 414 | } \ |
| 415 | while (YYID (0)(0)) |
| 416 | |
| 417 | #endif |
| 418 | |
| 419 | /* YYFINAL -- State number of the termination state. */ |
| 420 | #define YYFINAL12 12 |
| 421 | /* YYLAST -- Last index in YYTABLE. */ |
| 422 | #define YYLAST28 28 |
| 423 | |
| 424 | /* YYNTOKENS -- Number of terminals. */ |
| 425 | #define YYNTOKENS34 34 |
| 426 | /* YYNNTS -- Number of nonterminals. */ |
| 427 | #define YYNNTS14 14 |
| 428 | /* YYNRULES -- Number of rules. */ |
| 429 | #define YYNRULES27 27 |
| 430 | /* YYNRULES -- Number of states. */ |
| 431 | #define YYNSTATES33 33 |
| 432 | |
| 433 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
| 434 | #define YYUNDEFTOK2 2 |
| 435 | #define YYMAXUTOK257 257 |
| 436 | |
| 437 | #define YYTRANSLATE(YYX)((unsigned int) (YYX) <= 257 ? yytranslate[YYX] : 2) \ |
| 438 | ((unsigned int) (YYX) <= YYMAXUTOK257 ? yytranslate[YYX] : YYUNDEFTOK2) |
| 439 | |
| 440 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
| 441 | static const yytype_uint8 yytranslate[] = |
| 442 | { |
| 443 | 0, 4, 5, 6, 2, 2, 2, 2, 2, 2, |
| 444 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 445 | 7, 8, 9, 10, 11, 12, 2, 2, 2, 2, |
| 446 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 447 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, |
| 448 | 23, 24, 25, 26, 27, 28, 2, 2, 2, 2, |
| 449 | 29, 30, 31, 32, 33, 2, 2, 2, 2, 2, |
| 450 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 451 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 452 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 453 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 454 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 455 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 456 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 457 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 458 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 459 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 460 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 461 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 462 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 463 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 464 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 465 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 466 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 467 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 468 | 2, 2, 2, 2, 2, 3, 1, 2 |
| 469 | }; |
| 470 | |
| 471 | #if YYDEBUG0 |
| 472 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
| 473 | YYRHS. */ |
| 474 | static const yytype_uint8 yyprhs[] = |
| 475 | { |
| 476 | 0, 0, 3, 5, 8, 10, 13, 15, 19, 24, |
| 477 | 26, 28, 30, 33, 35, 37, 39, 41, 43, 45, |
| 478 | 46, 48, 49, 51, 53, 55, 57, 58 |
| 479 | }; |
| 480 | |
| 481 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
| 482 | static const yytype_int8 yyrhs[] = |
| 483 | { |
| 484 | 35, 0, -1, 36, -1, 36, 37, -1, 37, -1, |
| 485 | 39, 41, -1, 38, -1, 45, 13, 44, -1, 40, |
| 486 | 20, 43, 21, -1, 4, -1, 5, -1, 6, -1, |
| 487 | 42, 46, -1, 7, -1, 8, -1, 9, -1, 10, |
| 488 | -1, 11, -1, 12, -1, -1, 44, -1, -1, 45, |
| 489 | -1, 47, -1, 32, -1, 47, -1, -1, 29, -1 |
| 490 | }; |
| 491 | |
| 492 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
| 493 | static const yytype_uint8 yyrline[] = |
| 494 | { |
| 495 | 0, 87, 87, 91, 103, 106, 114, 117, 134, 151, |
| 496 | 152, 153, 156, 168, 169, 170, 171, 172, 173, 174, |
| 497 | 177, 178, 181, 182, 185, 188, 189, 192 |
| 498 | }; |
| 499 | #endif |
| 500 | |
| 501 | #if YYDEBUG0 || YYERROR_VERBOSE0 || YYTOKEN_TABLE0 |
| 502 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 503 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 504 | static const char *const yytname[] = |
| 505 | { |
| 506 | "END_OF_FILE", "error", "$undefined", "ERROR", "BELL", "ACCESSX", |
| 507 | "MESSAGE", "NONE", "IGNORE", "ECHO", "PRINT_EV", "SHELL", "SOUND", |
| 508 | "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES", "OBRACE", "CBRACE", |
| 509 | "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT", "COMMA", "SEMI", |
| 510 | "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT", "IDENT", "KEYNAME", |
| 511 | "$accept", "CfgFile", "CfgEntryList", "CfgEntry", "VarDef", "EventDef", |
| 512 | "EventType", "ActionDef", "ActionType", "OptNameSpec", "NameSpec", |
| 513 | "Ident", "OptString", "String", 0 |
| 514 | }; |
| 515 | #endif |
| 516 | |
| 517 | # ifdef YYPRINT |
| 518 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
| 519 | token YYLEX-NUM. */ |
| 520 | static const yytype_uint16 yytoknum[] = |
| 521 | { |
| 522 | 0, 256, 257, 255, 1, 2, 3, 20, 21, 22, |
| 523 | 23, 24, 25, 40, 41, 42, 43, 44, 45, 46, |
| 524 | 47, 48, 49, 50, 51, 52, 53, 54, 55, 60, |
| 525 | 61, 62, 63, 64 |
| 526 | }; |
| 527 | # endif |
| 528 | |
| 529 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 530 | static const yytype_uint8 yyr1[] = |
| 531 | { |
| 532 | 0, 34, 35, 36, 36, 37, 37, 38, 39, 40, |
| 533 | 40, 40, 41, 42, 42, 42, 42, 42, 42, 42, |
| 534 | 43, 43, 44, 44, 45, 46, 46, 47 |
| 535 | }; |
| 536 | |
| 537 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
| 538 | static const yytype_uint8 yyr2[] = |
| 539 | { |
| 540 | 0, 2, 1, 2, 1, 2, 1, 3, 4, 1, |
| 541 | 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, |
| 542 | 1, 0, 1, 1, 1, 1, 0, 1 |
| 543 | }; |
| 544 | |
| 545 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
| 546 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
| 547 | means the default is an error. */ |
| 548 | static const yytype_uint8 yydefact[] = |
| 549 | { |
| 550 | 0, 9, 10, 11, 24, 0, 2, 4, 6, 19, |
| 551 | 0, 0, 1, 3, 13, 14, 15, 16, 17, 18, |
| 552 | 5, 26, 21, 0, 27, 12, 25, 0, 20, 22, |
| 553 | 23, 7, 8 |
| 554 | }; |
| 555 | |
| 556 | /* YYDEFGOTO[NTERM-NUM]. */ |
| 557 | static const yytype_int8 yydefgoto[] = |
| 558 | { |
| 559 | -1, 5, 6, 7, 8, 9, 10, 20, 21, 27, |
| 560 | 28, 11, 25, 30 |
| 561 | }; |
| 562 | |
| 563 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 564 | STATE-NUM. */ |
| 565 | #define YYPACT_NINF-20 -20 |
| 566 | static const yytype_int8 yypact[] = |
| 567 | { |
| 568 | -4, -20, -20, -20, -20, 3, -4, -20, -20, -3, |
| 569 | -6, 2, -20, -20, -20, -20, -20, -20, -20, -20, |
| 570 | -20, -13, -19, -19, -20, -20, -20, -2, -20, -20, |
| 571 | -20, -20, -20 |
| 572 | }; |
| 573 | |
| 574 | /* YYPGOTO[NTERM-NUM]. */ |
| 575 | static const yytype_int8 yypgoto[] = |
| 576 | { |
| 577 | -20, -20, -20, 11, -20, -20, -20, -20, -20, -20, |
| 578 | -5, -11, -20, -1 |
| 579 | }; |
| 580 | |
| 581 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
| 582 | positive, shift that token. If negative, reduce the rule which |
| 583 | number is the opposite. If zero, do what YYDEFACT says. |
| 584 | If YYTABLE_NINF, syntax error. */ |
| 585 | #define YYTABLE_NINF-1 -1 |
| 586 | static const yytype_uint8 yytable[] = |
| 587 | { |
| 588 | 1, 2, 3, 12, 14, 15, 16, 17, 18, 19, |
| 589 | 24, 29, 29, 4, 22, 23, 24, 13, 31, 32, |
| 590 | 26, 0, 0, 0, 0, 0, 0, 0, 4 |
| 591 | }; |
| 592 | |
| 593 | static const yytype_int8 yycheck[] = |
| 594 | { |
| 595 | 4, 5, 6, 0, 7, 8, 9, 10, 11, 12, |
| 596 | 29, 22, 23, 32, 20, 13, 29, 6, 23, 21, |
| 597 | 21, -1, -1, -1, -1, -1, -1, -1, 32 |
| 598 | }; |
| 599 | |
| 600 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 601 | symbol of state STATE-NUM. */ |
| 602 | static const yytype_uint8 yystos[] = |
| 603 | { |
| 604 | 0, 4, 5, 6, 32, 35, 36, 37, 38, 39, |
| 605 | 40, 45, 0, 37, 7, 8, 9, 10, 11, 12, |
| 606 | 41, 42, 20, 13, 29, 46, 47, 43, 44, 45, |
| 607 | 47, 44, 21 |
| 608 | }; |
| 609 | |
| 610 | #define yyerrok(yyerrstatus = 0) (yyerrstatus = 0) |
| 611 | #define yyclearin(yychar = (-2)) (yychar = YYEMPTY(-2)) |
| 612 | #define YYEMPTY(-2) (-2) |
| 613 | #define YYEOF0 0 |
| 614 | |
| 615 | #define YYACCEPTgoto yyacceptlab goto yyacceptlab |
| 616 | #define YYABORTgoto yyabortlab goto yyabortlab |
| 617 | #define YYERRORgoto yyerrorlab goto yyerrorlab |
| 618 | |
| 619 | |
| 620 | /* Like YYERROR except do call yyerror. This remains here temporarily |
| 621 | to ease the transition to the new meaning of YYERROR, for GCC. |
| 622 | Once GCC version 2 has supplanted version 1, this can go. */ |
| 623 | |
| 624 | #define YYFAILgoto yyerrlab goto yyerrlab |
| 625 | |
| 626 | #define YYRECOVERING()(!!yyerrstatus) (!!yyerrstatus) |
| 627 | |
| 628 | #define YYBACKUP(Token, Value)do if (yychar == (-2) && yylen == 1) { yychar = (Token ); yylval = (Value); yytoken = ((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); (yyvsp -= (1), yyssp -= (1)) ; goto yybackup; } else { yyerror ("syntax error: cannot back up" ); goto yyerrorlab; } while ((0)) \ |
| 629 | do \ |
| 630 | if (yychar == YYEMPTY(-2) && yylen == 1) \ |
| 631 | { \ |
| 632 | yychar = (Token); \ |
| 633 | yylval = (Value); \ |
| 634 | yytoken = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); \ |
| 635 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); \ |
| 636 | goto yybackup; \ |
| 637 | } \ |
| 638 | else \ |
| 639 | { \ |
| 640 | yyerror (YY_("syntax error: cannot back up")"syntax error: cannot back up"); \ |
| 641 | YYERRORgoto yyerrorlab; \ |
| 642 | } \ |
| 643 | while (YYID (0)(0)) |
| 644 | |
| 645 | |
| 646 | #define YYTERROR1 1 |
| 647 | #define YYERRCODE256 256 |
| 648 | |
| 649 | |
| 650 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
| 651 | If N is 0, then set CURRENT to the empty location which ends |
| 652 | the previous symbol: RHS[0] (always defined). */ |
| 653 | |
| 654 | #define YYRHSLOC(Rhs, K)((Rhs)[K]) ((Rhs)[K]) |
| 655 | #ifndef YYLLOC_DEFAULT |
| 656 | # define YYLLOC_DEFAULT(Current, Rhs, N)do if ((N)) { (Current).first_line = ((Rhs)[1]).first_line; ( Current).first_column = ((Rhs)[1]).first_column; (Current).last_line = ((Rhs)[N]).last_line; (Current).last_column = ((Rhs)[N]).last_column ; } else { (Current).first_line = (Current).last_line = ((Rhs )[0]).last_line; (Current).first_column = (Current).last_column = ((Rhs)[0]).last_column; } while ((0)) \ |
| 657 | do \ |
| 658 | if (YYID (N)(N)) \ |
| 659 | { \ |
| 660 | (Current).first_line = YYRHSLOC (Rhs, 1)((Rhs)[1]).first_line; \ |
| 661 | (Current).first_column = YYRHSLOC (Rhs, 1)((Rhs)[1]).first_column; \ |
| 662 | (Current).last_line = YYRHSLOC (Rhs, N)((Rhs)[N]).last_line; \ |
| 663 | (Current).last_column = YYRHSLOC (Rhs, N)((Rhs)[N]).last_column; \ |
| 664 | } \ |
| 665 | else \ |
| 666 | { \ |
| 667 | (Current).first_line = (Current).last_line = \ |
| 668 | YYRHSLOC (Rhs, 0)((Rhs)[0]).last_line; \ |
| 669 | (Current).first_column = (Current).last_column = \ |
| 670 | YYRHSLOC (Rhs, 0)((Rhs)[0]).last_column; \ |
| 671 | } \ |
| 672 | while (YYID (0)(0)) |
| 673 | #endif |
| 674 | |
| 675 | |
| 676 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
| 677 | This macro was not mandated originally: define only if we know |
| 678 | we won't break user code: when these are the locations we know. */ |
| 679 | |
| 680 | #ifndef YY_LOCATION_PRINT |
| 681 | # if YYLTYPE_IS_TRIVIAL |
| 682 | # define YY_LOCATION_PRINT(File, Loc)((void) 0) \ |
| 683 | fprintf (File, "%d.%d-%d.%d", \ |
| 684 | (Loc).first_line, (Loc).first_column, \ |
| 685 | (Loc).last_line, (Loc).last_column) |
| 686 | # else |
| 687 | # define YY_LOCATION_PRINT(File, Loc)((void) 0) ((void) 0) |
| 688 | # endif |
| 689 | #endif |
| 690 | |
| 691 | |
| 692 | /* YYLEX -- calling `yylex' with the right arguments. */ |
| 693 | |
| 694 | #ifdef YYLEX_PARAM |
| 695 | # define YYLEXyylex () yylex (YYLEX_PARAM) |
| 696 | #else |
| 697 | # define YYLEXyylex () yylex () |
| 698 | #endif |
| 699 | |
| 700 | /* Enable debugging if requested. */ |
| 701 | #if YYDEBUG0 |
| 702 | |
| 703 | # ifndef YYFPRINTF |
| 704 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 705 | # define YYFPRINTF fprintf |
| 706 | # endif |
| 707 | |
| 708 | # define YYDPRINTF(Args) \ |
| 709 | do { \ |
| 710 | if (yydebug) \ |
| 711 | YYFPRINTF Args; \ |
| 712 | } while (YYID (0)(0)) |
| 713 | |
| 714 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 715 | do { \ |
| 716 | if (yydebug) \ |
| 717 | { \ |
| 718 | YYFPRINTF (stderrstderr, "%s ", Title); \ |
| 719 | yy_symbol_print (stderrstderr, \ |
| 720 | Type, Value); \ |
| 721 | YYFPRINTF (stderrstderr, "\n"); \ |
| 722 | } \ |
| 723 | } while (YYID (0)(0)) |
| 724 | |
| 725 | |
| 726 | /*--------------------------------. |
| 727 | | Print this symbol on YYOUTPUT. | |
| 728 | `--------------------------------*/ |
| 729 | |
| 730 | /*ARGSUSED*/ |
| 731 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 732 | || defined __cplusplus || defined _MSC_VER) |
| 733 | static void |
| 734 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 735 | #else |
| 736 | static void |
| 737 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
| 738 | FILE *yyoutput; |
| 739 | int yytype; |
| 740 | YYSTYPE const * const yyvaluep; |
| 741 | #endif |
| 742 | { |
| 743 | if (!yyvaluep) |
| 744 | return; |
| 745 | # ifdef YYPRINT |
| 746 | if (yytype < YYNTOKENS34) |
| 747 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 748 | # else |
| 749 | YYUSE (yyoutput)((void) (yyoutput)); |
| 750 | # endif |
| 751 | switch (yytype) |
| 752 | { |
| 753 | default: |
| 754 | break; |
| 755 | } |
| 756 | } |
| 757 | |
| 758 | |
| 759 | /*--------------------------------. |
| 760 | | Print this symbol on YYOUTPUT. | |
| 761 | `--------------------------------*/ |
| 762 | |
| 763 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 764 | || defined __cplusplus || defined _MSC_VER) |
| 765 | static void |
| 766 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 767 | #else |
| 768 | static void |
| 769 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
| 770 | FILE *yyoutput; |
| 771 | int yytype; |
| 772 | YYSTYPE const * const yyvaluep; |
| 773 | #endif |
| 774 | { |
| 775 | if (yytype < YYNTOKENS34) |
| 776 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
| 777 | else |
| 778 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
| 779 | |
| 780 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 781 | YYFPRINTF (yyoutput, ")"); |
| 782 | } |
| 783 | |
| 784 | /*------------------------------------------------------------------. |
| 785 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 786 | | TOP (included). | |
| 787 | `------------------------------------------------------------------*/ |
| 788 | |
| 789 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 790 | || defined __cplusplus || defined _MSC_VER) |
| 791 | static void |
| 792 | yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
| 793 | #else |
| 794 | static void |
| 795 | yy_stack_print (yybottom, yytop) |
| 796 | yytype_int16 *yybottom; |
| 797 | yytype_int16 *yytop; |
| 798 | #endif |
| 799 | { |
| 800 | YYFPRINTF (stderrstderr, "Stack now"); |
| 801 | for (; yybottom <= yytop; yybottom++) |
| 802 | { |
| 803 | int yybot = *yybottom; |
| 804 | YYFPRINTF (stderrstderr, " %d", yybot); |
| 805 | } |
| 806 | YYFPRINTF (stderrstderr, "\n"); |
| 807 | } |
| 808 | |
| 809 | # define YY_STACK_PRINT(Bottom, Top) \ |
| 810 | do { \ |
| 811 | if (yydebug) \ |
| 812 | yy_stack_print ((Bottom), (Top)); \ |
| 813 | } while (YYID (0)(0)) |
| 814 | |
| 815 | |
| 816 | /*------------------------------------------------. |
| 817 | | Report that the YYRULE is going to be reduced. | |
| 818 | `------------------------------------------------*/ |
| 819 | |
| 820 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 821 | || defined __cplusplus || defined _MSC_VER) |
| 822 | static void |
| 823 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
| 824 | #else |
| 825 | static void |
| 826 | yy_reduce_print (yyvsp, yyrule) |
| 827 | YYSTYPE *yyvsp; |
| 828 | int yyrule; |
| 829 | #endif |
| 830 | { |
| 831 | int yynrhs = yyr2[yyrule]; |
| 832 | int yyi; |
| 833 | unsigned long int yylno = yyrline[yyrule]; |
| 834 | YYFPRINTF (stderrstderr, "Reducing stack by rule %d (line %lu):\n", |
| 835 | yyrule - 1, yylno); |
| 836 | /* The symbols being reduced. */ |
| 837 | for (yyi = 0; yyi < yynrhs; yyi++) |
| 838 | { |
| 839 | YYFPRINTF (stderrstderr, " $%d = ", yyi + 1); |
| 840 | yy_symbol_print (stderrstderr, yyrhs[yyprhs[yyrule] + yyi], |
| 841 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
| 842 | ); |
| 843 | YYFPRINTF (stderrstderr, "\n"); |
| 844 | } |
| 845 | } |
| 846 | |
| 847 | # define YY_REDUCE_PRINT(Rule) \ |
| 848 | do { \ |
| 849 | if (yydebug) \ |
| 850 | yy_reduce_print (yyvsp, Rule); \ |
| 851 | } while (YYID (0)(0)) |
| 852 | |
| 853 | /* Nonzero means print parse trace. It is left uninitialized so that |
| 854 | multiple parsers can coexist. */ |
| 855 | int yydebug; |
| 856 | #else /* !YYDEBUG */ |
| 857 | # define YYDPRINTF(Args) |
| 858 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 859 | # define YY_STACK_PRINT(Bottom, Top) |
| 860 | # define YY_REDUCE_PRINT(Rule) |
| 861 | #endif /* !YYDEBUG */ |
| 862 | |
| 863 | |
| 864 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 865 | #ifndef YYINITDEPTH200 |
| 866 | # define YYINITDEPTH200 200 |
| 867 | #endif |
| 868 | |
| 869 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 870 | if the built-in stack extension method is used). |
| 871 | |
| 872 | Do not make this value too large; the results are undefined if |
| 873 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 874 | evaluated with infinite-precision integer arithmetic. */ |
| 875 | |
| 876 | #ifndef YYMAXDEPTH10000 |
| 877 | # define YYMAXDEPTH10000 10000 |
| 878 | #endif |
| 879 | |
| 880 | |
| 881 | |
| 882 | #if YYERROR_VERBOSE0 |
| 883 | |
| 884 | # ifndef yystrlen |
| 885 | # if defined __GLIBC__2 && defined _STRING_H1 |
| 886 | # define yystrlen strlen |
| 887 | # else |
| 888 | /* Return the length of YYSTR. */ |
| 889 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 890 | || defined __cplusplus || defined _MSC_VER) |
| 891 | static YYSIZE_Tunsigned int |
| 892 | yystrlen (const char *yystr) |
| 893 | #else |
| 894 | static YYSIZE_Tunsigned int |
| 895 | yystrlen (yystr) |
| 896 | const char *yystr; |
| 897 | #endif |
| 898 | { |
| 899 | YYSIZE_Tunsigned int yylen; |
| 900 | for (yylen = 0; yystr[yylen]; yylen++) |
| 901 | continue; |
| 902 | return yylen; |
| 903 | } |
| 904 | # endif |
| 905 | # endif |
| 906 | |
| 907 | # ifndef yystpcpy |
| 908 | # if defined __GLIBC__2 && defined _STRING_H1 && defined _GNU_SOURCE1 |
| 909 | # define yystpcpy stpcpy |
| 910 | # else |
| 911 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 912 | YYDEST. */ |
| 913 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 914 | || defined __cplusplus || defined _MSC_VER) |
| 915 | static char * |
| 916 | yystpcpy (char *yydest, const char *yysrc) |
| 917 | #else |
| 918 | static char * |
| 919 | yystpcpy (yydest, yysrc) |
| 920 | char *yydest; |
| 921 | const char *yysrc; |
| 922 | #endif |
| 923 | { |
| 924 | char *yyd = yydest; |
| 925 | const char *yys = yysrc; |
| 926 | |
| 927 | while ((*yyd++ = *yys++) != '\0') |
| 928 | continue; |
| 929 | |
| 930 | return yyd - 1; |
| 931 | } |
| 932 | # endif |
| 933 | # endif |
| 934 | |
| 935 | # ifndef yytnamerr |
| 936 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 937 | quotes and backslashes, so that it's suitable for yyerror. The |
| 938 | heuristic is that double-quoting is unnecessary unless the string |
| 939 | contains an apostrophe, a comma, or backslash (other than |
| 940 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 941 | null, do not copy; instead, return the length of what the result |
| 942 | would have been. */ |
| 943 | static YYSIZE_Tunsigned int |
| 944 | yytnamerr (char *yyres, const char *yystr) |
| 945 | { |
| 946 | if (*yystr == '"') |
| 947 | { |
| 948 | YYSIZE_Tunsigned int yyn = 0; |
| 949 | char const *yyp = yystr; |
| 950 | |
| 951 | for (;;) |
| 952 | switch (*++yyp) |
| 953 | { |
| 954 | case '\'': |
| 955 | case ',': |
| 956 | goto do_not_strip_quotes; |
| 957 | |
| 958 | case '\\': |
| 959 | if (*++yyp != '\\') |
| 960 | goto do_not_strip_quotes; |
| 961 | /* Fall through. */ |
| 962 | default: |
| 963 | if (yyres) |
| 964 | yyres[yyn] = *yyp; |
| 965 | yyn++; |
| 966 | break; |
| 967 | |
| 968 | case '"': |
| 969 | if (yyres) |
| 970 | yyres[yyn] = '\0'; |
| 971 | return yyn; |
| 972 | } |
| 973 | do_not_strip_quotes: ; |
| 974 | } |
| 975 | |
| 976 | if (! yyres) |
| 977 | return yystrlen (yystr); |
| 978 | |
| 979 | return yystpcpy (yyres, yystr) - yyres; |
| 980 | } |
| 981 | # endif |
| 982 | |
| 983 | /* Copy into YYRESULT an error message about the unexpected token |
| 984 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
| 985 | including the terminating null byte. If YYRESULT is null, do not |
| 986 | copy anything; just return the number of bytes that would be |
| 987 | copied. As a special case, return 0 if an ordinary "syntax error" |
| 988 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
| 989 | size calculation. */ |
| 990 | static YYSIZE_Tunsigned int |
| 991 | yysyntax_error (char *yyresult, int yystate, int yychar) |
| 992 | { |
| 993 | int yyn = yypact[yystate]; |
| 994 | |
| 995 | if (! (YYPACT_NINF-20 < yyn && yyn <= YYLAST28)) |
| 996 | return 0; |
| 997 | else |
| 998 | { |
| 999 | int yytype = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); |
| 1000 | YYSIZE_Tunsigned int yysize0 = yytnamerr (0, yytname[yytype]); |
| 1001 | YYSIZE_Tunsigned int yysize = yysize0; |
| 1002 | YYSIZE_Tunsigned int yysize1; |
| 1003 | int yysize_overflow = 0; |
| 1004 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 1005 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 1006 | int yyx; |
| 1007 | |
| 1008 | # if 0 |
| 1009 | /* This is so xgettext sees the translatable formats that are |
| 1010 | constructed on the fly. */ |
| 1011 | YY_("syntax error, unexpected %s")"syntax error, unexpected %s"; |
| 1012 | YY_("syntax error, unexpected %s, expecting %s")"syntax error, unexpected %s, expecting %s"; |
| 1013 | YY_("syntax error, unexpected %s, expecting %s or %s")"syntax error, unexpected %s, expecting %s or %s"; |
| 1014 | YY_("syntax error, unexpected %s, expecting %s or %s or %s")"syntax error, unexpected %s, expecting %s or %s or %s"; |
| 1015 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")"syntax error, unexpected %s, expecting %s or %s or %s or %s"; |
| 1016 | # endif |
| 1017 | char *yyfmt; |
| 1018 | char const *yyf; |
| 1019 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
| 1020 | static char const yyexpecting[] = ", expecting %s"; |
| 1021 | static char const yyor[] = " or %s"; |
| 1022 | char yyformat[sizeof yyunexpected |
| 1023 | + sizeof yyexpecting - 1 |
| 1024 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
| 1025 | * (sizeof yyor - 1))]; |
| 1026 | char const *yyprefix = yyexpecting; |
| 1027 | |
| 1028 | /* Start YYX at -YYN if negative to avoid negative indexes in |
| 1029 | YYCHECK. */ |
| 1030 | int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1031 | |
| 1032 | /* Stay within bounds of both yycheck and yytname. */ |
| 1033 | int yychecklim = YYLAST28 - yyn + 1; |
| 1034 | int yyxend = yychecklim < YYNTOKENS34 ? yychecklim : YYNTOKENS34; |
| 1035 | int yycount = 1; |
| 1036 | |
| 1037 | yyarg[0] = yytname[yytype]; |
| 1038 | yyfmt = yystpcpy (yyformat, yyunexpected); |
| 1039 | |
| 1040 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1041 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR1) |
| 1042 | { |
| 1043 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1044 | { |
| 1045 | yycount = 1; |
| 1046 | yysize = yysize0; |
| 1047 | yyformat[sizeof yyunexpected - 1] = '\0'; |
| 1048 | break; |
| 1049 | } |
| 1050 | yyarg[yycount++] = yytname[yyx]; |
| 1051 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
| 1052 | yysize_overflow |= (yysize1 < yysize); |
| 1053 | yysize = yysize1; |
| 1054 | yyfmt = yystpcpy (yyfmt, yyprefix); |
| 1055 | yyprefix = yyor; |
| 1056 | } |
| 1057 | |
| 1058 | yyf = YY_(yyformat)yyformat; |
| 1059 | yysize1 = yysize + yystrlen (yyf); |
| 1060 | yysize_overflow |= (yysize1 < yysize); |
| 1061 | yysize = yysize1; |
| 1062 | |
| 1063 | if (yysize_overflow) |
| 1064 | return YYSIZE_MAXIMUM((unsigned int) -1); |
| 1065 | |
| 1066 | if (yyresult) |
| 1067 | { |
| 1068 | /* Avoid sprintf, as that infringes on the user's name space. |
| 1069 | Don't have undefined behavior even if the translation |
| 1070 | produced a string with the wrong number of "%s"s. */ |
| 1071 | char *yyp = yyresult; |
| 1072 | int yyi = 0; |
| 1073 | while ((*yyp = *yyf) != '\0') |
| 1074 | { |
| 1075 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
| 1076 | { |
| 1077 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1078 | yyf += 2; |
| 1079 | } |
| 1080 | else |
| 1081 | { |
| 1082 | yyp++; |
| 1083 | yyf++; |
| 1084 | } |
| 1085 | } |
| 1086 | } |
| 1087 | return yysize; |
| 1088 | } |
| 1089 | } |
| 1090 | #endif /* YYERROR_VERBOSE */ |
| 1091 | |
| 1092 | |
| 1093 | /*-----------------------------------------------. |
| 1094 | | Release the memory associated to this symbol. | |
| 1095 | `-----------------------------------------------*/ |
| 1096 | |
| 1097 | /*ARGSUSED*/ |
| 1098 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1099 | || defined __cplusplus || defined _MSC_VER) |
| 1100 | static void |
| 1101 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
| 1102 | #else |
| 1103 | static void |
| 1104 | yydestruct (yymsg, yytype, yyvaluep) |
| 1105 | const char *yymsg; |
| 1106 | int yytype; |
| 1107 | YYSTYPE *yyvaluep; |
| 1108 | #endif |
| 1109 | { |
| 1110 | YYUSE (yyvaluep)((void) (yyvaluep)); |
| 1111 | |
| 1112 | if (!yymsg) |
| 1113 | yymsg = "Deleting"; |
Value stored to 'yymsg' is never read | |
| 1114 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1115 | |
| 1116 | switch (yytype) |
| 1117 | { |
| 1118 | |
| 1119 | default: |
| 1120 | break; |
| 1121 | } |
| 1122 | } |
| 1123 | |
| 1124 | /* Prevent warnings from -Wmissing-prototypes. */ |
| 1125 | #ifdef YYPARSE_PARAM |
| 1126 | #if defined __STDC__1 || defined __cplusplus |
| 1127 | int yyparse (void *YYPARSE_PARAM); |
| 1128 | #else |
| 1129 | int yyparse (); |
| 1130 | #endif |
| 1131 | #else /* ! YYPARSE_PARAM */ |
| 1132 | #if defined __STDC__1 || defined __cplusplus |
| 1133 | int yyparse (void); |
| 1134 | #else |
| 1135 | int yyparse (); |
| 1136 | #endif |
| 1137 | #endif /* ! YYPARSE_PARAM */ |
| 1138 | |
| 1139 | |
| 1140 | /* The lookahead symbol. */ |
| 1141 | int yychar; |
| 1142 | |
| 1143 | /* The semantic value of the lookahead symbol. */ |
| 1144 | YYSTYPE yylval; |
| 1145 | |
| 1146 | /* Number of syntax errors so far. */ |
| 1147 | int yynerrs; |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | /*-------------------------. |
| 1152 | | yyparse or yypush_parse. | |
| 1153 | `-------------------------*/ |
| 1154 | |
| 1155 | #ifdef YYPARSE_PARAM |
| 1156 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1157 | || defined __cplusplus || defined _MSC_VER) |
| 1158 | int |
| 1159 | yyparse (void *YYPARSE_PARAM) |
| 1160 | #else |
| 1161 | int |
| 1162 | yyparse (YYPARSE_PARAM) |
| 1163 | void *YYPARSE_PARAM; |
| 1164 | #endif |
| 1165 | #else /* ! YYPARSE_PARAM */ |
| 1166 | #if (defined __STDC__1 || defined __C99__FUNC__ \ |
| 1167 | || defined __cplusplus || defined _MSC_VER) |
| 1168 | int |
| 1169 | yyparse (void) |
| 1170 | #else |
| 1171 | int |
| 1172 | yyparse () |
| 1173 | |
| 1174 | #endif |
| 1175 | #endif |
| 1176 | { |
| 1177 | |
| 1178 | |
| 1179 | int yystate; |
| 1180 | /* Number of tokens to shift before error messages enabled. */ |
| 1181 | int yyerrstatus; |
| 1182 | |
| 1183 | /* The stacks and their tools: |
| 1184 | `yyss': related to states. |
| 1185 | `yyvs': related to semantic values. |
| 1186 | |
| 1187 | Refer to the stacks thru separate pointers, to allow yyoverflow |
| 1188 | to reallocate them elsewhere. */ |
| 1189 | |
| 1190 | /* The state stack. */ |
| 1191 | yytype_int16 yyssa[YYINITDEPTH200]; |
| 1192 | yytype_int16 *yyss; |
| 1193 | yytype_int16 *yyssp; |
| 1194 | |
| 1195 | /* The semantic value stack. */ |
| 1196 | YYSTYPE yyvsa[YYINITDEPTH200]; |
| 1197 | YYSTYPE *yyvs; |
| 1198 | YYSTYPE *yyvsp; |
| 1199 | |
| 1200 | YYSIZE_Tunsigned int yystacksize; |
| 1201 | |
| 1202 | int yyn; |
| 1203 | int yyresult; |
| 1204 | /* Lookahead token as an internal (translated) token number. */ |
| 1205 | int yytoken; |
| 1206 | /* The variables used to return semantic value and location from the |
| 1207 | action routines. */ |
| 1208 | YYSTYPE yyval; |
| 1209 | |
| 1210 | #if YYERROR_VERBOSE0 |
| 1211 | /* Buffer for error messages, and its allocated size. */ |
| 1212 | char yymsgbuf[128]; |
| 1213 | char *yymsg = yymsgbuf; |
| 1214 | YYSIZE_Tunsigned int yymsg_alloc = sizeof yymsgbuf; |
| 1215 | #endif |
| 1216 | |
| 1217 | #define YYPOPSTACK(N)(yyvsp -= (N), yyssp -= (N)) (yyvsp -= (N), yyssp -= (N)) |
| 1218 | |
| 1219 | /* The number of symbols on the RHS of the reduced rule. |
| 1220 | Keep to zero when no symbol should be popped. */ |
| 1221 | int yylen = 0; |
| 1222 | |
| 1223 | yytoken = 0; |
| 1224 | yyss = yyssa; |
| 1225 | yyvs = yyvsa; |
| 1226 | yystacksize = YYINITDEPTH200; |
| 1227 | |
| 1228 | YYDPRINTF ((stderr, "Starting parse\n")); |
| 1229 | |
| 1230 | yystate = 0; |
| 1231 | yyerrstatus = 0; |
| 1232 | yynerrs = 0; |
| 1233 | yychar = YYEMPTY(-2); /* Cause a token to be read. */ |
| 1234 | |
| 1235 | /* Initialize stack pointers. |
| 1236 | Waste one element of value and location stack |
| 1237 | so that they stay on the same level as the state stack. |
| 1238 | The wasted elements are never initialized. */ |
| 1239 | yyssp = yyss; |
| 1240 | yyvsp = yyvs; |
| 1241 | |
| 1242 | goto yysetstate; |
| 1243 | |
| 1244 | /*------------------------------------------------------------. |
| 1245 | | yynewstate -- Push a new state, which is found in yystate. | |
| 1246 | `------------------------------------------------------------*/ |
| 1247 | yynewstate: |
| 1248 | /* In all cases, when you get here, the value and location stacks |
| 1249 | have just been pushed. So pushing a state here evens the stacks. */ |
| 1250 | yyssp++; |
| 1251 | |
| 1252 | yysetstate: |
| 1253 | *yyssp = yystate; |
| 1254 | |
| 1255 | if (yyss + yystacksize - 1 <= yyssp) |
| 1256 | { |
| 1257 | /* Get the current used size of the three stacks, in elements. */ |
| 1258 | YYSIZE_Tunsigned int yysize = yyssp - yyss + 1; |
| 1259 | |
| 1260 | #ifdef yyoverflow |
| 1261 | { |
| 1262 | /* Give user a chance to reallocate the stack. Use copies of |
| 1263 | these so that the &'s don't force the real ones into |
| 1264 | memory. */ |
| 1265 | YYSTYPE *yyvs1 = yyvs; |
| 1266 | yytype_int16 *yyss1 = yyss; |
| 1267 | |
| 1268 | /* Each stack pointer address is followed by the size of the |
| 1269 | data in use in that stack, in bytes. This used to be a |
| 1270 | conditional around just the two extra args, but that might |
| 1271 | be undefined if yyoverflow is a macro. */ |
| 1272 | yyoverflow (YY_("memory exhausted")"memory exhausted", |
| 1273 | &yyss1, yysize * sizeof (*yyssp), |
| 1274 | &yyvs1, yysize * sizeof (*yyvsp), |
| 1275 | &yystacksize); |
| 1276 | |
| 1277 | yyss = yyss1; |
| 1278 | yyvs = yyvs1; |
| 1279 | } |
| 1280 | #else /* no yyoverflow */ |
| 1281 | # ifndef YYSTACK_RELOCATE |
| 1282 | goto yyexhaustedlab; |
| 1283 | # else |
| 1284 | /* Extend the stack our own way. */ |
| 1285 | if (YYMAXDEPTH10000 <= yystacksize) |
| 1286 | goto yyexhaustedlab; |
| 1287 | yystacksize *= 2; |
| 1288 | if (YYMAXDEPTH10000 < yystacksize) |
| 1289 | yystacksize = YYMAXDEPTH10000; |
| 1290 | |
| 1291 | { |
| 1292 | yytype_int16 *yyss1 = yyss; |
| 1293 | union yyalloc *yyptr = |
| 1294 | (union yyalloc *) YYSTACK_ALLOCmalloc (YYSTACK_BYTES (yystacksize)((yystacksize) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) + (sizeof (union yyalloc) - 1))); |
| 1295 | if (! yyptr) |
| 1296 | goto yyexhaustedlab; |
| 1297 | YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1298 | YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
| 1299 | # undef YYSTACK_RELOCATE |
| 1300 | if (yyss1 != yyssa) |
| 1301 | YYSTACK_FREEfree (yyss1); |
| 1302 | } |
| 1303 | # endif |
| 1304 | #endif /* no yyoverflow */ |
| 1305 | |
| 1306 | yyssp = yyss + yysize - 1; |
| 1307 | yyvsp = yyvs + yysize - 1; |
| 1308 | |
| 1309 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 1310 | (unsigned long int) yystacksize)); |
| 1311 | |
| 1312 | if (yyss + yystacksize - 1 <= yyssp) |
| 1313 | YYABORTgoto yyabortlab; |
| 1314 | } |
| 1315 | |
| 1316 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 1317 | |
| 1318 | if (yystate == YYFINAL12) |
| 1319 | YYACCEPTgoto yyacceptlab; |
| 1320 | |
| 1321 | goto yybackup; |
| 1322 | |
| 1323 | /*-----------. |
| 1324 | | yybackup. | |
| 1325 | `-----------*/ |
| 1326 | yybackup: |
| 1327 | |
| 1328 | /* Do appropriate processing given the current state. Read a |
| 1329 | lookahead token if we need one and don't already have one. */ |
| 1330 | |
| 1331 | /* First try to decide what to do without reference to lookahead token. */ |
| 1332 | yyn = yypact[yystate]; |
| 1333 | if (yyn == YYPACT_NINF-20) |
| 1334 | goto yydefault; |
| 1335 | |
| 1336 | /* Not known => get a lookahead token if don't already have one. */ |
| 1337 | |
| 1338 | /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 1339 | if (yychar == YYEMPTY(-2)) |
| 1340 | { |
| 1341 | YYDPRINTF ((stderr, "Reading a token: ")); |
| 1342 | yychar = YYLEXyylex (); |
| 1343 | } |
| 1344 | |
| 1345 | if (yychar <= YYEOF0) |
| 1346 | { |
| 1347 | yychar = yytoken = YYEOF0; |
| 1348 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 1349 | } |
| 1350 | else |
| 1351 | { |
| 1352 | yytoken = YYTRANSLATE (yychar)((unsigned int) (yychar) <= 257 ? yytranslate[yychar] : 2); |
| 1353 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 1354 | } |
| 1355 | |
| 1356 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
| 1357 | detect an error, take that action. */ |
| 1358 | yyn += yytoken; |
| 1359 | if (yyn < 0 || YYLAST28 < yyn || yycheck[yyn] != yytoken) |
| 1360 | goto yydefault; |
| 1361 | yyn = yytable[yyn]; |
| 1362 | if (yyn <= 0) |
| 1363 | { |
| 1364 | if (yyn == 0 || yyn == YYTABLE_NINF-1) |
| 1365 | goto yyerrlab; |
| 1366 | yyn = -yyn; |
| 1367 | goto yyreduce; |
| 1368 | } |
| 1369 | |
| 1370 | /* Count tokens shifted since error; after three, turn off error |
| 1371 | status. */ |
| 1372 | if (yyerrstatus) |
| 1373 | yyerrstatus--; |
| 1374 | |
| 1375 | /* Shift the lookahead token. */ |
| 1376 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 1377 | |
| 1378 | /* Discard the shifted token. */ |
| 1379 | yychar = YYEMPTY(-2); |
| 1380 | |
| 1381 | yystate = yyn; |
| 1382 | *++yyvsp = yylval; |
| 1383 | |
| 1384 | goto yynewstate; |
| 1385 | |
| 1386 | |
| 1387 | /*-----------------------------------------------------------. |
| 1388 | | yydefault -- do the default action for the current state. | |
| 1389 | `-----------------------------------------------------------*/ |
| 1390 | yydefault: |
| 1391 | yyn = yydefact[yystate]; |
| 1392 | if (yyn == 0) |
| 1393 | goto yyerrlab; |
| 1394 | goto yyreduce; |
| 1395 | |
| 1396 | |
| 1397 | /*-----------------------------. |
| 1398 | | yyreduce -- Do a reduction. | |
| 1399 | `-----------------------------*/ |
| 1400 | yyreduce: |
| 1401 | /* yyn is the number of a rule to reduce with. */ |
| 1402 | yylen = yyr2[yyn]; |
| 1403 | |
| 1404 | /* If YYLEN is nonzero, implement the default value of the action: |
| 1405 | `$$ = $1'. |
| 1406 | |
| 1407 | Otherwise, the following line sets YYVAL to garbage. |
| 1408 | This behavior is undocumented and Bison |
| 1409 | users should not rely upon it. Assigning to YYVAL |
| 1410 | unconditionally makes the parser a bit smaller, and it avoids a |
| 1411 | GCC warning that YYVAL may be used uninitialized. */ |
| 1412 | yyval = yyvsp[1-yylen]; |
| 1413 | |
| 1414 | |
| 1415 | YY_REDUCE_PRINT (yyn); |
| 1416 | switch (yyn) |
| 1417 | { |
| 1418 | case 2: |
| 1419 | |
| 1420 | /* Line 1455 of yacc.c */ |
| 1421 | #line 88 "cfgparse.y" |
| 1422 | { InterpretConfigs((yyvsp[(1) - (1)].entry)); } |
| 1423 | break; |
| 1424 | |
| 1425 | case 3: |
| 1426 | |
| 1427 | /* Line 1455 of yacc.c */ |
| 1428 | #line 92 "cfgparse.y" |
| 1429 | { |
| 1430 | CfgEntryPtr tmp; |
| 1431 | if ((yyvsp[(1) - (2)].entry)!=NULL((void*)0)) { |
| 1432 | for (tmp=(yyvsp[(1) - (2)].entry);tmp->next!=NULL((void*)0);tmp=tmp->next) { |
| 1433 | /* conditional does the work */ |
| 1434 | } |
| 1435 | tmp->next= (yyvsp[(2) - (2)].entry); |
| 1436 | (yyval.entry)= (yyvsp[(1) - (2)].entry); |
| 1437 | } |
| 1438 | else (yyval.entry)= (yyvsp[(2) - (2)].entry); |
| 1439 | } |
| 1440 | break; |
| 1441 | |
| 1442 | case 4: |
| 1443 | |
| 1444 | /* Line 1455 of yacc.c */ |
| 1445 | #line 103 "cfgparse.y" |
| 1446 | { (yyval.entry)= (yyvsp[(1) - (1)].entry); } |
| 1447 | break; |
| 1448 | |
| 1449 | case 5: |
| 1450 | |
| 1451 | /* Line 1455 of yacc.c */ |
| 1452 | #line 107 "cfgparse.y" |
| 1453 | { |
| 1454 | if (((yyvsp[(1) - (2)].entry))&&((yyvsp[(2) - (2)].act))) |
| 1455 | (yyvsp[(1) - (2)].entry)->action= *((yyvsp[(2) - (2)].act)); |
| 1456 | if ((yyvsp[(2) - (2)].act)) |
| 1457 | free((yyvsp[(2) - (2)].act)); |
| 1458 | (yyval.entry)= (yyvsp[(1) - (2)].entry); |
| 1459 | } |
| 1460 | break; |
| 1461 | |
| 1462 | case 6: |
| 1463 | |
| 1464 | /* Line 1455 of yacc.c */ |
| 1465 | #line 114 "cfgparse.y" |
| 1466 | { (yyval.entry)= (yyvsp[(1) - (1)].entry); } |
| 1467 | break; |
| 1468 | |
| 1469 | case 7: |
| 1470 | |
| 1471 | /* Line 1455 of yacc.c */ |
| 1472 | #line 118 "cfgparse.y" |
| 1473 | { |
| 1474 | CfgEntryPtr cfg; |
| 1475 | cfg= calloc(1,sizeof(CfgEntryRec)); |
| 1476 | if (cfg) { |
| 1477 | cfg->entry_type= VariableDef1; |
| 1478 | cfg->event_type= 0; |
| 1479 | cfg->name.str= (yyvsp[(1) - (3)].str); |
| 1480 | cfg->action.type= UnknownAction0; |
| 1481 | cfg->action.text= (yyvsp[(3) - (3)].str); |
| 1482 | cfg->action.priv= 0; |
| 1483 | cfg->next= NULL((void*)0); |
| 1484 | } |
| 1485 | (yyval.entry)= cfg; |
| 1486 | } |
| 1487 | break; |
| 1488 | |
| 1489 | case 8: |
| 1490 | |
| 1491 | /* Line 1455 of yacc.c */ |
| 1492 | #line 135 "cfgparse.y" |
| 1493 | { |
| 1494 | CfgEntryPtr cfg; |
| 1495 | cfg= calloc(1,sizeof(CfgEntryRec)); |
| 1496 | if (cfg) { |
| 1497 | cfg->entry_type= EventDef0; |
| 1498 | cfg->event_type= (yyvsp[(1) - (4)].ival); |
| 1499 | cfg->name.str= (yyvsp[(3) - (4)].str); |
| 1500 | cfg->action.type= UnknownAction0; |
| 1501 | cfg->action.text= NULL((void*)0); |
| 1502 | cfg->action.priv= 0; |
| 1503 | cfg->next= NULL((void*)0); |
| 1504 | } |
| 1505 | (yyval.entry)= cfg; |
| 1506 | } |
| 1507 | break; |
| 1508 | |
| 1509 | case 9: |
| 1510 | |
| 1511 | /* Line 1455 of yacc.c */ |
| 1512 | #line 151 "cfgparse.y" |
| 1513 | { (yyval.ival)= XkbBellNotify8; } |
| 1514 | break; |
| 1515 | |
| 1516 | case 10: |
| 1517 | |
| 1518 | /* Line 1455 of yacc.c */ |
| 1519 | #line 152 "cfgparse.y" |
| 1520 | { (yyval.ival)= XkbAccessXNotify10; } |
| 1521 | break; |
| 1522 | |
| 1523 | case 11: |
| 1524 | |
| 1525 | /* Line 1455 of yacc.c */ |
| 1526 | #line 153 "cfgparse.y" |
| 1527 | { (yyval.ival)= XkbActionMessage9; } |
| 1528 | break; |
| 1529 | |
| 1530 | case 12: |
| 1531 | |
| 1532 | /* Line 1455 of yacc.c */ |
| 1533 | #line 157 "cfgparse.y" |
| 1534 | { |
| 1535 | ActDefPtr act; |
| 1536 | act= calloc(1,sizeof(ActDefRec)); |
| 1537 | if (act) { |
| 1538 | act->type= (yyvsp[(1) - (2)].ival); |
| 1539 | act->text= (yyvsp[(2) - (2)].str); |
| 1540 | } |
| 1541 | (yyval.act)= act; |
| 1542 | } |
| 1543 | break; |
| 1544 | |
| 1545 | case 13: |
| 1546 | |
| 1547 | /* Line 1455 of yacc.c */ |
| 1548 | #line 168 "cfgparse.y" |
| 1549 | { (yyval.ival) = NoAction1; } |
| 1550 | break; |
| 1551 | |
| 1552 | case 14: |
| 1553 | |
| 1554 | /* Line 1455 of yacc.c */ |
| 1555 | #line 169 "cfgparse.y" |
| 1556 | { (yyval.ival) = NoAction1; } |
| 1557 | break; |
| 1558 | |
| 1559 | case 15: |
| 1560 | |
| 1561 | /* Line 1455 of yacc.c */ |
| 1562 | #line 170 "cfgparse.y" |
| 1563 | { (yyval.ival) = EchoAction2; } |
| 1564 | break; |
| 1565 | |
| 1566 | case 16: |
| 1567 | |
| 1568 | /* Line 1455 of yacc.c */ |
| 1569 | #line 171 "cfgparse.y" |
| 1570 | { (yyval.ival) = PrintEvAction3; } |
| 1571 | break; |
| 1572 | |
| 1573 | case 17: |
| 1574 | |
| 1575 | /* Line 1455 of yacc.c */ |
| 1576 | #line 172 "cfgparse.y" |
| 1577 | { (yyval.ival) = ShellAction4; } |
| 1578 | break; |
| 1579 | |
| 1580 | case 18: |
| 1581 | |
| 1582 | /* Line 1455 of yacc.c */ |
| 1583 | #line 173 "cfgparse.y" |
| 1584 | { (yyval.ival) = SoundAction5; } |
| 1585 | break; |
| 1586 | |
| 1587 | case 19: |
| 1588 | |
| 1589 | /* Line 1455 of yacc.c */ |
| 1590 | #line 174 "cfgparse.y" |
| 1591 | { (yyval.ival) = UnknownAction0; } |
| 1592 | break; |
| 1593 | |
| 1594 | case 20: |
| 1595 | |
| 1596 | /* Line 1455 of yacc.c */ |
| 1597 | #line 177 "cfgparse.y" |
| 1598 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
| 1599 | break; |
| 1600 | |
| 1601 | case 21: |
| 1602 | |
| 1603 | /* Line 1455 of yacc.c */ |
| 1604 | #line 178 "cfgparse.y" |
| 1605 | { (yyval.str)= NULL((void*)0); } |
| 1606 | break; |
| 1607 | |
| 1608 | case 22: |
| 1609 | |
| 1610 | /* Line 1455 of yacc.c */ |
| 1611 | #line 181 "cfgparse.y" |
| 1612 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
| 1613 | break; |
| 1614 | |
| 1615 | case 23: |
| 1616 | |
| 1617 | /* Line 1455 of yacc.c */ |
| 1618 | #line 182 "cfgparse.y" |
| 1619 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
| 1620 | break; |
| 1621 | |
| 1622 | case 24: |
| 1623 | |
| 1624 | /* Line 1455 of yacc.c */ |
| 1625 | #line 185 "cfgparse.y" |
| 1626 | { (yyval.str)= scanStr; scanStr= NULL((void*)0); } |
| 1627 | break; |
| 1628 | |
| 1629 | case 25: |
| 1630 | |
| 1631 | /* Line 1455 of yacc.c */ |
| 1632 | #line 188 "cfgparse.y" |
| 1633 | { (yyval.str)= (yyvsp[(1) - (1)].str); } |
| 1634 | break; |
| 1635 | |
| 1636 | case 26: |
| 1637 | |
| 1638 | /* Line 1455 of yacc.c */ |
| 1639 | #line 189 "cfgparse.y" |
| 1640 | { (yyval.str)= NULL((void*)0); } |
| 1641 | break; |
| 1642 | |
| 1643 | case 27: |
| 1644 | |
| 1645 | /* Line 1455 of yacc.c */ |
| 1646 | #line 192 "cfgparse.y" |
| 1647 | { (yyval.str)= scanStr; scanStr= NULL((void*)0); } |
| 1648 | break; |
| 1649 | |
| 1650 | |
| 1651 | |
| 1652 | /* Line 1455 of yacc.c */ |
| 1653 | #line 1654 "cfgparse.c" |
| 1654 | default: break; |
| 1655 | } |
| 1656 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 1657 | |
| 1658 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
| 1659 | yylen = 0; |
| 1660 | YY_STACK_PRINT (yyss, yyssp); |
| 1661 | |
| 1662 | *++yyvsp = yyval; |
| 1663 | |
| 1664 | /* Now `shift' the result of the reduction. Determine what state |
| 1665 | that goes to, based on the state we popped back to and the rule |
| 1666 | number reduced by. */ |
| 1667 | |
| 1668 | yyn = yyr1[yyn]; |
| 1669 | |
| 1670 | yystate = yypgoto[yyn - YYNTOKENS34] + *yyssp; |
| 1671 | if (0 <= yystate && yystate <= YYLAST28 && yycheck[yystate] == *yyssp) |
| 1672 | yystate = yytable[yystate]; |
| 1673 | else |
| 1674 | yystate = yydefgoto[yyn - YYNTOKENS34]; |
| 1675 | |
| 1676 | goto yynewstate; |
| 1677 | |
| 1678 | |
| 1679 | /*------------------------------------. |
| 1680 | | yyerrlab -- here on detecting error | |
| 1681 | `------------------------------------*/ |
| 1682 | yyerrlab: |
| 1683 | /* If not already recovering from an error, report this error. */ |
| 1684 | if (!yyerrstatus) |
| 1685 | { |
| 1686 | ++yynerrs; |
| 1687 | #if ! YYERROR_VERBOSE0 |
| 1688 | yyerror (YY_("syntax error")"syntax error"); |
| 1689 | #else |
| 1690 | { |
| 1691 | YYSIZE_Tunsigned int yysize = yysyntax_error (0, yystate, yychar); |
| 1692 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM((unsigned int) -1)) |
| 1693 | { |
| 1694 | YYSIZE_Tunsigned int yyalloc = 2 * yysize; |
| 1695 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM((unsigned int) -1))) |
| 1696 | yyalloc = YYSTACK_ALLOC_MAXIMUM((unsigned int) -1); |
| 1697 | if (yymsg != yymsgbuf) |
| 1698 | YYSTACK_FREEfree (yymsg); |
| 1699 | yymsg = (char *) YYSTACK_ALLOCmalloc (yyalloc); |
| 1700 | if (yymsg) |
| 1701 | yymsg_alloc = yyalloc; |
| 1702 | else |
| 1703 | { |
| 1704 | yymsg = yymsgbuf; |
| 1705 | yymsg_alloc = sizeof yymsgbuf; |
| 1706 | } |
| 1707 | } |
| 1708 | |
| 1709 | if (0 < yysize && yysize <= yymsg_alloc) |
| 1710 | { |
| 1711 | (void) yysyntax_error (yymsg, yystate, yychar); |
| 1712 | yyerror (yymsg); |
| 1713 | } |
| 1714 | else |
| 1715 | { |
| 1716 | yyerror (YY_("syntax error")"syntax error"); |
| 1717 | if (yysize != 0) |
| 1718 | goto yyexhaustedlab; |
| 1719 | } |
| 1720 | } |
| 1721 | #endif |
| 1722 | } |
| 1723 | |
| 1724 | |
| 1725 | |
| 1726 | if (yyerrstatus == 3) |
| 1727 | { |
| 1728 | /* If just tried and failed to reuse lookahead token after an |
| 1729 | error, discard it. */ |
| 1730 | |
| 1731 | if (yychar <= YYEOF0) |
| 1732 | { |
| 1733 | /* Return failure if at end of input. */ |
| 1734 | if (yychar == YYEOF0) |
| 1735 | YYABORTgoto yyabortlab; |
| 1736 | } |
| 1737 | else |
| 1738 | { |
| 1739 | yydestruct ("Error: discarding", |
| 1740 | yytoken, &yylval); |
| 1741 | yychar = YYEMPTY(-2); |
| 1742 | } |
| 1743 | } |
| 1744 | |
| 1745 | /* Else will try to reuse lookahead token after shifting the error |
| 1746 | token. */ |
| 1747 | goto yyerrlab1; |
| 1748 | |
| 1749 | |
| 1750 | /*---------------------------------------------------. |
| 1751 | | yyerrorlab -- error raised explicitly by YYERROR. | |
| 1752 | `---------------------------------------------------*/ |
| 1753 | yyerrorlab: |
| 1754 | |
| 1755 | /* Pacify compilers like GCC when the user code never invokes |
| 1756 | YYERROR and the label yyerrorlab therefore never appears in user |
| 1757 | code. */ |
| 1758 | if (/*CONSTCOND*/ 0) |
| 1759 | goto yyerrorlab; |
| 1760 | |
| 1761 | /* Do not reclaim the symbols of the rule which action triggered |
| 1762 | this YYERROR. */ |
| 1763 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
| 1764 | yylen = 0; |
| 1765 | YY_STACK_PRINT (yyss, yyssp); |
| 1766 | yystate = *yyssp; |
| 1767 | goto yyerrlab1; |
| 1768 | |
| 1769 | |
| 1770 | /*-------------------------------------------------------------. |
| 1771 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 1772 | `-------------------------------------------------------------*/ |
| 1773 | yyerrlab1: |
| 1774 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 1775 | |
| 1776 | for (;;) |
| 1777 | { |
| 1778 | yyn = yypact[yystate]; |
| 1779 | if (yyn != YYPACT_NINF-20) |
| 1780 | { |
| 1781 | yyn += YYTERROR1; |
| 1782 | if (0 <= yyn && yyn <= YYLAST28 && yycheck[yyn] == YYTERROR1) |
| 1783 | { |
| 1784 | yyn = yytable[yyn]; |
| 1785 | if (0 < yyn) |
| 1786 | break; |
| 1787 | } |
| 1788 | } |
| 1789 | |
| 1790 | /* Pop the current state because it cannot handle the error token. */ |
| 1791 | if (yyssp == yyss) |
| 1792 | YYABORTgoto yyabortlab; |
| 1793 | |
| 1794 | |
| 1795 | yydestruct ("Error: popping", |
| 1796 | yystos[yystate], yyvsp); |
| 1797 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); |
| 1798 | yystate = *yyssp; |
| 1799 | YY_STACK_PRINT (yyss, yyssp); |
| 1800 | } |
| 1801 | |
| 1802 | *++yyvsp = yylval; |
| 1803 | |
| 1804 | |
| 1805 | /* Shift the error token. */ |
| 1806 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 1807 | |
| 1808 | yystate = yyn; |
| 1809 | goto yynewstate; |
| 1810 | |
| 1811 | |
| 1812 | /*-------------------------------------. |
| 1813 | | yyacceptlab -- YYACCEPT comes here. | |
| 1814 | `-------------------------------------*/ |
| 1815 | yyacceptlab: |
| 1816 | yyresult = 0; |
| 1817 | goto yyreturn; |
| 1818 | |
| 1819 | /*-----------------------------------. |
| 1820 | | yyabortlab -- YYABORT comes here. | |
| 1821 | `-----------------------------------*/ |
| 1822 | yyabortlab: |
| 1823 | yyresult = 1; |
| 1824 | goto yyreturn; |
| 1825 | |
| 1826 | #if !defined(yyoverflow) || YYERROR_VERBOSE0 |
| 1827 | /*-------------------------------------------------. |
| 1828 | | yyexhaustedlab -- memory exhaustion comes here. | |
| 1829 | `-------------------------------------------------*/ |
| 1830 | yyexhaustedlab: |
| 1831 | yyerror (YY_("memory exhausted")"memory exhausted"); |
| 1832 | yyresult = 2; |
| 1833 | /* Fall through. */ |
| 1834 | #endif |
| 1835 | |
| 1836 | yyreturn: |
| 1837 | if (yychar != YYEMPTY(-2)) |
| 1838 | yydestruct ("Cleanup: discarding lookahead", |
| 1839 | yytoken, &yylval); |
| 1840 | /* Do not reclaim the symbols of the rule which action triggered |
| 1841 | this YYABORT or YYACCEPT. */ |
| 1842 | YYPOPSTACK (yylen)(yyvsp -= (yylen), yyssp -= (yylen)); |
| 1843 | YY_STACK_PRINT (yyss, yyssp); |
| 1844 | while (yyssp != yyss) |
| 1845 | { |
| 1846 | yydestruct ("Cleanup: popping", |
| 1847 | yystos[*yyssp], yyvsp); |
| 1848 | YYPOPSTACK (1)(yyvsp -= (1), yyssp -= (1)); |
| 1849 | } |
| 1850 | #ifndef yyoverflow |
| 1851 | if (yyss != yyssa) |
| 1852 | YYSTACK_FREEfree (yyss); |
| 1853 | #endif |
| 1854 | #if YYERROR_VERBOSE0 |
| 1855 | if (yymsg != yymsgbuf) |
| 1856 | YYSTACK_FREEfree (yymsg); |
| 1857 | #endif |
| 1858 | /* Make sure YYID is used. */ |
| 1859 | return YYID (yyresult)(yyresult); |
| 1860 | } |
| 1861 | |
| 1862 | |
| 1863 | |
| 1864 | /* Line 1675 of yacc.c */ |
| 1865 | #line 194 "cfgparse.y" |
| 1866 | |
| 1867 | int |
| 1868 | yyerror(char *s) |
| 1869 | { |
| 1870 | (void)fprintf(stderrstderr,"%s: line %d of %s\n",s,lineNum, |
| 1871 | (scanFile?scanFile:"(unknown)")); |
| 1872 | if (scanStr) |
| 1873 | (void)fprintf(stderrstderr,"last scanned symbol is: %s\n",scanStr); |
| 1874 | return 1; |
| 1875 | } |
| 1876 | |
| 1877 | |
| 1878 | int |
| 1879 | yywrap(void) |
| 1880 | { |
| 1881 | return 1; |
| 1882 | } |
| 1883 | |
| 1884 | int |
| 1885 | CFGParseFile(FILE *file) |
| 1886 | { |
| 1887 | if (file) { |
| 1888 | yyin= file; |
| 1889 | if (yyparse()==0) { |
| 1890 | return 1; |
| 1891 | } |
| 1892 | return 0; |
| 1893 | } |
| 1894 | return 1; |
| 1895 | } |
| 1896 |