1 /********************* -*- C++ -*- */
3 ** This file is part of the CVC4 prototype.
4 ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
5 ** Courant Institute of Mathematical Sciences
7 ** See the file COPYING in the top-level source directory for licensing
10 ** Parser implementation.
13 #include "parser/parser.h"
14 #include "parser/parser_state.h"
15 #include "parser/parser_exception.h"
16 #include "parser/pl.hpp"
17 //#include "parser/smtlib.hpp"
19 // The communication entry points of the actual parsers
21 // for presentation language (PL.y and PL.lex)
23 extern void *PL_createBuffer(int);
24 extern void PL_deleteBuffer(void *);
25 extern void PL_switchToBuffer(void *);
26 extern int PL_bufSize();
27 extern void *PL_bufState();
28 void PL_setInteractive(bool);
30 // for smtlib language (smtlib.y and smtlib.lex)
31 extern int smtlibparse();
32 extern void *smtlib_createBuffer(int);
33 extern void smtlib_deleteBuffer(void *);
34 extern void smtlib_switchToBuffer(void *);
35 extern int smtlib_bufSize();
36 extern void *smtlibBufState();
37 void smtlib_setInteractive(bool);
42 ParserState
*parserState
;
44 Parser::Parser(CVC4::SmtEngine
* smt
, Language lang
, std::istream
& is
, CVC4::Options
* opts
, bool interactive
) throw()
49 d_interactive(interactive
),
52 parserState
->lineNum
= 1;
55 d_buffer
= ::PL_createBuffer(::PL_bufSize());
58 //d_buffer = ::smtlib_createBuffer(::smtlib_bufSize());
65 Parser::~Parser() throw() {
68 ::PL_deleteBuffer(d_buffer
);
71 //::smtlib_deleteBuffer(d_buffer);
78 CVC4::Command
* Parser::next() throw() {
82 bool Parser::done() const throw() {
86 void Parser::printLocation(std::ostream
& out
) const throw() {
89 void Parser::reset() throw() {
93 }/* CVC4::parser namespace */