42581ec1caa619b7fbcf8eb7899f1777acef7cf0
1 /********************* */
4 ** Original author: cconway
5 ** Major contributors: mdeters
6 ** Minor contributors (to current version): none
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
14 ** \brief [[ Add file-specific comments here ]].
16 ** [[ Add file-specific comments here ]]
19 #include "cvc4parser_private.h"
21 #ifndef __CVC4__PARSER__SMT_INPUT_H
22 #define __CVC4__PARSER__SMT_INPUT_H
24 #include "parser/antlr_input.h"
25 #include "parser/smt/generated/SmtLexer.h"
26 #include "parser/smt/generated/SmtParser.h"
28 // extern void SmtParserSetAntlrParser(CVC4::parser::AntlrParser* newAntlrParser);
38 class SmtInput
: public AntlrInput
{
40 /** The ANTLR3 SMT lexer for the input. */
41 pSmtLexer d_pSmtLexer
;
43 /** The ANTLR3 CVC parser for the input. */
44 pSmtParser d_pSmtParser
;
51 * @param inputStream the input stream to use
53 SmtInput(AntlrInputStream
& inputStream
);
56 * Create a string input.
58 * @param exprManager the manager to use when building expressions from the input
59 * @param input the string to read
60 * @param name the "filename" to use when reporting errors
62 // SmtInput(ExprManager* exprManager, const std::string& input, const std::string& name);
64 /** Destructor. Frees the lexer and the parser. */
70 * Parse a command from the input. Returns <code>NULL</code> if
71 * there is no command there to parse.
73 * @throws ParserException if an error is encountered during parsing.
75 Command
* parseCommand() throw(ParserException
);
78 * Parse an expression from the input. Returns a null
79 * <code>Expr</code> if there is no expression there to parse.
81 * @throws ParserException if an error is encountered during parsing.
83 Expr
parseExpr() throw(ParserException
);
88 * Initialize the class. Called from the constructors once the input
89 * stream is initialized.
93 };/* class SmtInput */
95 }/* CVC4::parser namespace */
98 #endif /* __CVC4__PARSER__SMT_INPUT_H */