summaryrefslogtreecommitdiff
path: root/src/parser/parser.cpp
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-05-12 15:15:53 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-05-12 15:15:53 +0000
commite67d573de13e4421036d7de9559d8ace39571492 (patch)
treef6f02f51b829f77e65c022e80884c87f68c01b64 /src/parser/parser.cpp
parent46e4487c37628217ec64a2b325b287acfb0ae8c5 (diff)
Adding class Smt2 to handle declaration of logic and theory symbols
Diffstat (limited to 'src/parser/parser.cpp')
-rw-r--r--src/parser/parser.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp
index b4bafc953..a1d6398f0 100644
--- a/src/parser/parser.cpp
+++ b/src/parser/parser.cpp
@@ -210,6 +210,17 @@ void Parser::checkArity(Kind kind, unsigned int numArgs)
}
}
+void Parser::checkOperator(Kind kind, unsigned int numArgs) throw (ParserException) {
+ if( d_strictMode && d_logicOperators.find(kind) == d_logicOperators.end() ) {
+ parseError( "Operator is not defined in the current logic: " + kindToString(kind) );
+ }
+ checkArity(kind,numArgs);
+}
+
+void Parser::addOperator(Kind kind) {
+ d_logicOperators.insert(kind);
+}
+
Command* Parser::nextCommand() throw(ParserException) {
Debug("parser") << "nextCommand()" << std::endl;
Command* cmd = NULL;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback