antlr::MismatchedTokenException Class Reference

#include <MismatchedTokenException.hpp>

Inheritance diagram for antlr::MismatchedTokenException:
[legend]
Collaboration diagram for antlr::MismatchedTokenException:
[legend]

List of all members.

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

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.

Constructor & Destructor Documentation

antlr::MismatchedTokenException::MismatchedTokenException (  ) 
antlr::MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefAST  node_,
int  lower,
int  upper_,
bool  matchNot 
)

Expected range / not range.

antlr::MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefAST  node_,
int  expecting_,
bool  matchNot 
)
antlr::MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefAST  node_,
BitSet  set_,
bool  matchNot 
)
antlr::MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefToken  token_,
int  lower,
int  upper_,
bool  matchNot,
const std::string &  fileName_ 
)
antlr::MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefToken  token_,
int  expecting_,
bool  matchNot,
const std::string &  fileName_ 
)
antlr::MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefToken  token_,
BitSet  set_,
bool  matchNot,
const std::string &  fileName_ 
)
antlr::MismatchedTokenException::~MismatchedTokenException (  )  throw () [inline]

Member Function Documentation

std::string antlr::MismatchedTokenException::getMessage (  )  const [virtual]

Returns a clean error message (no line number/column information)

Reimplemented from ANTLRException.

std::string antlr::MismatchedTokenException::tokenName ( int  tokenType  )  const [private]

Return token name for tokenType.


Member Data Documentation

For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE.

One of the above.

The offending AST node if tree walking.

Max number of tokens in tokenNames.

For SET/NOT_SET.

const int antlr::MismatchedTokenException::SET = 5 [static]

Types of tokens.

The token that was encountered.

const char* const* antlr::MismatchedTokenException::tokenNames [private]

Token names array for formatting.

taken from node or token object

For RANGE/NOT_RANGE (expecting is lower bound of range).


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines

Generated on 16 Nov 2015 for ANTLR Support Libraries 2.7.1+ by  doxygen 1.6.1