scanner: restore lost DIVIDE token
authorRan Benita <ran234@gmail.com>
Wed, 27 Nov 2013 11:43:57 +0000 (13:43 +0200)
committerRan Benita <ran234@gmail.com>
Wed, 27 Nov 2013 11:45:15 +0000 (13:45 +0200)
I don't know how this could have happened. Luckily this token is
completely useless.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/scanner.c
test/data/keymaps/divide-by-zero.xkb

index 4e7d70b..591f1f5 100644 (file)
@@ -156,6 +156,7 @@ skip_more_whitespace_and_comments:
     if (chr(s, '+')) return PLUS;
     if (chr(s, '-')) return MINUS;
     if (chr(s, '*')) return TIMES;
+    if (chr(s, '/')) return DIVIDE;
     if (chr(s, '!')) return EXCLAM;
     if (chr(s, '~')) return INVERT;
 
index 5ae7d44..9e3417f 100644 (file)
@@ -1,6 +1,6 @@
 xkb_keymap {
        xkb_keycodes {
-                <ESC> = 1 / 0;
+                <ESC> = 1;
        };
 
        xkb_types {
@@ -9,6 +9,10 @@ xkb_keymap {
 
        xkb_compatibility {
                virtual_modifiers NumLock;
+               interpret KP_1+AnyOfOrNone(all) {
+                       repeat= True;
+                       action= MovePtr(x=(1/0),y=+1);
+               };
        };
 
        xkb_symbols {