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