 |
|
 |
 |
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLAISCRIPT::CCompilateur Class ReferenceThis class define compilation of a source code.
More...
#include <compilateur.h>
Inheritance diagram for NLAISCRIPT::CCompilateur
[legend]Collaboration diagram for NLAISCRIPT::CCompilateur:
[legend]List of all members.
Public Methods |
| | CCompilateur (NLAIC::IIO &Iterface,const char *str, sint32 size, IScriptDebugSource* fileName) |
| | The perser need an IO interface, an source code here defined by const char *str and sint32 size. More...
|
| | CCompilateur (NLAIC::IIO &Iterface,const char *str, IScriptDebugSource* fileName) |
| | The perser need an IO interface, an source code here defined by const char *str which it define a file name. More...
|
| void | InitFromFile (const char *FileName) |
| | Initialize source code from file. More...
|
| NLAIAGENT::IObjectIA* | getVar (const char *name) |
| | get the locale variable define by name. More...
|
| void | InitStream (char *str, sint32 size) |
| | Initialize the std::stream. More...
|
| virtual | ~CCompilateur () |
| virtual int | yywrap () |
| | This function is needed by the lex parser for initializ the read stream (see lex documment). More...
|
| void | cleanTypeList () |
| | Clean internal list. More...
|
| void | clean () |
| | Initialize variable befor parsing. More...
|
| void | cleanMethodConstraint () |
| | Initialisze the constraint. More...
|
| void | cleanTypeConstraint () |
| virtual NLAIAGENT::IObjectIA::CProcessResult | Compile () |
| | This method generate compiled code. More...
|
| int | yyparse () |
| | Yacc parser.
|
| void | Echo (char *Er,...) |
| | Same as printf but out put is made to the IO interface. More...
|
| void | yyerror (char *Er) |
| | Occur when there are a parse error. More...
|
| bool | parseError () |
| | You can use this to consult the state of the parser. More...
|
| CFunctionTag | findMethode (const NLAIAGENT::IObjectIA *baseClass,NLAIAGENT::IBaseGroupType &listName,const CParam ¶m) |
| | Find a method in a class define by the baseClass pointer. More...
|
| CFunctionTag | findMethode (NLAIAGENT::IBaseGroupType &listName,const CParam ¶m) |
| | Find a method the last class mounted by the parser. More...
|
| sint32 | isValidateVarName (const NLAIAGENT::IObjectIA *baseClass,std::list<sint32> &ref,std::list<NLAISCRIPT::CStringType> &nameHierarchy,IOpType *&type) |
| | Search if a member variable is validete for a class defined by baseClass. More...
|
| sint32 | isValidateVarName (std::list<sint32> &ref,std::list<NLAISCRIPT::CStringType> &nameHierarchy,IOpType *&type) |
| | Search if a member variable is validete in the lase class parsed. More...
|
| void | setDebugMode (bool bmode) |
| | Set the Debug Mode. More...
|
| bool | getDebugMode () const |
| | Get the debug state. More...
|
| const NLAIAGENT::IObjectIA* | validateHierarchyMethode (std::list<sint32> &,sint32 &,const NLAIAGENT::IObjectIA *,NLAIAGENT::IBaseGroupType &listName) |
Protected Methods |
| NLAIC::CIdentType | getTypeOfClass (const NLAIAGENT::IVarName &className) |
| | throw (NLAIE::IException). More...
|
| CCodeBrancheRun* | getCode (bool isMain = false) |
| | throw (NLAIE::IException). More...
|
| sint32 | runTypeConstraint () |
| sint32 | runMethodConstraint () |
| void | errorMethodConstraint () |
| void | errorTypeConstraint () |
| sint32 | getNMethodConstraint () |
| NLAIAGENT::CIdMethod | findMethode (sint32 inheritance,NLAIAGENT::CStringType *baseName,const NLAIAGENT::IObjectIA *className,const NLAIAGENT::IVarName &methodeName,const CParam ¶m) |
| const IClassInterpret* | getInheritanceRange (sint32 &,const IClassInterpret *,NLAIAGENT::IBaseGroupType &) const |
| const IClassInterpret* | getInheritanceRange (sint32 &,const IClassInterpret *,const NLAIAGENT::IVarName &) const |
| sint32 | findMethodei (NLAIAGENT::IBaseGroupType &listName,const CParam ¶m) |
| virtual void | setNewLine () |
| | Tell the _lastBlock about a newLine (for Debug). More...
|
| sint32 | castVariable (const NLAIAGENT::CStringVarName&,NLAIAGENT::CStringVarName&) |
| void | ifInterrogation () |
| void | ifInterrogationPoint () |
| void | ifInterrogationEnd () |
| void | interrogationEnd () |
| sint32 | affectation () |
| sint32 | processingVar () |
| void | allocExpression (IOpCode *op,bool gd = false) |
| bool | computContraint () |
| void | RegisterClass () |
| sint32 | affectationMember (sint32 member) |
| sint32 | affectationMember (IClassInterpret *,sint32 member) |
| sint32 | affectationiMember (const IClassInterpret *baseClass,std::list<NLAISCRIPT::CStringType> &varHName) |
| sint32 | PrivateError () |
| const NLAIAGENT::IObjectIA* | getValidateHierarchyBase (std::list<sint32> &ref,sint32 &h,std::list<NLAISCRIPT::CStringType> &listName) |
| const NLAIAGENT::IObjectIA* | getValidateHierarchyBase (const NLAIAGENT::IObjectIA *base,std::list<sint32> &ref,sint32 &h,std::list<NLAISCRIPT::CStringType> &listName) |
| void | nameMethodeProcessing () |
| void | initParam () |
| bool | registerMethod () |
| IConstraint* | getMethodConstraint (const NLAIAGENT::IBaseGroupType &g,const CParam &p) const |
| IConstraint* | getMethodConstraint (const IConstraint &c) const |
| sint32 | typeOfMethod () |
| bool | setParamVarName () |
| void | pushParamExpression () |
| void | setImediateVar () |
| void | setImediateVarNill () |
| void | setPerformative (NLAIAGENT::IMessageBase::TPerformatif p) |
| void | setListVar () |
| void | setChaineVar () |
| void | setStackVar (const NLAIC::CIdentType &) |
| void | setMethodVar () |
| bool | buildObject () |
| void | setTypeExpression () |
| void | setTypeExpression (NLAIC::CTypeOfOperator::TTypeOp op,const char *txtOp) |
| void | setTypeExpressionG () |
| void | setTypeExpressionD (NLAIC::CTypeOfOperator::TTypeOp op,const char *txtOp) |
| bool | callFunction () |
| void | callSend () |
| void | initMessageManager () |
| bool | endMessageManager () |
| bool | caseRunMsg () |
| bool | classIsAnOperator () |
| | Logic compilation. More...
|
| void | CompileFactPattern () |
| void | CompileOperator () |
Private Types |
typedef std::pair<NLAIAGENT::IVarName *,
NLAIAGENT::IObjectIA *> | pairType |
| | This define is use for define an argument of a method in the language. More...
|
Private Attributes |
| std::istrstream* | _StreamBuffer |
| | Stream that contain source code. More...
|
| NLAIC::IIO& | _Iterface |
| | IO for set out text or for get an input. More...
|
| CFactorType | _LastFact |
| | Type of last statement. More...
|
| IBlock* | _LastBloc |
| | Laste code parsed. More...
|
| NLAIAGENT::CStringVarName | _LastString |
| | Last string. More...
|
| NLAIAGENT::CStringVarName | _LastBaseObjectDef |
| bool | _BaseObjectDef |
| CListClass | _SelfClass |
| | List of class define in the souce code. More...
|
| std::list<IBlock*> | _LastSaveBloc |
| | temporary code parsed for code manager. More...
|
| std::list<IBlock*> | _LastBloc1 |
| std::list<IBlock*> | _LastBloc2 |
| std::list<IBlock*> | _LastBloc3 |
| NLAIAGENT::IObjectIA* | _LastAffectation |
| | Last affected variable. More...
|
| CIndexStackPointer | _VarState |
| | This variable allow to simulate the heap allocation. More...
|
| CStackPointer | _Stack |
| CStackPointer | _Heap |
| std::list<NLAISCRIPT::CStringType> | _LasVarStr |
| std::list<NLAISCRIPT::CStringType> | _LasAffectationVarStr |
| std::list<IOpType *> | _TypeList |
| bool | _Error |
| sint32 | _LastRegistered |
| std::list<pairType> | _Attrib |
| sint32 | _DecalageHeap |
| std::list<IConstraint *> | _MethodConstraint |
| std::list<IConstraint *> | _ConstraintType |
| std::list<NLAIAGENT::IBaseGroupType *> | _LastStringParam |
| std::list<CParam *> | _Param |
| std::list<NLAIAGENT::CStringVarName > | _MethodName |
| IOpType* | _ExpressionType |
| IOpType* | _FlotingExpressionType |
| std::list<IOpType *> | _ExpressionTypeTmp |
| std::list<IOpType *> | _ExpressionOp |
| bool | _IsFacteurIsExpression |
| bool | _FacteurEval |
| bool | _IsVoid |
| sint32 | _LastPosHeap |
| sint32 | _LastTypeCall |
| IConstraint* | _LastbaseClass |
| bool | _Debug |
| IScriptDebugSource* | _SourceFileName |
| NLAIAGENT::IObjectIA* | _ResultCompile |
std::list< std::list<const
NLAIAGENT::IVarName *> > | _LastLogicParams |
| std::list<const NLAIAGENT::CStringVarName *> | _LastBooleanConds |
| std::list<NLAIAGENT::CStringVarName *> | _LastFuzzyConds |
| std::list<const NLAIAGENT::CStringVarName *> | _LastAsserts |
| std::list<IOpCode *> | _LastCodeBranche |
| NLAILOGIC::CFactBase* | _FactBase |
| NLAILOGIC::CFactPattern* | _LastFactPattern |
| NLAIAGENT::IVarName* | _Goal |
| std::list<NLAIFUZZY::CFuzzyVar *> | _FuzzVars |
| sint32 | _LastFVarIndex |
| sint32 | _NbLogicParams |
| bool | _InLineParse |
| std::list<bool> | _FromStack |
| tDicoStr* | _Dictionary |
| bool | isRunMsg |
| bool | haveReturn |
Detailed Description
This class define compilation of a source code.
He is heritage come from the lex parser. -
Author(s):
-
Chafik sameh , Robert Gabriel , Nevrax France
-
Date:
-
2000
Definition at line 125 of file compilateur.h.
Member Typedef Documentation
|
|
This define is use for define an argument of a method in the language.
Definition at line 129 of file compilateur.h. |
Constructor & Destructor Documentation
|
|
The perser need an IO interface, an source code here defined by const char *str and sint32 size.
Remark that the const char* fileName variable is necessary for the debug code version.
Definition at line 205 of file compilateur.h. |
|
|
The perser need an IO interface, an source code here defined by const char *str which it define a file name.
Remark that the const char* fileName variable is necessary for the debug code version.
Definition at line 240 of file compilateur.h. |
|
NLAISCRIPT::CCompilateur::~CCompilateur (
|
) [inline, virtual]
|
|
Member Function Documentation
|
void NLAISCRIPT::CCompilateur::CompileFactPattern (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::CompileOperator (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::Echo (
|
char * Er,
|
|
... )
|
|
|
|
Same as printf but out put is made to the IO interface.
Definition at line 73 of file compilateur.cpp. |
|
void NLAISCRIPT::CCompilateur::InitFromFile (
|
const char * FileName ) [inline]
|
|
|
void NLAISCRIPT::CCompilateur::InitStream (
|
char * str,
|
|
sint32 size ) [inline]
|
|
|
sint32 NLAISCRIPT::CCompilateur::PrivateError (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::RegisterClass (
|
) [protected]
|
|
|
sint32 NLAISCRIPT::CCompilateur::affectation (
|
) [protected]
|
|
|
sint32 NLAISCRIPT::CCompilateur::affectationMember (
|
sint32 member ) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::allocExpression (
|
IOpCode * op,
|
|
bool gd = false ) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::buildObject (
|
) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::callFunction (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::callSend (
|
) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::caseRunMsg (
|
) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::classIsAnOperator (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::clean (
|
)
|
|
|
void NLAISCRIPT::CCompilateur::cleanMethodConstraint (
|
)
|
|
|
void NLAISCRIPT::CCompilateur::cleanTypeConstraint (
|
)
|
|
|
void NLAISCRIPT::CCompilateur::cleanTypeList (
|
)
|
|
|
bool NLAISCRIPT::CCompilateur::computContraint (
|
) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::endMessageManager (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::errorMethodConstraint (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::errorTypeConstraint (
|
) [protected]
|
|
|
|
Find a method the last class mounted by the parser.
Method is define by a name or hiarchie name (a hiarchie name is a list same as [myBaseClass myClass myMethod] here it define the string myBaseClass.myClass.myMethod()). param is a CParam object where it define the argument type of the method.
Definition at line 129 of file compilateur.cpp. |
|
|
Find a method in a class define by the baseClass pointer.
Method is define by a name or hiarchie name (a hiarchie name is a list same as [myBaseClass myClass myMethod] here it define the string myBaseClass.myClass.myMethod()). param is a CParam object where it define the argument type of the method.
Definition at line 134 of file compilateur.cpp. |
|
CCodeBrancheRun * NLAISCRIPT::CCompilateur::getCode (
|
bool isMain = false ) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::getDebugMode (
|
) const [inline]
|
|
|
sint32 NLAISCRIPT::CCompilateur::getNMethodConstraint (
|
) [inline, protected]
|
|
|
|
get the locale variable define by name.
Definition at line 287 of file compilateur.h. |
|
void NLAISCRIPT::CCompilateur::ifInterrogation (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::ifInterrogationEnd (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::ifInterrogationPoint (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::initMessageManager (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::initParam (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::interrogationEnd (
|
) [protected]
|
|
|
|
Search if a member variable is validete in the lase class parsed.
The variable is define by a CStringType hiarchie name in the nameHierarchy argument (a hiarchie name is a list same as [myBaseClass myClass myVariable] where it define the string myBaseClass.myClass.myVariable = 5). If the var name is validate then ref contain how to make reference and type containe the type of the attribut.
Definition at line 379 of file yacc.cpp. |
|
|
Search if a member variable is validete for a class defined by baseClass.
The variable is define by a CStringType hiarchie name in the nameHierarchy argument (a hiarchie name is a list same as [myBaseClass myClass myVariable] where it define the string myBaseClass.myClass.myVariable = 5). If the var name is validate then ref contain how to make reference and type containe the type of the attribut.
Definition at line 384 of file yacc.cpp. |
|
void NLAISCRIPT::CCompilateur::nameMethodeProcessing (
|
) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::parseError (
|
) [inline]
|
|
|
|
You can use this to consult the state of the parser.
Definition at line 369 of file compilateur.h. |
|
sint32 NLAISCRIPT::CCompilateur::processingVar (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::pushParamExpression (
|
) [protected]
|
|
|
bool NLAISCRIPT::CCompilateur::registerMethod (
|
) [protected]
|
|
|
sint32 NLAISCRIPT::CCompilateur::runMethodConstraint (
|
) [protected]
|
|
|
sint32 NLAISCRIPT::CCompilateur::runTypeConstraint (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setChaineVar (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setDebugMode (
|
bool bmode ) [inline]
|
|
|
void NLAISCRIPT::CCompilateur::setImediateVar (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setImediateVarNill (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setListVar (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setMethodVar (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setNewLine (
|
) [protected, virtual]
|
|
|
bool NLAISCRIPT::CCompilateur::setParamVarName (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setStackVar (
|
const NLAIC::CIdentType & type ) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setTypeExpression (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::setTypeExpressionG (
|
) [protected]
|
|
|
sint32 NLAISCRIPT::CCompilateur::typeOfMethod (
|
) [protected]
|
|
|
void NLAISCRIPT::CCompilateur::yyerror (
|
char * Er ) [inline]
|
|
|
|
Occur when there are a parse error.
Definition at line 358 of file compilateur.h. |
|
int NLAISCRIPT::CCompilateur::yyparse (
|
)
|
|
|
int NLAISCRIPT::CCompilateur::yywrap (
|
) [inline, virtual]
|
|
Member Data Documentation
std::list< pairType > NLAISCRIPT::CCompilateur::_Attrib [private]
|
|
bool NLAISCRIPT::CCompilateur::_BaseObjectDef [private]
|
|
std::list< IConstraint *> NLAISCRIPT::CCompilateur::_ConstraintType [private]
|
|
bool NLAISCRIPT::CCompilateur::_Debug [private]
|
|
sint32 NLAISCRIPT::CCompilateur::_DecalageHeap [private]
|
|
tDicoStr * NLAISCRIPT::CCompilateur::_Dictionary [private]
|
|
bool NLAISCRIPT::CCompilateur::_Error [private]
|
|
std::list< IOpType *> NLAISCRIPT::CCompilateur::_ExpressionOp [private]
|
|
IOpType * NLAISCRIPT::CCompilateur::_ExpressionType [private]
|
|
std::list< IOpType *> NLAISCRIPT::CCompilateur::_ExpressionTypeTmp [private]
|
|
bool NLAISCRIPT::CCompilateur::_FacteurEval [private]
|
|
IOpType * NLAISCRIPT::CCompilateur::_FlotingExpressionType [private]
|
|
std::list< bool > NLAISCRIPT::CCompilateur::_FromStack [private]
|
|
bool NLAISCRIPT::CCompilateur::_InLineParse [private]
|
|
bool NLAISCRIPT::CCompilateur::_IsFacteurIsExpression [private]
|
|
bool NLAISCRIPT::CCompilateur::_IsVoid [private]
|
|
NLAIC::IIO & NLAISCRIPT::CCompilateur::_Iterface [private]
|
|
|
|
IO for set out text or for get an input.
Definition at line 135 of file compilateur.h. |
IBlock * NLAISCRIPT::CCompilateur::_LastBloc [private]
|
|
std::list< IBlock *> NLAISCRIPT::CCompilateur::_LastBloc1 [private]
|
|
std::list< IBlock *> NLAISCRIPT::CCompilateur::_LastBloc2 [private]
|
|
std::list< IBlock *> NLAISCRIPT::CCompilateur::_LastBloc3 [private]
|
|
std::list< IOpCode *> NLAISCRIPT::CCompilateur::_LastCodeBranche [private]
|
|
sint32 NLAISCRIPT::CCompilateur::_LastFVarIndex [private]
|
|
CFactorType NLAISCRIPT::CCompilateur::_LastFact [private]
|
|
std::list< std::list< const NLAIAGENT::IVarName *> > NLAISCRIPT::CCompilateur::_LastLogicParams [private]
|
|
sint32 NLAISCRIPT::CCompilateur::_LastPosHeap [private]
|
|
sint32 NLAISCRIPT::CCompilateur::_LastRegistered [private]
|
|
std::list< IBlock *> NLAISCRIPT::CCompilateur::_LastSaveBloc [private]
|
|
|
|
temporary code parsed for code manager.
Definition at line 146 of file compilateur.h. |
sint32 NLAISCRIPT::CCompilateur::_LastTypeCall [private]
|
|
IConstraint * NLAISCRIPT::CCompilateur::_LastbaseClass [private]
|
|
std::list< IConstraint *> NLAISCRIPT::CCompilateur::_MethodConstraint [private]
|
|
sint32 NLAISCRIPT::CCompilateur::_NbLogicParams [private]
|
|
std::list< CParam *> NLAISCRIPT::CCompilateur::_Param [private]
|
|
CListClass NLAISCRIPT::CCompilateur::_SelfClass [private]
|
|
|
|
List of class define in the souce code.
Definition at line 144 of file compilateur.h. |
std::istrstream * NLAISCRIPT::CCompilateur::_StreamBuffer [private]
|
|
std::list< IOpType *> NLAISCRIPT::CCompilateur::_TypeList [private]
|
|
|
|
This variable allow to simulate the heap allocation.
Definition at line 150 of file compilateur.h. |
bool NLAISCRIPT::CCompilateur::haveReturn [private]
|
|
bool NLAISCRIPT::CCompilateur::isRunMsg [private]
|
|
The documentation for this class was generated from the following files:
|
 |