xkbparse.c revision 690143cc
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 YYBISON 1 47 48/* Bison version. */ 49#define YYBISON_VERSION "2.4.1" 50 51/* Skeleton name. */ 52#define YYSKELETON_NAME "yacc.c" 53 54/* Pure parsers. */ 55#define YYPURE 0 56 57/* Push parsers. */ 58#define YYPUSH 0 59 60/* Pull parsers. */ 61#define YYPULL 1 62 63/* Using locations. */ 64#define YYLSP_NEEDED 0 65 66 67 68/* Copy the first part of user declarations. */ 69 70/* Line 189 of yacc.c */ 71#line 91 "xkbparse.y" 72 73#ifdef DEBUG 74#define YYDEBUG 1 75#endif 76#define DEBUG_VAR parseDebug 77#include "parseutils.h" 78#include <X11/keysym.h> 79#include <X11/extensions/XKBgeom.h> 80#include <stdlib.h> 81 82unsigned int parseDebug; 83 84 85 86/* Line 189 of yacc.c */ 87#line 88 "xkbparse.c" 88 89/* Enabling traces. */ 90#ifndef YYDEBUG 91# define YYDEBUG 0 92#endif 93 94/* Enabling verbose error messages. */ 95#ifdef YYERROR_VERBOSE 96# undef YYERROR_VERBOSE 97# define YYERROR_VERBOSE 1 98#else 99# define YYERROR_VERBOSE 0 100#endif 101 102/* Enabling the token table. */ 103#ifndef YYTOKEN_TABLE 104# define YYTOKEN_TABLE 0 105#endif 106 107 108/* Tokens. */ 109#ifndef YYTOKENTYPE 110# define YYTOKENTYPE 111 /* Put the tokens into the symbol table, so that GDB and other debuggers 112 know about them. */ 113 enum yytokentype { 114 END_OF_FILE = 0, 115 ERROR_TOK = 255, 116 XKB_KEYMAP = 1, 117 XKB_KEYCODES = 2, 118 XKB_TYPES = 3, 119 XKB_SYMBOLS = 4, 120 XKB_COMPATMAP = 5, 121 XKB_GEOMETRY = 6, 122 XKB_SEMANTICS = 7, 123 XKB_LAYOUT = 8, 124 INCLUDE = 10, 125 OVERRIDE = 11, 126 AUGMENT = 12, 127 REPLACE = 13, 128 ALTERNATE = 14, 129 VIRTUAL_MODS = 20, 130 TYPE = 21, 131 INTERPRET = 22, 132 ACTION_TOK = 23, 133 KEY = 24, 134 ALIAS = 25, 135 GROUP = 26, 136 MODIFIER_MAP = 27, 137 INDICATOR = 28, 138 SHAPE = 29, 139 KEYS = 30, 140 ROW = 31, 141 SECTION = 32, 142 OVERLAY = 33, 143 TEXT = 34, 144 OUTLINE = 35, 145 SOLID = 36, 146 LOGO = 37, 147 VIRTUAL = 38, 148 EQUALS = 40, 149 PLUS = 41, 150 MINUS = 42, 151 DIVIDE = 43, 152 TIMES = 44, 153 OBRACE = 45, 154 CBRACE = 46, 155 OPAREN = 47, 156 CPAREN = 48, 157 OBRACKET = 49, 158 CBRACKET = 50, 159 DOT = 51, 160 COMMA = 52, 161 SEMI = 53, 162 EXCLAM = 54, 163 INVERT = 55, 164 STRING = 60, 165 INTEGER = 61, 166 FLOAT = 62, 167 IDENT = 63, 168 KEYNAME = 64, 169 PARTIAL = 70, 170 DEFAULT = 71, 171 HIDDEN = 72, 172 ALPHANUMERIC_KEYS = 73, 173 MODIFIER_KEYS = 74, 174 KEYPAD_KEYS = 75, 175 FUNCTION_KEYS = 76, 176 ALTERNATE_GROUP = 77 177 }; 178#endif 179/* Tokens. */ 180#define END_OF_FILE 0 181#define ERROR_TOK 255 182#define XKB_KEYMAP 1 183#define XKB_KEYCODES 2 184#define XKB_TYPES 3 185#define XKB_SYMBOLS 4 186#define XKB_COMPATMAP 5 187#define XKB_GEOMETRY 6 188#define XKB_SEMANTICS 7 189#define XKB_LAYOUT 8 190#define INCLUDE 10 191#define OVERRIDE 11 192#define AUGMENT 12 193#define REPLACE 13 194#define ALTERNATE 14 195#define VIRTUAL_MODS 20 196#define TYPE 21 197#define INTERPRET 22 198#define ACTION_TOK 23 199#define KEY 24 200#define ALIAS 25 201#define GROUP 26 202#define MODIFIER_MAP 27 203#define INDICATOR 28 204#define SHAPE 29 205#define KEYS 30 206#define ROW 31 207#define SECTION 32 208#define OVERLAY 33 209#define TEXT 34 210#define OUTLINE 35 211#define SOLID 36 212#define LOGO 37 213#define VIRTUAL 38 214#define EQUALS 40 215#define PLUS 41 216#define MINUS 42 217#define DIVIDE 43 218#define TIMES 44 219#define OBRACE 45 220#define CBRACE 46 221#define OPAREN 47 222#define CPAREN 48 223#define OBRACKET 49 224#define CBRACKET 50 225#define DOT 51 226#define COMMA 52 227#define SEMI 53 228#define EXCLAM 54 229#define INVERT 55 230#define STRING 60 231#define INTEGER 61 232#define FLOAT 62 233#define IDENT 63 234#define KEYNAME 64 235#define PARTIAL 70 236#define DEFAULT 71 237#define HIDDEN 72 238#define ALPHANUMERIC_KEYS 73 239#define MODIFIER_KEYS 74 240#define KEYPAD_KEYS 75 241#define FUNCTION_KEYS 76 242#define ALTERNATE_GROUP 77 243 244 245 246 247#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 248typedef union YYSTYPE 249{ 250 251/* Line 214 of yacc.c */ 252#line 110 "xkbparse.y" 253 254 int ival; 255 unsigned uval; 256 char *str; 257 Atom sval; 258 ParseCommon *any; 259 ExprDef *expr; 260 VarDef *var; 261 VModDef *vmod; 262 InterpDef *interp; 263 KeyTypeDef *keyType; 264 SymbolsDef *syms; 265 ModMapDef *modMask; 266 GroupCompatDef *groupCompat; 267 IndicatorMapDef *ledMap; 268 IndicatorNameDef *ledName; 269 KeycodeDef *keyName; 270 KeyAliasDef *keyAlias; 271 ShapeDef *shape; 272 SectionDef *section; 273 RowDef *row; 274 KeyDef *key; 275 OverlayDef *overlay; 276 OverlayKeyDef *olKey; 277 OutlineDef *outline; 278 DoodadDef *doodad; 279 XkbFile *file; 280 281 282 283/* Line 214 of yacc.c */ 284#line 285 "xkbparse.c" 285} YYSTYPE; 286# define YYSTYPE_IS_TRIVIAL 1 287# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 288# define YYSTYPE_IS_DECLARED 1 289#endif 290 291 292/* Copy the second part of user declarations. */ 293 294 295/* Line 264 of yacc.c */ 296#line 297 "xkbparse.c" 297 298#ifdef short 299# undef short 300#endif 301 302#ifdef YYTYPE_UINT8 303typedef YYTYPE_UINT8 yytype_uint8; 304#else 305typedef unsigned char yytype_uint8; 306#endif 307 308#ifdef YYTYPE_INT8 309typedef YYTYPE_INT8 yytype_int8; 310#elif (defined __STDC__ || defined __C99__FUNC__ \ 311 || defined __cplusplus || defined _MSC_VER) 312typedef signed char yytype_int8; 313#else 314typedef short int yytype_int8; 315#endif 316 317#ifdef YYTYPE_UINT16 318typedef YYTYPE_UINT16 yytype_uint16; 319#else 320typedef unsigned short int yytype_uint16; 321#endif 322 323#ifdef YYTYPE_INT16 324typedef YYTYPE_INT16 yytype_int16; 325#else 326typedef short int yytype_int16; 327#endif 328 329#ifndef YYSIZE_T 330# ifdef __SIZE_TYPE__ 331# define YYSIZE_T __SIZE_TYPE__ 332# elif defined size_t 333# define YYSIZE_T size_t 334# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 335 || defined __cplusplus || defined _MSC_VER) 336# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 337# define YYSIZE_T size_t 338# else 339# define YYSIZE_T unsigned int 340# endif 341#endif 342 343#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 344 345#ifndef YY_ 346# if YYENABLE_NLS 347# if ENABLE_NLS 348# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 349# define YY_(msgid) dgettext ("bison-runtime", msgid) 350# endif 351# endif 352# ifndef YY_ 353# define YY_(msgid) msgid 354# endif 355#endif 356 357/* Suppress unused-variable warnings by "using" E. */ 358#if ! defined lint || defined __GNUC__ 359# define YYUSE(e) ((void) (e)) 360#else 361# define YYUSE(e) /* empty */ 362#endif 363 364/* Identity function, used to suppress warnings about constant conditions. */ 365#ifndef lint 366# define YYID(n) (n) 367#else 368#if (defined __STDC__ || defined __C99__FUNC__ \ 369 || defined __cplusplus || defined _MSC_VER) 370static int 371YYID (int yyi) 372#else 373static int 374YYID (yyi) 375 int yyi; 376#endif 377{ 378 return yyi; 379} 380#endif 381 382#if ! defined yyoverflow || YYERROR_VERBOSE 383 384/* The parser invokes alloca or malloc; define the necessary symbols. */ 385 386# ifdef YYSTACK_USE_ALLOCA 387# if YYSTACK_USE_ALLOCA 388# ifdef __GNUC__ 389# define YYSTACK_ALLOC __builtin_alloca 390# elif defined __BUILTIN_VA_ARG_INCR 391# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 392# elif defined _AIX 393# define YYSTACK_ALLOC __alloca 394# elif defined _MSC_VER 395# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 396# define alloca _alloca 397# else 398# define YYSTACK_ALLOC alloca 399# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 400 || defined __cplusplus || defined _MSC_VER) 401# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 402# ifndef _STDLIB_H 403# define _STDLIB_H 1 404# endif 405# endif 406# endif 407# endif 408# endif 409 410# ifdef YYSTACK_ALLOC 411 /* Pacify GCC's `empty if-body' warning. */ 412# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 413# ifndef YYSTACK_ALLOC_MAXIMUM 414 /* The OS might guarantee only one guard page at the bottom of the stack, 415 and a page size can be as small as 4096 bytes. So we cannot safely 416 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 417 to allow for a few compiler-allocated temporary stack slots. */ 418# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 419# endif 420# else 421# define YYSTACK_ALLOC YYMALLOC 422# define YYSTACK_FREE YYFREE 423# ifndef YYSTACK_ALLOC_MAXIMUM 424# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 425# endif 426# if (defined __cplusplus && ! defined _STDLIB_H \ 427 && ! ((defined YYMALLOC || defined malloc) \ 428 && (defined YYFREE || defined free))) 429# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 430# ifndef _STDLIB_H 431# define _STDLIB_H 1 432# endif 433# endif 434# ifndef YYMALLOC 435# define YYMALLOC malloc 436# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 437 || defined __cplusplus || defined _MSC_VER) 438void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 439# endif 440# endif 441# ifndef YYFREE 442# define YYFREE free 443# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 444 || defined __cplusplus || defined _MSC_VER) 445void free (void *); /* INFRINGES ON USER NAME SPACE */ 446# endif 447# endif 448# endif 449#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 450 451 452#if (! defined yyoverflow \ 453 && (! defined __cplusplus \ 454 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 455 456/* A type that is properly aligned for any stack member. */ 457union yyalloc 458{ 459 yytype_int16 yyss_alloc; 460 YYSTYPE yyvs_alloc; 461}; 462 463/* The size of the maximum gap between one aligned stack and the next. */ 464# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 465 466/* The size of an array large to enough to hold all stacks, each with 467 N elements. */ 468# define YYSTACK_BYTES(N) \ 469 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 470 + YYSTACK_GAP_MAXIMUM) 471 472/* Copy COUNT objects from FROM to TO. The source and destination do 473 not overlap. */ 474# ifndef YYCOPY 475# if defined __GNUC__ && 1 < __GNUC__ 476# define YYCOPY(To, From, Count) \ 477 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 478# else 479# define YYCOPY(To, From, Count) \ 480 do \ 481 { \ 482 YYSIZE_T yyi; \ 483 for (yyi = 0; yyi < (Count); yyi++) \ 484 (To)[yyi] = (From)[yyi]; \ 485 } \ 486 while (YYID (0)) 487# endif 488# endif 489 490/* Relocate STACK from its old location to the new one. The 491 local variables YYSIZE and YYSTACKSIZE give the old and new number of 492 elements in the stack, and YYPTR gives the new location of the 493 stack. Advance YYPTR to a properly aligned location for the next 494 stack. */ 495# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 496 do \ 497 { \ 498 YYSIZE_T yynewbytes; \ 499 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 500 Stack = &yyptr->Stack_alloc; \ 501 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 502 yyptr += yynewbytes / sizeof (*yyptr); \ 503 } \ 504 while (YYID (0)) 505 506#endif 507 508/* YYFINAL -- State number of the termination state. */ 509#define YYFINAL 18 510/* YYLAST -- Last index in YYTABLE. */ 511#define YYLAST 706 512 513/* YYNTOKENS -- Number of terminals. */ 514#define YYNTOKENS 65 515/* YYNNTS -- Number of nonterminals. */ 516#define YYNNTS 73 517/* YYNRULES -- Number of rules. */ 518#define YYNRULES 184 519/* YYNRULES -- Number of states. */ 520#define YYNSTATES 335 521 522/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 523#define YYUNDEFTOK 2 524#define YYMAXUTOK 257 525 526#define YYTRANSLATE(YYX) \ 527 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 528 529/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 530static const yytype_uint8 yytranslate[] = 531{ 532 0, 4, 5, 6, 7, 8, 9, 10, 11, 2, 533 12, 13, 14, 15, 16, 2, 2, 2, 2, 2, 534 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 535 27, 28, 29, 30, 31, 32, 33, 34, 35, 2, 536 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 537 46, 47, 48, 49, 50, 51, 2, 2, 2, 2, 538 52, 53, 54, 55, 56, 2, 2, 2, 2, 2, 539 57, 58, 59, 60, 61, 62, 63, 64, 2, 2, 540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 548 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 551 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 557 2, 2, 2, 2, 2, 3, 1, 2 558}; 559 560#if YYDEBUG 561/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 562 YYRHS. */ 563static const yytype_uint16 yyprhs[] = 564{ 565 0, 0, 3, 5, 7, 9, 12, 14, 22, 24, 566 26, 28, 31, 33, 41, 46, 48, 50, 52, 54, 567 56, 58, 59, 62, 64, 66, 68, 70, 72, 74, 568 76, 78, 80, 83, 84, 87, 90, 93, 96, 99, 569 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 570 134, 137, 141, 146, 152, 156, 160, 162, 164, 168, 571 175, 179, 181, 184, 186, 193, 200, 204, 206, 207, 572 211, 215, 217, 220, 222, 226, 230, 236, 243, 250, 573 256, 263, 270, 277, 284, 287, 289, 295, 297, 299, 574 301, 303, 306, 308, 314, 316, 320, 322, 324, 328, 575 335, 339, 341, 345, 349, 351, 355, 361, 365, 369, 576 371, 377, 384, 386, 388, 390, 392, 394, 396, 398, 577 400, 402, 404, 406, 408, 410, 412, 414, 416, 418, 578 420, 421, 423, 425, 427, 429, 431, 433, 434, 438, 579 440, 444, 448, 452, 456, 460, 462, 465, 468, 471, 580 474, 476, 481, 483, 487, 491, 493, 498, 500, 504, 581 509, 516, 518, 520, 522, 524, 526, 527, 531, 533, 582 535, 537, 539, 542, 544, 546, 548, 550, 552, 554, 583 556, 558, 560, 562, 563 584}; 585 586/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 587static const yytype_int16 yyrhs[] = 588{ 589 66, 0, -1, 67, -1, 70, -1, 72, -1, 67, 590 68, -1, 68, -1, 74, 69, 136, 41, 70, 42, 591 49, -1, 4, -1, 10, -1, 11, -1, 70, 71, 592 -1, 71, -1, 74, 73, 136, 41, 77, 42, 49, 593 -1, 74, 73, 136, 77, -1, 5, -1, 6, -1, 594 8, -1, 7, -1, 9, -1, 75, -1, -1, 75, 595 76, -1, 76, -1, 57, -1, 58, -1, 59, -1, 596 60, -1, 61, -1, 62, -1, 63, -1, 64, -1, 597 77, 78, -1, -1, 116, 79, -1, 116, 82, -1, 598 116, 85, -1, 116, 80, -1, 116, 81, -1, 116, 599 88, -1, 116, 89, -1, 116, 94, -1, 116, 93, 600 -1, 116, 95, -1, 116, 96, -1, 116, 97, -1, 601 116, 98, -1, 116, 112, -1, 117, 52, -1, 124, 602 36, 120, 49, -1, 134, 49, -1, 50, 134, 49, 603 -1, 133, 36, 120, 49, -1, 22, 133, 36, 133, 604 49, -1, 17, 83, 49, -1, 83, 48, 84, -1, 605 84, -1, 134, -1, 134, 36, 120, -1, 19, 86, 606 41, 87, 42, 49, -1, 128, 37, 120, -1, 128, 607 -1, 87, 79, -1, 79, -1, 18, 135, 41, 87, 608 42, 49, -1, 21, 133, 41, 90, 42, 49, -1, 609 90, 48, 91, -1, 91, -1, -1, 124, 36, 120, 610 -1, 124, 36, 92, -1, 134, -1, 50, 134, -1, 611 92, -1, 45, 126, 46, -1, 45, 122, 46, -1, 612 23, 132, 36, 120, 49, -1, 24, 134, 41, 119, 613 42, 49, -1, 25, 135, 41, 87, 42, 49, -1, 614 25, 132, 36, 120, 49, -1, 35, 25, 132, 36, 615 120, 49, -1, 26, 135, 41, 108, 42, 49, -1, 616 26, 135, 41, 110, 42, 49, -1, 29, 135, 41, 617 99, 42, 49, -1, 99, 100, -1, 100, -1, 28, 618 41, 101, 42, 49, -1, 79, -1, 112, -1, 95, 619 -1, 105, -1, 101, 102, -1, 102, -1, 27, 41, 620 103, 42, 49, -1, 79, -1, 103, 48, 104, -1, 621 104, -1, 133, -1, 41, 119, 42, -1, 30, 135, 622 41, 106, 42, 49, -1, 106, 48, 107, -1, 107, 623 -1, 133, 36, 133, -1, 108, 48, 109, -1, 109, 624 -1, 41, 110, 42, -1, 134, 36, 41, 110, 42, 625 -1, 134, 36, 120, -1, 110, 48, 111, -1, 111, 626 -1, 45, 129, 48, 129, 46, -1, 113, 135, 41, 627 87, 42, 49, -1, 31, -1, 32, -1, 33, -1, 628 34, -1, 134, -1, 115, -1, 20, -1, 19, -1, 629 18, -1, 21, -1, 23, -1, 24, -1, 25, -1, 630 26, -1, 28, -1, 29, -1, 31, -1, 117, -1, 631 -1, 12, -1, 14, -1, 13, -1, 15, -1, 16, 632 -1, 119, -1, -1, 119, 48, 120, -1, 120, -1, 633 120, 39, 120, -1, 120, 37, 120, -1, 120, 38, 634 120, -1, 120, 40, 120, -1, 124, 36, 120, -1, 635 121, -1, 38, 121, -1, 37, 121, -1, 50, 121, 636 -1, 51, 121, -1, 124, -1, 114, 43, 118, 44, 637 -1, 125, -1, 43, 120, 44, -1, 122, 48, 123, 638 -1, 123, -1, 114, 43, 118, 44, -1, 114, -1, 639 114, 47, 114, -1, 114, 45, 120, 46, -1, 114, 640 47, 114, 45, 120, 46, -1, 135, -1, 132, -1, 641 131, -1, 133, -1, 127, -1, -1, 127, 48, 128, 642 -1, 128, -1, 55, -1, 29, -1, 132, -1, 38, 643 130, -1, 130, -1, 54, -1, 53, -1, 54, -1, 644 53, -1, 56, -1, 55, -1, 58, -1, 52, -1, 645 137, -1, -1, 52, -1 646}; 647 648/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 649static const yytype_uint16 yyrline[] = 650{ 651 0, 168, 168, 170, 172, 176, 178, 182, 188, 189, 652 190, 193, 195, 199, 205, 210, 211, 212, 213, 214, 653 217, 218, 221, 222, 225, 226, 227, 228, 229, 230, 654 231, 232, 235, 237, 240, 245, 250, 255, 260, 265, 655 270, 275, 280, 285, 290, 295, 300, 305, 310, 322, 656 324, 326, 330, 341, 351, 355, 357, 361, 363, 367, 657 376, 378, 382, 384, 388, 394, 400, 402, 404, 407, 658 409, 411, 413, 415, 419, 421, 425, 429, 433, 437, 659 439, 443, 445, 453, 457, 459, 463, 465, 467, 469, 660 471, 475, 477, 481, 483, 487, 489, 493, 495, 499, 661 503, 508, 512, 516, 518, 522, 524, 526, 530, 532, 662 536, 546, 550, 551, 552, 553, 556, 557, 560, 562, 663 564, 566, 568, 570, 572, 574, 576, 578, 580, 584, 664 585, 588, 589, 590, 591, 592, 595, 596, 599, 601, 665 605, 607, 609, 611, 613, 615, 619, 621, 623, 625, 666 627, 629, 631, 633, 637, 639, 643, 647, 654, 662, 667 671, 682, 689, 696, 703, 714, 715, 718, 720, 724, 668 725, 726, 733, 734, 737, 738, 741, 744, 747, 750, 669 751, 754, 757, 758, 761 670}; 671#endif 672 673#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 674/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 675 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 676static const char *const yytname[] = 677{ 678 "END_OF_FILE", "error", "$undefined", "ERROR_TOK", "XKB_KEYMAP", 679 "XKB_KEYCODES", "XKB_TYPES", "XKB_SYMBOLS", "XKB_COMPATMAP", 680 "XKB_GEOMETRY", "XKB_SEMANTICS", "XKB_LAYOUT", "INCLUDE", "OVERRIDE", 681 "AUGMENT", "REPLACE", "ALTERNATE", "VIRTUAL_MODS", "TYPE", "INTERPRET", 682 "ACTION_TOK", "KEY", "ALIAS", "GROUP", "MODIFIER_MAP", "INDICATOR", 683 "SHAPE", "KEYS", "ROW", "SECTION", "OVERLAY", "TEXT", "OUTLINE", "SOLID", 684 "LOGO", "VIRTUAL", "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES", 685 "OBRACE", "CBRACE", "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT", 686 "COMMA", "SEMI", "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT", 687 "IDENT", "KEYNAME", "PARTIAL", "DEFAULT", "HIDDEN", "ALPHANUMERIC_KEYS", 688 "MODIFIER_KEYS", "KEYPAD_KEYS", "FUNCTION_KEYS", "ALTERNATE_GROUP", 689 "$accept", "XkbFile", "XkbCompMapList", "XkbCompositeMap", 690 "XkbCompositeType", "XkbMapConfigList", "XkbMapConfig", "XkbConfig", 691 "FileType", "OptFlags", "Flags", "Flag", "DeclList", "Decl", "VarDecl", 692 "KeyNameDecl", "KeyAliasDecl", "VModDecl", "VModDefList", "VModDef", 693 "InterpretDecl", "InterpretMatch", "VarDeclList", "KeyTypeDecl", 694 "SymbolsDecl", "SymbolsBody", "SymbolsVarDecl", "ArrayInit", 695 "GroupCompatDecl", "ModMapDecl", "IndicatorMapDecl", "IndicatorNameDecl", 696 "ShapeDecl", "SectionDecl", "SectionBody", "SectionBodyItem", "RowBody", 697 "RowBodyItem", "Keys", "Key", "OverlayDecl", "OverlayKeyList", 698 "OverlayKey", "OutlineList", "OutlineInList", "CoordList", "Coord", 699 "DoodadDecl", "DoodadType", "FieldSpec", "Element", "OptMergeMode", 700 "MergeMode", "OptExprList", "ExprList", "Expr", "Term", "ActionList", 701 "Action", "Lhs", "Terminal", "OptKeySymList", "KeySymList", "KeySym", 702 "SignedNumber", "Number", "Float", "Integer", "KeyName", "Ident", 703 "String", "OptMapName", "MapName", 0 704}; 705#endif 706 707# ifdef YYPRINT 708/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 709 token YYLEX-NUM. */ 710static const yytype_uint16 yytoknum[] = 711{ 712 0, 256, 257, 255, 1, 2, 3, 4, 5, 6, 713 7, 8, 10, 11, 12, 13, 14, 20, 21, 22, 714 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 715 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 716 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 717 54, 55, 60, 61, 62, 63, 64, 70, 71, 72, 718 73, 74, 75, 76, 77 719}; 720# endif 721 722/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 723static const yytype_uint8 yyr1[] = 724{ 725 0, 65, 66, 66, 66, 67, 67, 68, 69, 69, 726 69, 70, 70, 71, 72, 73, 73, 73, 73, 73, 727 74, 74, 75, 75, 76, 76, 76, 76, 76, 76, 728 76, 76, 77, 77, 78, 78, 78, 78, 78, 78, 729 78, 78, 78, 78, 78, 78, 78, 78, 78, 79, 730 79, 79, 80, 81, 82, 83, 83, 84, 84, 85, 731 86, 86, 87, 87, 88, 89, 90, 90, 90, 91, 732 91, 91, 91, 91, 92, 92, 93, 94, 95, 96, 733 96, 97, 97, 98, 99, 99, 100, 100, 100, 100, 734 100, 101, 101, 102, 102, 103, 103, 104, 104, 105, 735 106, 106, 107, 108, 108, 109, 109, 109, 110, 110, 736 111, 112, 113, 113, 113, 113, 114, 114, 115, 115, 737 115, 115, 115, 115, 115, 115, 115, 115, 115, 116, 738 116, 117, 117, 117, 117, 117, 118, 118, 119, 119, 739 120, 120, 120, 120, 120, 120, 121, 121, 121, 121, 740 121, 121, 121, 121, 122, 122, 123, 124, 124, 124, 741 124, 125, 125, 125, 125, 126, 126, 127, 127, 128, 742 128, 128, 129, 129, 130, 130, 131, 132, 133, 134, 743 134, 135, 136, 136, 137 744}; 745 746/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 747static const yytype_uint8 yyr2[] = 748{ 749 0, 2, 1, 1, 1, 2, 1, 7, 1, 1, 750 1, 2, 1, 7, 4, 1, 1, 1, 1, 1, 751 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 752 1, 1, 2, 0, 2, 2, 2, 2, 2, 2, 753 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 754 2, 3, 4, 5, 3, 3, 1, 1, 3, 6, 755 3, 1, 2, 1, 6, 6, 3, 1, 0, 3, 756 3, 1, 2, 1, 3, 3, 5, 6, 6, 5, 757 6, 6, 6, 6, 2, 1, 5, 1, 1, 1, 758 1, 2, 1, 5, 1, 3, 1, 1, 3, 6, 759 3, 1, 3, 3, 1, 3, 5, 3, 3, 1, 760 5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 761 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 762 0, 1, 1, 1, 1, 1, 1, 0, 3, 1, 763 3, 3, 3, 3, 3, 1, 2, 2, 2, 2, 764 1, 4, 1, 3, 3, 1, 4, 1, 3, 4, 765 6, 1, 1, 1, 1, 1, 0, 3, 1, 1, 766 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 767 1, 1, 1, 0, 1 768}; 769 770/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 771 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 772 means the default is an error. */ 773static const yytype_uint8 yydefact[] = 774{ 775 21, 24, 25, 26, 27, 28, 29, 30, 31, 0, 776 21, 6, 21, 12, 4, 0, 20, 23, 1, 5, 777 0, 11, 0, 8, 15, 16, 18, 17, 19, 9, 778 10, 183, 183, 22, 183, 184, 0, 182, 33, 0, 779 21, 33, 130, 21, 130, 131, 133, 132, 134, 135, 780 32, 0, 129, 0, 0, 0, 120, 119, 118, 121, 781 0, 122, 123, 124, 125, 126, 127, 128, 113, 114, 782 115, 0, 0, 179, 178, 180, 34, 37, 38, 35, 783 36, 39, 40, 42, 41, 43, 44, 45, 46, 47, 784 0, 157, 117, 0, 0, 116, 48, 7, 13, 0, 785 56, 57, 181, 0, 170, 177, 169, 0, 61, 171, 786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787 0, 0, 0, 0, 0, 50, 0, 54, 0, 0, 788 0, 0, 68, 0, 0, 0, 0, 0, 0, 0, 789 0, 51, 0, 120, 119, 121, 122, 123, 124, 125, 790 127, 128, 0, 0, 0, 0, 0, 176, 157, 0, 791 145, 150, 152, 163, 162, 164, 116, 161, 158, 0, 792 0, 55, 58, 63, 0, 0, 60, 166, 0, 0, 793 67, 73, 0, 116, 0, 0, 0, 139, 0, 0, 794 0, 0, 0, 104, 0, 109, 0, 124, 126, 0, 795 87, 89, 0, 85, 90, 88, 0, 0, 147, 150, 796 146, 0, 148, 149, 137, 0, 0, 0, 0, 159, 797 0, 0, 49, 52, 0, 62, 0, 170, 169, 0, 798 0, 155, 0, 165, 168, 72, 0, 0, 0, 53, 799 76, 0, 0, 79, 0, 0, 0, 175, 174, 0, 800 173, 0, 0, 0, 0, 0, 0, 0, 0, 84, 801 0, 0, 153, 0, 136, 141, 142, 140, 143, 144, 802 0, 64, 59, 137, 75, 0, 74, 0, 65, 66, 803 70, 69, 77, 138, 78, 105, 172, 0, 81, 103, 804 82, 108, 0, 107, 0, 94, 0, 92, 0, 83, 805 80, 111, 151, 160, 0, 154, 167, 0, 0, 0, 806 0, 91, 0, 101, 0, 156, 110, 106, 0, 0, 807 96, 97, 86, 0, 0, 0, 0, 0, 0, 99, 808 100, 102, 98, 93, 95 809}; 810 811/* YYDEFGOTO[NTERM-NUM]. */ 812static const yytype_int16 yydefgoto[] = 813{ 814 -1, 9, 10, 11, 31, 12, 13, 14, 32, 22, 815 16, 17, 42, 50, 173, 77, 78, 79, 99, 100, 816 80, 107, 174, 81, 82, 179, 180, 181, 83, 84, 817 201, 86, 87, 88, 202, 203, 296, 297, 319, 320, 818 204, 312, 313, 192, 193, 194, 195, 205, 90, 158, 819 92, 51, 52, 263, 264, 187, 160, 230, 231, 161, 820 162, 232, 233, 108, 249, 250, 163, 164, 165, 166, 821 167, 36, 37 822}; 823 824/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 825 STATE-NUM. */ 826#define YYPACT_NINF -188 827static const yytype_int16 yypact[] = 828{ 829 628, -188, -188, -188, -188, -188, -188, -188, -188, 12, 830 4, -188, 58, -188, -188, 695, 628, -188, -188, -188, 831 121, -188, 408, -188, -188, -188, -188, -188, -188, -188, 832 -188, -9, -9, -188, -9, -188, 19, -188, 45, 45, 833 628, -188, 174, 620, 137, -188, -188, -188, -188, -188, 834 -188, 317, 39, -15, 50, 1, 59, -18, -188, 72, 835 72, 106, 1, -27, 59, -188, 59, 62, -188, -188, 836 -188, 117, 1, -188, -188, -188, -188, -188, -188, -188, 837 -188, -188, -188, -188, -188, -188, -188, -188, -188, -188, 838 59, 51, -188, 125, 146, 134, -188, -188, -188, 132, 839 -188, 163, -188, 168, -188, -188, -188, 173, 179, -188, 840 178, 186, 190, 194, 206, 204, 208, 221, 106, 216, 841 225, 265, 640, 265, 265, -188, 1, -188, 265, 599, 842 599, 265, 470, 72, 265, 265, 265, 599, -26, 21, 843 239, -188, 599, -188, -188, -188, -188, -188, -188, -188, 844 -188, -188, 265, 265, 265, 265, 265, -188, 159, 232, 845 -188, 240, -188, -188, -188, -188, -188, -188, 223, 98, 846 156, -188, 260, -188, 485, 513, 260, 617, 1, 30, 847 -188, -188, 243, 32, 231, 192, 64, 260, 199, 528, 848 236, 35, 127, -188, 128, -188, 251, 59, 270, 59, 849 -188, -188, 422, -188, -188, -188, 265, 556, -188, -188, 850 -188, 342, -188, -188, 265, 265, 265, 265, 265, -188, 851 265, 265, -188, -188, 263, -188, 264, 249, 271, 281, 852 61, -188, 279, 278, -188, -188, 280, 470, 340, -188, 853 -188, 283, 265, -188, 284, 129, 16, -188, -188, 282, 854 -188, 298, -34, 308, 236, 381, 576, 287, 321, -188, 855 215, 325, -188, 332, 336, 158, 158, -188, -188, 260, 856 316, -188, -188, 265, -188, 640, -188, -18, -188, -188, 857 -188, 260, -188, 260, -188, -188, -188, 35, -188, -188, 858 -188, -188, 236, 260, 346, -188, 442, -188, 72, -188, 859 -188, -188, -188, -188, 344, -188, -188, 343, 143, -28, 860 348, -188, 176, -188, 367, -188, -188, -188, 265, 198, 861 -188, -188, -188, 359, 72, 72, 202, 362, -28, -188, 862 -188, -188, -188, -188, -188 863}; 864 865/* YYPGOTO[NTERM-NUM]. */ 866static const yytype_int16 yypgoto[] = 867{ 868 -188, -188, -188, 410, -188, 383, -7, -188, 399, 38, 869 -188, 409, 385, -188, -35, -188, -188, -188, -188, 301, 870 -188, -188, -47, -188, -188, -188, 191, 200, -188, -188, 871 378, -188, -188, -188, -188, 228, -188, 148, -188, 130, 872 -188, -188, 133, -188, 197, -187, 205, 423, -188, 26, 873 -188, -188, -188, 203, -134, 89, 104, -188, 207, -29, 874 -188, -188, -188, -175, 188, 233, -188, -43, -51, -45, 875 -33, 109, -188 876}; 877 878/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 879 positive, shift that token. If negative, reduce the rule which 880 number is the opposite. If zero, do what YYDEFACT says. 881 If YYTABLE_NINF, syntax error. */ 882#define YYTABLE_NINF -180 883static const yytype_int16 yytable[] = 884{ 885 94, 186, 234, 245, -2, 21, 95, 190, 110, 111, 886 101, 104, 18, 318, 109, 190, 76, 113, 112, 191, 887 114, 73, 93, 103, 75, 102, 105, 119, 74, 73, 888 115, 116, 75, 117, 97, 105, 21, 106, 15, 143, 889 144, 58, 145, 35, 146, 147, 197, 149, 20, 198, 890 150, 199, 67, 68, 69, 70, 73, 120, -3, 75, 891 40, 1, 2, 3, 4, 5, 6, 7, 8, 247, 892 248, 72, 236, 246, -71, 140, 73, 91, 237, 75, 893 -71, 101, 184, 175, 95, 95, 41, 183, 247, 248, 894 189, 96, 95, 196, 95, 207, 121, 95, 122, 98, 895 93, 93, 306, 182, 200, 308, 241, 274, 93, 275, 896 93, 102, 242, 93, -112, 1, 2, 3, 4, 5, 897 6, 7, 8, 209, 209, 23, 209, 209, 74, 95, 898 95, 29, 30, 235, 109, 215, 216, 217, 218, 225, 899 225, 38, 118, 39, 95, 93, 93, 222, 168, 45, 900 46, 47, 48, 49, 225, 91, 91, 95, 91, 105, 901 93, 123, 95, 91, 115, 91, 257, 200, 91, 251, 902 253, 285, 225, 93, -14, 252, 254, 254, 93, 54, 903 126, 127, 124, 125, 326, 317, 45, 46, 47, 48, 904 49, 254, 183, 215, 216, 217, 218, 217, 218, 128, 905 91, 91, 214, 229, 121, 223, 122, 196, 182, 129, 906 159, 95, 169, 170, 130, 91, 131, 172, 323, 132, 907 176, 295, 133, 185, 324, 188, 134, 93, 91, 215, 908 216, 217, 218, 91, 109, 135, 215, 216, 217, 218, 909 327, 240, 136, 211, 332, 137, 328, 314, 243, 138, 910 242, 95, 215, 216, 217, 218, 208, 210, 321, 212, 911 213, 295, 139, 91, 300, 141, 142, 93, 221, 215, 912 216, 217, 218, 314, 331, 206, 220, 321, 219, 238, 913 239, 191, 91, 143, 144, 58, 145, 255, 146, 147, 914 148, 149, -127, 65, 150, 260, 151, 215, 216, 217, 915 218, 229, 152, 153, 265, 266, 267, 268, 154, 269, 916 270, 256, 271, 272, -179, 155, 156, 102, 105, 157, 917 73, 74, 91, 75, 273, 276, 277, 281, 298, 278, 918 287, 283, 282, 284, 55, 56, 57, 58, 59, 60, 919 61, 62, 63, 64, 293, 65, 66, 288, 67, 68, 920 69, 70, 71, 215, 216, 217, 218, 290, 143, 144, 921 58, 145, 303, 146, 147, 148, 149, 72, 65, 150, 922 299, 151, 73, 74, 301, 75, 302, 152, 153, 215, 923 216, 217, 218, 154, 242, 177, 262, 309, 315, 316, 924 155, 156, 102, 105, 157, 73, 74, 322, 75, 143, 925 144, 58, 145, 325, 146, 147, 148, 149, 329, 65, 926 150, 333, 151, 24, 25, 26, 27, 28, 152, 153, 927 19, 34, 292, 43, 154, 33, 44, 171, 279, 85, 928 259, 155, 156, 102, 105, 157, 73, 74, 280, 75, 929 143, 144, 58, 145, 311, 146, 147, 197, 149, 289, 930 198, 150, 199, 67, 68, 69, 70, 330, 334, 291, 931 143, 144, 58, 145, 258, 146, 147, 148, 149, 294, 932 65, 150, 72, 151, 89, 307, 304, 73, 0, 286, 933 75, 0, 305, 0, 310, 0, 0, 0, 143, 144, 934 58, 145, 72, 146, 147, 148, 149, 73, 65, 150, 935 75, 151, 0, 143, 144, 58, 145, 0, 146, 147, 936 148, 149, 0, 65, 150, 177, 151, 0, 0, 0, 937 178, 0, 0, 0, 0, 73, 0, 224, 75, 0, 938 0, 143, 144, 58, 145, 72, 146, 147, 148, 149, 939 73, 65, 150, 75, 151, 0, 143, 144, 58, 145, 940 0, 146, 147, 148, 149, 226, 65, 150, 0, 151, 941 0, 0, 0, 72, 0, 0, 0, 0, 73, 0, 942 244, 75, 0, 0, 143, 144, 58, 145, 72, 146, 943 147, 148, 149, 73, 65, 150, 75, 151, 0, 0, 944 0, 0, 0, 0, 143, 144, 58, 145, 261, 146, 945 147, 148, 149, 294, 65, 150, 72, 151, 0, 0, 946 0, 73, 0, 0, 75, 0, 0, 143, 144, 58, 947 145, 0, 146, 147, 148, 149, 72, 65, 150, 0, 948 151, 73, 0, 0, 75, 143, 144, 58, 145, 0, 949 146, 147, 148, 149, 0, 65, 227, 0, 151, 72, 950 0, 0, 0, 0, 73, 0, 0, 75, 143, 144, 951 58, 145, 53, 146, 147, 148, 149, 0, 65, 150, 952 105, 151, 228, 0, 0, 75, 0, 1, 2, 3, 953 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 954 6, 7, 8, 0, 0, 73, 0, 0, 75, 23, 955 24, 25, 26, 27, 28, 29, 30 956}; 957 958static const yytype_int16 yycheck[] = 959{ 960 51, 135, 177, 190, 0, 12, 51, 41, 59, 60, 961 55, 29, 0, 41, 57, 41, 51, 62, 61, 45, 962 63, 55, 51, 56, 58, 52, 53, 72, 56, 55, 963 63, 64, 58, 66, 49, 53, 43, 55, 0, 18, 964 19, 20, 21, 52, 23, 24, 25, 26, 10, 28, 965 29, 30, 31, 32, 33, 34, 55, 90, 0, 58, 966 41, 57, 58, 59, 60, 61, 62, 63, 64, 53, 967 54, 50, 42, 38, 42, 118, 55, 51, 48, 58, 968 48, 126, 133, 130, 129, 130, 41, 132, 53, 54, 969 137, 52, 137, 138, 139, 142, 45, 142, 47, 49, 970 129, 130, 277, 132, 139, 292, 42, 46, 137, 48, 971 139, 52, 48, 142, 52, 57, 58, 59, 60, 61, 972 62, 63, 64, 152, 153, 4, 155, 156, 56, 174, 973 175, 10, 11, 178, 177, 37, 38, 39, 40, 174, 974 175, 32, 25, 34, 189, 174, 175, 49, 122, 12, 975 13, 14, 15, 16, 189, 129, 130, 202, 132, 53, 976 189, 36, 207, 137, 197, 139, 199, 202, 142, 42, 977 42, 42, 207, 202, 0, 48, 48, 48, 207, 42, 978 48, 49, 36, 49, 318, 42, 12, 13, 14, 15, 979 16, 48, 237, 37, 38, 39, 40, 39, 40, 36, 980 174, 175, 43, 177, 45, 49, 47, 252, 237, 41, 981 121, 256, 123, 124, 41, 189, 37, 128, 42, 41, 982 131, 256, 36, 134, 48, 136, 36, 256, 202, 37, 983 38, 39, 40, 207, 277, 41, 37, 38, 39, 40, 984 42, 49, 36, 154, 42, 41, 48, 298, 49, 41, 985 48, 296, 37, 38, 39, 40, 152, 153, 309, 155, 986 156, 296, 41, 237, 49, 49, 41, 296, 45, 37, 987 38, 39, 40, 324, 325, 36, 36, 328, 46, 36, 988 49, 45, 256, 18, 19, 20, 21, 36, 23, 24, 989 25, 26, 43, 28, 29, 206, 31, 37, 38, 39, 990 40, 275, 37, 38, 215, 216, 217, 218, 43, 220, 991 221, 41, 49, 49, 43, 50, 51, 52, 53, 54, 992 55, 56, 296, 58, 43, 46, 48, 238, 41, 49, 993 48, 242, 49, 49, 17, 18, 19, 20, 21, 22, 994 23, 24, 25, 26, 255, 28, 29, 49, 31, 32, 995 33, 34, 35, 37, 38, 39, 40, 49, 18, 19, 996 20, 21, 46, 23, 24, 25, 26, 50, 28, 29, 997 49, 31, 55, 56, 49, 58, 44, 37, 38, 37, 998 38, 39, 40, 43, 48, 45, 44, 41, 44, 46, 999 50, 51, 52, 53, 54, 55, 56, 49, 58, 18, 1000 19, 20, 21, 36, 23, 24, 25, 26, 49, 28, 1001 29, 49, 31, 5, 6, 7, 8, 9, 37, 38, 1002 10, 22, 41, 40, 43, 16, 41, 126, 237, 51, 1003 202, 50, 51, 52, 53, 54, 55, 56, 238, 58, 1004 18, 19, 20, 21, 296, 23, 24, 25, 26, 252, 1005 28, 29, 30, 31, 32, 33, 34, 324, 328, 254, 1006 18, 19, 20, 21, 42, 23, 24, 25, 26, 27, 1007 28, 29, 50, 31, 51, 287, 273, 55, -1, 246, 1008 58, -1, 275, -1, 42, -1, -1, -1, 18, 19, 1009 20, 21, 50, 23, 24, 25, 26, 55, 28, 29, 1010 58, 31, -1, 18, 19, 20, 21, -1, 23, 24, 1011 25, 26, -1, 28, 29, 45, 31, -1, -1, -1, 1012 50, -1, -1, -1, -1, 55, -1, 42, 58, -1, 1013 -1, 18, 19, 20, 21, 50, 23, 24, 25, 26, 1014 55, 28, 29, 58, 31, -1, 18, 19, 20, 21, 1015 -1, 23, 24, 25, 26, 42, 28, 29, -1, 31, 1016 -1, -1, -1, 50, -1, -1, -1, -1, 55, -1, 1017 42, 58, -1, -1, 18, 19, 20, 21, 50, 23, 1018 24, 25, 26, 55, 28, 29, 58, 31, -1, -1, 1019 -1, -1, -1, -1, 18, 19, 20, 21, 42, 23, 1020 24, 25, 26, 27, 28, 29, 50, 31, -1, -1, 1021 -1, 55, -1, -1, 58, -1, -1, 18, 19, 20, 1022 21, -1, 23, 24, 25, 26, 50, 28, 29, -1, 1023 31, 55, -1, -1, 58, 18, 19, 20, 21, -1, 1024 23, 24, 25, 26, -1, 28, 29, -1, 31, 50, 1025 -1, -1, -1, -1, 55, -1, -1, 58, 18, 19, 1026 20, 21, 42, 23, 24, 25, 26, -1, 28, 29, 1027 53, 31, 55, -1, -1, 58, -1, 57, 58, 59, 1028 60, 61, 62, 63, 64, 57, 58, 59, 60, 61, 1029 62, 63, 64, -1, -1, 55, -1, -1, 58, 4, 1030 5, 6, 7, 8, 9, 10, 11 1031}; 1032 1033/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1034 symbol of state STATE-NUM. */ 1035static const yytype_uint8 yystos[] = 1036{ 1037 0, 57, 58, 59, 60, 61, 62, 63, 64, 66, 1038 67, 68, 70, 71, 72, 74, 75, 76, 0, 68, 1039 74, 71, 74, 4, 5, 6, 7, 8, 9, 10, 1040 11, 69, 73, 76, 73, 52, 136, 137, 136, 136, 1041 41, 41, 77, 70, 77, 12, 13, 14, 15, 16, 1042 78, 116, 117, 42, 42, 17, 18, 19, 20, 21, 1043 22, 23, 24, 25, 26, 28, 29, 31, 32, 33, 1044 34, 35, 50, 55, 56, 58, 79, 80, 81, 82, 1045 85, 88, 89, 93, 94, 95, 96, 97, 98, 112, 1046 113, 114, 115, 124, 133, 134, 52, 49, 49, 83, 1047 84, 134, 52, 135, 29, 53, 55, 86, 128, 132, 1048 133, 133, 132, 134, 132, 135, 135, 135, 25, 134, 1049 135, 45, 47, 36, 36, 49, 48, 49, 36, 41, 1050 41, 37, 41, 36, 36, 41, 36, 41, 41, 41, 1051 132, 49, 41, 18, 19, 21, 23, 24, 25, 26, 1052 29, 31, 37, 38, 43, 50, 51, 54, 114, 120, 1053 121, 124, 125, 131, 132, 133, 134, 135, 114, 120, 1054 120, 84, 120, 79, 87, 87, 120, 45, 50, 90, 1055 91, 92, 124, 134, 133, 120, 119, 120, 120, 87, 1056 41, 45, 108, 109, 110, 111, 134, 25, 28, 30, 1057 79, 95, 99, 100, 105, 112, 36, 87, 121, 124, 1058 121, 120, 121, 121, 43, 37, 38, 39, 40, 46, 1059 36, 45, 49, 49, 42, 79, 42, 29, 55, 114, 1060 122, 123, 126, 127, 128, 134, 42, 48, 36, 49, 1061 49, 42, 48, 49, 42, 110, 38, 53, 54, 129, 1062 130, 42, 48, 42, 48, 36, 41, 135, 42, 100, 1063 120, 42, 44, 118, 119, 120, 120, 120, 120, 120, 1064 120, 49, 49, 43, 46, 48, 46, 48, 49, 91, 1065 92, 120, 49, 120, 49, 42, 130, 48, 49, 109, 1066 49, 111, 41, 120, 27, 79, 101, 102, 41, 49, 1067 49, 49, 44, 46, 118, 123, 128, 129, 110, 41, 1068 42, 102, 106, 107, 133, 44, 46, 42, 41, 103, 1069 104, 133, 49, 42, 48, 36, 119, 42, 48, 49, 1070 107, 133, 42, 49, 104 1071}; 1072 1073#define yyerrok (yyerrstatus = 0) 1074#define yyclearin (yychar = YYEMPTY) 1075#define YYEMPTY (-2) 1076#define YYEOF 0 1077 1078#define YYACCEPT goto yyacceptlab 1079#define YYABORT goto yyabortlab 1080#define YYERROR goto yyerrorlab 1081 1082 1083/* Like YYERROR except do call yyerror. This remains here temporarily 1084 to ease the transition to the new meaning of YYERROR, for GCC. 1085 Once GCC version 2 has supplanted version 1, this can go. */ 1086 1087#define YYFAIL goto yyerrlab 1088 1089#define YYRECOVERING() (!!yyerrstatus) 1090 1091#define YYBACKUP(Token, Value) \ 1092do \ 1093 if (yychar == YYEMPTY && yylen == 1) \ 1094 { \ 1095 yychar = (Token); \ 1096 yylval = (Value); \ 1097 yytoken = YYTRANSLATE (yychar); \ 1098 YYPOPSTACK (1); \ 1099 goto yybackup; \ 1100 } \ 1101 else \ 1102 { \ 1103 yyerror (YY_("syntax error: cannot back up")); \ 1104 YYERROR; \ 1105 } \ 1106while (YYID (0)) 1107 1108 1109#define YYTERROR 1 1110#define YYERRCODE 256 1111 1112 1113/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 1114 If N is 0, then set CURRENT to the empty location which ends 1115 the previous symbol: RHS[0] (always defined). */ 1116 1117#define YYRHSLOC(Rhs, K) ((Rhs)[K]) 1118#ifndef YYLLOC_DEFAULT 1119# define YYLLOC_DEFAULT(Current, Rhs, N) \ 1120 do \ 1121 if (YYID (N)) \ 1122 { \ 1123 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 1124 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 1125 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 1126 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 1127 } \ 1128 else \ 1129 { \ 1130 (Current).first_line = (Current).last_line = \ 1131 YYRHSLOC (Rhs, 0).last_line; \ 1132 (Current).first_column = (Current).last_column = \ 1133 YYRHSLOC (Rhs, 0).last_column; \ 1134 } \ 1135 while (YYID (0)) 1136#endif 1137 1138 1139/* YY_LOCATION_PRINT -- Print the location on the stream. 1140 This macro was not mandated originally: define only if we know 1141 we won't break user code: when these are the locations we know. */ 1142 1143#ifndef YY_LOCATION_PRINT 1144# if YYLTYPE_IS_TRIVIAL 1145# define YY_LOCATION_PRINT(File, Loc) \ 1146 fprintf (File, "%d.%d-%d.%d", \ 1147 (Loc).first_line, (Loc).first_column, \ 1148 (Loc).last_line, (Loc).last_column) 1149# else 1150# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1151# endif 1152#endif 1153 1154 1155/* YYLEX -- calling `yylex' with the right arguments. */ 1156 1157#ifdef YYLEX_PARAM 1158# define YYLEX yylex (YYLEX_PARAM) 1159#else 1160# define YYLEX yylex () 1161#endif 1162 1163/* Enable debugging if requested. */ 1164#if YYDEBUG 1165 1166# ifndef YYFPRINTF 1167# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1168# define YYFPRINTF fprintf 1169# endif 1170 1171# define YYDPRINTF(Args) \ 1172do { \ 1173 if (yydebug) \ 1174 YYFPRINTF Args; \ 1175} while (YYID (0)) 1176 1177# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1178do { \ 1179 if (yydebug) \ 1180 { \ 1181 YYFPRINTF (stderr, "%s ", Title); \ 1182 yy_symbol_print (stderr, \ 1183 Type, Value); \ 1184 YYFPRINTF (stderr, "\n"); \ 1185 } \ 1186} while (YYID (0)) 1187 1188 1189/*--------------------------------. 1190| Print this symbol on YYOUTPUT. | 1191`--------------------------------*/ 1192 1193/*ARGSUSED*/ 1194#if (defined __STDC__ || defined __C99__FUNC__ \ 1195 || defined __cplusplus || defined _MSC_VER) 1196static void 1197yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1198#else 1199static void 1200yy_symbol_value_print (yyoutput, yytype, yyvaluep) 1201 FILE *yyoutput; 1202 int yytype; 1203 YYSTYPE const * const yyvaluep; 1204#endif 1205{ 1206 if (!yyvaluep) 1207 return; 1208# ifdef YYPRINT 1209 if (yytype < YYNTOKENS) 1210 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1211# else 1212 YYUSE (yyoutput); 1213# endif 1214 switch (yytype) 1215 { 1216 default: 1217 break; 1218 } 1219} 1220 1221 1222/*--------------------------------. 1223| Print this symbol on YYOUTPUT. | 1224`--------------------------------*/ 1225 1226#if (defined __STDC__ || defined __C99__FUNC__ \ 1227 || defined __cplusplus || defined _MSC_VER) 1228static void 1229yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 1230#else 1231static void 1232yy_symbol_print (yyoutput, yytype, yyvaluep) 1233 FILE *yyoutput; 1234 int yytype; 1235 YYSTYPE const * const yyvaluep; 1236#endif 1237{ 1238 if (yytype < YYNTOKENS) 1239 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1240 else 1241 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1242 1243 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 1244 YYFPRINTF (yyoutput, ")"); 1245} 1246 1247/*------------------------------------------------------------------. 1248| yy_stack_print -- Print the state stack from its BOTTOM up to its | 1249| TOP (included). | 1250`------------------------------------------------------------------*/ 1251 1252#if (defined __STDC__ || defined __C99__FUNC__ \ 1253 || defined __cplusplus || defined _MSC_VER) 1254static void 1255yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1256#else 1257static void 1258yy_stack_print (yybottom, yytop) 1259 yytype_int16 *yybottom; 1260 yytype_int16 *yytop; 1261#endif 1262{ 1263 YYFPRINTF (stderr, "Stack now"); 1264 for (; yybottom <= yytop; yybottom++) 1265 { 1266 int yybot = *yybottom; 1267 YYFPRINTF (stderr, " %d", yybot); 1268 } 1269 YYFPRINTF (stderr, "\n"); 1270} 1271 1272# define YY_STACK_PRINT(Bottom, Top) \ 1273do { \ 1274 if (yydebug) \ 1275 yy_stack_print ((Bottom), (Top)); \ 1276} while (YYID (0)) 1277 1278 1279/*------------------------------------------------. 1280| Report that the YYRULE is going to be reduced. | 1281`------------------------------------------------*/ 1282 1283#if (defined __STDC__ || defined __C99__FUNC__ \ 1284 || defined __cplusplus || defined _MSC_VER) 1285static void 1286yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 1287#else 1288static void 1289yy_reduce_print (yyvsp, yyrule) 1290 YYSTYPE *yyvsp; 1291 int yyrule; 1292#endif 1293{ 1294 int yynrhs = yyr2[yyrule]; 1295 int yyi; 1296 unsigned long int yylno = yyrline[yyrule]; 1297 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1298 yyrule - 1, yylno); 1299 /* The symbols being reduced. */ 1300 for (yyi = 0; yyi < yynrhs; yyi++) 1301 { 1302 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1303 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1304 &(yyvsp[(yyi + 1) - (yynrhs)]) 1305 ); 1306 YYFPRINTF (stderr, "\n"); 1307 } 1308} 1309 1310# define YY_REDUCE_PRINT(Rule) \ 1311do { \ 1312 if (yydebug) \ 1313 yy_reduce_print (yyvsp, Rule); \ 1314} while (YYID (0)) 1315 1316/* Nonzero means print parse trace. It is left uninitialized so that 1317 multiple parsers can coexist. */ 1318int yydebug; 1319#else /* !YYDEBUG */ 1320# define YYDPRINTF(Args) 1321# define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1322# define YY_STACK_PRINT(Bottom, Top) 1323# define YY_REDUCE_PRINT(Rule) 1324#endif /* !YYDEBUG */ 1325 1326 1327/* YYINITDEPTH -- initial size of the parser's stacks. */ 1328#ifndef YYINITDEPTH 1329# define YYINITDEPTH 200 1330#endif 1331 1332/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1333 if the built-in stack extension method is used). 1334 1335 Do not make this value too large; the results are undefined if 1336 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1337 evaluated with infinite-precision integer arithmetic. */ 1338 1339#ifndef YYMAXDEPTH 1340# define YYMAXDEPTH 10000 1341#endif 1342 1343 1344 1345#if YYERROR_VERBOSE 1346 1347# ifndef yystrlen 1348# if defined __GLIBC__ && defined _STRING_H 1349# define yystrlen strlen 1350# else 1351/* Return the length of YYSTR. */ 1352#if (defined __STDC__ || defined __C99__FUNC__ \ 1353 || defined __cplusplus || defined _MSC_VER) 1354static YYSIZE_T 1355yystrlen (const char *yystr) 1356#else 1357static YYSIZE_T 1358yystrlen (yystr) 1359 const char *yystr; 1360#endif 1361{ 1362 YYSIZE_T yylen; 1363 for (yylen = 0; yystr[yylen]; yylen++) 1364 continue; 1365 return yylen; 1366} 1367# endif 1368# endif 1369 1370# ifndef yystpcpy 1371# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1372# define yystpcpy stpcpy 1373# else 1374/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1375 YYDEST. */ 1376#if (defined __STDC__ || defined __C99__FUNC__ \ 1377 || defined __cplusplus || defined _MSC_VER) 1378static char * 1379yystpcpy (char *yydest, const char *yysrc) 1380#else 1381static char * 1382yystpcpy (yydest, yysrc) 1383 char *yydest; 1384 const char *yysrc; 1385#endif 1386{ 1387 char *yyd = yydest; 1388 const char *yys = yysrc; 1389 1390 while ((*yyd++ = *yys++) != '\0') 1391 continue; 1392 1393 return yyd - 1; 1394} 1395# endif 1396# endif 1397 1398# ifndef yytnamerr 1399/* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1400 quotes and backslashes, so that it's suitable for yyerror. The 1401 heuristic is that double-quoting is unnecessary unless the string 1402 contains an apostrophe, a comma, or backslash (other than 1403 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1404 null, do not copy; instead, return the length of what the result 1405 would have been. */ 1406static YYSIZE_T 1407yytnamerr (char *yyres, const char *yystr) 1408{ 1409 if (*yystr == '"') 1410 { 1411 YYSIZE_T yyn = 0; 1412 char const *yyp = yystr; 1413 1414 for (;;) 1415 switch (*++yyp) 1416 { 1417 case '\'': 1418 case ',': 1419 goto do_not_strip_quotes; 1420 1421 case '\\': 1422 if (*++yyp != '\\') 1423 goto do_not_strip_quotes; 1424 /* Fall through. */ 1425 default: 1426 if (yyres) 1427 yyres[yyn] = *yyp; 1428 yyn++; 1429 break; 1430 1431 case '"': 1432 if (yyres) 1433 yyres[yyn] = '\0'; 1434 return yyn; 1435 } 1436 do_not_strip_quotes: ; 1437 } 1438 1439 if (! yyres) 1440 return yystrlen (yystr); 1441 1442 return yystpcpy (yyres, yystr) - yyres; 1443} 1444# endif 1445 1446/* Copy into YYRESULT an error message about the unexpected token 1447 YYCHAR while in state YYSTATE. Return the number of bytes copied, 1448 including the terminating null byte. If YYRESULT is null, do not 1449 copy anything; just return the number of bytes that would be 1450 copied. As a special case, return 0 if an ordinary "syntax error" 1451 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1452 size calculation. */ 1453static YYSIZE_T 1454yysyntax_error (char *yyresult, int yystate, int yychar) 1455{ 1456 int yyn = yypact[yystate]; 1457 1458 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1459 return 0; 1460 else 1461 { 1462 int yytype = YYTRANSLATE (yychar); 1463 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1464 YYSIZE_T yysize = yysize0; 1465 YYSIZE_T yysize1; 1466 int yysize_overflow = 0; 1467 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1468 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1469 int yyx; 1470 1471# if 0 1472 /* This is so xgettext sees the translatable formats that are 1473 constructed on the fly. */ 1474 YY_("syntax error, unexpected %s"); 1475 YY_("syntax error, unexpected %s, expecting %s"); 1476 YY_("syntax error, unexpected %s, expecting %s or %s"); 1477 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1478 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1479# endif 1480 char *yyfmt; 1481 char const *yyf; 1482 static char const yyunexpected[] = "syntax error, unexpected %s"; 1483 static char const yyexpecting[] = ", expecting %s"; 1484 static char const yyor[] = " or %s"; 1485 char yyformat[sizeof yyunexpected 1486 + sizeof yyexpecting - 1 1487 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1488 * (sizeof yyor - 1))]; 1489 char const *yyprefix = yyexpecting; 1490 1491 /* Start YYX at -YYN if negative to avoid negative indexes in 1492 YYCHECK. */ 1493 int yyxbegin = yyn < 0 ? -yyn : 0; 1494 1495 /* Stay within bounds of both yycheck and yytname. */ 1496 int yychecklim = YYLAST - yyn + 1; 1497 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1498 int yycount = 1; 1499 1500 yyarg[0] = yytname[yytype]; 1501 yyfmt = yystpcpy (yyformat, yyunexpected); 1502 1503 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1504 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1505 { 1506 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1507 { 1508 yycount = 1; 1509 yysize = yysize0; 1510 yyformat[sizeof yyunexpected - 1] = '\0'; 1511 break; 1512 } 1513 yyarg[yycount++] = yytname[yyx]; 1514 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1515 yysize_overflow |= (yysize1 < yysize); 1516 yysize = yysize1; 1517 yyfmt = yystpcpy (yyfmt, yyprefix); 1518 yyprefix = yyor; 1519 } 1520 1521 yyf = YY_(yyformat); 1522 yysize1 = yysize + yystrlen (yyf); 1523 yysize_overflow |= (yysize1 < yysize); 1524 yysize = yysize1; 1525 1526 if (yysize_overflow) 1527 return YYSIZE_MAXIMUM; 1528 1529 if (yyresult) 1530 { 1531 /* Avoid sprintf, as that infringes on the user's name space. 1532 Don't have undefined behavior even if the translation 1533 produced a string with the wrong number of "%s"s. */ 1534 char *yyp = yyresult; 1535 int yyi = 0; 1536 while ((*yyp = *yyf) != '\0') 1537 { 1538 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1539 { 1540 yyp += yytnamerr (yyp, yyarg[yyi++]); 1541 yyf += 2; 1542 } 1543 else 1544 { 1545 yyp++; 1546 yyf++; 1547 } 1548 } 1549 } 1550 return yysize; 1551 } 1552} 1553#endif /* YYERROR_VERBOSE */ 1554 1555 1556/*-----------------------------------------------. 1557| Release the memory associated to this symbol. | 1558`-----------------------------------------------*/ 1559 1560/*ARGSUSED*/ 1561#if (defined __STDC__ || defined __C99__FUNC__ \ 1562 || defined __cplusplus || defined _MSC_VER) 1563static void 1564yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1565#else 1566static void 1567yydestruct (yymsg, yytype, yyvaluep) 1568 const char *yymsg; 1569 int yytype; 1570 YYSTYPE *yyvaluep; 1571#endif 1572{ 1573 YYUSE (yyvaluep); 1574 1575 if (!yymsg) 1576 yymsg = "Deleting"; 1577 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1578 1579 switch (yytype) 1580 { 1581 1582 default: 1583 break; 1584 } 1585} 1586 1587/* Prevent warnings from -Wmissing-prototypes. */ 1588#ifdef YYPARSE_PARAM 1589#if defined __STDC__ || defined __cplusplus 1590int yyparse (void *YYPARSE_PARAM); 1591#else 1592int yyparse (); 1593#endif 1594#else /* ! YYPARSE_PARAM */ 1595#if defined __STDC__ || defined __cplusplus 1596int yyparse (void); 1597#else 1598int yyparse (); 1599#endif 1600#endif /* ! YYPARSE_PARAM */ 1601 1602 1603/* The lookahead symbol. */ 1604int yychar; 1605 1606/* The semantic value of the lookahead symbol. */ 1607YYSTYPE yylval; 1608 1609/* Number of syntax errors so far. */ 1610int yynerrs; 1611 1612 1613 1614/*-------------------------. 1615| yyparse or yypush_parse. | 1616`-------------------------*/ 1617 1618#ifdef YYPARSE_PARAM 1619#if (defined __STDC__ || defined __C99__FUNC__ \ 1620 || defined __cplusplus || defined _MSC_VER) 1621int 1622yyparse (void *YYPARSE_PARAM) 1623#else 1624int 1625yyparse (YYPARSE_PARAM) 1626 void *YYPARSE_PARAM; 1627#endif 1628#else /* ! YYPARSE_PARAM */ 1629#if (defined __STDC__ || defined __C99__FUNC__ \ 1630 || defined __cplusplus || defined _MSC_VER) 1631int 1632yyparse (void) 1633#else 1634int 1635yyparse () 1636 1637#endif 1638#endif 1639{ 1640 1641 1642 int yystate; 1643 /* Number of tokens to shift before error messages enabled. */ 1644 int yyerrstatus; 1645 1646 /* The stacks and their tools: 1647 `yyss': related to states. 1648 `yyvs': related to semantic values. 1649 1650 Refer to the stacks thru separate pointers, to allow yyoverflow 1651 to reallocate them elsewhere. */ 1652 1653 /* The state stack. */ 1654 yytype_int16 yyssa[YYINITDEPTH]; 1655 yytype_int16 *yyss; 1656 yytype_int16 *yyssp; 1657 1658 /* The semantic value stack. */ 1659 YYSTYPE yyvsa[YYINITDEPTH]; 1660 YYSTYPE *yyvs; 1661 YYSTYPE *yyvsp; 1662 1663 YYSIZE_T yystacksize; 1664 1665 int yyn; 1666 int yyresult; 1667 /* Lookahead token as an internal (translated) token number. */ 1668 int yytoken; 1669 /* The variables used to return semantic value and location from the 1670 action routines. */ 1671 YYSTYPE yyval; 1672 1673#if YYERROR_VERBOSE 1674 /* Buffer for error messages, and its allocated size. */ 1675 char yymsgbuf[128]; 1676 char *yymsg = yymsgbuf; 1677 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 1678#endif 1679 1680#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1681 1682 /* The number of symbols on the RHS of the reduced rule. 1683 Keep to zero when no symbol should be popped. */ 1684 int yylen = 0; 1685 1686 yytoken = 0; 1687 yyss = yyssa; 1688 yyvs = yyvsa; 1689 yystacksize = YYINITDEPTH; 1690 1691 YYDPRINTF ((stderr, "Starting parse\n")); 1692 1693 yystate = 0; 1694 yyerrstatus = 0; 1695 yynerrs = 0; 1696 yychar = YYEMPTY; /* Cause a token to be read. */ 1697 1698 /* Initialize stack pointers. 1699 Waste one element of value and location stack 1700 so that they stay on the same level as the state stack. 1701 The wasted elements are never initialized. */ 1702 yyssp = yyss; 1703 yyvsp = yyvs; 1704 1705 goto yysetstate; 1706 1707/*------------------------------------------------------------. 1708| yynewstate -- Push a new state, which is found in yystate. | 1709`------------------------------------------------------------*/ 1710 yynewstate: 1711 /* In all cases, when you get here, the value and location stacks 1712 have just been pushed. So pushing a state here evens the stacks. */ 1713 yyssp++; 1714 1715 yysetstate: 1716 *yyssp = yystate; 1717 1718 if (yyss + yystacksize - 1 <= yyssp) 1719 { 1720 /* Get the current used size of the three stacks, in elements. */ 1721 YYSIZE_T yysize = yyssp - yyss + 1; 1722 1723#ifdef yyoverflow 1724 { 1725 /* Give user a chance to reallocate the stack. Use copies of 1726 these so that the &'s don't force the real ones into 1727 memory. */ 1728 YYSTYPE *yyvs1 = yyvs; 1729 yytype_int16 *yyss1 = yyss; 1730 1731 /* Each stack pointer address is followed by the size of the 1732 data in use in that stack, in bytes. This used to be a 1733 conditional around just the two extra args, but that might 1734 be undefined if yyoverflow is a macro. */ 1735 yyoverflow (YY_("memory exhausted"), 1736 &yyss1, yysize * sizeof (*yyssp), 1737 &yyvs1, yysize * sizeof (*yyvsp), 1738 &yystacksize); 1739 1740 yyss = yyss1; 1741 yyvs = yyvs1; 1742 } 1743#else /* no yyoverflow */ 1744# ifndef YYSTACK_RELOCATE 1745 goto yyexhaustedlab; 1746# else 1747 /* Extend the stack our own way. */ 1748 if (YYMAXDEPTH <= yystacksize) 1749 goto yyexhaustedlab; 1750 yystacksize *= 2; 1751 if (YYMAXDEPTH < yystacksize) 1752 yystacksize = YYMAXDEPTH; 1753 1754 { 1755 yytype_int16 *yyss1 = yyss; 1756 union yyalloc *yyptr = 1757 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1758 if (! yyptr) 1759 goto yyexhaustedlab; 1760 YYSTACK_RELOCATE (yyss_alloc, yyss); 1761 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1762# undef YYSTACK_RELOCATE 1763 if (yyss1 != yyssa) 1764 YYSTACK_FREE (yyss1); 1765 } 1766# endif 1767#endif /* no yyoverflow */ 1768 1769 yyssp = yyss + yysize - 1; 1770 yyvsp = yyvs + yysize - 1; 1771 1772 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1773 (unsigned long int) yystacksize)); 1774 1775 if (yyss + yystacksize - 1 <= yyssp) 1776 YYABORT; 1777 } 1778 1779 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1780 1781 if (yystate == YYFINAL) 1782 YYACCEPT; 1783 1784 goto yybackup; 1785 1786/*-----------. 1787| yybackup. | 1788`-----------*/ 1789yybackup: 1790 1791 /* Do appropriate processing given the current state. Read a 1792 lookahead token if we need one and don't already have one. */ 1793 1794 /* First try to decide what to do without reference to lookahead token. */ 1795 yyn = yypact[yystate]; 1796 if (yyn == YYPACT_NINF) 1797 goto yydefault; 1798 1799 /* Not known => get a lookahead token if don't already have one. */ 1800 1801 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1802 if (yychar == YYEMPTY) 1803 { 1804 YYDPRINTF ((stderr, "Reading a token: ")); 1805 yychar = YYLEX; 1806 } 1807 1808 if (yychar <= YYEOF) 1809 { 1810 yychar = yytoken = YYEOF; 1811 YYDPRINTF ((stderr, "Now at end of input.\n")); 1812 } 1813 else 1814 { 1815 yytoken = YYTRANSLATE (yychar); 1816 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 1817 } 1818 1819 /* If the proper action on seeing token YYTOKEN is to reduce or to 1820 detect an error, take that action. */ 1821 yyn += yytoken; 1822 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 1823 goto yydefault; 1824 yyn = yytable[yyn]; 1825 if (yyn <= 0) 1826 { 1827 if (yyn == 0 || yyn == YYTABLE_NINF) 1828 goto yyerrlab; 1829 yyn = -yyn; 1830 goto yyreduce; 1831 } 1832 1833 /* Count tokens shifted since error; after three, turn off error 1834 status. */ 1835 if (yyerrstatus) 1836 yyerrstatus--; 1837 1838 /* Shift the lookahead token. */ 1839 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1840 1841 /* Discard the shifted token. */ 1842 yychar = YYEMPTY; 1843 1844 yystate = yyn; 1845 *++yyvsp = yylval; 1846 1847 goto yynewstate; 1848 1849 1850/*-----------------------------------------------------------. 1851| yydefault -- do the default action for the current state. | 1852`-----------------------------------------------------------*/ 1853yydefault: 1854 yyn = yydefact[yystate]; 1855 if (yyn == 0) 1856 goto yyerrlab; 1857 goto yyreduce; 1858 1859 1860/*-----------------------------. 1861| yyreduce -- Do a reduction. | 1862`-----------------------------*/ 1863yyreduce: 1864 /* yyn is the number of a rule to reduce with. */ 1865 yylen = yyr2[yyn]; 1866 1867 /* If YYLEN is nonzero, implement the default value of the action: 1868 `$$ = $1'. 1869 1870 Otherwise, the following line sets YYVAL to garbage. 1871 This behavior is undocumented and Bison 1872 users should not rely upon it. Assigning to YYVAL 1873 unconditionally makes the parser a bit smaller, and it avoids a 1874 GCC warning that YYVAL may be used uninitialized. */ 1875 yyval = yyvsp[1-yylen]; 1876 1877 1878 YY_REDUCE_PRINT (yyn); 1879 switch (yyn) 1880 { 1881 case 2: 1882 1883/* Line 1455 of yacc.c */ 1884#line 169 "xkbparse.y" 1885 { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); } 1886 break; 1887 1888 case 3: 1889 1890/* Line 1455 of yacc.c */ 1891#line 171 "xkbparse.y" 1892 { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); } 1893 break; 1894 1895 case 4: 1896 1897/* Line 1455 of yacc.c */ 1898#line 173 "xkbparse.y" 1899 { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); } 1900 break; 1901 1902 case 5: 1903 1904/* Line 1455 of yacc.c */ 1905#line 177 "xkbparse.y" 1906 { (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); } 1907 break; 1908 1909 case 6: 1910 1911/* Line 1455 of yacc.c */ 1912#line 179 "xkbparse.y" 1913 { (yyval.file)= (yyvsp[(1) - (1)].file); } 1914 break; 1915 1916 case 7: 1917 1918/* Line 1455 of yacc.c */ 1919#line 185 "xkbparse.y" 1920 { (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),&(yyvsp[(5) - (7)].file)->common,(yyvsp[(1) - (7)].uval)); } 1921 break; 1922 1923 case 8: 1924 1925/* Line 1455 of yacc.c */ 1926#line 188 "xkbparse.y" 1927 { (yyval.uval)= XkmKeymapFile; } 1928 break; 1929 1930 case 9: 1931 1932/* Line 1455 of yacc.c */ 1933#line 189 "xkbparse.y" 1934 { (yyval.uval)= XkmSemanticsFile; } 1935 break; 1936 1937 case 10: 1938 1939/* Line 1455 of yacc.c */ 1940#line 190 "xkbparse.y" 1941 { (yyval.uval)= XkmLayoutFile; } 1942 break; 1943 1944 case 11: 1945 1946/* Line 1455 of yacc.c */ 1947#line 194 "xkbparse.y" 1948 { (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); } 1949 break; 1950 1951 case 12: 1952 1953/* Line 1455 of yacc.c */ 1954#line 196 "xkbparse.y" 1955 { (yyval.file)= (yyvsp[(1) - (1)].file); } 1956 break; 1957 1958 case 13: 1959 1960/* Line 1455 of yacc.c */ 1961#line 202 "xkbparse.y" 1962 { (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),(yyvsp[(5) - (7)].any),(yyvsp[(1) - (7)].uval)); } 1963 break; 1964 1965 case 14: 1966 1967/* Line 1455 of yacc.c */ 1968#line 206 "xkbparse.y" 1969 { (yyval.file)= CreateXKBFile((yyvsp[(2) - (4)].uval),(yyvsp[(3) - (4)].str),(yyvsp[(4) - (4)].any),(yyvsp[(1) - (4)].uval)); } 1970 break; 1971 1972 case 15: 1973 1974/* Line 1455 of yacc.c */ 1975#line 210 "xkbparse.y" 1976 { (yyval.uval)= XkmKeyNamesIndex; } 1977 break; 1978 1979 case 16: 1980 1981/* Line 1455 of yacc.c */ 1982#line 211 "xkbparse.y" 1983 { (yyval.uval)= XkmTypesIndex; } 1984 break; 1985 1986 case 17: 1987 1988/* Line 1455 of yacc.c */ 1989#line 212 "xkbparse.y" 1990 { (yyval.uval)= XkmCompatMapIndex; } 1991 break; 1992 1993 case 18: 1994 1995/* Line 1455 of yacc.c */ 1996#line 213 "xkbparse.y" 1997 { (yyval.uval)= XkmSymbolsIndex; } 1998 break; 1999 2000 case 19: 2001 2002/* Line 1455 of yacc.c */ 2003#line 214 "xkbparse.y" 2004 { (yyval.uval)= XkmGeometryIndex; } 2005 break; 2006 2007 case 20: 2008 2009/* Line 1455 of yacc.c */ 2010#line 217 "xkbparse.y" 2011 { (yyval.uval)= (yyvsp[(1) - (1)].uval); } 2012 break; 2013 2014 case 21: 2015 2016/* Line 1455 of yacc.c */ 2017#line 218 "xkbparse.y" 2018 { (yyval.uval)= 0; } 2019 break; 2020 2021 case 22: 2022 2023/* Line 1455 of yacc.c */ 2024#line 221 "xkbparse.y" 2025 { (yyval.uval)= (((yyvsp[(1) - (2)].uval))|((yyvsp[(2) - (2)].uval))); } 2026 break; 2027 2028 case 23: 2029 2030/* Line 1455 of yacc.c */ 2031#line 222 "xkbparse.y" 2032 { (yyval.uval)= (yyvsp[(1) - (1)].uval); } 2033 break; 2034 2035 case 24: 2036 2037/* Line 1455 of yacc.c */ 2038#line 225 "xkbparse.y" 2039 { (yyval.uval)= XkbLC_Partial; } 2040 break; 2041 2042 case 25: 2043 2044/* Line 1455 of yacc.c */ 2045#line 226 "xkbparse.y" 2046 { (yyval.uval)= XkbLC_Default; } 2047 break; 2048 2049 case 26: 2050 2051/* Line 1455 of yacc.c */ 2052#line 227 "xkbparse.y" 2053 { (yyval.uval)= XkbLC_Hidden; } 2054 break; 2055 2056 case 27: 2057 2058/* Line 1455 of yacc.c */ 2059#line 228 "xkbparse.y" 2060 { (yyval.uval)= XkbLC_AlphanumericKeys; } 2061 break; 2062 2063 case 28: 2064 2065/* Line 1455 of yacc.c */ 2066#line 229 "xkbparse.y" 2067 { (yyval.uval)= XkbLC_ModifierKeys; } 2068 break; 2069 2070 case 29: 2071 2072/* Line 1455 of yacc.c */ 2073#line 230 "xkbparse.y" 2074 { (yyval.uval)= XkbLC_KeypadKeys; } 2075 break; 2076 2077 case 30: 2078 2079/* Line 1455 of yacc.c */ 2080#line 231 "xkbparse.y" 2081 { (yyval.uval)= XkbLC_FunctionKeys; } 2082 break; 2083 2084 case 31: 2085 2086/* Line 1455 of yacc.c */ 2087#line 232 "xkbparse.y" 2088 { (yyval.uval)= XkbLC_AlternateGroup; } 2089 break; 2090 2091 case 32: 2092 2093/* Line 1455 of yacc.c */ 2094#line 236 "xkbparse.y" 2095 { (yyval.any)= AppendStmt((yyvsp[(1) - (2)].any),(yyvsp[(2) - (2)].any)); } 2096 break; 2097 2098 case 33: 2099 2100/* Line 1455 of yacc.c */ 2101#line 237 "xkbparse.y" 2102 { (yyval.any)= NULL; } 2103 break; 2104 2105 case 34: 2106 2107/* Line 1455 of yacc.c */ 2108#line 241 "xkbparse.y" 2109 { 2110 (yyvsp[(2) - (2)].var)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].var)->common,(yyvsp[(1) - (2)].uval)); 2111 (yyval.any)= &(yyvsp[(2) - (2)].var)->common; 2112 } 2113 break; 2114 2115 case 35: 2116 2117/* Line 1455 of yacc.c */ 2118#line 246 "xkbparse.y" 2119 { 2120 (yyvsp[(2) - (2)].vmod)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].vmod)->common,(yyvsp[(1) - (2)].uval)); 2121 (yyval.any)= &(yyvsp[(2) - (2)].vmod)->common; 2122 } 2123 break; 2124 2125 case 36: 2126 2127/* Line 1455 of yacc.c */ 2128#line 251 "xkbparse.y" 2129 { 2130 (yyvsp[(2) - (2)].interp)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].interp)->common,(yyvsp[(1) - (2)].uval)); 2131 (yyval.any)= &(yyvsp[(2) - (2)].interp)->common; 2132 } 2133 break; 2134 2135 case 37: 2136 2137/* Line 1455 of yacc.c */ 2138#line 256 "xkbparse.y" 2139 { 2140 (yyvsp[(2) - (2)].keyName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyName)->common,(yyvsp[(1) - (2)].uval)); 2141 (yyval.any)= &(yyvsp[(2) - (2)].keyName)->common; 2142 } 2143 break; 2144 2145 case 38: 2146 2147/* Line 1455 of yacc.c */ 2148#line 261 "xkbparse.y" 2149 { 2150 (yyvsp[(2) - (2)].keyAlias)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyAlias)->common,(yyvsp[(1) - (2)].uval)); 2151 (yyval.any)= &(yyvsp[(2) - (2)].keyAlias)->common; 2152 } 2153 break; 2154 2155 case 39: 2156 2157/* Line 1455 of yacc.c */ 2158#line 266 "xkbparse.y" 2159 { 2160 (yyvsp[(2) - (2)].keyType)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyType)->common,(yyvsp[(1) - (2)].uval)); 2161 (yyval.any)= &(yyvsp[(2) - (2)].keyType)->common; 2162 } 2163 break; 2164 2165 case 40: 2166 2167/* Line 1455 of yacc.c */ 2168#line 271 "xkbparse.y" 2169 { 2170 (yyvsp[(2) - (2)].syms)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].syms)->common,(yyvsp[(1) - (2)].uval)); 2171 (yyval.any)= &(yyvsp[(2) - (2)].syms)->common; 2172 } 2173 break; 2174 2175 case 41: 2176 2177/* Line 1455 of yacc.c */ 2178#line 276 "xkbparse.y" 2179 { 2180 (yyvsp[(2) - (2)].modMask)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].modMask)->common,(yyvsp[(1) - (2)].uval)); 2181 (yyval.any)= &(yyvsp[(2) - (2)].modMask)->common; 2182 } 2183 break; 2184 2185 case 42: 2186 2187/* Line 1455 of yacc.c */ 2188#line 281 "xkbparse.y" 2189 { 2190 (yyvsp[(2) - (2)].groupCompat)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].groupCompat)->common,(yyvsp[(1) - (2)].uval)); 2191 (yyval.any)= &(yyvsp[(2) - (2)].groupCompat)->common; 2192 } 2193 break; 2194 2195 case 43: 2196 2197/* Line 1455 of yacc.c */ 2198#line 286 "xkbparse.y" 2199 { 2200 (yyvsp[(2) - (2)].ledMap)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledMap)->common,(yyvsp[(1) - (2)].uval)); 2201 (yyval.any)= &(yyvsp[(2) - (2)].ledMap)->common; 2202 } 2203 break; 2204 2205 case 44: 2206 2207/* Line 1455 of yacc.c */ 2208#line 291 "xkbparse.y" 2209 { 2210 (yyvsp[(2) - (2)].ledName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledName)->common,(yyvsp[(1) - (2)].uval)); 2211 (yyval.any)= &(yyvsp[(2) - (2)].ledName)->common; 2212 } 2213 break; 2214 2215 case 45: 2216 2217/* Line 1455 of yacc.c */ 2218#line 296 "xkbparse.y" 2219 { 2220 (yyvsp[(2) - (2)].shape)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].shape)->common,(yyvsp[(1) - (2)].uval)); 2221 (yyval.any)= &(yyvsp[(2) - (2)].shape)->common; 2222 } 2223 break; 2224 2225 case 46: 2226 2227/* Line 1455 of yacc.c */ 2228#line 301 "xkbparse.y" 2229 { 2230 (yyvsp[(2) - (2)].section)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].section)->common,(yyvsp[(1) - (2)].uval)); 2231 (yyval.any)= &(yyvsp[(2) - (2)].section)->common; 2232 } 2233 break; 2234 2235 case 47: 2236 2237/* Line 1455 of yacc.c */ 2238#line 306 "xkbparse.y" 2239 { 2240 (yyvsp[(2) - (2)].doodad)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].doodad)->common,(yyvsp[(1) - (2)].uval)); 2241 (yyval.any)= &(yyvsp[(2) - (2)].doodad)->common; 2242 } 2243 break; 2244 2245 case 48: 2246 2247/* Line 1455 of yacc.c */ 2248#line 311 "xkbparse.y" 2249 { 2250 if ((yyvsp[(1) - (2)].uval)==MergeAltForm) { 2251 yyerror("cannot use 'alternate' to include other maps"); 2252 (yyval.any)= &IncludeCreate(scanBuf,MergeDefault)->common; 2253 } 2254 else { 2255 (yyval.any)= &IncludeCreate(scanBuf,(yyvsp[(1) - (2)].uval))->common; 2256 } 2257 } 2258 break; 2259 2260 case 49: 2261 2262/* Line 1455 of yacc.c */ 2263#line 323 "xkbparse.y" 2264 { (yyval.var)= VarCreate((yyvsp[(1) - (4)].expr),(yyvsp[(3) - (4)].expr)); } 2265 break; 2266 2267 case 50: 2268 2269/* Line 1455 of yacc.c */ 2270#line 325 "xkbparse.y" 2271 { (yyval.var)= BoolVarCreate((yyvsp[(1) - (2)].sval),1); } 2272 break; 2273 2274 case 51: 2275 2276/* Line 1455 of yacc.c */ 2277#line 327 "xkbparse.y" 2278 { (yyval.var)= BoolVarCreate((yyvsp[(2) - (3)].sval),0); } 2279 break; 2280 2281 case 52: 2282 2283/* Line 1455 of yacc.c */ 2284#line 331 "xkbparse.y" 2285 { 2286 KeycodeDef *def; 2287 2288 def= KeycodeCreate((yyvsp[(1) - (4)].str),(yyvsp[(3) - (4)].expr)); 2289 if ((yyvsp[(1) - (4)].str)) 2290 free((yyvsp[(1) - (4)].str)); 2291 (yyval.keyName)= def; 2292 } 2293 break; 2294 2295 case 53: 2296 2297/* Line 1455 of yacc.c */ 2298#line 342 "xkbparse.y" 2299 { 2300 KeyAliasDef *def; 2301 def= KeyAliasCreate((yyvsp[(2) - (5)].str),(yyvsp[(4) - (5)].str)); 2302 if ((yyvsp[(2) - (5)].str)) free((yyvsp[(2) - (5)].str)); 2303 if ((yyvsp[(4) - (5)].str)) free((yyvsp[(4) - (5)].str)); 2304 (yyval.keyAlias)= def; 2305 } 2306 break; 2307 2308 case 54: 2309 2310/* Line 1455 of yacc.c */ 2311#line 352 "xkbparse.y" 2312 { (yyval.vmod)= (yyvsp[(2) - (3)].vmod); } 2313 break; 2314 2315 case 55: 2316 2317/* Line 1455 of yacc.c */ 2318#line 356 "xkbparse.y" 2319 { (yyval.vmod)= (VModDef *)AppendStmt(&(yyvsp[(1) - (3)].vmod)->common,&(yyvsp[(3) - (3)].vmod)->common); } 2320 break; 2321 2322 case 56: 2323 2324/* Line 1455 of yacc.c */ 2325#line 358 "xkbparse.y" 2326 { (yyval.vmod)= (yyvsp[(1) - (1)].vmod); } 2327 break; 2328 2329 case 57: 2330 2331/* Line 1455 of yacc.c */ 2332#line 362 "xkbparse.y" 2333 { (yyval.vmod)= VModCreate((yyvsp[(1) - (1)].sval),NULL); } 2334 break; 2335 2336 case 58: 2337 2338/* Line 1455 of yacc.c */ 2339#line 364 "xkbparse.y" 2340 { (yyval.vmod)= VModCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); } 2341 break; 2342 2343 case 59: 2344 2345/* Line 1455 of yacc.c */ 2346#line 370 "xkbparse.y" 2347 { 2348 (yyvsp[(2) - (6)].interp)->def= (yyvsp[(4) - (6)].var); 2349 (yyval.interp)= (yyvsp[(2) - (6)].interp); 2350 } 2351 break; 2352 2353 case 60: 2354 2355/* Line 1455 of yacc.c */ 2356#line 377 "xkbparse.y" 2357 { (yyval.interp)= InterpCreate((yyvsp[(1) - (3)].str), (yyvsp[(3) - (3)].expr)); } 2358 break; 2359 2360 case 61: 2361 2362/* Line 1455 of yacc.c */ 2363#line 379 "xkbparse.y" 2364 { (yyval.interp)= InterpCreate((yyvsp[(1) - (1)].str), NULL); } 2365 break; 2366 2367 case 62: 2368 2369/* Line 1455 of yacc.c */ 2370#line 383 "xkbparse.y" 2371 { (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (2)].var)->common,&(yyvsp[(2) - (2)].var)->common); } 2372 break; 2373 2374 case 63: 2375 2376/* Line 1455 of yacc.c */ 2377#line 385 "xkbparse.y" 2378 { (yyval.var)= (yyvsp[(1) - (1)].var); } 2379 break; 2380 2381 case 64: 2382 2383/* Line 1455 of yacc.c */ 2384#line 391 "xkbparse.y" 2385 { (yyval.keyType)= KeyTypeCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); } 2386 break; 2387 2388 case 65: 2389 2390/* Line 1455 of yacc.c */ 2391#line 397 "xkbparse.y" 2392 { (yyval.syms)= SymbolsCreate((yyvsp[(2) - (6)].str),(ExprDef *)(yyvsp[(4) - (6)].var)); } 2393 break; 2394 2395 case 66: 2396 2397/* Line 1455 of yacc.c */ 2398#line 401 "xkbparse.y" 2399 { (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (3)].var)->common,&(yyvsp[(3) - (3)].var)->common); } 2400 break; 2401 2402 case 67: 2403 2404/* Line 1455 of yacc.c */ 2405#line 403 "xkbparse.y" 2406 { (yyval.var)= (yyvsp[(1) - (1)].var); } 2407 break; 2408 2409 case 68: 2410 2411/* Line 1455 of yacc.c */ 2412#line 404 "xkbparse.y" 2413 { (yyval.var)= NULL; } 2414 break; 2415 2416 case 69: 2417 2418/* Line 1455 of yacc.c */ 2419#line 408 "xkbparse.y" 2420 { (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2421 break; 2422 2423 case 70: 2424 2425/* Line 1455 of yacc.c */ 2426#line 410 "xkbparse.y" 2427 { (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2428 break; 2429 2430 case 71: 2431 2432/* Line 1455 of yacc.c */ 2433#line 412 "xkbparse.y" 2434 { (yyval.var)= BoolVarCreate((yyvsp[(1) - (1)].sval),1); } 2435 break; 2436 2437 case 72: 2438 2439/* Line 1455 of yacc.c */ 2440#line 414 "xkbparse.y" 2441 { (yyval.var)= BoolVarCreate((yyvsp[(2) - (2)].sval),0); } 2442 break; 2443 2444 case 73: 2445 2446/* Line 1455 of yacc.c */ 2447#line 416 "xkbparse.y" 2448 { (yyval.var)= VarCreate(NULL,(yyvsp[(1) - (1)].expr)); } 2449 break; 2450 2451 case 74: 2452 2453/* Line 1455 of yacc.c */ 2454#line 420 "xkbparse.y" 2455 { (yyval.expr)= (yyvsp[(2) - (3)].expr); } 2456 break; 2457 2458 case 75: 2459 2460/* Line 1455 of yacc.c */ 2461#line 422 "xkbparse.y" 2462 { (yyval.expr)= ExprCreateUnary(ExprActionList,TypeAction,(yyvsp[(2) - (3)].expr)); } 2463 break; 2464 2465 case 76: 2466 2467/* Line 1455 of yacc.c */ 2468#line 426 "xkbparse.y" 2469 { (yyval.groupCompat)= GroupCompatCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr)); } 2470 break; 2471 2472 case 77: 2473 2474/* Line 1455 of yacc.c */ 2475#line 430 "xkbparse.y" 2476 { (yyval.modMask)= ModMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].expr)); } 2477 break; 2478 2479 case 78: 2480 2481/* Line 1455 of yacc.c */ 2482#line 434 "xkbparse.y" 2483 { (yyval.ledMap)= IndicatorMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); } 2484 break; 2485 2486 case 79: 2487 2488/* Line 1455 of yacc.c */ 2489#line 438 "xkbparse.y" 2490 { (yyval.ledName)= IndicatorNameCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr),False); } 2491 break; 2492 2493 case 80: 2494 2495/* Line 1455 of yacc.c */ 2496#line 440 "xkbparse.y" 2497 { (yyval.ledName)= IndicatorNameCreate((yyvsp[(3) - (6)].ival),(yyvsp[(5) - (6)].expr),True); } 2498 break; 2499 2500 case 81: 2501 2502/* Line 1455 of yacc.c */ 2503#line 444 "xkbparse.y" 2504 { (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),(OutlineDef *)&(yyvsp[(4) - (6)].outline)->common); } 2505 break; 2506 2507 case 82: 2508 2509/* Line 1455 of yacc.c */ 2510#line 446 "xkbparse.y" 2511 { 2512 OutlineDef *outlines; 2513 outlines= OutlineCreate(None,(yyvsp[(4) - (6)].expr)); 2514 (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),outlines); 2515 } 2516 break; 2517 2518 case 83: 2519 2520/* Line 1455 of yacc.c */ 2521#line 454 "xkbparse.y" 2522 { (yyval.section)= SectionDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].row)); } 2523 break; 2524 2525 case 84: 2526 2527/* Line 1455 of yacc.c */ 2528#line 458 "xkbparse.y" 2529 { (yyval.row)=(RowDef *)AppendStmt(&(yyvsp[(1) - (2)].row)->common,&(yyvsp[(2) - (2)].row)->common);} 2530 break; 2531 2532 case 85: 2533 2534/* Line 1455 of yacc.c */ 2535#line 460 "xkbparse.y" 2536 { (yyval.row)= (yyvsp[(1) - (1)].row); } 2537 break; 2538 2539 case 86: 2540 2541/* Line 1455 of yacc.c */ 2542#line 464 "xkbparse.y" 2543 { (yyval.row)= RowDeclCreate((yyvsp[(3) - (5)].key)); } 2544 break; 2545 2546 case 87: 2547 2548/* Line 1455 of yacc.c */ 2549#line 466 "xkbparse.y" 2550 { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].var); } 2551 break; 2552 2553 case 88: 2554 2555/* Line 1455 of yacc.c */ 2556#line 468 "xkbparse.y" 2557 { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].doodad); } 2558 break; 2559 2560 case 89: 2561 2562/* Line 1455 of yacc.c */ 2563#line 470 "xkbparse.y" 2564 { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].ledMap); } 2565 break; 2566 2567 case 90: 2568 2569/* Line 1455 of yacc.c */ 2570#line 472 "xkbparse.y" 2571 { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].overlay); } 2572 break; 2573 2574 case 91: 2575 2576/* Line 1455 of yacc.c */ 2577#line 476 "xkbparse.y" 2578 { (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (2)].key)->common,&(yyvsp[(2) - (2)].key)->common);} 2579 break; 2580 2581 case 92: 2582 2583/* Line 1455 of yacc.c */ 2584#line 478 "xkbparse.y" 2585 { (yyval.key)= (yyvsp[(1) - (1)].key); } 2586 break; 2587 2588 case 93: 2589 2590/* Line 1455 of yacc.c */ 2591#line 482 "xkbparse.y" 2592 { (yyval.key)= (yyvsp[(3) - (5)].key); } 2593 break; 2594 2595 case 94: 2596 2597/* Line 1455 of yacc.c */ 2598#line 484 "xkbparse.y" 2599 { (yyval.key)= (KeyDef *)(yyvsp[(1) - (1)].var); } 2600 break; 2601 2602 case 95: 2603 2604/* Line 1455 of yacc.c */ 2605#line 488 "xkbparse.y" 2606 { (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (3)].key)->common,&(yyvsp[(3) - (3)].key)->common);} 2607 break; 2608 2609 case 96: 2610 2611/* Line 1455 of yacc.c */ 2612#line 490 "xkbparse.y" 2613 { (yyval.key)= (yyvsp[(1) - (1)].key); } 2614 break; 2615 2616 case 97: 2617 2618/* Line 1455 of yacc.c */ 2619#line 494 "xkbparse.y" 2620 { (yyval.key)= KeyDeclCreate((yyvsp[(1) - (1)].str),NULL); } 2621 break; 2622 2623 case 98: 2624 2625/* Line 1455 of yacc.c */ 2626#line 496 "xkbparse.y" 2627 { (yyval.key)= KeyDeclCreate(NULL,(yyvsp[(2) - (3)].expr)); } 2628 break; 2629 2630 case 99: 2631 2632/* Line 1455 of yacc.c */ 2633#line 500 "xkbparse.y" 2634 { (yyval.overlay)= OverlayDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].olKey)); } 2635 break; 2636 2637 case 100: 2638 2639/* Line 1455 of yacc.c */ 2640#line 504 "xkbparse.y" 2641 { 2642 (yyval.olKey)= (OverlayKeyDef *) 2643 AppendStmt(&(yyvsp[(1) - (3)].olKey)->common,&(yyvsp[(3) - (3)].olKey)->common); 2644 } 2645 break; 2646 2647 case 101: 2648 2649/* Line 1455 of yacc.c */ 2650#line 509 "xkbparse.y" 2651 { (yyval.olKey)= (yyvsp[(1) - (1)].olKey); } 2652 break; 2653 2654 case 102: 2655 2656/* Line 1455 of yacc.c */ 2657#line 513 "xkbparse.y" 2658 { (yyval.olKey)= OverlayKeyCreate((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); } 2659 break; 2660 2661 case 103: 2662 2663/* Line 1455 of yacc.c */ 2664#line 517 "xkbparse.y" 2665 { (yyval.outline)=(OutlineDef *)AppendStmt(&(yyvsp[(1) - (3)].outline)->common,&(yyvsp[(3) - (3)].outline)->common);} 2666 break; 2667 2668 case 104: 2669 2670/* Line 1455 of yacc.c */ 2671#line 519 "xkbparse.y" 2672 { (yyval.outline)= (yyvsp[(1) - (1)].outline); } 2673 break; 2674 2675 case 105: 2676 2677/* Line 1455 of yacc.c */ 2678#line 523 "xkbparse.y" 2679 { (yyval.outline)= OutlineCreate(None,(yyvsp[(2) - (3)].expr)); } 2680 break; 2681 2682 case 106: 2683 2684/* Line 1455 of yacc.c */ 2685#line 525 "xkbparse.y" 2686 { (yyval.outline)= OutlineCreate((yyvsp[(1) - (5)].sval),(yyvsp[(4) - (5)].expr)); } 2687 break; 2688 2689 case 107: 2690 2691/* Line 1455 of yacc.c */ 2692#line 527 "xkbparse.y" 2693 { (yyval.outline)= OutlineCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); } 2694 break; 2695 2696 case 108: 2697 2698/* Line 1455 of yacc.c */ 2699#line 531 "xkbparse.y" 2700 { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); } 2701 break; 2702 2703 case 109: 2704 2705/* Line 1455 of yacc.c */ 2706#line 533 "xkbparse.y" 2707 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 2708 break; 2709 2710 case 110: 2711 2712/* Line 1455 of yacc.c */ 2713#line 537 "xkbparse.y" 2714 { 2715 ExprDef *expr; 2716 expr= ExprCreate(ExprCoord,TypeUnknown); 2717 expr->value.coord.x= (yyvsp[(2) - (5)].ival); 2718 expr->value.coord.y= (yyvsp[(4) - (5)].ival); 2719 (yyval.expr)= expr; 2720 } 2721 break; 2722 2723 case 111: 2724 2725/* Line 1455 of yacc.c */ 2726#line 547 "xkbparse.y" 2727 { (yyval.doodad)= DoodadCreate((yyvsp[(1) - (6)].uval),(yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); } 2728 break; 2729 2730 case 112: 2731 2732/* Line 1455 of yacc.c */ 2733#line 550 "xkbparse.y" 2734 { (yyval.uval)= XkbTextDoodad; } 2735 break; 2736 2737 case 113: 2738 2739/* Line 1455 of yacc.c */ 2740#line 551 "xkbparse.y" 2741 { (yyval.uval)= XkbOutlineDoodad; } 2742 break; 2743 2744 case 114: 2745 2746/* Line 1455 of yacc.c */ 2747#line 552 "xkbparse.y" 2748 { (yyval.uval)= XkbSolidDoodad; } 2749 break; 2750 2751 case 115: 2752 2753/* Line 1455 of yacc.c */ 2754#line 553 "xkbparse.y" 2755 { (yyval.uval)= XkbLogoDoodad; } 2756 break; 2757 2758 case 116: 2759 2760/* Line 1455 of yacc.c */ 2761#line 556 "xkbparse.y" 2762 { (yyval.sval)= (yyvsp[(1) - (1)].sval); } 2763 break; 2764 2765 case 117: 2766 2767/* Line 1455 of yacc.c */ 2768#line 557 "xkbparse.y" 2769 { (yyval.sval)= (yyvsp[(1) - (1)].sval); } 2770 break; 2771 2772 case 118: 2773 2774/* Line 1455 of yacc.c */ 2775#line 561 "xkbparse.y" 2776 { (yyval.sval)= XkbInternAtom(NULL,"action",False); } 2777 break; 2778 2779 case 119: 2780 2781/* Line 1455 of yacc.c */ 2782#line 563 "xkbparse.y" 2783 { (yyval.sval)= XkbInternAtom(NULL,"interpret",False); } 2784 break; 2785 2786 case 120: 2787 2788/* Line 1455 of yacc.c */ 2789#line 565 "xkbparse.y" 2790 { (yyval.sval)= XkbInternAtom(NULL,"type",False); } 2791 break; 2792 2793 case 121: 2794 2795/* Line 1455 of yacc.c */ 2796#line 567 "xkbparse.y" 2797 { (yyval.sval)= XkbInternAtom(NULL,"key",False); } 2798 break; 2799 2800 case 122: 2801 2802/* Line 1455 of yacc.c */ 2803#line 569 "xkbparse.y" 2804 { (yyval.sval)= XkbInternAtom(NULL,"group",False); } 2805 break; 2806 2807 case 123: 2808 2809/* Line 1455 of yacc.c */ 2810#line 571 "xkbparse.y" 2811 {(yyval.sval)=XkbInternAtom(NULL,"modifier_map",False);} 2812 break; 2813 2814 case 124: 2815 2816/* Line 1455 of yacc.c */ 2817#line 573 "xkbparse.y" 2818 { (yyval.sval)= XkbInternAtom(NULL,"indicator",False); } 2819 break; 2820 2821 case 125: 2822 2823/* Line 1455 of yacc.c */ 2824#line 575 "xkbparse.y" 2825 { (yyval.sval)= XkbInternAtom(NULL,"shape",False); } 2826 break; 2827 2828 case 126: 2829 2830/* Line 1455 of yacc.c */ 2831#line 577 "xkbparse.y" 2832 { (yyval.sval)= XkbInternAtom(NULL,"row",False); } 2833 break; 2834 2835 case 127: 2836 2837/* Line 1455 of yacc.c */ 2838#line 579 "xkbparse.y" 2839 { (yyval.sval)= XkbInternAtom(NULL,"section",False); } 2840 break; 2841 2842 case 128: 2843 2844/* Line 1455 of yacc.c */ 2845#line 581 "xkbparse.y" 2846 { (yyval.sval)= XkbInternAtom(NULL,"text",False); } 2847 break; 2848 2849 case 129: 2850 2851/* Line 1455 of yacc.c */ 2852#line 584 "xkbparse.y" 2853 { (yyval.uval)= (yyvsp[(1) - (1)].uval); } 2854 break; 2855 2856 case 130: 2857 2858/* Line 1455 of yacc.c */ 2859#line 585 "xkbparse.y" 2860 { (yyval.uval)= MergeDefault; } 2861 break; 2862 2863 case 131: 2864 2865/* Line 1455 of yacc.c */ 2866#line 588 "xkbparse.y" 2867 { (yyval.uval)= MergeDefault; } 2868 break; 2869 2870 case 132: 2871 2872/* Line 1455 of yacc.c */ 2873#line 589 "xkbparse.y" 2874 { (yyval.uval)= MergeAugment; } 2875 break; 2876 2877 case 133: 2878 2879/* Line 1455 of yacc.c */ 2880#line 590 "xkbparse.y" 2881 { (yyval.uval)= MergeOverride; } 2882 break; 2883 2884 case 134: 2885 2886/* Line 1455 of yacc.c */ 2887#line 591 "xkbparse.y" 2888 { (yyval.uval)= MergeReplace; } 2889 break; 2890 2891 case 135: 2892 2893/* Line 1455 of yacc.c */ 2894#line 592 "xkbparse.y" 2895 { (yyval.uval)= MergeAltForm; } 2896 break; 2897 2898 case 136: 2899 2900/* Line 1455 of yacc.c */ 2901#line 595 "xkbparse.y" 2902 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 2903 break; 2904 2905 case 137: 2906 2907/* Line 1455 of yacc.c */ 2908#line 596 "xkbparse.y" 2909 { (yyval.expr)= NULL; } 2910 break; 2911 2912 case 138: 2913 2914/* Line 1455 of yacc.c */ 2915#line 600 "xkbparse.y" 2916 { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); } 2917 break; 2918 2919 case 139: 2920 2921/* Line 1455 of yacc.c */ 2922#line 602 "xkbparse.y" 2923 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 2924 break; 2925 2926 case 140: 2927 2928/* Line 1455 of yacc.c */ 2929#line 606 "xkbparse.y" 2930 { (yyval.expr)= ExprCreateBinary(OpDivide,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2931 break; 2932 2933 case 141: 2934 2935/* Line 1455 of yacc.c */ 2936#line 608 "xkbparse.y" 2937 { (yyval.expr)= ExprCreateBinary(OpAdd,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2938 break; 2939 2940 case 142: 2941 2942/* Line 1455 of yacc.c */ 2943#line 610 "xkbparse.y" 2944 { (yyval.expr)= ExprCreateBinary(OpSubtract,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2945 break; 2946 2947 case 143: 2948 2949/* Line 1455 of yacc.c */ 2950#line 612 "xkbparse.y" 2951 { (yyval.expr)= ExprCreateBinary(OpMultiply,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2952 break; 2953 2954 case 144: 2955 2956/* Line 1455 of yacc.c */ 2957#line 614 "xkbparse.y" 2958 { (yyval.expr)= ExprCreateBinary(OpAssign,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); } 2959 break; 2960 2961 case 145: 2962 2963/* Line 1455 of yacc.c */ 2964#line 616 "xkbparse.y" 2965 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 2966 break; 2967 2968 case 146: 2969 2970/* Line 1455 of yacc.c */ 2971#line 620 "xkbparse.y" 2972 { (yyval.expr)= ExprCreateUnary(OpNegate,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); } 2973 break; 2974 2975 case 147: 2976 2977/* Line 1455 of yacc.c */ 2978#line 622 "xkbparse.y" 2979 { (yyval.expr)= ExprCreateUnary(OpUnaryPlus,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); } 2980 break; 2981 2982 case 148: 2983 2984/* Line 1455 of yacc.c */ 2985#line 624 "xkbparse.y" 2986 { (yyval.expr)= ExprCreateUnary(OpNot,TypeBoolean,(yyvsp[(2) - (2)].expr)); } 2987 break; 2988 2989 case 149: 2990 2991/* Line 1455 of yacc.c */ 2992#line 626 "xkbparse.y" 2993 { (yyval.expr)= ExprCreateUnary(OpInvert,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); } 2994 break; 2995 2996 case 150: 2997 2998/* Line 1455 of yacc.c */ 2999#line 628 "xkbparse.y" 3000 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 3001 break; 3002 3003 case 151: 3004 3005/* Line 1455 of yacc.c */ 3006#line 630 "xkbparse.y" 3007 { (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); } 3008 break; 3009 3010 case 152: 3011 3012/* Line 1455 of yacc.c */ 3013#line 632 "xkbparse.y" 3014 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 3015 break; 3016 3017 case 153: 3018 3019/* Line 1455 of yacc.c */ 3020#line 634 "xkbparse.y" 3021 { (yyval.expr)= (yyvsp[(2) - (3)].expr); } 3022 break; 3023 3024 case 154: 3025 3026/* Line 1455 of yacc.c */ 3027#line 638 "xkbparse.y" 3028 { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); } 3029 break; 3030 3031 case 155: 3032 3033/* Line 1455 of yacc.c */ 3034#line 640 "xkbparse.y" 3035 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 3036 break; 3037 3038 case 156: 3039 3040/* Line 1455 of yacc.c */ 3041#line 644 "xkbparse.y" 3042 { (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); } 3043 break; 3044 3045 case 157: 3046 3047/* Line 1455 of yacc.c */ 3048#line 648 "xkbparse.y" 3049 { 3050 ExprDef *expr; 3051 expr= ExprCreate(ExprIdent,TypeUnknown); 3052 expr->value.str= (yyvsp[(1) - (1)].sval); 3053 (yyval.expr)= expr; 3054 } 3055 break; 3056 3057 case 158: 3058 3059/* Line 1455 of yacc.c */ 3060#line 655 "xkbparse.y" 3061 { 3062 ExprDef *expr; 3063 expr= ExprCreate(ExprFieldRef,TypeUnknown); 3064 expr->value.field.element= (yyvsp[(1) - (3)].sval); 3065 expr->value.field.field= (yyvsp[(3) - (3)].sval); 3066 (yyval.expr)= expr; 3067 } 3068 break; 3069 3070 case 159: 3071 3072/* Line 1455 of yacc.c */ 3073#line 663 "xkbparse.y" 3074 { 3075 ExprDef *expr; 3076 expr= ExprCreate(ExprArrayRef,TypeUnknown); 3077 expr->value.array.element= None; 3078 expr->value.array.field= (yyvsp[(1) - (4)].sval); 3079 expr->value.array.entry= (yyvsp[(3) - (4)].expr); 3080 (yyval.expr)= expr; 3081 } 3082 break; 3083 3084 case 160: 3085 3086/* Line 1455 of yacc.c */ 3087#line 672 "xkbparse.y" 3088 { 3089 ExprDef *expr; 3090 expr= ExprCreate(ExprArrayRef,TypeUnknown); 3091 expr->value.array.element= (yyvsp[(1) - (6)].sval); 3092 expr->value.array.field= (yyvsp[(3) - (6)].sval); 3093 expr->value.array.entry= (yyvsp[(5) - (6)].expr); 3094 (yyval.expr)= expr; 3095 } 3096 break; 3097 3098 case 161: 3099 3100/* Line 1455 of yacc.c */ 3101#line 683 "xkbparse.y" 3102 { 3103 ExprDef *expr; 3104 expr= ExprCreate(ExprValue,TypeString); 3105 expr->value.str= (yyvsp[(1) - (1)].sval); 3106 (yyval.expr)= expr; 3107 } 3108 break; 3109 3110 case 162: 3111 3112/* Line 1455 of yacc.c */ 3113#line 690 "xkbparse.y" 3114 { 3115 ExprDef *expr; 3116 expr= ExprCreate(ExprValue,TypeInt); 3117 expr->value.ival= (yyvsp[(1) - (1)].ival); 3118 (yyval.expr)= expr; 3119 } 3120 break; 3121 3122 case 163: 3123 3124/* Line 1455 of yacc.c */ 3125#line 697 "xkbparse.y" 3126 { 3127 ExprDef *expr; 3128 expr= ExprCreate(ExprValue,TypeFloat); 3129 expr->value.ival= (yyvsp[(1) - (1)].ival); 3130 (yyval.expr)= expr; 3131 } 3132 break; 3133 3134 case 164: 3135 3136/* Line 1455 of yacc.c */ 3137#line 704 "xkbparse.y" 3138 { 3139 ExprDef *expr; 3140 expr= ExprCreate(ExprValue,TypeKeyName); 3141 memset(expr->value.keyName,0,5); 3142 strncpy(expr->value.keyName,(yyvsp[(1) - (1)].str),4); 3143 free((yyvsp[(1) - (1)].str)); 3144 (yyval.expr)= expr; 3145 } 3146 break; 3147 3148 case 165: 3149 3150/* Line 1455 of yacc.c */ 3151#line 714 "xkbparse.y" 3152 { (yyval.expr)= (yyvsp[(1) - (1)].expr); } 3153 break; 3154 3155 case 166: 3156 3157/* Line 1455 of yacc.c */ 3158#line 715 "xkbparse.y" 3159 { (yyval.expr)= NULL; } 3160 break; 3161 3162 case 167: 3163 3164/* Line 1455 of yacc.c */ 3165#line 719 "xkbparse.y" 3166 { (yyval.expr)= AppendKeysymList((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].str)); } 3167 break; 3168 3169 case 168: 3170 3171/* Line 1455 of yacc.c */ 3172#line 721 "xkbparse.y" 3173 { (yyval.expr)= CreateKeysymList((yyvsp[(1) - (1)].str)); } 3174 break; 3175 3176 case 169: 3177 3178/* Line 1455 of yacc.c */ 3179#line 724 "xkbparse.y" 3180 { (yyval.str)= strdup(scanBuf); } 3181 break; 3182 3183 case 170: 3184 3185/* Line 1455 of yacc.c */ 3186#line 725 "xkbparse.y" 3187 { (yyval.str)= strdup("section"); } 3188 break; 3189 3190 case 171: 3191 3192/* Line 1455 of yacc.c */ 3193#line 727 "xkbparse.y" 3194 { 3195 if ((yyvsp[(1) - (1)].ival)<10) { (yyval.str)= malloc(2); (yyval.str)[0]= '0' + (yyvsp[(1) - (1)].ival); (yyval.str)[1]= '\0'; } 3196 else { (yyval.str)= malloc(19); snprintf((yyval.str), 19, "0x%x", (yyvsp[(1) - (1)].ival)); } 3197 } 3198 break; 3199 3200 case 172: 3201 3202/* Line 1455 of yacc.c */ 3203#line 733 "xkbparse.y" 3204 { (yyval.ival)= -(yyvsp[(2) - (2)].ival); } 3205 break; 3206 3207 case 173: 3208 3209/* Line 1455 of yacc.c */ 3210#line 734 "xkbparse.y" 3211 { (yyval.ival)= (yyvsp[(1) - (1)].ival); } 3212 break; 3213 3214 case 174: 3215 3216/* Line 1455 of yacc.c */ 3217#line 737 "xkbparse.y" 3218 { (yyval.ival)= scanInt; } 3219 break; 3220 3221 case 175: 3222 3223/* Line 1455 of yacc.c */ 3224#line 738 "xkbparse.y" 3225 { (yyval.ival)= scanInt*XkbGeomPtsPerMM; } 3226 break; 3227 3228 case 176: 3229 3230/* Line 1455 of yacc.c */ 3231#line 741 "xkbparse.y" 3232 { (yyval.ival)= scanInt; } 3233 break; 3234 3235 case 177: 3236 3237/* Line 1455 of yacc.c */ 3238#line 744 "xkbparse.y" 3239 { (yyval.ival)= scanInt; } 3240 break; 3241 3242 case 178: 3243 3244/* Line 1455 of yacc.c */ 3245#line 747 "xkbparse.y" 3246 { (yyval.str)= strdup(scanBuf); } 3247 break; 3248 3249 case 179: 3250 3251/* Line 1455 of yacc.c */ 3252#line 750 "xkbparse.y" 3253 { (yyval.sval)= XkbInternAtom(NULL,scanBuf,False); } 3254 break; 3255 3256 case 180: 3257 3258/* Line 1455 of yacc.c */ 3259#line 751 "xkbparse.y" 3260 { (yyval.sval)= XkbInternAtom(NULL,"default",False); } 3261 break; 3262 3263 case 181: 3264 3265/* Line 1455 of yacc.c */ 3266#line 754 "xkbparse.y" 3267 { (yyval.sval)= XkbInternAtom(NULL,scanBuf,False); } 3268 break; 3269 3270 case 182: 3271 3272/* Line 1455 of yacc.c */ 3273#line 757 "xkbparse.y" 3274 { (yyval.str)= (yyvsp[(1) - (1)].str); } 3275 break; 3276 3277 case 183: 3278 3279/* Line 1455 of yacc.c */ 3280#line 758 "xkbparse.y" 3281 { (yyval.str)= NULL; } 3282 break; 3283 3284 case 184: 3285 3286/* Line 1455 of yacc.c */ 3287#line 761 "xkbparse.y" 3288 { (yyval.str)= strdup(scanBuf); } 3289 break; 3290 3291 3292 3293/* Line 1455 of yacc.c */ 3294#line 3295 "xkbparse.c" 3295 default: break; 3296 } 3297 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 3298 3299 YYPOPSTACK (yylen); 3300 yylen = 0; 3301 YY_STACK_PRINT (yyss, yyssp); 3302 3303 *++yyvsp = yyval; 3304 3305 /* Now `shift' the result of the reduction. Determine what state 3306 that goes to, based on the state we popped back to and the rule 3307 number reduced by. */ 3308 3309 yyn = yyr1[yyn]; 3310 3311 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 3312 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 3313 yystate = yytable[yystate]; 3314 else 3315 yystate = yydefgoto[yyn - YYNTOKENS]; 3316 3317 goto yynewstate; 3318 3319 3320/*------------------------------------. 3321| yyerrlab -- here on detecting error | 3322`------------------------------------*/ 3323yyerrlab: 3324 /* If not already recovering from an error, report this error. */ 3325 if (!yyerrstatus) 3326 { 3327 ++yynerrs; 3328#if ! YYERROR_VERBOSE 3329 yyerror (YY_("syntax error")); 3330#else 3331 { 3332 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 3333 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 3334 { 3335 YYSIZE_T yyalloc = 2 * yysize; 3336 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 3337 yyalloc = YYSTACK_ALLOC_MAXIMUM; 3338 if (yymsg != yymsgbuf) 3339 YYSTACK_FREE (yymsg); 3340 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 3341 if (yymsg) 3342 yymsg_alloc = yyalloc; 3343 else 3344 { 3345 yymsg = yymsgbuf; 3346 yymsg_alloc = sizeof yymsgbuf; 3347 } 3348 } 3349 3350 if (0 < yysize && yysize <= yymsg_alloc) 3351 { 3352 (void) yysyntax_error (yymsg, yystate, yychar); 3353 yyerror (yymsg); 3354 } 3355 else 3356 { 3357 yyerror (YY_("syntax error")); 3358 if (yysize != 0) 3359 goto yyexhaustedlab; 3360 } 3361 } 3362#endif 3363 } 3364 3365 3366 3367 if (yyerrstatus == 3) 3368 { 3369 /* If just tried and failed to reuse lookahead token after an 3370 error, discard it. */ 3371 3372 if (yychar <= YYEOF) 3373 { 3374 /* Return failure if at end of input. */ 3375 if (yychar == YYEOF) 3376 YYABORT; 3377 } 3378 else 3379 { 3380 yydestruct ("Error: discarding", 3381 yytoken, &yylval); 3382 yychar = YYEMPTY; 3383 } 3384 } 3385 3386 /* Else will try to reuse lookahead token after shifting the error 3387 token. */ 3388 goto yyerrlab1; 3389 3390 3391/*---------------------------------------------------. 3392| yyerrorlab -- error raised explicitly by YYERROR. | 3393`---------------------------------------------------*/ 3394yyerrorlab: 3395 3396 /* Pacify compilers like GCC when the user code never invokes 3397 YYERROR and the label yyerrorlab therefore never appears in user 3398 code. */ 3399 if (/*CONSTCOND*/ 0) 3400 goto yyerrorlab; 3401 3402 /* Do not reclaim the symbols of the rule which action triggered 3403 this YYERROR. */ 3404 YYPOPSTACK (yylen); 3405 yylen = 0; 3406 YY_STACK_PRINT (yyss, yyssp); 3407 yystate = *yyssp; 3408 goto yyerrlab1; 3409 3410 3411/*-------------------------------------------------------------. 3412| yyerrlab1 -- common code for both syntax error and YYERROR. | 3413`-------------------------------------------------------------*/ 3414yyerrlab1: 3415 yyerrstatus = 3; /* Each real token shifted decrements this. */ 3416 3417 for (;;) 3418 { 3419 yyn = yypact[yystate]; 3420 if (yyn != YYPACT_NINF) 3421 { 3422 yyn += YYTERROR; 3423 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 3424 { 3425 yyn = yytable[yyn]; 3426 if (0 < yyn) 3427 break; 3428 } 3429 } 3430 3431 /* Pop the current state because it cannot handle the error token. */ 3432 if (yyssp == yyss) 3433 YYABORT; 3434 3435 3436 yydestruct ("Error: popping", 3437 yystos[yystate], yyvsp); 3438 YYPOPSTACK (1); 3439 yystate = *yyssp; 3440 YY_STACK_PRINT (yyss, yyssp); 3441 } 3442 3443 *++yyvsp = yylval; 3444 3445 3446 /* Shift the error token. */ 3447 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 3448 3449 yystate = yyn; 3450 goto yynewstate; 3451 3452 3453/*-------------------------------------. 3454| yyacceptlab -- YYACCEPT comes here. | 3455`-------------------------------------*/ 3456yyacceptlab: 3457 yyresult = 0; 3458 goto yyreturn; 3459 3460/*-----------------------------------. 3461| yyabortlab -- YYABORT comes here. | 3462`-----------------------------------*/ 3463yyabortlab: 3464 yyresult = 1; 3465 goto yyreturn; 3466 3467#if !defined(yyoverflow) || YYERROR_VERBOSE 3468/*-------------------------------------------------. 3469| yyexhaustedlab -- memory exhaustion comes here. | 3470`-------------------------------------------------*/ 3471yyexhaustedlab: 3472 yyerror (YY_("memory exhausted")); 3473 yyresult = 2; 3474 /* Fall through. */ 3475#endif 3476 3477yyreturn: 3478 if (yychar != YYEMPTY) 3479 yydestruct ("Cleanup: discarding lookahead", 3480 yytoken, &yylval); 3481 /* Do not reclaim the symbols of the rule which action triggered 3482 this YYABORT or YYACCEPT. */ 3483 YYPOPSTACK (yylen); 3484 YY_STACK_PRINT (yyss, yyssp); 3485 while (yyssp != yyss) 3486 { 3487 yydestruct ("Cleanup: popping", 3488 yystos[*yyssp], yyvsp); 3489 YYPOPSTACK (1); 3490 } 3491#ifndef yyoverflow 3492 if (yyss != yyssa) 3493 YYSTACK_FREE (yyss); 3494#endif 3495#if YYERROR_VERBOSE 3496 if (yymsg != yymsgbuf) 3497 YYSTACK_FREE (yymsg); 3498#endif 3499 /* Make sure YYID is used. */ 3500 return YYID (yyresult); 3501} 3502 3503 3504 3505/* Line 1675 of yacc.c */ 3506#line 763 "xkbparse.y" 3507 3508void 3509yyerror(const char *s) 3510{ 3511 if (warningLevel>0) { 3512 (void)fprintf(stderr,"%s: line %d of %s\n",s,lineNum, 3513 (scanFile?scanFile:"(unknown)")); 3514 if ((warningLevel>3)) 3515 (void)fprintf(stderr,"last scanned symbol is: %s\n",scanBuf); 3516 } 3517 return; 3518} 3519 3520 3521int 3522yywrap(void) 3523{ 3524 return 1; 3525} 3526 3527 3528