Source-highlight Library
srchilite::srchilite::StringListLangElem Class Reference

A language element consisting of a list of strings. More...

Inheritance diagram for srchilite::srchilite::StringListLangElem:
Collaboration diagram for srchilite::srchilite::StringListLangElem:

Public Member Functions

 StringListLangElem (const std::string &n, StringDefs *defs, bool nons)
virtual const std::string toString () const
 return the string representation (with preprocessing)
virtual const std::string toStringOriginal () const
 return the original representation (without any preprocessing); this is useful for printing errors
StringDefsgetAlternatives () const
bool isCaseSensitive () const
virtual void dispatch_build (HighlightStateBuilder *, HighlightState *state)
void setExit (unsigned int level=1)
 Sets the "exit" property of this element (i.e., if the element is match then exit one state).
void setExit (unsigned int level=1)
 Sets the "exit" property of this element (i.e., if the element is match then exit one state).
void setExitAll ()
 Sets the "exit all" property of this element (i.e., if the element is match then exit all states and get back to the main initial state).
void setExitAll ()
 Sets the "exit all" property of this element (i.e., if the element is match then exit all states and get back to the main initial state).
bool exitAll () const
bool exitAll () const
unsigned int getExit () const
unsigned int getExit () const
StateLangElemgetStateLangElem () const
StateLangElemgetStateLangElem () const
void setStateLangElem (StateLangElem *s)
 Sets the state for which this element represents the start.
void setStateLangElem (StateLangElem *s)
 Sets the state for which this element represents the start.
const std::string getName () const
const std::string getName () const
bool isRedef () const
bool isRedef () const
void setRedef ()
void setRedef ()
bool isSubst () const
bool isSubst () const
void setSubst ()
void setSubst ()
const std::string toStringParserInfo () const
const std::string toStringParserInfo () const
virtual void dispatch_collect_const (LangElemsPrinter *)
virtual void dispatch_collect_const (LangElemsPrinter *)
void setParserInfo (const std::string &name, unsigned int l)
void setParserInfo (const ParserInfo *p)
void setParserInfo (const std::string &name, unsigned int l)
void setParserInfo (const ParserInfo *p)

Public Attributes

std::string filename
unsigned int line

Private Attributes

StringDefsalternatives
bool nonsensitive
unsigned int exit
 the exit level
bool exit_all
 whether to exit all states
StateLangElemstatelangelem
 the possible State of which we represent the start.
const std::string name
 the name for this language element
bool redef
 whether this redefs an existing language element
bool subst

Detailed Description

A language element consisting of a list of strings.

Constructor & Destructor Documentation

◆ StringListLangElem()

srchilite::StringListLangElem::StringListLangElem ( const std::string & n,
StringDefs * defs,
bool nons )
Parameters
nthe name for this element
defsthe alternatives for this element
nonswhether the alternatives are to be considered case unsensitive

Member Function Documentation

◆ dispatch_build()

void StringListLangElem::dispatch_build ( HighlightStateBuilder * HighlightStateBuilder_o,
HighlightState * state )
virtual

Reimplemented from srchilite::srchilite::LangElem.

◆ exitAll() [1/2]

bool srchilite::srchilite::StateStartLangElem::exitAll ( ) const
inlineinherited
Returns
whether the "exit" property is set

◆ exitAll() [2/2]

bool srchilite::srchilite::StateStartLangElem::exitAll ( ) const
inlineinherited
Returns
whether the "exit" property is set

◆ getAlternatives()

StringDefs * srchilite::srchilite::StringListLangElem::getAlternatives ( ) const
inline
Returns
the collection of all the alternatives of this element

◆ getExit() [1/2]

unsigned int srchilite::srchilite::StateStartLangElem::getExit ( ) const
inlineinherited
Returns
whether the "exit all" property is set

◆ getExit() [2/2]

unsigned int srchilite::srchilite::StateStartLangElem::getExit ( ) const
inlineinherited
Returns
whether the "exit all" property is set

◆ getStateLangElem() [1/2]

StateLangElem * srchilite::srchilite::StateStartLangElem::getStateLangElem ( ) const
inlineinherited
Returns
the state for which this element represents the start

◆ getStateLangElem() [2/2]

StateLangElem * srchilite::srchilite::StateStartLangElem::getStateLangElem ( ) const
inlineinherited
Returns
the state for which this element represents the start

◆ isCaseSensitive()

bool srchilite::srchilite::StringListLangElem::isCaseSensitive ( ) const
inline
Returns
whether the alternatives are case sensitive

◆ setExit() [1/2]

void srchilite::srchilite::StateStartLangElem::setExit ( unsigned int level = 1)
inlineinherited

Sets the "exit" property of this element (i.e., if the element is match then exit one state).

Parameters
levelthe exit level (default to 1)

◆ setExit() [2/2]

void srchilite::srchilite::StateStartLangElem::setExit ( unsigned int level = 1)
inlineinherited

Sets the "exit" property of this element (i.e., if the element is match then exit one state).

Parameters
levelthe exit level (default to 1)

◆ setStateLangElem() [1/2]

void srchilite::srchilite::StateStartLangElem::setStateLangElem ( StateLangElem * s)
inlineinherited

Sets the state for which this element represents the start.

Parameters
sthe state for which this element represents the start

◆ setStateLangElem() [2/2]

void srchilite::srchilite::StateStartLangElem::setStateLangElem ( StateLangElem * s)
inlineinherited

Sets the state for which this element represents the start.

Parameters
sthe state for which this element represents the start

◆ toString()

const std::string srchilite::StringListLangElem::toString ( ) const
virtual

return the string representation (with preprocessing)

Returns
the string representation

Reimplemented from srchilite::srchilite::StateStartLangElem.

◆ toStringOriginal()

const std::string srchilite::StringListLangElem::toStringOriginal ( ) const
virtual

return the original representation (without any preprocessing); this is useful for printing errors

Returns
the original representation

Implements srchilite::srchilite::LangElem.

◆ toStringParserInfo() [1/2]

const std::string srchilite::LangElem::toStringParserInfo ( ) const
inherited
Returns
a string representation of the ParserInfo struct

◆ toStringParserInfo() [2/2]

const std::string srchilite::srchilite::LangElem::toStringParserInfo ( ) const
inherited
Returns
a string representation of the ParserInfo struct

The documentation for this class was generated from the following files:
  • /cygdrive/d/a/scallywag/source-highlight/source-highlight-3.1.9-1.x86_64/src/source-highlight-3.1.9/lib/srchilite/highlightstatebuilder.cpp
  • /cygdrive/d/a/scallywag/source-highlight/source-highlight-3.1.9-1.x86_64/src/source-highlight-3.1.9/lib/srchilite/highlightstatebuilder_dbtab.cc
  • /cygdrive/d/a/scallywag/source-highlight/source-highlight-3.1.9-1.x86_64/src/source-highlight-3.1.9/lib/srchilite/stringlistlangelem.cpp