// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ParseClass.pas' rev: 5.00

#ifndef ParseClassHPP
#define ParseClassHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Classes.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <OObjects.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Parseclass
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TVarType { vtDouble, vtBoolean, vtString, vtLeftBracket, vtRightBracket, vtComma };
#pragma option pop

typedef double *PDouble;

class DELPHICLASS EParserException;
class PASCALIMPLEMENTATION EParserException : public Sysutils::Exception 
{
	typedef Sysutils::Exception inherited;
	
public:
	#pragma option push -w-inl
	/* Exception.Create */ inline __fastcall EParserException(const AnsiString Msg) : Sysutils::Exception(
		Msg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmt */ inline __fastcall EParserException(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateRes */ inline __fastcall EParserException(int Ident)/* overload */ : Sysutils::Exception(
		Ident) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmt */ inline __fastcall EParserException(int Ident, const System::TVarRec * 
		Args, const int Args_Size)/* overload */ : Sysutils::Exception(Ident, Args, Args_Size) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateHelp */ inline __fastcall EParserException(const AnsiString Msg, int AHelpContext
		) : Sysutils::Exception(Msg, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateFmtHelp */ inline __fastcall EParserException(const AnsiString Msg, const System::TVarRec 
		* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
		) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResHelp */ inline __fastcall EParserException(int Ident, int AHelpContext)/* overload */
		 : Sysutils::Exception(Ident, AHelpContext) { }
	#pragma option pop
	#pragma option push -w-inl
	/* Exception.CreateResFmtHelp */ inline __fastcall EParserException(System::PResStringRec ResStringRec
		, const System::TVarRec * Args, const int Args_Size, int AHelpContext)/* overload */ : Sysutils::Exception(
		ResStringRec, Args, Args_Size, AHelpContext) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~EParserException(void) { }
	#pragma option pop
	
};


struct TExpressionRec;
typedef TExpressionRec *PExpressionRec;

class DELPHICLASS TExprWord;
typedef void __fastcall (*TDoubleFunc)(PExpressionRec Expr);

class PASCALIMPLEMENTATION TExprWord : public System::TObject 
{
	typedef System::TObject inherited;
	
private:
	AnsiString FName;
	TDoubleFunc FDoubleFunc;
	
protected:
	virtual bool __fastcall GetIsOper(void);
	virtual AnsiString __fastcall GetAsString(void);
	bool __fastcall GetIsVariable(void);
	virtual TVarType __fastcall GetVarType(void);
	virtual int __fastcall GetNFunctionArg(void);
	
public:
	__fastcall TExprWord(AnsiString aName, TDoubleFunc ADoubleFunc);
	virtual PDouble __fastcall AsPointer(void);
	__property AnsiString AsString = {read=GetAsString};
	__property TDoubleFunc DoubleFunc = {read=FDoubleFunc};
	__property bool IsOper = {read=GetIsOper, nodefault};
	__property bool IsVariable = {read=GetIsVariable, nodefault};
	__property TVarType VarType = {read=GetVarType, nodefault};
	__property int NFunctionArg = {read=GetNFunctionArg, nodefault};
	__property AnsiString Name = {read=FName};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TExprWord(void) { }
	#pragma option pop
	
};


struct TArgsArray
{
	double Res;
	double *Args[4];
	TExprWord* ExprWord;
} ;

struct TExpressionRec
{
	TDoubleFunc Oper;
	TExpressionRec *Next;
	double Res;
	TExprWord* ExprWord;
	union
	{
		struct 
		{
			TExpressionRec *ArgList[4];
			
		};
		struct 
		{
			double *Args[4];
			
		};
		
	};
} ;

class DELPHICLASS TExprCollection;
class PASCALIMPLEMENTATION TExprCollection : public Oobjects::TNoOwnerCollection 
{
	typedef Oobjects::TNoOwnerCollection inherited;
	
public:
	int __fastcall NextOper(int IStart);
	void __fastcall Check(void);
	void __fastcall EraseExtraBrackets(void);
public:
	#pragma option push -w-inl
	/* TOCollection.Create */ inline __fastcall TExprCollection(int aCapacity) : Oobjects::TNoOwnerCollection(
		aCapacity) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TOCollection.Destroy */ inline __fastcall virtual ~TExprCollection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TExpressList;
class PASCALIMPLEMENTATION TExpressList : public Oobjects::TSortedCollection 
{
	typedef Oobjects::TSortedCollection inherited;
	
public:
	virtual void * __fastcall KeyOf(void * Item);
	virtual int __fastcall Compare(void * Key1, void * Key2);
public:
	#pragma option push -w-inl
	/* TSortedCollection.Create */ inline __fastcall TExpressList(int aCapacity) : Oobjects::TSortedCollection(
		aCapacity) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TOCollection.Destroy */ inline __fastcall virtual ~TExpressList(void) { }
	#pragma option pop
	
};


class DELPHICLASS TDoubleConstant;
class PASCALIMPLEMENTATION TDoubleConstant : public TExprWord 
{
	typedef TExprWord inherited;
	
private:
	double FValue;
	
public:
	virtual PDouble __fastcall AsPointer(void);
	__fastcall TDoubleConstant(AnsiString aName, AnsiString aValue);
	__fastcall TDoubleConstant(AnsiString aName, double aValue);
	__property double Value = {read=FValue, write=FValue};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TDoubleConstant(void) { }
	#pragma option pop
	
};


class DELPHICLASS TGeneratedVariable;
class PASCALIMPLEMENTATION TGeneratedVariable : public TDoubleConstant 
{
	typedef TDoubleConstant inherited;
	
private:
	AnsiString FAsString;
	TVarType FVarType;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
	virtual AnsiString __fastcall GetAsString(void);
	
public:
	__fastcall TGeneratedVariable(AnsiString aName);
	__property VarType  = {read=GetVarType, write=FVarType};
	__property AnsiString AsString = {read=GetAsString, write=FAsString};
public:
	#pragma option push -w-inl
	/* TDoubleConstant.CreateAsFloat */ inline __fastcall TGeneratedVariable(AnsiString aName, double aValue
		) : TDoubleConstant(aName, aValue) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TGeneratedVariable(void) { }
	#pragma option pop
	
};


class DELPHICLASS TDoubleVariable;
class PASCALIMPLEMENTATION TDoubleVariable : public TExprWord 
{
	typedef TExprWord inherited;
	
private:
	double *FValue;
	
public:
	virtual PDouble __fastcall AsPointer(void);
	__fastcall TDoubleVariable(AnsiString aName, PDouble aValue);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TDoubleVariable(void) { }
	#pragma option pop
	
};


class DELPHICLASS TStringConstant;
class PASCALIMPLEMENTATION TStringConstant : public TExprWord 
{
	typedef TExprWord inherited;
	
private:
	AnsiString FValue;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
	virtual AnsiString __fastcall GetAsString(void);
	
public:
	__fastcall TStringConstant(AnsiString aValue);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TStringConstant(void) { }
	#pragma option pop
	
};


class DELPHICLASS TLeftBracket;
class PASCALIMPLEMENTATION TLeftBracket : public TExprWord 
{
	typedef TExprWord inherited;
	
public:
	virtual TVarType __fastcall GetVarType(void);
public:
	#pragma option push -w-inl
	/* TExprWord.Create */ inline __fastcall TLeftBracket(AnsiString aName, TDoubleFunc ADoubleFunc) : 
		TExprWord(aName, ADoubleFunc) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TLeftBracket(void) { }
	#pragma option pop
	
};


class DELPHICLASS TRightBracket;
class PASCALIMPLEMENTATION TRightBracket : public TExprWord 
{
	typedef TExprWord inherited;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
public:
	#pragma option push -w-inl
	/* TExprWord.Create */ inline __fastcall TRightBracket(AnsiString aName, TDoubleFunc ADoubleFunc) : 
		TExprWord(aName, ADoubleFunc) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TRightBracket(void) { }
	#pragma option pop
	
};


class DELPHICLASS TComma;
class PASCALIMPLEMENTATION TComma : public TExprWord 
{
	typedef TExprWord inherited;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
public:
	#pragma option push -w-inl
	/* TExprWord.Create */ inline __fastcall TComma(AnsiString aName, TDoubleFunc ADoubleFunc) : TExprWord(
		aName, ADoubleFunc) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TComma(void) { }
	#pragma option pop
	
};


typedef AnsiString *PString;

class DELPHICLASS TStringVariable;
class PASCALIMPLEMENTATION TStringVariable : public TExprWord 
{
	typedef TExprWord inherited;
	
private:
	AnsiString *FValue;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
	virtual AnsiString __fastcall GetAsString(void);
	
public:
	__fastcall TStringVariable(AnsiString aName, PString aValue);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TStringVariable(void) { }
	#pragma option pop
	
};


class DELPHICLASS TFunction;
class PASCALIMPLEMENTATION TFunction : public TExprWord 
{
	typedef TExprWord inherited;
	
private:
	bool FIsOper;
	int FOperPrec;
	int FNFunctionArg;
	
protected:
	virtual bool __fastcall GetIsOper(void);
	virtual int __fastcall GetNFunctionArg(void);
	
public:
	__fastcall TFunction(AnsiString aName, TDoubleFunc ADoubleFunc, int aNFunctionArg);
	__fastcall TFunction(AnsiString aName, TDoubleFunc ADoubleFunc, int aNFunctionArg, bool aIsOper, int 
		aOperPrec);
	__property int OperPrec = {read=FOperPrec, nodefault};
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TFunction(void) { }
	#pragma option pop
	
};


class DELPHICLASS TBooleanFunction;
class PASCALIMPLEMENTATION TBooleanFunction : public TFunction 
{
	typedef TFunction inherited;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
public:
	#pragma option push -w-inl
	/* TFunction.Create */ inline __fastcall TBooleanFunction(AnsiString aName, TDoubleFunc ADoubleFunc
		, int aNFunctionArg) : TFunction(aName, ADoubleFunc, aNFunctionArg) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TFunction.CreateOper */ inline __fastcall TBooleanFunction(AnsiString aName, TDoubleFunc ADoubleFunc
		, int aNFunctionArg, bool aIsOper, int aOperPrec) : TFunction(aName, ADoubleFunc, aNFunctionArg, aIsOper
		, aOperPrec) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TBooleanFunction(void) { }
	#pragma option pop
	
};


#pragma option push -b-
enum TOper { op_eq, op_gt, op_lt, op_ge, op_le, op_ne };
#pragma option pop

class DELPHICLASS TLogicalStringOper;
class PASCALIMPLEMENTATION TLogicalStringOper : public TExprWord 
{
	typedef TExprWord inherited;
	
private:
	TOper Oper;
	TExprWord* FLeftArg;
	TExprWord* FRightArg;
	
protected:
	virtual TVarType __fastcall GetVarType(void);
	
public:
	__fastcall TLogicalStringOper(AnsiString aOper, TExprWord* aLeftArg, TExprWord* aRightArg);
	bool __fastcall Evaluate(void);
public:
	#pragma option push -w-inl
	/* TObject.Destroy */ inline __fastcall virtual ~TLogicalStringOper(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint maxArg = 0x4;
extern PACKAGE int Missing[2];
#pragma error Unsupported symbol type (4, FNan)
extern PACKAGE void __fastcall _Variable(PExpressionRec Param);
extern PACKAGE void __fastcall _LogString(PExpressionRec Param);

}	/* namespace Parseclass */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Parseclass;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// ParseClass
