muParserX 2.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mup::ParserX Class Reference

The parser implementation. More...

#include <mpParser.h>

Inheritance diagram for mup::ParserX:
Inheritance graph
[legend]
Collaboration diagram for mup::ParserX:
Collaboration graph
[legend]

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.
 
ParserXBaseoperator= (const ParserXBase &a_Parser)
 Assignement operator.
 
virtual ~ParserXBase ()
 Destructor.
 
const IValueEval () 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_maptypeGetExprVar () const
 Return a map containing the used variables only.
 
const var_maptypeGetVar () const
 Return a map containing the used variables only.
 
const val_maptypeGetConst () const
 Return a map containing all parser constants.
 
const fun_maptypeGetFunDef () const
 Return prototypes of all parser functions.
 
const string_typeGetExpr () 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_typeValidNameChars () const
 Virtual function that defines the characters allowed in name identifiers.
 
const char_typeValidOprtChars () const
 Virtual function that defines the characters allowed in operator definitions.
 
const char_typeValidInfixOprtChars () 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.
 

Detailed Description

The parser implementation.

See also
ParserXBase

This is the class that implements the parser. It installs all functions and operatore and defines the constants.

Constructor & Destructor Documentation

◆ ParserX()

mup::ParserX::ParserX ( unsigned  ePackages = pckALL_COMPLEX)

Default constructor.

Call ParserXBase class constructor and initiate function, operator and constant initialization.

Here is the call graph for this function:


muParserX documentation - (C) 2010 Ingo Berg