CVC3
2.4.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
parser
parser_temp.h
Go to the documentation of this file.
1
/*****************************************************************************/
2
/*!
3
* \file parser_temp.h
4
*
5
* Author: Sergey Berezin
6
*
7
* Created: Wed Feb 5 17:53:02 2003
8
*
9
* <hr>
10
*
11
* License to use, copy, modify, sell and/or distribute this software
12
* and its documentation for any purpose is hereby granted without
13
* royalty, subject to the terms and conditions defined in the \ref
14
* LICENSE file provided with this distribution.
15
*
16
* <hr>
17
*
18
* A class used to communicate with the actual parser. No one else
19
* should use it.
20
*/
21
/*****************************************************************************/
22
23
#ifndef _cvc3__parser_temp_h_
24
#define _cvc3__parser_temp_h_
25
26
#include "
expr.h
"
27
#include "
exception.h
"
28
29
namespace
CVC3
{
30
31
class
ValidityChecker;
32
class
Translator;
33
34
class
ParserTemp
{
35
private
:
36
// Counter for uniqueID of bound variables
37
int
d_uid
;
38
// The main prompt when running interactive
39
std::string
prompt1
;
40
// The interactive prompt in the middle of a multi-line command
41
std::string
prompt2
;
42
// The currently used prompt
43
std::string
prompt
;
44
public
:
45
ValidityChecker
*
vc
;
46
Translator
*
translator
;
47
std::istream*
is
;
48
// The current input line
49
int
lineNum
;
50
// File name
51
std::string
fileName
;
52
// The last parsed Expr
53
Expr
expr
;
54
// Whether we are done or not
55
bool
done
;
56
// Whether we are running interactive
57
bool
interactive
;
58
// Whether arrays are enabled for smt-lib format
59
bool
arrFlag
;
60
// Whether bit-vectors are enabled for smt-lib format
61
bool
bvFlag
;
62
// Size of bit-vectors for smt-lib format
63
int
bvSize
;
64
// Did we encounter a formula query (smtlib)
65
bool
queryParsed
;
66
// Default constructor
67
ParserTemp
() : d_uid(0), prompt1(
"CVC> "
), prompt2(
"- "
),
68
prompt(
"CVC> "
), lineNum(1), done(false), arrFlag(false), queryParsed(false) { }
69
// Parser error handling (implemented in parser.cpp)
70
int
error
(
const
std::string& s);
71
// Get the next uniqueID as a string
72
std::string
uniqueID
() {
73
std::ostringstream ss;
74
ss << d_uid++;
75
return
ss.str();
76
}
77
// Get the current prompt
78
std::string
getPrompt
() {
return
prompt
; }
79
// Set the prompt to the main one
80
void
setPrompt1
() { prompt =
prompt1
; }
81
// Set the prompt to the secondary one
82
void
setPrompt2
() { prompt =
prompt2
; }
83
};
84
85
}
// end of namespace CVC3
86
87
#endif
CVC3::ParserTemp
Definition:
parser_temp.h:34
CVC3::Expr
Data structure of expressions in CVC3.
Definition:
expr.h:133
CVC3::ParserTemp::queryParsed
bool queryParsed
Definition:
parser_temp.h:65
CVC3::ParserTemp::fileName
std::string fileName
Definition:
parser_temp.h:51
CVC3::ParserTemp::vc
ValidityChecker * vc
Definition:
parser_temp.h:45
CVC3::ParserTemp::prompt1
std::string prompt1
Definition:
parser_temp.h:39
CVC3::ParserTemp::ParserTemp
ParserTemp()
Definition:
parser_temp.h:67
CVC3::ParserTemp::getPrompt
std::string getPrompt()
Definition:
parser_temp.h:78
CVC3::ParserTemp::setPrompt1
void setPrompt1()
Definition:
parser_temp.h:80
CVC3::ParserTemp::bvFlag
bool bvFlag
Definition:
parser_temp.h:61
CVC3::ParserTemp::bvSize
int bvSize
Definition:
parser_temp.h:63
CVC3::ParserTemp::prompt2
std::string prompt2
Definition:
parser_temp.h:41
exception.h
CVC3::ParserTemp::lineNum
int lineNum
Definition:
parser_temp.h:49
CVC3::ParserTemp::error
int error(const std::string &s)
CVC3::ParserTemp::d_uid
int d_uid
Definition:
parser_temp.h:37
CVC3::Translator
Definition:
translator.h:60
CVC3::ParserTemp::setPrompt2
void setPrompt2()
Definition:
parser_temp.h:82
CVC3::ValidityChecker
Generic API for a validity checker.
Definition:
vc.h:92
CVC3::ParserTemp::arrFlag
bool arrFlag
Definition:
parser_temp.h:59
CVC3::ParserTemp::expr
Expr expr
Definition:
parser_temp.h:53
CVC3::ParserTemp::uniqueID
std::string uniqueID()
Definition:
parser_temp.h:72
expr.h
Definition of the API to expression package. See class Expr for details.
CVC3::ParserTemp::is
std::istream * is
Definition:
parser_temp.h:47
CVC3
Definition:
expr.cpp:35
CVC3::ParserTemp::interactive
bool interactive
Definition:
parser_temp.h:57
CVC3::ParserTemp::prompt
std::string prompt
Definition:
parser_temp.h:43
CVC3::ParserTemp::translator
Translator * translator
Definition:
parser_temp.h:46
CVC3::ParserTemp::done
bool done
Definition:
parser_temp.h:55
Generated on Wed Jun 17 2015 04:36:24 for CVC3 by
1.8.9.1