projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85c2997
)
ruby: slicc: allow adding a bool to an int, like C++.
author
Nilay Vaish
<nilay@cs.wisc.edu>
Thu, 6 Nov 2014 11:42:20 +0000
(
05:42
-0600)
committer
Nilay Vaish
<nilay@cs.wisc.edu>
Thu, 6 Nov 2014 11:42:20 +0000
(
05:42
-0600)
src/mem/slicc/ast/OperatorExprAST.py
patch
|
blob
|
history
diff --git
a/src/mem/slicc/ast/OperatorExprAST.py
b/src/mem/slicc/ast/OperatorExprAST.py
index df074b9f07792e97907af77b45c558d9ad54696e..f449a358a6b525cb8c160c781df1c0099e4a54f4 100644
(file)
--- 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))