From 34c21a456183dd6559e920c7d622e8a0277e60a7 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 20 Jan 2009 16:23:07 +0000 Subject: [PATCH] Make the regexp smarter git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2188 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index dfcaf68f..593bb462 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -96,11 +96,11 @@ def getInfos(definition): def getDefinitionBlocks(text): block = [] - block_tmp = re.findall(r"/\*{2}\s*([^*]*\*(?:[^/*][^*]*\*+)*)/\s*#define\s+([^/]*?/[^/]*?)\s*?(?!/{3}<.*?)$", text, re.MULTILINE) + block_tmp = re.findall(r"/\*{2}\s*([^*]*\*(?:[^/*][^*]*\*+)*)/\s*#define\s+((?:[^/]*?/?)+)\s*?(?:/{2,3}[^<].*?)?$", text, re.MULTILINE) for comment, define in block_tmp: - block.append((" ".join(re.findall(r"^\s*\*?\s*(.*?)\s*?$", comment, re.MULTILINE)), define)) - block += re.findall(r"/{3}