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