Changeset 509 in dev for trunk/ab5.0


Ignore:
Timestamp:
Apr 29, 2008, 12:27:10 PM (16 years ago)
Author:
dai_9181
Message:

Symbolクラスをab_commonプロジェクトに移動した。

Location:
trunk/ab5.0/abdev
Files:
13 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/hash.cpp

    r485 r509  
    1010#include "../compiler_x86/opcode.h"
    1111#endif
     12
     13using namespace ActiveBasic::Compiler;
    1214
    1315int hash_default(const char *name){
     
    3335    DllProc *pDllProc = compiler.GetObjectModule().meta.GetDllProcs().GetHashArrayElement( simpleName );
    3436    while(pDllProc){
    35         if( pDllProc->IsEqualSymbol( fullName ) ){
     37        if( pDllProc->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( fullName ) ) ){
    3638            return pDllProc;
    3739        }
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Const.h

    r271 r509  
    22
    33#include <Type.h>
    4 #include <Symbol.h>
    54
    65
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Prototype.h

    r276 r509  
    33#include <string>
    44#include <vector>
    5 
    6 #include <BoostSerializationSupport.h>
    7 
    8 #include <Symbol.h>
    95
    106using namespace std;
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/TypeDef.h

    r505 r509  
    55
    66#include <Type.h>
    7 #include <Symbol.h>
    87
    98using namespace std;
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/Variable.h

    r508 r509  
    33#include <option.h>
    44#include <Program.h>
    5 #include <Symbol.h>
    65#include <Type.h>
    76#include <Binary.h>
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp

    r465 r509  
    33#include <Compiler.h>
    44
     5using namespace ActiveBasic::Compiler;
    56
    67double CConst::GetDoubleData(){
     
    8182    while( pConst )
    8283    {
    83         if( pConst->IsEqualSymbol( name ) )
     84        if( pConst->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( name ) ) )
    8485        {
    8586            break;
     
    251252    while( pConstMacro )
    252253    {
    253         if( pConstMacro->IsEqualSymbol( name ) )
     254        if( pConstMacro->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( name ) ) )
    254255        {
    255256            break;
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp

    r508 r509  
    4545#include <abdev/ab_common/include/Namespace.h>
    4646#include <abdev/ab_common/include/NamespaceSupporter.h>
     47#include <abdev/ab_common/include/Symbol.h>
    4748
    4849using namespace ActiveBasic::Common::Lexical;
     
    5051#include <Hashmap.h>
    5152#include <Configuration.h>
    52 #include <Symbol.h>
    5353#include <LexicalAnalyzer.h>
    5454#include <Program.h>
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Procedure.cpp

    r507 r509  
    1010#include "../../compiler_x86/opcode.h"
    1111#endif
     12
     13using namespace ActiveBasic::Compiler;
    1214
    1315
     
    695697    while(pUserProc){
    696698        if( pUserProc->IsGlobalProcedure() ){
    697             if( pUserProc->IsEqualSymbol( localName ) ){
     699            if( pUserProc->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( localName ) ) ){
    698700                subs.push_back( pUserProc );
    699701            }
  • trunk/ab5.0/abdev/ab_common/ab_common.vcproj

    r507 r509  
    324324                    >
    325325                </File>
     326                <File
     327                    RelativePath=".\include\Symbol.h"
     328                    >
     329                </File>
    326330            </Filter>
    327331        </Filter>
     
    350354                    >
    351355                </File>
     356                <File
     357                    RelativePath=".\src\Symbol.cpp"
     358                    >
     359                </File>
    352360            </Filter>
    353361        </Filter>
  • trunk/ab5.0/abdev/ab_common/include/Symbol.h

    r508 r509  
    11#pragma once
    22
    3 #include <vector>
    4 #include <string>
     3namespace ActiveBasic{ namespace Common{ namespace Lexical{
    54
    6 #include <BoostSerializationSupport.h>
    7 
    8 using namespace std;
    95
    106class Symbol
     
    139
    1410    NamespaceScopes namespaceScopes;
    15     string name;
     11    std::string name;
    1612
    1713    // XMLシリアライズ用
     
    4137public:
    4238    bool isTargetObjectModule;
    43     Symbol( const NamespaceScopes &namespaceScopes, const string &name )
     39    Symbol( const NamespaceScopes &namespaceScopes, const std::string &name )
    4440        : namespaceScopes( namespaceScopes )
    4541        , name( name )
     
    6763        return namespaceScopes;
    6864    }
    69     const string &GetName() const
     65    const std::string &GetName() const
    7066    {
    7167        return name;
     
    7470
    7571    // シンボル比較
    76     bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
     72    bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const std::string &name ) const;
    7773    bool IsEqualSymbol( const Symbol &symbol ) const;
    78     bool IsEqualSymbol( const char *fullName ) const;
    79     bool IsEqualSymbol( const string &fullName ) const
    80     {
    81         return IsEqualSymbol( fullName.c_str() );
    82     }
    8374};
     75
     76
     77}}}
  • trunk/ab5.0/abdev/ab_common/src/Symbol.cpp

    r508 r509  
    11#include "stdafx.h"
    22
    3 #include <Compiler.h>
    4 #include <Symbol.h>
     3using namespace ActiveBasic::Common::Lexical;
    54
    65const NamespaceSupporter *Symbol::namespaceSupporter = NULL;
     
    1615}
    1716
    18 bool Symbol::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
     17bool Symbol::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const std::string &name ) const
    1918{
    2019    if( GetName() != name ){
     
    3635        // 静的メンバを考慮
    3736        NamespaceScopes namespaceScopes( symbol.GetNamespaceScopes() );
    38         string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName();
     37        std::string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName();
    3938        namespaceScopes.pop_back();
    4039
     
    4342    return false;
    4443}
    45 bool Symbol::IsEqualSymbol( const char *fullName ) const
    46 {
    47     char AreaName[VN_SIZE] = "";        //オブジェクト変数
    48     char NestName[VN_SIZE] = "";        //入れ子メンバ
    49     bool isNest = SplitMemberName( fullName, AreaName, NestName );
    50 
    51     if( IsEqualSymbol( NamespaceScopes( AreaName ), NestName ) ){
    52         return true;
    53     }
    54 
    55     return false;
    56 }
  • trunk/ab5.0/abdev/ab_common/stdafx.h

    r507 r509  
    3535#include <Namespace.h>
    3636#include <NamespaceSupporter.h>
     37#include <Symbol.h>
  • trunk/ab5.0/abdev/compiler_x86/Compile_CallProc.cpp

    r465 r509  
    55#include "../BasicCompiler_Common/common.h"
    66#include "Opcode.h"
     7
     8using namespace ActiveBasic::Compiler;
    79
    810void Call_DebugSys_SaveContext(){
     
    435437{
    436438    extern BOOL bDebugSupportProc;
    437     if( compiler.IsDebug() && bDebugSupportProc==0 && pDllProc->IsEqualSymbol( "DebugBreak" ) )
     439    if( compiler.IsDebug() && bDebugSupportProc==0 && pDllProc->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( "DebugBreak" ) ) )
    438440    {
    439441        Call_DebugSys_SaveContext();
  • trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj

    r507 r509  
    13441344                    </File>
    13451345                    <File
    1346                         RelativePath="..\BasicCompiler_Common\src\Symbol.cpp"
    1347                         >
    1348                     </File>
    1349                     <File
    13501346                        RelativePath="..\BasicCompiler_Common\src\Type.cpp"
    13511347                        >
     
    15411537                    </File>
    15421538                    <File
    1543                         RelativePath="..\BasicCompiler_Common\include\Symbol.h"
    1544                         >
    1545                     </File>
    1546                     <File
    15471539                        RelativePath="..\BasicCompiler_Common\include\Type.h"
    15481540                        >
  • trunk/ab5.0/abdev/compiler_x86/stdafx.h

    r508 r509  
    3434#include <abdev/ab_common/include/Namespace.h>
    3535#include <abdev/ab_common/include/NamespaceSupporter.h>
     36#include <abdev/ab_common/include/Symbol.h>
    3637
    3738using namespace ActiveBasic::Common::Lexical;
     
    4243#include <Hashmap.h>
    4344#include <Configuration.h>
    44 #include <Symbol.h>
    4545#include <LexicalAnalyzer.h>
    4646#include <Program.h>
Note: See TracChangeset for help on using the changeset viewer.