Ignore:
Timestamp:
Apr 29, 2008, 11:36:37 AM (16 years ago)
Author:
dai_9181
Message:

Symbolコンストラクタを少なくし、LexicalAnalyzer::FullNameToSymbolメソッドを実装。

Location:
trunk/ab5.0/abdev/BasicCompiler_Common/src
Files:
3 edited

Legend:

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

    r506 r508  
    5353    return isSuccessful;
    5454}
     55
     56Symbol LexicalAnalyzer::FullNameToSymbol( const char *fullName )
     57{
     58    char areaName[VN_SIZE] = "";        //オブジェクト変数
     59    char nestName[VN_SIZE] = "";        //入れ子メンバ
     60    bool isNest = SplitMemberName( fullName, areaName, nestName );
     61
     62    return Symbol( NamespaceScopes( areaName ), nestName );
     63}
     64
     65Symbol LexicalAnalyzer::FullNameToSymbol( const std::string &fullName )
     66{
     67    return FullNameToSymbol( fullName.c_str() );
     68}
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/ObjectModule.cpp

    r507 r508  
    4949
    5050#include <Hashmap.h>
     51#include <Configuration.h>
     52#include <Symbol.h>
     53#include <LexicalAnalyzer.h>
     54#include <Program.h>
    5155#include <Compiler.h>
     56#include <Debugger.h>
    5257
    5358
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Symbol.cpp

    r504 r508  
    55
    66const NamespaceSupporter *Symbol::namespaceSupporter = NULL;
    7 
    8 Symbol::Symbol( const char *fullName )
    9     : isTargetObjectModule( true )
    10 {
    11     char areaName[VN_SIZE] = "";        //オブジェクト変数
    12     char nestName[VN_SIZE] = "";        //入れ子メンバ
    13     bool isNest = SplitMemberName( fullName, areaName, nestName );
    14 
    15     namespaceScopes = NamespaceScopes( areaName );
    16     name = nestName;
    17 }
    18 Symbol::Symbol( const string &fullName )
    19     : isTargetObjectModule( true )
    20 {
    21     char areaName[VN_SIZE] = "";        //オブジェクト変数
    22     char nestName[VN_SIZE] = "";        //入れ子メンバ
    23     bool isNest = SplitMemberName( fullName.c_str(), areaName, nestName );
    24 
    25     namespaceScopes = NamespaceScopes( areaName );
    26     name = nestName;
    27 }
    287
    298std::string Symbol::GetFullName() const
Note: See TracChangeset for help on using the changeset viewer.