toSQLParse::tokenizer Class Reference

#include <tosqlparse.h>

Inheritance diagram for toSQLParse::tokenizer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 tokenizer (int offset=0, int line=0)
virtual ~tokenizer ()
virtual QString getToken (bool forward=true, bool comment=false)=0
virtual int line (void)
virtual int offset (void)
virtual void setOffset (int offset)
virtual void setLine (int line)
virtual QString remaining (bool eol)=0

Protected Attributes

int Offset
int Line


Detailed Description

Abstract class to define a source of tokens for the parser.

Constructor & Destructor Documentation

toSQLParse::tokenizer::tokenizer ( int  offset = 0,
int  line = 0 
) [inline]

Create a tokenizer. Optionally specify which line and offset to start at.

References line(), Line, offset(), and Offset.

virtual toSQLParse::tokenizer::~tokenizer (  )  [inline, virtual]

Create a tokenizer. Optionally specify which line and offset to start at.


Member Function Documentation

virtual QString toSQLParse::tokenizer::getToken ( bool  forward = true,
bool  comment = false 
) [pure virtual]

Get a token from the string.

Parameters:
forward Go forward or backwards to get next token.
comment Include comments as tokens.

Implemented in toSQLParse::stringTokenizer, and toSQLParse::editorTokenizer.

virtual int toSQLParse::tokenizer::line ( void   )  [inline, virtual]

Specify the syntax analyzer to use for the tokanizer

Parameters:
analyzer Get the current line of the tokenizer. A line is defined by a
character

References Line.

Referenced by toSQLParse::editorTokenizer::getToken(), toSQLParse::parse(), toSQLParse::editorTokenizer::remaining(), and tokenizer().

virtual int toSQLParse::tokenizer::offset ( void   )  [inline, virtual]

Current offset of the tokenizer (Should point to the character after the last token in the specified direction)

References Offset.

Referenced by toSQLParse::editorTokenizer::getToken(), toSQLParse::editorTokenizer::remaining(), and tokenizer().

virtual void toSQLParse::tokenizer::setOffset ( int  offset  )  [inline, virtual]

Set a new offset of tokenzer.

References Offset.

virtual void toSQLParse::tokenizer::setLine ( int  line  )  [inline, virtual]

Set new current line of tokenizer. This will not affect the current position of the tokenizer.

References Line.

virtual QString toSQLParse::tokenizer::remaining ( bool  eol  )  [pure virtual]

Get the data remaining after the current position.

Parameters:
eol If true end of line, otherwise end of tokenizer.

Implemented in toSQLParse::stringTokenizer, and toSQLParse::editorTokenizer.

Referenced by toSQLParse::parse().


Member Data Documentation

int toSQLParse::tokenizer::Line [protected]


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

Generated on Sat Jul 26 09:05:57 2008 for Sqliteman by  doxygen 1.5.5