SNAP Library 2.3, Developer Reference
2014-06-16 11:58:46
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <exp.h>
Public Member Functions | |
TExp (const TExpType &_ExpType=etUndef) | |
TExp (const TExpOp &_ExpOp, const PExp &Exp1, const PExp &Exp2=NULL, const PExp &Exp3=NULL) | |
TExp (const PExpVal &_ExpVal) | |
TExp (const TStr &_VarNm) | |
TExp (const TStr &_FuncNm, const TExpV &_ArgExpV) | |
~TExp () | |
TExp (TSIn &SIn) | |
void | Save (TSOut &SOut) const |
TExp & | operator= (const TExp &) |
bool | operator== (const TExp &) const |
void | SaveTxt (TOLx &Lx) const |
void | SaveTxt (const PSOut &SOut) const |
TStr | GetStr () const |
TStr | GetTopObjNm () const |
int | GetArgExps () const |
TStr | GetArgExpStr (const int &ArgExpN) const |
PExpVal | Eval (bool &Ok, TStr &MsgStr, const bool &DbgP, TStr &DbgStr, const PExpEnv &ExpEnv=TExpEnv::DfExpEnv) |
PExpVal | Eval (const PExpEnv &ExpEnv=TExpEnv::DfExpEnv) |
PExpVal | Eval (bool &Ok, TStr &MsgStr, const PExpEnv &ExpEnv=TExpEnv::DfExpEnv) |
PExpVal | Eval (const PExpEnv &ExpEnv, const bool &DbgP, TStr &DbgStr) |
Static Public Member Functions | |
static PExp | Load (TSIn &SIn) |
static bool | IsExpStrOk (const TStr &ExpStr, TStr &MsgStr) |
static PExp | LoadTxt (const PSIn &SIn, bool &Ok, TStr &MsgStr, const TFSet &Expect=TFSet()|syEof) |
static PExp | LoadTxt (const TStr &ExpStr, bool &Ok, TStr &MsgStr) |
static PExp | LoadTxt (const TStr &ExpStr) |
static PExpVal | LoadAndEvalExpL (const TStr &ExpLStr, bool &Ok, TStr &MsgStr, const PExpEnv &ExpEnv=TExpEnv::DfExpEnv) |
static TStr | GetExpTypeStr (const TExpType &ExpType) |
static TStr | GetExpOpStr (const TExpOp &ExpOp) |
static void | GetBiDescV (TStrPrV &BiDescV) |
Private Member Functions | |
void | SaveTxtOp (TOLx &Lx) const |
PExpVal | EvalExpOp (const PExpEnv &ExpEnv, const bool &DbgP, TChA &DbgChA) |
PExpVal | EvalExp (const PExpEnv &ExpEnv, const bool &DbgP, TChA &DbgChA) |
Static Private Member Functions | |
static TExpOp | GetExpOpFromLxSym (const TLxSym &LxSym) |
static TLxSym | GetLxSymFromExpOp (const TExpOp &ExpOp) |
static PExp | LoadTxtFact (TILx &Lx, const TFSet &Expect) |
static PExp | LoadTxtMulExp (TILx &Lx, const TFSet &Expect) |
static PExp | LoadTxtAddExp (TILx &Lx, const TFSet &Expect) |
static PExp | LoadTxtRelExp (TILx &Lx, const TFSet &Expect) |
static PExp | LoadTxtExp (TILx &Lx, const TFSet &Expect) |
Private Attributes | |
TCRef | CRef |
TInt | ExpType |
TBool | IsParen |
PExpVal | ExpVal |
TStr | ExpNm |
TInt | ExpOp |
TInt | ExpBiId |
TExpV | ArgExpV |
Static Private Attributes | |
static TExpBi | ExpBi |
static const TFSet | MulOpSymSet |
static const TFSet | UAddOpSymSet |
static const TFSet | AddOpSymSet |
static const TFSet | RelOpSymSet |
static const TFSet | FactExpExpect |
static const TFSet | MulExpExpect |
static const TFSet | AddExpExpect |
static const TFSet | RelExpExpect |
static const TFSet | ExpExpect |
Friends | |
class | TPt< TExp > |
Definition at line 213 of file exp.h.
Referenced by LoadAndEvalExpL(), LoadTxt(), LoadTxtAddExp(), LoadTxtExp(), LoadTxtFact(), LoadTxtMulExp(), and LoadTxtRelExp().
TExp::TExp | ( | const TExpOp & | _ExpOp, |
const PExp & | Exp1, | ||
const PExp & | Exp2 = NULL , |
||
const PExp & | Exp3 = NULL |
||
) |
Definition at line 771 of file exp.cpp.
References TVec< TVal, TSizeTy >::Add(), ArgExpV, and TPt< TRec >::Empty().
TExp::TExp | ( | const TStr & | _VarNm | ) |
PExpVal TExp::Eval | ( | bool & | Ok, |
TStr & | MsgStr, | ||
const bool & | DbgP, | ||
TStr & | DbgStr, | ||
const PExpEnv & | ExpEnv = TExpEnv::DfExpEnv |
||
) |
Definition at line 898 of file exp.cpp.
References EvalExp(), ExpVal, TExpVal::GetStr(), GetStr(), and TExpVal::GetUndefExpVal().
|
inline |
Definition at line 253 of file exp.h.
|
inline |
Definition at line 256 of file exp.h.
Definition at line 258 of file exp.h.
Definition at line 517 of file exp.cpp.
References TExpVal::AddToLst(), TExpVal::AddToVec(), ArgExpV, etBiConst, etBiFunc, etFunc, etLst, etOp, etUndef, etVal, etVar, etVec, EvalExpOp(), evtLst, evtVec, ExpBi, ExpBiId, ExpNm, ExpType, ExpVal, Fail, TExpBi::GetBiConstVal(), TExpBi::GetBiFuncVal(), GetExpTypeStr(), TExpVal::GetStr(), TStr::GetUc(), TExpVal::GetUndefExpVal(), TVec< TVal, TSizeTy >::Len(), TExpVal::New(), and TExcept::Throw().
Referenced by Eval().
Definition at line 377 of file exp.cpp.
References ArgExpV, eoAnd, eoDiv, eoEq, eoGEq, eoGtr, eoIDiv, eoIf, eoLEq, eoLss, eoMinus, eoMod, eoMul, eoNEq, eoNot, eoOr, eoPlus, eoUMinus, eoUPlus, evtFlt, evtStr, ExpOp, ExpVal, Fail, GetExpOpStr(), TExpVal::GetFltVal(), TExpVal::GetFltValAsInt(), TExpVal::GetStr(), TExpVal::GetStrVal(), TExpVal::GetValType(), TExpVal::GetZeroExpVal(), TExpVal::New(), and TExcept::Throw().
Referenced by EvalExp().
int TExp::GetArgExps | ( | ) | const |
Definition at line 890 of file exp.cpp.
References ArgExpV, and TVec< TVal, TSizeTy >::Len().
TStr TExp::GetArgExpStr | ( | const int & | ArgExpN | ) | const |
|
static |
Definition at line 967 of file exp.cpp.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Clr().
Definition at line 606 of file exp.cpp.
References eoAnd, eoDiv, eoEq, eoGEq, eoGtr, eoIDiv, eoIf, eoLEq, eoLss, eoMinus, eoMod, eoMul, eoNEq, eoNot, eoOr, eoPlus, eoUndef, Fail, syAmpersand, syAsterisk, syEq, syExclamation, syGEq, syGtr, syHash, syLEq, syLss, syMinus, syNEq, syPercent, syPlus, syQuestion, sySlash, and syVBar.
Referenced by LoadTxtAddExp(), LoadTxtExp(), LoadTxtMulExp(), and LoadTxtRelExp().
Definition at line 266 of file exp.h.
References GetLxSymFromExpOp(), and TLxSymStr::GetSymStr().
Referenced by EvalExpOp(), and GetTopObjNm().
Definition at line 628 of file exp.cpp.
References eoAnd, eoDiv, eoEq, eoGEq, eoGtr, eoIDiv, eoIf, eoLEq, eoLss, eoMinus, eoMod, eoMul, eoNEq, eoNot, eoOr, eoPlus, eoUMinus, eoUPlus, Fail, syAmpersand, syAsterisk, syEq, syExclamation, syGEq, syGtr, syHash, syLEq, syLss, syMinus, syNEq, syPercent, syPlus, syQuestion, sySlash, syUndef, and syVBar.
Referenced by GetExpOpStr(), and SaveTxtOp().
TStr TExp::GetStr | ( | ) | const |
Definition at line 865 of file exp.cpp.
References TMOut::GetSIn(), TStr::LoadTxt(), TMOut::New(), and SaveTxt().
Referenced by Eval().
TStr TExp::GetTopObjNm | ( | ) | const |
Definition at line 234 of file exp.h.
|
static |
Definition at line 918 of file exp.cpp.
References etUndef, ExpExpect, ExpVal, TILx::GetSym(), iloCmtAlw, iloCsSens, iloExcept, LoadTxtExp(), TStrIn::New(), syEof, TILx::Sym, sySemicolon, and TExp().
|
static |
Definition at line 808 of file exp.cpp.
References etUndef, ExpExpect, TILx::GetSym(), iloCmtAlw, iloCsSens, iloExcept, LoadTxtExp(), and TExp().
Definition at line 238 of file exp.h.
References TStrIn::New().
Definition at line 240 of file exp.h.
Definition at line 704 of file exp.cpp.
References AddOpSymSet, eoUMinus, eoUndef, eoUPlus, ExpOp, GetExpOpFromLxSym(), TILx::GetSym(), TFSet::In(), LoadTxtMulExp(), MulExpExpect, TILx::Sym, syMinus, syPlus, and TExp().
Referenced by LoadTxtRelExp().
Definition at line 731 of file exp.cpp.
References ExpExpect, ExpOp, GetExpOpFromLxSym(), TILx::GetSym(), LoadTxtRelExp(), syColon, TILx::Sym, syQuestion, and TExp().
Referenced by LoadAndEvalExpL(), LoadTxt(), and LoadTxtFact().
Definition at line 652 of file exp.cpp.
References TVec< TVal, TSizeTy >::Add(), ArgExpV, ExpExpect, ExpNm, ExpVal, Fail, TILx::Flt, TILx::GetSym(), LoadTxtExp(), TExpVal::New(), TILx::Str, syComma, syFlt, syIdStr, syLParen, TILx::Sym, syQStr, syRParen, and TExp().
Referenced by LoadTxtMulExp().
Definition at line 693 of file exp.cpp.
References ExpOp, FactExpExpect, GetExpOpFromLxSym(), TILx::GetSym(), TFSet::In(), LoadTxtFact(), MulOpSymSet, TILx::Sym, and TExp().
Referenced by LoadTxtAddExp().
Definition at line 720 of file exp.cpp.
References AddExpExpect, ExpOp, GetExpOpFromLxSym(), TILx::GetSym(), TFSet::In(), LoadTxtAddExp(), RelOpSymSet, TILx::Sym, and TExp().
Referenced by LoadTxtExp().
|
inline |
void TExp::SaveTxt | ( | TOLx & | Lx | ) | const |
Definition at line 823 of file exp.cpp.
References ArgExpV, etBiConst, etBiFunc, etFunc, etLst, etOp, etVal, etVar, etVec, ExpNm, ExpType, ExpVal, Fail, IsParen, TVec< TVal, TSizeTy >::Len(), TOLx::PutIdStr(), TOLx::PutSym(), TExpVal::SaveTxt(), SaveTxtOp(), syComma, syLBrace, syLBracket, syLParen, syRBrace, syRBracket, and syRParen.
Referenced by GetStr().
|
private |
Definition at line 744 of file exp.cpp.
References ArgExpV, eoAnd, eoDiv, eoEq, eoGEq, eoGtr, eoIDiv, eoIf, eoLEq, eoLss, eoMinus, eoMod, eoMul, eoNEq, eoNot, eoOr, eoPlus, eoUMinus, eoUPlus, etOp, ExpOp, ExpType, Fail, GetLxSymFromExpOp(), IAssert, TOLx::PutSym(), and syColon.
Referenced by SaveTxt().
|
staticprivate |
Definition at line 198 of file exp.h.
Referenced by LoadTxtRelExp().
|
staticprivate |
Definition at line 197 of file exp.h.
Referenced by LoadTxtAddExp().
|
private |
Definition at line 195 of file exp.h.
Referenced by EvalExp(), EvalExpOp(), GetArgExps(), GetArgExpStr(), LoadTxtFact(), SaveTxt(), SaveTxtOp(), and TExp().
|
staticprivate |
|
private |
|
staticprivate |
Definition at line 199 of file exp.h.
Referenced by LoadAndEvalExpL(), LoadTxt(), LoadTxtExp(), and LoadTxtFact().
|
private |
Definition at line 192 of file exp.h.
Referenced by EvalExp(), GetTopObjNm(), LoadTxtFact(), SaveTxt(), and TExp().
|
private |
Definition at line 193 of file exp.h.
Referenced by EvalExpOp(), GetTopObjNm(), LoadTxtAddExp(), LoadTxtExp(), LoadTxtMulExp(), LoadTxtRelExp(), and SaveTxtOp().
|
private |
Definition at line 189 of file exp.h.
Referenced by EvalExp(), GetTopObjNm(), SaveTxt(), SaveTxtOp(), and TExp().
|
private |
Definition at line 191 of file exp.h.
Referenced by Eval(), EvalExp(), EvalExpOp(), LoadAndEvalExpL(), LoadTxtFact(), and SaveTxt().
|
staticprivate |
Definition at line 198 of file exp.h.
Referenced by LoadTxtMulExp().
|
staticprivate |
Definition at line 198 of file exp.h.
Referenced by LoadTxtAddExp().
|
staticprivate |
Definition at line 197 of file exp.h.
Referenced by LoadTxtMulExp().
|
staticprivate |
Definition at line 197 of file exp.h.
Referenced by LoadTxtRelExp().