aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp
diff options
context:
space:
mode:
Diffstat (limited to 'xkbcomp')
-rw-r--r--xkbcomp/keycodes.c2
-rw-r--r--xkbcomp/listing.c10
-rw-r--r--xkbcomp/makefile51
-rw-r--r--xkbcomp/xkbcomp.c2444
-rw-r--r--xkbcomp/xkbcomp.h1
-rw-r--r--xkbcomp/xkbparse.c7088
-rw-r--r--xkbcomp/xkbpath.c3
-rw-r--r--xkbcomp/xkbscan.c2
8 files changed, 4837 insertions, 4764 deletions
diff --git a/xkbcomp/keycodes.c b/xkbcomp/keycodes.c
index 1bff7fa14..8f73268b9 100644
--- a/xkbcomp/keycodes.c
+++ b/xkbcomp/keycodes.c
@@ -299,6 +299,8 @@ InitKeyNamesInfo(KeyNamesInfo * info)
info->name = NULL;
info->leds = NULL;
info->aliases = NULL;
+ info->fileID=-1;
+ info->merge=0;
ClearKeyNamesInfo(info);
info->errorCount = 0;
return;
diff --git a/xkbcomp/listing.c b/xkbcomp/listing.c
index 146ecbab3..d62e39b21 100644
--- a/xkbcomp/listing.c
+++ b/xkbcomp/listing.c
@@ -75,6 +75,7 @@ SOFTWARE.
#include <sys/types.h>
#include <sys/stat.h>
#include <X11/keysym.h>
+#include <X11/Xwindows.h>
#if defined(sgi)
#include <malloc.h>
@@ -123,6 +124,14 @@ SOFTWARE.
#include "tokens.h"
#include <X11/extensions/XKBgeom.h>
+#ifndef S_ISDIR
+# if defined(_S_IFMT) && defined(_S_IFDIR)
+# define S_ISDIR(a) (((a) & _S_IFMT) == _S_IFDIR)
+# else
+# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
+# endif
+#endif
+
#define lowbit(x) ((x) & (-(x)))
unsigned int listingDebug;
@@ -289,6 +298,7 @@ AddDirectory(char *head, char *ptrn, char *rest, char *map)
#ifdef WIN32
if ((dirh = FindFirstFile("*.*", &file)) == INVALID_HANDLE_VALUE)
return 0;
+ nMatch = 0;
#else
if ((dirp = opendir((head ? head : "."))) == NULL)
return 0;
diff --git a/xkbcomp/makefile b/xkbcomp/makefile
new file mode 100644
index 000000000..89435e112
--- /dev/null
+++ b/xkbcomp/makefile
@@ -0,0 +1,51 @@
+INCLUDELIBFILES = $(MHMAKECONF)\libx11\src\$(OBJDIR)\libx11.lib \
+ $(MHMAKECONF)\libx11\src\xkb\$(OBJDIR)\libxkb.lib \
+ $(MHMAKECONF)\libx11\src\xlibi18n\$(OBJDIR)\libi18n.lib \
+ $(MHMAKECONF)\libx11\modules\lc\xlocale\$(OBJDIR)\libxlocale.lib \
+ $(MHMAKECONF)\libx11\modules\lc\utf8\$(OBJDIR)\libxlcUTF8Load.lib \
+ $(MHMAKECONF)\libx11\modules\lc\def\$(OBJDIR)\libxlcDef.lib \
+ $(MHMAKECONF)\libx11\modules\om\generic\$(OBJDIR)\libxomGeneric.lib \
+ $(MHMAKECONF)\libx11\modules\lc\gen\$(OBJDIR)\liblcGenConvLoad.lib \
+ $(MHMAKECONF)\libx11\modules\im\ximcp\$(OBJDIR)\libximcp.lib \
+ $(MHMAKECONF)\libxcb\src\$(OBJDIR)\libxcb.lib \
+ $(MHMAKECONF)\libxau\$(OBJDIR)\libxau.lib \
+ $(MHMAKECONF)\libxkbfile\src\$(OBJDIR)\libxkbfile.lib
+
+LIBDIRS=$(dir $(INCLUDELIBFILES))
+
+load_makefile $(LIBDIRS:%$(OBJDIR)\=%makefile MAKESERVER=$(MAKESERVER) DEBUG=$(DEBUG);)
+
+TTYAPP = xkbcomp
+
+DEFINES += DFLT_XKB_CONFIG_ROOT="\".\""
+
+CSRCS = action.c \
+ alias.c \
+ compat.c \
+ expr.c \
+ geometry.c \
+ indicators.c \
+ keycodes.c \
+ keymap.c \
+ keytypes.c \
+ listing.c \
+ misc.c \
+ parseutils.c \
+ symbols.c \
+ utils.c \
+ vmod.c \
+ xkbcomp.c \
+ xkbparse.c \
+ xkbpath.c \
+ xkbscan.c
+
+LINKLIBS += $(MHMAKECONF)\openssl\out32\libeay32.lib
+
+ifeq ($(DEBUG),1)
+LINKLIBS += $(MHMAKECONF)\freetype\lib\freetype200b8MT_D.lib \
+ $(MHMAKECONF)\pthreads\pthreadVC2d.lib
+else
+LINKLIBS += $(MHMAKECONF)\freetype\lib\freetype200b8MT.lib \
+ $(MHMAKECONF)\pthreads\pthreadVC2.lib
+endif
+
diff --git a/xkbcomp/xkbcomp.c b/xkbcomp/xkbcomp.c
index bf3f670af..922bb42b6 100644
--- a/xkbcomp/xkbcomp.c
+++ b/xkbcomp/xkbcomp.c
@@ -1,1220 +1,1224 @@
-/************************************************************
- Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
-
- Permission to use, copy, modify, and distribute this
- software and its documentation for any purpose and without
- fee is hereby granted, provided that the above copyright
- notice appear in all copies and that both that copyright
- notice and this permission notice appear in supporting
- documentation, and that the name of Silicon Graphics not be
- used in advertising or publicity pertaining to distribution
- of the software without specific prior written permission.
- Silicon Graphics makes no representation about the suitability
- of this software for any purpose. It is provided "as is"
- without any express or implied warranty.
-
- SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
- SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
- GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
- THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
- ********************************************************/
-
-#include <stdio.h>
-#include <ctype.h>
-#include <X11/keysym.h>
-
-/* for symlink attack security fix -- Branden Robinson */
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-/* end BR */
-
-#if defined(sgi)
-#include <malloc.h>
-#endif
-
-#define DEBUG_VAR debugFlags
-#include "xkbcomp.h"
-#include <stdlib.h>
-#include "xkbpath.h"
-#include "parseutils.h"
-#include "misc.h"
-#include "tokens.h"
-#include <X11/extensions/XKBgeom.h>
-
-#ifdef __UNIXOS2__
-#define chdir _chdir2
-#endif
-
-#ifdef WIN32
-#define S_IRGRP 0
-#define S_IWGRP 0
-#define S_IROTH 0
-#define S_IWOTH 0
-#endif
-
-#define lowbit(x) ((x) & (-(x)))
-
-/***====================================================================***/
-
-#define WANT_DEFAULT 0
-#define WANT_XKM_FILE 1
-#define WANT_C_HDR 2
-#define WANT_XKB_FILE 3
-#define WANT_X_SERVER 4
-#define WANT_LISTING 5
-
-#define INPUT_UNKNOWN 0
-#define INPUT_XKB 1
-#define INPUT_XKM 2
-
-unsigned int debugFlags;
-
-static const char *fileTypeExt[] = {
- "XXX",
- "xkm",
- "h",
- "xkb",
- "dir"
-};
-
-static unsigned inputFormat, outputFormat;
-char *rootDir;
-static char *inputFile;
-static char *inputMap;
-static char *outputFile;
-static char *inDpyName;
-static char *outDpyName;
-static Display *inDpy;
-static Display *outDpy;
-static Bool showImplicit = False;
-static Bool synch = False;
-static Bool computeDflts = False;
-static Bool xkblist = False;
-unsigned warningLevel = 5;
-unsigned verboseLevel = 0;
-unsigned dirsToStrip = 0;
-unsigned optionalParts = 0;
-static char *preErrorMsg = NULL;
-static char *postErrorMsg = NULL;
-static char *errorPrefix = NULL;
-static unsigned int device_id = XkbUseCoreKbd;
-
-/***====================================================================***/
-
-#define M(m) fprintf(stderr,(m))
-#define M1(m,a) fprintf(stderr,(m),(a))
-
-static void
-Usage(int argc, char *argv[])
-{
- if (!xkblist)
- M1("Usage: %s [options] input-file [ output-file ]\n", argv[0]);
- else
- M1("Usage: %s [options] file[(map)] ...\n", argv[0]);
- M("Legal options:\n");
- M("-?,-help Print this message\n");
- if (!xkblist)
- {
- M("-a Show all actions\n");
- M("-C Create a C header file\n");
- }
-#ifdef DEBUG
- M("-d [flags] Report debugging information\n");
-#endif
- M("-em1 <msg> Print <msg> before printing first error message\n");
- M("-emp <msg> Print <msg> at the start of each message line\n");
- M("-eml <msg> If there were any errors, print <msg> before exiting\n");
- if (!xkblist)
- {
- M("-dflts Compute defaults for missing parts\n");
- M("-I[<dir>] Specifies a top level directory for include\n");
- M(" directives. Multiple directories are legal.\n");
- M("-l [flags] List matching maps in the specified files\n");
- M(" f: list fully specified names\n");
- M(" h: also list hidden maps\n");
- M(" l: long listing (show flags)\n");
- M(" p: also list partial maps\n");
- M(" R: recursively list subdirectories\n");
- M(" default is all options off\n");
- }
- M("-i <deviceid> Specifies device ID (not name) to compile for\n");
- M("-m[ap] <map> Specifies map to compile\n");
- M("-o <file> Specifies output file name\n");
- if (!xkblist)
- {
- M("-opt[ional] <parts> Specifies optional components of keymap\n");
- M(" Errors in optional parts are not fatal\n");
- M(" <parts> can be any combination of:\n");
- M(" c: compat map g: geometry\n");
- M(" k: keycodes s: symbols\n");
- M(" t: types\n");
- }
- if (xkblist)
- {
- M("-p <count> Specifies the number of slashes to be stripped\n");
- M(" from the front of the map name on output\n");
- }
- M("-R[<DIR>] Specifies the root directory for\n");
- M(" relative path names\n");
- M("-synch Force synchronization\n");
- if (xkblist)
- {
- M("-v [<flags>] Set level of detail for listing.\n");
- M(" flags are as for the -l option\n");
- }
- M("-w [<lvl>] Set warning level (0=none, 10=all)\n");
- if (!xkblist)
- {
- M("-xkb Create an XKB source (.xkb) file\n");
- M("-xkm Create a compiled key map (.xkm) file\n");
- }
- return;
-}
-
-/***====================================================================***/
-
-static void
-setVerboseFlags(char *str)
-{
- for (; *str; str++)
- {
- switch (*str)
- {
- case 'f':
- verboseLevel |= WantFullNames;
- break;
- case 'h':
- verboseLevel |= WantHiddenMaps;
- break;
- case 'l':
- verboseLevel |= WantLongListing;
- break;
- case 'p':
- verboseLevel |= WantPartialMaps;
- break;
- case 'R':
- verboseLevel |= ListRecursive;
- break;
- default:
- if (warningLevel > 4)
- {
- WARN1("Unknown verbose option \"%c\"\n", (unsigned int) *str);
- ACTION("Ignored\n");
- }
- break;
- }
- }
- return;
-}
-
-static Bool
-parseArgs(int argc, char *argv[])
-{
- register int i, tmp;
-
- i = strlen(argv[0]);
- tmp = strlen("xkblist");
- if ((i >= tmp) && (strcmp(&argv[0][i - tmp], "xkblist") == 0))
- {
- xkblist = True;
- }
- for (i = 1; i < argc; i++)
- {
- int itmp;
- if ((argv[i][0] != '-') || (uStringEqual(argv[i], "-")))
- {
- if (!xkblist)
- {
- if (inputFile == NULL)
- inputFile = argv[i];
- else if (outputFile == NULL)
- outputFile = argv[i];
- else if (warningLevel > 0)
- {
- WARN("Too many file names on command line\n");
- ACTION3
- ("Compiling %s, writing to %s, ignoring %s\n",
- inputFile, outputFile, argv[i]);
- }
- }
- else if (!AddMatchingFiles(argv[i]))
- return False;
- }
- else if ((strcmp(argv[i], "-?") == 0)
- || (strcmp(argv[i], "-help") == 0))
- {
- Usage(argc, argv);
- exit(0);
- }
- else if ((strcmp(argv[i], "-a") == 0) && (!xkblist))
- {
- showImplicit = True;
- }
- else if ((strcmp(argv[i], "-C") == 0) && (!xkblist))
- {
- if ((outputFormat != WANT_DEFAULT)
- && (outputFormat != WANT_C_HDR))
- {
- if (warningLevel > 0)
- {
- WARN("Multiple output file formats specified\n");
- ACTION1("\"%s\" flag ignored\n", argv[i]);
- }
- }
- else
- outputFormat = WANT_C_HDR;
- }
-#ifdef DEBUG
- else if (strcmp(argv[i], "-d") == 0)
- {
- if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0])))
- {
- debugFlags = 1;
- }
- else
- {
- if (sscanf(argv[++i], "%i", &itmp) == 1)
- debugFlags = itmp;
- }
- INFO1("Setting debug flags to %d\n", debugFlags);
- }
-#endif
- else if ((strcmp(argv[i], "-dflts") == 0) && (!xkblist))
- {
- computeDflts = True;
- }
- else if (strcmp(argv[i], "-em1") == 0)
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- {
- WARN("No pre-error message specified\n");
- ACTION("Trailing \"-em1\" option ignored\n");
- }
- }
- else if (preErrorMsg != NULL)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple pre-error messsages specified\n");
- ACTION2("Compiling %s, ignoring %s\n",
- preErrorMsg, argv[i]);
- }
- }
- else
- preErrorMsg = argv[i];
- }
- else if (strcmp(argv[i], "-emp") == 0)
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- {
- WARN("No error prefix specified\n");
- ACTION("Trailing \"-emp\" option ignored\n");
- }
- }
- else if (errorPrefix != NULL)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple error prefixes specified\n");
- ACTION2("Compiling %s, ignoring %s\n",
- errorPrefix, argv[i]);
- }
- }
- else
- errorPrefix = argv[i];
- }
- else if (strcmp(argv[i], "-eml") == 0)
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- {
- WARN("No post-error message specified\n");
- ACTION("Trailing \"-eml\" option ignored\n");
- }
- }
- else if (postErrorMsg != NULL)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple post-error messages specified\n");
- ACTION2("Compiling %s, ignoring %s\n",
- postErrorMsg, argv[i]);
- }
- }
- else
- postErrorMsg = argv[i];
- }
- else if ((strncmp(argv[i], "-I", 2) == 0) && (!xkblist))
- {
- if (!XkbAddDirectoryToPath(&argv[i][2]))
- {
- ACTION("Exiting\n");
- exit(1);
- }
- }
- else if ((strncmp(argv[i], "-i", 2) == 0) && (!xkblist))
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- WARN("No device ID specified\n");
- }
- device_id = atoi(argv[i]);
- }
- else if ((strncmp(argv[i], "-l", 2) == 0) && (!xkblist))
- {
- if (outputFormat != WANT_DEFAULT)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple output file formats specified\n");
- ACTION1("\"%s\" flag ignored\n", argv[i]);
- }
- }
- else
- {
- if (argv[i][2] != '\0')
- setVerboseFlags(&argv[i][2]);
- xkblist = True;
- if ((inputFile) && (!AddMatchingFiles(inputFile)))
- return False;
- else
- inputFile = NULL;
- if ((outputFile) && (!AddMatchingFiles(outputFile)))
- return False;
- else
- outputFile = NULL;
- }
- }
- else if ((strcmp(argv[i], "-m") == 0)
- || (strcmp(argv[i], "-map") == 0))
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- {
- WARN("No map name specified\n");
- ACTION1("Trailing \"%s\" option ignored\n", argv[i - 1]);
- }
- }
- else if (xkblist)
- {
- if (!AddMapOnly(argv[i]))
- return False;
- }
- else if (inputMap != NULL)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple map names specified\n");
- ACTION2("Compiling %s, ignoring %s\n", inputMap, argv[i]);
- }
- }
- else
- inputMap = argv[i];
- }
- else if ((strcmp(argv[i], "-merge") == 0) && (!xkblist))
- {
- /* Ignored */
- }
- else if (strcmp(argv[i], "-o") == 0)
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- {
- WARN("No output file specified\n");
- ACTION("Trailing \"-o\" option ignored\n");
- }
- }
- else if (outputFile != NULL)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple output files specified\n");
- ACTION2("Compiling %s, ignoring %s\n", outputFile,
- argv[i]);
- }
- }
- else
- outputFile = argv[i];
- }
- else if (((strcmp(argv[i], "-opt") == 0)
- || (strcmp(argv[i], "optional") == 0)) && (!xkblist))
- {
- if (++i >= argc)
- {
- if (warningLevel > 0)
- {
- WARN("No optional components specified\n");
- ACTION1("Trailing \"%s\" option ignored\n", argv[i - 1]);
- }
- }
- else
- {
- char *tmp2;
- for (tmp2 = argv[i]; (*tmp2 != '\0'); tmp2++)
- {
- switch (*tmp2)
- {
- case 'c':
- case 'C':
- optionalParts |= XkmCompatMapMask;
- break;
- case 'g':
- case 'G':
- optionalParts |= XkmGeometryMask;
- break;
- case 'k':
- case 'K':
- optionalParts |= XkmKeyNamesMask;
- break;
- case 's':
- case 'S':
- optionalParts |= XkmSymbolsMask;
- break;
- case 't':
- case 'T':
- optionalParts |= XkmTypesMask;
- break;
- default:
- if (warningLevel > 0)
- {
- WARN1
- ("Illegal component for %s option\n",
- argv[i - 1]);
- ACTION1
- ("Ignoring unknown specifier \"%c\"\n",
- (unsigned int) *tmp2);
- }
- break;
- }
- }
- }
- }
- else if (strncmp(argv[i], "-p", 2) == 0)
- {
- if (isdigit(argv[i][2]))
- {
- if (sscanf(&argv[i][2], "%i", &itmp) == 1)
- dirsToStrip = itmp;
- }
- else if ((i < (argc - 1)) && (isdigit(argv[i + 1][0])))
- {
- if (sscanf(argv[++i], "%i", &itmp) == 1)
- dirsToStrip = itmp;
- }
- else
- {
- dirsToStrip = 0;
- }
- if (warningLevel > 5)
- INFO1("Setting path count to %d\n", dirsToStrip);
- }
- else if (strncmp(argv[i], "-R", 2) == 0)
- {
- if (argv[i][2] == '\0')
- {
- if (warningLevel > 0)
- {
- WARN("No root directory specified\n");
- ACTION("Ignoring -R option\n");
- }
- }
- else if (rootDir != NULL)
- {
- if (warningLevel > 0)
- {
- WARN("Multiple root directories specified\n");
- ACTION2("Using %s, ignoring %s\n", rootDir, argv[i]);
- }
- }
- else
- {
- rootDir = &argv[i][2];
- if (warningLevel > 8)
- {
- WARN1("Changing root directory to \"%s\"\n", rootDir);
- }
- if ((chdir(rootDir) < 0) && (warningLevel > 0))
- {
- WARN1("Couldn't change directory to \"%s\"\n", rootDir);
- ACTION("Root directory (-R) option ignored\n");
- rootDir = NULL;
- }
- }
- }
- else if ((strcmp(argv[i], "-synch") == 0)
- || (strcmp(argv[i], "-s") == 0))
- {
- synch = True;
- }
- else if (strncmp(argv[i], "-v", 2) == 0)
- {
- char *str;
- if (argv[i][2] != '\0')
- str = &argv[i][2];
- else if ((i < (argc - 1)) && (argv[i + 1][0] != '-'))
- str = argv[++i];
- else
- str = NULL;
- if (str)
- setVerboseFlags(str);
- }
- else if (strncmp(argv[i], "-w", 2) == 0)
- {
- if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0])))
- {
- warningLevel = 0;
- if (isdigit(argv[i][1]))
- if (sscanf(&argv[i][1], "%i", &itmp) == 1)
- warningLevel = itmp;
- }
- else
- {
- if (sscanf(argv[++i], "%i", &itmp) == 1)
- warningLevel = itmp;
- }
- }
- else if ((strcmp(argv[i], "-xkb") == 0) && (!xkblist))
- {
- if ((outputFormat != WANT_DEFAULT)
- && (outputFormat != WANT_XKB_FILE))
- {
- if (warningLevel > 0)
- {
- WARN("Multiple output file formats specified\n");
- ACTION1("\"%s\" flag ignored\n", argv[i]);
- }
- }
- else
- outputFormat = WANT_XKB_FILE;
- }
- else if ((strcmp(argv[i], "-xkm") == 0) && (!xkblist))
- {
- if ((outputFormat != WANT_DEFAULT)
- && (outputFormat != WANT_XKM_FILE))
- {
- if (warningLevel > 0)
- {
- WARN("Multiple output file formats specified\n");
- ACTION1("\"%s\" flag ignored\n", argv[i]);
- }
- }
- else
- outputFormat = WANT_XKM_FILE;
- }
- else
- {
- ERROR1("Unknown flag \"%s\" on command line\n", argv[i]);
- Usage(argc, argv);
- return False;
- }
- }
- if (xkblist)
- inputFormat = INPUT_XKB;
- else if (inputFile == NULL)
- {
- ERROR("No input file specified\n");
- return False;
- }
- else if (uStringEqual(inputFile, "-"))
- {
- inputFormat = INPUT_XKB;
- }
-#ifndef WIN32
- else if (strchr(inputFile, ':') == NULL)
- {
-#else
- else if ((strchr(inputFile, ':') == NULL) || (strlen(inputFile) > 2 &&
- isalpha(inputFile[0]) &&
- inputFile[1] == ':'
- && strchr(inputFile + 2,
- ':') == NULL))
- {
-#endif
- int len;
- len = strlen(inputFile);
- if (inputFile[len - 1] == ')')
- {
- char *tmp;
- if ((tmp = strchr(inputFile, '(')) != NULL)
- {
- *tmp = '\0';
- inputFile[len - 1] = '\0';
- tmp++;
- if (*tmp == '\0')
- {
- WARN("Empty map in filename\n");
- ACTION("Ignored\n");
- }
- else if (inputMap == NULL)
- {
- inputMap = uStringDup(tmp);
- }
- else
- {
- WARN("Map specified in filename and with -m flag\n");
- ACTION1("map from name (\"%s\") ignored\n", tmp);
- }
- }
- else
- {
- ERROR1("Illegal name \"%s\" for input file\n", inputFile);
- return False;
- }
- }
- if ((len > 4) && (strcmp(&inputFile[len - 4], ".xkm") == 0))
- {
- inputFormat = INPUT_XKM;
- }
- else
- {
- FILE *file;
- file = fopen(inputFile, "r");
- if (file)
- {
- if (XkmProbe(file))
- inputFormat = INPUT_XKM;
- else
- inputFormat = INPUT_XKB;
- fclose(file);
- }
- else
- {
- fprintf(stderr, "Cannot open \"%s\" for reading\n",
- inputFile);
- return False;
- }
- }
- }
- else
- {
- inDpyName = inputFile;
- inputFile = NULL;
- inputFormat = INPUT_XKM;
- }
-
- if (outputFormat == WANT_DEFAULT)
- {
- if (xkblist)
- outputFormat = WANT_LISTING;
- else if (inputFormat == INPUT_XKB)
- outputFormat = WANT_XKM_FILE;
- else
- outputFormat = WANT_XKB_FILE;
- }
- if ((outputFormat == WANT_LISTING) && (inputFormat != INPUT_XKB))
- {
- if (inputFile)
- ERROR("Cannot generate a listing from a .xkm file (yet)\n");
- else
- ERROR("Cannot generate a listing from an X connection (yet)\n");
- return False;
- }
- if (xkblist)
- {
- if (outputFile == NULL)
- outputFile = uStringDup("-");
- else if (strchr(outputFile, ':') != NULL)
- {
- ERROR("Cannot write a listing to an X connection\n");
- return False;
- }
- }
- else if ((!outputFile) && (inputFile) && uStringEqual(inputFile, "-"))
- {
- int len = strlen("stdin") + strlen(fileTypeExt[outputFormat]) + 2;
- outputFile = uTypedCalloc(len, char);
- if (outputFile == NULL)
- {
- WSGO("Cannot allocate space for output file name\n");
- ACTION("Exiting\n");
- exit(1);
- }
- sprintf(outputFile, "stdin.%s", fileTypeExt[outputFormat]);
- }
- else if ((outputFile == NULL) && (inputFile != NULL))
- {
- int len;
- char *base, *ext;
-
- if (inputMap == NULL)
- {
- base = strrchr(inputFile, '/');
- if (base == NULL)
- base = inputFile;
- else
- base++;
- }
- else
- base = inputMap;
-
- len = strlen(base) + strlen(fileTypeExt[outputFormat]) + 2;
- outputFile = uTypedCalloc(len, char);
- if (outputFile == NULL)
- {
- WSGO("Cannot allocate space for output file name\n");
- ACTION("Exiting\n");
- exit(1);
- }
- ext = strrchr(base, '.');
- if (ext == NULL)
- sprintf(outputFile, "%s.%s", base, fileTypeExt[outputFormat]);
- else
- {
- strcpy(outputFile, base);
- strcpy(&outputFile[ext - base + 1], fileTypeExt[outputFormat]);
- }
- }
- else if (outputFile == NULL)
- {
- int len;
- char *ch, *name, buf[128];
- if (inDpyName[0] == ':')
- snprintf(name = buf, sizeof(buf), "server%s", inDpyName);
- else
- name = inDpyName;
-
- len = strlen(name) + strlen(fileTypeExt[outputFormat]) + 2;
- outputFile = uTypedCalloc(len, char);
- if (outputFile == NULL)
- {
- WSGO("Cannot allocate space for output file name\n");
- ACTION("Exiting\n");
- exit(1);
- }
- strcpy(outputFile, name);
- for (ch = outputFile; (*ch) != '\0'; ch++)
- {
- if (*ch == ':')
- *ch = '-';
- else if (*ch == '.')
- *ch = '_';
- }
- *ch++ = '.';
- strcpy(ch, fileTypeExt[outputFormat]);
- }
-#ifdef WIN32
- else if (strlen(outputFile) > 2 &&
- isalpha(outputFile[0]) &&
- outputFile[1] == ':' && strchr(outputFile + 2, ':') == NULL)
- {
- }
-#endif
- else if (strchr(outputFile, ':') != NULL)
- {
- outDpyName = outputFile;
- outputFile = NULL;
- outputFormat = WANT_X_SERVER;
- }
- return True;
-}
-
-static Display *
-GetDisplay(char *program, char *dpyName)
-{
- int mjr, mnr, error;
- Display *dpy;
-
- mjr = XkbMajorVersion;
- mnr = XkbMinorVersion;
- dpy = XkbOpenDisplay(dpyName, NULL, NULL, &mjr, &mnr, &error);
- if (dpy == NULL)
- {
- switch (error)
- {
- case XkbOD_BadLibraryVersion:
- INFO3("%s was compiled with XKB version %d.%02d\n",
- program, XkbMajorVersion, XkbMinorVersion);
- ERROR2("X library supports incompatible version %d.%02d\n",
- mjr, mnr);
- break;
- case XkbOD_ConnectionRefused:
- ERROR1("Cannot open display \"%s\"\n", dpyName);
- break;
- case XkbOD_NonXkbServer:
- ERROR1("XKB extension not present on %s\n", dpyName);
- break;
- case XkbOD_BadServerVersion:
- INFO3("%s was compiled with XKB version %d.%02d\n",
- program, XkbMajorVersion, XkbMinorVersion);
- ERROR3("Server %s uses incompatible version %d.%02d\n",
- dpyName, mjr, mnr);
- break;
- default:
- WSGO1("Unknown error %d from XkbOpenDisplay\n", error);
- }
- }
- else if (synch)
- XSynchronize(dpy, True);
- return dpy;
-}
-
-/***====================================================================***/
-
-extern int yydebug;
-
-int
-main(int argc, char *argv[])
-{
- FILE *file; /* input file (or stdin) */
- XkbFile *rtrn;
- XkbFile *mapToUse;
- int ok;
- XkbFileInfo result;
- Status status;
-
- yyin = stdin;
- uSetEntryFile(NullString);
- uSetDebugFile(NullString);
- uSetErrorFile(NullString);
-
- XkbInitIncludePath();
- if (!parseArgs(argc, argv))
- exit(1);
-#ifdef DEBUG
- if (debugFlags & 0x2)
- yydebug = 1;
-#endif
- if (preErrorMsg)
- uSetPreErrorMessage(preErrorMsg);
- if (errorPrefix)
- uSetErrorPrefix(errorPrefix);
- if (postErrorMsg)
- uSetPostErrorMessage(postErrorMsg);
- file = NULL;
- XkbInitAtoms(NULL);
- XkbAddDefaultDirectoriesToPath();
- if (xkblist)
- {
- Bool gotSome;
- gotSome = GenerateListing(outputFile);
- if ((warningLevel > 7) && (!gotSome))
- return -1;
- return 0;
- }
- if (inputFile != NULL)
- {
- if (uStringEqual(inputFile, "-"))
- {
- file = stdin;
- inputFile = "stdin";
- }
- else
- {
- file = fopen(inputFile, "r");
- }
- }
- else if (inDpyName != NULL)
- {
- inDpy = GetDisplay(argv[0], inDpyName);
- if (!inDpy)
- {
- ACTION("Exiting\n");
- exit(1);
- }
- }
- if (outDpyName != NULL)
- {
- outDpy = GetDisplay(argv[0], outDpyName);
- if (!outDpy)
- {
- ACTION("Exiting\n");
- exit(1);
- }
- }
- if ((inDpy == NULL) && (outDpy == NULL))
- {
- int mjr, mnr;
- mjr = XkbMajorVersion;
- mnr = XkbMinorVersion;
- if (!XkbLibraryVersion(&mjr, &mnr))
- {
- INFO3("%s was compiled with XKB version %d.%02d\n",
- argv[0], XkbMajorVersion, XkbMinorVersion);
- ERROR2("X library supports incompatible version %d.%02d\n",
- mjr, mnr);
- ACTION("Exiting\n");
- exit(1);
- }
- }
- if (file)
- {
- ok = True;
- setScanState(inputFile, 1);
- if ((inputFormat == INPUT_XKB) /* parse .xkb file */
- && (XKBParseFile(file, &rtrn) && (rtrn != NULL)))
- {
- fclose(file);
- mapToUse = rtrn;
- if (inputMap != NULL) /* map specified on cmdline? */
- {
- while ((mapToUse)
- && (!uStringEqual(mapToUse->name, inputMap)))
- {
- mapToUse = (XkbFile *) mapToUse->common.next;
- }
- if (!mapToUse)
- {
- FATAL2("No map named \"%s\" in \"%s\"\n",
- inputMap, inputFile);
- /* NOTREACHED */
- }
- }
- else if (rtrn->common.next != NULL)
- {
- /* look for map with XkbLC_Default flag. */
- mapToUse = rtrn;
- for (; mapToUse; mapToUse = (XkbFile *) mapToUse->common.next)
- {
- if (mapToUse->flags & XkbLC_Default)
- break;
- }
- if (!mapToUse)
- {
- mapToUse = rtrn;
- if (warningLevel > 4)
- {
- WARN1
- ("No map specified, but \"%s\" has several\n",
- inputFile);
- ACTION1
- ("Using the first defined map, \"%s\"\n",
- mapToUse->name);
- }
- }
- }
- bzero((char *) &result, sizeof(result));
- result.type = mapToUse->type;
- if ((result.xkb = XkbAllocKeyboard()) == NULL)
- {
- WSGO("Cannot allocate keyboard description\n");
- /* NOTREACHED */
- }
- switch (mapToUse->type)
- {
- case XkmSemanticsFile:
- case XkmLayoutFile:
- case XkmKeymapFile:
- ok = CompileKeymap(mapToUse, &result, MergeReplace);
- break;
- case XkmKeyNamesIndex:
- ok = CompileKeycodes(mapToUse, &result, MergeReplace);
- break;
- case XkmTypesIndex:
- ok = CompileKeyTypes(mapToUse, &result, MergeReplace);
- break;
- case XkmSymbolsIndex:
- /* if it's just symbols, invent key names */
- result.xkb->flags |= AutoKeyNames;
- ok = False;
- break;
- case XkmCompatMapIndex:
- ok = CompileCompatMap(mapToUse, &result, MergeReplace, NULL);
- break;
- case XkmGeometryFile:
- case XkmGeometryIndex:
- /* if it's just a geometry, invent key names */
- result.xkb->flags |= AutoKeyNames;
- ok = CompileGeometry(mapToUse, &result, MergeReplace);
- break;
- default:
- WSGO1("Unknown file type %d\n", mapToUse->type);
- ok = False;
- break;
- }
- }
- else if (inputFormat == INPUT_XKM) /* parse xkm file */
- {
- unsigned tmp;
- bzero((char *) &result, sizeof(result));
- if ((result.xkb = XkbAllocKeyboard()) == NULL)
- {
- WSGO("Cannot allocate keyboard description\n");
- /* NOTREACHED */
- }
- tmp = XkmReadFile(file, 0, XkmKeymapLegal, &result);
- if (tmp == XkmKeymapLegal)
- {
- ERROR1("Cannot read XKM file \"%s\"\n", inputFile);
- ok = False;
- }
- }
- else
- {
- INFO1("Errors encountered in %s; not compiled.\n", inputFile);
- ok = False;
- }
- }
- else if (inDpy != NULL)
- {
- bzero((char *) &result, sizeof(result));
- result.type = XkmKeymapFile;
- result.xkb = XkbGetMap(inDpy, XkbAllMapComponentsMask, device_id);
- if (result.xkb == NULL)
- WSGO("Cannot load keyboard description\n");
- if (XkbGetIndicatorMap(inDpy, ~0, result.xkb) != Success)
- WSGO("Could not load indicator map\n");
- if (XkbGetControls(inDpy, XkbAllControlsMask, result.xkb) != Success)
- WSGO("Could not load keyboard controls\n");
- if (XkbGetCompatMap(inDpy, XkbAllCompatMask, result.xkb) != Success)
- WSGO("Could not load compatibility map\n");
- if (XkbGetNames(inDpy, XkbAllNamesMask, result.xkb) != Success)
- WSGO("Could not load names\n");
- if ((status = XkbGetGeometry(inDpy, result.xkb)) != Success)
- {
- if (warningLevel > 3)
- {
- char buf[100];
- buf[0] = '\0';
- XGetErrorText(inDpy, status, buf, 100);
- WARN1("Could not load keyboard geometry for %s\n", inDpyName);
- ACTION1("%s\n", buf);
- ACTION("Resulting keymap file will not describe geometry\n");
- }
- }
- if (computeDflts)
- ok = (ComputeKbdDefaults(result.xkb) == Success);
- else
- ok = True;
- }
- else
- {
- fprintf(stderr, "Cannot open \"%s\" to compile\n", inputFile);
- ok = 0;
- }
- if (ok)
- {
- FILE *out = stdout;
- if ((inDpy != outDpy) &&
- (XkbChangeKbdDisplay(outDpy, &result) != Success))
- {
- WSGO2("Error converting keyboard display from %s to %s\n",
- inDpyName, outDpyName);
- exit(1);
- }
- if (outputFile != NULL)
- {
- if (uStringEqual(outputFile, "-"))
- outputFile = "stdout";
- else
- {
- /*
- * fix to prevent symlink attack (e.g.,
- * ln -s /etc/passwd /var/tmp/server-0.xkm)
- */
- /*
- * this patch may have POSIX, Linux, or GNU libc bias
- * -- Branden Robinson
- */
- int outputFileFd;
- int binMode = 0;
- const char *openMode = "w";
- unlink(outputFile);
-#ifdef O_BINARY
- switch (outputFormat)
- {
- case WANT_XKM_FILE:
- binMode = O_BINARY;
- openMode = "wb";
- break;
- default:
- binMode = 0;
- break;
- }
-#endif
- outputFileFd =
- open(outputFile, O_WRONLY | O_CREAT | O_EXCL,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
- | S_IWOTH | binMode);
- if (outputFileFd < 0)
- {
- ERROR1
- ("Cannot open \"%s\" to write keyboard description\n",
- outputFile);
- ACTION("Exiting\n");
- exit(1);
- }
-#ifndef WIN32
- out = fdopen(outputFileFd, openMode);
-#else
- close(outputFileFd);
- out = fopen(outputFile, "wb");
-#endif
- /* end BR */
- if (out == NULL)
- {
- ERROR1
- ("Cannot open \"%s\" to write keyboard description\n",
- outputFile);
- ACTION("Exiting\n");
- exit(1);
- }
- }
- }
- switch (outputFormat)
- {
- case WANT_XKM_FILE:
- ok = XkbWriteXKMFile(out, &result);
- break;
- case WANT_XKB_FILE:
- ok = XkbWriteXKBFile(out, &result, showImplicit, NULL, NULL);
- break;
- case WANT_C_HDR:
- ok = XkbWriteCFile(out, outputFile, &result);
- break;
- case WANT_X_SERVER:
- if (!(ok = XkbWriteToServer(&result)))
- {
- ERROR2("%s in %s\n", _XkbErrMessages[_XkbErrCode],
- _XkbErrLocation ? _XkbErrLocation : "unknown");
- ACTION1("Couldn't write keyboard description to %s\n",
- outDpyName);
- }
- break;
- default:
- WSGO1("Unknown output format %d\n", outputFormat);
- ACTION("No output file created\n");
- ok = False;
- break;
- }
- if (outputFormat != WANT_X_SERVER)
- {
- if (fclose(out))
- {
- ERROR1("Cannot close \"%s\" properly (not enough space?)\n",
- outputFile);
- ok= False;
- }
- else if (!ok)
- {
- ERROR2("%s in %s\n", _XkbErrMessages[_XkbErrCode],
- _XkbErrLocation ? _XkbErrLocation : "unknown");
- }
- if (!ok)
- {
- ACTION1("Output file \"%s\" removed\n", outputFile);
- unlink(outputFile);
- }
- }
- }
- if (inDpy)
- XCloseDisplay(inDpy);
- inDpy = NULL;
- if (outDpy)
- XCloseDisplay(outDpy);
- uFinishUp();
- return (ok == 0);
-}
+/************************************************************
+ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc.
+
+ Permission to use, copy, modify, and distribute this
+ software and its documentation for any purpose and without
+ fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright
+ notice and this permission notice appear in supporting
+ documentation, and that the name of Silicon Graphics not be
+ used in advertising or publicity pertaining to distribution
+ of the software without specific prior written permission.
+ Silicon Graphics makes no representation about the suitability
+ of this software for any purpose. It is provided "as is"
+ without any express or implied warranty.
+
+ SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
+ GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
+ THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+ ********************************************************/
+
+#include <stdio.h>
+#include <ctype.h>
+#include <X11/keysym.h>
+
+/* for symlink attack security fix -- Branden Robinson */
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+/* end BR */
+
+#if defined(sgi)
+#include <malloc.h>
+#endif
+
+#define DEBUG_VAR debugFlags
+#include "xkbcomp.h"
+#include <stdlib.h>
+#include "xkbpath.h"
+#include "parseutils.h"
+#include "misc.h"
+#include "tokens.h"
+#include <X11/extensions/XKBgeom.h>
+
+#ifdef __UNIXOS2__
+#define chdir _chdir2
+#endif
+
+#ifdef WIN32
+#define S_IRGRP 0
+#define S_IWGRP 0
+#define S_IROTH 0
+#define S_IWOTH 0
+#endif
+
+#define lowbit(x) ((x) & (-(x)))
+
+/***====================================================================***/
+
+#define WANT_DEFAULT 0
+#define WANT_XKM_FILE 1
+#define WANT_C_HDR 2
+#define WANT_XKB_FILE 3
+#define WANT_X_SERVER 4
+#define WANT_LISTING 5
+
+#define INPUT_UNKNOWN 0
+#define INPUT_XKB 1
+#define INPUT_XKM 2
+
+unsigned int debugFlags;
+
+static const char *fileTypeExt[] = {
+ "XXX",
+ "xkm",
+ "h",
+ "xkb",
+ "dir"
+};
+
+static unsigned inputFormat, outputFormat;
+char *rootDir;
+static char *inputFile;
+static char *inputMap;
+static char *outputFile;
+static char *inDpyName;
+static char *outDpyName;
+static Display *inDpy;
+static Display *outDpy;
+static Bool showImplicit = False;
+static Bool synch = False;
+static Bool computeDflts = False;
+static Bool xkblist = False;
+unsigned warningLevel = 5;
+unsigned verboseLevel = 0;
+unsigned dirsToStrip = 0;
+unsigned optionalParts = 0;
+static char *preErrorMsg = NULL;
+static char *postErrorMsg = NULL;
+static char *errorPrefix = NULL;
+static unsigned int device_id = XkbUseCoreKbd;
+
+/***====================================================================***/
+
+#define M(m) fprintf(stderr,(m))
+#define M1(m,a) fprintf(stderr,(m),(a))
+
+static void
+Usage(int argc, char *argv[])
+{
+ if (!xkblist)
+ M1("Usage: %s [options] input-file [ output-file ]\n", argv[0]);
+ else
+ M1("Usage: %s [options] file[(map)] ...\n", argv[0]);
+ M("Legal options:\n");
+ M("-?,-help Print this message\n");
+ if (!xkblist)
+ {
+ M("-a Show all actions\n");
+ M("-C Create a C header file\n");
+ }
+#ifdef DEBUG
+ M("-d [flags] Report debugging information\n");
+#endif
+ M("-em1 <msg> Print <msg> before printing first error message\n");
+ M("-emp <msg> Print <msg> at the start of each message line\n");
+ M("-eml <msg> If there were any errors, print <msg> before exiting\n");
+ if (!xkblist)
+ {
+ M("-dflts Compute defaults for missing parts\n");
+ M("-I[<dir>] Specifies a top level directory for include\n");
+ M(" directives. Multiple directories are legal.\n");
+ M("-l [flags] List matching maps in the specified files\n");
+ M(" f: list fully specified names\n");
+ M(" h: also list hidden maps\n");
+ M(" l: long listing (show flags)\n");
+ M(" p: also list partial maps\n");
+ M(" R: recursively list subdirectories\n");
+ M(" default is all options off\n");
+ }
+ M("-i <deviceid> Specifies device ID (not name) to compile for\n");
+ M("-m[ap] <map> Specifies map to compile\n");
+ M("-o <file> Specifies output file name\n");
+ if (!xkblist)
+ {
+ M("-opt[ional] <parts> Specifies optional components of keymap\n");
+ M(" Errors in optional parts are not fatal\n");
+ M(" <parts> can be any combination of:\n");
+ M(" c: compat map g: geometry\n");
+ M(" k: keycodes s: symbols\n");
+ M(" t: types\n");
+ }
+ if (xkblist)
+ {
+ M("-p <count> Specifies the number of slashes to be stripped\n");
+ M(" from the front of the map name on output\n");
+ }
+ M("-R[<DIR>] Specifies the root directory for\n");
+ M(" relative path names\n");
+ M("-synch Force synchronization\n");
+ if (xkblist)
+ {
+ M("-v [<flags>] Set level of detail for listing.\n");
+ M(" flags are as for the -l option\n");
+ }
+ M("-w [<lvl>] Set warning level (0=none, 10=all)\n");
+ if (!xkblist)
+ {
+ M("-xkb Create an XKB source (.xkb) file\n");
+ M("-xkm Create a compiled key map (.xkm) file\n");
+ }
+ return;
+}
+
+/***====================================================================***/
+
+static void
+setVerboseFlags(char *str)
+{
+ for (; *str; str++)
+ {
+ switch (*str)
+ {
+ case 'f':
+ verboseLevel |= WantFullNames;
+ break;
+ case 'h':
+ verboseLevel |= WantHiddenMaps;
+ break;
+ case 'l':
+ verboseLevel |= WantLongListing;
+ break;
+ case 'p':
+ verboseLevel |= WantPartialMaps;
+ break;
+ case 'R':
+ verboseLevel |= ListRecursive;
+ break;
+ default:
+ if (warningLevel > 4)
+ {
+ WARN1("Unknown verbose option \"%c\"\n", (unsigned int) *str);
+ ACTION("Ignored\n");
+ }
+ break;
+ }
+ }
+ return;
+}
+
+static Bool
+parseArgs(int argc, char *argv[])
+{
+ register int i, tmp;
+
+ i = strlen(argv[0]);
+ tmp = strlen("xkblist");
+ if ((i >= tmp) && (strcmp(&argv[0][i - tmp], "xkblist") == 0))
+ {
+ xkblist = True;
+ }
+ for (i = 1; i < argc; i++)
+ {
+ int itmp;
+ if ((argv[i][0] != '-') || (uStringEqual(argv[i], "-")))
+ {
+ if (!xkblist)
+ {
+ if (inputFile == NULL)
+ inputFile = argv[i];
+ else if (outputFile == NULL)
+ outputFile = argv[i];
+ else if (warningLevel > 0)
+ {
+ WARN("Too many file names on command line\n");
+ ACTION3
+ ("Compiling %s, writing to %s, ignoring %s\n",
+ inputFile, outputFile, argv[i]);
+ }
+ }
+ else if (!AddMatchingFiles(argv[i]))
+ return False;
+ }
+ else if ((strcmp(argv[i], "-?") == 0)
+ || (strcmp(argv[i], "-help") == 0))
+ {
+ Usage(argc, argv);
+ exit(0);
+ }
+ else if ((strcmp(argv[i], "-a") == 0) && (!xkblist))
+ {
+ showImplicit = True;
+ }
+ else if ((strcmp(argv[i], "-C") == 0) && (!xkblist))
+ {
+ if ((outputFormat != WANT_DEFAULT)
+ && (outputFormat != WANT_C_HDR))
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple output file formats specified\n");
+ ACTION1("\"%s\" flag ignored\n", argv[i]);
+ }
+ }
+ else
+ outputFormat = WANT_C_HDR;
+ }
+#ifdef DEBUG
+ else if (strcmp(argv[i], "-d") == 0)
+ {
+ if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0])))
+ {
+ debugFlags = 1;
+ }
+ else
+ {
+ if (sscanf(argv[++i], "%i", &itmp) == 1)
+ debugFlags = itmp;
+ }
+ INFO1("Setting debug flags to %d\n", debugFlags);
+ }
+#endif
+ else if ((strcmp(argv[i], "-dflts") == 0) && (!xkblist))
+ {
+ computeDflts = True;
+ }
+ else if (strcmp(argv[i], "-em1") == 0)
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No pre-error message specified\n");
+ ACTION("Trailing \"-em1\" option ignored\n");
+ }
+ }
+ else if (preErrorMsg != NULL)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple pre-error messsages specified\n");
+ ACTION2("Compiling %s, ignoring %s\n",
+ preErrorMsg, argv[i]);
+ }
+ }
+ else
+ preErrorMsg = argv[i];
+ }
+ else if (strcmp(argv[i], "-emp") == 0)
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No error prefix specified\n");
+ ACTION("Trailing \"-emp\" option ignored\n");
+ }
+ }
+ else if (errorPrefix != NULL)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple error prefixes specified\n");
+ ACTION2("Compiling %s, ignoring %s\n",
+ errorPrefix, argv[i]);
+ }
+ }
+ else
+ errorPrefix = argv[i];
+ }
+ else if (strcmp(argv[i], "-eml") == 0)
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No post-error message specified\n");
+ ACTION("Trailing \"-eml\" option ignored\n");
+ }
+ }
+ else if (postErrorMsg != NULL)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple post-error messages specified\n");
+ ACTION2("Compiling %s, ignoring %s\n",
+ postErrorMsg, argv[i]);
+ }
+ }
+ else
+ postErrorMsg = argv[i];
+ }
+ else if ((strncmp(argv[i], "-I", 2) == 0) && (!xkblist))
+ {
+ if (!XkbAddDirectoryToPath(&argv[i][2]))
+ {
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ }
+ else if ((strncmp(argv[i], "-i", 2) == 0) && (!xkblist))
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ WARN("No device ID specified\n");
+ }
+ device_id = atoi(argv[i]);
+ }
+ else if ((strncmp(argv[i], "-l", 2) == 0) && (!xkblist))
+ {
+ if (outputFormat != WANT_DEFAULT)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple output file formats specified\n");
+ ACTION1("\"%s\" flag ignored\n", argv[i]);
+ }
+ }
+ else
+ {
+ if (argv[i][2] != '\0')
+ setVerboseFlags(&argv[i][2]);
+ xkblist = True;
+ if ((inputFile) && (!AddMatchingFiles(inputFile)))
+ return False;
+ else
+ inputFile = NULL;
+ if ((outputFile) && (!AddMatchingFiles(outputFile)))
+ return False;
+ else
+ outputFile = NULL;
+ }
+ }
+ else if ((strcmp(argv[i], "-m") == 0)
+ || (strcmp(argv[i], "-map") == 0))
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No map name specified\n");
+ ACTION1("Trailing \"%s\" option ignored\n", argv[i - 1]);
+ }
+ }
+ else if (xkblist)
+ {
+ if (!AddMapOnly(argv[i]))
+ return False;
+ }
+ else if (inputMap != NULL)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple map names specified\n");
+ ACTION2("Compiling %s, ignoring %s\n", inputMap, argv[i]);
+ }
+ }
+ else
+ inputMap = argv[i];
+ }
+ else if ((strcmp(argv[i], "-merge") == 0) && (!xkblist))
+ {
+ /* Ignored */
+ }
+ else if (strcmp(argv[i], "-o") == 0)
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No output file specified\n");
+ ACTION("Trailing \"-o\" option ignored\n");
+ }
+ }
+ else if (outputFile != NULL)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple output files specified\n");
+ ACTION2("Compiling %s, ignoring %s\n", outputFile,
+ argv[i]);
+ }
+ }
+ else
+ outputFile = argv[i];
+ }
+ else if (((strcmp(argv[i], "-opt") == 0)
+ || (strcmp(argv[i], "optional") == 0)) && (!xkblist))
+ {
+ if (++i >= argc)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No optional components specified\n");
+ ACTION1("Trailing \"%s\" option ignored\n", argv[i - 1]);
+ }
+ }
+ else
+ {
+ char *tmp2;
+ for (tmp2 = argv[i]; (*tmp2 != '\0'); tmp2++)
+ {
+ switch (*tmp2)
+ {
+ case 'c':
+ case 'C':
+ optionalParts |= XkmCompatMapMask;
+ break;
+ case 'g':
+ case 'G':
+ optionalParts |= XkmGeometryMask;
+ break;
+ case 'k':
+ case 'K':
+ optionalParts |= XkmKeyNamesMask;
+ break;
+ case 's':
+ case 'S':
+ optionalParts |= XkmSymbolsMask;
+ break;
+ case 't':
+ case 'T':
+ optionalParts |= XkmTypesMask;
+ break;
+ default:
+ if (warningLevel > 0)
+ {
+ WARN1
+ ("Illegal component for %s option\n",
+ argv[i - 1]);
+ ACTION1
+ ("Ignoring unknown specifier \"%c\"\n",
+ (unsigned int) *tmp2);
+ }
+ break;
+ }
+ }
+ }
+ }
+ else if (strncmp(argv[i], "-p", 2) == 0)
+ {
+ if (isdigit(argv[i][2]))
+ {
+ if (sscanf(&argv[i][2], "%i", &itmp) == 1)
+ dirsToStrip = itmp;
+ }
+ else if ((i < (argc - 1)) && (isdigit(argv[i + 1][0])))
+ {
+ if (sscanf(argv[++i], "%i", &itmp) == 1)
+ dirsToStrip = itmp;
+ }
+ else
+ {
+ dirsToStrip = 0;
+ }
+ if (warningLevel > 5)
+ INFO1("Setting path count to %d\n", dirsToStrip);
+ }
+ else if (strncmp(argv[i], "-R", 2) == 0)
+ {
+ if (argv[i][2] == '\0')
+ {
+ if (warningLevel > 0)
+ {
+ WARN("No root directory specified\n");
+ ACTION("Ignoring -R option\n");
+ }
+ }
+ else if (rootDir != NULL)
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple root directories specified\n");
+ ACTION2("Using %s, ignoring %s\n", rootDir, argv[i]);
+ }
+ }
+ else
+ {
+ rootDir = &argv[i][2];
+ if (warningLevel > 8)
+ {
+ WARN1("Changing root directory to \"%s\"\n", rootDir);
+ }
+ XkbAddDirectoryToPath(rootDir);
+ if (!XkbAddDirectoryToPath(rootDir) && (warningLevel>0)) {
+ WARN1("Couldn't change directory to \"%s\"\n", rootDir);
+ ACTION("Root directory (-R) option ignored\n");
+ rootDir = NULL;
+ }
+ }
+ }
+ else if ((strcmp(argv[i], "-synch") == 0)
+ || (strcmp(argv[i], "-s") == 0))
+ {
+ synch = True;
+ }
+ else if (strncmp(argv[i], "-v", 2) == 0)
+ {
+ char *str;
+ if (argv[i][2] != '\0')
+ str = &argv[i][2];
+ else if ((i < (argc - 1)) && (argv[i + 1][0] != '-'))
+ str = argv[++i];
+ else
+ str = NULL;
+ if (str)
+ setVerboseFlags(str);
+ }
+ else if (strncmp(argv[i], "-w", 2) == 0)
+ {
+ if ((i >= (argc - 1)) || (!isdigit(argv[i + 1][0])))
+ {
+ warningLevel = 0;
+ if (isdigit(argv[i][1]))
+ if (sscanf(&argv[i][1], "%i", &itmp) == 1)
+ warningLevel = itmp;
+ }
+ else
+ {
+ if (sscanf(argv[++i], "%i", &itmp) == 1)
+ warningLevel = itmp;
+ }
+ }
+ else if ((strcmp(argv[i], "-xkb") == 0) && (!xkblist))
+ {
+ if ((outputFormat != WANT_DEFAULT)
+ && (outputFormat != WANT_XKB_FILE))
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple output file formats specified\n");
+ ACTION1("\"%s\" flag ignored\n", argv[i]);
+ }
+ }
+ else
+ outputFormat = WANT_XKB_FILE;
+ }
+ else if ((strcmp(argv[i], "-xkm") == 0) && (!xkblist))
+ {
+ if ((outputFormat != WANT_DEFAULT)
+ && (outputFormat != WANT_XKM_FILE))
+ {
+ if (warningLevel > 0)
+ {
+ WARN("Multiple output file formats specified\n");
+ ACTION1("\"%s\" flag ignored\n", argv[i]);
+ }
+ }
+ else
+ outputFormat = WANT_XKM_FILE;
+ }
+ else
+ {
+ ERROR1("Unknown flag \"%s\" on command line\n", argv[i]);
+ Usage(argc, argv);
+ return False;
+ }
+ }
+ if (xkblist)
+ inputFormat = INPUT_XKB;
+ else if (inputFile == NULL)
+ {
+ ERROR("No input file specified\n");
+ return False;
+ }
+ else if (uStringEqual(inputFile, "-"))
+ {
+ inputFormat = INPUT_XKB;
+ }
+#ifndef WIN32
+ else if (strchr(inputFile, ':') == NULL)
+ {
+#else
+ else if ((strchr(inputFile, ':') == NULL) || (strlen(inputFile) > 2 &&
+ isalpha(inputFile[0]) &&
+ inputFile[1] == ':'
+ && strchr(inputFile + 2,
+ ':') == NULL))
+ {
+#endif
+ int len;
+ len = strlen(inputFile);
+ if (inputFile[len - 1] == ')')
+ {
+ char *tmp;
+ if ((tmp = strchr(inputFile, '(')) != NULL)
+ {
+ *tmp = '\0';
+ inputFile[len - 1] = '\0';
+ tmp++;
+ if (*tmp == '\0')
+ {
+ WARN("Empty map in filename\n");
+ ACTION("Ignored\n");
+ }
+ else if (inputMap == NULL)
+ {
+ inputMap = uStringDup(tmp);
+ }
+ else
+ {
+ WARN("Map specified in filename and with -m flag\n");
+ ACTION1("map from name (\"%s\") ignored\n", tmp);
+ }
+ }
+ else
+ {
+ ERROR1("Illegal name \"%s\" for input file\n", inputFile);
+ return False;
+ }
+ }
+ if ((len > 4) && (strcmp(&inputFile[len - 4], ".xkm") == 0))
+ {
+ inputFormat = INPUT_XKM;
+ }
+ else
+ {
+ FILE *file;
+ file = fopen(inputFile, "r");
+ if (file)
+ {
+ if (XkmProbe(file))
+ inputFormat = INPUT_XKM;
+ else
+ inputFormat = INPUT_XKB;
+ fclose(file);
+ }
+ else
+ {
+ fprintf(stderr, "Cannot open \"%s\" for reading\n",
+ inputFile);
+ return False;
+ }
+ }
+ }
+ else
+ {
+ inDpyName = inputFile;
+ inputFile = NULL;
+ inputFormat = INPUT_XKM;
+ }
+
+ if (outputFormat == WANT_DEFAULT)
+ {
+ if (xkblist)
+ outputFormat = WANT_LISTING;
+ else if (inputFormat == INPUT_XKB)
+ outputFormat = WANT_XKM_FILE;
+ else
+ outputFormat = WANT_XKB_FILE;
+ }
+ if ((outputFormat == WANT_LISTING) && (inputFormat != INPUT_XKB))
+ {
+ if (inputFile)
+ ERROR("Cannot generate a listing from a .xkm file (yet)\n");
+ else
+ ERROR("Cannot generate a listing from an X connection (yet)\n");
+ return False;
+ }
+ if (xkblist)
+ {
+ if (outputFile == NULL)
+ outputFile = uStringDup("-");
+ else if (strchr(outputFile, ':') != NULL)
+ {
+ ERROR("Cannot write a listing to an X connection\n");
+ return False;
+ }
+ }
+ else if ((!outputFile) && (inputFile) && uStringEqual(inputFile, "-"))
+ {
+ int len = strlen("stdin") + strlen(fileTypeExt[outputFormat]) + 2;
+ outputFile = uTypedCalloc(len, char);
+ if (outputFile == NULL)
+ {
+ WSGO("Cannot allocate space for output file name\n");
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ sprintf(outputFile, "stdin.%s", fileTypeExt[outputFormat]);
+ }
+ else if ((outputFile == NULL) && (inputFile != NULL))
+ {
+ int len;
+ char *base, *ext;
+
+ if (inputMap == NULL)
+ {
+ base = strrchr(inputFile, '/');
+ if (base == NULL)
+ base = inputFile;
+ else
+ base++;
+ }
+ else
+ base = inputMap;
+
+ len = strlen(base) + strlen(fileTypeExt[outputFormat]) + 2;
+ outputFile = uTypedCalloc(len, char);
+ if (outputFile == NULL)
+ {
+ WSGO("Cannot allocate space for output file name\n");
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ ext = strrchr(base, '.');
+ if (ext == NULL)
+ sprintf(outputFile, "%s.%s", base, fileTypeExt[outputFormat]);
+ else
+ {
+ strcpy(outputFile, base);
+ strcpy(&outputFile[ext - base + 1], fileTypeExt[outputFormat]);
+ }
+ }
+ else if (outputFile == NULL)
+ {
+ int len;
+ char *ch, *name, buf[128];
+ if (inDpyName[0] == ':')
+ snprintf(name = buf, sizeof(buf), "server%s", inDpyName);
+ else
+ name = inDpyName;
+
+ len = strlen(name) + strlen(fileTypeExt[outputFormat]) + 2;
+ outputFile = uTypedCalloc(len, char);
+ if (outputFile == NULL)
+ {
+ WSGO("Cannot allocate space for output file name\n");
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ strcpy(outputFile, name);
+ for (ch = outputFile; (*ch) != '\0'; ch++)
+ {
+ if (*ch == ':')
+ *ch = '-';
+ else if (*ch == '.')
+ *ch = '_';
+ }
+ *ch++ = '.';
+ strcpy(ch, fileTypeExt[outputFormat]);
+ }
+#ifdef WIN32
+ else if (strlen(outputFile) > 2 &&
+ isalpha(outputFile[0]) &&
+ outputFile[1] == ':' && strchr(outputFile + 2, ':') == NULL)
+ {
+ }
+#endif
+ else if (strchr(outputFile, ':') != NULL)
+ {
+ outDpyName = outputFile;
+ outputFile = NULL;
+ outputFormat = WANT_X_SERVER;
+ }
+ return True;
+}
+
+static Display *
+GetDisplay(char *program, char *dpyName)
+{
+ int mjr, mnr, error;
+ Display *dpy;
+
+ mjr = XkbMajorVersion;
+ mnr = XkbMinorVersion;
+ dpy = XkbOpenDisplay(dpyName, NULL, NULL, &mjr, &mnr, &error);
+ if (dpy == NULL)
+ {
+ switch (error)
+ {
+ case XkbOD_BadLibraryVersion:
+ INFO3("%s was compiled with XKB version %d.%02d\n",
+ program, XkbMajorVersion, XkbMinorVersion);
+ ERROR2("X library supports incompatible version %d.%02d\n",
+ mjr, mnr);
+ break;
+ case XkbOD_ConnectionRefused:
+ ERROR1("Cannot open display \"%s\"\n", dpyName);
+ break;
+ case XkbOD_NonXkbServer:
+ ERROR1("XKB extension not present on %s\n", dpyName);
+ break;
+ case XkbOD_BadServerVersion:
+ INFO3("%s was compiled with XKB version %d.%02d\n",
+ program, XkbMajorVersion, XkbMinorVersion);
+ ERROR3("Server %s uses incompatible version %d.%02d\n",
+ dpyName, mjr, mnr);
+ break;
+ default:
+ WSGO1("Unknown error %d from XkbOpenDisplay\n", error);
+ }
+ }
+ else if (synch)
+ XSynchronize(dpy, True);
+ return dpy;
+}
+
+/***====================================================================***/
+
+extern int yydebug;
+
+int
+main(int argc, char *argv[])
+{
+ FILE *file; /* input file (or stdin) */
+ XkbFile *rtrn;
+ XkbFile *mapToUse;
+ int ok;
+ XkbFileInfo result;
+ Status status;
+
+ yyin = stdin;
+ uSetEntryFile(NullString);
+ uSetDebugFile(NullString);
+ uSetErrorFile(NullString);
+
+ XkbInitIncludePath();
+ if (!parseArgs(argc, argv))
+ exit(1);
+#ifdef DEBUG
+ if (debugFlags & 0x2)
+ yydebug = 1;
+#endif
+ if (preErrorMsg)
+ uSetPreErrorMessage(preErrorMsg);
+ if (errorPrefix)
+ uSetErrorPrefix(errorPrefix);
+ if (postErrorMsg)
+ uSetPostErrorMessage(postErrorMsg);
+ file = NULL;
+ XkbInitAtoms(NULL);
+ XkbAddDefaultDirectoriesToPath();
+ if (xkblist)
+ {
+ Bool gotSome;
+ gotSome = GenerateListing(outputFile);
+ if ((warningLevel > 7) && (!gotSome))
+ return -1;
+ return 0;
+ }
+ if (inputFile != NULL)
+ {
+ if (uStringEqual(inputFile, "-"))
+ {
+ file = stdin;
+ inputFile = "stdin";
+ }
+ else
+ {
+ file = fopen(inputFile, "r");
+ }
+ }
+ else if (inDpyName != NULL)
+ {
+ inDpy = GetDisplay(argv[0], inDpyName);
+ if (!inDpy)
+ {
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ }
+ if (outDpyName != NULL)
+ {
+ outDpy = GetDisplay(argv[0], outDpyName);
+ if (!outDpy)
+ {
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ }
+ if ((inDpy == NULL) && (outDpy == NULL))
+ {
+ int mjr, mnr;
+ mjr = XkbMajorVersion;
+ mnr = XkbMinorVersion;
+ if (!XkbLibraryVersion(&mjr, &mnr))
+ {
+ INFO3("%s was compiled with XKB version %d.%02d\n",
+ argv[0], XkbMajorVersion, XkbMinorVersion);
+ ERROR2("X library supports incompatible version %d.%02d\n",
+ mjr, mnr);
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ }
+ if (file)
+ {
+ ok = True;
+ setScanState(inputFile, 1);
+ if ((inputFormat == INPUT_XKB) /* parse .xkb file */
+ && (XKBParseFile(file, &rtrn) && (rtrn != NULL)))
+ {
+ fclose(file);
+ mapToUse = rtrn;
+ if (inputMap != NULL) /* map specified on cmdline? */
+ {
+ while ((mapToUse)
+ && (!uStringEqual(mapToUse->name, inputMap)))
+ {
+ mapToUse = (XkbFile *) mapToUse->common.next;
+ }
+ if (!mapToUse)
+ {
+ FATAL2("No map named \"%s\" in \"%s\"\n",
+ inputMap, inputFile);
+ /* NOTREACHED */
+ }
+ }
+ else if (rtrn->common.next != NULL)
+ {
+ /* look for map with XkbLC_Default flag. */
+ mapToUse = rtrn;
+ for (; mapToUse; mapToUse = (XkbFile *) mapToUse->common.next)
+ {
+ if (mapToUse->flags & XkbLC_Default)
+ break;
+ }
+ if (!mapToUse)
+ {
+ mapToUse = rtrn;
+ if (warningLevel > 4)
+ {
+ WARN1
+ ("No map specified, but \"%s\" has several\n",
+ inputFile);
+ ACTION1
+ ("Using the first defined map, \"%s\"\n",
+ mapToUse->name);
+ }
+ }
+ }
+ bzero((char *) &result, sizeof(result));
+ result.type = mapToUse->type;
+ if ((result.xkb = XkbAllocKeyboard()) == NULL)
+ {
+ WSGO("Cannot allocate keyboard description\n");
+ /* NOTREACHED */
+ }
+ switch (mapToUse->type)
+ {
+ case XkmSemanticsFile:
+ case XkmLayoutFile:
+ case XkmKeymapFile:
+ ok = CompileKeymap(mapToUse, &result, MergeReplace);
+ break;
+ case XkmKeyNamesIndex:
+ ok = CompileKeycodes(mapToUse, &result, MergeReplace);
+ break;
+ case XkmTypesIndex:
+ ok = CompileKeyTypes(mapToUse, &result, MergeReplace);
+ break;
+ case XkmSymbolsIndex:
+ /* if it's just symbols, invent key names */
+ result.xkb->flags |= AutoKeyNames;
+ ok = False;
+ break;
+ case XkmCompatMapIndex:
+ ok = CompileCompatMap(mapToUse, &result, MergeReplace, NULL);
+ break;
+ case XkmGeometryFile:
+ case XkmGeometryIndex:
+ /* if it's just a geometry, invent key names */
+ result.xkb->flags |= AutoKeyNames;
+ ok = CompileGeometry(mapToUse, &result, MergeReplace);
+ break;
+ default:
+ WSGO1("Unknown file type %d\n", mapToUse->type);
+ ok = False;
+ break;
+ }
+ }
+ else if (inputFormat == INPUT_XKM) /* parse xkm file */
+ {
+ unsigned tmp;
+ bzero((char *) &result, sizeof(result));
+ if ((result.xkb = XkbAllocKeyboard()) == NULL)
+ {
+ WSGO("Cannot allocate keyboard description\n");
+ /* NOTREACHED */
+ }
+ tmp = XkmReadFile(file, 0, XkmKeymapLegal, &result);
+ if (tmp == XkmKeymapLegal)
+ {
+ ERROR1("Cannot read XKM file \"%s\"\n", inputFile);
+ ok = False;
+ }
+ }
+ else
+ {
+ INFO1("Errors encountered in %s; not compiled.\n", inputFile);
+ ok = False;
+ }
+ }
+ else if (inDpy != NULL)
+ {
+ bzero((char *) &result, sizeof(result));
+ result.type = XkmKeymapFile;
+ result.xkb = XkbGetMap(inDpy, XkbAllMapComponentsMask, device_id);
+ if (result.xkb == NULL)
+ WSGO("Cannot load keyboard description\n");
+ if (XkbGetIndicatorMap(inDpy, ~0, result.xkb) != Success)
+ WSGO("Could not load indicator map\n");
+ if (XkbGetControls(inDpy, XkbAllControlsMask, result.xkb) != Success)
+ WSGO("Could not load keyboard controls\n");
+ if (XkbGetCompatMap(inDpy, XkbAllCompatMask, result.xkb) != Success)
+ WSGO("Could not load compatibility map\n");
+ if (XkbGetNames(inDpy, XkbAllNamesMask, result.xkb) != Success)
+ WSGO("Could not load names\n");
+ if ((status = XkbGetGeometry(inDpy, result.xkb)) != Success)
+ {
+ if (warningLevel > 3)
+ {
+ char buf[100];
+ buf[0] = '\0';
+ XGetErrorText(inDpy, status, buf, 100);
+ WARN1("Could not load keyboard geometry for %s\n", inDpyName);
+ ACTION1("%s\n", buf);
+ ACTION("Resulting keymap file will not describe geometry\n");
+ }
+ }
+ if (computeDflts)
+ ok = (ComputeKbdDefaults(result.xkb) == Success);
+ else
+ ok = True;
+ }
+ else
+ {
+ fprintf(stderr, "Cannot open \"%s\" to compile\n", inputFile);
+ ok = 0;
+ }
+ if (ok)
+ {
+ FILE *out = stdout;
+ if ((inDpy != outDpy) &&
+ (XkbChangeKbdDisplay(outDpy, &result) != Success))
+ {
+ WSGO2("Error converting keyboard display from %s to %s\n",
+ inDpyName, outDpyName);
+ exit(1);
+ }
+ if (outputFile != NULL)
+ {
+ if (uStringEqual(outputFile, "-"))
+ outputFile = "stdout";
+ else
+ {
+ /*
+ * fix to prevent symlink attack (e.g.,
+ * ln -s /etc/passwd /var/tmp/server-0.xkm)
+ */
+ /*
+ * this patch may have POSIX, Linux, or GNU libc bias
+ * -- Branden Robinson
+ */
+ int outputFileFd;
+ int binMode = 0;
+ const char *openMode = "w";
+ unlink(outputFile);
+#ifdef O_BINARY
+ switch (outputFormat)
+ {
+ case WANT_XKM_FILE:
+ binMode = O_BINARY;
+ openMode = "wb";
+ break;
+ default:
+ binMode = 0;
+ break;
+ }
+#endif
+#ifdef _MSC_VER
+ outputFileFd= open(outputFile, O_WRONLY|O_CREAT|O_EXCL|binMode,_S_IREAD | _S_IWRITE);
+#else
+ outputFileFd =
+ open(outputFile, O_WRONLY | O_CREAT | O_EXCL,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
+ | S_IWOTH | binMode);
+#endif
+ if (outputFileFd < 0)
+ {
+ ERROR1
+ ("Cannot open \"%s\" to write keyboard description\n",
+ outputFile);
+ ACTION("Exiting\n");
+ exit(1);
+ }
+#ifndef WIN32
+ out = fdopen(outputFileFd, openMode);
+#else
+ close(outputFileFd);
+ out = fopen(outputFile, "wb");
+#endif
+ /* end BR */
+ if (out == NULL)
+ {
+ ERROR1
+ ("Cannot open \"%s\" to write keyboard description\n",
+ outputFile);
+ ACTION("Exiting\n");
+ exit(1);
+ }
+ }
+ }
+ switch (outputFormat)
+ {
+ case WANT_XKM_FILE:
+ ok = XkbWriteXKMFile(out, &result);
+ break;
+ case WANT_XKB_FILE:
+ ok = XkbWriteXKBFile(out, &result, showImplicit, NULL, NULL);
+ break;
+ case WANT_C_HDR:
+ ok = XkbWriteCFile(out, outputFile, &result);
+ break;
+ case WANT_X_SERVER:
+ if (!(ok = XkbWriteToServer(&result)))
+ {
+ ERROR2("%s in %s\n", _XkbErrMessages[_XkbErrCode],
+ _XkbErrLocation ? _XkbErrLocation : "unknown");
+ ACTION1("Couldn't write keyboard description to %s\n",
+ outDpyName);
+ }
+ break;
+ default:
+ WSGO1("Unknown output format %d\n", outputFormat);
+ ACTION("No output file created\n");
+ ok = False;
+ break;
+ }
+ if (outputFormat != WANT_X_SERVER)
+ {
+ if (fclose(out))
+ {
+ ERROR1("Cannot close \"%s\" properly (not enough space?)\n",
+ outputFile);
+ ok= False;
+ }
+ else if (!ok)
+ {
+ ERROR2("%s in %s\n", _XkbErrMessages[_XkbErrCode],
+ _XkbErrLocation ? _XkbErrLocation : "unknown");
+ }
+ if (!ok)
+ {
+ ACTION1("Output file \"%s\" removed\n", outputFile);
+ unlink(outputFile);
+ }
+ }
+ }
+ if (inDpy)
+ XCloseDisplay(inDpy);
+ inDpy = NULL;
+ if (outDpy)
+ XCloseDisplay(outDpy);
+ uFinishUp();
+ return (ok == 0);
+}
diff --git a/xkbcomp/xkbcomp.h b/xkbcomp/xkbcomp.h
index 6e02ed59c..0fefbca94 100644
--- a/xkbcomp/xkbcomp.h
+++ b/xkbcomp/xkbcomp.h
@@ -31,6 +31,7 @@
#define DEBUG_VAR debugFlags
#endif
+#include <unistd.h>
#include <X11/Xlib.h>
#include <X11/XKBlib.h>
diff --git a/xkbcomp/xkbparse.c b/xkbcomp/xkbparse.c
index 8bd026f42..83ade0e25 100644
--- a/xkbcomp/xkbparse.c
+++ b/xkbcomp/xkbparse.c
@@ -1,3542 +1,3546 @@
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
-
-/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-/* Using locations. */
-#define YYLSP_NEEDED 0
-
-
-
-/* Copy the first part of user declarations. */
-
-/* Line 189 of yacc.c */
-#line 91 "xkbparse.y"
-
-#ifdef DEBUG
-#define YYDEBUG 1
-#endif
-#define DEBUG_VAR parseDebug
-#include "parseutils.h"
-#include <X11/keysym.h>
-#include <X11/extensions/XKBgeom.h>
-#include <stdlib.h>
-
-unsigned int parseDebug;
-
-
-
-/* Line 189 of yacc.c */
-#line 88 "xkbparse.c"
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- END_OF_FILE = 0,
- ERROR_TOK = 255,
- XKB_KEYMAP = 1,
- XKB_KEYCODES = 2,
- XKB_TYPES = 3,
- XKB_SYMBOLS = 4,
- XKB_COMPATMAP = 5,
- XKB_GEOMETRY = 6,
- XKB_SEMANTICS = 7,
- XKB_LAYOUT = 8,
- INCLUDE = 10,
- OVERRIDE = 11,
- AUGMENT = 12,
- REPLACE = 13,
- ALTERNATE = 14,
- VIRTUAL_MODS = 20,
- TYPE = 21,
- INTERPRET = 22,
- ACTION_TOK = 23,
- KEY = 24,
- ALIAS = 25,
- GROUP = 26,
- MODIFIER_MAP = 27,
- INDICATOR = 28,
- SHAPE = 29,
- KEYS = 30,
- ROW = 31,
- SECTION = 32,
- OVERLAY = 33,
- TEXT = 34,
- OUTLINE = 35,
- SOLID = 36,
- LOGO = 37,
- VIRTUAL = 38,
- EQUALS = 40,
- PLUS = 41,
- MINUS = 42,
- DIVIDE = 43,
- TIMES = 44,
- OBRACE = 45,
- CBRACE = 46,
- OPAREN = 47,
- CPAREN = 48,
- OBRACKET = 49,
- CBRACKET = 50,
- DOT = 51,
- COMMA = 52,
- SEMI = 53,
- EXCLAM = 54,
- INVERT = 55,
- STRING = 60,
- INTEGER = 61,
- FLOAT = 62,
- IDENT = 63,
- KEYNAME = 64,
- PARTIAL = 70,
- DEFAULT = 71,
- HIDDEN = 72,
- ALPHANUMERIC_KEYS = 73,
- MODIFIER_KEYS = 74,
- KEYPAD_KEYS = 75,
- FUNCTION_KEYS = 76,
- ALTERNATE_GROUP = 77
- };
-#endif
-/* Tokens. */
-#define END_OF_FILE 0
-#define ERROR_TOK 255
-#define XKB_KEYMAP 1
-#define XKB_KEYCODES 2
-#define XKB_TYPES 3
-#define XKB_SYMBOLS 4
-#define XKB_COMPATMAP 5
-#define XKB_GEOMETRY 6
-#define XKB_SEMANTICS 7
-#define XKB_LAYOUT 8
-#define INCLUDE 10
-#define OVERRIDE 11
-#define AUGMENT 12
-#define REPLACE 13
-#define ALTERNATE 14
-#define VIRTUAL_MODS 20
-#define TYPE 21
-#define INTERPRET 22
-#define ACTION_TOK 23
-#define KEY 24
-#define ALIAS 25
-#define GROUP 26
-#define MODIFIER_MAP 27
-#define INDICATOR 28
-#define SHAPE 29
-#define KEYS 30
-#define ROW 31
-#define SECTION 32
-#define OVERLAY 33
-#define TEXT 34
-#define OUTLINE 35
-#define SOLID 36
-#define LOGO 37
-#define VIRTUAL 38
-#define EQUALS 40
-#define PLUS 41
-#define MINUS 42
-#define DIVIDE 43
-#define TIMES 44
-#define OBRACE 45
-#define CBRACE 46
-#define OPAREN 47
-#define CPAREN 48
-#define OBRACKET 49
-#define CBRACKET 50
-#define DOT 51
-#define COMMA 52
-#define SEMI 53
-#define EXCLAM 54
-#define INVERT 55
-#define STRING 60
-#define INTEGER 61
-#define FLOAT 62
-#define IDENT 63
-#define KEYNAME 64
-#define PARTIAL 70
-#define DEFAULT 71
-#define HIDDEN 72
-#define ALPHANUMERIC_KEYS 73
-#define MODIFIER_KEYS 74
-#define KEYPAD_KEYS 75
-#define FUNCTION_KEYS 76
-#define ALTERNATE_GROUP 77
-
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
-{
-
-/* Line 214 of yacc.c */
-#line 110 "xkbparse.y"
-
- int ival;
- unsigned uval;
- char *str;
- Atom sval;
- ParseCommon *any;
- ExprDef *expr;
- VarDef *var;
- VModDef *vmod;
- InterpDef *interp;
- KeyTypeDef *keyType;
- SymbolsDef *syms;
- ModMapDef *modMask;
- GroupCompatDef *groupCompat;
- IndicatorMapDef *ledMap;
- IndicatorNameDef *ledName;
- KeycodeDef *keyName;
- KeyAliasDef *keyAlias;
- ShapeDef *shape;
- SectionDef *section;
- RowDef *row;
- KeyDef *key;
- OverlayDef *overlay;
- OverlayKeyDef *olKey;
- OutlineDef *outline;
- DoodadDef *doodad;
- XkbFile *file;
-
-
-
-/* Line 214 of yacc.c */
-#line 285 "xkbparse.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-/* Copy the second part of user declarations. */
-
-
-/* Line 264 of yacc.c */
-#line 297 "xkbparse.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(e) ((void) (e))
-#else
-# define YYUSE(e) /* empty */
-#endif
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(n) (n)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
- int yyi;
-#endif
-{
- return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined _STDLIB_H \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef _STDLIB_H
-# define _STDLIB_H 1
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 18
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 706
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 65
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 73
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 184
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 335
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 257
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 yytranslate[] =
-{
- 0, 4, 5, 6, 7, 8, 9, 10, 11, 2,
- 12, 13, 14, 15, 16, 2, 2, 2, 2, 2,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, 33, 34, 35, 2,
- 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 2, 2, 2, 2,
- 52, 53, 54, 55, 56, 2, 2, 2, 2, 2,
- 57, 58, 59, 60, 61, 62, 63, 64, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 3, 1, 2
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 5, 7, 9, 12, 14, 22, 24,
- 26, 28, 31, 33, 41, 46, 48, 50, 52, 54,
- 56, 58, 59, 62, 64, 66, 68, 70, 72, 74,
- 76, 78, 80, 83, 84, 87, 90, 93, 96, 99,
- 102, 105, 108, 111, 114, 117, 120, 123, 126, 129,
- 134, 137, 141, 146, 152, 156, 160, 162, 164, 168,
- 175, 179, 181, 184, 186, 193, 200, 204, 206, 207,
- 211, 215, 217, 220, 222, 226, 230, 236, 243, 250,
- 256, 263, 270, 277, 284, 287, 289, 295, 297, 299,
- 301, 303, 306, 308, 314, 316, 320, 322, 324, 328,
- 335, 339, 341, 345, 349, 351, 355, 361, 365, 369,
- 371, 377, 384, 386, 388, 390, 392, 394, 396, 398,
- 400, 402, 404, 406, 408, 410, 412, 414, 416, 418,
- 420, 421, 423, 425, 427, 429, 431, 433, 434, 438,
- 440, 444, 448, 452, 456, 460, 462, 465, 468, 471,
- 474, 476, 481, 483, 487, 491, 493, 498, 500, 504,
- 509, 516, 518, 520, 522, 524, 526, 527, 531, 533,
- 535, 537, 539, 542, 544, 546, 548, 550, 552, 554,
- 556, 558, 560, 562, 563
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int16 yyrhs[] =
-{
- 66, 0, -1, 67, -1, 70, -1, 72, -1, 67,
- 68, -1, 68, -1, 74, 69, 136, 41, 70, 42,
- 49, -1, 4, -1, 10, -1, 11, -1, 70, 71,
- -1, 71, -1, 74, 73, 136, 41, 77, 42, 49,
- -1, 74, 73, 136, 77, -1, 5, -1, 6, -1,
- 8, -1, 7, -1, 9, -1, 75, -1, -1, 75,
- 76, -1, 76, -1, 57, -1, 58, -1, 59, -1,
- 60, -1, 61, -1, 62, -1, 63, -1, 64, -1,
- 77, 78, -1, -1, 116, 79, -1, 116, 82, -1,
- 116, 85, -1, 116, 80, -1, 116, 81, -1, 116,
- 88, -1, 116, 89, -1, 116, 94, -1, 116, 93,
- -1, 116, 95, -1, 116, 96, -1, 116, 97, -1,
- 116, 98, -1, 116, 112, -1, 117, 52, -1, 124,
- 36, 120, 49, -1, 134, 49, -1, 50, 134, 49,
- -1, 133, 36, 120, 49, -1, 22, 133, 36, 133,
- 49, -1, 17, 83, 49, -1, 83, 48, 84, -1,
- 84, -1, 134, -1, 134, 36, 120, -1, 19, 86,
- 41, 87, 42, 49, -1, 128, 37, 120, -1, 128,
- -1, 87, 79, -1, 79, -1, 18, 135, 41, 87,
- 42, 49, -1, 21, 133, 41, 90, 42, 49, -1,
- 90, 48, 91, -1, 91, -1, -1, 124, 36, 120,
- -1, 124, 36, 92, -1, 134, -1, 50, 134, -1,
- 92, -1, 45, 126, 46, -1, 45, 122, 46, -1,
- 23, 132, 36, 120, 49, -1, 24, 134, 41, 119,
- 42, 49, -1, 25, 135, 41, 87, 42, 49, -1,
- 25, 132, 36, 120, 49, -1, 35, 25, 132, 36,
- 120, 49, -1, 26, 135, 41, 108, 42, 49, -1,
- 26, 135, 41, 110, 42, 49, -1, 29, 135, 41,
- 99, 42, 49, -1, 99, 100, -1, 100, -1, 28,
- 41, 101, 42, 49, -1, 79, -1, 112, -1, 95,
- -1, 105, -1, 101, 102, -1, 102, -1, 27, 41,
- 103, 42, 49, -1, 79, -1, 103, 48, 104, -1,
- 104, -1, 133, -1, 41, 119, 42, -1, 30, 135,
- 41, 106, 42, 49, -1, 106, 48, 107, -1, 107,
- -1, 133, 36, 133, -1, 108, 48, 109, -1, 109,
- -1, 41, 110, 42, -1, 134, 36, 41, 110, 42,
- -1, 134, 36, 120, -1, 110, 48, 111, -1, 111,
- -1, 45, 129, 48, 129, 46, -1, 113, 135, 41,
- 87, 42, 49, -1, 31, -1, 32, -1, 33, -1,
- 34, -1, 134, -1, 115, -1, 20, -1, 19, -1,
- 18, -1, 21, -1, 23, -1, 24, -1, 25, -1,
- 26, -1, 28, -1, 29, -1, 31, -1, 117, -1,
- -1, 12, -1, 14, -1, 13, -1, 15, -1, 16,
- -1, 119, -1, -1, 119, 48, 120, -1, 120, -1,
- 120, 39, 120, -1, 120, 37, 120, -1, 120, 38,
- 120, -1, 120, 40, 120, -1, 124, 36, 120, -1,
- 121, -1, 38, 121, -1, 37, 121, -1, 50, 121,
- -1, 51, 121, -1, 124, -1, 114, 43, 118, 44,
- -1, 125, -1, 43, 120, 44, -1, 122, 48, 123,
- -1, 123, -1, 114, 43, 118, 44, -1, 114, -1,
- 114, 47, 114, -1, 114, 45, 120, 46, -1, 114,
- 47, 114, 45, 120, 46, -1, 135, -1, 132, -1,
- 131, -1, 133, -1, 127, -1, -1, 127, 48, 128,
- -1, 128, -1, 55, -1, 29, -1, 132, -1, 38,
- 130, -1, 130, -1, 54, -1, 53, -1, 54, -1,
- 53, -1, 56, -1, 55, -1, 58, -1, 52, -1,
- 137, -1, -1, 52, -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint16 yyrline[] =
-{
- 0, 168, 168, 170, 172, 176, 178, 182, 188, 189,
- 190, 193, 195, 199, 205, 210, 211, 212, 213, 214,
- 217, 218, 221, 222, 225, 226, 227, 228, 229, 230,
- 231, 232, 235, 237, 240, 245, 250, 255, 260, 265,
- 270, 275, 280, 285, 290, 295, 300, 305, 310, 322,
- 324, 326, 330, 341, 351, 355, 357, 361, 363, 367,
- 376, 378, 382, 384, 388, 394, 400, 402, 404, 407,
- 409, 411, 413, 415, 419, 421, 425, 429, 433, 437,
- 439, 443, 445, 453, 457, 459, 463, 465, 467, 469,
- 471, 475, 477, 481, 483, 487, 489, 493, 495, 499,
- 503, 508, 512, 516, 518, 522, 524, 526, 530, 532,
- 536, 546, 550, 551, 552, 553, 556, 557, 560, 562,
- 564, 566, 568, 570, 572, 574, 576, 578, 580, 584,
- 585, 588, 589, 590, 591, 592, 595, 596, 599, 601,
- 605, 607, 609, 611, 613, 615, 619, 621, 623, 625,
- 627, 629, 631, 633, 637, 639, 643, 647, 654, 662,
- 671, 682, 689, 696, 703, 714, 715, 718, 720, 724,
- 739, 743, 750, 751, 754, 755, 758, 761, 764, 767,
- 768, 771, 774, 775, 778
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "END_OF_FILE", "error", "$undefined", "ERROR_TOK", "XKB_KEYMAP",
- "XKB_KEYCODES", "XKB_TYPES", "XKB_SYMBOLS", "XKB_COMPATMAP",
- "XKB_GEOMETRY", "XKB_SEMANTICS", "XKB_LAYOUT", "INCLUDE", "OVERRIDE",
- "AUGMENT", "REPLACE", "ALTERNATE", "VIRTUAL_MODS", "TYPE", "INTERPRET",
- "ACTION_TOK", "KEY", "ALIAS", "GROUP", "MODIFIER_MAP", "INDICATOR",
- "SHAPE", "KEYS", "ROW", "SECTION", "OVERLAY", "TEXT", "OUTLINE", "SOLID",
- "LOGO", "VIRTUAL", "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES",
- "OBRACE", "CBRACE", "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT",
- "COMMA", "SEMI", "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT",
- "IDENT", "KEYNAME", "PARTIAL", "DEFAULT", "HIDDEN", "ALPHANUMERIC_KEYS",
- "MODIFIER_KEYS", "KEYPAD_KEYS", "FUNCTION_KEYS", "ALTERNATE_GROUP",
- "$accept", "XkbFile", "XkbCompMapList", "XkbCompositeMap",
- "XkbCompositeType", "XkbMapConfigList", "XkbMapConfig", "XkbConfig",
- "FileType", "OptFlags", "Flags", "Flag", "DeclList", "Decl", "VarDecl",
- "KeyNameDecl", "KeyAliasDecl", "VModDecl", "VModDefList", "VModDef",
- "InterpretDecl", "InterpretMatch", "VarDeclList", "KeyTypeDecl",
- "SymbolsDecl", "SymbolsBody", "SymbolsVarDecl", "ArrayInit",
- "GroupCompatDecl", "ModMapDecl", "IndicatorMapDecl", "IndicatorNameDecl",
- "ShapeDecl", "SectionDecl", "SectionBody", "SectionBodyItem", "RowBody",
- "RowBodyItem", "Keys", "Key", "OverlayDecl", "OverlayKeyList",
- "OverlayKey", "OutlineList", "OutlineInList", "CoordList", "Coord",
- "DoodadDecl", "DoodadType", "FieldSpec", "Element", "OptMergeMode",
- "MergeMode", "OptExprList", "ExprList", "Expr", "Term", "ActionList",
- "Action", "Lhs", "Terminal", "OptKeySymList", "KeySymList", "KeySym",
- "SignedNumber", "Number", "Float", "Integer", "KeyName", "Ident",
- "String", "OptMapName", "MapName", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 255, 1, 2, 3, 4, 5, 6,
- 7, 8, 10, 11, 12, 13, 14, 20, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- 33, 34, 35, 36, 37, 38, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 60, 61, 62, 63, 64, 70, 71, 72,
- 73, 74, 75, 76, 77
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 65, 66, 66, 66, 67, 67, 68, 69, 69,
- 69, 70, 70, 71, 72, 73, 73, 73, 73, 73,
- 74, 74, 75, 75, 76, 76, 76, 76, 76, 76,
- 76, 76, 77, 77, 78, 78, 78, 78, 78, 78,
- 78, 78, 78, 78, 78, 78, 78, 78, 78, 79,
- 79, 79, 80, 81, 82, 83, 83, 84, 84, 85,
- 86, 86, 87, 87, 88, 89, 90, 90, 90, 91,
- 91, 91, 91, 91, 92, 92, 93, 94, 95, 96,
- 96, 97, 97, 98, 99, 99, 100, 100, 100, 100,
- 100, 101, 101, 102, 102, 103, 103, 104, 104, 105,
- 106, 106, 107, 108, 108, 109, 109, 109, 110, 110,
- 111, 112, 113, 113, 113, 113, 114, 114, 115, 115,
- 115, 115, 115, 115, 115, 115, 115, 115, 115, 116,
- 116, 117, 117, 117, 117, 117, 118, 118, 119, 119,
- 120, 120, 120, 120, 120, 120, 121, 121, 121, 121,
- 121, 121, 121, 121, 122, 122, 123, 124, 124, 124,
- 124, 125, 125, 125, 125, 126, 126, 127, 127, 128,
- 128, 128, 129, 129, 130, 130, 131, 132, 133, 134,
- 134, 135, 136, 136, 137
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 1, 1, 2, 1, 7, 1, 1,
- 1, 2, 1, 7, 4, 1, 1, 1, 1, 1,
- 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 2, 0, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 4,
- 2, 3, 4, 5, 3, 3, 1, 1, 3, 6,
- 3, 1, 2, 1, 6, 6, 3, 1, 0, 3,
- 3, 1, 2, 1, 3, 3, 5, 6, 6, 5,
- 6, 6, 6, 6, 2, 1, 5, 1, 1, 1,
- 1, 2, 1, 5, 1, 3, 1, 1, 3, 6,
- 3, 1, 3, 3, 1, 3, 5, 3, 3, 1,
- 5, 6, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 0, 3, 1,
- 3, 3, 3, 3, 3, 1, 2, 2, 2, 2,
- 1, 4, 1, 3, 3, 1, 4, 1, 3, 4,
- 6, 1, 1, 1, 1, 1, 0, 3, 1, 1,
- 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 21, 24, 25, 26, 27, 28, 29, 30, 31, 0,
- 21, 6, 21, 12, 4, 0, 20, 23, 1, 5,
- 0, 11, 0, 8, 15, 16, 18, 17, 19, 9,
- 10, 183, 183, 22, 183, 184, 0, 182, 33, 0,
- 21, 33, 130, 21, 130, 131, 133, 132, 134, 135,
- 32, 0, 129, 0, 0, 0, 120, 119, 118, 121,
- 0, 122, 123, 124, 125, 126, 127, 128, 113, 114,
- 115, 0, 0, 179, 178, 180, 34, 37, 38, 35,
- 36, 39, 40, 42, 41, 43, 44, 45, 46, 47,
- 0, 157, 117, 0, 0, 116, 48, 7, 13, 0,
- 56, 57, 181, 0, 170, 177, 169, 0, 61, 171,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 50, 0, 54, 0, 0,
- 0, 0, 68, 0, 0, 0, 0, 0, 0, 0,
- 0, 51, 0, 120, 119, 121, 122, 123, 124, 125,
- 127, 128, 0, 0, 0, 0, 0, 176, 157, 0,
- 145, 150, 152, 163, 162, 164, 116, 161, 158, 0,
- 0, 55, 58, 63, 0, 0, 60, 166, 0, 0,
- 67, 73, 0, 116, 0, 0, 0, 139, 0, 0,
- 0, 0, 0, 104, 0, 109, 0, 124, 126, 0,
- 87, 89, 0, 85, 90, 88, 0, 0, 147, 150,
- 146, 0, 148, 149, 137, 0, 0, 0, 0, 159,
- 0, 0, 49, 52, 0, 62, 0, 170, 169, 0,
- 0, 155, 0, 165, 168, 72, 0, 0, 0, 53,
- 76, 0, 0, 79, 0, 0, 0, 175, 174, 0,
- 173, 0, 0, 0, 0, 0, 0, 0, 0, 84,
- 0, 0, 153, 0, 136, 141, 142, 140, 143, 144,
- 0, 64, 59, 137, 75, 0, 74, 0, 65, 66,
- 70, 69, 77, 138, 78, 105, 172, 0, 81, 103,
- 82, 108, 0, 107, 0, 94, 0, 92, 0, 83,
- 80, 111, 151, 160, 0, 154, 167, 0, 0, 0,
- 0, 91, 0, 101, 0, 156, 110, 106, 0, 0,
- 96, 97, 86, 0, 0, 0, 0, 0, 0, 99,
- 100, 102, 98, 93, 95
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int16 yydefgoto[] =
-{
- -1, 9, 10, 11, 31, 12, 13, 14, 32, 22,
- 16, 17, 42, 50, 173, 77, 78, 79, 99, 100,
- 80, 107, 174, 81, 82, 179, 180, 181, 83, 84,
- 201, 86, 87, 88, 202, 203, 296, 297, 319, 320,
- 204, 312, 313, 192, 193, 194, 195, 205, 90, 158,
- 92, 51, 52, 263, 264, 187, 160, 230, 231, 161,
- 162, 232, 233, 108, 249, 250, 163, 164, 165, 166,
- 167, 36, 37
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -188
-static const yytype_int16 yypact[] =
-{
- 628, -188, -188, -188, -188, -188, -188, -188, -188, 12,
- 4, -188, 58, -188, -188, 695, 628, -188, -188, -188,
- 121, -188, 408, -188, -188, -188, -188, -188, -188, -188,
- -188, -9, -9, -188, -9, -188, 19, -188, 45, 45,
- 628, -188, 174, 620, 137, -188, -188, -188, -188, -188,
- -188, 317, 39, -15, 50, 1, 59, -18, -188, 72,
- 72, 106, 1, -27, 59, -188, 59, 62, -188, -188,
- -188, 117, 1, -188, -188, -188, -188, -188, -188, -188,
- -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
- 59, 51, -188, 125, 146, 134, -188, -188, -188, 132,
- -188, 163, -188, 168, -188, -188, -188, 173, 179, -188,
- 178, 186, 190, 194, 206, 204, 208, 221, 106, 216,
- 225, 265, 640, 265, 265, -188, 1, -188, 265, 599,
- 599, 265, 470, 72, 265, 265, 265, 599, -26, 21,
- 239, -188, 599, -188, -188, -188, -188, -188, -188, -188,
- -188, -188, 265, 265, 265, 265, 265, -188, 159, 232,
- -188, 240, -188, -188, -188, -188, -188, -188, 223, 98,
- 156, -188, 260, -188, 485, 513, 260, 617, 1, 30,
- -188, -188, 243, 32, 231, 192, 64, 260, 199, 528,
- 236, 35, 127, -188, 128, -188, 251, 59, 270, 59,
- -188, -188, 422, -188, -188, -188, 265, 556, -188, -188,
- -188, 342, -188, -188, 265, 265, 265, 265, 265, -188,
- 265, 265, -188, -188, 263, -188, 264, 249, 271, 281,
- 61, -188, 279, 278, -188, -188, 280, 470, 340, -188,
- -188, 283, 265, -188, 284, 129, 16, -188, -188, 282,
- -188, 298, -34, 308, 236, 381, 576, 287, 321, -188,
- 215, 325, -188, 332, 336, 158, 158, -188, -188, 260,
- 316, -188, -188, 265, -188, 640, -188, -18, -188, -188,
- -188, 260, -188, 260, -188, -188, -188, 35, -188, -188,
- -188, -188, 236, 260, 346, -188, 442, -188, 72, -188,
- -188, -188, -188, -188, 344, -188, -188, 343, 143, -28,
- 348, -188, 176, -188, 367, -188, -188, -188, 265, 198,
- -188, -188, -188, 359, 72, 72, 202, 362, -28, -188,
- -188, -188, -188, -188, -188
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
-{
- -188, -188, -188, 410, -188, 383, -7, -188, 399, 38,
- -188, 409, 385, -188, -35, -188, -188, -188, -188, 301,
- -188, -188, -47, -188, -188, -188, 191, 200, -188, -188,
- 378, -188, -188, -188, -188, 228, -188, 148, -188, 130,
- -188, -188, 133, -188, 197, -187, 205, 423, -188, 26,
- -188, -188, -188, 203, -134, 89, 104, -188, 207, -29,
- -188, -188, -188, -175, 188, 233, -188, -43, -51, -45,
- -33, 109, -188
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -180
-static const yytype_int16 yytable[] =
-{
- 94, 186, 234, 245, -2, 21, 95, 190, 110, 111,
- 101, 104, 18, 318, 109, 190, 76, 113, 112, 191,
- 114, 73, 93, 103, 75, 102, 105, 119, 74, 73,
- 115, 116, 75, 117, 97, 105, 21, 106, 15, 143,
- 144, 58, 145, 35, 146, 147, 197, 149, 20, 198,
- 150, 199, 67, 68, 69, 70, 73, 120, -3, 75,
- 40, 1, 2, 3, 4, 5, 6, 7, 8, 247,
- 248, 72, 236, 246, -71, 140, 73, 91, 237, 75,
- -71, 101, 184, 175, 95, 95, 41, 183, 247, 248,
- 189, 96, 95, 196, 95, 207, 121, 95, 122, 98,
- 93, 93, 306, 182, 200, 308, 241, 274, 93, 275,
- 93, 102, 242, 93, -112, 1, 2, 3, 4, 5,
- 6, 7, 8, 209, 209, 23, 209, 209, 74, 95,
- 95, 29, 30, 235, 109, 215, 216, 217, 218, 225,
- 225, 38, 118, 39, 95, 93, 93, 222, 168, 45,
- 46, 47, 48, 49, 225, 91, 91, 95, 91, 105,
- 93, 123, 95, 91, 115, 91, 257, 200, 91, 251,
- 253, 285, 225, 93, -14, 252, 254, 254, 93, 54,
- 126, 127, 124, 125, 326, 317, 45, 46, 47, 48,
- 49, 254, 183, 215, 216, 217, 218, 217, 218, 128,
- 91, 91, 214, 229, 121, 223, 122, 196, 182, 129,
- 159, 95, 169, 170, 130, 91, 131, 172, 323, 132,
- 176, 295, 133, 185, 324, 188, 134, 93, 91, 215,
- 216, 217, 218, 91, 109, 135, 215, 216, 217, 218,
- 327, 240, 136, 211, 332, 137, 328, 314, 243, 138,
- 242, 95, 215, 216, 217, 218, 208, 210, 321, 212,
- 213, 295, 139, 91, 300, 141, 142, 93, 221, 215,
- 216, 217, 218, 314, 331, 206, 220, 321, 219, 238,
- 239, 191, 91, 143, 144, 58, 145, 255, 146, 147,
- 148, 149, -127, 65, 150, 260, 151, 215, 216, 217,
- 218, 229, 152, 153, 265, 266, 267, 268, 154, 269,
- 270, 256, 271, 272, -179, 155, 156, 102, 105, 157,
- 73, 74, 91, 75, 273, 276, 277, 281, 298, 278,
- 287, 283, 282, 284, 55, 56, 57, 58, 59, 60,
- 61, 62, 63, 64, 293, 65, 66, 288, 67, 68,
- 69, 70, 71, 215, 216, 217, 218, 290, 143, 144,
- 58, 145, 303, 146, 147, 148, 149, 72, 65, 150,
- 299, 151, 73, 74, 301, 75, 302, 152, 153, 215,
- 216, 217, 218, 154, 242, 177, 262, 309, 315, 316,
- 155, 156, 102, 105, 157, 73, 74, 322, 75, 143,
- 144, 58, 145, 325, 146, 147, 148, 149, 329, 65,
- 150, 333, 151, 24, 25, 26, 27, 28, 152, 153,
- 19, 34, 292, 43, 154, 33, 44, 171, 279, 85,
- 259, 155, 156, 102, 105, 157, 73, 74, 280, 75,
- 143, 144, 58, 145, 311, 146, 147, 197, 149, 289,
- 198, 150, 199, 67, 68, 69, 70, 330, 334, 291,
- 143, 144, 58, 145, 258, 146, 147, 148, 149, 294,
- 65, 150, 72, 151, 89, 307, 304, 73, 0, 286,
- 75, 0, 305, 0, 310, 0, 0, 0, 143, 144,
- 58, 145, 72, 146, 147, 148, 149, 73, 65, 150,
- 75, 151, 0, 143, 144, 58, 145, 0, 146, 147,
- 148, 149, 0, 65, 150, 177, 151, 0, 0, 0,
- 178, 0, 0, 0, 0, 73, 0, 224, 75, 0,
- 0, 143, 144, 58, 145, 72, 146, 147, 148, 149,
- 73, 65, 150, 75, 151, 0, 143, 144, 58, 145,
- 0, 146, 147, 148, 149, 226, 65, 150, 0, 151,
- 0, 0, 0, 72, 0, 0, 0, 0, 73, 0,
- 244, 75, 0, 0, 143, 144, 58, 145, 72, 146,
- 147, 148, 149, 73, 65, 150, 75, 151, 0, 0,
- 0, 0, 0, 0, 143, 144, 58, 145, 261, 146,
- 147, 148, 149, 294, 65, 150, 72, 151, 0, 0,
- 0, 73, 0, 0, 75, 0, 0, 143, 144, 58,
- 145, 0, 146, 147, 148, 149, 72, 65, 150, 0,
- 151, 73, 0, 0, 75, 143, 144, 58, 145, 0,
- 146, 147, 148, 149, 0, 65, 227, 0, 151, 72,
- 0, 0, 0, 0, 73, 0, 0, 75, 143, 144,
- 58, 145, 53, 146, 147, 148, 149, 0, 65, 150,
- 105, 151, 228, 0, 0, 75, 0, 1, 2, 3,
- 4, 5, 6, 7, 8, 1, 2, 3, 4, 5,
- 6, 7, 8, 0, 0, 73, 0, 0, 75, 23,
- 24, 25, 26, 27, 28, 29, 30
-};
-
-static const yytype_int16 yycheck[] =
-{
- 51, 135, 177, 190, 0, 12, 51, 41, 59, 60,
- 55, 29, 0, 41, 57, 41, 51, 62, 61, 45,
- 63, 55, 51, 56, 58, 52, 53, 72, 56, 55,
- 63, 64, 58, 66, 49, 53, 43, 55, 0, 18,
- 19, 20, 21, 52, 23, 24, 25, 26, 10, 28,
- 29, 30, 31, 32, 33, 34, 55, 90, 0, 58,
- 41, 57, 58, 59, 60, 61, 62, 63, 64, 53,
- 54, 50, 42, 38, 42, 118, 55, 51, 48, 58,
- 48, 126, 133, 130, 129, 130, 41, 132, 53, 54,
- 137, 52, 137, 138, 139, 142, 45, 142, 47, 49,
- 129, 130, 277, 132, 139, 292, 42, 46, 137, 48,
- 139, 52, 48, 142, 52, 57, 58, 59, 60, 61,
- 62, 63, 64, 152, 153, 4, 155, 156, 56, 174,
- 175, 10, 11, 178, 177, 37, 38, 39, 40, 174,
- 175, 32, 25, 34, 189, 174, 175, 49, 122, 12,
- 13, 14, 15, 16, 189, 129, 130, 202, 132, 53,
- 189, 36, 207, 137, 197, 139, 199, 202, 142, 42,
- 42, 42, 207, 202, 0, 48, 48, 48, 207, 42,
- 48, 49, 36, 49, 318, 42, 12, 13, 14, 15,
- 16, 48, 237, 37, 38, 39, 40, 39, 40, 36,
- 174, 175, 43, 177, 45, 49, 47, 252, 237, 41,
- 121, 256, 123, 124, 41, 189, 37, 128, 42, 41,
- 131, 256, 36, 134, 48, 136, 36, 256, 202, 37,
- 38, 39, 40, 207, 277, 41, 37, 38, 39, 40,
- 42, 49, 36, 154, 42, 41, 48, 298, 49, 41,
- 48, 296, 37, 38, 39, 40, 152, 153, 309, 155,
- 156, 296, 41, 237, 49, 49, 41, 296, 45, 37,
- 38, 39, 40, 324, 325, 36, 36, 328, 46, 36,
- 49, 45, 256, 18, 19, 20, 21, 36, 23, 24,
- 25, 26, 43, 28, 29, 206, 31, 37, 38, 39,
- 40, 275, 37, 38, 215, 216, 217, 218, 43, 220,
- 221, 41, 49, 49, 43, 50, 51, 52, 53, 54,
- 55, 56, 296, 58, 43, 46, 48, 238, 41, 49,
- 48, 242, 49, 49, 17, 18, 19, 20, 21, 22,
- 23, 24, 25, 26, 255, 28, 29, 49, 31, 32,
- 33, 34, 35, 37, 38, 39, 40, 49, 18, 19,
- 20, 21, 46, 23, 24, 25, 26, 50, 28, 29,
- 49, 31, 55, 56, 49, 58, 44, 37, 38, 37,
- 38, 39, 40, 43, 48, 45, 44, 41, 44, 46,
- 50, 51, 52, 53, 54, 55, 56, 49, 58, 18,
- 19, 20, 21, 36, 23, 24, 25, 26, 49, 28,
- 29, 49, 31, 5, 6, 7, 8, 9, 37, 38,
- 10, 22, 41, 40, 43, 16, 41, 126, 237, 51,
- 202, 50, 51, 52, 53, 54, 55, 56, 238, 58,
- 18, 19, 20, 21, 296, 23, 24, 25, 26, 252,
- 28, 29, 30, 31, 32, 33, 34, 324, 328, 254,
- 18, 19, 20, 21, 42, 23, 24, 25, 26, 27,
- 28, 29, 50, 31, 51, 287, 273, 55, -1, 246,
- 58, -1, 275, -1, 42, -1, -1, -1, 18, 19,
- 20, 21, 50, 23, 24, 25, 26, 55, 28, 29,
- 58, 31, -1, 18, 19, 20, 21, -1, 23, 24,
- 25, 26, -1, 28, 29, 45, 31, -1, -1, -1,
- 50, -1, -1, -1, -1, 55, -1, 42, 58, -1,
- -1, 18, 19, 20, 21, 50, 23, 24, 25, 26,
- 55, 28, 29, 58, 31, -1, 18, 19, 20, 21,
- -1, 23, 24, 25, 26, 42, 28, 29, -1, 31,
- -1, -1, -1, 50, -1, -1, -1, -1, 55, -1,
- 42, 58, -1, -1, 18, 19, 20, 21, 50, 23,
- 24, 25, 26, 55, 28, 29, 58, 31, -1, -1,
- -1, -1, -1, -1, 18, 19, 20, 21, 42, 23,
- 24, 25, 26, 27, 28, 29, 50, 31, -1, -1,
- -1, 55, -1, -1, 58, -1, -1, 18, 19, 20,
- 21, -1, 23, 24, 25, 26, 50, 28, 29, -1,
- 31, 55, -1, -1, 58, 18, 19, 20, 21, -1,
- 23, 24, 25, 26, -1, 28, 29, -1, 31, 50,
- -1, -1, -1, -1, 55, -1, -1, 58, 18, 19,
- 20, 21, 42, 23, 24, 25, 26, -1, 28, 29,
- 53, 31, 55, -1, -1, 58, -1, 57, 58, 59,
- 60, 61, 62, 63, 64, 57, 58, 59, 60, 61,
- 62, 63, 64, -1, -1, 55, -1, -1, 58, 4,
- 5, 6, 7, 8, 9, 10, 11
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 57, 58, 59, 60, 61, 62, 63, 64, 66,
- 67, 68, 70, 71, 72, 74, 75, 76, 0, 68,
- 74, 71, 74, 4, 5, 6, 7, 8, 9, 10,
- 11, 69, 73, 76, 73, 52, 136, 137, 136, 136,
- 41, 41, 77, 70, 77, 12, 13, 14, 15, 16,
- 78, 116, 117, 42, 42, 17, 18, 19, 20, 21,
- 22, 23, 24, 25, 26, 28, 29, 31, 32, 33,
- 34, 35, 50, 55, 56, 58, 79, 80, 81, 82,
- 85, 88, 89, 93, 94, 95, 96, 97, 98, 112,
- 113, 114, 115, 124, 133, 134, 52, 49, 49, 83,
- 84, 134, 52, 135, 29, 53, 55, 86, 128, 132,
- 133, 133, 132, 134, 132, 135, 135, 135, 25, 134,
- 135, 45, 47, 36, 36, 49, 48, 49, 36, 41,
- 41, 37, 41, 36, 36, 41, 36, 41, 41, 41,
- 132, 49, 41, 18, 19, 21, 23, 24, 25, 26,
- 29, 31, 37, 38, 43, 50, 51, 54, 114, 120,
- 121, 124, 125, 131, 132, 133, 134, 135, 114, 120,
- 120, 84, 120, 79, 87, 87, 120, 45, 50, 90,
- 91, 92, 124, 134, 133, 120, 119, 120, 120, 87,
- 41, 45, 108, 109, 110, 111, 134, 25, 28, 30,
- 79, 95, 99, 100, 105, 112, 36, 87, 121, 124,
- 121, 120, 121, 121, 43, 37, 38, 39, 40, 46,
- 36, 45, 49, 49, 42, 79, 42, 29, 55, 114,
- 122, 123, 126, 127, 128, 134, 42, 48, 36, 49,
- 49, 42, 48, 49, 42, 110, 38, 53, 54, 129,
- 130, 42, 48, 42, 48, 36, 41, 135, 42, 100,
- 120, 42, 44, 118, 119, 120, 120, 120, 120, 120,
- 120, 49, 49, 43, 46, 48, 46, 48, 49, 91,
- 92, 120, 49, 120, 49, 42, 130, 48, 49, 109,
- 49, 111, 41, 120, 27, 79, 101, 102, 41, 49,
- 49, 49, 44, 46, 118, 123, 128, 129, 110, 41,
- 42, 102, 106, 107, 133, 44, 46, 42, 41, 103,
- 104, 133, 49, 42, 48, 36, 119, 42, 48, 49,
- 107, 133, 42, 49, 104
-};
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-
-#define YYFAIL goto yyerrlab
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK (1); \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (YYID (N)) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (YYID (0))
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into YYRESULT an error message about the unexpected token
- YYCHAR while in state YYSTATE. Return the number of bytes copied,
- including the terminating null byte. If YYRESULT is null, do not
- copy anything; just return the number of bytes that would be
- copied. As a special case, return 0 if an ordinary "syntax error"
- message will do. Return YYSIZE_MAXIMUM if overflow occurs during
- size calculation. */
-static YYSIZE_T
-yysyntax_error (char *yyresult, int yystate, int yychar)
-{
- int yyn = yypact[yystate];
-
- if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
- return 0;
- else
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-# if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-# endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= (yysize1 < yysize);
- yysize = yysize1;
-
- if (yysize_overflow)
- return YYSIZE_MAXIMUM;
-
- if (yyresult)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yyresult;
- int yyi = 0;
- while ((*yyp = *yyf) != '\0')
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- }
- return yysize;
- }
-}
-#endif /* YYERROR_VERBOSE */
-
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
-{
- YYUSE (yyvaluep);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
- {
-
- default:
- break;
- }
-}
-
-/* Prevent warnings from -Wmissing-prototypes. */
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void *YYPARSE_PARAM);
-#else
-int yyparse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-/* The lookahead symbol. */
-int yychar;
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-
-
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
- yyssp = yyss;
- yyvsp = yyvs;
-
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- *++yyvsp = yylval;
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 2:
-
-/* Line 1455 of yacc.c */
-#line 169 "xkbparse.y"
- { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
- break;
-
- case 3:
-
-/* Line 1455 of yacc.c */
-#line 171 "xkbparse.y"
- { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
- break;
-
- case 4:
-
-/* Line 1455 of yacc.c */
-#line 173 "xkbparse.y"
- { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
- break;
-
- case 5:
-
-/* Line 1455 of yacc.c */
-#line 177 "xkbparse.y"
- { (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); }
- break;
-
- case 6:
-
-/* Line 1455 of yacc.c */
-#line 179 "xkbparse.y"
- { (yyval.file)= (yyvsp[(1) - (1)].file); }
- break;
-
- case 7:
-
-/* Line 1455 of yacc.c */
-#line 185 "xkbparse.y"
- { (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),&(yyvsp[(5) - (7)].file)->common,(yyvsp[(1) - (7)].uval)); }
- break;
-
- case 8:
-
-/* Line 1455 of yacc.c */
-#line 188 "xkbparse.y"
- { (yyval.uval)= XkmKeymapFile; }
- break;
-
- case 9:
-
-/* Line 1455 of yacc.c */
-#line 189 "xkbparse.y"
- { (yyval.uval)= XkmSemanticsFile; }
- break;
-
- case 10:
-
-/* Line 1455 of yacc.c */
-#line 190 "xkbparse.y"
- { (yyval.uval)= XkmLayoutFile; }
- break;
-
- case 11:
-
-/* Line 1455 of yacc.c */
-#line 194 "xkbparse.y"
- { (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); }
- break;
-
- case 12:
-
-/* Line 1455 of yacc.c */
-#line 196 "xkbparse.y"
- { (yyval.file)= (yyvsp[(1) - (1)].file); }
- break;
-
- case 13:
-
-/* Line 1455 of yacc.c */
-#line 202 "xkbparse.y"
- { (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),(yyvsp[(5) - (7)].any),(yyvsp[(1) - (7)].uval)); }
- break;
-
- case 14:
-
-/* Line 1455 of yacc.c */
-#line 206 "xkbparse.y"
- { (yyval.file)= CreateXKBFile((yyvsp[(2) - (4)].uval),(yyvsp[(3) - (4)].str),(yyvsp[(4) - (4)].any),(yyvsp[(1) - (4)].uval)); }
- break;
-
- case 15:
-
-/* Line 1455 of yacc.c */
-#line 210 "xkbparse.y"
- { (yyval.uval)= XkmKeyNamesIndex; }
- break;
-
- case 16:
-
-/* Line 1455 of yacc.c */
-#line 211 "xkbparse.y"
- { (yyval.uval)= XkmTypesIndex; }
- break;
-
- case 17:
-
-/* Line 1455 of yacc.c */
-#line 212 "xkbparse.y"
- { (yyval.uval)= XkmCompatMapIndex; }
- break;
-
- case 18:
-
-/* Line 1455 of yacc.c */
-#line 213 "xkbparse.y"
- { (yyval.uval)= XkmSymbolsIndex; }
- break;
-
- case 19:
-
-/* Line 1455 of yacc.c */
-#line 214 "xkbparse.y"
- { (yyval.uval)= XkmGeometryIndex; }
- break;
-
- case 20:
-
-/* Line 1455 of yacc.c */
-#line 217 "xkbparse.y"
- { (yyval.uval)= (yyvsp[(1) - (1)].uval); }
- break;
-
- case 21:
-
-/* Line 1455 of yacc.c */
-#line 218 "xkbparse.y"
- { (yyval.uval)= 0; }
- break;
-
- case 22:
-
-/* Line 1455 of yacc.c */
-#line 221 "xkbparse.y"
- { (yyval.uval)= (((yyvsp[(1) - (2)].uval))|((yyvsp[(2) - (2)].uval))); }
- break;
-
- case 23:
-
-/* Line 1455 of yacc.c */
-#line 222 "xkbparse.y"
- { (yyval.uval)= (yyvsp[(1) - (1)].uval); }
- break;
-
- case 24:
-
-/* Line 1455 of yacc.c */
-#line 225 "xkbparse.y"
- { (yyval.uval)= XkbLC_Partial; }
- break;
-
- case 25:
-
-/* Line 1455 of yacc.c */
-#line 226 "xkbparse.y"
- { (yyval.uval)= XkbLC_Default; }
- break;
-
- case 26:
-
-/* Line 1455 of yacc.c */
-#line 227 "xkbparse.y"
- { (yyval.uval)= XkbLC_Hidden; }
- break;
-
- case 27:
-
-/* Line 1455 of yacc.c */
-#line 228 "xkbparse.y"
- { (yyval.uval)= XkbLC_AlphanumericKeys; }
- break;
-
- case 28:
-
-/* Line 1455 of yacc.c */
-#line 229 "xkbparse.y"
- { (yyval.uval)= XkbLC_ModifierKeys; }
- break;
-
- case 29:
-
-/* Line 1455 of yacc.c */
-#line 230 "xkbparse.y"
- { (yyval.uval)= XkbLC_KeypadKeys; }
- break;
-
- case 30:
-
-/* Line 1455 of yacc.c */
-#line 231 "xkbparse.y"
- { (yyval.uval)= XkbLC_FunctionKeys; }
- break;
-
- case 31:
-
-/* Line 1455 of yacc.c */
-#line 232 "xkbparse.y"
- { (yyval.uval)= XkbLC_AlternateGroup; }
- break;
-
- case 32:
-
-/* Line 1455 of yacc.c */
-#line 236 "xkbparse.y"
- { (yyval.any)= AppendStmt((yyvsp[(1) - (2)].any),(yyvsp[(2) - (2)].any)); }
- break;
-
- case 33:
-
-/* Line 1455 of yacc.c */
-#line 237 "xkbparse.y"
- { (yyval.any)= NULL; }
- break;
-
- case 34:
-
-/* Line 1455 of yacc.c */
-#line 241 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].var)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].var)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].var)->common;
- }
- break;
-
- case 35:
-
-/* Line 1455 of yacc.c */
-#line 246 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].vmod)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].vmod)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].vmod)->common;
- }
- break;
-
- case 36:
-
-/* Line 1455 of yacc.c */
-#line 251 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].interp)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].interp)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].interp)->common;
- }
- break;
-
- case 37:
-
-/* Line 1455 of yacc.c */
-#line 256 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].keyName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyName)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].keyName)->common;
- }
- break;
-
- case 38:
-
-/* Line 1455 of yacc.c */
-#line 261 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].keyAlias)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyAlias)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].keyAlias)->common;
- }
- break;
-
- case 39:
-
-/* Line 1455 of yacc.c */
-#line 266 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].keyType)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyType)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].keyType)->common;
- }
- break;
-
- case 40:
-
-/* Line 1455 of yacc.c */
-#line 271 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].syms)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].syms)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].syms)->common;
- }
- break;
-
- case 41:
-
-/* Line 1455 of yacc.c */
-#line 276 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].modMask)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].modMask)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].modMask)->common;
- }
- break;
-
- case 42:
-
-/* Line 1455 of yacc.c */
-#line 281 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].groupCompat)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].groupCompat)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].groupCompat)->common;
- }
- break;
-
- case 43:
-
-/* Line 1455 of yacc.c */
-#line 286 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].ledMap)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledMap)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].ledMap)->common;
- }
- break;
-
- case 44:
-
-/* Line 1455 of yacc.c */
-#line 291 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].ledName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledName)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].ledName)->common;
- }
- break;
-
- case 45:
-
-/* Line 1455 of yacc.c */
-#line 296 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].shape)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].shape)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].shape)->common;
- }
- break;
-
- case 46:
-
-/* Line 1455 of yacc.c */
-#line 301 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].section)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].section)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].section)->common;
- }
- break;
-
- case 47:
-
-/* Line 1455 of yacc.c */
-#line 306 "xkbparse.y"
- {
- (yyvsp[(2) - (2)].doodad)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].doodad)->common,(yyvsp[(1) - (2)].uval));
- (yyval.any)= &(yyvsp[(2) - (2)].doodad)->common;
- }
- break;
-
- case 48:
-
-/* Line 1455 of yacc.c */
-#line 311 "xkbparse.y"
- {
- if ((yyvsp[(1) - (2)].uval)==MergeAltForm) {
- yyerror("cannot use 'alternate' to include other maps");
- (yyval.any)= &IncludeCreate(scanStr,MergeDefault)->common;
- }
- else {
- (yyval.any)= &IncludeCreate(scanStr,(yyvsp[(1) - (2)].uval))->common;
- }
- }
- break;
-
- case 49:
-
-/* Line 1455 of yacc.c */
-#line 323 "xkbparse.y"
- { (yyval.var)= VarCreate((yyvsp[(1) - (4)].expr),(yyvsp[(3) - (4)].expr)); }
- break;
-
- case 50:
-
-/* Line 1455 of yacc.c */
-#line 325 "xkbparse.y"
- { (yyval.var)= BoolVarCreate((yyvsp[(1) - (2)].sval),1); }
- break;
-
- case 51:
-
-/* Line 1455 of yacc.c */
-#line 327 "xkbparse.y"
- { (yyval.var)= BoolVarCreate((yyvsp[(2) - (3)].sval),0); }
- break;
-
- case 52:
-
-/* Line 1455 of yacc.c */
-#line 331 "xkbparse.y"
- {
- KeycodeDef *def;
-
- def= KeycodeCreate((yyvsp[(1) - (4)].str),(yyvsp[(3) - (4)].expr));
- if ((yyvsp[(1) - (4)].str))
- free((yyvsp[(1) - (4)].str));
- (yyval.keyName)= def;
- }
- break;
-
- case 53:
-
-/* Line 1455 of yacc.c */
-#line 342 "xkbparse.y"
- {
- KeyAliasDef *def;
- def= KeyAliasCreate((yyvsp[(2) - (5)].str),(yyvsp[(4) - (5)].str));
- if ((yyvsp[(2) - (5)].str)) free((yyvsp[(2) - (5)].str));
- if ((yyvsp[(4) - (5)].str)) free((yyvsp[(4) - (5)].str));
- (yyval.keyAlias)= def;
- }
- break;
-
- case 54:
-
-/* Line 1455 of yacc.c */
-#line 352 "xkbparse.y"
- { (yyval.vmod)= (yyvsp[(2) - (3)].vmod); }
- break;
-
- case 55:
-
-/* Line 1455 of yacc.c */
-#line 356 "xkbparse.y"
- { (yyval.vmod)= (VModDef *)AppendStmt(&(yyvsp[(1) - (3)].vmod)->common,&(yyvsp[(3) - (3)].vmod)->common); }
- break;
-
- case 56:
-
-/* Line 1455 of yacc.c */
-#line 358 "xkbparse.y"
- { (yyval.vmod)= (yyvsp[(1) - (1)].vmod); }
- break;
-
- case 57:
-
-/* Line 1455 of yacc.c */
-#line 362 "xkbparse.y"
- { (yyval.vmod)= VModCreate((yyvsp[(1) - (1)].sval),NULL); }
- break;
-
- case 58:
-
-/* Line 1455 of yacc.c */
-#line 364 "xkbparse.y"
- { (yyval.vmod)= VModCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 59:
-
-/* Line 1455 of yacc.c */
-#line 370 "xkbparse.y"
- {
- (yyvsp[(2) - (6)].interp)->def= (yyvsp[(4) - (6)].var);
- (yyval.interp)= (yyvsp[(2) - (6)].interp);
- }
- break;
-
- case 60:
-
-/* Line 1455 of yacc.c */
-#line 377 "xkbparse.y"
- { (yyval.interp)= InterpCreate((KeySym)(yyvsp[(1) - (3)].uval),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 61:
-
-/* Line 1455 of yacc.c */
-#line 379 "xkbparse.y"
- { (yyval.interp)= InterpCreate((KeySym)(yyvsp[(1) - (1)].uval),NULL); }
- break;
-
- case 62:
-
-/* Line 1455 of yacc.c */
-#line 383 "xkbparse.y"
- { (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (2)].var)->common,&(yyvsp[(2) - (2)].var)->common); }
- break;
-
- case 63:
-
-/* Line 1455 of yacc.c */
-#line 385 "xkbparse.y"
- { (yyval.var)= (yyvsp[(1) - (1)].var); }
- break;
-
- case 64:
-
-/* Line 1455 of yacc.c */
-#line 391 "xkbparse.y"
- { (yyval.keyType)= KeyTypeCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
- break;
-
- case 65:
-
-/* Line 1455 of yacc.c */
-#line 397 "xkbparse.y"
- { (yyval.syms)= SymbolsCreate((yyvsp[(2) - (6)].str),(ExprDef *)(yyvsp[(4) - (6)].var)); }
- break;
-
- case 66:
-
-/* Line 1455 of yacc.c */
-#line 401 "xkbparse.y"
- { (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (3)].var)->common,&(yyvsp[(3) - (3)].var)->common); }
- break;
-
- case 67:
-
-/* Line 1455 of yacc.c */
-#line 403 "xkbparse.y"
- { (yyval.var)= (yyvsp[(1) - (1)].var); }
- break;
-
- case 68:
-
-/* Line 1455 of yacc.c */
-#line 404 "xkbparse.y"
- { (yyval.var)= NULL; }
- break;
-
- case 69:
-
-/* Line 1455 of yacc.c */
-#line 408 "xkbparse.y"
- { (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 70:
-
-/* Line 1455 of yacc.c */
-#line 410 "xkbparse.y"
- { (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 71:
-
-/* Line 1455 of yacc.c */
-#line 412 "xkbparse.y"
- { (yyval.var)= BoolVarCreate((yyvsp[(1) - (1)].sval),1); }
- break;
-
- case 72:
-
-/* Line 1455 of yacc.c */
-#line 414 "xkbparse.y"
- { (yyval.var)= BoolVarCreate((yyvsp[(2) - (2)].sval),0); }
- break;
-
- case 73:
-
-/* Line 1455 of yacc.c */
-#line 416 "xkbparse.y"
- { (yyval.var)= VarCreate(NULL,(yyvsp[(1) - (1)].expr)); }
- break;
-
- case 74:
-
-/* Line 1455 of yacc.c */
-#line 420 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(2) - (3)].expr); }
- break;
-
- case 75:
-
-/* Line 1455 of yacc.c */
-#line 422 "xkbparse.y"
- { (yyval.expr)= ExprCreateUnary(ExprActionList,TypeAction,(yyvsp[(2) - (3)].expr)); }
- break;
-
- case 76:
-
-/* Line 1455 of yacc.c */
-#line 426 "xkbparse.y"
- { (yyval.groupCompat)= GroupCompatCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr)); }
- break;
-
- case 77:
-
-/* Line 1455 of yacc.c */
-#line 430 "xkbparse.y"
- { (yyval.modMask)= ModMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].expr)); }
- break;
-
- case 78:
-
-/* Line 1455 of yacc.c */
-#line 434 "xkbparse.y"
- { (yyval.ledMap)= IndicatorMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
- break;
-
- case 79:
-
-/* Line 1455 of yacc.c */
-#line 438 "xkbparse.y"
- { (yyval.ledName)= IndicatorNameCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr),False); }
- break;
-
- case 80:
-
-/* Line 1455 of yacc.c */
-#line 440 "xkbparse.y"
- { (yyval.ledName)= IndicatorNameCreate((yyvsp[(3) - (6)].ival),(yyvsp[(5) - (6)].expr),True); }
- break;
-
- case 81:
-
-/* Line 1455 of yacc.c */
-#line 444 "xkbparse.y"
- { (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),(OutlineDef *)&(yyvsp[(4) - (6)].outline)->common); }
- break;
-
- case 82:
-
-/* Line 1455 of yacc.c */
-#line 446 "xkbparse.y"
- {
- OutlineDef *outlines;
- outlines= OutlineCreate(None,(yyvsp[(4) - (6)].expr));
- (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),outlines);
- }
- break;
-
- case 83:
-
-/* Line 1455 of yacc.c */
-#line 454 "xkbparse.y"
- { (yyval.section)= SectionDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].row)); }
- break;
-
- case 84:
-
-/* Line 1455 of yacc.c */
-#line 458 "xkbparse.y"
- { (yyval.row)=(RowDef *)AppendStmt(&(yyvsp[(1) - (2)].row)->common,&(yyvsp[(2) - (2)].row)->common);}
- break;
-
- case 85:
-
-/* Line 1455 of yacc.c */
-#line 460 "xkbparse.y"
- { (yyval.row)= (yyvsp[(1) - (1)].row); }
- break;
-
- case 86:
-
-/* Line 1455 of yacc.c */
-#line 464 "xkbparse.y"
- { (yyval.row)= RowDeclCreate((yyvsp[(3) - (5)].key)); }
- break;
-
- case 87:
-
-/* Line 1455 of yacc.c */
-#line 466 "xkbparse.y"
- { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].var); }
- break;
-
- case 88:
-
-/* Line 1455 of yacc.c */
-#line 468 "xkbparse.y"
- { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].doodad); }
- break;
-
- case 89:
-
-/* Line 1455 of yacc.c */
-#line 470 "xkbparse.y"
- { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].ledMap); }
- break;
-
- case 90:
-
-/* Line 1455 of yacc.c */
-#line 472 "xkbparse.y"
- { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].overlay); }
- break;
-
- case 91:
-
-/* Line 1455 of yacc.c */
-#line 476 "xkbparse.y"
- { (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (2)].key)->common,&(yyvsp[(2) - (2)].key)->common);}
- break;
-
- case 92:
-
-/* Line 1455 of yacc.c */
-#line 478 "xkbparse.y"
- { (yyval.key)= (yyvsp[(1) - (1)].key); }
- break;
-
- case 93:
-
-/* Line 1455 of yacc.c */
-#line 482 "xkbparse.y"
- { (yyval.key)= (yyvsp[(3) - (5)].key); }
- break;
-
- case 94:
-
-/* Line 1455 of yacc.c */
-#line 484 "xkbparse.y"
- { (yyval.key)= (KeyDef *)(yyvsp[(1) - (1)].var); }
- break;
-
- case 95:
-
-/* Line 1455 of yacc.c */
-#line 488 "xkbparse.y"
- { (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (3)].key)->common,&(yyvsp[(3) - (3)].key)->common);}
- break;
-
- case 96:
-
-/* Line 1455 of yacc.c */
-#line 490 "xkbparse.y"
- { (yyval.key)= (yyvsp[(1) - (1)].key); }
- break;
-
- case 97:
-
-/* Line 1455 of yacc.c */
-#line 494 "xkbparse.y"
- { (yyval.key)= KeyDeclCreate((yyvsp[(1) - (1)].str),NULL); }
- break;
-
- case 98:
-
-/* Line 1455 of yacc.c */
-#line 496 "xkbparse.y"
- { (yyval.key)= KeyDeclCreate(NULL,(yyvsp[(2) - (3)].expr)); }
- break;
-
- case 99:
-
-/* Line 1455 of yacc.c */
-#line 500 "xkbparse.y"
- { (yyval.overlay)= OverlayDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].olKey)); }
- break;
-
- case 100:
-
-/* Line 1455 of yacc.c */
-#line 504 "xkbparse.y"
- {
- (yyval.olKey)= (OverlayKeyDef *)
- AppendStmt(&(yyvsp[(1) - (3)].olKey)->common,&(yyvsp[(3) - (3)].olKey)->common);
- }
- break;
-
- case 101:
-
-/* Line 1455 of yacc.c */
-#line 509 "xkbparse.y"
- { (yyval.olKey)= (yyvsp[(1) - (1)].olKey); }
- break;
-
- case 102:
-
-/* Line 1455 of yacc.c */
-#line 513 "xkbparse.y"
- { (yyval.olKey)= OverlayKeyCreate((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); }
- break;
-
- case 103:
-
-/* Line 1455 of yacc.c */
-#line 517 "xkbparse.y"
- { (yyval.outline)=(OutlineDef *)AppendStmt(&(yyvsp[(1) - (3)].outline)->common,&(yyvsp[(3) - (3)].outline)->common);}
- break;
-
- case 104:
-
-/* Line 1455 of yacc.c */
-#line 519 "xkbparse.y"
- { (yyval.outline)= (yyvsp[(1) - (1)].outline); }
- break;
-
- case 105:
-
-/* Line 1455 of yacc.c */
-#line 523 "xkbparse.y"
- { (yyval.outline)= OutlineCreate(None,(yyvsp[(2) - (3)].expr)); }
- break;
-
- case 106:
-
-/* Line 1455 of yacc.c */
-#line 525 "xkbparse.y"
- { (yyval.outline)= OutlineCreate((yyvsp[(1) - (5)].sval),(yyvsp[(4) - (5)].expr)); }
- break;
-
- case 107:
-
-/* Line 1455 of yacc.c */
-#line 527 "xkbparse.y"
- { (yyval.outline)= OutlineCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 108:
-
-/* Line 1455 of yacc.c */
-#line 531 "xkbparse.y"
- { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
- break;
-
- case 109:
-
-/* Line 1455 of yacc.c */
-#line 533 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 110:
-
-/* Line 1455 of yacc.c */
-#line 537 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprCoord,TypeUnknown);
- expr->value.coord.x= (yyvsp[(2) - (5)].ival);
- expr->value.coord.y= (yyvsp[(4) - (5)].ival);
- (yyval.expr)= expr;
- }
- break;
-
- case 111:
-
-/* Line 1455 of yacc.c */
-#line 547 "xkbparse.y"
- { (yyval.doodad)= DoodadCreate((yyvsp[(1) - (6)].uval),(yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
- break;
-
- case 112:
-
-/* Line 1455 of yacc.c */
-#line 550 "xkbparse.y"
- { (yyval.uval)= XkbTextDoodad; }
- break;
-
- case 113:
-
-/* Line 1455 of yacc.c */
-#line 551 "xkbparse.y"
- { (yyval.uval)= XkbOutlineDoodad; }
- break;
-
- case 114:
-
-/* Line 1455 of yacc.c */
-#line 552 "xkbparse.y"
- { (yyval.uval)= XkbSolidDoodad; }
- break;
-
- case 115:
-
-/* Line 1455 of yacc.c */
-#line 553 "xkbparse.y"
- { (yyval.uval)= XkbLogoDoodad; }
- break;
-
- case 116:
-
-/* Line 1455 of yacc.c */
-#line 556 "xkbparse.y"
- { (yyval.sval)= (yyvsp[(1) - (1)].sval); }
- break;
-
- case 117:
-
-/* Line 1455 of yacc.c */
-#line 557 "xkbparse.y"
- { (yyval.sval)= (yyvsp[(1) - (1)].sval); }
- break;
-
- case 118:
-
-/* Line 1455 of yacc.c */
-#line 561 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"action",False); }
- break;
-
- case 119:
-
-/* Line 1455 of yacc.c */
-#line 563 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"interpret",False); }
- break;
-
- case 120:
-
-/* Line 1455 of yacc.c */
-#line 565 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"type",False); }
- break;
-
- case 121:
-
-/* Line 1455 of yacc.c */
-#line 567 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"key",False); }
- break;
-
- case 122:
-
-/* Line 1455 of yacc.c */
-#line 569 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"group",False); }
- break;
-
- case 123:
-
-/* Line 1455 of yacc.c */
-#line 571 "xkbparse.y"
- {(yyval.sval)=XkbInternAtom(NULL,"modifier_map",False);}
- break;
-
- case 124:
-
-/* Line 1455 of yacc.c */
-#line 573 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"indicator",False); }
- break;
-
- case 125:
-
-/* Line 1455 of yacc.c */
-#line 575 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"shape",False); }
- break;
-
- case 126:
-
-/* Line 1455 of yacc.c */
-#line 577 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"row",False); }
- break;
-
- case 127:
-
-/* Line 1455 of yacc.c */
-#line 579 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"section",False); }
- break;
-
- case 128:
-
-/* Line 1455 of yacc.c */
-#line 581 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"text",False); }
- break;
-
- case 129:
-
-/* Line 1455 of yacc.c */
-#line 584 "xkbparse.y"
- { (yyval.uval)= (yyvsp[(1) - (1)].uval); }
- break;
-
- case 130:
-
-/* Line 1455 of yacc.c */
-#line 585 "xkbparse.y"
- { (yyval.uval)= MergeDefault; }
- break;
-
- case 131:
-
-/* Line 1455 of yacc.c */
-#line 588 "xkbparse.y"
- { (yyval.uval)= MergeDefault; }
- break;
-
- case 132:
-
-/* Line 1455 of yacc.c */
-#line 589 "xkbparse.y"
- { (yyval.uval)= MergeAugment; }
- break;
-
- case 133:
-
-/* Line 1455 of yacc.c */
-#line 590 "xkbparse.y"
- { (yyval.uval)= MergeOverride; }
- break;
-
- case 134:
-
-/* Line 1455 of yacc.c */
-#line 591 "xkbparse.y"
- { (yyval.uval)= MergeReplace; }
- break;
-
- case 135:
-
-/* Line 1455 of yacc.c */
-#line 592 "xkbparse.y"
- { (yyval.uval)= MergeAltForm; }
- break;
-
- case 136:
-
-/* Line 1455 of yacc.c */
-#line 595 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 137:
-
-/* Line 1455 of yacc.c */
-#line 596 "xkbparse.y"
- { (yyval.expr)= NULL; }
- break;
-
- case 138:
-
-/* Line 1455 of yacc.c */
-#line 600 "xkbparse.y"
- { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
- break;
-
- case 139:
-
-/* Line 1455 of yacc.c */
-#line 602 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 140:
-
-/* Line 1455 of yacc.c */
-#line 606 "xkbparse.y"
- { (yyval.expr)= ExprCreateBinary(OpDivide,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 141:
-
-/* Line 1455 of yacc.c */
-#line 608 "xkbparse.y"
- { (yyval.expr)= ExprCreateBinary(OpAdd,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 142:
-
-/* Line 1455 of yacc.c */
-#line 610 "xkbparse.y"
- { (yyval.expr)= ExprCreateBinary(OpSubtract,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 143:
-
-/* Line 1455 of yacc.c */
-#line 612 "xkbparse.y"
- { (yyval.expr)= ExprCreateBinary(OpMultiply,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 144:
-
-/* Line 1455 of yacc.c */
-#line 614 "xkbparse.y"
- { (yyval.expr)= ExprCreateBinary(OpAssign,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
- break;
-
- case 145:
-
-/* Line 1455 of yacc.c */
-#line 616 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 146:
-
-/* Line 1455 of yacc.c */
-#line 620 "xkbparse.y"
- { (yyval.expr)= ExprCreateUnary(OpNegate,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
- break;
-
- case 147:
-
-/* Line 1455 of yacc.c */
-#line 622 "xkbparse.y"
- { (yyval.expr)= ExprCreateUnary(OpUnaryPlus,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
- break;
-
- case 148:
-
-/* Line 1455 of yacc.c */
-#line 624 "xkbparse.y"
- { (yyval.expr)= ExprCreateUnary(OpNot,TypeBoolean,(yyvsp[(2) - (2)].expr)); }
- break;
-
- case 149:
-
-/* Line 1455 of yacc.c */
-#line 626 "xkbparse.y"
- { (yyval.expr)= ExprCreateUnary(OpInvert,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
- break;
-
- case 150:
-
-/* Line 1455 of yacc.c */
-#line 628 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 151:
-
-/* Line 1455 of yacc.c */
-#line 630 "xkbparse.y"
- { (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); }
- break;
-
- case 152:
-
-/* Line 1455 of yacc.c */
-#line 632 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 153:
-
-/* Line 1455 of yacc.c */
-#line 634 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(2) - (3)].expr); }
- break;
-
- case 154:
-
-/* Line 1455 of yacc.c */
-#line 638 "xkbparse.y"
- { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
- break;
-
- case 155:
-
-/* Line 1455 of yacc.c */
-#line 640 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 156:
-
-/* Line 1455 of yacc.c */
-#line 644 "xkbparse.y"
- { (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); }
- break;
-
- case 157:
-
-/* Line 1455 of yacc.c */
-#line 648 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprIdent,TypeUnknown);
- expr->value.str= (yyvsp[(1) - (1)].sval);
- (yyval.expr)= expr;
- }
- break;
-
- case 158:
-
-/* Line 1455 of yacc.c */
-#line 655 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprFieldRef,TypeUnknown);
- expr->value.field.element= (yyvsp[(1) - (3)].sval);
- expr->value.field.field= (yyvsp[(3) - (3)].sval);
- (yyval.expr)= expr;
- }
- break;
-
- case 159:
-
-/* Line 1455 of yacc.c */
-#line 663 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprArrayRef,TypeUnknown);
- expr->value.array.element= None;
- expr->value.array.field= (yyvsp[(1) - (4)].sval);
- expr->value.array.entry= (yyvsp[(3) - (4)].expr);
- (yyval.expr)= expr;
- }
- break;
-
- case 160:
-
-/* Line 1455 of yacc.c */
-#line 672 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprArrayRef,TypeUnknown);
- expr->value.array.element= (yyvsp[(1) - (6)].sval);
- expr->value.array.field= (yyvsp[(3) - (6)].sval);
- expr->value.array.entry= (yyvsp[(5) - (6)].expr);
- (yyval.expr)= expr;
- }
- break;
-
- case 161:
-
-/* Line 1455 of yacc.c */
-#line 683 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprValue,TypeString);
- expr->value.str= (yyvsp[(1) - (1)].sval);
- (yyval.expr)= expr;
- }
- break;
-
- case 162:
-
-/* Line 1455 of yacc.c */
-#line 690 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprValue,TypeInt);
- expr->value.ival= (yyvsp[(1) - (1)].ival);
- (yyval.expr)= expr;
- }
- break;
-
- case 163:
-
-/* Line 1455 of yacc.c */
-#line 697 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprValue,TypeFloat);
- expr->value.ival= (yyvsp[(1) - (1)].ival);
- (yyval.expr)= expr;
- }
- break;
-
- case 164:
-
-/* Line 1455 of yacc.c */
-#line 704 "xkbparse.y"
- {
- ExprDef *expr;
- expr= ExprCreate(ExprValue,TypeKeyName);
- memset(expr->value.keyName,0,5);
- strncpy(expr->value.keyName,(yyvsp[(1) - (1)].str),4);
- free((yyvsp[(1) - (1)].str));
- (yyval.expr)= expr;
- }
- break;
-
- case 165:
-
-/* Line 1455 of yacc.c */
-#line 714 "xkbparse.y"
- { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
- break;
-
- case 166:
-
-/* Line 1455 of yacc.c */
-#line 715 "xkbparse.y"
- { (yyval.expr)= NULL; }
- break;
-
- case 167:
-
-/* Line 1455 of yacc.c */
-#line 719 "xkbparse.y"
- { (yyval.expr)= AppendKeysymList((yyvsp[(1) - (3)].expr),(KeySym)(yyvsp[(3) - (3)].uval)); }
- break;
-
- case 168:
-
-/* Line 1455 of yacc.c */
-#line 721 "xkbparse.y"
- { (yyval.expr)= CreateKeysymList((KeySym)(yyvsp[(1) - (1)].uval)); }
- break;
-
- case 169:
-
-/* Line 1455 of yacc.c */
-#line 725 "xkbparse.y"
- {
- KeySym sym;
- if (LookupKeysym(scanStr,&sym))
- (yyval.uval)= sym;
- else {
- char buf[120];
- snprintf(buf, sizeof(buf),
- "expected keysym, got %s",
- uStringText(scanStr));
- yyerror(buf);
- yynerrs++;
- (yyval.uval)= NoSymbol;
- }
- }
- break;
-
- case 170:
-
-/* Line 1455 of yacc.c */
-#line 740 "xkbparse.y"
- {
- (yyval.uval)= XK_section;
- }
- break;
-
- case 171:
-
-/* Line 1455 of yacc.c */
-#line 744 "xkbparse.y"
- {
- if ((yyvsp[(1) - (1)].ival)<10) (yyval.uval)= (yyvsp[(1) - (1)].ival)+'0'; /* XK_0 .. XK_9 */
- else (yyval.uval)= (yyvsp[(1) - (1)].ival);
- }
- break;
-
- case 172:
-
-/* Line 1455 of yacc.c */
-#line 750 "xkbparse.y"
- { (yyval.ival)= -(yyvsp[(2) - (2)].ival); }
- break;
-
- case 173:
-
-/* Line 1455 of yacc.c */
-#line 751 "xkbparse.y"
- { (yyval.ival)= (yyvsp[(1) - (1)].ival); }
- break;
-
- case 174:
-
-/* Line 1455 of yacc.c */
-#line 754 "xkbparse.y"
- { (yyval.ival)= scanInt; }
- break;
-
- case 175:
-
-/* Line 1455 of yacc.c */
-#line 755 "xkbparse.y"
- { (yyval.ival)= scanInt*XkbGeomPtsPerMM; }
- break;
-
- case 176:
-
-/* Line 1455 of yacc.c */
-#line 758 "xkbparse.y"
- { (yyval.ival)= scanInt; }
- break;
-
- case 177:
-
-/* Line 1455 of yacc.c */
-#line 761 "xkbparse.y"
- { (yyval.ival)= scanInt; }
- break;
-
- case 178:
-
-/* Line 1455 of yacc.c */
-#line 764 "xkbparse.y"
- { (yyval.str)= scanStr; scanStr= NULL; }
- break;
-
- case 179:
-
-/* Line 1455 of yacc.c */
-#line 767 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,scanStr,False); }
- break;
-
- case 180:
-
-/* Line 1455 of yacc.c */
-#line 768 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,"default",False); }
- break;
-
- case 181:
-
-/* Line 1455 of yacc.c */
-#line 771 "xkbparse.y"
- { (yyval.sval)= XkbInternAtom(NULL,scanStr,False); }
- break;
-
- case 182:
-
-/* Line 1455 of yacc.c */
-#line 774 "xkbparse.y"
- { (yyval.str)= (yyvsp[(1) - (1)].str); }
- break;
-
- case 183:
-
-/* Line 1455 of yacc.c */
-#line 775 "xkbparse.y"
- { (yyval.str)= NULL; }
- break;
-
- case 184:
-
-/* Line 1455 of yacc.c */
-#line 778 "xkbparse.y"
- { (yyval.str)= scanStr; scanStr= NULL; }
- break;
-
-
-
-/* Line 1455 of yacc.c */
-#line 3310 "xkbparse.c"
- default: break;
- }
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
- {
- YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
- if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
- {
- YYSIZE_T yyalloc = 2 * yysize;
- if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
- yyalloc = YYSTACK_ALLOC_MAXIMUM;
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yyalloc);
- if (yymsg)
- yymsg_alloc = yyalloc;
- else
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- }
- }
-
- if (0 < yysize && yysize <= yymsg_alloc)
- {
- (void) yysyntax_error (yymsg, yystate, yychar);
- yyerror (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- if (yysize != 0)
- goto yyexhaustedlab;
- }
- }
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined(yyoverflow) || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
-
-
-
-/* Line 1675 of yacc.c */
-#line 780 "xkbparse.y"
-
-void
-yyerror(const char *s)
-{
- if (warningLevel>0) {
- (void)fprintf(stderr,"%s: line %d of %s\n",s,lineNum,
- (scanFile?scanFile:"(unknown)"));
- if ((scanStr)&&(warningLevel>3))
- (void)fprintf(stderr,"last scanned symbol is: %s\n",scanStr);
- }
- return;
-}
-
-
-int
-yywrap(void)
-{
- return 1;
-}
-
-
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.4.1"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 91 "xkbparse.y"
+
+#ifdef DEBUG
+#define YYDEBUG 1
+#endif
+#define DEBUG_VAR parseDebug
+#include "parseutils.h"
+#include <X11/keysym.h>
+#include <X11/extensions/XKBgeom.h>
+#include <stdlib.h>
+
+unsigned int parseDebug;
+
+
+
+/* Line 189 of yacc.c */
+#line 88 "xkbparse.c"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ END_OF_FILE = 0,
+ ERROR_TOK = 255,
+ XKB_KEYMAP = 1,
+ XKB_KEYCODES = 2,
+ XKB_TYPES = 3,
+ XKB_SYMBOLS = 4,
+ XKB_COMPATMAP = 5,
+ XKB_GEOMETRY = 6,
+ XKB_SEMANTICS = 7,
+ XKB_LAYOUT = 8,
+ INCLUDE = 10,
+ OVERRIDE = 11,
+ AUGMENT = 12,
+ REPLACE = 13,
+ ALTERNATE = 14,
+ VIRTUAL_MODS = 20,
+ TYPE = 21,
+ INTERPRET = 22,
+ ACTION_TOK = 23,
+ KEY = 24,
+ ALIAS = 25,
+ GROUP = 26,
+ MODIFIER_MAP = 27,
+ INDICATOR = 28,
+ SHAPE = 29,
+ KEYS = 30,
+ ROW = 31,
+ SECTION = 32,
+ OVERLAY = 33,
+ TEXT = 34,
+ OUTLINE = 35,
+ SOLID = 36,
+ LOGO = 37,
+ VIRTUAL = 38,
+ EQUALS = 40,
+ PLUS = 41,
+ MINUS = 42,
+ DIVIDE = 43,
+ TIMES = 44,
+ OBRACE = 45,
+ CBRACE = 46,
+ OPAREN = 47,
+ CPAREN = 48,
+ OBRACKET = 49,
+ CBRACKET = 50,
+ DOT = 51,
+ COMMA = 52,
+ SEMI = 53,
+ EXCLAM = 54,
+ INVERT = 55,
+ STRING = 60,
+ INTEGER = 61,
+ FLOAT = 62,
+ IDENT = 63,
+ KEYNAME = 64,
+ PARTIAL = 70,
+ DEFAULT = 71,
+ HIDDEN = 72,
+ ALPHANUMERIC_KEYS = 73,
+ MODIFIER_KEYS = 74,
+ KEYPAD_KEYS = 75,
+ FUNCTION_KEYS = 76,
+ ALTERNATE_GROUP = 77
+ };
+#endif
+/* Tokens. */
+#define END_OF_FILE 0
+#define ERROR_TOK 255
+#define XKB_KEYMAP 1
+#define XKB_KEYCODES 2
+#define XKB_TYPES 3
+#define XKB_SYMBOLS 4
+#define XKB_COMPATMAP 5
+#define XKB_GEOMETRY 6
+#define XKB_SEMANTICS 7
+#define XKB_LAYOUT 8
+#define INCLUDE 10
+#define OVERRIDE 11
+#define AUGMENT 12
+#define REPLACE 13
+#define ALTERNATE 14
+#define VIRTUAL_MODS 20
+#define TYPE 21
+#define INTERPRET 22
+#define ACTION_TOK 23
+#define KEY 24
+#define ALIAS 25
+#define GROUP 26
+#define MODIFIER_MAP 27
+#define INDICATOR 28
+#define SHAPE 29
+#define KEYS 30
+#define ROW 31
+#define SECTION 32
+#define OVERLAY 33
+#define TEXT 34
+#define OUTLINE 35
+#define SOLID 36
+#define LOGO 37
+#define VIRTUAL 38
+#define EQUALS 40
+#define PLUS 41
+#define MINUS 42
+#define DIVIDE 43
+#define TIMES 44
+#define OBRACE 45
+#define CBRACE 46
+#define OPAREN 47
+#define CPAREN 48
+#define OBRACKET 49
+#define CBRACKET 50
+#define DOT 51
+#define COMMA 52
+#define SEMI 53
+#define EXCLAM 54
+#define INVERT 55
+#define STRING 60
+#define INTEGER 61
+#define FLOAT 62
+#define IDENT 63
+#define KEYNAME 64
+#define PARTIAL 70
+#define DEFAULT 71
+#define HIDDEN 72
+#define ALPHANUMERIC_KEYS 73
+#define MODIFIER_KEYS 74
+#define KEYPAD_KEYS 75
+#define FUNCTION_KEYS 76
+#define ALTERNATE_GROUP 77
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c */
+#line 110 "xkbparse.y"
+
+ int ival;
+ unsigned uval;
+ char *str;
+ Atom sval;
+ ParseCommon *any;
+ ExprDef *expr;
+ VarDef *var;
+ VModDef *vmod;
+ InterpDef *interp;
+ KeyTypeDef *keyType;
+ SymbolsDef *syms;
+ ModMapDef *modMask;
+ GroupCompatDef *groupCompat;
+ IndicatorMapDef *ledMap;
+ IndicatorNameDef *ledName;
+ KeycodeDef *keyName;
+ KeyAliasDef *keyAlias;
+ ShapeDef *shape;
+ SectionDef *section;
+ RowDef *row;
+ KeyDef *key;
+ OverlayDef *overlay;
+ OverlayKeyDef *olKey;
+ OutlineDef *outline;
+ DoodadDef *doodad;
+ XkbFile *file;
+
+
+
+/* Line 214 of yacc.c */
+#line 285 "xkbparse.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 264 of yacc.c */
+#line 297 "xkbparse.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
+{
+ return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+#ifndef _MSC_VER
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#endif
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+#ifndef _MSC_VER
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#endif
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 18
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 706
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 65
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 73
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 184
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 335
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 257
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 4, 5, 6, 7, 8, 9, 10, 11, 2,
+ 12, 13, 14, 15, 16, 2, 2, 2, 2, 2,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 2,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 2, 2, 2, 2,
+ 52, 53, 54, 55, 56, 2, 2, 2, 2, 2,
+ 57, 58, 59, 60, 61, 62, 63, 64, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 3, 1, 2
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint16 yyprhs[] =
+{
+ 0, 0, 3, 5, 7, 9, 12, 14, 22, 24,
+ 26, 28, 31, 33, 41, 46, 48, 50, 52, 54,
+ 56, 58, 59, 62, 64, 66, 68, 70, 72, 74,
+ 76, 78, 80, 83, 84, 87, 90, 93, 96, 99,
+ 102, 105, 108, 111, 114, 117, 120, 123, 126, 129,
+ 134, 137, 141, 146, 152, 156, 160, 162, 164, 168,
+ 175, 179, 181, 184, 186, 193, 200, 204, 206, 207,
+ 211, 215, 217, 220, 222, 226, 230, 236, 243, 250,
+ 256, 263, 270, 277, 284, 287, 289, 295, 297, 299,
+ 301, 303, 306, 308, 314, 316, 320, 322, 324, 328,
+ 335, 339, 341, 345, 349, 351, 355, 361, 365, 369,
+ 371, 377, 384, 386, 388, 390, 392, 394, 396, 398,
+ 400, 402, 404, 406, 408, 410, 412, 414, 416, 418,
+ 420, 421, 423, 425, 427, 429, 431, 433, 434, 438,
+ 440, 444, 448, 452, 456, 460, 462, 465, 468, 471,
+ 474, 476, 481, 483, 487, 491, 493, 498, 500, 504,
+ 509, 516, 518, 520, 522, 524, 526, 527, 531, 533,
+ 535, 537, 539, 542, 544, 546, 548, 550, 552, 554,
+ 556, 558, 560, 562, 563
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int16 yyrhs[] =
+{
+ 66, 0, -1, 67, -1, 70, -1, 72, -1, 67,
+ 68, -1, 68, -1, 74, 69, 136, 41, 70, 42,
+ 49, -1, 4, -1, 10, -1, 11, -1, 70, 71,
+ -1, 71, -1, 74, 73, 136, 41, 77, 42, 49,
+ -1, 74, 73, 136, 77, -1, 5, -1, 6, -1,
+ 8, -1, 7, -1, 9, -1, 75, -1, -1, 75,
+ 76, -1, 76, -1, 57, -1, 58, -1, 59, -1,
+ 60, -1, 61, -1, 62, -1, 63, -1, 64, -1,
+ 77, 78, -1, -1, 116, 79, -1, 116, 82, -1,
+ 116, 85, -1, 116, 80, -1, 116, 81, -1, 116,
+ 88, -1, 116, 89, -1, 116, 94, -1, 116, 93,
+ -1, 116, 95, -1, 116, 96, -1, 116, 97, -1,
+ 116, 98, -1, 116, 112, -1, 117, 52, -1, 124,
+ 36, 120, 49, -1, 134, 49, -1, 50, 134, 49,
+ -1, 133, 36, 120, 49, -1, 22, 133, 36, 133,
+ 49, -1, 17, 83, 49, -1, 83, 48, 84, -1,
+ 84, -1, 134, -1, 134, 36, 120, -1, 19, 86,
+ 41, 87, 42, 49, -1, 128, 37, 120, -1, 128,
+ -1, 87, 79, -1, 79, -1, 18, 135, 41, 87,
+ 42, 49, -1, 21, 133, 41, 90, 42, 49, -1,
+ 90, 48, 91, -1, 91, -1, -1, 124, 36, 120,
+ -1, 124, 36, 92, -1, 134, -1, 50, 134, -1,
+ 92, -1, 45, 126, 46, -1, 45, 122, 46, -1,
+ 23, 132, 36, 120, 49, -1, 24, 134, 41, 119,
+ 42, 49, -1, 25, 135, 41, 87, 42, 49, -1,
+ 25, 132, 36, 120, 49, -1, 35, 25, 132, 36,
+ 120, 49, -1, 26, 135, 41, 108, 42, 49, -1,
+ 26, 135, 41, 110, 42, 49, -1, 29, 135, 41,
+ 99, 42, 49, -1, 99, 100, -1, 100, -1, 28,
+ 41, 101, 42, 49, -1, 79, -1, 112, -1, 95,
+ -1, 105, -1, 101, 102, -1, 102, -1, 27, 41,
+ 103, 42, 49, -1, 79, -1, 103, 48, 104, -1,
+ 104, -1, 133, -1, 41, 119, 42, -1, 30, 135,
+ 41, 106, 42, 49, -1, 106, 48, 107, -1, 107,
+ -1, 133, 36, 133, -1, 108, 48, 109, -1, 109,
+ -1, 41, 110, 42, -1, 134, 36, 41, 110, 42,
+ -1, 134, 36, 120, -1, 110, 48, 111, -1, 111,
+ -1, 45, 129, 48, 129, 46, -1, 113, 135, 41,
+ 87, 42, 49, -1, 31, -1, 32, -1, 33, -1,
+ 34, -1, 134, -1, 115, -1, 20, -1, 19, -1,
+ 18, -1, 21, -1, 23, -1, 24, -1, 25, -1,
+ 26, -1, 28, -1, 29, -1, 31, -1, 117, -1,
+ -1, 12, -1, 14, -1, 13, -1, 15, -1, 16,
+ -1, 119, -1, -1, 119, 48, 120, -1, 120, -1,
+ 120, 39, 120, -1, 120, 37, 120, -1, 120, 38,
+ 120, -1, 120, 40, 120, -1, 124, 36, 120, -1,
+ 121, -1, 38, 121, -1, 37, 121, -1, 50, 121,
+ -1, 51, 121, -1, 124, -1, 114, 43, 118, 44,
+ -1, 125, -1, 43, 120, 44, -1, 122, 48, 123,
+ -1, 123, -1, 114, 43, 118, 44, -1, 114, -1,
+ 114, 47, 114, -1, 114, 45, 120, 46, -1, 114,
+ 47, 114, 45, 120, 46, -1, 135, -1, 132, -1,
+ 131, -1, 133, -1, 127, -1, -1, 127, 48, 128,
+ -1, 128, -1, 55, -1, 29, -1, 132, -1, 38,
+ 130, -1, 130, -1, 54, -1, 53, -1, 54, -1,
+ 53, -1, 56, -1, 55, -1, 58, -1, 52, -1,
+ 137, -1, -1, 52, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 168, 168, 170, 172, 176, 178, 182, 188, 189,
+ 190, 193, 195, 199, 205, 210, 211, 212, 213, 214,
+ 217, 218, 221, 222, 225, 226, 227, 228, 229, 230,
+ 231, 232, 235, 237, 240, 245, 250, 255, 260, 265,
+ 270, 275, 280, 285, 290, 295, 300, 305, 310, 322,
+ 324, 326, 330, 341, 351, 355, 357, 361, 363, 367,
+ 376, 378, 382, 384, 388, 394, 400, 402, 404, 407,
+ 409, 411, 413, 415, 419, 421, 425, 429, 433, 437,
+ 439, 443, 445, 453, 457, 459, 463, 465, 467, 469,
+ 471, 475, 477, 481, 483, 487, 489, 493, 495, 499,
+ 503, 508, 512, 516, 518, 522, 524, 526, 530, 532,
+ 536, 546, 550, 551, 552, 553, 556, 557, 560, 562,
+ 564, 566, 568, 570, 572, 574, 576, 578, 580, 584,
+ 585, 588, 589, 590, 591, 592, 595, 596, 599, 601,
+ 605, 607, 609, 611, 613, 615, 619, 621, 623, 625,
+ 627, 629, 631, 633, 637, 639, 643, 647, 654, 662,
+ 671, 682, 689, 696, 703, 714, 715, 718, 720, 724,
+ 739, 743, 750, 751, 754, 755, 758, 761, 764, 767,
+ 768, 771, 774, 775, 778
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "END_OF_FILE", "error", "$undefined", "ERROR_TOK", "XKB_KEYMAP",
+ "XKB_KEYCODES", "XKB_TYPES", "XKB_SYMBOLS", "XKB_COMPATMAP",
+ "XKB_GEOMETRY", "XKB_SEMANTICS", "XKB_LAYOUT", "INCLUDE", "OVERRIDE",
+ "AUGMENT", "REPLACE", "ALTERNATE", "VIRTUAL_MODS", "TYPE", "INTERPRET",
+ "ACTION_TOK", "KEY", "ALIAS", "GROUP", "MODIFIER_MAP", "INDICATOR",
+ "SHAPE", "KEYS", "ROW", "SECTION", "OVERLAY", "TEXT", "OUTLINE", "SOLID",
+ "LOGO", "VIRTUAL", "EQUALS", "PLUS", "MINUS", "DIVIDE", "TIMES",
+ "OBRACE", "CBRACE", "OPAREN", "CPAREN", "OBRACKET", "CBRACKET", "DOT",
+ "COMMA", "SEMI", "EXCLAM", "INVERT", "STRING", "INTEGER", "FLOAT",
+ "IDENT", "KEYNAME", "PARTIAL", "DEFAULT", "HIDDEN", "ALPHANUMERIC_KEYS",
+ "MODIFIER_KEYS", "KEYPAD_KEYS", "FUNCTION_KEYS", "ALTERNATE_GROUP",
+ "$accept", "XkbFile", "XkbCompMapList", "XkbCompositeMap",
+ "XkbCompositeType", "XkbMapConfigList", "XkbMapConfig", "XkbConfig",
+ "FileType", "OptFlags", "Flags", "Flag", "DeclList", "Decl", "VarDecl",
+ "KeyNameDecl", "KeyAliasDecl", "VModDecl", "VModDefList", "VModDef",
+ "InterpretDecl", "InterpretMatch", "VarDeclList", "KeyTypeDecl",
+ "SymbolsDecl", "SymbolsBody", "SymbolsVarDecl", "ArrayInit",
+ "GroupCompatDecl", "ModMapDecl", "IndicatorMapDecl", "IndicatorNameDecl",
+ "ShapeDecl", "SectionDecl", "SectionBody", "SectionBodyItem", "RowBody",
+ "RowBodyItem", "Keys", "Key", "OverlayDecl", "OverlayKeyList",
+ "OverlayKey", "OutlineList", "OutlineInList", "CoordList", "Coord",
+ "DoodadDecl", "DoodadType", "FieldSpec", "Element", "OptMergeMode",
+ "MergeMode", "OptExprList", "ExprList", "Expr", "Term", "ActionList",
+ "Action", "Lhs", "Terminal", "OptKeySymList", "KeySymList", "KeySym",
+ "SignedNumber", "Number", "Float", "Integer", "KeyName", "Ident",
+ "String", "OptMapName", "MapName", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 255, 1, 2, 3, 4, 5, 6,
+ 7, 8, 10, 11, 12, 13, 14, 20, 21, 22,
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
+ 33, 34, 35, 36, 37, 38, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 60, 61, 62, 63, 64, 70, 71, 72,
+ 73, 74, 75, 76, 77
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 65, 66, 66, 66, 67, 67, 68, 69, 69,
+ 69, 70, 70, 71, 72, 73, 73, 73, 73, 73,
+ 74, 74, 75, 75, 76, 76, 76, 76, 76, 76,
+ 76, 76, 77, 77, 78, 78, 78, 78, 78, 78,
+ 78, 78, 78, 78, 78, 78, 78, 78, 78, 79,
+ 79, 79, 80, 81, 82, 83, 83, 84, 84, 85,
+ 86, 86, 87, 87, 88, 89, 90, 90, 90, 91,
+ 91, 91, 91, 91, 92, 92, 93, 94, 95, 96,
+ 96, 97, 97, 98, 99, 99, 100, 100, 100, 100,
+ 100, 101, 101, 102, 102, 103, 103, 104, 104, 105,
+ 106, 106, 107, 108, 108, 109, 109, 109, 110, 110,
+ 111, 112, 113, 113, 113, 113, 114, 114, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 115, 115, 116,
+ 116, 117, 117, 117, 117, 117, 118, 118, 119, 119,
+ 120, 120, 120, 120, 120, 120, 121, 121, 121, 121,
+ 121, 121, 121, 121, 122, 122, 123, 124, 124, 124,
+ 124, 125, 125, 125, 125, 126, 126, 127, 127, 128,
+ 128, 128, 129, 129, 130, 130, 131, 132, 133, 134,
+ 134, 135, 136, 136, 137
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 1, 1, 2, 1, 7, 1, 1,
+ 1, 2, 1, 7, 4, 1, 1, 1, 1, 1,
+ 1, 0, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 0, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 4,
+ 2, 3, 4, 5, 3, 3, 1, 1, 3, 6,
+ 3, 1, 2, 1, 6, 6, 3, 1, 0, 3,
+ 3, 1, 2, 1, 3, 3, 5, 6, 6, 5,
+ 6, 6, 6, 6, 2, 1, 5, 1, 1, 1,
+ 1, 2, 1, 5, 1, 3, 1, 1, 3, 6,
+ 3, 1, 3, 3, 1, 3, 5, 3, 3, 1,
+ 5, 6, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 1, 1, 1, 1, 1, 1, 0, 3, 1,
+ 3, 3, 3, 3, 3, 1, 2, 2, 2, 2,
+ 1, 4, 1, 3, 3, 1, 4, 1, 3, 4,
+ 6, 1, 1, 1, 1, 1, 0, 3, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 0, 1
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 21, 24, 25, 26, 27, 28, 29, 30, 31, 0,
+ 21, 6, 21, 12, 4, 0, 20, 23, 1, 5,
+ 0, 11, 0, 8, 15, 16, 18, 17, 19, 9,
+ 10, 183, 183, 22, 183, 184, 0, 182, 33, 0,
+ 21, 33, 130, 21, 130, 131, 133, 132, 134, 135,
+ 32, 0, 129, 0, 0, 0, 120, 119, 118, 121,
+ 0, 122, 123, 124, 125, 126, 127, 128, 113, 114,
+ 115, 0, 0, 179, 178, 180, 34, 37, 38, 35,
+ 36, 39, 40, 42, 41, 43, 44, 45, 46, 47,
+ 0, 157, 117, 0, 0, 116, 48, 7, 13, 0,
+ 56, 57, 181, 0, 170, 177, 169, 0, 61, 171,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 50, 0, 54, 0, 0,
+ 0, 0, 68, 0, 0, 0, 0, 0, 0, 0,
+ 0, 51, 0, 120, 119, 121, 122, 123, 124, 125,
+ 127, 128, 0, 0, 0, 0, 0, 176, 157, 0,
+ 145, 150, 152, 163, 162, 164, 116, 161, 158, 0,
+ 0, 55, 58, 63, 0, 0, 60, 166, 0, 0,
+ 67, 73, 0, 116, 0, 0, 0, 139, 0, 0,
+ 0, 0, 0, 104, 0, 109, 0, 124, 126, 0,
+ 87, 89, 0, 85, 90, 88, 0, 0, 147, 150,
+ 146, 0, 148, 149, 137, 0, 0, 0, 0, 159,
+ 0, 0, 49, 52, 0, 62, 0, 170, 169, 0,
+ 0, 155, 0, 165, 168, 72, 0, 0, 0, 53,
+ 76, 0, 0, 79, 0, 0, 0, 175, 174, 0,
+ 173, 0, 0, 0, 0, 0, 0, 0, 0, 84,
+ 0, 0, 153, 0, 136, 141, 142, 140, 143, 144,
+ 0, 64, 59, 137, 75, 0, 74, 0, 65, 66,
+ 70, 69, 77, 138, 78, 105, 172, 0, 81, 103,
+ 82, 108, 0, 107, 0, 94, 0, 92, 0, 83,
+ 80, 111, 151, 160, 0, 154, 167, 0, 0, 0,
+ 0, 91, 0, 101, 0, 156, 110, 106, 0, 0,
+ 96, 97, 86, 0, 0, 0, 0, 0, 0, 99,
+ 100, 102, 98, 93, 95
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 9, 10, 11, 31, 12, 13, 14, 32, 22,
+ 16, 17, 42, 50, 173, 77, 78, 79, 99, 100,
+ 80, 107, 174, 81, 82, 179, 180, 181, 83, 84,
+ 201, 86, 87, 88, 202, 203, 296, 297, 319, 320,
+ 204, 312, 313, 192, 193, 194, 195, 205, 90, 158,
+ 92, 51, 52, 263, 264, 187, 160, 230, 231, 161,
+ 162, 232, 233, 108, 249, 250, 163, 164, 165, 166,
+ 167, 36, 37
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -188
+static const yytype_int16 yypact[] =
+{
+ 628, -188, -188, -188, -188, -188, -188, -188, -188, 12,
+ 4, -188, 58, -188, -188, 695, 628, -188, -188, -188,
+ 121, -188, 408, -188, -188, -188, -188, -188, -188, -188,
+ -188, -9, -9, -188, -9, -188, 19, -188, 45, 45,
+ 628, -188, 174, 620, 137, -188, -188, -188, -188, -188,
+ -188, 317, 39, -15, 50, 1, 59, -18, -188, 72,
+ 72, 106, 1, -27, 59, -188, 59, 62, -188, -188,
+ -188, 117, 1, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, -188, -188, -188, -188, -188, -188, -188, -188,
+ 59, 51, -188, 125, 146, 134, -188, -188, -188, 132,
+ -188, 163, -188, 168, -188, -188, -188, 173, 179, -188,
+ 178, 186, 190, 194, 206, 204, 208, 221, 106, 216,
+ 225, 265, 640, 265, 265, -188, 1, -188, 265, 599,
+ 599, 265, 470, 72, 265, 265, 265, 599, -26, 21,
+ 239, -188, 599, -188, -188, -188, -188, -188, -188, -188,
+ -188, -188, 265, 265, 265, 265, 265, -188, 159, 232,
+ -188, 240, -188, -188, -188, -188, -188, -188, 223, 98,
+ 156, -188, 260, -188, 485, 513, 260, 617, 1, 30,
+ -188, -188, 243, 32, 231, 192, 64, 260, 199, 528,
+ 236, 35, 127, -188, 128, -188, 251, 59, 270, 59,
+ -188, -188, 422, -188, -188, -188, 265, 556, -188, -188,
+ -188, 342, -188, -188, 265, 265, 265, 265, 265, -188,
+ 265, 265, -188, -188, 263, -188, 264, 249, 271, 281,
+ 61, -188, 279, 278, -188, -188, 280, 470, 340, -188,
+ -188, 283, 265, -188, 284, 129, 16, -188, -188, 282,
+ -188, 298, -34, 308, 236, 381, 576, 287, 321, -188,
+ 215, 325, -188, 332, 336, 158, 158, -188, -188, 260,
+ 316, -188, -188, 265, -188, 640, -188, -18, -188, -188,
+ -188, 260, -188, 260, -188, -188, -188, 35, -188, -188,
+ -188, -188, 236, 260, 346, -188, 442, -188, 72, -188,
+ -188, -188, -188, -188, 344, -188, -188, 343, 143, -28,
+ 348, -188, 176, -188, 367, -188, -188, -188, 265, 198,
+ -188, -188, -188, 359, 72, 72, 202, 362, -28, -188,
+ -188, -188, -188, -188, -188
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -188, -188, -188, 410, -188, 383, -7, -188, 399, 38,
+ -188, 409, 385, -188, -35, -188, -188, -188, -188, 301,
+ -188, -188, -47, -188, -188, -188, 191, 200, -188, -188,
+ 378, -188, -188, -188, -188, 228, -188, 148, -188, 130,
+ -188, -188, 133, -188, 197, -187, 205, 423, -188, 26,
+ -188, -188, -188, 203, -134, 89, 104, -188, 207, -29,
+ -188, -188, -188, -175, 188, 233, -188, -43, -51, -45,
+ -33, 109, -188
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -180
+static const yytype_int16 yytable[] =
+{
+ 94, 186, 234, 245, -2, 21, 95, 190, 110, 111,
+ 101, 104, 18, 318, 109, 190, 76, 113, 112, 191,
+ 114, 73, 93, 103, 75, 102, 105, 119, 74, 73,
+ 115, 116, 75, 117, 97, 105, 21, 106, 15, 143,
+ 144, 58, 145, 35, 146, 147, 197, 149, 20, 198,
+ 150, 199, 67, 68, 69, 70, 73, 120, -3, 75,
+ 40, 1, 2, 3, 4, 5, 6, 7, 8, 247,
+ 248, 72, 236, 246, -71, 140, 73, 91, 237, 75,
+ -71, 101, 184, 175, 95, 95, 41, 183, 247, 248,
+ 189, 96, 95, 196, 95, 207, 121, 95, 122, 98,
+ 93, 93, 306, 182, 200, 308, 241, 274, 93, 275,
+ 93, 102, 242, 93, -112, 1, 2, 3, 4, 5,
+ 6, 7, 8, 209, 209, 23, 209, 209, 74, 95,
+ 95, 29, 30, 235, 109, 215, 216, 217, 218, 225,
+ 225, 38, 118, 39, 95, 93, 93, 222, 168, 45,
+ 46, 47, 48, 49, 225, 91, 91, 95, 91, 105,
+ 93, 123, 95, 91, 115, 91, 257, 200, 91, 251,
+ 253, 285, 225, 93, -14, 252, 254, 254, 93, 54,
+ 126, 127, 124, 125, 326, 317, 45, 46, 47, 48,
+ 49, 254, 183, 215, 216, 217, 218, 217, 218, 128,
+ 91, 91, 214, 229, 121, 223, 122, 196, 182, 129,
+ 159, 95, 169, 170, 130, 91, 131, 172, 323, 132,
+ 176, 295, 133, 185, 324, 188, 134, 93, 91, 215,
+ 216, 217, 218, 91, 109, 135, 215, 216, 217, 218,
+ 327, 240, 136, 211, 332, 137, 328, 314, 243, 138,
+ 242, 95, 215, 216, 217, 218, 208, 210, 321, 212,
+ 213, 295, 139, 91, 300, 141, 142, 93, 221, 215,
+ 216, 217, 218, 314, 331, 206, 220, 321, 219, 238,
+ 239, 191, 91, 143, 144, 58, 145, 255, 146, 147,
+ 148, 149, -127, 65, 150, 260, 151, 215, 216, 217,
+ 218, 229, 152, 153, 265, 266, 267, 268, 154, 269,
+ 270, 256, 271, 272, -179, 155, 156, 102, 105, 157,
+ 73, 74, 91, 75, 273, 276, 277, 281, 298, 278,
+ 287, 283, 282, 284, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 293, 65, 66, 288, 67, 68,
+ 69, 70, 71, 215, 216, 217, 218, 290, 143, 144,
+ 58, 145, 303, 146, 147, 148, 149, 72, 65, 150,
+ 299, 151, 73, 74, 301, 75, 302, 152, 153, 215,
+ 216, 217, 218, 154, 242, 177, 262, 309, 315, 316,
+ 155, 156, 102, 105, 157, 73, 74, 322, 75, 143,
+ 144, 58, 145, 325, 146, 147, 148, 149, 329, 65,
+ 150, 333, 151, 24, 25, 26, 27, 28, 152, 153,
+ 19, 34, 292, 43, 154, 33, 44, 171, 279, 85,
+ 259, 155, 156, 102, 105, 157, 73, 74, 280, 75,
+ 143, 144, 58, 145, 311, 146, 147, 197, 149, 289,
+ 198, 150, 199, 67, 68, 69, 70, 330, 334, 291,
+ 143, 144, 58, 145, 258, 146, 147, 148, 149, 294,
+ 65, 150, 72, 151, 89, 307, 304, 73, 0, 286,
+ 75, 0, 305, 0, 310, 0, 0, 0, 143, 144,
+ 58, 145, 72, 146, 147, 148, 149, 73, 65, 150,
+ 75, 151, 0, 143, 144, 58, 145, 0, 146, 147,
+ 148, 149, 0, 65, 150, 177, 151, 0, 0, 0,
+ 178, 0, 0, 0, 0, 73, 0, 224, 75, 0,
+ 0, 143, 144, 58, 145, 72, 146, 147, 148, 149,
+ 73, 65, 150, 75, 151, 0, 143, 144, 58, 145,
+ 0, 146, 147, 148, 149, 226, 65, 150, 0, 151,
+ 0, 0, 0, 72, 0, 0, 0, 0, 73, 0,
+ 244, 75, 0, 0, 143, 144, 58, 145, 72, 146,
+ 147, 148, 149, 73, 65, 150, 75, 151, 0, 0,
+ 0, 0, 0, 0, 143, 144, 58, 145, 261, 146,
+ 147, 148, 149, 294, 65, 150, 72, 151, 0, 0,
+ 0, 73, 0, 0, 75, 0, 0, 143, 144, 58,
+ 145, 0, 146, 147, 148, 149, 72, 65, 150, 0,
+ 151, 73, 0, 0, 75, 143, 144, 58, 145, 0,
+ 146, 147, 148, 149, 0, 65, 227, 0, 151, 72,
+ 0, 0, 0, 0, 73, 0, 0, 75, 143, 144,
+ 58, 145, 53, 146, 147, 148, 149, 0, 65, 150,
+ 105, 151, 228, 0, 0, 75, 0, 1, 2, 3,
+ 4, 5, 6, 7, 8, 1, 2, 3, 4, 5,
+ 6, 7, 8, 0, 0, 73, 0, 0, 75, 23,
+ 24, 25, 26, 27, 28, 29, 30
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 51, 135, 177, 190, 0, 12, 51, 41, 59, 60,
+ 55, 29, 0, 41, 57, 41, 51, 62, 61, 45,
+ 63, 55, 51, 56, 58, 52, 53, 72, 56, 55,
+ 63, 64, 58, 66, 49, 53, 43, 55, 0, 18,
+ 19, 20, 21, 52, 23, 24, 25, 26, 10, 28,
+ 29, 30, 31, 32, 33, 34, 55, 90, 0, 58,
+ 41, 57, 58, 59, 60, 61, 62, 63, 64, 53,
+ 54, 50, 42, 38, 42, 118, 55, 51, 48, 58,
+ 48, 126, 133, 130, 129, 130, 41, 132, 53, 54,
+ 137, 52, 137, 138, 139, 142, 45, 142, 47, 49,
+ 129, 130, 277, 132, 139, 292, 42, 46, 137, 48,
+ 139, 52, 48, 142, 52, 57, 58, 59, 60, 61,
+ 62, 63, 64, 152, 153, 4, 155, 156, 56, 174,
+ 175, 10, 11, 178, 177, 37, 38, 39, 40, 174,
+ 175, 32, 25, 34, 189, 174, 175, 49, 122, 12,
+ 13, 14, 15, 16, 189, 129, 130, 202, 132, 53,
+ 189, 36, 207, 137, 197, 139, 199, 202, 142, 42,
+ 42, 42, 207, 202, 0, 48, 48, 48, 207, 42,
+ 48, 49, 36, 49, 318, 42, 12, 13, 14, 15,
+ 16, 48, 237, 37, 38, 39, 40, 39, 40, 36,
+ 174, 175, 43, 177, 45, 49, 47, 252, 237, 41,
+ 121, 256, 123, 124, 41, 189, 37, 128, 42, 41,
+ 131, 256, 36, 134, 48, 136, 36, 256, 202, 37,
+ 38, 39, 40, 207, 277, 41, 37, 38, 39, 40,
+ 42, 49, 36, 154, 42, 41, 48, 298, 49, 41,
+ 48, 296, 37, 38, 39, 40, 152, 153, 309, 155,
+ 156, 296, 41, 237, 49, 49, 41, 296, 45, 37,
+ 38, 39, 40, 324, 325, 36, 36, 328, 46, 36,
+ 49, 45, 256, 18, 19, 20, 21, 36, 23, 24,
+ 25, 26, 43, 28, 29, 206, 31, 37, 38, 39,
+ 40, 275, 37, 38, 215, 216, 217, 218, 43, 220,
+ 221, 41, 49, 49, 43, 50, 51, 52, 53, 54,
+ 55, 56, 296, 58, 43, 46, 48, 238, 41, 49,
+ 48, 242, 49, 49, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 255, 28, 29, 49, 31, 32,
+ 33, 34, 35, 37, 38, 39, 40, 49, 18, 19,
+ 20, 21, 46, 23, 24, 25, 26, 50, 28, 29,
+ 49, 31, 55, 56, 49, 58, 44, 37, 38, 37,
+ 38, 39, 40, 43, 48, 45, 44, 41, 44, 46,
+ 50, 51, 52, 53, 54, 55, 56, 49, 58, 18,
+ 19, 20, 21, 36, 23, 24, 25, 26, 49, 28,
+ 29, 49, 31, 5, 6, 7, 8, 9, 37, 38,
+ 10, 22, 41, 40, 43, 16, 41, 126, 237, 51,
+ 202, 50, 51, 52, 53, 54, 55, 56, 238, 58,
+ 18, 19, 20, 21, 296, 23, 24, 25, 26, 252,
+ 28, 29, 30, 31, 32, 33, 34, 324, 328, 254,
+ 18, 19, 20, 21, 42, 23, 24, 25, 26, 27,
+ 28, 29, 50, 31, 51, 287, 273, 55, -1, 246,
+ 58, -1, 275, -1, 42, -1, -1, -1, 18, 19,
+ 20, 21, 50, 23, 24, 25, 26, 55, 28, 29,
+ 58, 31, -1, 18, 19, 20, 21, -1, 23, 24,
+ 25, 26, -1, 28, 29, 45, 31, -1, -1, -1,
+ 50, -1, -1, -1, -1, 55, -1, 42, 58, -1,
+ -1, 18, 19, 20, 21, 50, 23, 24, 25, 26,
+ 55, 28, 29, 58, 31, -1, 18, 19, 20, 21,
+ -1, 23, 24, 25, 26, 42, 28, 29, -1, 31,
+ -1, -1, -1, 50, -1, -1, -1, -1, 55, -1,
+ 42, 58, -1, -1, 18, 19, 20, 21, 50, 23,
+ 24, 25, 26, 55, 28, 29, 58, 31, -1, -1,
+ -1, -1, -1, -1, 18, 19, 20, 21, 42, 23,
+ 24, 25, 26, 27, 28, 29, 50, 31, -1, -1,
+ -1, 55, -1, -1, 58, -1, -1, 18, 19, 20,
+ 21, -1, 23, 24, 25, 26, 50, 28, 29, -1,
+ 31, 55, -1, -1, 58, 18, 19, 20, 21, -1,
+ 23, 24, 25, 26, -1, 28, 29, -1, 31, 50,
+ -1, -1, -1, -1, 55, -1, -1, 58, 18, 19,
+ 20, 21, 42, 23, 24, 25, 26, -1, 28, 29,
+ 53, 31, 55, -1, -1, 58, -1, 57, 58, 59,
+ 60, 61, 62, 63, 64, 57, 58, 59, 60, 61,
+ 62, 63, 64, -1, -1, 55, -1, -1, 58, 4,
+ 5, 6, 7, 8, 9, 10, 11
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 57, 58, 59, 60, 61, 62, 63, 64, 66,
+ 67, 68, 70, 71, 72, 74, 75, 76, 0, 68,
+ 74, 71, 74, 4, 5, 6, 7, 8, 9, 10,
+ 11, 69, 73, 76, 73, 52, 136, 137, 136, 136,
+ 41, 41, 77, 70, 77, 12, 13, 14, 15, 16,
+ 78, 116, 117, 42, 42, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 28, 29, 31, 32, 33,
+ 34, 35, 50, 55, 56, 58, 79, 80, 81, 82,
+ 85, 88, 89, 93, 94, 95, 96, 97, 98, 112,
+ 113, 114, 115, 124, 133, 134, 52, 49, 49, 83,
+ 84, 134, 52, 135, 29, 53, 55, 86, 128, 132,
+ 133, 133, 132, 134, 132, 135, 135, 135, 25, 134,
+ 135, 45, 47, 36, 36, 49, 48, 49, 36, 41,
+ 41, 37, 41, 36, 36, 41, 36, 41, 41, 41,
+ 132, 49, 41, 18, 19, 21, 23, 24, 25, 26,
+ 29, 31, 37, 38, 43, 50, 51, 54, 114, 120,
+ 121, 124, 125, 131, 132, 133, 134, 135, 114, 120,
+ 120, 84, 120, 79, 87, 87, 120, 45, 50, 90,
+ 91, 92, 124, 134, 133, 120, 119, 120, 120, 87,
+ 41, 45, 108, 109, 110, 111, 134, 25, 28, 30,
+ 79, 95, 99, 100, 105, 112, 36, 87, 121, 124,
+ 121, 120, 121, 121, 43, 37, 38, 39, 40, 46,
+ 36, 45, 49, 49, 42, 79, 42, 29, 55, 114,
+ 122, 123, 126, 127, 128, 134, 42, 48, 36, 49,
+ 49, 42, 48, 49, 42, 110, 38, 53, 54, 129,
+ 130, 42, 48, 42, 48, 36, 41, 135, 42, 100,
+ 120, 42, 44, 118, 119, 120, 120, 120, 120, 120,
+ 120, 49, 49, 43, 46, 48, 46, 48, 49, 91,
+ 92, 120, 49, 120, 49, 42, 130, 48, 49, 109,
+ 49, 111, 41, 120, 27, 79, 101, 102, 41, 49,
+ 49, 49, 44, 46, 118, 123, 128, 129, 110, 41,
+ 42, 102, 106, 107, 133, 44, 46, 42, 41, 103,
+ 104, 133, 49, 42, 48, 36, 119, 42, 48, 49,
+ 107, 133, 42, 49, 104
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
+#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+
+/* Line 1455 of yacc.c */
+#line 169 "xkbparse.y"
+ { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
+ break;
+
+ case 3:
+
+/* Line 1455 of yacc.c */
+#line 171 "xkbparse.y"
+ { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
+ break;
+
+ case 4:
+
+/* Line 1455 of yacc.c */
+#line 173 "xkbparse.y"
+ { (yyval.file)= rtrnValue= (yyvsp[(1) - (1)].file); }
+ break;
+
+ case 5:
+
+/* Line 1455 of yacc.c */
+#line 177 "xkbparse.y"
+ { (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); }
+ break;
+
+ case 6:
+
+/* Line 1455 of yacc.c */
+#line 179 "xkbparse.y"
+ { (yyval.file)= (yyvsp[(1) - (1)].file); }
+ break;
+
+ case 7:
+
+/* Line 1455 of yacc.c */
+#line 185 "xkbparse.y"
+ { (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),&(yyvsp[(5) - (7)].file)->common,(yyvsp[(1) - (7)].uval)); }
+ break;
+
+ case 8:
+
+/* Line 1455 of yacc.c */
+#line 188 "xkbparse.y"
+ { (yyval.uval)= XkmKeymapFile; }
+ break;
+
+ case 9:
+
+/* Line 1455 of yacc.c */
+#line 189 "xkbparse.y"
+ { (yyval.uval)= XkmSemanticsFile; }
+ break;
+
+ case 10:
+
+/* Line 1455 of yacc.c */
+#line 190 "xkbparse.y"
+ { (yyval.uval)= XkmLayoutFile; }
+ break;
+
+ case 11:
+
+/* Line 1455 of yacc.c */
+#line 194 "xkbparse.y"
+ { (yyval.file)= (XkbFile *)AppendStmt(&(yyvsp[(1) - (2)].file)->common,&(yyvsp[(2) - (2)].file)->common); }
+ break;
+
+ case 12:
+
+/* Line 1455 of yacc.c */
+#line 196 "xkbparse.y"
+ { (yyval.file)= (yyvsp[(1) - (1)].file); }
+ break;
+
+ case 13:
+
+/* Line 1455 of yacc.c */
+#line 202 "xkbparse.y"
+ { (yyval.file)= CreateXKBFile((yyvsp[(2) - (7)].uval),(yyvsp[(3) - (7)].str),(yyvsp[(5) - (7)].any),(yyvsp[(1) - (7)].uval)); }
+ break;
+
+ case 14:
+
+/* Line 1455 of yacc.c */
+#line 206 "xkbparse.y"
+ { (yyval.file)= CreateXKBFile((yyvsp[(2) - (4)].uval),(yyvsp[(3) - (4)].str),(yyvsp[(4) - (4)].any),(yyvsp[(1) - (4)].uval)); }
+ break;
+
+ case 15:
+
+/* Line 1455 of yacc.c */
+#line 210 "xkbparse.y"
+ { (yyval.uval)= XkmKeyNamesIndex; }
+ break;
+
+ case 16:
+
+/* Line 1455 of yacc.c */
+#line 211 "xkbparse.y"
+ { (yyval.uval)= XkmTypesIndex; }
+ break;
+
+ case 17:
+
+/* Line 1455 of yacc.c */
+#line 212 "xkbparse.y"
+ { (yyval.uval)= XkmCompatMapIndex; }
+ break;
+
+ case 18:
+
+/* Line 1455 of yacc.c */
+#line 213 "xkbparse.y"
+ { (yyval.uval)= XkmSymbolsIndex; }
+ break;
+
+ case 19:
+
+/* Line 1455 of yacc.c */
+#line 214 "xkbparse.y"
+ { (yyval.uval)= XkmGeometryIndex; }
+ break;
+
+ case 20:
+
+/* Line 1455 of yacc.c */
+#line 217 "xkbparse.y"
+ { (yyval.uval)= (yyvsp[(1) - (1)].uval); }
+ break;
+
+ case 21:
+
+/* Line 1455 of yacc.c */
+#line 218 "xkbparse.y"
+ { (yyval.uval)= 0; }
+ break;
+
+ case 22:
+
+/* Line 1455 of yacc.c */
+#line 221 "xkbparse.y"
+ { (yyval.uval)= (((yyvsp[(1) - (2)].uval))|((yyvsp[(2) - (2)].uval))); }
+ break;
+
+ case 23:
+
+/* Line 1455 of yacc.c */
+#line 222 "xkbparse.y"
+ { (yyval.uval)= (yyvsp[(1) - (1)].uval); }
+ break;
+
+ case 24:
+
+/* Line 1455 of yacc.c */
+#line 225 "xkbparse.y"
+ { (yyval.uval)= XkbLC_Partial; }
+ break;
+
+ case 25:
+
+/* Line 1455 of yacc.c */
+#line 226 "xkbparse.y"
+ { (yyval.uval)= XkbLC_Default; }
+ break;
+
+ case 26:
+
+/* Line 1455 of yacc.c */
+#line 227 "xkbparse.y"
+ { (yyval.uval)= XkbLC_Hidden; }
+ break;
+
+ case 27:
+
+/* Line 1455 of yacc.c */
+#line 228 "xkbparse.y"
+ { (yyval.uval)= XkbLC_AlphanumericKeys; }
+ break;
+
+ case 28:
+
+/* Line 1455 of yacc.c */
+#line 229 "xkbparse.y"
+ { (yyval.uval)= XkbLC_ModifierKeys; }
+ break;
+
+ case 29:
+
+/* Line 1455 of yacc.c */
+#line 230 "xkbparse.y"
+ { (yyval.uval)= XkbLC_KeypadKeys; }
+ break;
+
+ case 30:
+
+/* Line 1455 of yacc.c */
+#line 231 "xkbparse.y"
+ { (yyval.uval)= XkbLC_FunctionKeys; }
+ break;
+
+ case 31:
+
+/* Line 1455 of yacc.c */
+#line 232 "xkbparse.y"
+ { (yyval.uval)= XkbLC_AlternateGroup; }
+ break;
+
+ case 32:
+
+/* Line 1455 of yacc.c */
+#line 236 "xkbparse.y"
+ { (yyval.any)= AppendStmt((yyvsp[(1) - (2)].any),(yyvsp[(2) - (2)].any)); }
+ break;
+
+ case 33:
+
+/* Line 1455 of yacc.c */
+#line 237 "xkbparse.y"
+ { (yyval.any)= NULL; }
+ break;
+
+ case 34:
+
+/* Line 1455 of yacc.c */
+#line 241 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].var)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].var)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].var)->common;
+ }
+ break;
+
+ case 35:
+
+/* Line 1455 of yacc.c */
+#line 246 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].vmod)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].vmod)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].vmod)->common;
+ }
+ break;
+
+ case 36:
+
+/* Line 1455 of yacc.c */
+#line 251 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].interp)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].interp)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].interp)->common;
+ }
+ break;
+
+ case 37:
+
+/* Line 1455 of yacc.c */
+#line 256 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].keyName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyName)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].keyName)->common;
+ }
+ break;
+
+ case 38:
+
+/* Line 1455 of yacc.c */
+#line 261 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].keyAlias)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyAlias)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].keyAlias)->common;
+ }
+ break;
+
+ case 39:
+
+/* Line 1455 of yacc.c */
+#line 266 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].keyType)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].keyType)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].keyType)->common;
+ }
+ break;
+
+ case 40:
+
+/* Line 1455 of yacc.c */
+#line 271 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].syms)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].syms)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].syms)->common;
+ }
+ break;
+
+ case 41:
+
+/* Line 1455 of yacc.c */
+#line 276 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].modMask)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].modMask)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].modMask)->common;
+ }
+ break;
+
+ case 42:
+
+/* Line 1455 of yacc.c */
+#line 281 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].groupCompat)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].groupCompat)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].groupCompat)->common;
+ }
+ break;
+
+ case 43:
+
+/* Line 1455 of yacc.c */
+#line 286 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].ledMap)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledMap)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].ledMap)->common;
+ }
+ break;
+
+ case 44:
+
+/* Line 1455 of yacc.c */
+#line 291 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].ledName)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].ledName)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].ledName)->common;
+ }
+ break;
+
+ case 45:
+
+/* Line 1455 of yacc.c */
+#line 296 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].shape)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].shape)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].shape)->common;
+ }
+ break;
+
+ case 46:
+
+/* Line 1455 of yacc.c */
+#line 301 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].section)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].section)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].section)->common;
+ }
+ break;
+
+ case 47:
+
+/* Line 1455 of yacc.c */
+#line 306 "xkbparse.y"
+ {
+ (yyvsp[(2) - (2)].doodad)->merge= StmtSetMerge(&(yyvsp[(2) - (2)].doodad)->common,(yyvsp[(1) - (2)].uval));
+ (yyval.any)= &(yyvsp[(2) - (2)].doodad)->common;
+ }
+ break;
+
+ case 48:
+
+/* Line 1455 of yacc.c */
+#line 311 "xkbparse.y"
+ {
+ if ((yyvsp[(1) - (2)].uval)==MergeAltForm) {
+ yyerror("cannot use 'alternate' to include other maps");
+ (yyval.any)= &IncludeCreate(scanStr,MergeDefault)->common;
+ }
+ else {
+ (yyval.any)= &IncludeCreate(scanStr,(yyvsp[(1) - (2)].uval))->common;
+ }
+ }
+ break;
+
+ case 49:
+
+/* Line 1455 of yacc.c */
+#line 323 "xkbparse.y"
+ { (yyval.var)= VarCreate((yyvsp[(1) - (4)].expr),(yyvsp[(3) - (4)].expr)); }
+ break;
+
+ case 50:
+
+/* Line 1455 of yacc.c */
+#line 325 "xkbparse.y"
+ { (yyval.var)= BoolVarCreate((yyvsp[(1) - (2)].sval),1); }
+ break;
+
+ case 51:
+
+/* Line 1455 of yacc.c */
+#line 327 "xkbparse.y"
+ { (yyval.var)= BoolVarCreate((yyvsp[(2) - (3)].sval),0); }
+ break;
+
+ case 52:
+
+/* Line 1455 of yacc.c */
+#line 331 "xkbparse.y"
+ {
+ KeycodeDef *def;
+
+ def= KeycodeCreate((yyvsp[(1) - (4)].str),(yyvsp[(3) - (4)].expr));
+ if ((yyvsp[(1) - (4)].str))
+ free((yyvsp[(1) - (4)].str));
+ (yyval.keyName)= def;
+ }
+ break;
+
+ case 53:
+
+/* Line 1455 of yacc.c */
+#line 342 "xkbparse.y"
+ {
+ KeyAliasDef *def;
+ def= KeyAliasCreate((yyvsp[(2) - (5)].str),(yyvsp[(4) - (5)].str));
+ if ((yyvsp[(2) - (5)].str)) free((yyvsp[(2) - (5)].str));
+ if ((yyvsp[(4) - (5)].str)) free((yyvsp[(4) - (5)].str));
+ (yyval.keyAlias)= def;
+ }
+ break;
+
+ case 54:
+
+/* Line 1455 of yacc.c */
+#line 352 "xkbparse.y"
+ { (yyval.vmod)= (yyvsp[(2) - (3)].vmod); }
+ break;
+
+ case 55:
+
+/* Line 1455 of yacc.c */
+#line 356 "xkbparse.y"
+ { (yyval.vmod)= (VModDef *)AppendStmt(&(yyvsp[(1) - (3)].vmod)->common,&(yyvsp[(3) - (3)].vmod)->common); }
+ break;
+
+ case 56:
+
+/* Line 1455 of yacc.c */
+#line 358 "xkbparse.y"
+ { (yyval.vmod)= (yyvsp[(1) - (1)].vmod); }
+ break;
+
+ case 57:
+
+/* Line 1455 of yacc.c */
+#line 362 "xkbparse.y"
+ { (yyval.vmod)= VModCreate((yyvsp[(1) - (1)].sval),NULL); }
+ break;
+
+ case 58:
+
+/* Line 1455 of yacc.c */
+#line 364 "xkbparse.y"
+ { (yyval.vmod)= VModCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 59:
+
+/* Line 1455 of yacc.c */
+#line 370 "xkbparse.y"
+ {
+ (yyvsp[(2) - (6)].interp)->def= (yyvsp[(4) - (6)].var);
+ (yyval.interp)= (yyvsp[(2) - (6)].interp);
+ }
+ break;
+
+ case 60:
+
+/* Line 1455 of yacc.c */
+#line 377 "xkbparse.y"
+ { (yyval.interp)= InterpCreate((KeySym)(yyvsp[(1) - (3)].uval),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 61:
+
+/* Line 1455 of yacc.c */
+#line 379 "xkbparse.y"
+ { (yyval.interp)= InterpCreate((KeySym)(yyvsp[(1) - (1)].uval),NULL); }
+ break;
+
+ case 62:
+
+/* Line 1455 of yacc.c */
+#line 383 "xkbparse.y"
+ { (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (2)].var)->common,&(yyvsp[(2) - (2)].var)->common); }
+ break;
+
+ case 63:
+
+/* Line 1455 of yacc.c */
+#line 385 "xkbparse.y"
+ { (yyval.var)= (yyvsp[(1) - (1)].var); }
+ break;
+
+ case 64:
+
+/* Line 1455 of yacc.c */
+#line 391 "xkbparse.y"
+ { (yyval.keyType)= KeyTypeCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 65:
+
+/* Line 1455 of yacc.c */
+#line 397 "xkbparse.y"
+ { (yyval.syms)= SymbolsCreate((yyvsp[(2) - (6)].str),(ExprDef *)(yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 66:
+
+/* Line 1455 of yacc.c */
+#line 401 "xkbparse.y"
+ { (yyval.var)= (VarDef *)AppendStmt(&(yyvsp[(1) - (3)].var)->common,&(yyvsp[(3) - (3)].var)->common); }
+ break;
+
+ case 67:
+
+/* Line 1455 of yacc.c */
+#line 403 "xkbparse.y"
+ { (yyval.var)= (yyvsp[(1) - (1)].var); }
+ break;
+
+ case 68:
+
+/* Line 1455 of yacc.c */
+#line 404 "xkbparse.y"
+ { (yyval.var)= NULL; }
+ break;
+
+ case 69:
+
+/* Line 1455 of yacc.c */
+#line 408 "xkbparse.y"
+ { (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 70:
+
+/* Line 1455 of yacc.c */
+#line 410 "xkbparse.y"
+ { (yyval.var)= VarCreate((yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 71:
+
+/* Line 1455 of yacc.c */
+#line 412 "xkbparse.y"
+ { (yyval.var)= BoolVarCreate((yyvsp[(1) - (1)].sval),1); }
+ break;
+
+ case 72:
+
+/* Line 1455 of yacc.c */
+#line 414 "xkbparse.y"
+ { (yyval.var)= BoolVarCreate((yyvsp[(2) - (2)].sval),0); }
+ break;
+
+ case 73:
+
+/* Line 1455 of yacc.c */
+#line 416 "xkbparse.y"
+ { (yyval.var)= VarCreate(NULL,(yyvsp[(1) - (1)].expr)); }
+ break;
+
+ case 74:
+
+/* Line 1455 of yacc.c */
+#line 420 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(2) - (3)].expr); }
+ break;
+
+ case 75:
+
+/* Line 1455 of yacc.c */
+#line 422 "xkbparse.y"
+ { (yyval.expr)= ExprCreateUnary(ExprActionList,TypeAction,(yyvsp[(2) - (3)].expr)); }
+ break;
+
+ case 76:
+
+/* Line 1455 of yacc.c */
+#line 426 "xkbparse.y"
+ { (yyval.groupCompat)= GroupCompatCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr)); }
+ break;
+
+ case 77:
+
+/* Line 1455 of yacc.c */
+#line 430 "xkbparse.y"
+ { (yyval.modMask)= ModMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].expr)); }
+ break;
+
+ case 78:
+
+/* Line 1455 of yacc.c */
+#line 434 "xkbparse.y"
+ { (yyval.ledMap)= IndicatorMapCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 79:
+
+/* Line 1455 of yacc.c */
+#line 438 "xkbparse.y"
+ { (yyval.ledName)= IndicatorNameCreate((yyvsp[(2) - (5)].ival),(yyvsp[(4) - (5)].expr),False); }
+ break;
+
+ case 80:
+
+/* Line 1455 of yacc.c */
+#line 440 "xkbparse.y"
+ { (yyval.ledName)= IndicatorNameCreate((yyvsp[(3) - (6)].ival),(yyvsp[(5) - (6)].expr),True); }
+ break;
+
+ case 81:
+
+/* Line 1455 of yacc.c */
+#line 444 "xkbparse.y"
+ { (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),(OutlineDef *)&(yyvsp[(4) - (6)].outline)->common); }
+ break;
+
+ case 82:
+
+/* Line 1455 of yacc.c */
+#line 446 "xkbparse.y"
+ {
+ OutlineDef *outlines;
+ outlines= OutlineCreate(None,(yyvsp[(4) - (6)].expr));
+ (yyval.shape)= ShapeDeclCreate((yyvsp[(2) - (6)].sval),outlines);
+ }
+ break;
+
+ case 83:
+
+/* Line 1455 of yacc.c */
+#line 454 "xkbparse.y"
+ { (yyval.section)= SectionDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].row)); }
+ break;
+
+ case 84:
+
+/* Line 1455 of yacc.c */
+#line 458 "xkbparse.y"
+ { (yyval.row)=(RowDef *)AppendStmt(&(yyvsp[(1) - (2)].row)->common,&(yyvsp[(2) - (2)].row)->common);}
+ break;
+
+ case 85:
+
+/* Line 1455 of yacc.c */
+#line 460 "xkbparse.y"
+ { (yyval.row)= (yyvsp[(1) - (1)].row); }
+ break;
+
+ case 86:
+
+/* Line 1455 of yacc.c */
+#line 464 "xkbparse.y"
+ { (yyval.row)= RowDeclCreate((yyvsp[(3) - (5)].key)); }
+ break;
+
+ case 87:
+
+/* Line 1455 of yacc.c */
+#line 466 "xkbparse.y"
+ { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].var); }
+ break;
+
+ case 88:
+
+/* Line 1455 of yacc.c */
+#line 468 "xkbparse.y"
+ { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].doodad); }
+ break;
+
+ case 89:
+
+/* Line 1455 of yacc.c */
+#line 470 "xkbparse.y"
+ { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].ledMap); }
+ break;
+
+ case 90:
+
+/* Line 1455 of yacc.c */
+#line 472 "xkbparse.y"
+ { (yyval.row)= (RowDef *)(yyvsp[(1) - (1)].overlay); }
+ break;
+
+ case 91:
+
+/* Line 1455 of yacc.c */
+#line 476 "xkbparse.y"
+ { (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (2)].key)->common,&(yyvsp[(2) - (2)].key)->common);}
+ break;
+
+ case 92:
+
+/* Line 1455 of yacc.c */
+#line 478 "xkbparse.y"
+ { (yyval.key)= (yyvsp[(1) - (1)].key); }
+ break;
+
+ case 93:
+
+/* Line 1455 of yacc.c */
+#line 482 "xkbparse.y"
+ { (yyval.key)= (yyvsp[(3) - (5)].key); }
+ break;
+
+ case 94:
+
+/* Line 1455 of yacc.c */
+#line 484 "xkbparse.y"
+ { (yyval.key)= (KeyDef *)(yyvsp[(1) - (1)].var); }
+ break;
+
+ case 95:
+
+/* Line 1455 of yacc.c */
+#line 488 "xkbparse.y"
+ { (yyval.key)=(KeyDef *)AppendStmt(&(yyvsp[(1) - (3)].key)->common,&(yyvsp[(3) - (3)].key)->common);}
+ break;
+
+ case 96:
+
+/* Line 1455 of yacc.c */
+#line 490 "xkbparse.y"
+ { (yyval.key)= (yyvsp[(1) - (1)].key); }
+ break;
+
+ case 97:
+
+/* Line 1455 of yacc.c */
+#line 494 "xkbparse.y"
+ { (yyval.key)= KeyDeclCreate((yyvsp[(1) - (1)].str),NULL); }
+ break;
+
+ case 98:
+
+/* Line 1455 of yacc.c */
+#line 496 "xkbparse.y"
+ { (yyval.key)= KeyDeclCreate(NULL,(yyvsp[(2) - (3)].expr)); }
+ break;
+
+ case 99:
+
+/* Line 1455 of yacc.c */
+#line 500 "xkbparse.y"
+ { (yyval.overlay)= OverlayDeclCreate((yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].olKey)); }
+ break;
+
+ case 100:
+
+/* Line 1455 of yacc.c */
+#line 504 "xkbparse.y"
+ {
+ (yyval.olKey)= (OverlayKeyDef *)
+ AppendStmt(&(yyvsp[(1) - (3)].olKey)->common,&(yyvsp[(3) - (3)].olKey)->common);
+ }
+ break;
+
+ case 101:
+
+/* Line 1455 of yacc.c */
+#line 509 "xkbparse.y"
+ { (yyval.olKey)= (yyvsp[(1) - (1)].olKey); }
+ break;
+
+ case 102:
+
+/* Line 1455 of yacc.c */
+#line 513 "xkbparse.y"
+ { (yyval.olKey)= OverlayKeyCreate((yyvsp[(1) - (3)].str),(yyvsp[(3) - (3)].str)); }
+ break;
+
+ case 103:
+
+/* Line 1455 of yacc.c */
+#line 517 "xkbparse.y"
+ { (yyval.outline)=(OutlineDef *)AppendStmt(&(yyvsp[(1) - (3)].outline)->common,&(yyvsp[(3) - (3)].outline)->common);}
+ break;
+
+ case 104:
+
+/* Line 1455 of yacc.c */
+#line 519 "xkbparse.y"
+ { (yyval.outline)= (yyvsp[(1) - (1)].outline); }
+ break;
+
+ case 105:
+
+/* Line 1455 of yacc.c */
+#line 523 "xkbparse.y"
+ { (yyval.outline)= OutlineCreate(None,(yyvsp[(2) - (3)].expr)); }
+ break;
+
+ case 106:
+
+/* Line 1455 of yacc.c */
+#line 525 "xkbparse.y"
+ { (yyval.outline)= OutlineCreate((yyvsp[(1) - (5)].sval),(yyvsp[(4) - (5)].expr)); }
+ break;
+
+ case 107:
+
+/* Line 1455 of yacc.c */
+#line 527 "xkbparse.y"
+ { (yyval.outline)= OutlineCreate((yyvsp[(1) - (3)].sval),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 108:
+
+/* Line 1455 of yacc.c */
+#line 531 "xkbparse.y"
+ { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
+ break;
+
+ case 109:
+
+/* Line 1455 of yacc.c */
+#line 533 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 110:
+
+/* Line 1455 of yacc.c */
+#line 537 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprCoord,TypeUnknown);
+ expr->value.coord.x= (yyvsp[(2) - (5)].ival);
+ expr->value.coord.y= (yyvsp[(4) - (5)].ival);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 111:
+
+/* Line 1455 of yacc.c */
+#line 547 "xkbparse.y"
+ { (yyval.doodad)= DoodadCreate((yyvsp[(1) - (6)].uval),(yyvsp[(2) - (6)].sval),(yyvsp[(4) - (6)].var)); }
+ break;
+
+ case 112:
+
+/* Line 1455 of yacc.c */
+#line 550 "xkbparse.y"
+ { (yyval.uval)= XkbTextDoodad; }
+ break;
+
+ case 113:
+
+/* Line 1455 of yacc.c */
+#line 551 "xkbparse.y"
+ { (yyval.uval)= XkbOutlineDoodad; }
+ break;
+
+ case 114:
+
+/* Line 1455 of yacc.c */
+#line 552 "xkbparse.y"
+ { (yyval.uval)= XkbSolidDoodad; }
+ break;
+
+ case 115:
+
+/* Line 1455 of yacc.c */
+#line 553 "xkbparse.y"
+ { (yyval.uval)= XkbLogoDoodad; }
+ break;
+
+ case 116:
+
+/* Line 1455 of yacc.c */
+#line 556 "xkbparse.y"
+ { (yyval.sval)= (yyvsp[(1) - (1)].sval); }
+ break;
+
+ case 117:
+
+/* Line 1455 of yacc.c */
+#line 557 "xkbparse.y"
+ { (yyval.sval)= (yyvsp[(1) - (1)].sval); }
+ break;
+
+ case 118:
+
+/* Line 1455 of yacc.c */
+#line 561 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"action",False); }
+ break;
+
+ case 119:
+
+/* Line 1455 of yacc.c */
+#line 563 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"interpret",False); }
+ break;
+
+ case 120:
+
+/* Line 1455 of yacc.c */
+#line 565 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"type",False); }
+ break;
+
+ case 121:
+
+/* Line 1455 of yacc.c */
+#line 567 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"key",False); }
+ break;
+
+ case 122:
+
+/* Line 1455 of yacc.c */
+#line 569 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"group",False); }
+ break;
+
+ case 123:
+
+/* Line 1455 of yacc.c */
+#line 571 "xkbparse.y"
+ {(yyval.sval)=XkbInternAtom(NULL,"modifier_map",False);}
+ break;
+
+ case 124:
+
+/* Line 1455 of yacc.c */
+#line 573 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"indicator",False); }
+ break;
+
+ case 125:
+
+/* Line 1455 of yacc.c */
+#line 575 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"shape",False); }
+ break;
+
+ case 126:
+
+/* Line 1455 of yacc.c */
+#line 577 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"row",False); }
+ break;
+
+ case 127:
+
+/* Line 1455 of yacc.c */
+#line 579 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"section",False); }
+ break;
+
+ case 128:
+
+/* Line 1455 of yacc.c */
+#line 581 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"text",False); }
+ break;
+
+ case 129:
+
+/* Line 1455 of yacc.c */
+#line 584 "xkbparse.y"
+ { (yyval.uval)= (yyvsp[(1) - (1)].uval); }
+ break;
+
+ case 130:
+
+/* Line 1455 of yacc.c */
+#line 585 "xkbparse.y"
+ { (yyval.uval)= MergeDefault; }
+ break;
+
+ case 131:
+
+/* Line 1455 of yacc.c */
+#line 588 "xkbparse.y"
+ { (yyval.uval)= MergeDefault; }
+ break;
+
+ case 132:
+
+/* Line 1455 of yacc.c */
+#line 589 "xkbparse.y"
+ { (yyval.uval)= MergeAugment; }
+ break;
+
+ case 133:
+
+/* Line 1455 of yacc.c */
+#line 590 "xkbparse.y"
+ { (yyval.uval)= MergeOverride; }
+ break;
+
+ case 134:
+
+/* Line 1455 of yacc.c */
+#line 591 "xkbparse.y"
+ { (yyval.uval)= MergeReplace; }
+ break;
+
+ case 135:
+
+/* Line 1455 of yacc.c */
+#line 592 "xkbparse.y"
+ { (yyval.uval)= MergeAltForm; }
+ break;
+
+ case 136:
+
+/* Line 1455 of yacc.c */
+#line 595 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 137:
+
+/* Line 1455 of yacc.c */
+#line 596 "xkbparse.y"
+ { (yyval.expr)= NULL; }
+ break;
+
+ case 138:
+
+/* Line 1455 of yacc.c */
+#line 600 "xkbparse.y"
+ { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
+ break;
+
+ case 139:
+
+/* Line 1455 of yacc.c */
+#line 602 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 140:
+
+/* Line 1455 of yacc.c */
+#line 606 "xkbparse.y"
+ { (yyval.expr)= ExprCreateBinary(OpDivide,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 141:
+
+/* Line 1455 of yacc.c */
+#line 608 "xkbparse.y"
+ { (yyval.expr)= ExprCreateBinary(OpAdd,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 142:
+
+/* Line 1455 of yacc.c */
+#line 610 "xkbparse.y"
+ { (yyval.expr)= ExprCreateBinary(OpSubtract,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 143:
+
+/* Line 1455 of yacc.c */
+#line 612 "xkbparse.y"
+ { (yyval.expr)= ExprCreateBinary(OpMultiply,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 144:
+
+/* Line 1455 of yacc.c */
+#line 614 "xkbparse.y"
+ { (yyval.expr)= ExprCreateBinary(OpAssign,(yyvsp[(1) - (3)].expr),(yyvsp[(3) - (3)].expr)); }
+ break;
+
+ case 145:
+
+/* Line 1455 of yacc.c */
+#line 616 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 146:
+
+/* Line 1455 of yacc.c */
+#line 620 "xkbparse.y"
+ { (yyval.expr)= ExprCreateUnary(OpNegate,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 147:
+
+/* Line 1455 of yacc.c */
+#line 622 "xkbparse.y"
+ { (yyval.expr)= ExprCreateUnary(OpUnaryPlus,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 148:
+
+/* Line 1455 of yacc.c */
+#line 624 "xkbparse.y"
+ { (yyval.expr)= ExprCreateUnary(OpNot,TypeBoolean,(yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 149:
+
+/* Line 1455 of yacc.c */
+#line 626 "xkbparse.y"
+ { (yyval.expr)= ExprCreateUnary(OpInvert,(yyvsp[(2) - (2)].expr)->type,(yyvsp[(2) - (2)].expr)); }
+ break;
+
+ case 150:
+
+/* Line 1455 of yacc.c */
+#line 628 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 151:
+
+/* Line 1455 of yacc.c */
+#line 630 "xkbparse.y"
+ { (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); }
+ break;
+
+ case 152:
+
+/* Line 1455 of yacc.c */
+#line 632 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 153:
+
+/* Line 1455 of yacc.c */
+#line 634 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(2) - (3)].expr); }
+ break;
+
+ case 154:
+
+/* Line 1455 of yacc.c */
+#line 638 "xkbparse.y"
+ { (yyval.expr)= (ExprDef *)AppendStmt(&(yyvsp[(1) - (3)].expr)->common,&(yyvsp[(3) - (3)].expr)->common); }
+ break;
+
+ case 155:
+
+/* Line 1455 of yacc.c */
+#line 640 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 156:
+
+/* Line 1455 of yacc.c */
+#line 644 "xkbparse.y"
+ { (yyval.expr)= ActionCreate((yyvsp[(1) - (4)].sval),(yyvsp[(3) - (4)].expr)); }
+ break;
+
+ case 157:
+
+/* Line 1455 of yacc.c */
+#line 648 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprIdent,TypeUnknown);
+ expr->value.str= (yyvsp[(1) - (1)].sval);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 158:
+
+/* Line 1455 of yacc.c */
+#line 655 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprFieldRef,TypeUnknown);
+ expr->value.field.element= (yyvsp[(1) - (3)].sval);
+ expr->value.field.field= (yyvsp[(3) - (3)].sval);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 159:
+
+/* Line 1455 of yacc.c */
+#line 663 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprArrayRef,TypeUnknown);
+ expr->value.array.element= None;
+ expr->value.array.field= (yyvsp[(1) - (4)].sval);
+ expr->value.array.entry= (yyvsp[(3) - (4)].expr);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 160:
+
+/* Line 1455 of yacc.c */
+#line 672 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprArrayRef,TypeUnknown);
+ expr->value.array.element= (yyvsp[(1) - (6)].sval);
+ expr->value.array.field= (yyvsp[(3) - (6)].sval);
+ expr->value.array.entry= (yyvsp[(5) - (6)].expr);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 161:
+
+/* Line 1455 of yacc.c */
+#line 683 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprValue,TypeString);
+ expr->value.str= (yyvsp[(1) - (1)].sval);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 162:
+
+/* Line 1455 of yacc.c */
+#line 690 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprValue,TypeInt);
+ expr->value.ival= (yyvsp[(1) - (1)].ival);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 163:
+
+/* Line 1455 of yacc.c */
+#line 697 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprValue,TypeFloat);
+ expr->value.ival= (yyvsp[(1) - (1)].ival);
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 164:
+
+/* Line 1455 of yacc.c */
+#line 704 "xkbparse.y"
+ {
+ ExprDef *expr;
+ expr= ExprCreate(ExprValue,TypeKeyName);
+ memset(expr->value.keyName,0,5);
+ strncpy(expr->value.keyName,(yyvsp[(1) - (1)].str),4);
+ free((yyvsp[(1) - (1)].str));
+ (yyval.expr)= expr;
+ }
+ break;
+
+ case 165:
+
+/* Line 1455 of yacc.c */
+#line 714 "xkbparse.y"
+ { (yyval.expr)= (yyvsp[(1) - (1)].expr); }
+ break;
+
+ case 166:
+
+/* Line 1455 of yacc.c */
+#line 715 "xkbparse.y"
+ { (yyval.expr)= NULL; }
+ break;
+
+ case 167:
+
+/* Line 1455 of yacc.c */
+#line 719 "xkbparse.y"
+ { (yyval.expr)= AppendKeysymList((yyvsp[(1) - (3)].expr),(KeySym)(yyvsp[(3) - (3)].uval)); }
+ break;
+
+ case 168:
+
+/* Line 1455 of yacc.c */
+#line 721 "xkbparse.y"
+ { (yyval.expr)= CreateKeysymList((KeySym)(yyvsp[(1) - (1)].uval)); }
+ break;
+
+ case 169:
+
+/* Line 1455 of yacc.c */
+#line 725 "xkbparse.y"
+ {
+ KeySym sym;
+ if (LookupKeysym(scanStr,&sym))
+ (yyval.uval)= sym;
+ else {
+ char buf[120];
+ snprintf(buf, sizeof(buf),
+ "expected keysym, got %s",
+ uStringText(scanStr));
+ yyerror(buf);
+ yynerrs++;
+ (yyval.uval)= NoSymbol;
+ }
+ }
+ break;
+
+ case 170:
+
+/* Line 1455 of yacc.c */
+#line 740 "xkbparse.y"
+ {
+ (yyval.uval)= XK_section;
+ }
+ break;
+
+ case 171:
+
+/* Line 1455 of yacc.c */
+#line 744 "xkbparse.y"
+ {
+ if ((yyvsp[(1) - (1)].ival)<10) (yyval.uval)= (yyvsp[(1) - (1)].ival)+'0'; /* XK_0 .. XK_9 */
+ else (yyval.uval)= (yyvsp[(1) - (1)].ival);
+ }
+ break;
+
+ case 172:
+
+/* Line 1455 of yacc.c */
+#line 750 "xkbparse.y"
+ { (yyval.ival)= -(yyvsp[(2) - (2)].ival); }
+ break;
+
+ case 173:
+
+/* Line 1455 of yacc.c */
+#line 751 "xkbparse.y"
+ { (yyval.ival)= (yyvsp[(1) - (1)].ival); }
+ break;
+
+ case 174:
+
+/* Line 1455 of yacc.c */
+#line 754 "xkbparse.y"
+ { (yyval.ival)= scanInt; }
+ break;
+
+ case 175:
+
+/* Line 1455 of yacc.c */
+#line 755 "xkbparse.y"
+ { (yyval.ival)= scanInt*XkbGeomPtsPerMM; }
+ break;
+
+ case 176:
+
+/* Line 1455 of yacc.c */
+#line 758 "xkbparse.y"
+ { (yyval.ival)= scanInt; }
+ break;
+
+ case 177:
+
+/* Line 1455 of yacc.c */
+#line 761 "xkbparse.y"
+ { (yyval.ival)= scanInt; }
+ break;
+
+ case 178:
+
+/* Line 1455 of yacc.c */
+#line 764 "xkbparse.y"
+ { (yyval.str)= scanStr; scanStr= NULL; }
+ break;
+
+ case 179:
+
+/* Line 1455 of yacc.c */
+#line 767 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,scanStr,False); }
+ break;
+
+ case 180:
+
+/* Line 1455 of yacc.c */
+#line 768 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,"default",False); }
+ break;
+
+ case 181:
+
+/* Line 1455 of yacc.c */
+#line 771 "xkbparse.y"
+ { (yyval.sval)= XkbInternAtom(NULL,scanStr,False); }
+ break;
+
+ case 182:
+
+/* Line 1455 of yacc.c */
+#line 774 "xkbparse.y"
+ { (yyval.str)= (yyvsp[(1) - (1)].str); }
+ break;
+
+ case 183:
+
+/* Line 1455 of yacc.c */
+#line 775 "xkbparse.y"
+ { (yyval.str)= NULL; }
+ break;
+
+ case 184:
+
+/* Line 1455 of yacc.c */
+#line 778 "xkbparse.y"
+ { (yyval.str)= scanStr; scanStr= NULL; }
+ break;
+
+
+
+/* Line 1455 of yacc.c */
+#line 3310 "xkbparse.c"
+ default: break;
+ }
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
+}
+
+
+
+/* Line 1675 of yacc.c */
+#line 780 "xkbparse.y"
+
+void
+yyerror(const char *s)
+{
+ if (warningLevel>0) {
+ (void)fprintf(stderr,"%s: line %d of %s\n",s,lineNum,
+ (scanFile?scanFile:"(unknown)"));
+ if ((scanStr)&&(warningLevel>3))
+ (void)fprintf(stderr,"last scanned symbol is: %s\n",scanStr);
+ }
+ return;
+}
+
+
+int
+yywrap(void)
+{
+ return 1;
+}
+
+
diff --git a/xkbcomp/xkbpath.c b/xkbcomp/xkbpath.c
index 68020129e..f5b21e6b8 100644
--- a/xkbcomp/xkbpath.c
+++ b/xkbcomp/xkbpath.c
@@ -30,11 +30,12 @@
#define DEBUG_VAR debugFlags
#include "utils.h"
#include <stdlib.h>
+#include <unistd.h>
#include <X11/extensions/XKM.h>
#include "xkbpath.h"
#ifndef DFLT_XKB_CONFIG_ROOT
-#define DFLT_XKB_CONFIG_ROOT "/usr/lib/X11/xkb"
+#define DFLT_XKB_CONFIG_ROOT "xkbdata"
#endif
#ifndef PATH_MAX
diff --git a/xkbcomp/xkbscan.c b/xkbcomp/xkbscan.c
index 31cafd4ab..a4289a39f 100644
--- a/xkbcomp/xkbscan.c
+++ b/xkbcomp/xkbscan.c
@@ -31,7 +31,7 @@
#include <X11/XKBlib.h>
#include "tokens.h"
-#define DEBUG_VAR scanDebug
+
#include "utils.h"
#include "parseutils.h"