KDevelop API Documentation

MismatchedTokenException Class Reference

#include <MismatchedTokenException.hpp>

Inheritance diagram for MismatchedTokenException:

Inheritance graph
[legend]
Collaboration diagram for MismatchedTokenException:

Collaboration graph
[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
 Returns a clean error message (no line number/column information).

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

const int TOKEN = 1
 Types of tokens.
const int NOT_TOKEN = 2
const int RANGE = 3
const int NOT_RANGE = 4
const int SET = 5
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

MismatchedTokenException::MismatchedTokenException  ) 
 

Definition at line 15 of file MismatchedTokenException.cpp.

References nullASTptr.

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

Expected range / not range.

Definition at line 25 of file MismatchedTokenException.cpp.

References ANTLR_USE_NAMESPACE, and RefAST.

MismatchedTokenException::MismatchedTokenException const char *const *  tokenNames_,
const int  numTokens_,
RefAST  node_,
int  expecting_,
bool  matchNot
 

Definition at line 45 of file MismatchedTokenException.cpp.

References ANTLR_USE_NAMESPACE, and RefAST.

MismatchedTokenException::MismatchedTokenException const char *const *  tokenNames_,
const int  numTokens_,
RefAST  node_,
BitSet  set_,
bool  matchNot
 

Definition at line 63 of file MismatchedTokenException.cpp.

References ANTLR_USE_NAMESPACE, and RefAST.

MismatchedTokenException::MismatchedTokenException const char *const *  tokenNames_,
const int  numTokens_,
RefToken  token_,
int  lower,
int  upper_,
bool  matchNot,
const std::string &  fileName_
 

Definition at line 81 of file MismatchedTokenException.cpp.

References nullASTptr, and RefToken.

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

Definition at line 102 of file MismatchedTokenException.cpp.

References nullASTptr, and RefToken.

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

Definition at line 121 of file MismatchedTokenException.cpp.

References nullASTptr, and RefToken.

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

Definition at line 84 of file MismatchedTokenException.hpp.


Member Function Documentation

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

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

Reimplemented from ANTLRException.

Definition at line 139 of file MismatchedTokenException.cpp.

References ANTLR_USE_NAMESPACE, and ANTLRException::getMessage().

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

Return token name for tokenType.

Definition at line 175 of file MismatchedTokenException.cpp.

References ANTLR_USE_NAMESPACE.


Member Data Documentation

int MismatchedTokenException::expecting
 

For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE.

Definition at line 123 of file MismatchedTokenException.hpp.

int MismatchedTokenException::mismatchType
 

One of the above.

Definition at line 120 of file MismatchedTokenException.hpp.

const RefAST MismatchedTokenException::node
 

The offending AST node if tree walking.

Definition at line 95 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::NOT_RANGE = 4 [static]
 

Definition at line 189 of file MismatchedTokenException.cpp.

const int MismatchedTokenException::NOT_SET = 6 [static]
 

Definition at line 191 of file MismatchedTokenException.cpp.

const int MismatchedTokenException::NOT_TOKEN = 2 [static]
 

Definition at line 187 of file MismatchedTokenException.cpp.

const int MismatchedTokenException::numTokens [private]
 

Max number of tokens in tokenNames.

Definition at line 135 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::RANGE = 3 [static]
 

Definition at line 188 of file MismatchedTokenException.cpp.

BitSet MismatchedTokenException::set
 

For SET/NOT_SET.

Definition at line 129 of file MismatchedTokenException.hpp.

const int MismatchedTokenException::SET = 5 [static]
 

Definition at line 190 of file MismatchedTokenException.cpp.

const int MismatchedTokenException::TOKEN = 1 [static]
 

Types of tokens.

Definition at line 186 of file MismatchedTokenException.cpp.

const RefToken MismatchedTokenException::token
 

The token that was encountered.

Definition at line 93 of file MismatchedTokenException.hpp.

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

Token names array for formatting.

Definition at line 133 of file MismatchedTokenException.hpp.

std ::string MismatchedTokenException::tokenText
 

taken from node or token object

Definition at line 97 of file MismatchedTokenException.hpp.

int MismatchedTokenException::upper
 

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

Definition at line 126 of file MismatchedTokenException.hpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:27:01 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003