summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/UPT/Parser/DecParser.py
diff options
context:
space:
mode:
authorHess Chen <hesheng.chen@intel.com>2015-11-18 05:38:35 +0000
committerhchen30 <hchen30@Edk2>2015-11-18 05:38:35 +0000
commit48b77f5ea9091d78098ba0d6168d4b638914f280 (patch)
treeeb1ab9b17fd133288a0fedf058af30ede917bc74 /BaseTools/Source/Python/UPT/Parser/DecParser.py
parentb9335cf562f11a096efea6c98d8612f22929eeb9 (diff)
downloadedk2-platforms-48b77f5ea9091d78098ba0d6168d4b638914f280.tar.xz
BaseTool/UPT: Add supporting of decimal numbers for INF_VERSION and DEC_SPECIFICATION
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18868 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/UPT/Parser/DecParser.py')
-rw-r--r--BaseTools/Source/Python/UPT/Parser/DecParser.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/UPT/Parser/DecParser.py b/BaseTools/Source/Python/UPT/Parser/DecParser.py
index 25407f9a2d..23d1ed4dbb 100644
--- a/BaseTools/Source/Python/UPT/Parser/DecParser.py
+++ b/BaseTools/Source/Python/UPT/Parser/DecParser.py
@@ -29,6 +29,7 @@ from Library.ParserValidate import IsValidIdString
from Library.ParserValidate import IsValidUserId
from Library.ParserValidate import IsValidArch
from Library.ParserValidate import IsValidWord
+from Library.ParserValidate import IsValidDecVersionVal
from Parser.DecParserMisc import TOOL_NAME
from Parser.DecParserMisc import CleanString
from Parser.DecParserMisc import IsValidPcdDatum
@@ -452,7 +453,8 @@ class _DecDefine(_DecBase):
if self.ItemObject.GetPackageSpecification():
self._LoggerError(ST.ERR_DECPARSE_DEFINE_DEFINED % DT.TAB_DEC_DEFINES_DEC_SPECIFICATION)
if not IsValidToken('0[xX][0-9a-fA-F]{8}', Token):
- self._LoggerError(ST.ERR_DECPARSE_DEFINE_SPEC)
+ if not IsValidDecVersionVal(Token):
+ self._LoggerError(ST.ERR_DECPARSE_DEFINE_SPEC)
self.ItemObject.SetPackageSpecification(Token)
def _SetPackageName(self, Token):