diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-05-12 15:15:53 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-05-12 15:15:53 +0000 |
commit | e67d573de13e4421036d7de9559d8ace39571492 (patch) | |
tree | f6f02f51b829f77e65c022e80884c87f68c01b64 /src/parser/parser.cpp | |
parent | 46e4487c37628217ec64a2b325b287acfb0ae8c5 (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.cpp | 11 |
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; |