parser: remove XkbCompMapList rule
authorRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 08:50:38 +0000 (10:50 +0200)
committerRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 12:20:16 +0000 (14:20 +0200)
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>
src/xkbcomp/parser.y
test/data/keymaps/default.xkb [deleted file]
test/filecomp.c

index 5ffb38bcf93e3e9a55ac36cf568bdd15660e9a9b..491e96c6079569eb376b0422a93824786f2811fb 100644 (file)
@@ -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 (file)
index c40ceb9..0000000
+++ /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)" };
-};
index 1d7a127822dde9b8c9fc941b6e5cc2160f2f5e0c..0c1111af7f584166bfd2b0ee3a536eea198ffe5f 100644 (file)
@@ -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"));