logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0001-Track-generated-xkbcomp-parser.patch (130861B)


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