[bitc-dev] lexer bug with zero length strings
Sam Mason
sam at samason.me.uk
Mon May 15 11:53:12 EDT 2006
Hi
Just found a little typo in Bitc's lexer. It only recognises strings
with more than one character in them as valid without this patch.
Sam
-------------- next part --------------
--- src.coyotos/src/ccs/bitcc-bootstrap/frontend/BitcLexer.l 2006-05-15 16:47:11.000000000 +0100
+++ src.coyotos/src/ccs/bitcc-bootstrap/frontend/BitcLexer.l 2006-05-15 16:47:11.000000000 +0100
@@ -329,7 +329,7 @@
// But let processing continue...
}
TOK(tk_Char); }
-\"{SCHAR}+\" { unsigned badpos = validate_string(yytext);
+\"{SCHAR}*\" { unsigned badpos = validate_string(yytext);
if (badpos) {
LexLoc badHere = here;
badHere.offset += badpos;
More information about the bitc-dev
mailing list