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