From 9e43ffed22d5ba25fe545a48ac732591c346aabb Mon Sep 17 00:00:00 2001 From: Teddy Date: Tue, 25 Mar 2014 04:58:57 +0800 Subject: wrong regex for char const --- cibic.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cibic.l') diff --git a/cibic.l b/cibic.l index 666069e..26fca1f 100644 --- a/cibic.l +++ b/cibic.l @@ -64,8 +64,8 @@ digit [0-9] return INT_CONST; } -'{letter}' { - yylval.intval = *(yytext); +'([^\'\\]|\\.)' { + yylval.strval = strdup(yytext); return CHAR_CONST; } -- cgit v1.2.3