Using Options in ParserBuilder and InteractiveShell
[cvc5.git] / src / main / interactive_shell.h
1 /********************* */
2 /*! \file interactive_shell.h
3 ** \verbatim
4 ** Original author: cconway
5 ** Major contributors:
6 ** Minor contributors (to current version):
7 ** This file is part of the CVC4 prototype.
8 ** Copyright (c) 2009, 2010 The Analysis of Computer Systems Group (ACSys)
9 ** Courant Institute of Mathematical Sciences
10 ** New York University
11 ** See the file COPYING in the top-level source directory for licensing
12 ** information.\endverbatim
13 **
14 ** \brief Interactive shell for CVC4
15 **/
16
17 #ifndef __CVC4__INTERACTIVE_SHELL_H
18 #define __CVC4__INTERACTIVE_SHELL_H
19
20 #include <iostream>
21 #include <string>
22
23 #include "parser/parser_builder.h"
24 #include "util/options.h"
25
26 namespace CVC4 {
27
28 class Command;
29
30 using namespace parser;
31
32 class InteractiveShell {
33 std::istream& d_in;
34 std::ostream& d_out;
35 ParserBuilder d_parserBuilder;
36
37 public:
38 InteractiveShell(ParserBuilder& parserBuilder,
39 const Options& options) :
40 d_in(*options.in),
41 d_out(*options.out),
42 d_parserBuilder(parserBuilder) {
43 }
44
45 /** Read a command from the interactive shell. This will read as
46 many lines as necessary to parse a well-formed command. */
47 Command *readCommand();
48 };
49
50 } // CVC4 namespace
51
52 #endif // __CVC4__INTERACTIVE_SHELL_H