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