ANTLR Support Libraries 2.7.1+
|
#include <MismatchedTokenException.hpp>
Public Member Functions | |
MismatchedTokenException () | |
MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefAST node_, int lower, int upper_, bool matchNot) | |
Expected range / not range. | |
MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefAST node_, int expecting_, bool matchNot) | |
MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefAST node_, BitSet set_, bool matchNot) | |
MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefToken token_, int lower, int upper_, bool matchNot, const std::string &fileName_) | |
MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefToken token_, int expecting_, bool matchNot, const std::string &fileName_) | |
MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefToken token_, BitSet set_, bool matchNot, const std::string &fileName_) | |
~MismatchedTokenException () throw () | |
std::string | getMessage () const |
![]() | |
RecognitionException () | |
RecognitionException (const std::string &s) | |
RecognitionException (const std::string &s, const std::string &fileName, int line, int column) | |
virtual | ~RecognitionException () throw () |
virtual std::string | getFilename () const throw () |
Return file where mishap occurred. | |
virtual int | getLine () const throw () |
virtual int | getColumn () const throw () |
virtual std::string | toString () const |
Return complete error message with line/column number info (if present) | |
virtual std::string | getFileLineColumnString () const |
See what file/line/column info is present and return it as a string. |
Public Attributes | |
const RefToken | token |
The token that was encountered. | |
const RefAST | node |
The offending AST node if tree walking. | |
std::string | tokenText |
taken from node or token object | |
int | mismatchType |
One of the above. | |
int | expecting |
For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE. | |
int | upper |
For RANGE/NOT_RANGE (expecting is lower bound of range) | |
BitSet | set |
For SET/NOT_SET. |
Static Public Attributes | |
static const int | TOKEN = 1 |
Types of tokens. | |
static const int | NOT_TOKEN = 2 |
static const int | RANGE = 3 |
static const int | NOT_RANGE = 4 |
static const int | SET = 5 |
static const int | NOT_SET = 6 |
Private Member Functions | |
std::string | tokenName (int tokenType) const |
Return token name for tokenType. |
Private Attributes | |
const char *const * | tokenNames |
Token names array for formatting. | |
const int | numTokens |
Max number of tokens in tokenNames. |
Additional Inherited Members | |
![]() | |
std::string | fileName |
int | line |
int | column |
MismatchedTokenException::MismatchedTokenException | ( | ) |
MismatchedTokenException::MismatchedTokenException | ( | const char *const * | tokenNames_, |
const int | numTokens_, | ||
RefAST | node_, | ||
int | lower, | ||
int | upper_, | ||
bool | matchNot | ||
) |
Expected range / not range.
MismatchedTokenException::MismatchedTokenException | ( | const char *const * | tokenNames_, |
const int | numTokens_, | ||
RefAST | node_, | ||
int | expecting_, | ||
bool | matchNot | ||
) |
MismatchedTokenException::MismatchedTokenException | ( | const char *const * | tokenNames_, |
const int | numTokens_, | ||
RefAST | node_, | ||
BitSet | set_, | ||
bool | matchNot | ||
) |
MismatchedTokenException::MismatchedTokenException | ( | const char *const * | tokenNames_, |
const int | numTokens_, | ||
RefToken | token_, | ||
int | lower, | ||
int | upper_, | ||
bool | matchNot, | ||
const std::string & | fileName_ | ||
) |
MismatchedTokenException::MismatchedTokenException | ( | const char *const * | tokenNames_, |
const int | numTokens_, | ||
RefToken | token_, | ||
int | expecting_, | ||
bool | matchNot, | ||
const std::string & | fileName_ | ||
) |
MismatchedTokenException::MismatchedTokenException | ( | const char *const * | tokenNames_, |
const int | numTokens_, | ||
RefToken | token_, | ||
BitSet | set_, | ||
bool | matchNot, | ||
const std::string & | fileName_ | ||
) |
|
inline |
std::string MismatchedTokenException::getMessage | ( | ) | const |
Returns a clean error message (no line number/column information)
|
private |
Return token name for tokenType.
int MismatchedTokenException::expecting |
For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE.
int MismatchedTokenException::mismatchType |
One of the above.
|
static |
|
static |
|
static |
|
private |
Max number of tokens in tokenNames.
|
static |
|
static |
BitSet MismatchedTokenException::set |
For SET/NOT_SET.
const RefToken MismatchedTokenException::token |
The token that was encountered.
|
static |
Types of tokens.
|
private |
Token names array for formatting.
std ::string MismatchedTokenException::tokenText |
taken from node or token object
int MismatchedTokenException::upper |
For RANGE/NOT_RANGE (expecting is lower bound of range)