Yate
Public Member Functions | Public Attributes | List of all members
ParsePoint Class Reference

The parsing context. More...

#include <yatescript.h>

Public Member Functions

 ParsePoint (const char *&expr, ExpEvaluator *eval=0, unsigned int lineNo=0, const char *fileName=0, const char *seps=0)
 
ParsePointoperator= (ParsePoint &parsePoint)
 
ParsePointoperator= (unsigned int line)
 
 operator const char *& ()
 
ParsePointoperator= (const char *newExpr)
 
ParsePointoperator++ ()
 
ParsePointoperator++ (int unused)
 
char firstChar ()
 
unsigned lineNumber () const
 

Public Attributes

const char * m_expr
 
const char * m_searchedSeps
 
unsigned int m_count
 
char m_foundSep
 
unsigned int m_lineNo
 
ExpEvaluatorm_eval
 
String m_fileName
 

Detailed Description

The parsing context.

A class used to keep a parsing context

Constructor & Destructor Documentation

◆ ParsePoint()

ParsePoint ( const char *&  expr,
ExpEvaluator eval = 0,
unsigned int  lineNo = 0,
const char *  fileName = 0,
const char *  seps = 0 
)
inlineexplicit

Constructor

Parameters
exprExpression to be parsed
evalExpEvaluator associated with this parsing context
lineNoThe line number that is currently parsed
fileNameFile name associated with this context
sepsSearched separator during parsing

Member Function Documentation

◆ firstChar()

char firstChar ( )
inline

Get first char in the parsed expression

Returns
First char in the expression to be parsed

◆ lineNumber()

unsigned lineNumber ( ) const
inline

Get line number of the parsed expression

Returns
Line number stored in parse point

◆ operator const char *&()

operator const char *& ( )
inline

Cast operator to const char*&

◆ operator++() [1/2]

ParsePoint & operator++ ( )
inline

Prefix incrementation operator. Incrementes the internal expression

◆ operator++() [2/2]

ParsePoint & operator++ ( int  unused)
inline

Postfix incrementation operator. Incrementes the internal expression

◆ operator=() [1/3]

ParsePoint & operator= ( const char *  newExpr)
inline

Assignement from const char*

◆ operator=() [2/3]

ParsePoint & operator= ( ParsePoint parsePoint)

Assignment operator

Parameters
parsePointParsing context which is to be assigned to this parsing context

◆ operator=() [3/3]

ParsePoint & operator= ( unsigned int  line)

Line number assignment

Parameters
lineNew line number

Member Data Documentation

◆ m_count

unsigned int m_count

Number of how many times the parser must encouter a separator

◆ m_eval

ExpEvaluator* m_eval

ExpEvaluator associated with this parsing context

◆ m_expr

const char* m_expr

Expression to be parsed

◆ m_fileName

String m_fileName

File name associated for this context

◆ m_foundSep

char m_foundSep

Separator that the parser encountered

◆ m_lineNo

unsigned int m_lineNo

Line numbet at which parsing is taking place

Referenced by ExpEvaluator::lineNumber().

◆ m_searchedSeps

const char* m_searchedSeps

Searched instruction separators


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