Quark  0.1
SqlLanguageSyntax Class Reference

A syntax matcher for the SQL language. More...

#include <SqlLanguageSyntax.h++>

Inheritance diagram for SqlLanguageSyntax:

Public Member Functions

 SqlLanguageSyntax ()
 Constructor. More...
 
virtual ~SqlLanguageSyntax ()
 Destructor. More...
 
QString language () const
 Returns the name of the language. More...
 

Protected Member Functions

void addHighlightingRule (const QString &element, const QString &pattern, bool caseInsensitive=false)
 Adds a highlighting rule to the language for syntax elements that do not span multiple lines of text. More...
 
void addMultilineHighlightingRule (const QString &element, const QString &startPattern, const QString &endPattern, bool caseInsensitive=false)
 Adds a highlighting rule to the language for syntax elements that can span multiple lines of text, such as multi-line comments. More...
 

Static Protected Attributes

static const char * SINGLE_QUOTED_STRING_PATTERN
 A pattern for matching a single-quoted string in which embedded single-quotes are escaped using a backslash character. More...
 
static const char * DOUBLE_QUOTED_STRING_PATTERN
 A pattern for matching a double-quoted string in which embedded double-quotes are escaped using a backslash character. More...
 

Detailed Description

A syntax matcher for the SQL language.

Author
Mark Lindner

Constructor & Destructor Documentation

◆ SqlLanguageSyntax()

Constructor.

◆ ~SqlLanguageSyntax()

virtual ~SqlLanguageSyntax ( )
virtual

Destructor.

Member Function Documentation

◆ addHighlightingRule()

void addHighlightingRule ( const QString &  element,
const QString &  pattern,
bool  caseInsensitive = false 
)
protectedinherited

Adds a highlighting rule to the language for syntax elements that do not span multiple lines of text.

Parameters
elementThe name of the syntax element.
patternThe regular expression pattern for matching the element.
caseInsensitiveWhether the match should be case-insensitive.

◆ addMultilineHighlightingRule()

void addMultilineHighlightingRule ( const QString &  element,
const QString &  startPattern,
const QString &  endPattern,
bool  caseInsensitive = false 
)
protectedinherited

Adds a highlighting rule to the language for syntax elements that can span multiple lines of text, such as multi-line comments.

Parameters
elementThe name of the syntax element.
startPatternThe regular expression pattern for matching the beginning of the element.
endPatternThe regular expression pattern for matching the end of the element.
caseInsensitiveWhether the match should be case-insensitive.

◆ language()

QString language ( ) const
inlineinherited

Returns the name of the language.

Member Data Documentation

◆ DOUBLE_QUOTED_STRING_PATTERN

const char* DOUBLE_QUOTED_STRING_PATTERN
staticprotectedinherited

A pattern for matching a double-quoted string in which embedded double-quotes are escaped using a backslash character.

◆ SINGLE_QUOTED_STRING_PATTERN

const char* SINGLE_QUOTED_STRING_PATTERN
staticprotectedinherited

A pattern for matching a single-quoted string in which embedded single-quotes are escaped using a backslash character.


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