From 73fcb789c5a9ded09cbf560e6d8f5e239739d3d5 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 6 Feb 2019 11:38:22 +0100 Subject: Issue #6818 Certain regex pattern in class constant causes PHP class to be ignored In case of Cpp we also have to consider the case of strings that can contain the `[[...]]` part. --- src/scanner.l | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scanner.l b/src/scanner.l index 03c70c6..6633098 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -6829,7 +6829,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) [^\*\n]+ <*>"[[" { // C++11 attribute - if (!insideCpp) REJECT; + if (!insideCpp) REJECT; + if (YY_START == CopyGString || YY_START == CopyGString) REJECT; lastC11AttributeContext = YY_START; BEGIN( SkipC11Attribute ); } -- cgit v0.12