1 #ifndef INC_RecognitionException_hpp__
2 # define INC_RecognitionException_hpp__
4 /* ANTLR Translator Generator
5 * Project led by Terence Parr at http://www.jGuru.com
6 * Software rights: http://www.antlr.org/license.html
8 * $Id: //depot/code/org.antlr/release/antlr-2.7.7/lib/cpp/antlr/RecognitionException.hpp#2 $
11 # include <antlr/config.hpp>
12 # include <antlr/ANTLRException.hpp>
14 # ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
18 class ANTLR_API RecognitionException : public ANTLRException
21 RecognitionException();
22 RecognitionException(const ANTLR_USE_NAMESPACE(std)string& s);
23 RecognitionException(const ANTLR_USE_NAMESPACE(std)string& s,
24 const ANTLR_USE_NAMESPACE(std)string& fileName,
25 int line, int column );
27 virtual ~RecognitionException() _NOEXCEPT
31 /// Return file where mishap occurred.
32 virtual ANTLR_USE_NAMESPACE(std)string getFilename() const _NOEXCEPT
37 * @return the line number that this exception happened on.
39 virtual int getLine() const _NOEXCEPT
44 * @return the column number that this exception happened on.
46 virtual int getColumn() const _NOEXCEPT
51 /// Return complete error message with line/column number info (if present)
52 virtual ANTLR_USE_NAMESPACE(std)string toString() const;
54 /// See what file/line/column info is present and return it as a string
55 virtual ANTLR_USE_NAMESPACE(std)string getFileLineColumnString() const;
57 ANTLR_USE_NAMESPACE(std)string fileName; // not used by treeparsers
58 int line; // not used by treeparsers
59 int column; // not used by treeparsers
62 # ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
66 #endif //INC_RecognitionException_hpp__