blob: 8103238b351524e3be37177d5c361e5e2b37394d (
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
|
/********************* -*- C++ -*- */
/** parser.h
** This file is part of the CVC4 prototype.
** Copyright (c) 2009 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.
**
** Parser abstraction.
**/
#ifndef __CVC4__PARSER__PARSER_H
#define __CVC4__PARSER__PARSER_H
#include <iostream>
#include "util/exception.h"
#include "parser/language.h"
#include "parser/parser_state.h"
#include "util/command.h"
#include "util/options.h"
#include "expr/expr.h"
#include "smt/smt_engine.h"
#include "util/assert.h"
namespace CVC4 {
namespace parser {
class Parser {
CVC4::SmtEngine *d_smt;
std::istream &d_is;
CVC4::Options *d_opts;
Language d_lang;
bool d_interactive;
void *d_buffer;
public:
// Constructors
Parser(CVC4::SmtEngine* smt, Language lang, std::istream& is, CVC4::Options* opts, bool interactive = false) throw();
// Destructor
~Parser() throw();
// Read the next command.
CVC4::Command* next() throw();
// Check if we are done (end of input has been reached)
bool done() const throw();
// The same check can be done by using the class Parser's value as
// a Boolean
operator bool() const throw() { return done(); }
void printLocation(std::ostream & out) const throw();
// Reset any local data that depends on SmtEngine
void reset() throw();
}; // end of class Parser
}/* CVC4::parser namespace */
}/* CVC4 namespace */
#endif /* __CVC4__PARSER__PARSER_H */
|