// FunParser.h: interface for the FunParser class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_FUNPARSER_H__E4C2201A_2B3B_46FE_AE7B_F3BE6EECA4DF__INCLUDED_) #define AFX_FUNPARSER_H__E4C2201A_2B3B_46FE_AE7B_F3BE6EECA4DF__INCLUDED_ #include "FunToken.h" #include "General.h" #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class FunParser { public: FunParser(); virtual ~FunParser(); BOOL ParseHeader(CString &FunStream,CString &Error,CCptList *pCptList); BOOL ParseBody(CString &FunStream,CString &Error,CCptList *pCptList); private: FunToken TokenObj;//object from tokenizer int OutputType; //-1->initial 1->number 2->date int BodyType; //-1->initial 1->number 2->date int MathBuiltFun; //flag show there is math function(abs,...) or not static int f;//flag initial value=-1 //f(flag=>last state in finite state Machine) //0->'cpt.prop' 1->operator 2->'(' 3->')' 4->'fun' 5->'number or date' void Reset(); BOOL Parse_CPT_PROP(CString &FunStream,CString &Cpt,CString &Prop,CString &Error); BOOL ParseBuilt(CString &FunStream,CString &Fun,CString &Error,CCptList *pCptList); BOOL ParseMath(CString &FunStream,CString &Error,CCptList *pCptList); BOOL ParseDate(CString &FunStream,CString &Error,CCptList *pCptList); }; #endif // !defined(AFX_FUNPARSER_H__E4C2201A_2B3B_46FE_AE7B_F3BE6EECA4DF__INCLUDED_)