|
|
A bunch of functions to parse and indent SQL text.
settings (struct) | settings |
statement (class) | statement |
Structure the statement is parsed into.
tokenizer (class) | tokenizer |
Abstract class to define a source of tokens for the parser.
stringTokenizer (class) | stringTokenizer |
Tokenizer class which gets tokens from a string.
editorTokenizer (class) | editorTokenizer |
Tokenizer class which gets tokens from an editor.
std::list<statement> parse (tokenizer &tokens)
| parse |
[static]
Parse a string.
Parameters:
tokens | Tokenizer provider to generate parsed tree from. |
Returns: Parsed statement tree.
std::list<statement> parse (tokenizer &tokens,toConnection &conn)
| parse |
[static]
Parse a string.
Parameters:
tokens | Tokenizer provider to generate parsed tree from. |
Returns: Parsed statement tree.
std::list<statement> parse (const QString &str)
| parse |
[static]
Parse a string.
Parameters:
str | String to parse. |
Returns: Parsed statement tree.
std::list<statement> parse (const QString &str,toConnection &conn)
| parse |
[static]
Parse a string.
Parameters:
str | String to parse. |
conn | Connection to determine SQL dialect. (For future use) |
Returns: Parsed statement tree.
statement parseStatement (tokenizer &tokens)
| parseStatement |
[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) |
statement parseStatement (const QString &str)
| parseStatement |
[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) |
statement parseStatement (tokenizer &tokens,toConnection &conn)
| parseStatement |
[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) |
statement parseStatement (const QString &str,toConnection &conn)
| parseStatement |
[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) |
QString indent (const QString &str)
| indent |
[static]
Indent a string.
Parameters:
str | String to indent. |
Returns: An indented string.
QString indentStatement (statement &stat,int level=0)
| indentStatement |
[static]
Indent a parse statement structure into a string.
Parameters:
stat | Statement to indent. |
level | Initial indentation level to use. |
Returns: A string with the indented statement.
QString indent (const QString &str,toConnection &conn)
| indent |
[static]
Indent a string.
Parameters:
str | String to indent. |
conn | Connection to determine SQL dialect. (For future use) |
Returns: An indented string.
QString indentString (int level)
| indentString |
[static]
Create an indentation string.
Parameters:
level | Number of characters to indent. |
int countIndent (const QString &str,int &chars)
| countIndent |
[static]
Count indentation level of a string.
Parameters:
str | String to check. |
chars | Position in string. |
settings getSetting (void)
| getSetting |
[static]
Get current settings.
void setSetting (const settings &setting)
| setSetting |
[static]
Get current settings.