Token reader for the ParserXBase class.
More...
Token reader for the ParserXBase class.
◆ TokenReader()
mup::TokenReader::TokenReader |
( |
ParserXBase * |
a_pParent | ) |
|
Constructor.
Create a Token reader and bind it to a parser object.
- Precondition
- [assert] a_pParser may not be nullptr
- Postcondition
- #m_pParser==a_pParser
- Parameters
-
a_pParent | Parent parser object of the token reader. |
◆ ~TokenReader()
mup::TokenReader::~TokenReader |
( |
| ) |
|
Destructor (trivial).
- Exceptions
-
◆ Clone()
Create instance of a ParserTokenReader identical with this and return its pointer.
This is a factory method the calling function must take care of the object destruction.
- Returns
- A new ParserTokenReader object.
- Exceptions
-
◆ GetExpr()
const string_type & mup::TokenReader::GetExpr |
( |
| ) |
const |
Return a reference to the formula.
- Returns
- #m_sExpr
- Exceptions
-
◆ GetPos()
int mup::TokenReader::GetPos |
( |
| ) |
const |
Return the current position of the token reader in the formula string.
- Returns
- #m_nPos
- Exceptions
-
◆ ReInit()
void mup::TokenReader::ReInit |
( |
| ) |
|
Reset the token reader to the start of the formula.
- Postcondition
- #m_nPos==0, #m_nSynFlags = noOPT | noBC | noPOSTOP | noSTR
- Exceptions
-
- See also
- ESynCodes
The syntax flags will be reset to a value appropriate for the start of a formula.
◆ SetExpr()
void mup::TokenReader::SetExpr |
( |
const string_type & |
a_sExpr | ) |
|
Initialize the token Reader.
Sets the expression position index to zero and set Syntax flags to default for initial parsing.