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 4e7d70b563bb192972af6a35cf37ab2b644fd305..591f1f573dd598073a52b1ae1a1804ae6f883c59 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 5ae7d44f4d13ad007e52bd17724b2fad0d5d8183..9e3417f6173ab5c75b82b124c1ba883cacb6e4a5 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 {