muParserX 2.0.0
|
The parser implementation. More...
#include <mpParser.h>
Public Member Functions | |
ParserX (unsigned ePackages=pckALL_COMPLEX) | |
Default constructor. More... | |
![]() | |
ParserXBase () | |
Default constructor. | |
ParserXBase (const ParserXBase &a_Parser) | |
Copy constructor. More... | |
ParserXBase & | operator= (const ParserXBase &a_Parser) |
Assignement operator. More... | |
virtual | ~ParserXBase () |
Destructor. More... | |
const IValue & | Eval () const |
Evaluate the expression. More... | |
void | SetExpr (const string_type &a_sExpr) |
Set the mathematical expression. More... | |
void | AddValueReader (IValueReader *a_pReader) |
Add a value reader object to muParserX. More... | |
void | AddPackage (IPackage *p) |
Adds a new package to the parser. More... | |
void | DefineConst (const string_type &ident, const Value &val) |
Define a parser Constant. More... | |
void | DefineVar (const string_type &ident, const Variable &var) |
Add a user defined variable. More... | |
void | DefineFun (const ptr_cal_type &fun) |
Add a callback object to the parser. More... | |
void | DefineOprt (const TokenPtr< IOprtBin > &oprt) |
Define a binary operator. More... | |
void | DefineOprt (const TokenPtr< IOprtBinShortcut > &oprt) |
Define a short circuit operator. More... | |
void | DefinePostfixOprt (const TokenPtr< IOprtPostfix > &oprt) |
Add a user defined operator. More... | |
void | DefineInfixOprt (const TokenPtr< IOprtInfix > &oprt) |
Add a user defined operator. More... | |
void | ClearVar () |
Clear all user defined variables. More... | |
void | ClearFun () |
Clear all function definitions. More... | |
void | ClearConst () |
Clear all user defined constants. More... | |
void | ClearInfixOprt () |
Clear the user defined Prefix operators. More... | |
void | ClearPostfixOprt () |
Clear all user defined postfix operators. More... | |
void | ClearOprt () |
Clear all user defined binary operators. More... | |
const var_maptype & | GetExprVar () const |
Return a map containing the used variables only. | |
const var_maptype & | GetVar () const |
Return a map containing the used variables only. | |
const val_maptype & | GetConst () const |
Return a map containing all parser constants. | |
const fun_maptype & | GetFunDef () const |
Return prototypes of all parser functions. More... | |
const string_type & | GetExpr () const |
Retrieve the mathematical expression. | |
const char_type ** | GetOprtDef () const |
Return the strings of all Operator identifiers. More... | |
void | DefineNameChars (const char_type *a_szCharset) |
Define the set of valid characters to be used in names of functions, variables, constants. | |
void | DefineOprtChars (const char_type *a_szCharset) |
Define the set of valid characters to be used in names of binary operators and postfix operators. More... | |
void | DefineInfixOprtChars (const char_type *a_szCharset) |
Define the set of valid characters to be used in names of infix operators. More... | |
const char_type * | ValidNameChars () const |
Virtual function that defines the characters allowed in name identifiers. More... | |
const char_type * | ValidOprtChars () const |
Virtual function that defines the characters allowed in operator definitions. More... | |
const char_type * | ValidInfixOprtChars () const |
Virtual function that defines the characters allowed in infix operator definitions. More... | |
void | CheckName (const string_type &a_sName, const string_type &a_CharSet) const |
Check if a given name contains invalid characters. More... | |
Additional Inherited Members | |
![]() | |
static string_type | GetVersion () |
Get the version number of muParserX. More... | |
static void | EnableDebugDump (bool bDumpCmd, bool bDumpRPN) |
Enable the dumping of bytecode amd stack content on the console. More... | |
![]() | |
fun_maptype | m_FunDef |
Function definitions. | |
oprt_pfx_maptype | m_PostOprtDef |
Postfix operator callbacks. | |
oprt_ifx_maptype | m_InfixOprtDef |
Infix operator callbacks. | |
oprt_bin_maptype | m_OprtDef |
Binary operator callbacks. | |
oprt_bin_shortcut_maptype | m_OprtShortcutDef |
short circuit operator definitions | |
val_maptype | m_valDef |
Definition of parser constants. | |
var_maptype | m_varDef |
user defind variables. | |
The parser implementation.
This is the class that implements the parser. It installs all functions and operatore and defines the constants.
mup::ParserX::ParserX | ( | unsigned | ePackages = pckALL_COMPLEX | ) |
Default constructor.
Call ParserXBase class constructor and initiate function, operator and constant initialization.