BaseTools:ECC report errors on account of analyze special characters
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1751 In case that a C function body contains the string of L'', L'\"', L"\"", L''', L""", L"\"\"", L"\"^", L" \"", L"\" \"", ('L",\\\""') ECC tool running under python3 interpreter will report error. The antlr4 module misidentified this character This patch is going to fix that issue. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
@ -114,6 +114,7 @@ _ConfigFileToInternalTranslation = {
|
||||
"SmmCommParaCheckBufferType":"SmmCommParaCheckBufferType",
|
||||
"SpaceCheckAll":"SpaceCheckAll",
|
||||
"SpellingCheckAll":"SpellingCheckAll",
|
||||
"TokenReleaceList":"TokenReleaceList",
|
||||
"UniCheckAll":"UniCheckAll",
|
||||
"UniCheckHelpInfo":"UniCheckHelpInfo",
|
||||
"UniCheckPCDInfo":"UniCheckPCDInfo",
|
||||
@ -389,6 +390,8 @@ class Configuration(object):
|
||||
# A list for Copyright format
|
||||
self.Copyright = []
|
||||
|
||||
self.TokenReleaceList = []
|
||||
|
||||
self.ParseConfig()
|
||||
|
||||
def ParseConfig(self):
|
||||
@ -419,6 +422,8 @@ class Configuration(object):
|
||||
List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)
|
||||
if List[0] == 'Copyright':
|
||||
List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)
|
||||
if List[0] == 'TokenReleaceList':
|
||||
List[1] = GetSplitValueList(List[1], TAB_COMMA_SPLIT)
|
||||
self.__dict__[_ConfigFileToInternalTranslation[List[0]]] = List[1]
|
||||
|
||||
def ShowMe(self):
|
||||
|
Reference in New Issue
Block a user