]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Support TabSpace between section tag in DEC file
authorYanyan Zhang <yanyanx.zhang@intel.com>
Fri, 11 Aug 2017 02:30:09 +0000 (10:30 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sun, 13 Aug 2017 04:04:42 +0000 (12:04 +0800)
Per DEC spec, multiple section tag use <TS> to separate, and it can
support Tab, so this patch fix the bug to use Tab.

<TabSpace> ::= {<Tab>} {<Space>}
<TS> ::= <TabSpace>*

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yanyan Zhang <yanyanx.zhang@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Workspace/MetaFileParser.py

index e98352ade5b5db64648a61822d406c7b603be8a1..b756361afd7aca6d72a36487ff8d90384a86ae31 100644 (file)
@@ -1754,7 +1754,7 @@ class DecParser(MetaFileParser):
         self._SectionType = []\r
         ArchList = set()\r
         PrivateList = set()\r
-        Line = self._CurrentLine.replace("%s%s" % (TAB_COMMA_SPLIT, TAB_SPACE_SPLIT), TAB_COMMA_SPLIT)\r
+        Line = re.sub(',[\s]*', TAB_COMMA_SPLIT, self._CurrentLine)\r
         for Item in Line[1:-1].split(TAB_COMMA_SPLIT):\r
             if Item == '':\r
                 EdkLogger.error("Parser", FORMAT_UNKNOWN_ERROR,\r