104 virtual void Eval(
void) {
NO_OP; };
116 template <
class T, ArgType TT = AT_PRIVATE>
139 virtual void Eval(
void) {
if (m_ee) {
EE_Eval(
m_val, m_ee); } };
176 for (
unsigned i = 0; i <
args.size(); ++i) {
181 for (
unsigned i = 0; i <
args.size(); ++i) {
197 virtual const std::string&
sGetName(
void)
const;
198 virtual bool IsFunc(
const std::string& fname)
const = 0;
207 typedef std::map<std::string, MathParser::MathFunc_t *>
funcType;
215 bool IsFunc(
const std::string& fname)
const;
247 virtual const char *
sName(
void)
const = 0;
248 virtual int Read(
int argc,
char *argv[]) = 0;
263 bool Const(
void)
const;
380 bool IsType(
const char*
const s)
const;
472 InsertSym(
const char*
const s,
const Real& v,
int redefine = 0);
474 InsertSym(
const char*
const s,
const Int& v,
int redefine = 0);
496 void GetForever(std::ostream& out,
const char*
const sep =
"\n");
498 const char*
const sep =
"\n");
void trim_arg(char *const s)
MathArgPriv_t< Real, AT_REAL > MathArgReal_t
TypedValue stmtlist(void)
virtual Table * GetTable(void)
TypedValue relational_int(TypedValue d)
NameSpace(const std::string &name)
MathParser(const MathParser &)
std::map< std::string, NameSpace * > NameSpaceMap
static const char ONE_LINE_REMARK
virtual ~MathArgVoid_t(void)
bool IsKeyWord(NameSpace *ns, const char *const s) const
#define MBDYN_EXCEPT_ARGS
NamedValue * InsertSym(const char *const s, const Real &v, int redefine=0)
bool IsDeclarationModifier(const char *const s) const
bool MayChange(void) const
int RegisterNameSpace(NameSpace *ns)
std::vector< MathArg_t * > MathArgs
MathArg_t(unsigned f=AF_NONE)
int(* MathFuncTest_f)(const MathArgs &args)
TypedValue binary_int(TypedValue d)
virtual ~MathArgPriv_t(void)
bool EE_Eval(TypedValue &dst, const ExpressionElement *ee)
MathArgPriv_t(const T &val, unsigned f=AF_NONE)
#define MBDYN_EXCEPT_ARGS_DECL
bool IsTypeModifier(const char *const s) const
void GetForever(std::ostream &out, const char *const sep="\n")
virtual MathArg_t * Copy(void) const
MathParser::PlugIn *(* constructor)(MathParser &, void *)
MathArgPriv_t< bool, AT_BOOL > MathArgBool_t
virtual MathArg_t * Copy(void) const
StaticNameSpace(Table *pTable=0)
MathParser::MathFunc_t * GetFunc(const std::string &fname) const
TypedValue::Type GetType(void) const
TypedValue power_int(TypedValue d)
enum Token GetToken(void)
int(* MathFunc_f)(const MathArgs &args)
bool IsType(const char *const s) const
MathArgPriv_t< TypedValue, AT_ANY > MathArgAny_t
MathParser::PlugIn * pgin
MathFunc_t(const MathFunc_t &in)
virtual MathParser::MathFunc_t * GetFunc(const std::string &fname) const =0
struct PlugInRegister * next
const T & operator()(void) const
virtual TypedValue EvalFunc(MathParser::MathFunc_t *f) const
StaticNameSpace * defaultNameSpace
TypedValue::TypeModifier GetTypeModifier(const char *const s) const
virtual const std::string & sGetName(void) const
void SetFlag(const MathParser::ArgFlag &f)
PlugInVar(const char *const s, MathParser::PlugIn *p)
const NameSpaceMap & GetNameSpaceMap(void) const
bool bNameValidate(const std::string &s) const
TypedValue evalfunc(MathParser::NameSpace *ns, MathParser::MathFunc_t *f)
TypedValue readplugin(void)
virtual TypedValue EvalFunc(MathParser::MathFunc_t *f) const =0
virtual ArgType Type(void) const
MathArgPriv_t< std::string, AT_STRING > MathArgString_t
int GetLineNumber(void) const
void ClearFlag(const MathParser::ArgFlag &f)
MathArgPriv_t< ArgType, AT_TYPE > MathArgType_t
NameSpace * GetNameSpace(const std::string &name) const
virtual MathArg_t * Copy(void) const =0
unsigned GetFlags(void) const
void TokenPush(enum Token t)
virtual const char * sName(void) const =0
virtual bool IsFunc(const std::string &fname) const =0
Real GetLastStmt(Real d=0., Token t=ARGSEP)
bool IsFunc(const std::string &fname) const
TypedValue logical_int(TypedValue d)
virtual TypedValue::Type GetType(void) const =0
void PutSymbolTable(Table &T)
virtual Table * GetTable(void)=0
bool IsFlag(const MathParser::ArgFlag f) const
virtual ArgType Type(void) const
TypedValue relational(void)
TypedValue mult_int(TypedValue d)
MathArgPriv_t< Int, AT_INT > MathArgInt_t
std::stack< TokenVal > TokenStack
virtual int Read(int argc, char *argv[])=0
MathParser::DeclarationModifier GetDeclarationModifier(const char *const s) const
TypedValue::Type GetType(const char *const s) const
int RegisterPlugIn(const char *name, MathParser::PlugIn *(*)(MathParser &, void *), void *arg)
NameSpaceMap nameSpaceMap
std::ostream & operator<<(std::ostream &out, const MathParser::MathArgVoid_t &v)
Table & GetSymbolTable(void) const
virtual TypedValue GetVal(void) const =0
std::map< std::string, MathParser::MathFunc_t * > funcType
ErrGeneric(const char *file, int line, const char *func, const std::string r=std::string())
TypedValue GetVal(void) const
virtual ArgType Type(void) const =0
struct MathParser::PlugInRegister * PlugIns