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

Public Methods

Public Static Methods

Public Members

Protected Methods


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:
keywordsA list of keywords.

 ~toSyntaxAnalyzer ()

~toSyntaxAnalyzer

[virtual]

std::list<highlightInfo>  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:
strLine to analyze.
inType at start of line.
outType 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:
typinfoType to get color for.

Returns: Color of that type.

bool  reservedWord (const QString &word)

reservedWord

Check if a word is reserved.

Parameters:
wordWord to check.

Returns: True if word is reserved.

friend class toSyntaxSetup

toSyntaxSetup

toSyntaxAnalyzerdefaultAnalyzer ()

defaultAnalyzer

[static]

Get the default syntax analyzer.

Returns: Reference to the default analyzer.