Commit ba7530fa90795e077e685346444ebe3a3c1595ee

Ran Benita 2013-11-27T13:43:57

scanner: restore lost DIVIDE token I don't know how this could have happened. Luckily this token is completely useless. Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/xkbcomp/scanner.c b/src/xkbcomp/scanner.c
index 4e7d70b..591f1f5 100644
--- a/src/xkbcomp/scanner.c
+++ b/src/xkbcomp/scanner.c
@@ -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;
 
diff --git a/test/data/keymaps/divide-by-zero.xkb b/test/data/keymaps/divide-by-zero.xkb
index 5ae7d44..9e3417f 100644
--- a/test/data/keymaps/divide-by-zero.xkb
+++ b/test/data/keymaps/divide-by-zero.xkb
@@ -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 {