[edk2] [PATCH v1 3/5] BaseTools: Add new RegEx pattern to GlobalData

Jaben Carsey posted 5 patches 6 years, 7 months ago
[edk2] [PATCH v1 3/5] BaseTools: Add new RegEx pattern to GlobalData
Posted by Jaben Carsey 6 years, 7 months ago
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>
---
 BaseTools/Source/Python/Common/GlobalData.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index fab67601a9e5..f58dc5a8dda2 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.
 #
-- 
2.16.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel