Changeset 506 in dev


Ignore:
Timestamp:
Apr 28, 2008, 7:52:46 PM (16 years ago)
Author:
dai_9181
Message:

LexicalAnalyzerクラスを追加。

Location:
trunk/ab5.0/abdev
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/include/NamespaceSupporter.h

    r505 r506  
    9797        return false;
    9898    }
    99 
    100     static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
    10199};
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/NamespaceSupporter.cpp

    r465 r506  
    1414    return true;
    1515}
    16 
    17 bool NamespaceSupporter::CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection )
    18 {
    19     int i, i2;
    20     char temporary[1024];
    21 
    22     bool isSuccessful = true;
    23 
    24     // 名前空間管理
    25     NamespaceScopes namespaceScopes;
    26 
    27     for(i=0;;i++){
    28         if(source[i]=='\0') break;
    29 
    30         if( source[i] == 1 && source[i+1] == ESC_NAMESPACE ){
    31             for(i+=2,i2=0;;i2++,i++){
    32                 if( IsCommandDelimitation( source[i] ) ){
    33                     temporary[i2]=0;
    34                     break;
    35                 }
    36                 temporary[i2]=source[i];
    37             }
    38             namespaceScopes.push_back( temporary );
    39 
    40             if( !namespaceScopesCollection.IsExist( namespaceScopes ) ){
    41                 namespaceScopesCollection.push_back( namespaceScopes );
    42             }
    43 
    44             continue;
    45         }
    46         else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){
    47             if( namespaceScopes.size() <= 0 ){
    48                 compiler.errorMessenger.Output( 12, "End Namespace", i );
    49                 isSuccessful = false;
    50             }
    51             else{
    52                 namespaceScopes.pop_back();
    53             }
    54 
    55             i += 2;
    56             continue;
    57         }
    58     }
    59 
    60     if( namespaceScopes.size() > 0 ){
    61         compiler.errorMessenger.Output( 63, NULL, cp );
    62         isSuccessful = false;
    63     }
    64 
    65     return isSuccessful;
    66 }
  • trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp

    r477 r506  
    153153
    154154    // 名前空間情報を取得
    155     NamespaceSupporter::CollectNamespaces(
     155    ActiveBasic::Compiler::LexicalAnalyzer::CollectNamespaces(
    156156        compiler.GetObjectModule().GetCurrentSource().GetBuffer(),
    157157        compiler.GetObjectModule().meta.GetNamespaces()
  • trunk/ab5.0/abdev/compiler_x86/compiler_x86.vcproj

    r505 r506  
    55    Name="compiler_x86"
    66    ProjectGUID="{11F0E9AB-EAEC-4616-A9DD-838073342CBB}"
     7    RootNamespace="compiler_x86"
    78    >
    89    <Platforms>
     
    12521253                </File>
    12531254                <File
     1255                    RelativePath="..\BasicCompiler_Common\src\LexicalAnalyzer.cpp"
     1256                    >
     1257                </File>
     1258                <File
    12541259                    RelativePath="..\BasicCompiler_Common\src\Linker.cpp"
    12551260                    >
     
    14611466                </File>
    14621467                <File
     1468                    RelativePath="..\BasicCompiler_Common\include\LexicalAnalyzer.h"
     1469                    >
     1470                </File>
     1471                <File
    14631472                    RelativePath="..\BasicCompiler_Common\include\Linker.h"
    14641473                    >
  • trunk/ab5.0/abdev/compiler_x86/stdafx.h

    r505 r506  
    4444#include <Compiler.h>
    4545#include <Debugger.h>
     46#include <LexicalAnalyzer.h>
Note: See TracChangeset for help on using the changeset viewer.