Eric Pouech : winedbg: Let the lexer accept char definitions as integral values.
Alexandre Julliard
julliard at winehq.org
Sat Feb 11 10:28:40 CST 2012
Module: wine
Branch: master
Commit: 45aa67b30aafc533536d2734c3a946f078ff2e6c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=45aa67b30aafc533536d2734c3a946f078ff2e6c
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sat Feb 11 11:36:21 2012 +0100
winedbg: Let the lexer accept char definitions as integral values.
---
programs/winedbg/debug.l | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/programs/winedbg/debug.l b/programs/winedbg/debug.l
index a12b637..30c8aea 100644
--- a/programs/winedbg/debug.l
+++ b/programs/winedbg/debug.l
@@ -113,6 +113,7 @@ static int read_input(const char* pfx, char* buf, int size)
static int syntax_error;
%}
+OCTDIGIT [0-7]
DIGIT [0-9]
HEXDIGIT [0-9a-fA-F]
FORMAT [ubcdgiswxa]
@@ -157,6 +158,11 @@ STRING \"[^\n"]+\"
"0x"{HEXDIGIT}+ { sscanf(yytext, "%lx", &dbg_lval.integer); return tNUM; }
{DIGIT}+ { sscanf(yytext, "%ld", &dbg_lval.integer); return tNUM; }
+"'\\''" { dbg_lval.integer = '\''; return tNUM;}
+"'\\0"{OCTDIGIT}*"'" { sscanf(yytext + 3, "%lo", &dbg_lval.integer); return tNUM;}
+"'\\x"{HEXDIGIT}+"'" { sscanf(yytext + 3, "%lx", &dbg_lval.integer); return tNUM;}
+"'\\"[a-z]"'" { dbg_lval.integer = yytext[2] - 'a'; return tNUM;}
+"'"."'" { dbg_lval.integer = yytext[1]; return tNUM;}
<FORMAT_EXPECTED>"/"{DIGIT}+{FORMAT} { char* last;
dbg_lval.integer = strtol(yytext+1, &last, 0) << 8;
More information about the wine-cvs
mailing list