Qt 4.8
|
Delegates another Tokenizer, and while doing so prints the tokens it delivers to stderr
.
More...
#include <qtokenrevealer_p.h>
Public Functions | |
virtual int | commenceScanOnly () |
virtual Token | nextToken (YYLTYPE *const sourceLocator) |
virtual void | resumeTokenizationFrom (const int position) |
virtual void | setParserContext (const ParserContext::Ptr &parseInfo) |
TokenRevealer (const QUrl &uri, const Tokenizer::Ptr &other) | |
virtual | ~TokenRevealer () |
Public Functions inherited from QPatternist::Tokenizer | |
const QUrl & | queryURI () const |
Tokenizer (const QUrl &queryU) | |
Public Functions inherited from QPatternist::TokenSource | |
TokenSource () | |
virtual | ~TokenSource () |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Properties | |
QString | m_indentationString |
QString | m_result |
const Tokenizer::Ptr | m_tokenizer |
Additional Inherited Members | |
Public Types inherited from QPatternist::Tokenizer | |
typedef QExplicitlySharedDataPointer< Tokenizer > | Ptr |
Public Types inherited from QPatternist::TokenSource | |
typedef QExplicitlySharedDataPointer< TokenSource > | Ptr |
typedef QQueue< Ptr > | Queue |
typedef yytokentype | TokenType |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Static Protected Functions inherited from QPatternist::Tokenizer | |
static QString | tokenToString (const Token &token) |
Delegates another Tokenizer, and while doing so prints the tokens it delivers to stderr
.
Hence, this class is used solely for debugging.
Definition at line 72 of file qtokenrevealer_p.h.
TokenRevealer::TokenRevealer | ( | const QUrl & | uri, |
const Tokenizer::Ptr & | other | ||
) |
Definition at line 48 of file qtokenrevealer.cpp.
|
virtual |
Definition at line 55 of file qtokenrevealer.cpp.
|
virtual |
Switches the Tokenizer to only do scanning, and returns complete strings for attribute value templates as opposed to the tokens for the contained expressions.
The current position in the stream is returned. It can be used to later resume regular tokenization.
Implements QPatternist::Tokenizer.
Definition at line 101 of file qtokenrevealer.cpp.
|
virtual |
Implements QPatternist::TokenSource.
Definition at line 65 of file qtokenrevealer.cpp.
|
virtual |
Resumes regular parsing from position
. The tokenizer must be in the scan-only state, which the commenceScanOnly() call transists to.
The tokenizer will return the token POSITION_SET once after this function has been called.
Implements QPatternist::Tokenizer.
Definition at line 106 of file qtokenrevealer.cpp.
|
virtual |
Implements QPatternist::Tokenizer.
Definition at line 60 of file qtokenrevealer.cpp.
|
private |
Definition at line 88 of file qtokenrevealer_p.h.
Referenced by nextToken().
|
private |
Definition at line 87 of file qtokenrevealer_p.h.
Referenced by nextToken(), and ~TokenRevealer().
|
private |
Definition at line 86 of file qtokenrevealer_p.h.
Referenced by commenceScanOnly(), nextToken(), resumeTokenizationFrom(), and setParserContext().