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