From a5e761dddb6b090b233aebe29dc30ebfbc058dab Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Sun, 13 Nov 2016 17:06:04 +0100 Subject: Fix comments parsing Fixed the parsing of multiline strings ending with an even number of stars, like /** this **/. Added test cases for comments. --- src/libexpr/lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index f3660ab43723..3ac7ce723cb3 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -189,7 +189,7 @@ or { return OR_KW; } [ \t\r\n]+ /* eat up whitespace */ \#[^\r\n]* /* single-line comments */ -\/\*([^*]|\*[^\/])*\*\/ /* long comments */ +\/\*([^*]|\*+[^*/])*\*+\/ /* long comments */ . return yytext[0]; -- cgit 1.4.1