Qt 4.8
|
Base class for all tokenizers. More...
#include <qtokenizer_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< Tokenizer > | Ptr |
Public Types inherited from QPatternist::TokenSource | |
typedef QExplicitlySharedDataPointer< TokenSource > | Ptr |
typedef QQueue< Ptr > | Queue |
typedef yytokentype | TokenType |
Public Functions | |
virtual int | commenceScanOnly ()=0 |
const QUrl & | queryURI () const |
virtual void | resumeTokenizationFrom (const int position)=0 |
virtual void | setParserContext (const ParserContext::Ptr &parseInfo)=0 |
Tokenizer (const QUrl &queryU) | |
Public Functions inherited from QPatternist::TokenSource | |
virtual Token | nextToken (YYLTYPE *const sourceLocator)=0 |
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... | |
Static Protected Functions | |
static QString | tokenToString (const Token &token) |
Properties | |
const QUrl | m_queryURI |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Base class for all tokenizers.
The main entry point is nextToken(), which ones calls to retrieve the stream of tokens this Tokenizer delivers.
Definition at line 155 of file qtokenizer_p.h.
Definition at line 163 of file qtokenizer_p.h.
|
inline |
Definition at line 158 of file qtokenizer_p.h.
|
pure 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.
Implemented in QPatternist::XSLTTokenizer, QPatternist::XQueryTokenizer, and QPatternist::TokenRevealer.
|
inline |
Definition at line 187 of file qtokenizer_p.h.
Referenced by QPatternist::fromYYLTYPE(), QPatternist::XSLTTokenizer::queueAVT(), QPatternist::XSLTTokenizer::queueExpression(), and QPatternist::XSLTTokenizer::queueSequenceType().
|
pure 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.
Implemented in QPatternist::XSLTTokenizer, QPatternist::XQueryTokenizer, and QPatternist::TokenRevealer.
|
pure virtual |
Implemented in QPatternist::XSLTTokenizer, QPatternist::XQueryTokenizer, and QPatternist::TokenRevealer.
Returns a string representation of token
.
This function is used for debugging purposes. The implementation of this function is in querytransformparser.ypp.
Definition at line 8003 of file qquerytransformparser.cpp.
Referenced by QPatternist::TokenRevealer::nextToken().
|
private |
Definition at line 205 of file qtokenizer_p.h.