From: Jay Freeman (saurik) Date: Mon, 16 Nov 2009 21:48:04 +0000 (+0000) Subject: Added support for octal literals. X-Git-Tag: v0.9.432~158 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/ef361ba861e39412d957c786aa36ba8df5ab41e4?ds=inline Added support for octal literals. --- diff --git a/Cycript.l.in b/Cycript.l.in index 91e6a63..42ba069 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -340,7 +340,7 @@ XMLName {XMLNameStart}{XMLNamePart}* (\.[0-9]+|(0|[1-9][0-9]*)(\.[0-9]*)?){Exponent}? L C yylval->number_ = new(yyextra->pool_) CYNumber(strtod(yytext, NULL)); return tk::NumericLiteral; 0[xX][0-9a-fA-F]+ L C yylval->number_ = new(yyextra->pool_) CYNumber(strtoull(yytext + 2, NULL, 16)); return tk::NumericLiteral; - +0[0-7]+ L C yylval->number_ = new(yyextra->pool_) CYNumber(strtoull(yytext + 1, NULL, 8)); return tk::NumericLiteral; 0[bB][0-1]+ L C yylval->number_ = new(yyextra->pool_) CYNumber(strtoull(yytext + 2, NULL, 2)); return tk::NumericLiteral; \"([^"\\\n]|{Escape})*\"|'([^'\\\n]|{Escape})*' L C {