diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-11-06 05:42:20 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-11-06 05:42:20 -0600 |
commit | 0baaed60ab961b8eb3399ee2c34adeea7335f5b3 (patch) | |
tree | fdf7878960a9afc3b14e0ade5bd9c72bf3c57af6 /src/mem/slicc/ast/OperatorExprAST.py | |
parent | 85c29973a3cdbbbc2ed77014a730cbc625899b03 (diff) | |
download | gem5-0baaed60ab961b8eb3399ee2c34adeea7335f5b3.tar.xz |
ruby: slicc: allow adding a bool to an int, like C++.
Diffstat (limited to 'src/mem/slicc/ast/OperatorExprAST.py')
-rw-r--r-- | src/mem/slicc/ast/OperatorExprAST.py | 2 |
1 files changed, 2 insertions, 0 deletions
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)) |