From a19feec4a7864dc17fcb570330ae2f7b9a5c6e45 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 2 Sep 2016 19:13:14 +0200 Subject: [PATCH] Python strip code comments In python the STRIP_CODE_COMMENTS didn't work properly, the "## /file" was not seen by the rule <*>{POUNDCOMMENT}" as the longer "<*>"#".* took precedence. Example file bb.py: ## \file # ## pyfie docu # \include aa.h # \include bb.py # \include cc.f # def pyfie(): pass --- src/pycode.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pycode.l b/src/pycode.l index a31a0edb552..a0de80b1e70 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -1422,7 +1422,7 @@ TARGET ({IDENTIFIER}|"("{TARGET_LIST}")"|"["{TARGET_LIST}"]"|{ATTRIBUT unput(*yytext); yy_pop_state(); } -<*>{POUNDCOMMENT} { +<*>{POUNDCOMMENT}.* { if (YY_START==SingleQuoteString || YY_START==DoubleQuoteString || YY_START==TripleString