|
muParserX 2.0.0
|
The parser implementation. More...
#include <mpParser.h>


Public Member Functions | |
| ParserX (unsigned ePackages=pckALL_COMPLEX) | |
| Default constructor. | |
| Public Member Functions inherited from mup::ParserXBase | |
| ParserXBase () | |
| Default constructor. | |
| ParserXBase (const ParserXBase &a_Parser) | |
| Copy constructor. | |
| ParserXBase & | operator= (const ParserXBase &a_Parser) |
| Assignement operator. | |
| virtual | ~ParserXBase () |
| Destructor. | |
| const IValue & | Eval () const |
| Evaluate the expression. | |
| void | SetExpr (const string_type &a_sExpr) |
| Set the mathematical expression. | |
| void | AddValueReader (IValueReader *a_pReader) |
| Add a value reader object to muParserX. | |
| void | AddPackage (IPackage *p) |
| Adds a new package to the parser. | |
| void | DefineConst (const string_type &ident, const Value &val) |
| Define a parser Constant. | |
| void | DefineVar (const string_type &ident, const Variable &var) |
| Add a user defined variable. | |
| void | DefineFun (const ptr_cal_type &fun) |
| Add a callback object to the parser. | |
| void | DefineOprt (const TokenPtr< IOprtBin > &oprt) |
| Define a binary operator. | |
| void | DefineOprt (const TokenPtr< IOprtBinShortcut > &oprt) |
| Define a short circuit operator. | |
| void | DefinePostfixOprt (const TokenPtr< IOprtPostfix > &oprt) |
| Add a user defined operator. | |
| void | DefineInfixOprt (const TokenPtr< IOprtInfix > &oprt) |
| Add a user defined operator. | |
| void | ClearVar () |
| Clear all user defined variables. | |
| void | ClearFun () |
| Clear all function definitions. | |
| void | ClearConst () |
| Clear all user defined constants. | |
| void | ClearInfixOprt () |
| Clear the user defined Prefix operators. | |
| void | ClearPostfixOprt () |
| Clear all user defined postfix operators. | |
| void | ClearOprt () |
| Clear all user defined binary operators. | |
| 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. | |
| const string_type & | GetExpr () const |
| Retrieve the mathematical expression. | |
| const char_type ** | GetOprtDef () const |
| Return the strings of all Operator identifiers. | |
| 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. | |
| void | DefineInfixOprtChars (const char_type *a_szCharset) |
| Define the set of valid characters to be used in names of infix operators. | |
| const char_type * | ValidNameChars () const |
| Virtual function that defines the characters allowed in name identifiers. | |
| const char_type * | ValidOprtChars () const |
| Virtual function that defines the characters allowed in operator definitions. | |
| const char_type * | ValidInfixOprtChars () const |
| Virtual function that defines the characters allowed in infix operator definitions. | |
| void | CheckName (const string_type &a_sName, const string_type &a_CharSet) const |
| Check if a given name contains invalid characters. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from mup::ParserXBase | |
| static string_type | GetVersion () |
| Get the version number of muParserX. | |
| static void | EnableDebugDump (bool bDumpCmd, bool bDumpRPN) |
| Enable the dumping of bytecode amd stack content on the console. | |
| Protected Attributes inherited from mup::ParserXBase | |
| 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.
