Changeset 511 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/include
- Timestamp:
- Apr 30, 2008, 8:04:04 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/include/Class.h
r510 r511 411 411 412 412 // クラス継承 413 bool Inherits( const char *inheritNames, int nowLine );414 413 bool InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine ); 415 bool InheritsInterface( const CClass &inheritsClass, int nowLine );416 414 417 415 // インターフェイス実装 418 416 bool Implements( const CClass &interfaceClass, const Types &actualTypeParameters, int nowLine ); 419 bool Implements( const char *interfaceNames, int nowLine );420 417 421 418 //メンバ、メソッドの追加 … … 423 420 void AddMember( Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer, int nowLine ); 424 421 void AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine ); 425 426 void AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,427 bool isVirtual, bool isOverride, bool isAutoGeneration, char *buffer, int nowLine);428 422 429 423 //重複チェック … … 593 587 bool Insert( CClass *pClass, int nowLine ); 594 588 CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine); 595 virtual void CollectClassesForNameOnly( const BasicSource &source );596 589 597 590 // vtblを一時的に生成 … … 603 596 virtual void InitStaticMember(); 604 597 605 private:606 bool MemberVar_LoopRefCheck(const CClass &objClass);607 public:608 virtual void GetClass_recur(const char *lpszInheritsClass);609 void LookaheadClass( const char *className );610 bool LoopRefCheck( const CClass &objClass );611 virtual void GetAllClassInfo();612 598 virtual void Compile_System_InitializeUserTypes(); 613 599 virtual void Compile_System_InitializeUserTypesForBaseType(); -
trunk/ab5.0/abdev/BasicCompiler_Common/include/LexicalAnalyzer.h
r508 r511 7 7 { 8 8 public: 9 10 // 名前空間を収集 9 11 static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection ); 12 13 // フルネーム識別子をシンボルに変換する 10 14 static Symbol FullNameToSymbol( const char *fullName ); 11 15 static Symbol FullNameToSymbol( const std::string &fullName ); 16 17 // クラスの名前情報を収集する 18 static void CollectClassesForNameOnly( const char *source, Classes &classes ); 19 20 // クラスを収集する 21 static void AddMethod(CClass *pobj_c, UserProc *pUserProc, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract, 22 bool isVirtual, bool isOverride, const char *interfaceName, bool isAutoGeneration, int nowLine); 23 static bool Inherits( CClass ¤tClass, const char *inheritNames, int nowLine ); 24 static bool Implements( CClass ¤tClass, const char *interfaceNames, int nowLine ); 25 static void LookaheadClass( const char *className, Classes &classes ); 26 static bool LoopRefCheck( const CClass &objClass ); 27 static void CollectClasses( const char *source, Classes &classes ); 28 29 // グローバルプロシージャを収集する 30 static UserProc* ParseUserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic, char *interfaceName = NULL ); 31 static void CollectProcedures( const BasicSource &source, UserProcs &userProcs, DllProcs &dllProcs ); 12 32 }; 13 33 -
trunk/ab5.0/abdev/BasicCompiler_Common/include/Procedure.h
r382 r511 180 180 public: 181 181 182 UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport , int id)182 UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport ) 183 183 : Procedure( namespaceScopes, name, kind, isCdecl ) 184 184 , importedNamespaces( importedNamespaces ) … … 187 187 , pMethod( NULL ) 188 188 , isMacro( isMacro ) 189 , secondParmNum( 0 ) 190 , realSecondParmNum( 1 ) 189 191 , isExport( isExport ) 190 192 , isSystem( false ) … … 193 195 , beginOpAddress( 0 ) 194 196 , endOpAddress( 0 ) 195 , id( id ) 196 { 197 { 198 static int id_base=0; 199 id = ( id_base ++ ); 197 200 } 198 201 UserProc() … … 204 207 delete pParam; 205 208 } 209 } 210 211 void SetReturnType( const Type &newReturnType ) 212 { 213 returnType = newReturnType; 206 214 } 207 215 … … 244 252 return realParams; 245 253 } 254 void SetRealParams( const Parameters ¶ms ) 255 { 256 realParams = params; 257 } 246 258 int GetRealSecondParmNum() const 247 259 { … … 396 408 class UserProcs : public Jenga::Common::Hashmap<UserProc> 397 409 { 398 std::vector<std::string> macroNames;399 400 410 // XMLシリアライズ用 401 411 private: … … 407 417 ar & boost::serialization::make_nvp("Hashmap_UserProcImpl", 408 418 boost::serialization::base_object<Jenga::Common::Hashmap<UserProc>>(*this)); 409 ar & BOOST_SERIALIZATION_NVP( macroNames );410 419 } 411 420 … … 420 429 421 430 bool Insert( UserProc *pUserProc, int nowLine ); 422 423 UserProc *AddUserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, char *buffer,int nowLine,bool isVirtual,CClass *pobj_c, bool isStatic, char *interfaceName = NULL );424 431 425 432 void EnumGlobalProcs( const char *simpleName, const char *localName, std::vector<const UserProc *> &subs ); … … 511 518 }; 512 519 513 void CollectProcedures( const BasicSource &source, UserProcs &userProcs, DllProcs &dllProcs );514 515 520 class ProcPointer : public Procedure 516 521 { -
trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h
r509 r511 57 57 58 58 public: 59 Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ) 60 : Symbol( ActiveBasic::Compiler::LexicalAnalyzer::FullNameToSymbol( name ) ) 61 , type( type ) 62 , isConst( isConst ) 63 , isRef( isRef ) 64 , isArray( false ) 65 , isParameter( false) 66 , paramStrForConstructor( paramStrForConstructor ) 67 , hasInitData( hasInitData ) 68 { 69 } 70 Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ) 71 : Symbol( namespaceScopes, name ) 72 , type( type ) 73 , isConst( isConst ) 74 , isRef( isRef ) 75 , isArray( false ) 76 , isParameter( false) 77 , paramStrForConstructor( paramStrForConstructor ) 78 , hasInitData( hasInitData ) 79 { 80 } 81 Variable( const Variable &var ) 82 : Symbol( var ) 83 , type( var.type ) 84 , isConst( var.isConst ) 85 , isRef( var.isRef ) 86 , isArray( var.isArray ) 87 , subscripts( var.subscripts ) 88 , isParameter( false ) 89 , paramStrForConstructor( var.paramStrForConstructor ) 90 , hasInitData( var.hasInitData ) 91 { 92 } 93 Variable() 94 { 95 } 96 ~Variable() 97 { 98 } 59 Variable( const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ); 60 Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst, bool isRef, const std::string ¶mStrForConstructor, bool hasInitData ); 61 Variable( const Variable &var ); 62 Variable(); 99 63 100 64 void SetArray( const Subscripts &subscripts ){
Note:
See TracChangeset
for help on using the changeset viewer.