From: Nilay Vaish Date: Thu, 6 Nov 2014 11:42:20 +0000 (-0600) Subject: ruby: slicc: allow adding a bool to an int, like C++. X-Git-Tag: stable_2015_04_15~146 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0baaed60ab961b8eb3399ee2c34adeea7335f5b3;p=gem5.git ruby: slicc: allow adding a bool to an int, like C++. --- diff --git a/src/mem/slicc/ast/OperatorExprAST.py b/src/mem/slicc/ast/OperatorExprAST.py index df074b9f0..f449a358a 100644 --- a/src/mem/slicc/ast/OperatorExprAST.py +++ b/src/mem/slicc/ast/OperatorExprAST.py @@ -69,6 +69,8 @@ class InfixOperatorExprAST(ExprAST): ("Cycles", "Cycles", "Cycles"), ("Cycles", "int", "Cycles"), ("Scalar", "int", "Scalar"), + ("int", "bool", "int"), + ("bool", "int", "int"), ("int", "Cycles", "Cycles")] else: self.error("No operator matched with {0}!" .format(self.op))