summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-04-23 05:15:56 +0000
committerMorgan Deters <mdeters@gmail.com>2011-04-23 05:15:56 +0000
commit57b8c4c8581d2d3ffcf3d3a1bb228271cb4d074a (patch)
tree1c1781cc83118e4bbd2ad6939b16734c30a69f1a /src/expr
parent673d0e86b91094a58433c3ca71591fb0a0c60f84 (diff)
* reviewed BooleanSimplification, added documentation & unit test
* work around a lexer ambiguity in CVC grammar * add support for tracing antlr parser/lexer * add parsing support for more language features * initial parameterized types parsing work to support Andy's work
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/expr_template.cpp4
-rw-r--r--src/expr/expr_template.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp
index 74bfd3f2b..b7000fea6 100644
--- a/src/expr/expr_template.cpp
+++ b/src/expr/expr_template.cpp
@@ -188,11 +188,11 @@ size_t Expr::getNumChildren() const {
return d_node->getNumChildren();
}
-Expr Expr::getChild(unsigned int i) const {
+Expr Expr::operator[](unsigned i) const {
ExprManagerScope ems(*this);
Assert(d_node != NULL, "Unexpected NULL expression pointer!");
Assert(i >= 0 && i < d_node->getNumChildren(), "Child index out of bounds");
- return Expr(d_exprManager,new Node((*d_node)[i]));
+ return Expr(d_exprManager, new Node((*d_node)[i]));
}
bool Expr::hasOperator() const {
diff --git a/src/expr/expr_template.h b/src/expr/expr_template.h
index 291016044..24cb6dc5d 100644
--- a/src/expr/expr_template.h
+++ b/src/expr/expr_template.h
@@ -267,7 +267,7 @@ public:
* @param i the index of the child to retrieve
* @return the child
*/
- Expr getChild(unsigned int i) const;
+ Expr operator[](unsigned i) const;
/**
* Check if this is an expression that has an operator.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback