BaseTools: ECC tool Python3 adaption

v2:
The python files under CParser4 are generated by antlr4 and for
python3 usage. They have python3 specific syntax, for example
the data type declaration for the arguments of a function. That
is not compitable with python2. this patch is to remove these syntax.

ECC tool Python3 adaption.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Feng, Bob C
2019-01-04 17:35:10 +08:00
parent d943b0c339
commit c60377d7f9
17 changed files with 8385 additions and 23 deletions

View File

@ -178,7 +178,7 @@ class Ecc(object):
Op = open(EccGlobalData.gConfig.MetaDataFileCheckPathOfGenerateFileList, 'w+')
#SkipDirs = Read from config file
SkipDirs = EccGlobalData.gConfig.SkipDirList
SkipDirString = string.join(SkipDirs, '|')
SkipDirString = '|'.join(SkipDirs)
# p = re.compile(r'.*[\\/](?:%s)[\\/]?.*' % SkipDirString)
p = re.compile(r'.*[\\/](?:%s^\S)[\\/]?.*' % SkipDirString)
for scanFolder in ScanFolders: