toSQLParse Class Reference

#include <tosqlparse.h>

Collaboration diagram for toSQLParse:

Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static std::list< statementparse (tokenizer &tokens)
static std::list< statementparse (const QString &str)
static statement parseStatement (tokenizer &tokens)
static statement parseStatement (const QString &str)
static QString indent (const QString &str)
static QString indentStatement (statement &stat, int level=0)
static QString indentString (int level)
static QString indent (std::list< statement > &stat)
static int countIndent (const QString &str, int &chars)
static settings getSetting (void)
static void setSetting (const settings &setting)

Classes

class  editorTokenizer
struct  settings
class  statement
class  stringTokenizer
class  tokenizer


Detailed Description

A bunch of functions to parse and indent SQL text.

Member Function Documentation

std::list< toSQLParse::statement > toSQLParse::parse ( tokenizer tokens  )  [static]

static std::list<statement> toSQLParse::parse ( const QString &  str  )  [inline, static]

Parse a string.

Parameters:
str String to parse.
Returns:
Parsed statement tree.

References parse().

toSQLParse::statement toSQLParse::parseStatement ( tokenizer tokens  )  [static]

Get one statement (or block) from the root of an editor or string.

Parameters:
tokens Tokenizer to get tokens from.
conn Connection to determine SQL dialog. (For future use)

References toSQLParse::statement::List, toSQLParse::statement::Statement, and toSQLParse::statement::Type.

Referenced by parse(), and parseStatement().

static statement toSQLParse::parseStatement ( const QString &  str  )  [inline, static]

Get one statement (or block) from the root of an editor or string.

Parameters:
str Tokenizer to get tokens from.
conn Connection to determine SQL dialog. (For future use)

References parseStatement().

QString toSQLParse::indent ( const QString &  str  )  [static]

Indent a string.

Parameters:
str String to indent.
Returns:
An indented string.

References countIndent(), indentStatement(), and parse().

QString toSQLParse::indentStatement ( statement stat,
int  level = 0 
) [static]

QString toSQLParse::indentString ( int  level  )  [static]

Create an indentation string.

Parameters:
level Number of characters to indent.

References toSQLParse::settings::ExpandSpaces.

Referenced by indentStatement().

QString toSQLParse::indent ( std::list< statement > &  stat  )  [static]

Indent a string.

Parameters:
stat List of statements
Returns:
An indented string.

References indentStatement().

int toSQLParse::countIndent ( const QString &  str,
int &  chars 
) [static]

Count indentation level of a string.

Parameters:
str String to check.
chars Position in string.

References DEF_TAB_WIDTH.

Referenced by indent().

static settings toSQLParse::getSetting ( void   )  [inline, static]

Indent a parse statement structure into a string.

Parameters:
stat Statement to indent.
level Initial indentation level to use.
syntax The syntax analyzer to use.
Returns:
A string with the indented statement. Get current settings.

static void toSQLParse::setSetting ( const settings setting  )  [inline, static]

Get current settings.

Referenced by SqlEditor::SqlEditor().


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

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