From fa92605225a2702faba3857376f79bcb9ec9d1f7 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 31 Dec 2015 14:44:19 +0100 Subject: [PATCH] Renamed some CBotInstr classes --- src/CBot/CBotClass.cpp | 2 +- src/CBot/CBotExternalCall.cpp | 2 +- src/CBot/CBotInstr/CBotCase.cpp | 5 +- .../{CBotInstArray.cpp => CBotDefArray.cpp} | 22 ++-- .../{CBotInstArray.h => CBotDefArray.h} | 8 +- .../{CBotBoolean.cpp => CBotDefBoolean.cpp} | 27 ++--- .../{CBotBoolean.h => CBotDefBoolean.h} | 8 +- .../{CBotClassInst.cpp => CBotDefClass.cpp} | 26 ++--- .../{CBotClassInst.h => CBotDefClass.h} | 6 +- .../{CBotFloat.cpp => CBotDefFloat.cpp} | 25 ++-- .../CBotInstr/{CBotFloat.h => CBotDefFloat.h} | 16 +-- .../CBotInstr/{CBotInt.cpp => CBotDefInt.cpp} | 30 ++--- .../CBotInstr/{CBotInt.h => CBotDefInt.h} | 8 +- .../{CBotIString.cpp => CBotDefString.cpp} | 21 ++-- .../{CBotIString.h => CBotDefString.h} | 16 +-- .../{CBotExprBool.cpp => CBotExprLitBool.cpp} | 16 +-- .../{CBotExprBool.h => CBotExprLitBool.h} | 10 +- .../{CBotExprNan.cpp => CBotExprLitNan.cpp} | 10 +- .../{CBotExprNan.h => CBotExprLitNan.h} | 8 +- .../{CBotExprNull.cpp => CBotExprLitNull.cpp} | 10 +- .../{CBotExprNull.h => CBotExprLitNull.h} | 8 +- .../{CBotExprNum.cpp => CBotExprLitNum.cpp} | 24 ++-- .../{CBotExprNum.h => CBotExprLitNum.h} | 8 +- ...BotExprAlpha.cpp => CBotExprLitString.cpp} | 16 +-- .../{CBotExprAlpha.h => CBotExprLitString.h} | 10 +- src/CBot/CBotInstr/CBotInstr.cpp | 40 +++---- src/CBot/CBotInstr/CBotInstr.h | 14 +-- src/CBot/CBotInstr/CBotInstrCall.cpp | 6 +- src/CBot/CBotInstr/CBotListArray.cpp | 4 +- src/CBot/CBotInstr/CBotListExpression.cpp | 18 +-- src/CBot/CBotInstr/CBotParExpr.cpp | 25 ++-- src/CBot/CBotInstr/CBotParExpr.h | 10 +- src/CBot/CBotProgram.cpp | 2 +- src/CBot/CBotStack.cpp | 2 +- src/CBot/CBotStack.h | 2 +- src/CBot/CMakeLists.txt | 110 +++++++++--------- 36 files changed, 284 insertions(+), 291 deletions(-) rename src/CBot/CBotInstr/{CBotInstArray.cpp => CBotDefArray.cpp} (94%) rename src/CBot/CBotInstr/{CBotInstArray.h => CBotDefArray.h} (92%) rename src/CBot/CBotInstr/{CBotBoolean.cpp => CBotDefBoolean.cpp} (86%) rename src/CBot/CBotInstr/{CBotBoolean.h => CBotDefBoolean.h} (91%) rename src/CBot/CBotInstr/{CBotClassInst.cpp => CBotDefClass.cpp} (95%) rename src/CBot/CBotInstr/{CBotClassInst.h => CBotDefClass.h} (96%) rename src/CBot/CBotInstr/{CBotFloat.cpp => CBotDefFloat.cpp} (86%) rename src/CBot/CBotInstr/{CBotFloat.h => CBotDefFloat.h} (88%) rename src/CBot/CBotInstr/{CBotInt.cpp => CBotDefInt.cpp} (85%) rename src/CBot/CBotInstr/{CBotInt.h => CBotDefInt.h} (92%) rename src/CBot/CBotInstr/{CBotIString.cpp => CBotDefString.cpp} (87%) rename src/CBot/CBotInstr/{CBotIString.h => CBotDefString.h} (88%) rename src/CBot/CBotInstr/{CBotExprBool.cpp => CBotExprLitBool.cpp} (85%) rename src/CBot/CBotInstr/{CBotExprBool.h => CBotExprLitBool.h} (87%) rename src/CBot/CBotInstr/{CBotExprNan.cpp => CBotExprLitNan.cpp} (88%) rename src/CBot/CBotInstr/{CBotExprNan.h => CBotExprLitNan.h} (89%) rename src/CBot/CBotInstr/{CBotExprNull.cpp => CBotExprLitNull.cpp} (88%) rename src/CBot/CBotInstr/{CBotExprNull.h => CBotExprLitNull.h} (89%) rename src/CBot/CBotInstr/{CBotExprNum.cpp => CBotExprLitNum.cpp} (88%) rename src/CBot/CBotInstr/{CBotExprNum.h => CBotExprLitNum.h} (91%) rename src/CBot/CBotInstr/{CBotExprAlpha.cpp => CBotExprLitString.cpp} (83%) rename src/CBot/CBotInstr/{CBotExprAlpha.h => CBotExprLitString.h} (86%) diff --git a/src/CBot/CBotClass.cpp b/src/CBot/CBotClass.cpp index 9fc3e171..b0afb72b 100644 --- a/src/CBot/CBotClass.cpp +++ b/src/CBot/CBotClass.cpp @@ -27,7 +27,7 @@ #include "CBot/CBotInstr/CBotListArray.h" #include "CBot/CBotInstr/CBotEmpty.h" -#include "CBotExternalCall.h" +#include "CBot/CBotExternalCall.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" #include "CBot/CBotUtils.h" diff --git a/src/CBot/CBotExternalCall.cpp b/src/CBot/CBotExternalCall.cpp index 4e03161c..20cb6c37 100644 --- a/src/CBot/CBotExternalCall.cpp +++ b/src/CBot/CBotExternalCall.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBotExternalCall.h" +#include "CBot/CBotExternalCall.h" #include "CBot/CBotToken.h" #include "CBot/CBotStack.h" diff --git a/src/CBot/CBotInstr/CBotCase.cpp b/src/CBot/CBotInstr/CBotCase.cpp index 8edc36e3..602bc20f 100644 --- a/src/CBot/CBotInstr/CBotCase.cpp +++ b/src/CBot/CBotInstr/CBotCase.cpp @@ -18,7 +18,8 @@ */ #include "CBot/CBotInstr/CBotCase.h" -#include "CBot/CBotInstr/CBotExprNum.h" + +#include "CBot/CBotInstr/CBotExprLitNum.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -50,7 +51,7 @@ CBotInstr* CBotCase::Compile(CBotToken* &p, CBotCStack* pStack) if ( pp->GetType() == ID_CASE ) { pp = p; - inst->m_value = CBotExprNum::Compile(p, pStack); + inst->m_value = CBotExprLitNum::Compile(p, pStack); if (inst->m_value == nullptr ) { pStack->SetError( CBotErrBadNum, pp ); diff --git a/src/CBot/CBotInstr/CBotInstArray.cpp b/src/CBot/CBotInstr/CBotDefArray.cpp similarity index 94% rename from src/CBot/CBotInstr/CBotInstArray.cpp rename to src/CBot/CBotInstr/CBotDefArray.cpp index 24805b54..38dbc62f 100644 --- a/src/CBot/CBotInstr/CBotInstArray.cpp +++ b/src/CBot/CBotInstr/CBotDefArray.cpp @@ -17,8 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include -#include "CBot/CBotInstr/CBotInstArray.h" +#include "CBot/CBotInstr/CBotDefArray.h" #include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotExpression.h" @@ -27,34 +26,35 @@ #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" - #include "CBot/CBotDefines.h" #include "CBot/CBotVar/CBotVar.h" +#include + namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotInstArray::CBotInstArray() +CBotDefArray::CBotDefArray() { m_var = nullptr; m_listass = nullptr; } //////////////////////////////////////////////////////////////////////////////// -CBotInstArray::~CBotInstArray() +CBotDefArray::~CBotDefArray() { delete m_var; delete m_listass; } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotInstArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResult type) +CBotInstr* CBotDefArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResult type) { CBotCStack* pStk = pStack->TokenStack(p); - CBotInstArray* inst = new CBotInstArray(); + CBotDefArray* inst = new CBotDefArray(); CBotToken* vartoken = p; inst->SetToken(vartoken); @@ -107,7 +107,7 @@ error: } //////////////////////////////////////////////////////////////////////////////// -bool CBotInstArray::Execute(CBotStack* &pj) +bool CBotDefArray::Execute(CBotStack* &pj) { CBotStack* pile1 = pj->AddStack(this); @@ -187,7 +187,7 @@ bool CBotInstArray::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotInstArray::RestoreState(CBotStack* &pj, bool bMain) +void CBotDefArray::RestoreState(CBotStack* &pj, bool bMain) { CBotStack* pile1 = pj; @@ -227,14 +227,14 @@ void CBotInstArray::RestoreState(CBotStack* &pj, bool bMain) if (m_next2b ) m_next2b->RestoreState( pile1, bMain); } -std::string CBotInstArray::GetDebugData() +std::string CBotDefArray::GetDebugData() { std::stringstream ss; ss << m_typevar.ToString(); return ss.str(); } -std::map CBotInstArray::GetDebugLinks() +std::map CBotDefArray::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); links["m_var"] = m_var; diff --git a/src/CBot/CBotInstr/CBotInstArray.h b/src/CBot/CBotInstr/CBotDefArray.h similarity index 92% rename from src/CBot/CBotInstr/CBotInstArray.h rename to src/CBot/CBotInstr/CBotDefArray.h index 3ba0b006..826bd92a 100644 --- a/src/CBot/CBotInstr/CBotInstArray.h +++ b/src/CBot/CBotInstr/CBotDefArray.h @@ -34,11 +34,11 @@ namespace CBot * bool[] z; * \endcode */ -class CBotInstArray : public CBotInstr +class CBotDefArray : public CBotInstr { public: - CBotInstArray(); - ~CBotInstArray(); + CBotDefArray(); + ~CBotDefArray(); /*! * \brief Compile @@ -64,7 +64,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotInstArray"; } + virtual const std::string GetDebugName() { return "CBotDefArray"; } virtual std::string GetDebugData(); virtual std::map GetDebugLinks(); diff --git a/src/CBot/CBotInstr/CBotBoolean.cpp b/src/CBot/CBotInstr/CBotDefBoolean.cpp similarity index 86% rename from src/CBot/CBotInstr/CBotBoolean.cpp rename to src/CBot/CBotInstr/CBotDefBoolean.cpp index 3f87a8cd..d6790e3b 100644 --- a/src/CBot/CBotInstr/CBotBoolean.cpp +++ b/src/CBot/CBotInstr/CBotDefBoolean.cpp @@ -17,10 +17,11 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotBoolean.h" +#include "CBot/CBotInstr/CBotDefBoolean.h" + #include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h" -#include "CBot/CBotInstr/CBotInstArray.h" +#include "CBot/CBotInstr/CBotDefArray.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -31,31 +32,31 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotBoolean::CBotBoolean() +CBotDefBoolean::CBotDefBoolean() { m_var = m_expr = nullptr; } //////////////////////////////////////////////////////////////////////////////// -CBotBoolean::~CBotBoolean() +CBotDefBoolean::~CBotDefBoolean() { delete m_var; delete m_expr; } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) +CBotInstr* CBotDefBoolean::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) { CBotToken* pp = cont ? nullptr : p; if (!cont && !IsOfType(p, ID_BOOLEAN, ID_BOOL)) return nullptr; - CBotBoolean* inst = static_cast(CompileArray(p, pStack, CBotTypBoolean)); + CBotDefBoolean* inst = static_cast(CompileArray(p, pStack, CBotTypBoolean)); if (inst != nullptr || !pStack->IsOk()) return inst; CBotCStack* pStk = pStack->TokenStack(pp); - inst = new CBotBoolean(); + inst = new CBotDefBoolean(); inst->m_expr = nullptr; @@ -74,12 +75,12 @@ CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bo if (IsOfType(p, ID_OPBRK)) { - delete inst; // type is not CBotInt + delete inst; // type is not CBotDefInt p = vartoken; // resutns to the variable name // compiles an array declaration - inst = static_cast(CBotInstArray::Compile(p, pStk, CBotTypBoolean)); + inst = static_cast(CBotDefArray::Compile(p, pStk, CBotTypBoolean)); if (!pStk->IsOk() ) { @@ -110,7 +111,7 @@ CBotInstr* CBotBoolean::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bo suite: if (IsOfType(p, ID_COMMA)) { - if (nullptr != ( inst->m_next2b = CBotBoolean::Compile(p, pStk, true, noskip))) + if (nullptr != ( inst->m_next2b = CBotDefBoolean::Compile(p, pStk, true, noskip))) { return pStack->Return(inst, pStk); } @@ -130,7 +131,7 @@ error: } //////////////////////////////////////////////////////////////////////////////// -bool CBotBoolean::Execute(CBotStack* &pj) +bool CBotDefBoolean::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this);//essential for SetState() @@ -151,7 +152,7 @@ bool CBotBoolean::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotBoolean::RestoreState(CBotStack* &pj, bool bMain) +void CBotDefBoolean::RestoreState(CBotStack* &pj, bool bMain) { CBotStack* pile = pj; if (bMain) @@ -172,7 +173,7 @@ void CBotBoolean::RestoreState(CBotStack* &pj, bool bMain) m_next2b->RestoreState(pile, bMain); // other(s) definition(s) } -std::map CBotBoolean::GetDebugLinks() +std::map CBotDefBoolean::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); links["m_var"] = m_var; diff --git a/src/CBot/CBotInstr/CBotBoolean.h b/src/CBot/CBotInstr/CBotDefBoolean.h similarity index 91% rename from src/CBot/CBotInstr/CBotBoolean.h rename to src/CBot/CBotInstr/CBotDefBoolean.h index 307e8616..298232d1 100644 --- a/src/CBot/CBotInstr/CBotBoolean.h +++ b/src/CBot/CBotInstr/CBotDefBoolean.h @@ -27,11 +27,11 @@ namespace CBot /** * \brief Definition of boolean variable - bool a, b = false */ -class CBotBoolean : public CBotInstr +class CBotDefBoolean : public CBotInstr { public: - CBotBoolean(); - ~CBotBoolean(); + CBotDefBoolean(); + ~CBotDefBoolean(); /*! * \brief Compile @@ -58,7 +58,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotBoolean"; } + virtual const std::string GetDebugName() { return "CBotDefBoolean"; } virtual std::map GetDebugLinks(); private: diff --git a/src/CBot/CBotInstr/CBotClassInst.cpp b/src/CBot/CBotInstr/CBotDefClass.cpp similarity index 95% rename from src/CBot/CBotInstr/CBotClassInst.cpp rename to src/CBot/CBotInstr/CBotDefClass.cpp index bffbdcd7..64df9a17 100644 --- a/src/CBot/CBotInstr/CBotClassInst.cpp +++ b/src/CBot/CBotInstr/CBotDefClass.cpp @@ -17,13 +17,13 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBotClassInst.h" +#include "CBot/CBotInstr/CBotDefClass.h" #include "CBot/CBotInstr/CBotInstrUtils.h" #include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h" -#include "CBot/CBotInstr/CBotInstArray.h" +#include "CBot/CBotInstr/CBotDefArray.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -36,7 +36,7 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotClassInst::CBotClassInst() +CBotDefClass::CBotDefClass() { m_next = nullptr; m_var = nullptr; @@ -47,13 +47,13 @@ CBotClassInst::CBotClassInst() } //////////////////////////////////////////////////////////////////////////////// -CBotClassInst::~CBotClassInst() +CBotDefClass::~CBotDefClass() { delete m_var; } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass* pClass) +CBotInstr* CBotDefClass::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass* pClass) { // seeks the corresponding classes if ( pClass == nullptr ) @@ -71,12 +71,12 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass* bool bIntrinsic = pClass->IsIntrinsic(); CBotTypResult type = CBotTypResult( bIntrinsic ? CBotTypIntrinsic : CBotTypPointer, pClass ); - CBotClassInst* inst = static_cast(CompileArray(p, pStack, type)); + CBotDefClass* inst = static_cast(CompileArray(p, pStack, type)); if ( inst != nullptr || !pStack->IsOk() ) return inst; CBotCStack* pStk = pStack->TokenStack(); - inst = new CBotClassInst(); + inst = new CBotDefClass(); /// TODO Need to be revised and fixed after adding unit tests CBotToken token(pClass->GetName(), std::string(), p->GetStart(), p->GetEnd()); inst->SetToken(&token); @@ -94,12 +94,12 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass* if (IsOfType(p, ID_OPBRK)) // with any clues? { - delete inst; // is not type CBotInt + delete inst; // is not type CBotDefInt p = vartoken; // returns to the variable name // compiles declaration an array - inst = static_cast(CBotInstArray::Compile( p, pStk, type )); + inst = static_cast(CBotDefArray::Compile(p, pStk, type )); if (!pStk->IsOk() ) { @@ -202,7 +202,7 @@ CBotInstr* CBotClassInst::Compile(CBotToken* &p, CBotCStack* pStack, CBotClass* suite: if (IsOfType(p, ID_COMMA)) // several chained definitions { - if ( nullptr != ( inst->m_next = CBotClassInst::Compile(p, pStk, pClass) )) // compiles the following + if ( nullptr != ( inst->m_next = CBotDefClass::Compile(p, pStk, pClass) )) // compiles the following { return pStack->Return(inst, pStk); } @@ -222,7 +222,7 @@ error: } //////////////////////////////////////////////////////////////////////////////// -bool CBotClassInst::Execute(CBotStack* &pj) +bool CBotDefClass::Execute(CBotStack* &pj) { CBotVar* pThis = nullptr; @@ -357,7 +357,7 @@ bool CBotClassInst::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotClassInst::RestoreState(CBotStack* &pj, bool bMain) +void CBotDefClass::RestoreState(CBotStack* &pj, bool bMain) { CBotVar* pThis = nullptr; @@ -436,7 +436,7 @@ void CBotClassInst::RestoreState(CBotStack* &pj, bool bMain) m_next2b->RestoreState(pile, bMain); // other(s) definition(s) } -std::map CBotClassInst::GetDebugLinks() +std::map CBotDefClass::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); links["m_var"] = m_var; diff --git a/src/CBot/CBotInstr/CBotClassInst.h b/src/CBot/CBotInstr/CBotDefClass.h similarity index 96% rename from src/CBot/CBotInstr/CBotClassInst.h rename to src/CBot/CBotInstr/CBotDefClass.h index 62b5331e..9492f1a3 100644 --- a/src/CBot/CBotInstr/CBotClassInst.h +++ b/src/CBot/CBotInstr/CBotDefClass.h @@ -37,12 +37,12 @@ namespace CBot * ClassName varname1 = new ClassName(), varname2; * \endcode */ -class CBotClassInst : public CBotInstr +class CBotDefClass : public CBotInstr { public: - CBotClassInst(); - ~CBotClassInst(); + CBotDefClass(); + ~CBotDefClass(); /*! * \brief Compile Definition of pointer (s) to an object style CPoint A, B ; diff --git a/src/CBot/CBotInstr/CBotFloat.cpp b/src/CBot/CBotInstr/CBotDefFloat.cpp similarity index 86% rename from src/CBot/CBotInstr/CBotFloat.cpp rename to src/CBot/CBotInstr/CBotDefFloat.cpp index 9374057a..a8cf6158 100644 --- a/src/CBot/CBotInstr/CBotFloat.cpp +++ b/src/CBot/CBotInstr/CBotDefFloat.cpp @@ -17,10 +17,11 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotFloat.h" +#include "CBot/CBotInstr/CBotDefFloat.h" + #include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h" -#include "CBot/CBotInstr/CBotInstArray.h" +#include "CBot/CBotInstr/CBotDefArray.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -31,32 +32,32 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotFloat::CBotFloat() +CBotDefFloat::CBotDefFloat() { m_var = nullptr; m_expr = nullptr; } //////////////////////////////////////////////////////////////////////////////// -CBotFloat::~CBotFloat() +CBotDefFloat::~CBotDefFloat() { delete m_var; delete m_expr; } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) +CBotInstr* CBotDefFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) { CBotToken* pp = cont ? nullptr : p; if (!cont && !IsOfType(p, ID_FLOAT)) return nullptr; - CBotFloat* inst = static_cast(CompileArray(p, pStack, CBotTypFloat)); + CBotDefFloat* inst = static_cast(CompileArray(p, pStack, CBotTypFloat)); if (inst != nullptr || !pStack->IsOk()) return inst; CBotCStack* pStk = pStack->TokenStack(pp); - inst = new CBotFloat(); + inst = new CBotDefFloat(); inst->m_expr = nullptr; @@ -78,7 +79,7 @@ CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool { delete inst; p = vartoken; - inst = static_cast(CBotInstArray::Compile(p, pStk, CBotTypFloat)); + inst = static_cast(CBotDefArray::Compile(p, pStk, CBotTypFloat)); if (!pStk->IsOk() ) { @@ -109,7 +110,7 @@ CBotInstr* CBotFloat::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool suite: if (IsOfType(p, ID_COMMA)) { - if (nullptr != ( inst->m_next2b = CBotFloat::Compile(p, pStk, true, noskip))) + if (nullptr != ( inst->m_next2b = CBotDefFloat::Compile(p, pStk, true, noskip))) { return pStack->Return(inst, pStk); } @@ -129,7 +130,7 @@ error: } //////////////////////////////////////////////////////////////////////////////// -bool CBotFloat::Execute(CBotStack* &pj) +bool CBotDefFloat::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -150,7 +151,7 @@ bool CBotFloat::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotFloat::RestoreState(CBotStack* &pj, bool bMain) +void CBotDefFloat::RestoreState(CBotStack* &pj, bool bMain) { CBotStack* pile = pj; if (bMain) @@ -171,7 +172,7 @@ void CBotFloat::RestoreState(CBotStack* &pj, bool bMain) m_next2b->RestoreState(pile, bMain); } -std::map CBotFloat::GetDebugLinks() +std::map CBotDefFloat::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); links["m_var"] = m_var; diff --git a/src/CBot/CBotInstr/CBotFloat.h b/src/CBot/CBotInstr/CBotDefFloat.h similarity index 88% rename from src/CBot/CBotInstr/CBotFloat.h rename to src/CBot/CBotInstr/CBotDefFloat.h index 6feaca36..3b95917c 100644 --- a/src/CBot/CBotInstr/CBotFloat.h +++ b/src/CBot/CBotInstr/CBotDefFloat.h @@ -27,19 +27,11 @@ namespace CBot /** * \brief Definition of a float variable - float a, b = 12.4 */ -class CBotFloat : public CBotInstr +class CBotDefFloat : public CBotInstr { public: - - /*! - * \brief CBotFloat - */ - CBotFloat(); - - /*! - * \brief ~CBotFloat - */ - ~CBotFloat(); + CBotDefFloat(); + ~CBotDefFloat(); /*! * \brief Compile @@ -66,7 +58,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotFloat"; } + virtual const std::string GetDebugName() { return "CBotDefFloat"; } virtual std::map GetDebugLinks(); private: diff --git a/src/CBot/CBotInstr/CBotInt.cpp b/src/CBot/CBotInstr/CBotDefInt.cpp similarity index 85% rename from src/CBot/CBotInstr/CBotInt.cpp rename to src/CBot/CBotInstr/CBotDefInt.cpp index d7113850..ef4f37a3 100644 --- a/src/CBot/CBotInstr/CBotInt.cpp +++ b/src/CBot/CBotInstr/CBotDefInt.cpp @@ -17,10 +17,10 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotInt.h" +#include "CBot/CBotInstr/CBotDefInt.h" #include "CBot/CBotInstr/CBotLeftExprVar.h" -#include "CBot/CBotInstr/CBotInstArray.h" +#include "CBot/CBotInstr/CBotDefArray.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotStack.h" @@ -32,7 +32,7 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotInt::CBotInt() +CBotDefInt::CBotDefInt() { m_next = nullptr; // for multiple definitions m_var = nullptr; @@ -40,25 +40,25 @@ CBotInt::CBotInt() } //////////////////////////////////////////////////////////////////////////////// -CBotInt::~CBotInt() +CBotDefInt::~CBotDefInt() { delete m_var; delete m_expr; } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) +CBotInstr* CBotDefInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) { CBotToken* pp = cont ? nullptr : p; // no repetition of the token "int" if (!cont && !IsOfType(p, ID_INT)) return nullptr; - CBotInt* inst = static_cast(CompileArray(p, pStack, CBotTypInt)); + CBotDefInt* inst = static_cast(CompileArray(p, pStack, CBotTypInt)); if (inst != nullptr || !pStack->IsOk()) return inst; CBotCStack* pStk = pStack->TokenStack(pp); - inst = new CBotInt(); + inst = new CBotDefInt(); inst->m_expr = nullptr; @@ -77,12 +77,12 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool n if (IsOfType(p, ID_OPBRK)) { - delete inst; // type is not CBotInt + delete inst; // type is not CBotDefInt p = vartoken; // returns the variable name // compiles an array declaration - CBotInstr* inst2 = CBotInstArray::Compile(p, pStk, CBotTypInt); + CBotInstr* inst2 = CBotDefArray::Compile(p, pStk, CBotTypInt); if (!pStk->IsOk() ) { @@ -92,12 +92,12 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool n if (IsOfType(p, ID_COMMA)) // several definition chained { - if (nullptr != ( inst2->m_next2b = CBotInt::Compile(p, pStk, true, noskip))) // compile the next one + if (nullptr != ( inst2->m_next2b = CBotDefInt::Compile(p, pStk, true, noskip))) // compile the next one { return pStack->Return(inst2, pStk); } } - inst = static_cast(inst2); + inst = static_cast(inst2); goto suite; // no assignment, variable already created } @@ -124,7 +124,7 @@ CBotInstr* CBotInt::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool n if (IsOfType(p, ID_COMMA)) // chained several definitions { - if (nullptr != ( inst->m_next2b = CBotInt::Compile(p, pStk, true, noskip))) // compile next one + if (nullptr != ( inst->m_next2b = CBotDefInt::Compile(p, pStk, true, noskip))) // compile next one { return pStack->Return(inst, pStk); } @@ -144,7 +144,7 @@ error: } //////////////////////////////////////////////////////////////////////////////// -bool CBotInt::Execute(CBotStack* &pj) +bool CBotDefInt::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); // essential for SetState() @@ -165,7 +165,7 @@ bool CBotInt::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotInt::RestoreState(CBotStack* &pj, bool bMain) +void CBotDefInt::RestoreState(CBotStack* &pj, bool bMain) { CBotStack* pile = pj; if (bMain) @@ -185,7 +185,7 @@ void CBotInt::RestoreState(CBotStack* &pj, bool bMain) if (m_next2b) m_next2b->RestoreState(pile, bMain); // other(s) definition(s) } -std::map CBotInt::GetDebugLinks() +std::map CBotDefInt::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); links["m_var"] = m_var; diff --git a/src/CBot/CBotInstr/CBotInt.h b/src/CBot/CBotInstr/CBotDefInt.h similarity index 92% rename from src/CBot/CBotInstr/CBotInt.h rename to src/CBot/CBotInstr/CBotDefInt.h index 92bb17e0..7d273cb1 100644 --- a/src/CBot/CBotInstr/CBotInt.h +++ b/src/CBot/CBotInstr/CBotDefInt.h @@ -27,11 +27,11 @@ namespace CBot /** * \brief Definition of an integer variable - int a, b = 12 */ -class CBotInt : public CBotInstr +class CBotDefInt : public CBotInstr { public: - CBotInt(); - ~CBotInt(); + CBotDefInt(); + ~CBotDefInt(); /*! * \brief Compile @@ -58,7 +58,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotInt"; } + virtual const std::string GetDebugName() { return "CBotDefInt"; } virtual std::map GetDebugLinks(); private: diff --git a/src/CBot/CBotInstr/CBotIString.cpp b/src/CBot/CBotInstr/CBotDefString.cpp similarity index 87% rename from src/CBot/CBotInstr/CBotIString.cpp rename to src/CBot/CBotInstr/CBotDefString.cpp index 2eac0e59..b868d937 100644 --- a/src/CBot/CBotInstr/CBotIString.cpp +++ b/src/CBot/CBotInstr/CBotDefString.cpp @@ -17,7 +17,8 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotIString.h" +#include "CBot/CBotInstr/CBotDefString.h" + #include "CBot/CBotInstr/CBotLeftExprVar.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h" @@ -30,32 +31,32 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotIString::CBotIString() +CBotDefString::CBotDefString() { m_var = nullptr; m_expr = nullptr; } //////////////////////////////////////////////////////////////////////////////// -CBotIString::~CBotIString() +CBotDefString::~CBotDefString() { delete m_var; delete m_expr; } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotIString::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) +CBotInstr* CBotDefString::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bool noskip) { CBotToken* pp = cont ? nullptr : p; if (!cont && !IsOfType(p, ID_STRING)) return nullptr; - CBotIString* inst = static_cast(CompileArray(p, pStack, CBotTypString)); + CBotDefString* inst = static_cast(CompileArray(p, pStack, CBotTypString)); if (inst != nullptr || !pStack->IsOk()) return inst; CBotCStack* pStk = pStack->TokenStack(pp); - inst = new CBotIString(); + inst = new CBotDefString(); inst->m_expr = nullptr; @@ -93,7 +94,7 @@ CBotInstr* CBotIString::Compile(CBotToken* &p, CBotCStack* pStack, bool cont, bo if (IsOfType(p, ID_COMMA)) { - if (nullptr != ( inst->m_next2b = CBotIString::Compile(p, pStk, true, noskip))) + if (nullptr != ( inst->m_next2b = CBotDefString::Compile(p, pStk, true, noskip))) { return pStack->Return(inst, pStk); } @@ -113,7 +114,7 @@ error: } //////////////////////////////////////////////////////////////////////////////// -bool CBotIString::Execute(CBotStack* &pj) +bool CBotDefString::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -134,7 +135,7 @@ bool CBotIString::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotIString::RestoreState(CBotStack* &pj, bool bMain) +void CBotDefString::RestoreState(CBotStack* &pj, bool bMain) { CBotStack* pile = pj; @@ -156,7 +157,7 @@ void CBotIString::RestoreState(CBotStack* &pj, bool bMain) m_next2b->RestoreState(pile, bMain); } -std::map CBotIString::GetDebugLinks() +std::map CBotDefString::GetDebugLinks() { auto links = CBotInstr::GetDebugLinks(); links["m_var"] = m_var; diff --git a/src/CBot/CBotInstr/CBotIString.h b/src/CBot/CBotInstr/CBotDefString.h similarity index 88% rename from src/CBot/CBotInstr/CBotIString.h rename to src/CBot/CBotInstr/CBotDefString.h index 9430e44d..f9b7b9c2 100644 --- a/src/CBot/CBotInstr/CBotIString.h +++ b/src/CBot/CBotInstr/CBotDefString.h @@ -27,19 +27,11 @@ namespace CBot /** * \brief Definition of a string variable - string a, b = "text"; */ -class CBotIString : public CBotInstr +class CBotDefString : public CBotInstr { public: - - /*! - * \brief CBotIString - */ - CBotIString(); - - /*! - * \brief ~CBotIString - */ - ~CBotIString(); + CBotDefString(); + ~CBotDefString(); /*! * \brief Compile @@ -66,7 +58,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotIString"; } + virtual const std::string GetDebugName() { return "CBotDefString"; } virtual std::map GetDebugLinks(); private: diff --git a/src/CBot/CBotInstr/CBotExprBool.cpp b/src/CBot/CBotInstr/CBotExprLitBool.cpp similarity index 85% rename from src/CBot/CBotInstr/CBotExprBool.cpp rename to src/CBot/CBotInstr/CBotExprLitBool.cpp index 0aeb68d4..969ecf95 100644 --- a/src/CBot/CBotInstr/CBotExprBool.cpp +++ b/src/CBot/CBotInstr/CBotExprLitBool.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotExprBool.h" +#include "CBot/CBotInstr/CBotExprLitBool.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -28,25 +28,25 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotExprBool::CBotExprBool() +CBotExprLitBool::CBotExprLitBool() { } //////////////////////////////////////////////////////////////////////////////// -CBotExprBool::~CBotExprBool() +CBotExprLitBool::~CBotExprLitBool() { } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotExprBool::Compile(CBotToken* &p, CBotCStack* pStack) +CBotInstr* CBotExprLitBool::Compile(CBotToken* &p, CBotCStack* pStack) { CBotCStack* pStk = pStack->TokenStack(); - CBotExprBool* inst = nullptr; + CBotExprLitBool* inst = nullptr; if ( p->GetType() == ID_TRUE || p->GetType() == ID_FALSE ) { - inst = new CBotExprBool(); + inst = new CBotExprLitBool(); inst->SetToken(p); // stores the operation false or true p = p->GetNext(); @@ -58,7 +58,7 @@ CBotInstr* CBotExprBool::Compile(CBotToken* &p, CBotCStack* pStack) } //////////////////////////////////////////////////////////////////////////////// -bool CBotExprBool::Execute(CBotStack* &pj) +bool CBotExprLitBool::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -74,7 +74,7 @@ bool CBotExprBool::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotExprBool::RestoreState(CBotStack* &pj, bool bMain) +void CBotExprLitBool::RestoreState(CBotStack* &pj, bool bMain) { if (bMain) pj->RestoreStack(this); } diff --git a/src/CBot/CBotInstr/CBotExprBool.h b/src/CBot/CBotInstr/CBotExprLitBool.h similarity index 87% rename from src/CBot/CBotInstr/CBotExprBool.h rename to src/CBot/CBotInstr/CBotExprLitBool.h index fb8fd935..e7ce6701 100644 --- a/src/CBot/CBotInstr/CBotExprBool.h +++ b/src/CBot/CBotInstr/CBotExprLitBool.h @@ -25,13 +25,13 @@ namespace CBot { /** - * \brief true/false constants + * \brief A boolean literal - true/false */ -class CBotExprBool : public CBotInstr +class CBotExprLitBool : public CBotInstr { public: - CBotExprBool(); - ~CBotExprBool(); + CBotExprLitBool(); + ~CBotExprLitBool(); /*! * \brief Compile @@ -56,7 +56,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotExprBool"; } + virtual const std::string GetDebugName() { return "CBotExprLitBool"; } }; } // namespace CBot diff --git a/src/CBot/CBotInstr/CBotExprNan.cpp b/src/CBot/CBotInstr/CBotExprLitNan.cpp similarity index 88% rename from src/CBot/CBotInstr/CBotExprNan.cpp rename to src/CBot/CBotInstr/CBotExprLitNan.cpp index 24d1c72f..4fbe6554 100644 --- a/src/CBot/CBotInstr/CBotExprNan.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNan.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotExprNan.h" +#include "CBot/CBotInstr/CBotExprLitNan.h" #include "CBot/CBotStack.h" @@ -27,16 +27,16 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotExprNan::CBotExprNan() +CBotExprLitNan::CBotExprLitNan() { } //////////////////////////////////////////////////////////////////////////////// -CBotExprNan::~CBotExprNan() +CBotExprLitNan::~CBotExprLitNan() { } //////////////////////////////////////////////////////////////////////////////// -bool CBotExprNan::Execute(CBotStack* &pj) +bool CBotExprLitNan::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -49,7 +49,7 @@ bool CBotExprNan::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotExprNan::RestoreState(CBotStack* &pj, bool bMain) +void CBotExprLitNan::RestoreState(CBotStack* &pj, bool bMain) { if (bMain) pj->RestoreStack(this); } diff --git a/src/CBot/CBotInstr/CBotExprNan.h b/src/CBot/CBotInstr/CBotExprLitNan.h similarity index 89% rename from src/CBot/CBotInstr/CBotExprNan.h rename to src/CBot/CBotInstr/CBotExprLitNan.h index dd5416a2..b8e4b69e 100644 --- a/src/CBot/CBotInstr/CBotExprNan.h +++ b/src/CBot/CBotInstr/CBotExprLitNan.h @@ -27,11 +27,11 @@ namespace CBot /** * \brief The "nan" constant */ -class CBotExprNan : public CBotInstr +class CBotExprLitNan : public CBotInstr { public: - CBotExprNan(); - ~CBotExprNan(); + CBotExprLitNan(); + ~CBotExprLitNan(); /*! * \brief Execute Executes, returns null pointer. @@ -48,7 +48,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotExprNan"; } + virtual const std::string GetDebugName() { return "CBotExprLitNan"; } virtual std::string GetDebugData() { return "nan"; } }; diff --git a/src/CBot/CBotInstr/CBotExprNull.cpp b/src/CBot/CBotInstr/CBotExprLitNull.cpp similarity index 88% rename from src/CBot/CBotInstr/CBotExprNull.cpp rename to src/CBot/CBotInstr/CBotExprLitNull.cpp index c859e99a..2132ee73 100644 --- a/src/CBot/CBotInstr/CBotExprNull.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNull.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotExprNull.h" +#include "CBot/CBotInstr/CBotExprLitNull.h" #include "CBot/CBotStack.h" @@ -27,17 +27,17 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotExprNull::CBotExprNull() +CBotExprLitNull::CBotExprLitNull() { } //////////////////////////////////////////////////////////////////////////////// -CBotExprNull::~CBotExprNull() +CBotExprLitNull::~CBotExprLitNull() { } //////////////////////////////////////////////////////////////////////////////// -bool CBotExprNull::Execute(CBotStack* &pj) +bool CBotExprLitNull::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -50,7 +50,7 @@ bool CBotExprNull::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotExprNull::RestoreState(CBotStack* &pj, bool bMain) +void CBotExprLitNull::RestoreState(CBotStack* &pj, bool bMain) { if (bMain) pj->RestoreStack(this); } diff --git a/src/CBot/CBotInstr/CBotExprNull.h b/src/CBot/CBotInstr/CBotExprLitNull.h similarity index 89% rename from src/CBot/CBotInstr/CBotExprNull.h rename to src/CBot/CBotInstr/CBotExprLitNull.h index a18cce47..121dd33e 100644 --- a/src/CBot/CBotInstr/CBotExprNull.h +++ b/src/CBot/CBotInstr/CBotExprLitNull.h @@ -27,11 +27,11 @@ namespace CBot /** * \brief The "null" constant */ -class CBotExprNull : public CBotInstr +class CBotExprLitNull : public CBotInstr { public: - CBotExprNull(); - ~CBotExprNull(); + CBotExprLitNull(); + ~CBotExprLitNull(); /*! * \brief Execute Executes, returns an empty pointer. @@ -48,7 +48,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotExprNull"; } + virtual const std::string GetDebugName() { return "CBotExprLitNull"; } virtual std::string GetDebugData() { return "null"; } }; diff --git a/src/CBot/CBotInstr/CBotExprNum.cpp b/src/CBot/CBotInstr/CBotExprLitNum.cpp similarity index 88% rename from src/CBot/CBotInstr/CBotExprNum.cpp rename to src/CBot/CBotInstr/CBotExprLitNum.cpp index c2addbfa..cbb047ba 100644 --- a/src/CBot/CBotInstr/CBotExprNum.cpp +++ b/src/CBot/CBotInstr/CBotExprLitNum.cpp @@ -17,35 +17,35 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include -#include "CBot/CBotInstr/CBotExprNum.h" - +#include "CBot/CBotInstr/CBotExprLitNum.h" #include "CBot/CBotStack.h" -#include "CBot/CBotCStack.h" +#include "CBot/CBotCStack.h" #include "CBot/CBotVar/CBotVar.h" #include "CBot/CBotUtils.h" +#include + namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotExprNum::CBotExprNum() +CBotExprLitNum::CBotExprLitNum() { } //////////////////////////////////////////////////////////////////////////////// -CBotExprNum::~CBotExprNum() +CBotExprLitNum::~CBotExprLitNum() { } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotExprNum::Compile(CBotToken* &p, CBotCStack* pStack) +CBotInstr* CBotExprLitNum::Compile(CBotToken* &p, CBotCStack* pStack) { CBotCStack* pStk = pStack->TokenStack(); - CBotExprNum* inst = new CBotExprNum(); + CBotExprLitNum* inst = new CBotExprLitNum(); inst->SetToken(p); std::string s = p->GetString(); @@ -80,7 +80,7 @@ CBotInstr* CBotExprNum::Compile(CBotToken* &p, CBotCStack* pStack) } //////////////////////////////////////////////////////////////////////////////// -bool CBotExprNum::Execute(CBotStack* &pj) +bool CBotExprLitNum::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -103,6 +103,8 @@ bool CBotExprNum::Execute(CBotStack* &pj) case CBotTypFloat: var->SetValFloat(m_valfloat); break; + default: + assert(false); } pile->SetVar(var); // place on the stack @@ -110,12 +112,12 @@ bool CBotExprNum::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotExprNum::RestoreState(CBotStack* &pj, bool bMain) +void CBotExprLitNum::RestoreState(CBotStack* &pj, bool bMain) { if (bMain) pj->RestoreStack(this); } -std::string CBotExprNum::GetDebugData() +std::string CBotExprLitNum::GetDebugData() { std::stringstream ss; ss << "(" << (m_numtype == CBotTypFloat ? "float" : "int") << ") " << (m_numtype == CBotTypFloat ? m_valfloat : m_valint); diff --git a/src/CBot/CBotInstr/CBotExprNum.h b/src/CBot/CBotInstr/CBotExprLitNum.h similarity index 91% rename from src/CBot/CBotInstr/CBotExprNum.h rename to src/CBot/CBotInstr/CBotExprLitNum.h index 42bd4c8e..a81e90f0 100644 --- a/src/CBot/CBotInstr/CBotExprNum.h +++ b/src/CBot/CBotInstr/CBotExprLitNum.h @@ -29,12 +29,12 @@ namespace CBot * * Can be of type ::CBotTypInt or ::CBotTypFloat */ -class CBotExprNum : public CBotInstr +class CBotExprLitNum : public CBotInstr { public: - CBotExprNum(); - ~CBotExprNum(); + CBotExprLitNum(); + ~CBotExprLitNum(); /*! * \brief Compile @@ -59,7 +59,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotExprNum"; } + virtual const std::string GetDebugName() { return "CBotExprLitNum"; } virtual std::string GetDebugData(); private: diff --git a/src/CBot/CBotInstr/CBotExprAlpha.cpp b/src/CBot/CBotInstr/CBotExprLitString.cpp similarity index 83% rename from src/CBot/CBotInstr/CBotExprAlpha.cpp rename to src/CBot/CBotInstr/CBotExprLitString.cpp index 8bd24c8e..5ce60f17 100644 --- a/src/CBot/CBotInstr/CBotExprAlpha.cpp +++ b/src/CBot/CBotInstr/CBotExprLitString.cpp @@ -17,7 +17,7 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotExprAlpha.h" +#include "CBot/CBotInstr/CBotExprLitString.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -28,21 +28,21 @@ namespace CBot { //////////////////////////////////////////////////////////////////////////////// -CBotExprAlpha::CBotExprAlpha() +CBotExprLitString::CBotExprLitString() { } //////////////////////////////////////////////////////////////////////////////// -CBotExprAlpha::~CBotExprAlpha() +CBotExprLitString::~CBotExprLitString() { } //////////////////////////////////////////////////////////////////////////////// -CBotInstr* CBotExprAlpha::Compile(CBotToken* &p, CBotCStack* pStack) +CBotInstr* CBotExprLitString::Compile(CBotToken* &p, CBotCStack* pStack) { CBotCStack* pStk = pStack->TokenStack(); - CBotExprAlpha* inst = new CBotExprAlpha(); + CBotExprLitString* inst = new CBotExprLitString(); inst->SetToken(p); p = p->GetNext(); @@ -54,7 +54,7 @@ CBotInstr* CBotExprAlpha::Compile(CBotToken* &p, CBotCStack* pStack) } //////////////////////////////////////////////////////////////////////////////// -bool CBotExprAlpha::Execute(CBotStack* &pj) +bool CBotExprLitString::Execute(CBotStack* &pj) { CBotStack* pile = pj->AddStack(this); @@ -73,12 +73,12 @@ bool CBotExprAlpha::Execute(CBotStack* &pj) } //////////////////////////////////////////////////////////////////////////////// -void CBotExprAlpha::RestoreState(CBotStack* &pj, bool bMain) +void CBotExprLitString::RestoreState(CBotStack* &pj, bool bMain) { if (bMain) pj->RestoreStack(this); } -std::string CBotExprAlpha::GetDebugData() +std::string CBotExprLitString::GetDebugData() { return m_token.GetString(); } diff --git a/src/CBot/CBotInstr/CBotExprAlpha.h b/src/CBot/CBotInstr/CBotExprLitString.h similarity index 86% rename from src/CBot/CBotInstr/CBotExprAlpha.h rename to src/CBot/CBotInstr/CBotExprLitString.h index 17d9163a..fdda273c 100644 --- a/src/CBot/CBotInstr/CBotExprAlpha.h +++ b/src/CBot/CBotInstr/CBotExprLitString.h @@ -25,13 +25,13 @@ namespace CBot { /** - * \brief Expression representing a string literal - "Some text" + * \brief A string literal - "Some text" */ -class CBotExprAlpha : public CBotInstr +class CBotExprLitString : public CBotInstr { public: - CBotExprAlpha(); - ~CBotExprAlpha(); + CBotExprLitString(); + ~CBotExprLitString(); /*! * \brief Compile @@ -56,7 +56,7 @@ public: void RestoreState(CBotStack* &pj, bool bMain) override; protected: - virtual const std::string GetDebugName() { return "CBotExprAlpha"; } + virtual const std::string GetDebugName() { return "CBotExprLitString"; } virtual std::string GetDebugData(); }; diff --git a/src/CBot/CBotInstr/CBotInstr.cpp b/src/CBot/CBotInstr/CBotInstr.cpp index b5c62797..646c57ea 100644 --- a/src/CBot/CBotInstr/CBotInstr.cpp +++ b/src/CBot/CBotInstr/CBotInstr.cpp @@ -19,22 +19,22 @@ #include "CBot/CBotInstr/CBotInstr.h" -#include "CBot/CBotInstr/CBotFor.h" -#include "CBot/CBotInstr/CBotDo.h" #include "CBot/CBotInstr/CBotBreak.h" -#include "CBot/CBotInstr/CBotSwitch.h" -#include "CBot/CBotInstr/CBotTry.h" -#include "CBot/CBotInstr/CBotThrow.h" -#include "CBot/CBotInstr/CBotInt.h" -#include "CBot/CBotInstr/CBotFloat.h" -#include "CBot/CBotInstr/CBotWhile.h" -#include "CBot/CBotInstr/CBotIString.h" -#include "CBot/CBotInstr/CBotBoolean.h" +#include "CBot/CBotInstr/CBotDefArray.h" +#include "CBot/CBotInstr/CBotDefBoolean.h" +#include "CBot/CBotInstr/CBotDefClass.h" +#include "CBot/CBotInstr/CBotDefFloat.h" +#include "CBot/CBotInstr/CBotDefInt.h" +#include "CBot/CBotInstr/CBotDefString.h" +#include "CBot/CBotInstr/CBotDo.h" +#include "CBot/CBotInstr/CBotExpression.h" +#include "CBot/CBotInstr/CBotFor.h" #include "CBot/CBotInstr/CBotIf.h" #include "CBot/CBotInstr/CBotReturn.h" -#include "CBot/CBotInstr/CBotClassInst.h" -#include "CBot/CBotInstr/CBotExpression.h" -#include "CBot/CBotInstr/CBotInstArray.h" +#include "CBot/CBotInstr/CBotSwitch.h" +#include "CBot/CBotInstr/CBotThrow.h" +#include "CBot/CBotInstr/CBotTry.h" +#include "CBot/CBotInstr/CBotWhile.h" #include "CBot/CBotVar/CBotVar.h" @@ -209,17 +209,17 @@ CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack) return CBotThrow::Compile(p, pStack); case ID_INT: - return CBotInt::Compile(p, pStack); + return CBotDefInt::Compile(p, pStack); case ID_FLOAT: - return CBotFloat::Compile(p, pStack); + return CBotDefFloat::Compile(p, pStack); case ID_STRING: - return CBotIString::Compile(p, pStack); + return CBotDefString::Compile(p, pStack); case ID_BOOLEAN: case ID_BOOL: - return CBotBoolean::Compile(p, pStack); + return CBotDefBoolean::Compile(p, pStack); case ID_IF: return CBotIf::Compile(p, pStack); @@ -254,7 +254,7 @@ CBotInstr* CBotInstr::Compile(CBotToken* &p, CBotCStack* pStack) if (CBotClass::Find(p) != nullptr) // Does class with this name exist? { // Yes, compile the declaration of the instance - return CBotClassInst::Compile(p, pStack); + return CBotDefClass::Compile(p, pStack); } } @@ -336,12 +336,12 @@ CBotInstr* CBotInstr::CompileArray(CBotToken* &p, CBotCStack* pStack, CBotTypRes // compiles an array declaration if (first) return nullptr ; - CBotInstr* inst = CBotInstArray::Compile(p, pStack, type); + CBotInstr* inst = CBotDefArray::Compile(p, pStack, type); if (inst == nullptr) return nullptr; if (IsOfType(p, ID_COMMA)) // several definitions { - if (nullptr != ( inst->m_next2b = CBotInstArray::CompileArray(p, pStack, type, false))) // compiles next one + if (nullptr != ( inst->m_next2b = CBotDefArray::CompileArray(p, pStack, type, false))) // compiles next one { return inst; } diff --git a/src/CBot/CBotInstr/CBotInstr.h b/src/CBot/CBotInstr/CBotInstr.h index 0f8bf1cf..eeb677b2 100644 --- a/src/CBot/CBotInstr/CBotInstr.h +++ b/src/CBot/CBotInstr/CBotInstr.h @@ -46,29 +46,29 @@ class CBotDebug; * instr0000000001530870 [label=<CBotExpression>] * instr0000000001530920 [label=<CBotLeftExpr
x>] * instr00000000015309D0 [label=<CBotIndexExpr>] - * instr0000000001530DC0 [label=<CBotExprNum
(int) 1>] + * instr0000000001530DC0 [label=<CBotExprLitNum
(int) 1>] * instr00000000015309D0 -> instr0000000001530DC0 [label="m_expr" weight=5] * instr0000000001530920 -> instr00000000015309D0 [label="m_next3" weight=5] * instr0000000001530870 -> instr0000000001530920 [label="m_leftop" weight=5] * instr0000000001530E80 [label=<CBotInstrArray
int[][]>] - * instr00000000015315F0 [label=<CBotInt>] + * instr00000000015315F0 [label=<CBotDefInt>] * instr0000000001531C20 [label=<CBotLeftExprVar
z>] * instr00000000015315F0 -> instr0000000001531C20 [label="m_var" weight=5] * instr0000000001530E80 -> instr00000000015315F0 [label="m_next2b" weight=5] * { rank=same; instr0000000001530E80; instr00000000015315F0; } * instr0000000001530B50 [label=<CBotExprVar
x>] * instr0000000001531700 [label=<CBotIndexExpr>] - * instr0000000001531B60 [label=<CBotExprNum
(int) 1>] + * instr0000000001531B60 [label=<CBotExprLitNum
(int) 1>] * instr0000000001531700 -> instr0000000001531B60 [label="m_expr" weight=5] * instr0000000001530B50 -> instr0000000001531700 [label="m_next3" weight=5] - * instr0000000001531A00 [label=<CBotExprNum
(int) 10>] + * instr0000000001531A00 [label=<CBotExprLitNum
(int) 10>] * instr0000000001530B50 -> instr0000000001531A00 [label="m_next3b" weight=5] * instr0000000001530E80 -> instr0000000001530B50 [label="m_next3b" weight=5] * instr0000000001530A80 [label=<CBotLeftExprVar
y>] * instr0000000001530E80 -> instr0000000001530A80 [label="m_var" weight=5] * instr0000000001530870 -> instr0000000001530E80 [label="m_next" weight=1] * { rank=same; instr0000000001530870; instr0000000001530E80; } - * instr0000000001530C80 [label=<CBotExprNum
(int) 4>] + * instr0000000001530C80 [label=<CBotExprLitNum
(int) 4>] * instr0000000001530870 -> instr0000000001530C80 [label="m_rightop" weight=5] * instr00000000015304D0 -> instr0000000001530870 [label="m_next" weight=1] * { rank=same; instr00000000015304D0; instr0000000001530870; } @@ -313,8 +313,8 @@ protected: //! Counter of nested loops, to determine the break and continue valid. static int m_LoopLvl; - friend class CBotClassInst; - friend class CBotInt; + friend class CBotDefClass; + friend class CBotDefInt; friend class CBotListArray; private: diff --git a/src/CBot/CBotInstr/CBotInstrCall.cpp b/src/CBot/CBotInstr/CBotInstrCall.cpp index a8d77bab..dfca3075 100644 --- a/src/CBot/CBotInstr/CBotInstrCall.cpp +++ b/src/CBot/CBotInstr/CBotInstrCall.cpp @@ -17,15 +17,17 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include -#include "CBotInstrCall.h" +#include "CBot/CBotInstr/CBotInstrCall.h" #include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotStack.h" + #include "CBot/CBotCStack.h" #include "CBot/CBotVar/CBotVar.h" +#include + namespace CBot { diff --git a/src/CBot/CBotInstr/CBotListArray.cpp b/src/CBot/CBotInstr/CBotListArray.cpp index 0151f299..c88899cb 100644 --- a/src/CBot/CBotInstr/CBotListArray.cpp +++ b/src/CBot/CBotInstr/CBotListArray.cpp @@ -21,7 +21,7 @@ #include "CBot/CBotInstr/CBotInstrUtils.h" -#include "CBot/CBotInstr/CBotExprNull.h" +#include "CBot/CBotInstr/CBotExprLitNull.h" #include "CBot/CBotInstr/CBotTwoOpExpr.h" #include "CBot/CBotStack.h" @@ -53,7 +53,7 @@ CBotInstr* CBotListArray::Compile(CBotToken* &p, CBotCStack* pStack, CBotTypResu if (IsOfType( p, ID_NULL )) { - CBotInstr* inst = new CBotExprNull (); + CBotInstr* inst = new CBotExprLitNull(); inst->SetToken(pp); return pStack->Return(inst, pStk); // ok with empty element } diff --git a/src/CBot/CBotInstr/CBotListExpression.cpp b/src/CBot/CBotInstr/CBotListExpression.cpp index e621d67f..0b9483f5 100644 --- a/src/CBot/CBotInstr/CBotListExpression.cpp +++ b/src/CBot/CBotInstr/CBotListExpression.cpp @@ -17,12 +17,12 @@ * along with this program. If not, see http://gnu.org/licenses */ -#include "CBot/CBotInstr/CBotListExpression.h" +#include "CBot/CBotInstr/CBotDefBoolean.h" +#include "CBot/CBotInstr/CBotDefFloat.h" +#include "CBot/CBotInstr/CBotDefInt.h" +#include "CBot/CBotInstr/CBotDefString.h" #include "CBot/CBotInstr/CBotExpression.h" -#include "CBot/CBotInstr/CBotIString.h" -#include "CBot/CBotInstr/CBotFloat.h" -#include "CBotBoolean.h" -#include "CBot/CBotInstr/CBotInt.h" +#include "CBot/CBotInstr/CBotListExpression.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" @@ -34,10 +34,10 @@ namespace CBot /// Seeks a declaration of variable or expression static CBotInstr* CompileInstrOrDefVar(CBotToken* &p, CBotCStack* pStack) { - CBotInstr* i = CBotInt::Compile( p, pStack, false, true ); // Is this a declaration of an integer? - if ( i== nullptr ) i = CBotFloat::Compile( p, pStack, false, true ); // or a real number? - if ( i== nullptr ) i = CBotBoolean::Compile( p, pStack, false, true ); // or a boolean? - if ( i== nullptr ) i = CBotIString::Compile( p, pStack, false, true ); // ar a string? + CBotInstr* i = CBotDefInt::Compile(p, pStack, false, true ); // Is this a declaration of an integer? + if ( i== nullptr ) i = CBotDefFloat::Compile(p, pStack, false, true ); // or a real number? + if ( i== nullptr ) i = CBotDefBoolean::Compile(p, pStack, false, true ); // or a boolean? + if ( i== nullptr ) i = CBotDefString::Compile(p, pStack, false, true ); // ar a string? if ( i== nullptr ) i = CBotExpression::Compile( p, pStack ); // compiles an expression return i; } diff --git a/src/CBot/CBotInstr/CBotParExpr.cpp b/src/CBot/CBotInstr/CBotParExpr.cpp index ec8fc458..d5406376 100644 --- a/src/CBot/CBotInstr/CBotParExpr.cpp +++ b/src/CBot/CBotInstr/CBotParExpr.cpp @@ -18,18 +18,19 @@ */ #include "CBot/CBotInstr/CBotParExpr.h" + +#include "CBot/CBotInstr/CBotExpression.h" +#include "CBot/CBotInstr/CBotExprLitBool.h" +#include "CBot/CBotInstr/CBotExprLitNan.h" +#include "CBot/CBotInstr/CBotExprLitNull.h" +#include "CBot/CBotInstr/CBotExprLitNum.h" +#include "CBot/CBotInstr/CBotExprLitString.h" #include "CBot/CBotInstr/CBotExprUnaire.h" #include "CBot/CBotInstr/CBotExprVar.h" #include "CBot/CBotInstr/CBotInstrCall.h" +#include "CBot/CBotInstr/CBotNew.h" #include "CBot/CBotInstr/CBotPostIncExpr.h" #include "CBot/CBotInstr/CBotPreIncExpr.h" -#include "CBot/CBotInstr/CBotExprNum.h" -#include "CBot/CBotInstr/CBotExprAlpha.h" -#include "CBot/CBotInstr/CBotExprBool.h" -#include "CBot/CBotInstr/CBotNew.h" -#include "CBot/CBotInstr/CBotExprNull.h" -#include "CBot/CBotInstr/CBotExprNan.h" -#include "CBot/CBotInstr/CBotExpression.h" #include "CBot/CBotVar/CBotVar.h" @@ -138,14 +139,14 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) if (p->GetType() == TokenTypNum || p->GetType() == TokenTypDef ) { - CBotInstr* inst = CBotExprNum::Compile(p, pStk); + CBotInstr* inst = CBotExprLitNum::Compile(p, pStk); return pStack->Return(inst, pStk); } // is this a chaine? if (p->GetType() == TokenTypString) { - CBotInstr* inst = CBotExprAlpha::Compile(p, pStk); + CBotInstr* inst = CBotExprLitString::Compile(p, pStk); return pStack->Return(inst, pStk); } @@ -153,7 +154,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) if (p->GetType() == ID_TRUE || p->GetType() == ID_FALSE ) { - CBotInstr* inst = CBotExprBool::Compile(p, pStk); + CBotInstr* inst = CBotExprLitBool::Compile(p, pStk); return pStack->Return(inst, pStk); } @@ -167,7 +168,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) // is a null pointer if (IsOfType(p, ID_NULL)) { - CBotInstr* inst = new CBotExprNull (); + CBotInstr* inst = new CBotExprLitNull(); inst->SetToken(pp); CBotVar* var = CBotVar::Create("", CBotTypNullPointer); pStk->SetVar(var); @@ -177,7 +178,7 @@ CBotInstr* CBotParExpr::Compile(CBotToken* &p, CBotCStack* pStack) // is a number nan if (IsOfType(p, ID_NAN)) { - CBotInstr* inst = new CBotExprNan (); + CBotInstr* inst = new CBotExprLitNan(); inst->SetToken(pp); CBotVar* var = CBotVar::Create("", CBotTypInt); var->SetInit(CBotVar::InitType::IS_NAN); diff --git a/src/CBot/CBotInstr/CBotParExpr.h b/src/CBot/CBotInstr/CBotParExpr.h index 636c172b..c72b49d1 100644 --- a/src/CBot/CBotInstr/CBotParExpr.h +++ b/src/CBot/CBotInstr/CBotParExpr.h @@ -36,11 +36,11 @@ namespace CBot * * pre- or post- incremented or decremented variable -- CBotPreIncExpr, CBotPostIncExpr -- a++, ++a, a--, --a * * a function call -- CBotInstrCall * * a class method call -- CBotInstrMethode - * * number literal (or numerical constant from CBotToken::DefineNum()) -- CBotExprNum - * * string literal -- CBotExprAlpha - * * boolean literal -- CBotExprBool -- true/false - * * null -- CBotExprNull - * * nan -- CBotExprNan + * * number literal (or numerical constant from CBotToken::DefineNum()) -- CBotExprLitNum + * * string literal -- CBotExprLitString + * * boolean literal -- CBotExprLitBool -- true/false + * * null -- CBotExprLitNull + * * nan -- CBotExprLitNan * * class instance creation with "new" -- CBotNew */ class CBotParExpr : public CBotInstr diff --git a/src/CBot/CBotProgram.cpp b/src/CBot/CBotProgram.cpp index c52b3293..93093f28 100644 --- a/src/CBot/CBotProgram.cpp +++ b/src/CBot/CBotProgram.cpp @@ -19,7 +19,7 @@ #include "CBot/CBotVar/CBotVar.h" -#include "CBotExternalCall.h" +#include "CBot/CBotExternalCall.h" #include "CBot/CBotStack.h" #include "CBot/CBotCStack.h" #include "CBot/CBotClass.h" diff --git a/src/CBot/CBotStack.cpp b/src/CBot/CBotStack.cpp index dd544d74..6541a255 100644 --- a/src/CBot/CBotStack.cpp +++ b/src/CBot/CBotStack.cpp @@ -18,7 +18,6 @@ */ #include "CBot/CBotStack.h" -#include "CBotExternalCall.h" #include "CBot/CBotInstr/CBotFunction.h" @@ -27,6 +26,7 @@ #include "CBot/CBotFileUtils.h" #include "CBot/CBotUtils.h" +#include "CBot/CBotExternalCall.h" #include #include diff --git a/src/CBot/CBotStack.h b/src/CBot/CBotStack.h index ede289da..567cc9ae 100644 --- a/src/CBot/CBotStack.h +++ b/src/CBot/CBotStack.h @@ -466,7 +466,7 @@ private: CBotStack* m_next; CBotStack* m_next2; CBotStack* m_prev; - friend class CBotInstArray; + friend class CBotDefArray; int m_state; int m_step; diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt index a6475726..1f17e6bb 100644 --- a/src/CBot/CMakeLists.txt +++ b/src/CBot/CMakeLists.txt @@ -1,75 +1,75 @@ set(SOURCES - CBotUtils.cpp - CBotFileUtils.cpp + CBotCallMethode.cpp CBotClass.cpp + CBotCStack.cpp CBotDebug.cpp + CBotDefParam.cpp + CBotExternalCall.cpp + CBotFileUtils.cpp CBotProgram.cpp CBotStack.cpp - CBotCStack.cpp CBotToken.cpp - CBotExternalCall.cpp - CBotDefParam.cpp - CBotCallMethode.cpp CBotTypResult.cpp - CBotInstr/CBotInstr.cpp - CBotInstr/CBotInstrUtils.cpp - CBotInstr/CBotWhile.cpp - CBotInstr/CBotDo.cpp - CBotInstr/CBotFor.cpp - CBotInstr/CBotListExpression.cpp - CBotInstr/CBotSwitch.cpp - CBotInstr/CBotCase.cpp - CBotInstr/CBotBreak.cpp - CBotInstr/CBotTry.cpp - CBotInstr/CBotCatch.cpp - CBotInstr/CBotThrow.cpp - CBotInstr/CBotExprAlpha.cpp - CBotInstr/CBotExprNum.cpp - CBotInstr/CBotNew.cpp - CBotInstr/CBotExprNan.cpp - CBotInstr/CBotExprNull.cpp - CBotInstr/CBotExprBool.cpp - CBotInstr/CBotLeftExprVar.cpp - CBotInstr/CBotPreIncExpr.cpp - CBotInstr/CBotPostIncExpr.cpp - CBotInstr/CBotExprVar.cpp - CBotInstr/CBotInstrMethode.cpp - CBotInstr/CBotInstrCall.cpp - CBotInstr/CBotListInstr.cpp + CBotUtils.cpp CBotInstr/CBotBlock.cpp - CBotInstr/CBotExprUnaire.cpp - CBotInstr/CBotParExpr.cpp CBotInstr/CBotBoolExpr.cpp - CBotInstr/CBotLogicExpr.cpp - CBotInstr/CBotTwoOpExpr.cpp - CBotInstr/CBotExpression.cpp - CBotInstr/CBotIndexExpr.cpp - CBotInstr/CBotFieldExpr.cpp - CBotInstr/CBotLeftExpr.cpp + CBotInstr/CBotBreak.cpp + CBotInstr/CBotCase.cpp + CBotInstr/CBotCatch.cpp CBotInstr/CBotCondition.cpp - CBotInstr/CBotClassInst.cpp - CBotInstr/CBotIString.cpp - CBotInstr/CBotFloat.cpp - CBotInstr/CBotBoolean.cpp + CBotInstr/CBotDefArray.cpp + CBotInstr/CBotDefBoolean.cpp + CBotInstr/CBotDefClass.cpp + CBotInstr/CBotDefFloat.cpp + CBotInstr/CBotDefInt.cpp + CBotInstr/CBotDefString.cpp + CBotInstr/CBotDo.cpp CBotInstr/CBotEmpty.cpp - CBotInstr/CBotReturn.cpp - CBotInstr/CBotIf.cpp - CBotInstr/CBotListArray.cpp - CBotInstr/CBotInstArray.cpp - CBotInstr/CBotInt.cpp + CBotInstr/CBotExpression.cpp + CBotInstr/CBotExprLitBool.cpp + CBotInstr/CBotExprLitNan.cpp + CBotInstr/CBotExprLitNull.cpp + CBotInstr/CBotExprLitNum.cpp + CBotInstr/CBotExprLitString.cpp + CBotInstr/CBotExprUnaire.cpp + CBotInstr/CBotExprVar.cpp + CBotInstr/CBotFieldExpr.cpp + CBotInstr/CBotFor.cpp CBotInstr/CBotFunction.cpp + CBotInstr/CBotIf.cpp + CBotInstr/CBotIndexExpr.cpp + CBotInstr/CBotInstrCall.cpp + CBotInstr/CBotInstr.cpp + CBotInstr/CBotInstrMethode.cpp + CBotInstr/CBotInstrUtils.cpp + CBotInstr/CBotLeftExpr.cpp + CBotInstr/CBotLeftExprVar.cpp + CBotInstr/CBotListArray.cpp + CBotInstr/CBotListExpression.cpp + CBotInstr/CBotListInstr.cpp + CBotInstr/CBotLogicExpr.cpp + CBotInstr/CBotNew.cpp + CBotInstr/CBotParExpr.cpp + CBotInstr/CBotPostIncExpr.cpp + CBotInstr/CBotPreIncExpr.cpp + CBotInstr/CBotReturn.cpp + CBotInstr/CBotSwitch.cpp + CBotInstr/CBotThrow.cpp + CBotInstr/CBotTry.cpp + CBotInstr/CBotTwoOpExpr.cpp + CBotInstr/CBotWhile.cpp CBotVar/CBotVarArray.cpp - CBotVar/CBotVarPointer.cpp - CBotVar/CBotVarClass.cpp CBotVar/CBotVarBoolean.cpp - CBotVar/CBotVarString.cpp + CBotVar/CBotVarClass.cpp + CBotVar/CBotVar.cpp CBotVar/CBotVarFloat.cpp CBotVar/CBotVarInt.cpp - CBotVar/CBotVar.cpp - stdlib/FileFunctions.cpp - stdlib/StringFunctions.cpp - stdlib/MathFunctions.cpp + CBotVar/CBotVarPointer.cpp + CBotVar/CBotVarString.cpp stdlib/Compilation.cpp + stdlib/FileFunctions.cpp + stdlib/MathFunctions.cpp + stdlib/StringFunctions.cpp ) # Includes