MismatchedTokenException Class Reference

#include <MismatchedTokenException.hpp>

Inheritance diagram for MismatchedTokenException:

Inheritance graph
[legend]
Collaboration diagram for MismatchedTokenException:

Collaboration graph
[legend]

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 ANTLR_USE_NAMESPACE(std) string &fileName_)
 MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefToken token_, int expecting_, bool matchNot, const ANTLR_USE_NAMESPACE(std) string &fileName_)
 MismatchedTokenException (const char *const *tokenNames_, const int numTokens_, RefToken token_, BitSet set_, bool matchNot, const ANTLR_USE_NAMESPACE(std) string &fileName_)
 ~MismatchedTokenException () throw ()
 ANTLR_USE_NAMESPACE (std) string getMessage() const
 ANTLR_USE_NAMESPACE (std) string tokenText
 taken from node or token object

Data Fields

const RefToken token
 The token that was encountered.
const RefAST node
 The offending AST node if tree walking.
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

 ANTLR_USE_NAMESPACE (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.

Detailed Description

Definition at line 22 of file MismatchedTokenException.hpp.


Constructor & Destructor Documentation

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 ANTLR_USE_NAMESPACE(std) string &  fileName_ 
)

MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefToken  token_,
int  expecting_,
bool  matchNot,
const ANTLR_USE_NAMESPACE(std) string &  fileName_ 
)

MismatchedTokenException::MismatchedTokenException ( const char *const *  tokenNames_,
const int  numTokens_,
RefToken  token_,
BitSet  set_,
bool  matchNot,
const ANTLR_USE_NAMESPACE(std) string &  fileName_ 
)

MismatchedTokenException::~MismatchedTokenException (  )  throw () [inline]

Definition at line 84 of file MismatchedTokenException.hpp.


Member Function Documentation

MismatchedTokenException::ANTLR_USE_NAMESPACE ( std   )  const [virtual]

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

Reimplemented from RecognitionException.

MismatchedTokenException::ANTLR_USE_NAMESPACE ( std   ) 

taken from node or token object

Reimplemented from RecognitionException.

MismatchedTokenException::ANTLR_USE_NAMESPACE ( std   )  const [private, virtual]

Return token name for tokenType.

Reimplemented from RecognitionException.


Field Documentation

The token that was encountered.

Definition at line 93 of file MismatchedTokenException.hpp.

The offending AST node if tree walking.

Definition at line 95 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::TOKEN = 1 [static]

Types of tokens.

Definition at line 101 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::NOT_TOKEN = 2 [static]

Definition at line 102 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::RANGE = 3 [static]

Definition at line 103 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::NOT_RANGE = 4 [static]

Definition at line 104 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::SET = 5 [static]

Definition at line 105 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::NOT_SET = 6 [static]

Definition at line 106 of file MismatchedTokenException.hpp.

One of the above.

Definition at line 120 of file MismatchedTokenException.hpp.

For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE.

Definition at line 123 of file MismatchedTokenException.hpp.

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

Definition at line 126 of file MismatchedTokenException.hpp.

For SET/NOT_SET.

Definition at line 129 of file MismatchedTokenException.hpp.

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

Token names array for formatting.

Definition at line 133 of file MismatchedTokenException.hpp.

Max number of tokens in tokenNames.

Definition at line 135 of file MismatchedTokenException.hpp.


The documentation for this class was generated from the following file:

Generated on Tue Mar 31 20:19:28 2009 for ctrump by  doxygen 1.5.6