summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/GlobalData.py
diff options
context:
space:
mode:
authorCarsey, Jaben </o=Intel/ou=Americas01/cn=Workers/cn=Carsey, Jaben>2018-04-04 06:34:04 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-04-08 15:34:11 +0800
commit7da06eeede10fc8b908327b375bcdf36707ff7b5 (patch)
tree34b796564350b216bbe3c9d91bbb84b94a084515 /BaseTools/Source/Python/Common/GlobalData.py
parentffe720c53ecf57296e396ee64a78773539047fb8 (diff)
downloadedk2-7da06eeede10fc8b908327b375bcdf36707ff7b5.tar.gz
edk2-7da06eeede10fc8b908327b375bcdf36707ff7b5.tar.bz2
edk2-7da06eeede10fc8b908327b375bcdf36707ff7b5.zip
BaseTools: Add new RegEx pattern to GlobalData
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>
Diffstat (limited to 'BaseTools/Source/Python/Common/GlobalData.py')
-rw-r--r--BaseTools/Source/Python/Common/GlobalData.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index fab67601a9..f58dc5a8dd 100644
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -63,6 +63,9 @@ gGuidPatternEnd = re.compile(r'{}$'.format(_GuidPattern))
g4HexChar = re.compile(r'{}{{4}}'.format(_HexChar))
gHexPattern = re.compile(r'0[xX]{}+'.format(_HexChar))
+## Regular expressions for string identifier checking
+gIdentifierPattern = re.compile('^[a-zA-Z][a-zA-Z0-9_]*$', re.UNICODE)
+
#
# A global variable for whether current build in AutoGen phase or not.
#