From 0baaed60ab961b8eb3399ee2c34adeea7335f5b3 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Thu, 6 Nov 2014 05:42:20 -0600 Subject: ruby: slicc: allow adding a bool to an int, like C++. --- src/mem/slicc/ast/OperatorExprAST.py | 2 ++ 1 file changed, 2 insertions(+) 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)) -- cgit v1.2.3