From: Jay Freeman (saurik) Date: Sun, 25 Apr 2010 23:30:27 +0000 (+0000) Subject: Fix multi-line comments that end with **/. X-Git-Tag: v0.9.432~78 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/fe123f47092fe716bf5111ca57b2670932c10d6d?hp=5053a6d1cc6cd6f851aae36343b7ca1de5b2d3b2 Fix multi-line comments that end with **/. --- diff --git a/Cycript.l.in b/Cycript.l.in index 70d4e53..e085233 100644 --- a/Cycript.l.in +++ b/Cycript.l.in @@ -161,8 +161,11 @@ XMLName {XMLNameStart}{XMLNamePart}* \/{RegularExpressionBody}\/{RegularExpressionFlags} E("") \/\/[^\n]* L -\/\*!(\n|[^\*]|\*[^/])*\*\/ V() C yylval->comment_ = new(yyextra->pool_) CYComment(apr_pstrmemdup(yyextra->pool_, yytext, yyleng)); return tk::Comment; -\/\*(\n|[^\*]|\*[^/])*\*\/ V(N) + + /* http://ostermiller.org/findcomment.html */ + /* XXX: unify these two rules using !? */ +\/\*!([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/ V() C yylval->comment_ = new(yyextra->pool_) CYComment(apr_pstrmemdup(yyextra->pool_, yytext, yyleng)); return tk::Comment; +\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/ V(N) @begin E4X "<>" L return tk::LeftRight;