class toSyntaxAnalyzer

# class toSyntaxAnalyzer | This class implements a syntax parser to provide information to a syntax highlighted editor. More...
Definition | `#include <tohighlightedtext.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum infoType { Normal=0, /** This is a keyword }
- struct highlightInfo

#### Public Methods

- toSyntaxAnalyzer (const char **keywords)
- virtual ~toSyntaxAnalyzer ()
- virtual QChar quoteCharacter ()
- virtual bool declareBlock ()
- virtual std::list analyzeLine (const QString &str,infoType in,infoType &out)
- QColor getColor (infoType typ)
- bool reservedWord (const QString &word)

#### Public Static Methods

- static toSyntaxAnalyzer & defaultAnalyzer ()

#### Public Members

- friend class toSyntaxSetup

#### Protected Methods

- bool isSymbol (QChar c)

## Detailed Description

This class implements a syntax parser to provide information to a syntax highlighted editor.

enum infoType { Normal=0, /** This is a keyword } | ### infoType

Normal text

highlightInfo (struct) | ### highlightInfo

Information about a change in highlighting.

bool isSymbol (QChar c) | ### isSymbol

[protected]

Check if this is part of a symbol or not.

toSyntaxAnalyzer (const char **keywords) | ### toSyntaxAnalyzer

Create a syntax analysed

Parameters:

keywords | A list of keywords.

~toSyntaxAnalyzer () | ### ~toSyntaxAnalyzer

[virtual]

QChar quoteCharacter () | ### quoteCharacter

[virtual]

Get the character used to quote names of functions etc for the database

bool declareBlock () | ### declareBlock

[virtual]

True if declare keyword starts block.

std::list analyzeLine (const QString &str,infoType in,infoType &out) | ### analyzeLine

[virtual]

Analyze a line. There is no guarantee that lines will be called in any kind of order.

Parameters:

str | Line to analyze.
in | Type at start of line.
out | Type at start of next line.

Returns: A list of where highlighting should change. Start as normal.

QColor getColor (infoType typ) | ### getColor

Get a colordefinition for a infoType value.

Parameters:

typ | infoType to get color for.

Returns: Color of that type.

bool reservedWord (const QString &word) | ### reservedWord

Check if a word is reserved.

Parameters:

word | Word to check.

Returns: True if word is reserved.

friend class toSyntaxSetup | ### toSyntaxSetup

toSyntaxAnalyzer & defaultAnalyzer () | ### defaultAnalyzer

[static]

Get the default syntax analyzer.

Returns: Reference to the default analyzer.

Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.