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__CVC_INPUT_H
22 #define __CVC4__PARSER__CVC_INPUT_H
24 #include "parser/antlr_input.h"
25 #include "parser/cvc/generated/CvcLexer.h"
26 #include "parser/cvc/generated/CvcParser.h"
28 // extern void CvcParserSetAntlrParser(CVC4::parser::AntlrParser* newAntlrParser);
38 class CvcInput
: public AntlrInput
{
39 /** The ANTLR3 CVC lexer for the input. */
40 pCvcLexer d_pCvcLexer
;
42 /** The ANTLR3 CVC parser for the input. */
43 pCvcParser d_pCvcParser
;
49 * @param inputStream the input to parse
51 CvcInput(AntlrInputStream
& inputStream
);
53 /** Destructor. Frees the lexer and the parser. */
56 /** Get the language that this Input is reading. */
57 InputLanguage
getLanguage() const throw() {
58 return language::input::LANG_CVC4
;
63 /** Parse a command from the input. Returns <code>NULL</code> if there is
64 * no command there to parse.
66 * @throws ParserException if an error is encountered during parsing.
68 Command
* parseCommand()
69 throw(ParserException
, TypeCheckingException
, AssertionException
);
71 /** Parse an expression from the input. Returns a null <code>Expr</code>
72 * if there is no expression there to parse.
74 * @throws ParserException if an error is encountered during parsing.
77 throw(ParserException
, TypeCheckingException
, AssertionException
);
81 /** Initialize the class. Called from the constructors once the input stream
87 }/* CVC4::parser namespace */
90 #endif /* __CVC4__PARSER__CVC_INPUT_H */