parser: remove XkbCompMapList rule This rule allows you to put several xkb_keymaps in one file. This doesn't make any sense: only the default/first can ever be used, yet the others are fully parsed as well. Different keymaps should just be put in different files. Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y
index 5ffb38b..491e96c 100644
--- a/src/xkbcomp/parser.y
+++ b/src/xkbcomp/parser.y
@@ -172,22 +172,16 @@ _xkbcommon_error(struct YYLTYPE *loc, struct parser_param *param, const char *ms
%type <geom> Keys Key OverlayDecl OverlayKeyList OverlayKey OutlineList OutlineInList
%type <geom> DoodadDecl
%type <file> XkbFile XkbMapConfigList XkbMapConfig
-%type <file> XkbCompositeMap XkbCompMapList
+%type <file> XkbCompositeMap
%%
-XkbFile : XkbCompMapList
+XkbFile : XkbCompositeMap
{ $$ = param->rtrn = $1; }
| XkbMapConfigList
{ $$ = param->rtrn = $1; }
;
-XkbCompMapList : XkbCompMapList XkbCompositeMap
- { $$ = (XkbFile *)AppendStmt(&$1->common, &$2->common); }
- | XkbCompositeMap
- { $$ = $1; }
- ;
-
XkbCompositeMap : OptFlags XkbCompositeType OptMapName OBRACE
XkbMapConfigList
CBRACE SEMI
diff --git a/test/data/keymaps/default.xkb b/test/data/keymaps/default.xkb
deleted file mode 100644
index c40ceb9..0000000
--- a/test/data/keymaps/default.xkb
+++ /dev/null
@@ -1,15 +0,0 @@
-xkb_keymap {
- xkb_keycodes { include "evdev+aliases(qwerty)" };
- xkb_types { include "complete" };
- xkb_compat { include "complete" };
- xkb_symbols { include "pc+us" };
- xkb_geometry { include "pc(pc105)" };
-};
-
-default xkb_keymap {
- xkb_keycodes { include "evdev+aliases(qwertz)" };
- xkb_types { include "complete" };
- xkb_compat { include "complete" };
- xkb_symbols { include "pc+de" };
- xkb_geometry { include "pc(pc105)" };
-};
diff --git a/test/filecomp.c b/test/filecomp.c
index 1d7a127..0c1111a 100644
--- a/test/filecomp.c
+++ b/test/filecomp.c
@@ -41,8 +41,6 @@ main(void)
struct xkb_context *ctx = test_get_context();
assert(test_file(ctx, "keymaps/basic.xkb"));
- /* XXX check we actually get qwertz here ... */
- assert(test_file(ctx, "keymaps/default.xkb"));
assert(test_file(ctx, "keymaps/comprehensive-plus-geom.xkb"));
assert(test_file(ctx, "keymaps/no-types.xkb"));