Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion XKBGrammar.g
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ tokens
ELEM_VIRTUALMODS;
KEYELEMENTS;
OVERRIDE;
REPLACE;
OVERLAY;
}

Expand Down Expand Up @@ -97,7 +98,7 @@ line_keytype
;

line_key
: OVERRIDE? 'key' '<' NAME '>' '{' keyelements (',' keyelements)* '}'
: (OVERRIDE|REPLACE)? 'key' '<' NAME '>' '{' keyelements (',' keyelements)* '}'
-> ^(TOKEN_KEY OVERRIDE? ^(KEYCODEX NAME) keyelements+)
;

Expand All @@ -120,6 +121,10 @@ override
: 'override'
;

replace
: 'replace'
;

keyelements
: elem_keysyms
| elem_keysymgroup
Expand Down Expand Up @@ -174,6 +179,10 @@ OVERRIDE
: 'override'
;

REPLACE
: 'replace'
;

NAME
: ( 'a'..'z' | 'A'..'Z' | '_' | '0'..'9' | '+' | '-' )*
;
Expand Down