if Record[1] in [None, '']:\r
EdkLogger.error('build', FORMAT_INVALID, 'No DefaultStores ID name',\r
File=self.MetaFile, Line=Record[-1])\r
+ Pattern = re.compile('^[1-9]\d*|0$')\r
+ HexPattern = re.compile(r'0[xX][0-9a-fA-F]+$')\r
+ if Pattern.match(Record[0]) == None and HexPattern.match(Record[0]) == None:\r
+ EdkLogger.error('build', FORMAT_INVALID, "The format of the DefaultStores ID number is invalid. It only support Integer and HexNumber",\r
+ File=self.MetaFile, Line=Record[-1])\r
+ if not IsValidWord(Record[1]):\r
+ EdkLogger.error('build', FORMAT_INVALID, "The format of the DefaultStores ID name is invalid. The correct format is '(a-zA-Z0-9_)(a-zA-Z0-9_-.)*'",\r
+ File=self.MetaFile, Line=Record[-1])\r
self.DefaultStores[Record[1].upper()] = (self.ToInt(Record[0]),Record[1].upper())\r
if TAB_DEFAULT_STORES_DEFAULT not in self.DefaultStores:\r
self.DefaultStores[TAB_DEFAULT_STORES_DEFAULT] = (0,TAB_DEFAULT_STORES_DEFAULT)\r