parser: remove XkbConfig rule
authorRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 08:33:59 +0000 (10:33 +0200)
committerRan Benita <ran234@gmail.com>
Sun, 30 Sep 2012 12:20:16 +0000 (14:20 +0200)
This rule allows you to write file maps as:
    xkb_keycodes
    <BLA> = 5;
    [...]
instead of the usual format which is:
    xkb_keycodes {
        <BLA> = 5;
        [...]
    };

This is not documented, It is also not used in xkeyboard-config, and I
have never run into it otherwise. It also only allows one map per file.

It *might* be used in some obscure place, but probably nothing we should
care about; the simplified grammar is more useful for us now.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/parser.y

index 781a483..5ffb38b 100644 (file)
@@ -171,7 +171,7 @@ _xkbcommon_error(struct YYLTYPE *loc, struct parser_param *param, const char *ms
 %type <geom>    ShapeDecl SectionDecl SectionBody SectionBodyItem RowBody RowBodyItem
 %type <geom>    Keys Key OverlayDecl OverlayKeyList OverlayKey OutlineList OutlineInList
 %type <geom>    DoodadDecl
-%type <file>    XkbFile XkbMapConfigList XkbMapConfig XkbConfig
+%type <file>    XkbFile XkbMapConfigList XkbMapConfig
 %type <file>    XkbCompositeMap XkbCompMapList
 
 %%
@@ -180,8 +180,6 @@ XkbFile         :       XkbCompMapList
                         { $$ = param->rtrn = $1; }
                 |       XkbMapConfigList
                         { $$ = param->rtrn = $1; }
-                |       XkbConfig
-                        { $$ = param->rtrn = $1; }
                 ;
 
 XkbCompMapList  :       XkbCompMapList XkbCompositeMap
@@ -227,20 +225,6 @@ XkbMapConfig    :       OptFlags FileType OptMapName OBRACE
                         }
                 ;
 
-XkbConfig       :       OptFlags FileType OptMapName DeclList
-                        {
-                            if ($2 == FILE_TYPE_GEOMETRY) {
-                                free($3);
-                                FreeStmt($4);
-                                $$ = NULL;
-                            }
-                            else {
-                                $$ = XkbFileCreate(param->ctx, $2, $3, $4, $1);
-                            }
-                        }
-                ;
-
-
 FileType        :       XKB_KEYCODES            { $$ = FILE_TYPE_KEYCODES; }
                 |       XKB_TYPES               { $$ = FILE_TYPE_TYPES; }
                 |       XKB_COMPATMAP           { $$ = FILE_TYPE_COMPAT; }