summaryrefslogtreecommitdiff
path: root/src/main/main.cpp
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-10-23 14:49:06 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-10-23 14:49:06 +0000
commit0a3ecb598dac9e5e7416f88403dbf73d558c8739 (patch)
tree445375d28a4c0bd522115a1fdc40dc1190d6b7c6 /src/main/main.cpp
parentb2ff9864ed706911022d7468cde7ba55d07ab1fd (diff)
Adding Parser::setInput and using it in InteractiveShell (Fixes: #225)
Removing ParserBuilder::withStateFrom
Diffstat (limited to 'src/main/main.cpp')
-rw-r--r--src/main/main.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 8bca6190e..7943da0e7 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -229,22 +229,23 @@ int runCvc4(int argc, char* argv[]) {
Warning.getStream() << Expr::setlanguage(language);
}
- ParserBuilder parserBuilder =
- ParserBuilder(exprMgr, filename, options);
-
- if( inputFromStdin ) {
- parserBuilder.withStreamInput(cin);
- }
// Parse and execute commands until we are done
Command* cmd;
if( options.interactive ) {
- InteractiveShell shell(parserBuilder,options);
+ InteractiveShell shell(exprMgr,options);
while((cmd = shell.readCommand())) {
doCommand(smt,cmd);
delete cmd;
}
} else {
+ ParserBuilder parserBuilder =
+ ParserBuilder(exprMgr, filename, options);
+
+ if( inputFromStdin ) {
+ parserBuilder.withStreamInput(cin);
+ }
+
Parser *parser = parserBuilder.build();
while((cmd = parser->nextCommand())) {
doCommand(smt, cmd);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback