]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Add new RegEx pattern to GlobalData
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>
Tue, 3 Apr 2018 22:34:04 +0000 (06:34 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Sun, 8 Apr 2018 07:34:11 +0000 (15:34 +0800)
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/Common/GlobalData.py

index fab67601a9e5f49c4bdcc023f5caf65805119736..f58dc5a8dda225a973f57c20abdb2508c28e866c 100644 (file)
@@ -63,6 +63,9 @@ gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))
 g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r
 gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r
 \r
 g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))\r
 gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))\r
 \r
+## Regular expressions for string identifier checking\r
+gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)\r
+\r
 #\r
 # A global variable for whether current build in AutoGen phase or not.\r
 #\r
 #\r
 # A global variable for whether current build in AutoGen phase or not.\r
 #\r