Yate
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

References m_count, m_eval, m_expr, m_fileName, m_foundSep, m_lineNo, and m_searchedSeps.

Referenced by operator++(), operator++(), operator=(), operator=(), and operator=().

Member Function Documentation

◆ firstChar()

char firstChar ( )
inline

Get first char in the parsed expression

Returns
First char in the expression to be parsed

References m_expr.

◆ lineNumber()

unsigned lineNumber ( ) const
inline

Get line number of the parsed expression

Returns
Line number stored in parse point

References m_lineNo.

◆ operator const char *&()

operator const char *& ( )
inline

Cast operator to const char*&

References m_expr.

◆ operator++() [1/2]

ParsePoint & operator++ ( )
inline

Prefix incrementation operator. Incrementes the internal expression

References m_expr, and ParsePoint().

◆ operator++() [2/2]

ParsePoint & operator++ ( int unused)
inline

Postfix incrementation operator. Incrementes the internal expression

References m_expr, and ParsePoint().

◆ operator=() [1/3]

ParsePoint & operator= ( const char * newExpr)
inline

Assignement from const char*

References m_expr, and ParsePoint().

◆ operator=() [2/3]

ParsePoint & operator= ( ParsePoint & parsePoint)

Assignment operator

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

References ParsePoint().

◆ operator=() [3/3]

ParsePoint & operator= ( unsigned int line)

Line number assignment

Parameters
lineNew line number

References ParsePoint().

Member Data Documentation

◆ m_count

unsigned int m_count

Number of how many times the parser must encouter a separator

Referenced by ParsePoint().

◆ m_eval

ExpEvaluator* m_eval

ExpEvaluator associated with this parsing context

Referenced by ParsePoint().

◆ m_expr

const char* m_expr

Expression to be parsed

Referenced by firstChar(), operator const char *&(), operator++(), operator++(), operator=(), and ParsePoint().

◆ m_fileName

String m_fileName

File name associated for this context

Referenced by ParsePoint().

◆ m_foundSep

char m_foundSep

Separator that the parser encountered

Referenced by ParsePoint().

◆ m_lineNo

unsigned int m_lineNo

Line numbet at which parsing is taking place

Referenced by lineNumber(), and ParsePoint().

◆ m_searchedSeps

const char* m_searchedSeps

Searched instruction separators

Referenced by ParsePoint().


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