'''\r
ExpressionValidate\r
'''\r
+from __future__ import print_function\r
\r
##\r
# Import Modules\r
try:\r
if self.LogicalExpression() not in [self.ARITH, self.LOGICAL, self.REALLOGICAL, self.STRINGITEM]:\r
return False, ST.ERR_EXPR_LOGICAL % self.Token\r
- except _ExprError, XExcept:\r
+ except _ExprError as XExcept:\r
return False, XExcept.Error\r
self.SkipWhitespace()\r
if self.Index != self.Len:\r
try:\r
if self.RangeExpression() not in [self.HEX, self.INT]:\r
return False, ST.ERR_EXPR_RANGE % self.Token\r
- except _ExprError, XExcept:\r
+ except _ExprError as XExcept:\r
return False, XExcept.Error\r
\r
self.SkipWhitespace()\r
try:\r
if self.ListExpression() not in [self.NUM]:\r
return False, ST.ERR_EXPR_LIST % self.Token\r
- except _ExprError, XExcept:\r
+ except _ExprError as XExcept:\r
return False, XExcept.Error\r
\r
self.SkipWhitespace()\r
return False, ST.ERR_EXPR_EMPTY\r
try:\r
self.StringTest()\r
- except _ExprError, XExcept:\r
+ except _ExprError as XExcept:\r
return False, XExcept.Error\r
return True, ''\r
\r
\r
if __name__ == '__main__':\r
# print IsValidRangeExpr('LT 9')\r
- print _LogicalExpressionParser('gCrownBayTokenSpaceGuid.PcdPciDevice1BridgeAddressLE0').IsValidLogicalExpression()\r
+ print(_LogicalExpressionParser('gCrownBayTokenSpaceGuid.PcdPciDevice1BridgeAddressLE0').IsValidLogicalExpression())\r
\r
\r
\r