diff options
author | Daniel Stone <daniel@fooishbar.org> | 2012-10-31 12:40:49 +1100 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2012-10-31 12:42:50 +1100 |
commit | e119cbec7e750ffc4d4bd08b577db2c697035a30 (patch) | |
tree | 288cfe1f1d955d6a7fb46f2ff1db2cc74adc2e67 /xkbparse.y | |
parent | f2eff337176551f643e35c54c1e1ca0a78df69c6 (diff) |
Add parsing support for multiple keysyms per level
Parse, but ignore, level definitions in the form of:
key <FOO> { [ normal_sym, { M, U, L, T, I, S, Y, M } ] };
normal_sym will be carried, but the latter will be turned into NoSymbol.
http://bugs.freedesktop.org/show_bug.cgi?id=25025
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'xkbparse.y')
-rw-r--r-- | xkbparse.y | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -141,7 +141,7 @@ unsigned int parseDebug; %type <str> KeyName MapName OptMapName KeySym %type <sval> FieldSpec Ident Element String %type <any> DeclList Decl -%type <expr> OptExprList ExprList Expr Term Lhs Terminal ArrayInit +%type <expr> OptExprList ExprList Expr Term Lhs Terminal ArrayInit KeySyms %type <expr> OptKeySymList KeySymList Action ActionList Coord CoordList %type <var> VarDecl VarDeclList SymbolsBody SymbolsVarDecl %type <vmod> VModDecl VModDefList VModDef @@ -717,8 +717,12 @@ OptKeySymList : KeySymList { $$= $1; } KeySymList : KeySymList COMMA KeySym { $$= AppendKeysymList($1,$3); } + | KeySymList COMMA KeySyms + { $$= AppendKeysymList($1,strdup("NoSymbol")); } | KeySym { $$= CreateKeysymList($1); } + | KeySyms + { $$= CreateKeysymList(strdup("NoSymbol")); } ; KeySym : IDENT { $$= strdup(scanBuf); } @@ -730,6 +734,10 @@ KeySym : IDENT { $$= strdup(scanBuf); } } ; +KeySyms : OBRACE KeySymList CBRACE + { $$= $2; } + ; + SignedNumber : MINUS Number { $$= -$2; } | Number { $$= $1; } ; |