[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/5] Lexer support for keycodes with +/- symbols and arbitrary le
From: |
Diego Nieto Cid |
Subject: |
[PATCH 2/5] Lexer support for keycodes with +/- symbols and arbitrary level numbers. |
Date: |
Wed, 11 Aug 2010 20:51:48 -0300 |
---
lex.l | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lex.l b/lex.l
index 37b88c3..6ef9134 100644
--- a/lex.l
+++ b/lex.l
@@ -30,7 +30,7 @@
%option nodebug
%option UNPUT
-KEYCODE "<"[A-Z][A-Z0-9]*">"
+KEYCODE "<"[A-Z][-+A-Z0-9]*">"
DIGIT [0-9]
NUM {DIGIT}{DIGIT}*
FLOAT {DIGIT}{DIGIT}*\.{DIGIT}{DIGIT}*
@@ -91,6 +91,7 @@ level1 { yylval.val = 1; return LEVEL;
}
level2 { yylval.val = 2; return LEVEL; }
level3 { yylval.val = 3; return LEVEL; }
level4 { yylval.val = 4; return LEVEL; }
+level[1-9][0-9]* { yylval.val = atoi(yytext + 5); return LEVEL; }
/* Groups. */
group1 { yylval.val = 1; return GROUPNUM; }
--
1.7.2
- [PATCH 0/8] Bring console-driver-xkb up to date, Diego Nieto Cid, 2010/08/04
- [PATCH 1/8] Update the parser to work with current XKB files., Diego Nieto Cid, 2010/08/04
- Re: [PATCH 1/8] Update the parser to work with current XKB files., olafBuddenhagen, 2010/08/11
- Re: [PATCH 1/8] Update the parser to work, Diego Nieto Cid, 2010/08/11
- [PATCH 1/5] Add type to $$ in mid-rules., Diego Nieto Cid, 2010/08/11
- [PATCH 2/5] Lexer support for keycodes with +/- symbols and arbitrary level numbers.,
Diego Nieto Cid <=
- [PATCH 3/5] Skip to main file's default section when needed., Diego Nieto Cid, 2010/08/11
- [PATCH 4/5] Update key type assigment routine., Diego Nieto Cid, 2010/08/11
- [PATCH 5/5] Recreate xkb/keymap/hurd from xkeyboard-config-1.8's xfree86 keymap., Diego Nieto Cid, 2010/08/11
- [PATCH 4/8] Remove glue code and use mig to regenerate it., Diego Nieto Cid, 2010/08/04
- [PATCH 3/8] Rule vmod returns an int with the vmod's bit on., Diego Nieto Cid, 2010/08/04
- [PATCH 2/8] Avoid hashing garbage for short keynames., Diego Nieto Cid, 2010/08/04