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