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