ERR_IN_OPERAND = 'Macro after IN operator can only be: $(FAMILY), $(ARCH), $(TOOL_CHAIN_TAG) and $(TARGET).'\r
\r
__ValidString = re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*$')\r
ERR_IN_OPERAND = 'Macro after IN operator can only be: $(FAMILY), $(ARCH), $(TOOL_CHAIN_TAG) and $(TARGET).'\r
\r
__ValidString = re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*$')\r
return True if __ValidString.match(Str) else False\r
\r
def BuildOptionValue(PcdValue, GuidDict):\r
return True if __ValidString.match(Str) else False\r
\r
def BuildOptionValue(PcdValue, GuidDict):\r
if PcdValue.startswith('H'):\r
InputValue = PcdValue[1:]\r
elif PcdValue.startswith("L'") or PcdValue.startswith("'"):\r
if PcdValue.startswith('H'):\r
InputValue = PcdValue[1:]\r
elif PcdValue.startswith("L'") or PcdValue.startswith("'"):\r
NonLetterOpLst = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', '>>', '!', '=', '>', '<', '?', ':']\r
\r
PcdPattern = re.compile(r'[_a-zA-Z][0-9A-Za-z_]*\.[_a-zA-Z][0-9A-Za-z_]*$')\r
NonLetterOpLst = ['+', '-', '*', '/', '%', '&', '|', '^', '~', '<<', '>>', '!', '=', '>', '<', '?', ':']\r
\r
PcdPattern = re.compile(r'[_a-zA-Z][0-9A-Za-z_]*\.[_a-zA-Z][0-9A-Za-z_]*$')\r
if Match and not Expr[Match.end():Match.end()+1].isalnum() \\r
and Expr[Match.end():Match.end()+1] != '_':\r
self._Idx += Match.end()\r
if Match and not Expr[Match.end():Match.end()+1].isalnum() \\r
and Expr[Match.end():Match.end()+1] != '_':\r
self._Idx += Match.end()\r
- LabelList = ReLabel.findall(Item)\r
- Item = ReLabel.sub('', Item)\r
+ LabelList = _ReLabel.findall(Item)\r
+ Item = _ReLabel.sub('', Item)\r
Item = '0x%x' % TmpValue if type(TmpValue) != type('') else TmpValue\r
if ItemSize == 0:\r
ItemValue, ItemSize = ParseFieldValue(Item)\r
Item = '0x%x' % TmpValue if type(TmpValue) != type('') else TmpValue\r
if ItemSize == 0:\r
ItemValue, ItemSize = ParseFieldValue(Item)\r
raise BadExpression("Byte array number %s should less than 0xFF." % Item)\r
else:\r
ItemValue = ParseFieldValue(Item)[0]\r
raise BadExpression("Byte array number %s should less than 0xFF." % Item)\r
else:\r
ItemValue = ParseFieldValue(Item)[0]\r