Index: trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/BasicCompiler.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
 #include <Program.h>
 
@@ -185,5 +187,5 @@
 	}
 
-	i3=baseDirPath.size();i4=0;
+	i3=(int)baseDirPath.size();i4=0;
 	while(i4<i2){
 		for(i3--;;i3--){
@@ -550,5 +552,5 @@
 	char temporary[1024],temp2[MAX_PATH];
 
-	//MessageBox(0,"starting compiler/debugger","ActiveBasic",MB_OK);
+	MessageBox(0,"starting compiler/debugger","ActiveBasic",MB_OK);
 	trace( "Start ActiveBasic Compiler!" );
 
@@ -702,5 +704,5 @@
 		//Unicode
 		else if( lstrcmp( temp2, "unicode" ) ==0 ){
-			isUnicode = true;
+			Smoothie::SetUnicodeMark( true );
 			typeOfPtrChar = MAKE_PTR_TYPE(DEF_WORD,1);
 			typeOfPtrUChar = MAKE_PTR_TYPE(DEF_WORD,1);
Index: trunk/abdev/BasicCompiler_Common/BasicCompiler.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/BasicCompiler.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/BasicCompiler.h	(revision 182)
@@ -79,5 +79,4 @@
 
 BOOL bDll;
-bool isUnicode = false;
 int typeOfPtrChar = MAKE_PTR_TYPE(DEF_SBYTE,1);
 int typeOfPtrUChar = MAKE_PTR_TYPE(DEF_BYTE,1);
Index: trunk/abdev/BasicCompiler_Common/Class.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Class.cpp	(revision 169)
+++ 	(revision )
@@ -1,1696 +1,0 @@
-#include "common.h"
-
-#ifdef _AMD64_
-#include "../BasicCompiler64/opcode.h"
-#else
-#include "../BasicCompiler32/opcode.h"
-#endif
-
-Classes *pobj_DBClass;
-
-const CClass *pobj_CompilingClass;
-
-CMember *pCompilingMethod;
-
-
-CClass::CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name )
-	: isReady( false )
-	, Prototype( namespaceScopes, name )
-	, importedNamespaces( importedNamespaces )
-	, ConstructorMemberSubIndex( 0 )
-	, DestructorMemberSubIndex( 0 )
-	, classType( Class )
-	, pobj_InheritsClass( NULL )
-	, vtblNum( 0 )
-	, iAlign( 0 )
-	, vtbl_offset( -1 )
-	, isCompilingConstructor( false )
-	, isCompilingDestructor( false )
-	, pobj_NextClass( NULL )
-{
-}
-CClass::~CClass(){
-	// 動的メンバ
-	foreach( CMember *member, dynamicMembers ){
-		delete member;
-	}
-
-	// 静的メンバ
-	foreach( CMember *member, staticMembers ){
-		delete member;
-	}
-}
-
-bool CClass::IsInheritsInterface( const CClass *pInterfaceClass ) const
-{
-	BOOST_FOREACH( const InheritedInterface &objInterface, interfaces ){
-		if( pInterfaceClass == &objInterface.GetInterfaceClass() ){
-			return true;
-		}
-	}
-	return false;
-}
-
-bool CClass::IsClass() const
-{
-	return classType == CClass::Class;
-}
-bool CClass::IsInterface() const
-{
-	return classType == CClass::Interface;
-}
-bool CClass::IsEnum() const
-{
-	return classType == CClass::Enum;
-}
-bool CClass::IsDelegate() const
-{
-	return classType == CClass::Delegate;
-}
-bool CClass::IsStructure() const
-{
-	return classType == CClass::Structure;
-}
-
-bool CClass::Inherits( const char *inheritNames, int nowLine ){
-	int i = 0;
-	bool isInheritsClass = false;
-	while( true ){
-
-		char temporary[VN_SIZE];
-		for( int i2=0;; i++, i2++ ){
-			if( inheritNames[i] == '\0' || inheritNames[i] == ',' ){
-				temporary[i2] = 0;
-				break;
-			}
-			temporary[i2] = inheritNames[i];
-		}
-
-		//継承元クラスを取得
-		const CClass *pInheritsClass = pobj_DBClass->Find(temporary);
-		if( !pInheritsClass ){
-			SetError(106,temporary,nowLine);
-			return false;
-		}
-
-		if( pInheritsClass->IsInterface() ){
-			// インターフェイスはあとで継承する
-		}
-		else if( pInheritsClass->IsClass() ){
-			// クラスを継承する
-			isInheritsClass = true;
-
-			if( !InheritsClass( *pInheritsClass, nowLine ) ){
-				return false;
-			}
-		}
-		else{
-			SetError(135,NULL,nowLine);
-			return false;
-		}
-
-		if( inheritNames[i] == '\0' ){
-			break;
-		}
-		i++;
-	}
-
-	if( !isInheritsClass ){
-		// クラスを一つも継承していないとき
-		const CClass *pObjectClass = pobj_DBClass->Find("Object");
-		if( !pObjectClass ){
-			SetError(106,"Object",i);
-			return false;
-		}
-
-		if( !InheritsClass( *pObjectClass, nowLine ) ){
-			return false;
-		}
-	}
-
-	i=0;
-	while( true ){
-
-		char temporary[VN_SIZE];
-		for( int i2=0;; i++, i2++ ){
-			if( inheritNames[i] == '\0' || inheritNames[i] == ',' ){
-				temporary[i2] = 0;
-				break;
-			}
-			temporary[i2] = inheritNames[i];
-		}
-
-		//継承元クラスを取得
-		const CClass *pInheritsClass = pobj_DBClass->Find(temporary);
-		if( !pInheritsClass ){
-			SetError(106,temporary,nowLine);
-			return false;
-		}
-
-		if( pInheritsClass->IsInterface() ){
-			// インターフェイスを継承する
-			if( !InheritsInterface( *pInheritsClass, nowLine ) ){
-				return false;
-			}
-		}
-		else if( pInheritsClass->IsClass() ){
-			// クラスはさっき継承した
-		}
-		else{
-			SetError(135,NULL,nowLine);
-			return false;
-		}
-
-		if( inheritNames[i] == '\0' ){
-			break;
-		}
-		i++;
-	}
-
-	return true;
-}
-bool CClass::InheritsClass( const CClass &inheritsClass, int nowLine ){
-
-	//ループ継承でないかをチェック
-	if(pobj_LoopRefCheck->check(inheritsClass)){
-		SetError(123,inheritsClass.GetName(),nowLine);
-		return false;
-	}
-
-	if( !inheritsClass.IsReady() ){
-		//継承先が読み取られていないとき
-		pobj_LoopRefCheck->add(this->GetName().c_str());
-		pobj_DBClass->GetClass_recur(inheritsClass.GetName().c_str());
-		pobj_LoopRefCheck->del(this->GetName().c_str());
-	}
-
-	//メンバをコピー
-	BOOST_FOREACH( CMember *inheritsClassDynamicMember, inheritsClass.dynamicMembers ){
-		CMember *pMember = new CMember( *inheritsClassDynamicMember );
-
-		// アクセシビリティ
-		if( inheritsClassDynamicMember->IsPrivate() ){
-			pMember->SetAccessibility( Prototype::None );
-		}
-		else{
-			pMember->SetAccessibility( inheritsClassDynamicMember->GetAccessibility() );
-		}
-
-		dynamicMembers.push_back( pMember );
-	}
-
-	//メソッドをコピー
-	foreach( const CMethod *pBaseMethod, inheritsClass.methods ){
-		CMethod *pMethod = new DynamicMethod( *pBaseMethod );
-
-		// アクセシビリティ
-		if(pBaseMethod->GetAccessibility() == Prototype::Private){
-			pMethod->SetAccessibility( Prototype::None );
-		}
-		else{
-			pMethod->SetAccessibility( pBaseMethod->GetAccessibility() );
-		}
-
-		//pobj_Inherits
-		// ※継承元のClassIndexをセット（入れ子継承を考慮する）
-		if(pBaseMethod->GetInheritsClassPtr()==0){
-			pMethod->SetInheritsClassPtr( &inheritsClass );
-		}
-		else{
-			pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() );
-		}
-
-		methods.push_back( pMethod );
-	}
-
-	//仮想関数の数
-	AddVtblNum( inheritsClass.GetVtblNum() );
-
-	//継承先のクラスをメンバとして保持する
-	pobj_InheritsClass = &inheritsClass;
-
-	return true;
-}
-bool CClass::InheritsInterface( const CClass &inheritsInterface, int nowLine ){
-
-	//ループ継承でないかをチェック
-	if(pobj_LoopRefCheck->check(inheritsInterface)){
-		SetError(123,inheritsInterface.GetName(),nowLine);
-		return false;
-	}
-
-	if( !inheritsInterface.IsReady() ){
-		//継承先が読み取られていないとき
-		pobj_LoopRefCheck->add(this->GetName().c_str());
-		pobj_DBClass->GetClass_recur(inheritsInterface.GetName().c_str());
-		pobj_LoopRefCheck->del(this->GetName().c_str());
-	}
-
-	//メソッドをコピー
-	foreach( const CMethod *pBaseMethod, inheritsInterface.methods ){
-		CMethod *pMethod = new DynamicMethod( *pBaseMethod );
-
-		// アクセシビリティ
-		if(pBaseMethod->GetAccessibility() == Prototype::Private){
-			pMethod->SetAccessibility( Prototype::None );
-		}
-		else{
-			pMethod->SetAccessibility( pBaseMethod->GetAccessibility() );
-		}
-
-		//pobj_Inherits
-		// ※継承元のClassIndexをセット（入れ子継承を考慮する）
-		if(pBaseMethod->GetInheritsClassPtr()==0){
-			pMethod->SetInheritsClassPtr( &inheritsInterface );
-		}
-		else{
-			pMethod->SetInheritsClassPtr( pBaseMethod->GetInheritsClassPtr() );
-		}
-
-		methods.push_back( pMethod );
-	}
-
-	interfaces.push_back( InheritedInterface( const_cast<CClass *>(&inheritsInterface), vtblNum ) );
-
-	//仮想関数の数
-	AddVtblNum( inheritsInterface.GetVtblNum() );
-
-	return true;
-}
-void CClass::AddMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer ){
-	CMember *pMember = new CMember( this, accessibility, isConst, isRef, buffer );
-	dynamicMembers.push_back( pMember );
-}
-void CClass::AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine ){
-	CMember *pMember = new CMember( this, accessibility, isConst, isRef, buffer, nowLine );
-	staticMembers.push_back( pMember );
-}
-BOOL CClass::DupliCheckAll(const char *name){
-	//重複チェック
-
-	//メンバ
-	if(DupliCheckMember(name)) return 1;
-
-	//メソッド
-	foreach( const CMethod *pMethod, methods ){
-		if( lstrcmp( name, pMethod->pUserProc->GetName().c_str() ) == 0 ){
-			return 1;
-		}
-	}
-
-	return 0;
-}
-BOOL CClass::DupliCheckMember(const char *name){
-	//重複チェック
-
-	// 動的メンバ
-	BOOST_FOREACH( CMember *pMember, dynamicMembers ){
-		if( GetName() == pMember->GetName() ){
-			return 1;
-		}
-	}
-
-	// 静的メンバ
-	foreach( CMember *pMember, staticMembers ){
-		if( GetName() == pMember->GetName() ){
-			return 1;
-		}
-	}
-
-	return 0;
-}
-
-//デフォルト コンストラクタ メソッドを取得
-const CMethod *CClass::GetConstructorMethod() const
-{
-	if( ConstructorMemberSubIndex == -1 ) return NULL;
-	return methods[ConstructorMemberSubIndex];
-}
-
-//デストラクタ メソッドを取得
-const CMethod *CClass::GetDestructorMethod() const
-{
-	if( DestructorMemberSubIndex == -1 ) return NULL;
-	return methods[DestructorMemberSubIndex];
-}
-
-//サイズを取得
-int CClass::GetSize() const
-{
-	return GetMemberOffset( NULL, NULL );
-}
-
-//メンバのオフセットを取得
-int CClass::GetMemberOffset( const char *memberName, int *pMemberNum ) const
-{
-	int i2;
-
-	//仮想関数が存在する場合は関数リストへのポインタのサイズを追加
-	int offset = IsExistVirtualFunctions() ? PTR_SIZE : 0;
-
-	int alignment;
-	if(iAlign) alignment=iAlign;
-	else alignment=1;
-
-	int iMaxAlign=0;
-	int i = -1;
-	BOOST_FOREACH( CMember *pMember, dynamicMembers ){
-		i++;
-
-		i2 = pMember->GetType().GetSize();
-
-		//アラインメントを算出
-		int member_size;
-		if( pMember->GetType().IsStruct() ){
-			//メンバクラスのアラインメントを取得
-			member_size=pMember->GetType().GetClass().GetAlignment();
-		}
-		else{
-			//メンバサイズを取得
-			member_size=i2;
-		}
-		if(iMaxAlign<member_size) iMaxAlign=member_size;
-
-		//アラインメントを考慮
-		if(iAlign&&iAlign<member_size){
-			if(offset%alignment) offset+=alignment-(offset%alignment);
-		}
-		else{
-			if(alignment<member_size) alignment=member_size;
-
-			if(member_size==0){
-				//メンバを持たないクラス
-				//※何もしない（オフセットの計算をしない）
-			}
-			else{
-				if(offset%member_size) offset+=member_size-(offset%member_size);
-			}
-		}
-
-		if(memberName){
-			//メンバ指定がある場合は、オフセットを返す
-			if( pMember->GetName() == memberName ){
-				if(pMemberNum) *pMemberNum=i;
-				return offset;
-			}
-		}
-
-		//配列を考慮したメンバサイズを取得
-		member_size=i2 * JumpSubScripts(pMember->SubScripts);
-
-		//メンバサイズを加算
-		offset+= member_size;
-	}
-
-	if(iMaxAlign<alignment) alignment=iMaxAlign;
-
-	//アラインメントを考慮
-	if(alignment){
-		if(offset%alignment) offset+=alignment-(offset%alignment);
-	}
-
-	if(pMemberNum) *pMemberNum=i;
-	return offset;
-}
-
-int CClass::GetAlignment() const
-{
-	//仮想関数が存在する場合は関数リストへのポインタのサイズを追加
-	int alignment = IsExistVirtualFunctions() ? PTR_SIZE : 0;
-
-	BOOST_FOREACH( CMember *pMember, dynamicMembers ){
-		int member_size;
-		if(pMember->GetType().IsStruct()){
-			//メンバクラスのアラインメントを取得
-			member_size=pMember->GetType().GetClass().GetAlignment();
-		}
-		else{
-			//メンバサイズを取得
-			member_size = pMember->GetType().GetSize();
-		}
-
-		//アラインメントをセット
-		if(alignment<member_size) alignment=member_size;
-	}
-
-	if(alignment==0) return 0;
-
-	if(iAlign) alignment=iAlign;
-
-	return alignment;
-}
-
-
-
-int CClass::GetFuncNumInVtbl( const UserProc *pUserProc ) const
-{
-	int n = 0;
-	foreach( const CMethod *pMethod, methods ){
-		if( pMethod->pUserProc == pUserProc ) break;
-		if( pMethod->IsVirtual() ) n++;
-	}
-	return n;
-}
-LONG_PTR CClass::GetVtblGlobalOffset(void) const
-{
-
-	//既に存在する場合はそれを返す
-	if(vtbl_offset!=-1) return vtbl_offset;
-
-
-
-	//////////////////////////////////////
-	// 存在しないときは新たに生成する
-	//////////////////////////////////////
-
-	UserProc **ppsi;
-	ppsi=(UserProc **)HeapAlloc(hHeap,0,GetVtblNum()*sizeof(GlobalProc *));
-
-	//関数テーブルに値をセット
-	int i2 = 0;
-	foreach( const CMethod *pMethod, methods ){
-		if(pMethod->IsVirtual()){
-			pMethod->pUserProc->Using();
-
-			if(pMethod->IsAbstract()){
-				extern int cp;
-				SetError(300,NULL,cp);
-
-				ppsi[i2]=0;
-			}
-			else{
-				ppsi[i2]=pMethod->pUserProc;
-			}
-			i2++;
-		}
-	}
-
-	vtbl_offset=dataTable.AddBinary((void *)ppsi,GetVtblNum()*sizeof(LONG_PTR));
-
-	for( int i=0; i < GetVtblNum(); i++ ){
-		pobj_Reloc->AddSchedule_DataSection(vtbl_offset+i*sizeof(LONG_PTR));
-	}
-
-	HeapDefaultFree(ppsi);
-
-	return vtbl_offset;
-}
-void CClass::ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection){
-	if(vtbl_offset==-1) return;
-
-	LONG_PTR *pVtbl;
-	pVtbl=(LONG_PTR *)((char *)dataTable.GetPtr()+vtbl_offset);
-
-	int i;
-	for(i=0;i<GetVtblNum();i++){
-		GlobalProc *pUserProc;
-		pUserProc=(GlobalProc *)pVtbl[i];
-		if(!pUserProc) continue;
-		pVtbl[i]=pUserProc->beginOpAddress+ImageBase+MemPos_CodeSection;
-	}
-}
-bool CClass::IsAbstract() const
-{
-	// 未実装(abstract)の仮想関数を持つ場合はtrueを返す
-
-	foreach( const CMethod *pMethod, methods ){
-		if(pMethod->IsVirtual()){
-			if(pMethod->IsAbstract()){
-				return true;
-			}
-		}
-	}
-
-	return false;
-}
-
-// コンストラクタのコンパイルを開始
-void CClass::NotifyStartConstructorCompile() const
-{
-	isCompilingConstructor = true;
-}
-
-//コンストラクタのコンパイルを終了
-void CClass::NotifyFinishConstructorCompile() const
-{
-	isCompilingConstructor = false;
-}
-
-//コンストラクタをコンパイル中かどうかを判別
-bool CClass::IsCompilingConstructor() const
-{
-	return isCompilingConstructor;
-}
-
-//デストラクタのコンパイルを開始
-void CClass::NotifyStartDestructorCompile() const{
-	isCompilingDestructor = true;
-}
-
-//デストラクタのコンパイルを終了
-void CClass::NotifyFinishDestructorCompile() const{
-	isCompilingDestructor = false;
-}
-
-//デストラクタをコンパイル中かどうかを判別
-bool CClass::IsCompilingDestructor() const
-{
-	return isCompilingDestructor;
-}
-
-//自身の派生クラスかどうかを確認
-bool CClass::IsSubClass( const CClass *pClass ) const
-{
-	pClass = pClass->pobj_InheritsClass;
-	while( pClass ){
-		if( this == pClass ) return true;
-		pClass = pClass->pobj_InheritsClass;
-	}
-	return false;
-}
-
-//自身と等しいまたは派生クラスかどうかを確認
-bool CClass::IsEqualsOrSubClass( const CClass *pClass ) const
-{
-	if( IsEquals( pClass ) ) return true;
-	return IsSubClass( pClass );
-}
-
-// 自身と等しいまたは派生クラス、基底クラスかどうかを確認
-bool CClass::IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const
-{
-	if( IsEquals( &objClass ) ) return true;
-	if( IsSubClass( &objClass ) ) return true;
-	if( objClass.IsSubClass( this ) ) return true;
-	return false;
-}
-
-
-
-int Classes::hash(const char *name) const{
-	int key;
-
-	for(key=0;*name!='\0';name++){
-		key=((key<<8)+ *name )%MAX_CLASS_HASH;
-	}
-
-	return key;
-}
-
-void Classes::DestroyClass(CClass *pobj_c){
-	if(pobj_c->pobj_NextClass){
-		DestroyClass(pobj_c->pobj_NextClass);
-	}
-
-	delete pobj_c;
-}
-
-Classes::Classes():
-	pStringClass( NULL ),
-	pObjectClass( NULL ),
-	pCompilingClass( NULL ),
-	pCompilingMethod( NULL ),
-	ppobj_IteClass( NULL ),
-	iIteMaxNum( 0 ),
-	iIteNextNum( 0 )
-{
-	memset( pobj_ClassHash, 0, MAX_CLASS_HASH * sizeof(CClass *) );
-}
-Classes::~Classes(){
-	int i;
-	for(i=0;i<MAX_CLASS_HASH;i++){
-		if(pobj_ClassHash[i]) DestroyClass(pobj_ClassHash[i]);
-	}
-
-	if(ppobj_IteClass) HeapDefaultFree(ppobj_IteClass);
-}
-
-void Classes::ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection){
-	int i;
-	for(i=0;i<MAX_CLASS_HASH;i++){
-		if(pobj_ClassHash[i]){
-			CClass *pobj_c;
-			pobj_c=pobj_ClassHash[i];
-			while(1){
-				pobj_c->ActionVtblSchedule(ImageBase,MemPos_CodeSection);
-
-				if(pobj_c->pobj_NextClass==0) break;
-				pobj_c=pobj_c->pobj_NextClass;
-			}
-		}
-	}
-}
-
-const CClass *Classes::Find( const NamespaceScopes &namespaceScopes, const string &name ) const
-{
-	int key;
-	key=hash(name.c_str());
-
-	if( namespaceScopes.size() == 0 && name == "Object" ){
-		return GetObjectClassPtr();
-	}
-	else if( namespaceScopes.size() == 0 && name == "String" ){
-		return GetStringClassPtr();
-	}
-
-	if(pobj_ClassHash[key]){
-		CClass *pobj_c;
-		pobj_c=pobj_ClassHash[key];
-		while(1){
-			if( pobj_c->IsEqualSymbol( namespaceScopes, name ) ){
-				//名前空間とクラス名が一致した
-				return pobj_c;
-			}
-
-			if(pobj_c->pobj_NextClass==0) break;
-			pobj_c=pobj_c->pobj_NextClass;
-		}
-	}
-
-	// TypeDefも見る
-	int index = Smoothie::meta.typeDefs.GetIndex( namespaceScopes, name );
-	if( index != -1 ){
-		Type type = Smoothie::meta.typeDefs[index].GetBaseType();
-		if( type.IsObject() ){
-			return &type.GetClass();
-		}
-	}
-
-	return NULL;
-}
-const CClass *Classes::Find( const string &fullName ) const
-{
-	char AreaName[VN_SIZE] = "";		//オブジェクト変数
-	char NestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
-
-	return Find( NamespaceScopes( AreaName ), NestName );
-}
-
-CClass *Classes::AddClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine){
-	//////////////////////////////////////////////////////////////////////////
-	// クラスを追加
-	// ※名前のみを登録。その他の情報はSetClassメソッドで！
-	//////////////////////////////////////////////////////////////////////////
-
-	CClass *pobj_c;
-	pobj_c=new CClass(namespaceScopes, importedNamespaces, name);
-
-	if(lstrcmp(name,"String")==0){
-		//Stringクラス
-		pStringClass=pobj_c;
-	}
-	if( lstrcmp( name, "Object" ) == 0 ){
-		pObjectClass = pobj_c;
-	}
-
-
-	/////////////////////////////////
-	// ハッシュデータに追加
-	/////////////////////////////////
-
-	int key;
-	key=hash(name);
-
-	if(pobj_ClassHash[key]){
-		CClass *pobj_c2;
-		pobj_c2=pobj_ClassHash[key];
-		while(1){
-			if( pobj_c2->IsEqualSymbol( namespaceScopes, name ) ){
-				//名前空間及びクラス名が重複した場合
-				SetError(15,name,nowLine);
-				return 0;
-			}
-
-			if(pobj_c2->pobj_NextClass==0) break;
-			pobj_c2=pobj_c2->pobj_NextClass;
-		}
-		pobj_c2->pobj_NextClass=pobj_c;
-	}
-	else{
-		pobj_ClassHash[key]=pobj_c;
-	}
-
-	return pobj_c;	
-}
-
-void Classes::InitNames(void){
-	extern char *basbuf;
-	int i, i2;
-	char temporary[VN_SIZE];
-
-	// Blittable型管理オブジェクトを初期化
-	Smoothie::meta.blittableTypes.clear();
-
-	// 名前空間管理
-	NamespaceScopes &namespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
-	namespaceScopes.clear();
-
-	// Importsされた名前空間の管理
-	NamespaceScopesCollection &importedNamespaces = Smoothie::Temp::importedNamespaces;
-	importedNamespaces.clear();
-
-	for(i=0;;i++){
-		if(basbuf[i]=='\0') break;
-
-		if( basbuf[i] == 1 && basbuf[i+1] == ESC_NAMESPACE ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( basbuf[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=basbuf[i];
-			}
-			namespaceScopes.push_back( temporary );
-
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENDNAMESPACE ){
-			if( namespaceScopes.size() <= 0 ){
-				SetError(12, "End Namespace", i );
-			}
-			else{
-				namespaceScopes.pop_back();
-			}
-
-			i += 2;
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_IMPORTS ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( basbuf[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=basbuf[i];
-			}
-			if( !importedNamespaces.Imports( temporary ) )
-			{
-				SetError(64,temporary,cp );
-			}
-
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_CLEARNAMESPACEIMPORTED ){
-			importedNamespaces.clear();
-			continue;
-		}
-
-		if(basbuf[i]==1&&(
-			basbuf[i+1]==ESC_CLASS||
-			basbuf[i+1]==ESC_TYPE||
-			basbuf[i+1]==ESC_INTERFACE
-			)){
-				int nowLine;
-				nowLine=i;
-
-				i+=2;
-				Type blittableType;
-				if(memicmp(basbuf+i,"Align(",6)==0){
-					//アラインメント修飾子
-					i+=6;
-					i=JumpStringInPare(basbuf,i)+1;
-				}
-				else if( memicmp( basbuf + i, "Blittable(", 10 ) == 0 ){
-					// Blittable修飾子
-					i+=10;
-					i+=GetStringInPare_RemovePare(temporary,basbuf+i)+1;
-					Type::StringToType( temporary, blittableType );
-				}
-
-				bool isEnum = false;
-				if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENUM ){
-					// 列挙型の場合
-					isEnum = true;
-
-					i+=2;
-				}
-
-				int i2;
-				char temporary[VN_SIZE];
-				for(i2=0;;i++,i2++){
-					if(!IsVariableChar(basbuf[i])){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=basbuf[i];
-				}
-
-				//クラスを追加
-				CClass *pClass = pobj_DBClass->AddClass(namespaceScopes, importedNamespaces, temporary,nowLine);
-				if( pClass ){
-					if( basbuf[nowLine+1] == ESC_CLASS ){
-						if( isEnum ){
-							pClass->classType = CClass::Enum;
-						}
-						else{
-							pClass->classType = CClass::Class;
-						}
-					}
-					else if( basbuf[nowLine+1] == ESC_INTERFACE ){
-						pClass->classType = CClass::Interface;
-					}
-					else{
-						pClass->classType = CClass::Structure;
-					}
-				}
-
-				// Blittable型の場合
-				if( !blittableType.IsNull() ){
-					pClass->SetBlittableType( blittableType );
-
-					// Blittable型として登録
-					Smoothie::meta.blittableTypes.push_back( BlittableType( blittableType, pClass ) );
-				}
-		}
-	}
-}
-
-
-void Classes::AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
-						 bool isVirtual, bool isOverride, char *buffer, int nowLine){
-	int i,i2;
-	char temporary[VN_SIZE];
-
-	i=2;
-	for(i2=0;;i++,i2++){
-		if(buffer[i]=='('||buffer[i]=='\0'){
-			temporary[i2]=0;
-			break;
-		}
-		temporary[i2]=buffer[i];
-	}
-
-
-	//関数ハッシュへ登録
-	GlobalProc *pUserProc;
-	pUserProc=AddSubData( NamespaceScopes(), NamespaceScopesCollection(), buffer,nowLine,isVirtual,pobj_c, (bStatic!=0) );
-	if(!pUserProc) return;
-
-
-	////////////////////////////////////////////////////////////
-	// コンストラクタ、デストラクタの場合の処理
-	////////////////////////////////////////////////////////////
-	BOOL fConstructor=0,bDestructor=0;
-
-	if(lstrcmp(temporary,pobj_c->GetName().c_str())==0){
-		//コンストラクタの場合
-
-		//標準コンストラクタ（引数なし）
-		if(pUserProc->Params().size()==0) fConstructor=1;
-
-		//強制的にConst修飾子をつける
-		isConst = true;
-	}
-	else if(temporary[0]=='~'){
-		//デストラクタの場合はその名前が正しいかチェックを行う
-		if(lstrcmp(temporary+1,pobj_c->GetName().c_str())!=0)
-			SetError(117,NULL,nowLine);
-		else
-			bDestructor=1;
-	}
-	if(fConstructor||bDestructor){
-		// コンストラクタ、デストラクタのアクセシビリティをチェック
-
-		//強制的にConst修飾子をつける
-		isConst = true;
-	}
-
-	if( fConstructor == 1 )
-		pobj_c->ConstructorMemberSubIndex = (int)pobj_c->methods.size();
-	else if( bDestructor )
-		pobj_c->DestructorMemberSubIndex = (int)pobj_c->methods.size();
-
-
-
-	//////////////////
-	// 重複チェック
-	//////////////////
-
-	if(pobj_c->DupliCheckMember(temporary)){
-		SetError(15,temporary,nowLine);
-		return;
-	}
-
-	//メソッド
-	foreach( const CMethod *pMethod, pobj_c->methods ){
-		//基底クラスと重複する場合はオーバーライドを行う
-		if( pMethod->GetInheritsClassPtr() ) continue;
-
-		if( pMethod->pUserProc->GetName() == temporary ){
-			if( pMethod->pUserProc->Params().Equals( pUserProc->Params() ) ){
-				//関数名、パラメータ属性が合致したとき
-				SetError(15,pUserProc->GetName().c_str(),nowLine);
-				return;
-			}
-		}
-	}
-
-	//仮想関数の場合
-	if( isAbstract ) pUserProc->CompleteCompile();
-
-	//メソッドのオーバーライド
-	foreach( CMethod *pMethod, pobj_c->methods ){
-		if( pMethod->pUserProc->GetName() == temporary ){
-			if( pMethod->pUserProc->Params().Equals( pUserProc->Params() ) ){
-
-				if(pMethod->IsVirtual()){
-					//メンバ関数を上書き
-					pMethod->pUserProc=pUserProc;
-					pMethod->Override();
-
-					if( !isOverride ){
-						SetError(127,NULL,nowLine);
-					}
-					if(pMethod->GetAccessibility() != accessibility ){
-						SetError(128,NULL,nowLine);
-					}
-
-					pUserProc->SetMethod( pMethod );
-					return;
-				}
-			}
-		}
-	}
-
-	if( isVirtual ){
-		pobj_c->AddVtblNum( 1 );
-	}
-
-	if( isOverride ){
-		SetError(12,"Override",nowLine);
-	}
-
-	if(bStatic){
-		pobj_c->staticMethods.AddStatic( pUserProc, accessibility );
-	}
-	else{
-		pobj_c->methods.Add(pUserProc, accessibility, isConst, isAbstract, isVirtual);
-	}
-}
-
-BOOL Classes::MemberVar_LoopRefCheck(const CClass &objClass){
-	int i2,bRet=1;
-	BOOST_FOREACH( CMember *pMember, objClass.dynamicMembers ){
-		if(pMember->GetType().IsStruct()){
-			//循環参照でないかをチェック
-			if(pobj_LoopRefCheck->check(pMember->GetType().GetClass())){
-				extern int cp;
-				SetError(124,pMember->GetType().GetClass().GetName(),cp);
-				return 0;
-			}
-
-			pobj_LoopRefCheck->add(objClass.GetName().c_str());
-
-			i2=MemberVar_LoopRefCheck(pMember->GetType().GetClass());
-			if(bRet==1) bRet=i2;
-
-			pobj_LoopRefCheck->del(objClass.GetName().c_str());
-		}
-	}
-
-	return bRet;
-}
-
-void Classes::GetClass_recur(const char *lpszInheritsClass){
-	extern char *basbuf;
-	int i,i2,i3,sub_address,top_pos;
-	char temporary[8192];
-
-	// 名前空間管理
-	NamespaceScopes backupNamespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
-	NamespaceScopes &namespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
-	namespaceScopes.clear();
-
-	for(i=0;;i++){
-		if(basbuf[i]=='\0') break;
-
-
-		// 名前空間
-		if( basbuf[i] == 1 && basbuf[i+1] == ESC_NAMESPACE ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( basbuf[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=basbuf[i];
-			}
-			namespaceScopes.push_back( temporary );
-
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENDNAMESPACE ){
-			if( namespaceScopes.size() <= 0 ){
-				SetError(12, "End Namespace", i );
-			}
-			else{
-				namespaceScopes.pop_back();
-			}
-
-			i += 2;
-			continue;
-		}
-
-
-
-		if(basbuf[i]==1&&basbuf[i+1]==ESC_INTERFACE){
-			//////////////////////////
-			// インターフェイス
-			//////////////////////////
-
-			top_pos=i;
-
-			i+=2;
-
-			//インターフェイス名を取得
-			GetIdentifierToken( temporary, basbuf, i );
-
-			CClass *pobj_c = const_cast<CClass *>( pobj_DBClass->Find(namespaceScopes, temporary) );
-			if(!pobj_c) continue;
-
-			if(lpszInheritsClass){
-				if(lstrcmp(lpszInheritsClass,pobj_c->GetName().c_str())!=0){
-					//継承先先読み用
-					continue;
-				}
-			}
-
-			if(pobj_c->IsReady()){
-				//既に先読みされているとき
-				continue;
-			}
-
-			pobj_c->Readed();
-
-			pobj_c->ConstructorMemberSubIndex=-1;
-			pobj_c->DestructorMemberSubIndex=-1;
-
-			if(basbuf[i+1]==1&&basbuf[i+2]==ESC_INHERITS){
-				//継承を行う場合
-				for(i+=3,i2=0;;i++,i2++){
-					if(IsCommandDelimitation(basbuf[i])){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=basbuf[i];
-				}
-
-				if(lstrcmpi(temporary,pobj_c->GetName().c_str())==0){
-					SetError(105,temporary,i);
-					goto Interface_InheritsError;
-				}
-
-				//継承元クラスを取得
-				const CClass *pInheritsClass = Find(temporary);
-				if( !pInheritsClass ){
-					SetError(106,temporary,i);
-					goto Interface_InheritsError;
-				}
-
-				//継承させる
-				if( !pobj_c->InheritsClass( *pInheritsClass, i ) ){
-					goto Interface_InheritsError;
-				}
-			}
-			else{
-				//継承無し
-				pobj_c->pobj_InheritsClass=0;
-
-				//仮想関数の数を初期化
-				pobj_c->SetVtblNum( 0 );
-			}
-Interface_InheritsError:
-
-			//メンバ変数、関数を取得
-			while(1){
-				i++;
-
-				//エラー
-				if(basbuf[i]==1&&(basbuf[i+1]==ESC_CLASS||basbuf[i+1]==ESC_TYPE||basbuf[i+1]==ESC_INTERFACE)){
-					SetError(22,"Interface",i);
-					i--;
-					break;
-				}
-
-				if(basbuf[i]==1&&basbuf[i+1]==ESC_INHERITS){
-					SetError(111,NULL,i);
-					break;
-				}
-
-				sub_address=i;
-
-				for(i2=0;;i++,i2++){
-					if(IsCommandDelimitation(basbuf[i])){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=basbuf[i];
-				}
-				if(temporary[0]=='\0'){
-					if(basbuf[i]=='\0'){
-						i--;
-						SetError(22,"Interface",top_pos);
-						break;
-					}
-					continue;
-				}
-
-				//End Interface記述の場合
-				if(temporary[0]==1&&temporary[1]==ESC_ENDINTERFACE) break;
-
-				if(!(temporary[0]==1&&(
-					temporary[1]==ESC_SUB||temporary[1]==ESC_FUNCTION
-					))){
-					SetError(1,NULL,i);
-					break;
-				}
-
-				//メンバ関数を追加
-				AddMethod(pobj_c,
-					Prototype::Public,	//Publicアクセス権
-					0,					//Static指定なし
-					false,				//Constではない
-					1,					//Abstract
-					1,					//Virtual
-					0,
-					temporary,
-					sub_address
-					);
-			}
-		}
-
-		if(basbuf[i]==1&&(basbuf[i+1]==ESC_CLASS||basbuf[i+1]==ESC_TYPE)){
-			//////////////////////////
-			// クラス
-			//////////////////////////
-
-			top_pos=i;
-
-			const DWORD dwClassType=basbuf[i+1];
-
-			i+=2;
-
-			int iAlign=0;
-			if(memicmp(basbuf+i,"Align(",6)==0){
-				//アラインメント修飾子
-				i+=6;
-				i+=GetStringInPare_RemovePare(temporary,basbuf+i)+1;
-				iAlign=atoi(temporary);
-
-				if(!(iAlign==1||iAlign==2||iAlign==4||iAlign==8||iAlign==16))
-					SetError(51,NULL,i);
-			}
-			else if( memicmp( basbuf + i, "Blittable(", 10 ) == 0 ){
-				// Blittable修飾子
-				i+=10;
-				i=JumpStringInPare(basbuf,i)+1;
-			}
-
-			if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENUM ){
-				// 列挙型の場合
-				i+=2;
-			}
-
-			//クラス名を取得
-			GetIdentifierToken( temporary, basbuf, i );
-
-			CClass *pobj_c =  const_cast<CClass *>( pobj_DBClass->Find(namespaceScopes, temporary) );
-			if(!pobj_c) continue;
-
-			if(lpszInheritsClass){
-				if( pobj_c->GetName() != lpszInheritsClass ){
-					//継承先先読み用
-					continue;
-				}
-			}
-
-			if(pobj_c->IsReady()){
-				//既に先読みされているとき
-				continue;
-			}
-
-			pobj_c->iAlign=iAlign;
-
-			pobj_c->Readed();
-
-			pobj_c->ConstructorMemberSubIndex=-1;
-			pobj_c->DestructorMemberSubIndex=-1;
-
-			//アクセス制限の初期値をセット
-			Prototype::Accessibility accessibility;
-			if(dwClassType==ESC_CLASS){
-				accessibility = Prototype::Private;
-			}
-			else{
-				accessibility = Prototype::Public;
-			}
-
-			if( pobj_c->GetName() == "Object" || dwClassType == ESC_TYPE ){
-				// 継承無し
-				pobj_c->pobj_InheritsClass = NULL;
-
-				// 仮想関数の数を初期化
-				pobj_c->SetVtblNum( 0 );
-			}
-			else{
-				bool isInherits = false;
-				if(basbuf[i+1]==1&&basbuf[i+2]==ESC_INHERITS){
-					//継承を行う場合
-					isInherits = true;
-
-					for(i+=3,i2=0;;i++,i2++){
-						if(IsCommandDelimitation(basbuf[i])){
-							temporary[i2]=0;
-							break;
-						}
-						temporary[i2]=basbuf[i];
-					}
-
-					if(lstrcmpi(temporary,pobj_c->GetName().c_str())==0){
-						SetError(105,temporary,i);
-						goto InheritsError;
-					}
-				}
-
-				if( !isInherits ){
-					//Objectを継承する
-					lstrcpy( temporary, "Object" );
-				}
-
-				pobj_c->Inherits( temporary, i );
-			}
-InheritsError:
-
-			//メンバとメソッドを取得
-			while(1){
-				i++;
-
-				//エラー
-				if(basbuf[i]==1&&(basbuf[i+1]==ESC_CLASS||basbuf[i+1]==ESC_TYPE)){
-					SetError(22,"Class",i);
-					i--;
-					break;
-				}
-
-				if(basbuf[i]==1&&basbuf[i+1]==ESC_INHERITS){
-					SetError(111,NULL,i);
-					break;
-				}
-
-				//Static修飾子
-				BOOL bStatic;
-				if(basbuf[i]==1&&basbuf[i+1]==ESC_STATIC){
-					bStatic=1;
-					i+=2;
-				}
-				else bStatic=0;
-
-				//Const修飾子
-				bool isConst = false;
-				if( basbuf[i] == 1 && basbuf[i + 1] == ESC_CONST ){
-					isConst = true;
-					i += 2;
-				}
-
-				if(basbuf[i]==1&&(
-					basbuf[i+1]==ESC_ABSTRACT||basbuf[i+1]==ESC_VIRTUAL||basbuf[i+1]==ESC_OVERRIDE||
-					basbuf[i+1]==ESC_SUB||basbuf[i+1]==ESC_FUNCTION
-					)){
-					i3=basbuf[i+1];
-					sub_address=i;
-				}
-				else i3=0;
-
-				bool isVirtual = false, isAbstract = false, isOverride = false;
-				if(i3==ESC_ABSTRACT){
-					isAbstract=1;
-					isVirtual=1;
-					i+=2;
-
-					i3=basbuf[i+1];
-				}
-				else if(i3==ESC_VIRTUAL){
-					isAbstract=0;
-					isVirtual=1;
-					i+=2;
-
-					i3=basbuf[i+1];
-				}
-				else if(i3==ESC_OVERRIDE){
-					isOverride=1;
-					isVirtual=1;
-
-					i+=2;
-
-					i3=basbuf[i+1];
-				}
-
-				for(i2=0;;i++,i2++){
-					if(IsCommandDelimitation(basbuf[i])){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=basbuf[i];
-				}
-				if(temporary[0]=='\0'){
-					if(basbuf[i]=='\0'){
-
-						if(dwClassType==ESC_CLASS)
-							SetError(22,"Class",top_pos);
-						else
-							SetError(22,"Type",top_pos);
-
-						i--;
-						break;
-					}
-					continue;
-				}
-
-				//End Class記述の場合
-				if(temporary[0]==1&&temporary[1]==ESC_ENDCLASS&&dwClassType==ESC_CLASS) break;
-				if(temporary[0]==1&&temporary[1]==ESC_ENDTYPE&&dwClassType==ESC_TYPE) break;
-
-				//アクセスを変更
-				if(lstrcmpi(temporary,"Private")==0){
-					accessibility = Prototype::Private;
-					continue;
-				}
-				if(lstrcmpi(temporary,"Public")==0){
-					accessibility = Prototype::Public;
-					continue;
-				}
-				if(lstrcmpi(temporary,"Protected")==0){
-					accessibility = Prototype::Protected;
-					continue;
-				}
-
-				extern int cp;
-				if(i3==0){
-					if(bStatic){
-						//静的メンバを追加
-						cp=i;	//エラー用
-						pobj_c->AddStaticMember( accessibility, isConst, false, temporary, i);
-					}
-					else{
-						//メンバを追加
-						cp=i;	//エラー用
-						pobj_c->AddMember( accessibility, isConst, false, temporary );
-
-
-						if(pobj_c->dynamicMembers[pobj_c->dynamicMembers.size()-1]->GetType().IsStruct()){
-							if( !pobj_c->dynamicMembers[pobj_c->dynamicMembers.size()-1]->GetType().GetClass().IsReady() ){
-								//参照先が読み取られていないとき
-								GetClass_recur(pobj_c->dynamicMembers[pobj_c->dynamicMembers.size()-1]->GetType().GetClass().GetName().c_str());
-							}
-						}
-
-
-						if(pobj_c->dynamicMembers[pobj_c->dynamicMembers.size()-1]->GetType().IsStruct()){
-							//循環参照のチェック
-							pobj_LoopRefCheck->add(pobj_c->GetName().c_str());
-							if(!MemberVar_LoopRefCheck(pobj_c->dynamicMembers[pobj_c->dynamicMembers.size()-1]->GetType().GetClass())){
-								//エラー回避
-								pobj_c->dynamicMembers[pobj_c->dynamicMembers.size()-1]->GetType().SetBasicType( DEF_PTR_VOID );
-							}
-							pobj_LoopRefCheck->del(pobj_c->GetName().c_str());
-						}
-					}
-				}
-				else{
-					//メソッドを追加
-					cp=i;	//エラー用
-					AddMethod(pobj_c,
-						accessibility,
-						bStatic,
-						isConst,
-						isAbstract,
-						isVirtual,
-						isOverride,
-						temporary,
-						sub_address);
-
-					if( isAbstract ) continue;
-
-					for(;;i++){
-						if(basbuf[i]=='\0'){
-							i--;
-							break;
-						}
-						if(basbuf[i-1]!='*'&&
-							basbuf[i]==1&&(
-							basbuf[i+1]==ESC_SUB||
-							basbuf[i+1]==ESC_FUNCTION||
-							basbuf[i+1]==ESC_MACRO||
-							basbuf[i+1]==ESC_TYPE||
-							basbuf[i+1]==ESC_CLASS||
-							basbuf[i+1]==ESC_INTERFACE||
-							basbuf[i+1]==ESC_ENUM)){
-							GetDefaultNameFromES(i3,temporary);
-							SetError(22,temporary,i);
-						}
-						if(basbuf[i]==1&&basbuf[i+1]==GetEndXXXCommand((char)i3)){
-							i+=2;
-							break;
-						}
-					}
-				}
-			}
-		}
-	}
-
-
-	// 名前空間を元に戻す
-	Smoothie::Lexical::liveingNamespaceScopes = backupNamespaceScopes;
-}
-
-void Classes::GetAllClassInfo(void){
-	//ループ継承チェック用のクラス
-	pobj_LoopRefCheck=new CLoopRefCheck();
-
-	//クラスを取得
-	GetClass_recur(0);
-
-	delete pobj_LoopRefCheck;
-	pobj_LoopRefCheck=0;
-
-	// イテレータ用のデータを作る
-	pobj_DBClass->Iterator_Init();
-}
-
-void Classes::Compile_System_InitializeUserTypes(){
-	char temporary[VN_SIZE];
-
-	////////////////////////////////////////////////////////////////////
-	// クラス登録
-	////////////////////////////////////////////////////////////////////
-
-	// イテレータをリセット
-	Iterator_Reset();
-
-	while( Iterator_HasNext() ){
-		const CClass &objClass = *Iterator_GetNext();
-
-		if( !objClass.IsUsing() ){
-			// 未使用のクラスは無視する
-			continue;
-		}
-
-		char referenceOffsetsBuffer[1024] = "";
-		int numOfReference = 0;
-		BOOST_FOREACH( CMember *pMember, objClass.dynamicMembers ){
-			if( pMember->GetType().IsObject() || pMember->GetType().IsPointer() ){
-				if( referenceOffsetsBuffer[0] ){
-					lstrcat( referenceOffsetsBuffer, "," );
-				}
-
-				sprintf( referenceOffsetsBuffer + lstrlen( referenceOffsetsBuffer ),
-					"%d",
-					objClass.GetMemberOffset( pMember->GetName().c_str() ) );
-
-				numOfReference++;
-			}
-		}
-
-		sprintf( temporary
-			, "Add(%c%c_System_TypeForClass(\"%s\",\"%s\",[%s],%d))"
-			, 1
-			, ESC_NEW
-			, ""							// 名前空間 (TODO: 実装)
-			, objClass.GetName().c_str()	// クラス名
-			, referenceOffsetsBuffer		// 参照メンバオフセット配列
-			, numOfReference				// 参照メンバの個数
-			);
-
-		// コンパイル
-		ChangeOpcode( temporary );
-
-		// ネイティブコードバッファの再確保
-		ReallocNativeCodeBuffer();
-	}
-
-
-	////////////////////////////////////////////////////////////////////
-	// 基底クラスを登録
-	////////////////////////////////////////////////////////////////////
-
-	sprintf(temporary, "%c%ctempType=Nothing%c%cTypeBaseImpl"
-		, HIBYTE( COM_DIM )
-		, LOBYTE( COM_DIM )
-		, 1
-		, ESC_AS
-		);
-	ChangeOpcode( temporary );
-
-	// イテレータをリセット
-	Iterator_Reset();
-
-	while( Iterator_HasNext() ){
-		const CClass &objClass = *Iterator_GetNext();
-
-		if( !objClass.IsUsing() ){
-			// 未使用のクラスは無視する
-			continue;
-		}
-
-		if( objClass.pobj_InheritsClass ){
-			sprintf( temporary
-				, "tempType=Search(\"%s\",\"%s\")"
-				, ""							// 名前空間 (TODO: 実装)
-				, objClass.GetName().c_str()	// クラス名
-				);
-
-			// コンパイル
-			ChangeOpcode( temporary );
-
-			sprintf( temporary
-				, "tempType.SetBaseType(Search(\"%s\",\"%s\"))"
-				, ""								// 名前空間 (TODO: 実装)
-				, objClass.pobj_InheritsClass->GetName().c_str()	// 基底クラス名
-				);
-
-			// コンパイル
-			ChangeOpcode( temporary );
-		}
-
-		// ネイティブコードバッファの再確保
-		ReallocNativeCodeBuffer();
-	}
-
-
-
-	////////////////////////////////////////////////////////////////////
-	// 継承関係登録
-	////////////////////////////////////////////////////////////////////
-	// TODO: 未完成
-	/*
-
-	// イテレータをリセット
-	Iterator_Reset();
-
-	while( Iterator_HasNext() ){
-		CClass *pClass = Iterator_GetNext();
-
-		sprintf( genBuffer + length
-			, "obj.Search( \"%s\" ).SetBaseType( Search( \"%s\" ) ):"
-			, ""				// クラス名
-			, pClass->name		// クラス名
-			);
-		length += lstrlen( genBuffer + length );
-
-		while( length + 8192 > max ){
-			max += 8192;
-			genBuffer = (char *)realloc( genBuffer, max );
-		}
-	}*/
-}
-
-
-
-CClass *Classes::GetStringClassPtr() const
-{
-	if( !pStringClass ){
-		SetError();
-		return NULL;
-	}
-	return pStringClass;
-}
-CClass *Classes::GetObjectClassPtr() const
-{
-	if( !pObjectClass ){
-		SetError();
-		return NULL;
-	}
-	return pObjectClass;
-}
-
-void Classes::StartCompile( UserProc *pUserProc ){
-	pCompilingClass = pUserProc->GetParentClassPtr();
-	if( pCompilingClass ){
-		pCompilingClass->Using();
-
-		pCompilingMethod = pCompilingClass->methods.GetMethodPtr( pUserProc );
-		if( !pCompilingMethod ){
-			pCompilingMethod = pCompilingClass->staticMethods.GetMethodPtr( pUserProc );
-			if( !pCompilingMethod ){
-				SetError(300,NULL,cp);
-			}
-		}
-	}
-	else{
-		pCompilingMethod = NULL;
-	}
-}
-const CClass *Classes::GetNowCompilingClass() const
-{
-	return pCompilingClass;
-}
-const CMethod *Classes::GetNowCompilingMethodInfo(){
-	return pCompilingMethod;
-}
-
-
-
-
-//////////////////////
-// イテレータ
-//////////////////////
-
-void Classes::Iterator_Init(void){
-	if(ppobj_IteClass) HeapDefaultFree(ppobj_IteClass);
-
-	iIteMaxNum=0;
-	iIteNextNum=0;
-	ppobj_IteClass=(CClass **)HeapAlloc(hHeap,0,1);
-
-	int i;
-	for(i=0;i<MAX_CLASS_HASH;i++){
-		if(pobj_ClassHash[i]){
-			CClass *pobj_c;
-			pobj_c=pobj_ClassHash[i];
-			while(1){
-				ppobj_IteClass=(CClass **)HeapReAlloc(hHeap,0,ppobj_IteClass,(iIteMaxNum+1)*sizeof(CClass *));
-				ppobj_IteClass[iIteMaxNum]=pobj_c;
-				iIteMaxNum++;
-
-				if(pobj_c->pobj_NextClass==0) break;
-				pobj_c=pobj_c->pobj_NextClass;
-			}
-		}
-	}
-}
-void Classes::Iterator_Reset(void){
-	iIteNextNum = 0;
-}
-BOOL Classes::Iterator_HasNext(void){
-	if(iIteNextNum<iIteMaxNum) return 1;
-	return 0;
-}
-CClass *Classes::Iterator_GetNext(void){
-	CClass *pobj_c;
-	pobj_c=ppobj_IteClass[iIteNextNum];
-	iIteNextNum++;
-	return pobj_c;
-}
-int Classes::Iterator_GetMaxCount(void){
-	return iIteMaxNum;
-}
Index: trunk/abdev/BasicCompiler_Common/Class.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Class.h	(revision 169)
+++ 	(revision )
@@ -1,304 +1,0 @@
-#pragma once
-
-#include <vector>
-#include <string>
-
-#include <Prototype.h>
-#include <Method.h>
-#include <Member.h>
-#include "Procedure.h"
-
-class Classes;
-class CDebugSection;
-class CClass;
-class InheritedInterface
-{
-	CClass *pInterfaceClass;
-	int vtblOffset;
-public:
-	InheritedInterface( CClass *pInterfaceClass, int vtblOffset )
-		: pInterfaceClass( pInterfaceClass )
-		, vtblOffset( vtblOffset )
-	{
-	}
-
-	CClass &GetInterfaceClass() const{
-		return *pInterfaceClass;
-	}
-	int GetVtblOffset() const
-	{
-		return vtblOffset;
-	}
-};
-typedef vector<InheritedInterface> Interfaces;
-class CClass : public Prototype
-{
-	friend CMember;
-	friend Classes;
-	friend CDebugSection;
-
-	bool isReady;
-	void Readed(){
-		isReady = true;
-	}
-	bool IsReady() const{
-		return isReady;
-	}
-
-	// importされている名前空間
-	NamespaceScopesCollection importedNamespaces;
-
-	// 継承するインターフェイス
-	Interfaces interfaces;
-
-	// Blittable型情報
-	Type blittableType;
-
-	// 動的メンバ
-	Members dynamicMembers;
-
-	// 静的メンバ
-	Members staticMembers;
-
-	// 動的メソッド
-	Methods methods;
-	int ConstructorMemberSubIndex;
-	int DestructorMemberSubIndex;
-	int vtblNum;					// 仮想関数の数
-
-	// 静的メソッド
-	Methods staticMethods;
-
-	enum ClassType{
-		Class,
-		Interface,
-		Enum,
-		Delegate,
-		Structure,
-	};
-
-	ClassType classType;
-
-public:
-
-	//継承クラスへのポインタ
-	const CClass *pobj_InheritsClass;
-
-	//アラインメント値
-	int iAlign;
-
-	CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name );
-	~CClass();
-
-	const NamespaceScopesCollection &GetImportedNamespaces() const
-	{
-		return importedNamespaces;
-	}
-
-	// インターフェイス
-	bool HasInterfaces() const
-	{
-		return ( interfaces.size() != 0 );
-	}
-	bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
-
-	// Blittable型
-	bool IsBlittableType() const
-	{
-		return !blittableType.IsNull();
-	}
-	const Type &GetBlittableType() const
-	{
-		return blittableType;
-	}
-	void SetBlittableType( const Type &type ){
-		blittableType = type;
-	}
-
-	bool IsClass() const;
-	bool IsInterface() const;
-	bool IsEnum() const;
-	bool IsDelegate() const;
-	bool IsStructure() const;
-
-	//継承させる
-	bool Inherits( const char *inheritNames, int nowLine );
-	bool InheritsClass( const CClass &inheritsClass, int nowLine );
-	bool InheritsInterface( const CClass &inheritsClass, int nowLine );
-
-	//メンバ、メソッドの追加
-	void AddMember( Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer );
-	void AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
-
-	//重複チェック
-	BOOL DupliCheckAll(const char *name);
-	BOOL DupliCheckMember(const char *name);
-
-	const Members &GetDynamicMembers() const
-	{
-		return dynamicMembers;
-	}
-
-	const Methods &GetMethods() const
-	{
-		return methods;
-	}
-	const Methods &GetStaticMethods() const
-	{
-		return staticMethods;
-	}
-
-	//デフォルト コンストラクタ メソッドを取得
-	const CMethod *GetConstructorMethod() const;
-
-	//デストラクタ メソッドを取得
-	const CMethod *GetDestructorMethod() const;
-
-	// vtblに存在する仮想関数の数
-	int GetVtblNum() const
-	{
-		return vtblNum;
-	}
-	void SetVtblNum( int vtblNum )
-	{
-		this->vtblNum = vtblNum;
-	}
-	void AddVtblNum( int vtblNum )
-	{
-		this->vtblNum += vtblNum;
-	}
-	bool IsExistVirtualFunctions() const
-	{
-		return ( vtblNum > 0 );
-	}
-
-	// メンバの総合サイズを取得
-	int GetSize() const;
-
-	// メンバのオフセットを取得
-	int GetMemberOffset( const char *memberName, int *pMemberNum = NULL ) const;
-
-private:
-	// アラインメント値を取得
-	int GetAlignment() const;
-
-
-	//vtbl
-private:
-	mutable long vtbl_offset;
-public:
-	int GetFuncNumInVtbl( const UserProc *pUserProc ) const;
-	LONG_PTR GetVtblGlobalOffset(void) const;
-	void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection);
-	bool IsAbstract() const;
-
-
-	//コンストラクタをコンパイルしているかどうかのチェックフラグ
-private:
-	mutable bool isCompilingConstructor;
-public:
-	void NotifyStartConstructorCompile() const;
-	void NotifyFinishConstructorCompile() const;
-	bool IsCompilingConstructor() const;
-
-	//デストラクタをコンパイルしているかどうかのチェックフラグ
-private:
-	mutable bool isCompilingDestructor;
-public:
-	void NotifyStartDestructorCompile() const;
-	void NotifyFinishDestructorCompile() const;
-	bool IsCompilingDestructor() const;
-
-
-	//自身の派生クラスかどうかを確認
-	bool IsSubClass( const CClass *pClass ) const;
-
-	//自身と等しいまたは派生クラスかどうかを確認
-	bool IsEqualsOrSubClass( const CClass *pClass ) const;
-
-	// 自身と等しいまたは派生クラス、基底クラスかどうかを確認
-	bool IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const;
-
-
-	//線形リスト用
-	CClass *pobj_NextClass;
-
-
-	//メンバの参照方法
-	enum RefType{
-		Non = 0,		// no reference member
-		Dot,			// obj.member
-		Pointer,		// obj->member
-	};
-};
-
-#define MAX_CLASS_HASH 65535
-class Classes{
-	int hash(const char *name) const;
-	void DestroyClass(CClass *pobj_c);
-public:
-	CClass *pobj_ClassHash[MAX_CLASS_HASH];
-
-	Classes();
-	~Classes();
-
-	const CClass *Find( const string &fullName ) const;
-	const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
-
-	CClass *AddClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
-
-	void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection);
-
-private:
-	void AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
-		bool isVirtual, bool isOverride, char *buffer, int nowLine);
-	BOOL MemberVar_LoopRefCheck(const CClass &objClass);
-public:
-	void InitNames(void);
-	void GetClass_recur(const char *lpszInheritsClass);
-	void GetAllClassInfo(void);
-	void Compile_System_InitializeUserTypes();
-
-
-	/////////////////////////////
-	// 特殊クラス
-	/////////////////////////////
-	CClass *pStringClass;
-	CClass *pObjectClass;
-	CClass *GetStringClassPtr() const;
-	CClass *GetObjectClassPtr() const;
-
-
-	/////////////////////////////
-	// 現在コンパイル中の情報
-	/////////////////////////////
-private:
-	const CClass *pCompilingClass;
-	const CMethod *pCompilingMethod;
-public:
-	//コンパイル開始の通知を受け取るメソッド
-	void StartCompile( UserProc *pUserProc );
-
-	//現在コンパイル中のメソッド情報を取得
-	const CClass *GetNowCompilingClass() const;
-	const CMethod *GetNowCompilingMethodInfo();
-
-
-	/////////////////////
-	// イテレータ
-	/////////////////////
-private:
-	CClass **ppobj_IteClass;
-	int iIteMaxNum;
-	int iIteNextNum;
-public:
-	void Iterator_Init(void);
-	void Iterator_Reset(void);
-	BOOL Iterator_HasNext(void);
-	CClass *Iterator_GetNext(void);
-	int Iterator_GetMaxCount(void);
-};
-
-
-extern Classes *pobj_DBClass;
-extern const CClass *pobj_CompilingClass;
Index: trunk/abdev/BasicCompiler_Common/Compile.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Compile.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Compile.cpp	(revision 182)
@@ -1,2 +1,9 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+#include <jenga/include/smoothie/SmoothieException.h>
+
+#include <LexicalScopingImpl.h>
+#include <CodeGenerator.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -7,4 +14,6 @@
 #endif
 
+#include <Exception.h>
+
 //ラベルアドレス
 LABEL *pLabelNames;
@@ -33,14 +42,4 @@
 WITHINFO WithInfo;
 
-
-int obp,obp_AllocSize;
-int GlobalOpBufferSize;
-char *OpBuffer;
-void ReallocNativeCodeBuffer(){
-	if(obp_AllocSize<obp+8192){
-		obp_AllocSize+=8192;
-		OpBuffer=(char *)HeapReAlloc(hHeap,0,OpBuffer,obp_AllocSize); //matea
-	}
-}
 
 
@@ -177,11 +176,32 @@
 				break;
 			case ESC_EXITWHILE:
-				obj_LexScopes.ExitWhile();
+				{
+					CScope *pScope = GetLexicalScopes().SearchScope( SCOPE_TYPE_WHILE );
+					if( !pScope ){
+						SetError(12,"Exit While",cp);
+						return;
+					}
+					pScope->Break();
+				}
 				break;
 			case ESC_EXITFOR:
-				obj_LexScopes.ExitFor();
+				{
+					CScope *pScope = GetLexicalScopes().SearchScope( SCOPE_TYPE_FOR );
+					if( !pScope ){
+						SetError(12,"Exit For",cp);
+						return;
+					}
+					pScope->Break();
+				}
 				break;
 			case ESC_EXITDO:
-				obj_LexScopes.ExitDo();
+				{
+					CScope *pScope = GetLexicalScopes().SearchScope( SCOPE_TYPE_DO );
+					if( !pScope ){
+						SetError(12,"Exit Do",cp);
+						return;
+					}
+					pScope->Break();
+				}
 				break;
 			case ESC_CONTINUE:
@@ -231,11 +251,11 @@
 
 			case ESC_NAMESPACE:
-				Smoothie::Lexical::liveingNamespaceScopes.push_back( Command + 2 );
+				Smoothie::Temp::liveingNamespaceScopes.push_back( Command + 2 );
 				break;
 			case ESC_ENDNAMESPACE:
-				if( Smoothie::Lexical::liveingNamespaceScopes.size() <= 0 ){
+				if( Smoothie::Temp::liveingNamespaceScopes.size() <= 0 ){
 					SetError(12,"End Namespace",cp);
 				}
-				Smoothie::Lexical::liveingNamespaceScopes.pop_back();
+				Smoothie::Temp::liveingNamespaceScopes.pop_back();
 				break;
 			case ESC_IMPORTS:
@@ -641,5 +661,16 @@
 			}
 
-			ChangeOpcode(Command);
+			try
+			{
+				ChangeOpcode(Command);
+			}
+			catch( const SmoothieException &smoothieException )
+			{
+				SetError(
+					smoothieException.GetErrorCode(),
+					smoothieException.GetKeyword(),
+					smoothieException.GetNowLine()
+				);
+			}
 
 #ifdef _DEBUG
@@ -651,8 +682,5 @@
 			if(bStopCompile) return 0;
 
-			if(obp_AllocSize<obp+8192){
-				obp_AllocSize+=8192;
-				OpBuffer=(char *)HeapReAlloc(hHeap,0,OpBuffer,obp_AllocSize);
-			}
+			ReallocNativeCodeBuffer();
 
 			if(basbuf[cp]=='\0'){
Index: trunk/abdev/BasicCompiler_Common/Const.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Const.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Const.cpp	(revision 182)
@@ -18,5 +18,5 @@
 	char AreaName[VN_SIZE] = "";		//オブジェクト変数
 	char NestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
+	bool isNest = CClass::SplitName( fullName.c_str(), AreaName, NestName );
 
 	return IsEqualSymbol( NamespaceScopes( AreaName ), NestName );
@@ -180,5 +180,5 @@
 	char ObjName[VN_SIZE];		//オブジェクト変数
 	char NestMember[VN_SIZE];	//入れ子メンバ
-	bool isObjectMember = SplitMemberName( name.c_str(), ObjName, NestMember );
+	bool isObjectMember = CClass::SplitName( name.c_str(), ObjName, NestMember );
 
 	//ハッシュ値を取得
Index: trunk/abdev/BasicCompiler_Common/Const.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Const.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Const.h	(revision 182)
@@ -1,3 +1,5 @@
+#pragma once
 
+#include <jenga/include/smoothie/Type.h>
 
 //定数の基底クラス
Index: trunk/abdev/BasicCompiler_Common/DataTable.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/DataTable.cpp	(revision 169)
+++ 	(revision )
@@ -1,91 +1,0 @@
-#include "common.h"
-
-DataTable dataTable;
-
-DataTable::DataTable(){
-	pdata = malloc( 1 );
-	size = 0;
-}
-DataTable::~DataTable(){
-	free( pdata );
-}
-
-void DataTable::Init(){
-	free( pdata );
-
-	pdata = malloc( 1 );
-	size = 0;
-}
-
-int DataTable::AddBinary( const void *pdata, int size ){
-	int retSize = this->size;
-
-	this->pdata = realloc( this->pdata, this->size + size );
-	memcpy( (char *)this->pdata + this->size, pdata, size );
-	this->size += size;
-
-	return retSize;
-}
-int DataTable::Add( _int64 i64data ){
-	int retSize = size;
-	AddBinary( &i64data, sizeof( _int64 ) );
-	return retSize;
-}
-int DataTable::Add( int i32data ){
-	int retSize = size;
-	AddBinary( &i32data, sizeof( int ) );
-	return retSize;
-}
-int DataTable::Add( double dbl ){
-	int retSize = size;
-	AddBinary( &dbl, sizeof( double ) );
-	return retSize;
-}
-int DataTable::Add( float flt ){
-	int retSize = size;
-	AddBinary( &flt, sizeof( float ) );
-	return retSize;
-}
-int DataTable::AddString( const char *str, int length ){
-	int retSize = size;
-
-	if( isUnicode ){
-		//Shift-JIS → Unicode
-		int size = MultiByteToWideChar(
-			CP_ACP,
-			0,
-			str, length + 1,
-			NULL, 0 ) * 2;
-
-		LPWSTR pwstr = (LPWSTR)malloc( size );
-
-		MultiByteToWideChar(
-			CP_ACP,
-			0,
-			str, length + 1,
-			pwstr, length + 1 );
-
-		AddBinary( pwstr, size );
-
-		free( pwstr );
-	}
-	else{
-		AddBinary( str, length + 1 );
-	}
-
-	return retSize;
-}
-int DataTable::AddString( const char *str ){
-	int retSize = size;
-	AddString( str, lstrlen( str ) );
-	return retSize;
-}
-
-const void *DataTable::GetPtr() const
-{
-	return pdata;
-}
-int DataTable::GetSize() const
-{
-	return size;
-}
Index: trunk/abdev/BasicCompiler_Common/DebugMiddleFile.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/DebugMiddleFile.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/DebugMiddleFile.cpp	(revision 182)
@@ -1,2 +1,6 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
+#include <ClassImpl.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -28,5 +32,5 @@
 		(*p)+=lstrlen(buffer+(*p))+1;
 
-		type.SetIndex( (LONG_PTR)pobj_DBClass->Find(szClassName) );
+		type.SetIndex( (LONG_PTR)Smoothie::GetMeta().GetClasses().Find(szClassName) );
 	}
 	else{
@@ -115,14 +119,13 @@
 
 	//イテレータをリセット
-	extern Classes *pobj_DBClass;
-	pobj_DBClass->Iterator_Reset();
+	Smoothie::GetMeta().GetClasses().Iterator_Reset();
 
 	//個数
-	*(long *)(buffer+i2)=pobj_DBClass->Iterator_GetMaxCount();
-	i2+=sizeof(long);
-
-	while(pobj_DBClass->Iterator_HasNext()){
+	*(long *)(buffer+i2)=Smoothie::GetMeta().GetClasses().Iterator_GetMaxCount();
+	i2+=sizeof(long);
+
+	while(Smoothie::GetMeta().GetClasses().Iterator_HasNext()){
 		CClass *pobj_c;
-		pobj_c=pobj_DBClass->Iterator_GetNext();
+		pobj_c=Smoothie::GetMeta().GetClasses().Iterator_GetNext();
 
 		//クラス名
@@ -136,11 +139,11 @@
 	// TypeDef情報
 	//////////////////
-	*(long *)(buffer+i2)=(int)Smoothie::meta.typeDefs.size();
-	i2+=sizeof(long);
-	for(i3=0;i3<(int)Smoothie::meta.typeDefs.size();i3++){
-		lstrcpy(buffer+i2,Smoothie::meta.typeDefs[i3].GetName().c_str() );
-		i2+=lstrlen(buffer+i2)+1;
-
-		lstrcpy(buffer+i2,Smoothie::meta.typeDefs[i3].GetBaseName().c_str() );
+	*(long *)(buffer+i2)=(int)Smoothie::GetMeta().typeDefs.size();
+	i2+=sizeof(long);
+	for(i3=0;i3<(int)Smoothie::GetMeta().typeDefs.size();i3++){
+		lstrcpy(buffer+i2,Smoothie::GetMeta().typeDefs[i3].GetName().c_str() );
+		i2+=lstrlen(buffer+i2)+1;
+
+		lstrcpy(buffer+i2,Smoothie::GetMeta().typeDefs[i3].GetBaseName().c_str() );
 		i2+=lstrlen(buffer+i2)+1;
 
@@ -156,5 +159,5 @@
 	*(long *)(buffer+i2)=(int)::globalVars.size();
 	i2+=sizeof(long);
-	foreach( Variable *pVar, ::globalVars ){
+	BOOST_FOREACH( Variable *pVar, ::globalVars ){
 		//変数名
 		lstrcpy(buffer+i2,pVar->GetName().c_str());
@@ -245,5 +248,5 @@
 			}
 
-			foreach( Variable *pVar, pUserProc->localVars ){
+			BOOST_FOREACH( Variable *pVar, pUserProc->localVars ){
 				lstrcpy(buffer+i2,pVar->GetName().c_str());
 				i2+=lstrlen(buffer+i2)+1;
@@ -304,9 +307,9 @@
 
 	//イテレータをリセット
-	pobj_DBClass->Iterator_Reset();
-
-	while(pobj_DBClass->Iterator_HasNext()){
+	Smoothie::GetMeta().GetClasses().Iterator_Reset();
+
+	while(Smoothie::GetMeta().GetClasses().Iterator_HasNext()){
 		CClass *pobj_c;
-		pobj_c=pobj_DBClass->Iterator_GetNext();
+		pobj_c=Smoothie::GetMeta().GetClasses().Iterator_GetNext();
 
 
@@ -324,7 +327,7 @@
 
 		//メンバ
-		*(long *)(buffer+i2)=(int)pobj_c->dynamicMembers.size();
-		i2+=sizeof(long);
-		foreach( CMember *member, pobj_c->dynamicMembers ){
+		*(long *)(buffer+i2)=(int)pobj_c->GetDynamicMembers().size();
+		i2+=sizeof(long);
+		BOOST_FOREACH( CMember *member, pobj_c->GetDynamicMembers() ){
 			// 名前
 			lstrcpy(buffer+i2,member->GetName().c_str());
@@ -353,7 +356,7 @@
 
 		//メソッド
-		*(long *)(buffer+i2)=(long)pobj_c->methods.size();
-		i2+=sizeof(long);
-		foreach( const CMethod *pMethod, pobj_c->methods ){
+		*(long *)(buffer+i2)=(long)pobj_c->GetMethods().size();
+		i2+=sizeof(long);
+		BOOST_FOREACH( const CMethod *pMethod, pobj_c->GetMethods() ){
 			*(Prototype::Accessibility *)(buffer+i2)=pMethod->GetAccessibility();
 			i2+=sizeof(Prototype::Accessibility);
@@ -371,7 +374,7 @@
 
 		//静的メンバ
-		*(long *)(buffer+i2)=(long)pobj_c->staticMembers.size();
-		i2+=sizeof(long);
-		foreach( CMember *member, pobj_c->staticMembers ){
+		*(long *)(buffer+i2)=(long)pobj_c->GetStaticMembers().size();
+		i2+=sizeof(long);
+		BOOST_FOREACH( CMember *member, pobj_c->GetStaticMembers() ){
 			// 名前
 			lstrcpy(buffer+i2,member->GetName().c_str());
@@ -432,5 +435,5 @@
 	char temp2[MAX_PATH],*temp5;
 
-	pobj_CompilingClass = NULL;
+	Smoothie::Temp::pCompilingClass = NULL;
 
 	i2=0;
@@ -482,5 +485,5 @@
 	///////////////////////////////////////////
 
-	this->pobj_DBClass=new Classes();
+	this->pobj_DBClass=new ClassesImpl();
 
 	int iMaxClassCount;
@@ -490,10 +493,9 @@
 		//クラス名
 		// TODO: 名前空間が未完成
-		pobj_DBClass->AddClass(NamespaceScopes(),NamespaceScopesCollection(),buffer+i2,0);
-		i2+=lstrlen(buffer+i2)+1;
-	}
-
-	extern Classes *pobj_DBClass;
-	pobj_DBClass=this->pobj_DBClass;
+		this->pobj_DBClass->Add(NamespaceScopes(),NamespaceScopesCollection(),buffer+i2,0);
+		i2+=lstrlen(buffer+i2)+1;
+	}
+
+	Smoothie::GetMeta().SetClasses( this->pobj_DBClass );
 
 
@@ -503,5 +505,5 @@
 
 	//初期化
-	Smoothie::meta.typeDefs.clear();
+	Smoothie::GetMeta().typeDefs.clear();
 
 	//個数を取得
@@ -513,5 +515,5 @@
 
 		// 名前空間に未対応
-		Smoothie::meta.typeDefs.push_back( TypeDef( NamespaceScopes(), temp5, buffer+i2 ) );
+		Smoothie::GetMeta().typeDefs.push_back( TypeDef( NamespaceScopes(), temp5, buffer+i2, -1 ) );
 
 		i2+=lstrlen(buffer+i2)+1;
@@ -590,5 +592,5 @@
 		const CClass *pClass = NULL;
 		if(szParentClassName[0]){
-			pClass=pobj_DBClass->Find(szParentClassName);
+			pClass=Smoothie::GetMeta().GetClasses().Find(szParentClassName);
 		}
 
@@ -695,5 +697,5 @@
 		i2+=lstrlen(buffer+i2)+1;
 
-		pobj_c =  const_cast<CClass *>( pobj_DBClass->Find(szClassName) );
+		pobj_c =  const_cast<CClass *>( Smoothie::GetMeta().GetClasses().Find(szClassName) );
 
 		//仮想関数の数
@@ -724,10 +726,10 @@
 			i2+=sizeof(Prototype::Accessibility);
 
-			CMember *member=new CMember( accessibility, name, type, false );
+			CMember *member=new CMember( accessibility, name, type, false, "", "" );
 
 			memcpy(member->SubScripts,buffer+i2,sizeof(int)*MAX_ARRAYDIM);
 			i2+=sizeof(int)*MAX_ARRAYDIM;
 
-			pobj_c->dynamicMembers.push_back( member );
+			pobj_c->GetDynamicMembers().push_back( member );
 		}
 
@@ -746,5 +748,5 @@
 			const CClass *pobj_InheritsClass = NULL;
 			if(szInherits[0]){
-				pobj_InheritsClass=pobj_DBClass->Find(szInherits);
+				pobj_InheritsClass=Smoothie::GetMeta().GetClasses().Find(szInherits);
 			}
 
@@ -764,5 +766,5 @@
 			CMethod *pMethod = new DynamicMethod( pUserProc, accessibility, 0,0,false, pobj_InheritsClass);
 
-			pobj_c->methods.push_back( pMethod );
+			pobj_c->GetMethods().push_back( pMethod );
 		}
 
@@ -786,10 +788,10 @@
 			i2+=sizeof(Prototype::Accessibility);
 
-			CMember *member=new CMember( accessibility, name, type, false );
+			CMember *member=new CMember( accessibility, name, type, false, "", "" );
 
 			memcpy(member->SubScripts,buffer+i2,sizeof(int)*MAX_ARRAYDIM);
 			i2+=sizeof(int)*MAX_ARRAYDIM;
 
-			pobj_c->staticMembers.push_back( member );
+			pobj_c->GetStaticMembers().push_back( member );
 		}
 	}
@@ -943,6 +945,5 @@
 
 	// クラス情報
-	extern Classes *pobj_DBClass;
-	pobj_DBClass=this->pobj_DBClass;
+	Smoothie::GetMeta().SetClasses( this->pobj_DBClass );
 
 	//定数を取得
@@ -979,6 +980,6 @@
 
 	//クラスに関するメモリを解放
-	delete pobj_DBClass;
-	pobj_DBClass=0;
+	delete this->pobj_DBClass;
+	this->pobj_DBClass=0;
 
 	//サブルーチン情報のメモリ解放
@@ -992,5 +993,5 @@
 
 	//コードバッファを解放
-	HeapDefaultFree(OpBuffer);
+	free(OpBuffer);
 	OpBuffer=0;
 
Index: trunk/abdev/BasicCompiler_Common/DebugSection.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/DebugSection.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/DebugSection.h	(revision 182)
@@ -1,2 +1,9 @@
+#pragma once
+
+#include <jenga/include/smoothie/Source.h>
+#include <jenga/include/smoothie/Class.h>
+
+#include <ProcedureImpl.h>
+
 
 class CDebugSection{
Index: trunk/abdev/BasicCompiler_Common/Diagnose.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Diagnose.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Diagnose.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
 #include <Program.h>
 
@@ -66,10 +68,10 @@
 		// イテレータをリセット
 		extern Classes *pobj_DBClass;
-		pobj_DBClass->Iterator_Reset();
+		Smoothie::GetMeta().GetClasses().Iterator_Reset();
 
-		while( pobj_DBClass->Iterator_HasNext() ){
+		while( Smoothie::GetMeta().GetClasses().Iterator_HasNext() ){
 			int codeSizeOfClass = 0;
 
-			CClass &objClass = *pobj_DBClass->Iterator_GetNext();
+			CClass &objClass = *Smoothie::GetMeta().GetClasses().Iterator_GetNext();
 
 			if( !objClass.IsEnum() ){
@@ -79,5 +81,5 @@
 
 			// 動的メソッド
-			foreach( const CMethod *pMethod, objClass.GetMethods() ){
+			BOOST_FOREACH( const CMethod *pMethod, objClass.GetMethods() ){
 				if( pMethod->pUserProc->IsCompiled() ){
 					codeSizeOfClass += pMethod->pUserProc->GetCodeSize();
@@ -86,5 +88,5 @@
 
 			// 静的メソッド
-			foreach( const CMethod *pMethod, objClass.GetStaticMethods() ){
+			BOOST_FOREACH( const CMethod *pMethod, objClass.GetStaticMethods() ){
 					codeSizeOfClass += pMethod->pUserProc->GetCodeSize();
 			}
@@ -106,13 +108,13 @@
 		// イテレータをリセット
 		extern Classes *pobj_DBClass;
-		pobj_DBClass->Iterator_Reset();
+		Smoothie::GetMeta().GetClasses().Iterator_Reset();
 
-		while( pobj_DBClass->Iterator_HasNext() ){
+		while( Smoothie::GetMeta().GetClasses().Iterator_HasNext() ){
 			int codeSizeOfClass = 0;
 
-			CClass &objClass = *pobj_DBClass->Iterator_GetNext();
+			CClass &objClass = *Smoothie::GetMeta().GetClasses().Iterator_GetNext();
 
 			// 動的メソッド
-			foreach( const CMethod *pMethod, objClass.GetMethods() ){
+			BOOST_FOREACH( const CMethod *pMethod, objClass.GetMethods() ){
 				if( pMethod->pUserProc->IsCompiled() ){
 					codeSizeOfClass += pMethod->pUserProc->GetCodeSize();
@@ -121,5 +123,5 @@
 
 			// 静的メソッド
-			foreach( const CMethod *pMethod, objClass.GetStaticMethods() ){
+			BOOST_FOREACH( const CMethod *pMethod, objClass.GetStaticMethods() ){
 					codeSizeOfClass += pMethod->pUserProc->GetCodeSize();
 			}
Index: trunk/abdev/BasicCompiler_Common/Enum.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Enum.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Enum.cpp	(revision 182)
@@ -1,3 +1,6 @@
 #include <jenga/include/common/logger.h>
+
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
 
 #include "common.h"
@@ -112,5 +115,5 @@
 
 	// 名前空間管理
-	NamespaceScopes &namespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
+	NamespaceScopes &namespaceScopes = Smoothie::Temp::liveingNamespaceScopes;
 	namespaceScopes.clear();
 
Index: trunk/abdev/BasicCompiler_Common/Enum.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Enum.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Enum.h	(revision 182)
@@ -1,3 +1,5 @@
+#pragma once
 
+#include <jenga/include/smoothie/Namespace.h>
 
 class CEnumMember{
Index: trunk/abdev/BasicCompiler_Common/Intermediate_Step1.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Intermediate_Step1.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Intermediate_Step1.cpp	(revision 182)
@@ -1,2 +1,5 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include "../BasicCompiler_Common/common.h"
 
Index: trunk/abdev/BasicCompiler_Common/Intermediate_Step2.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Intermediate_Step2.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Intermediate_Step2.cpp	(revision 182)
@@ -1,2 +1,5 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -247,5 +250,5 @@
 
 	// 名前空間管理
-	NamespaceScopes &namespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
+	NamespaceScopes &namespaceScopes = Smoothie::Temp::liveingNamespaceScopes;
 	namespaceScopes.clear();
 
Index: trunk/abdev/BasicCompiler_Common/LexicalScoping.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/LexicalScoping.cpp	(revision 169)
+++ 	(revision )
@@ -1,236 +1,0 @@
-#include "common.h"
-#ifdef _AMD64_
-#include "../BasicCompiler64/opcode.h"
-#else
-#include "../BasicCompiler32/opcode.h"
-#endif
-
-
-CLexicalScopes obj_LexScopes;
-
-
-CScope::CScope( int level, int addr, SCOPE_TYPE TypeOfStatement ){
-	this->level = level;
-	this->StartAddress = addr;
-	this->TypeOfStatement = TypeOfStatement;
-
-	pBreakSchedule = (DWORD *)malloc( 1 );
-	nBreakSchedule = 0;
-}
-CScope::~CScope(){
-	free( pBreakSchedule );
-}
-
-int CScope::GetStartAddress(){
-	return StartAddress;
-}
-SCOPE_TYPE CScope::GetTypeOfStatement(){
-	return TypeOfStatement;
-}
-
-void CScope::Break(){
-	//未解放のローカルオブジェクトを解放する
-	obj_LexScopes.CallDestructorsOfReturn( level );
-
-	//jmp ...(Next addr)
-	OpBuffer[obp++]=(char)0xE9;
-
-	pBreakSchedule=(DWORD *)realloc( pBreakSchedule, ( nBreakSchedule + 1 ) * sizeof(DWORD) );
-	pBreakSchedule[nBreakSchedule]=obp;
-	nBreakSchedule++;
-
-	obp+=sizeof(long);
-}
-void CScope::RunScheduleOfBreak(){
-	for(int i=0;i<nBreakSchedule;i++){
-		*((long *)(OpBuffer+pBreakSchedule[i]))=obp-(pBreakSchedule[i]+sizeof(long));
-	}
-}
-
-
-CScope *CLexicalScopes::SearchScope( SCOPE_TYPE TypeOfStatement ){
-	for( int i = level; i>=0; i-- ){
-		if( ppScopes[i]->GetTypeOfStatement() == TypeOfStatement ){
-			return ppScopes[i];
-		}
-	}
-	return NULL;
-}
-
-CLexicalScopes::CLexicalScopes(){
-	ppScopes = (CScope **)malloc( 1 );
-	level=0;
-}
-CLexicalScopes::~CLexicalScopes(){
-	free( ppScopes );
-}
-void CLexicalScopes::Init(int addr){
-	// TODO: エラーチェック
-
-	level = -1;
-	Start( addr, SCOPE_TYPE_BASE );
-}
-void CLexicalScopes::Start( int addr, SCOPE_TYPE TypeOfStatement ){
-	level++;
-	ppScopes = (CScope **)realloc( ppScopes, ( level + 1 ) * sizeof( CScope * ) );
-	ppScopes[level] = new CScope( level, addr, TypeOfStatement );
-}
-void CLexicalScopes::End(){
-	if( level <= 0 ){
-		SetError(300,NULL,cp);
-		return;
-	}
-
-	//デストラクタを呼ぶ
-	CallDestructorsOfScopeEnd();
-
-	Variables &vars = UserProc::IsGlobalAreaCompiling()?
-		globalVars :
-		UserProc::CompilingUserProc().localVars;
-
-	//使用済みローカル変数の生存チェックを外す
-	foreach( Variable *pVar, vars ){
-		if(pVar->bLiving&&pVar->ScopeLevel==level){
-			pVar->bLiving=0;
-			extern int obp;
-			pVar->ScopeEndAddress=obp;
-		}
-	}
-
-
-	//スコープ抜け出しスケジュール
-	ppScopes[level]->RunScheduleOfBreak();
-
-
-	//スコープレベルを下げる
-	delete ppScopes[level];
-	level--;
-}
-
-void CLexicalScopes::ExitFor(){
-	CScope *pScope = SearchScope( SCOPE_TYPE_FOR );
-	if( !pScope ){
-		SetError(12,"Exit For",cp);
-		return;
-	}
-
-	pScope->Break();
-}
-void CLexicalScopes::ExitWhile(){
-	CScope *pScope = SearchScope( SCOPE_TYPE_WHILE );
-	if( !pScope ){
-		SetError(12,"Exit While",cp);
-		return;
-	}
-
-	pScope->Break();
-}
-void CLexicalScopes::ExitDo(){
-	CScope *pScope = SearchScope( SCOPE_TYPE_DO );
-	if( !pScope ){
-		SetError(12,"Exit Do",cp);
-		return;
-	}
-
-	pScope->Break();
-}
-
-int CLexicalScopes::GetNowLevel(){
-	return level;
-}
-void CLexicalScopes::SetNowLevel( int level ){
-	this->level = level;
-}
-int CLexicalScopes::GetStartAddress(){
-	return ppScopes[level]->GetStartAddress();
-}
-
-
-// スコープ終了時のデストラクタ呼び出し
-void CLexicalScopes::CallDestructorsOfScopeEnd(){
-
-	Variables &vars = UserProc::IsGlobalAreaCompiling()?
-		globalVars :
-		UserProc::CompilingUserProc().localVars;
-
-
-	int i3;
-	int indexSystemGC=-1;
-	for( i3 = (int)vars.size() - 1; i3 >= 0; i3-- ){		//確保したのと逆順序で解放するため、バックサーチにする
-
-		Variable *pVar = vars[i3];
-
-		if( UserProc::IsGlobalAreaCompiling() && GetNowLevel() == 0 ){
-			if( pVar->GetName() == "_System_GC" ){
-				indexSystemGC=i3;
-				continue;
-			}
-		}
-
-		//同一レベルのレキシカルスコープのみを検知
-		if(!pVar->bLiving) continue;
-		if( pVar->ScopeLevel != GetNowLevel() ) continue;
-
-		if( pVar->IsStruct() && pVar->IsParameter() ){
-			//構造体パラメータを持つとき
-
-			//メモリを解放する
-
-#ifdef _AMD64_
-			//x64ビットコード
-
-			//mov rcx,qword ptr[rsp+offset]
-			op_mov_RM(sizeof(_int64),REG_RCX,REG_RSP,
-				-pVar->offset,
-				MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
-#else
-			//x86コード
-
-			//mov ecx,dword ptr[ebp+offset]
-			op_mov_RM(sizeof(long),REG_ECX,REG_EBP,-pVar->offset,MOD_BASE_DISP32);
-			obp-=sizeof(long);
-			AddLocalVarAddrSchedule();
-			obp+=sizeof(long);
-
-			//push ecx
-			op_push(REG_ECX);
-#endif
-
-			//call free
-			extern UserProc *pSub_free;
-			op_call(pSub_free);
-
-
-			if( UserProc::IsGlobalAreaCompiling() ){
-				//ここには来ないハズ
-				SetError(300,NULL,cp);
-			}
-		}
-	}
-
-	if(indexSystemGC!=-1){
-		//_System_GCオブジェクトのデストラクタの呼び出し処理
-		const CMethod *method = vars[indexSystemGC]->GetClass().GetDestructorMethod();
-		if( method ){
-			Opcode_CallProc("",method->pUserProc,0,vars[indexSystemGC]->GetName().c_str(),DEF_OBJECT);
-		}
-	}
-}
-
-// Returnステートメントで発行されるデストラクタを生成
-void CLexicalScopes::CallDestructorsOfReturn( int BaseLevel ){
-	//現在のスコープレベルを退避
-	int backupScopeLevel = GetNowLevel();
-
-	for( int i = GetNowLevel(); i >= BaseLevel; i-- ){
-		SetNowLevel( i );
-
-		CallDestructorsOfScopeEnd();
-	}
-
-	//現在のスコープレベルを復元
-	SetNowLevel( backupScopeLevel );
-}
Index: trunk/abdev/BasicCompiler_Common/LexicalScoping.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/LexicalScoping.h	(revision 169)
+++ 	(revision )
@@ -1,74 +1,0 @@
-
-
-enum SCOPE_TYPE{
-	//ベース
-	SCOPE_TYPE_BASE,
-
-	//分岐
-	SCOPE_TYPE_IF,
-
-	//ループ
-	SCOPE_TYPE_DO,
-	SCOPE_TYPE_FOR,
-	SCOPE_TYPE_WHILE,
-
-	//ケース分け
-	SCOPE_TYPE_SELECT,
-};
-
-class CScope{
-	int level;
-	int StartAddress;
-	SCOPE_TYPE TypeOfStatement;
-
-	DWORD *pBreakSchedule;
-	int nBreakSchedule;
-
-public:
-	CScope( int level, int addr, SCOPE_TYPE TypeOfStatement );
-	~CScope();
-
-	int GetStartAddress();
-	SCOPE_TYPE GetTypeOfStatement();
-
-	void Break();
-	void RunScheduleOfBreak();
-};
-
-class CLexicalScopes{
-	CScope **ppScopes;
-	int level;
-
-	CScope *SearchScope( SCOPE_TYPE TypeOfStatement );
-
-public:
-	CLexicalScopes();
-	~CLexicalScopes();
-
-	//初期化（関数コンパイルの開始時に呼び出される）
-	void Init(int addr);
-
-	// スコープを開始
-	void Start( int addr, SCOPE_TYPE TypeOfStatement );
-
-	//スコープを終了
-	void End();
-
-	//スコープ抜け出しステートメント
-	void Break();
-	void ExitFor();
-	void ExitWhile();
-	void ExitDo();
-
-	int GetNowLevel(void);
-	void SetNowLevel( int level );
-	int GetStartAddress(void);
-
-	//スコープ終了時のデストラクタ呼び出し
-	void CallDestructorsOfScopeEnd();
-
-	//Returnステートメント用のデストラクタ呼び出し
-	void CallDestructorsOfReturn( int BaseLevel = 0 );
-};
-
-extern CLexicalScopes obj_LexScopes;
Index: trunk/abdev/BasicCompiler_Common/LoopRefCheck.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/LoopRefCheck.cpp	(revision 169)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#include "../BasicCompiler_Common/common.h"
-
-
-//////////////////////////////////////////////////////////////
-// 循環参照でないかをチェックするためのクラスモジュール
-//////////////////////////////////////////////////////////////
-
-extern HANDLE hHeap;
-
-
-void CLoopRefCheck::init(){
-	int i;
-	for(i=0;i<num;i++){
-		HeapDefaultFree(names[i]);
-	}
-	HeapDefaultFree(names);
-}
-
-CLoopRefCheck::CLoopRefCheck(){
-	names=(char **)HeapAlloc(hHeap,0,1);
-	num=0;
-}
-CLoopRefCheck::~CLoopRefCheck(){
-	init();
-}
-void CLoopRefCheck::add(const char *lpszInheritsClass){
-	names=(char **)HeapReAlloc(hHeap,0,names,(num+1)*sizeof(char *));
-	names[num]=(char *)HeapAlloc(hHeap,0,lstrlen(lpszInheritsClass)+1);
-	lstrcpy(names[num],lpszInheritsClass);
-	num++;
-}
-void CLoopRefCheck::del(const char *lpszInheritsClass){
-	int i;
-	for(i=0;i<num;i++){
-		if(lstrcmp(names[i],lpszInheritsClass)==0){
-			HeapDefaultFree(names[i]);
-			break;
-		}
-	}
-	if(i!=num){
-		num--;
-		for(;i<num;i++){
-			names[i]=names[i+1];
-		}
-	}
-}
-BOOL CLoopRefCheck::check(const CClass &inheritsClass) const
-{
-	//ループ継承チェック
-	int i;
-	for(i=0;i<num;i++){
-		if( inheritsClass.GetName() == names[i] ){
-			return 1;
-		}
-	}
-	return 0;
-}
-CLoopRefCheck *pobj_LoopRefCheck;
Index: trunk/abdev/BasicCompiler_Common/MakeExe.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/MakeExe.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/MakeExe.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
 #include "common.h"
 
@@ -202,7 +204,4 @@
 	DeleteDeclareInfo();
 
-	//関数ポインタ情報のメモリ解放
-	DeleteProcPtrInfo();
-
 	//定数に関する情報を解放
 	extern CONSTINFO **ppConstHash;
Index: trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/NumOpe_GetType.cpp	(revision 182)
@@ -1,2 +1,5 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include "common.h"
 
@@ -311,5 +314,5 @@
 	char member[VN_SIZE];
 	CClass::RefType refType;
-	if( SplitMemberName( termFull, termLeft, member, refType ) ){
+	if( CClass::SplitName( termFull, termLeft, member, refType ) ){
 		///////////////////////////////////////////////////////////////////
 		// オブジェクトとメンバに分解できるとき
@@ -323,5 +326,5 @@
 		Type leftType;
 		if( GetTermType( termLeft, leftType, isLiteral, &isClassName ) ){
-			if( isClassName == false && Smoothie::meta.blittableTypes.IsExist( leftType ) ){
+			if( isClassName == false && Smoothie::GetMeta().blittableTypes.IsExist( leftType ) ){
 				// 左側のオブジェクト部分がBlittable型のとき
 
@@ -329,5 +332,5 @@
 				lstrcpy( temporary, termLeft );
 				sprintf( termLeft, "%s(%s)",
-					Smoothie::meta.blittableTypes.Find( leftType ).GetCreateStaticMethodFullName().c_str(),
+					Smoothie::GetMeta().blittableTypes.Find( leftType ).GetCreateStaticMethodFullName().c_str(),
 					temporary );
 
@@ -393,5 +396,5 @@
 
 	if( pIsClassName ){
-		if( pobj_DBClass->Find( termFull ) ){
+		if( Smoothie::GetMeta().GetClasses().Find( termFull ) ){
 			*pIsClassName = true;
 			return true;
@@ -408,5 +411,5 @@
 	if(lstrcmpi(termFull,"This")==0){
 		//Thisオブジェクト
-		resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+		resultType.SetType( DEF_OBJECT, Smoothie::Temp::pCompilingClass );
 		isLiteral = false;
 		return true;
@@ -670,5 +673,5 @@
 						//要求タイプがオブジェクト、または未定のとき
 						type_stack[sp]=DEF_OBJECT;
-						index_stack[sp]=(LONG_PTR)pobj_DBClass->GetStringClassPtr();
+						index_stack[sp]=(LONG_PTR)Smoothie::GetMeta().GetClasses().GetStringClassPtr();
 						bLiteralCalculation=0;
 
@@ -715,5 +718,5 @@
 						}
 						else{
-							index_stack[sp] = (LONG_PTR)pobj_DBClass->GetObjectClassPtr();
+							index_stack[sp] = (LONG_PTR)Smoothie::GetMeta().GetClasses().GetObjectClassPtr();
 						}
 						bLiteralCalculation = 0;
Index: trunk/abdev/BasicCompiler_Common/Object.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Object.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Object.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <CodeGenerator.h>
+
 #include "../BasicCompiler_Common/common.h"
 
Index: trunk/abdev/BasicCompiler_Common/Overload.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Overload.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Overload.cpp	(revision 182)
@@ -26,5 +26,5 @@
 
 		char MethodName[VN_SIZE];
-		if( !SplitMemberName( name, NULL, MethodName ) ) lstrcpy( MethodName, name );
+		if( !CClass::SplitName( name, NULL, MethodName ) ) lstrcpy( MethodName, name );
 /*
 		//メソッドの場合は静的かどうかを調べる
Index: trunk/abdev/BasicCompiler_Common/PESchedule.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/PESchedule.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/PESchedule.h	(revision 182)
@@ -1,3 +1,5 @@
+#pragma once
 
+#include <jenga/include/smoothie/Procedure.h>
 
 ///////////////////////
Index: trunk/abdev/BasicCompiler_Common/ParamImpl.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/ParamImpl.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/ParamImpl.cpp	(revision 182)
@@ -78,5 +78,5 @@
 {
 	ParmsNum = 0;
-	foreach( Parameter *pParam, params ){
+	BOOST_FOREACH( Parameter *pParam, params ){
 		Parms[ParmsNum]=0;
 		ParmsNum++;
@@ -204,5 +204,5 @@
 	for( int level=OVERLOAD_MIN_LEVEL; level<=OVERLOAD_MAX_LEVEL; level++ ){
 
-		foreach( UserProc *pTempUserProc, subs ){
+		BOOST_FOREACH( UserProc *pTempUserProc, subs ){
 
 			if(EvaluateOverloadScore( level, pTempUserProc->Params(), isEnabledReturnType?pTempUserProc->ReturnType():Type() )){
@@ -237,5 +237,5 @@
 
 	if(!sw){
-		foreach( UserProc *pTempUserProc, subs ){
+		BOOST_FOREACH( UserProc *pTempUserProc, subs ){
 
 			//エラーチェック
Index: trunk/abdev/BasicCompiler_Common/Parameter.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Parameter.h	(revision 169)
+++ 	(revision )
@@ -1,113 +1,0 @@
-#pragma once
-
-#include "Type.h"
-
-class Parameter : public Type
-{
-	string varName;
-	bool isRef;
-	bool isArray;
-	int subScripts[MAX_ARRAYDIM];
-
-	const string initValue;
-
-public:
-	Parameter( const string &varName, const Type &type, bool isRef = false, const string initValue = "" ):
-		Type( type ),
-		varName( varName ),
-		isRef( isRef ),
-		isArray( false ),
-		initValue( initValue )
-	{
-		subScripts[0] = -1;
-	}
-	Parameter( const Parameter &param ):
-		Type( param ),
-		varName( param.varName ),
-		isRef( param.isRef ),
-		isArray( false ),
-		initValue( param.initValue )
-	{
-		subScripts[0] = -1;
-		if( param.isArray ){
-			SetArray( param.subScripts );
-		}
-	}
-	~Parameter(){}
-
-	void SetArray( const int *pSubScripts ){
-		isArray = true;
-		memcpy( this->subScripts, pSubScripts, sizeof(int) * MAX_ARRAYDIM );
-	}
-
-	const string &GetVarName() const
-	{
-		return varName;
-	}
-
-	bool IsRef() const
-	{
-		return isRef;
-	}
-	bool IsArray(){
-		return isArray;
-	}
-	int *GetSubScriptsPtr(){
-		return subScripts;
-	}
-
-	const string &GetInitValue() const
-	{
-		return initValue;
-	}
-
-	bool Equals( const Parameter &param ) const
-	{
-		if( Type::Equals( param ) ){
-			return true;
-		}
-		else{
-
-			if( this->isRef && this->GetBasicType() == DEF_ANY &&
-				param.isRef == false && param.IsPointer()
-				||
-				this->isRef == false && this->IsPointer() &&
-				param.isRef && param.GetBasicType() == DEF_ANY ){
-					/* ByRef var As Any
-							と
-						var As VoidPtr
-						は同等
-					*/
-					return true;
-			}
-		}
-
-		return false;
-	}
-};
-
-class Parameters : public vector<Parameter *>
-{
-public:
-
-	bool Equals( const Parameters &params ) const
-	{
-		if( this->size() != params.size() ){
-			return false;
-		}
-
-		int max = (int)this->size();
-		for( int i=0; i<max; i++ ){
-			if( !(*this)[i]->Equals( *params[i] ) ){
-				return false;
-			}
-		}
-
-		return true;
-	}
-
-	int GetMemorySize() const
-	{
-		return (int)this->size() * PTR_SIZE;
-	}
-};
Index: trunk/abdev/BasicCompiler_Common/Procedure.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Procedure.h	(revision 169)
+++ 	(revision )
@@ -1,347 +1,0 @@
-#pragma once
-
-#include <Namespace.h>
-#include "Parameter.h"
-#include "Variable.h"
-
-class CClass;
-class CMethod;
-
-class Procedure{
-public:
-	// 種類
-	enum Kind{
-		Sub,
-		Function,
-	};
-
-private:
-	const string name;						// プロシージャ名
-
-	Kind kind;
-
-	bool isCdecl;
-	bool isUsing;
-
-protected:
-
-	// パラメータ
-	Parameters params;
-
-	// 戻り値の型
-	Type returnType;
-
-	// ソースコードの位置
-	int codePos;
-
-public:
-	Procedure( const string &name, Kind kind, bool isCdecl ):
-	  name( name ),
-	  kind( kind ),
-	  isCdecl( isCdecl ),
-	  isUsing( false ),
-	  codePos( -1 )
-	{}
-	~Procedure(){
-		foreach( Parameter *pParam, params ){
-			delete pParam;
-		}
-	}
-
-	const string &GetName() const
-	{
-		return name;
-	}
-
-	bool IsSub() const
-	{
-		return ( kind == Sub );
-	}
-	bool IsFunction() const
-	{
-		return ( kind == Function );
-	}
-
-	bool IsCdecl() const
-	{
-		return isCdecl;
-	}
-	void Using(){
-		isUsing = true;
-	}
-	bool IsUsing() const
-	{
-		return isUsing;
-	}
-
-	int GetCodePos() const
-	{
-		return codePos;
-	}
-
-	const Parameters &Params() const
-	{
-		return params;
-	}
-	const Type &ReturnType() const
-	{
-		return returnType;
-	}
-};
-
-class UserProc : public Procedure
-{
-public:
-	string _paramStr;
-
-private:
-	bool isMacro;
-
-	// パラメータの追加情報
-	int secondParmNum;
-	Parameters realParams;
-	int realSecondParmNum;
-
-	// 親クラスと対応するメソッド
-	const CClass *pParentClass;
-	CMethod *pMethod;
-
-	// 各種フラグ
-	bool isExport;
-	bool isSystem;
-	bool isAutoGeneration;
-	bool isCompiled;
-
-public:
-
-	UserProc( const string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport ):
-	  Procedure( name, kind, isCdecl ),
-	  isMacro( isMacro ),
-	  pParentClass( NULL ),
-	  pMethod( NULL ),
-	  isExport( isExport ),
-	  isSystem( false ),
-	  isAutoGeneration( false ),
-	  isCompiled( false ),
-	  beginOpAddress( 0 ),
-	  endOpAddress( 0 )
-	{
-	}
-	~UserProc(){
-		foreach( Parameter *pParam, realParams ){
-			delete pParam;
-		}
-	}
-
-	string GetFullName() const;
-
-	bool IsMacro() const
-	{
-		return isMacro;
-	}
-
-	virtual bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine, bool isStatic );
-
-	int GetSecondParmNum() const
-	{
-		return secondParmNum;
-	}
-	const Parameters &RealParams() const
-	{
-		return realParams;
-	}
-	int GetRealSecondParmNum() const
-	{
-		return realSecondParmNum;
-	}
-
-	void SetParentClass( const CClass *pParentClass ){
-		this->pParentClass = pParentClass;
-	}
-	const CClass *GetParentClassPtr() const
-	{
-		return pParentClass;
-	}
-	const CClass &GetParentClass() const
-	{
-		return *pParentClass;
-	}
-	bool HasParentClass() const
-	{
-		return ( pParentClass != NULL );
-	}
-	void SetMethod( CMethod *pMethod ){
-		this->pMethod = pMethod;
-	}
-
-	void ExportOff(){
-		isExport = false;
-	}
-	bool IsExport() const
-	{
-		return isExport;
-	}
-	void ThisIsSystemProc(){
-		isSystem = true;
-	}
-	bool IsSystem() const
-	{
-		return isSystem;
-	}
-	void ThisIsAutoGenerationProc(){
-		isAutoGeneration = true;
-	}
-	bool IsAutoGeneration(){
-		return isAutoGeneration;
-	}
-	void CompleteCompile(){
-		isCompiled = true;
-	}
-	void KillCompileStatus(){
-		isCompiled = false;
-	}
-	bool IsCompiled() const
-	{
-		return isCompiled;
-	}
-	bool IsDestructor() const
-	{
-		return ( GetName()[0] == '~' );
-	}
-	bool IsVirtual() const;
-
-	// バイナリコードの位置
-	DWORD beginOpAddress;
-	DWORD endOpAddress;
-	int GetCodeSize() const
-	{
-		return endOpAddress - beginOpAddress;
-	}
-
-	virtual const NamespaceScopes &GetNamespaceScopes() const;
-	virtual const NamespaceScopesCollection &GetImportedNamespaces() const;
-	virtual bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
-
-	// ローカル変数
-	Variables localVars;
-
-	// TODO: 適切なコードへ直す
-	long id;
-
-
-	/////////////////////////////////////////////////////////////////
-	// コンパイル中の関数を管理
-	/////////////////////////////////////////////////////////////////
-private:
-	static UserProc *pCompilingUserProc;
-public:
-	static void CompileStartForGlobalArea(){
-		pCompilingUserProc = NULL;
-	}
-	static void CompileStartForUserProc( UserProc *pUserProc ){
-		pCompilingUserProc = pUserProc;
-	}
-	static bool IsGlobalAreaCompiling(){
-		return ( pCompilingUserProc == NULL );
-	}
-	static bool IsLocalAreaCompiling(){
-		return ( pCompilingUserProc != NULL );
-	}
-	static UserProc &CompilingUserProc(){
-		return *pCompilingUserProc;
-	}
-};
-
-class GlobalProc : public UserProc
-{
-	const NamespaceScopes namespaceScopes;
-	const NamespaceScopesCollection importedNamespaces;
-public:
-	// ハッシュリスト用
-	GlobalProc *pNextData;
-
-	GlobalProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport ):
-	  UserProc( name, kind, isMacro, isCdecl, isExport ),
-	  namespaceScopes( namespaceScopes ),
-	  importedNamespaces( importedNamespaces ),
-	  pNextData( NULL )
-	{}
-	~GlobalProc(){}
-/*
-	GlobalProc *Create( const NamespaceScopes &namespaceScopes, char *buffer,int nowLine );
-	bool AddGlobalProc( const NamespaceScopes &namespaceScopes, char *buffer,int nowLine );
-*/
-	virtual const NamespaceScopes &GetNamespaceScopes() const;
-	virtual const NamespaceScopesCollection &GetImportedNamespaces() const
-	{
-		return importedNamespaces;
-	}
-
-	virtual bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
-	virtual bool IsEqualSymbol( const GlobalProc &globalProc ) const;
-	virtual bool IsEqualSymbol( const string &name ) const;
-};
-
-class DllProc : public Procedure
-{
-	const NamespaceScopes namespaceScopes;
-
-	const string dllFileName;
-	const string alias;
-	int lookupAddress;
-
-public:
-	// ハッシュリスト用
-	DllProc *pNextData;
-
-	DllProc( const NamespaceScopes &namespaceScopes, const string &name, Kind kind, bool isCdecl, const string &dllFileName, const string &alias ):
-	  Procedure( name, kind, isCdecl ),
-	  namespaceScopes( namespaceScopes ),
-	  dllFileName( dllFileName ),
-	  alias( alias ),
-	  lookupAddress( 0 ),
-	  pNextData( NULL )
-	{
-	}
-	~DllProc(){}
-
-	bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
-	bool IsEqualSymbol( const string &name ) const;
-
-	const NamespaceScopes &GetNamespaceScopes() const
-	{
-		return namespaceScopes;
-	}
-
-	virtual bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine );
-
-	const string &GetDllFileName() const
-	{
-		return dllFileName;
-	}
-	const string &GetAlias() const
-	{
-		return alias;
-	}
-
-	void SetLookupAddress( int lookupAddress ){
-		this->lookupAddress = lookupAddress;
-	}
-	int GetLookupAddress() const
-	{
-		return lookupAddress;
-	}
-
-};
-
-class ProcPointer : public Procedure
-{
-public:
-	ProcPointer( Kind kind ):
-	  Procedure( "", kind, false )
-	{
-	}
-	~ProcPointer(){}
-
-	virtual bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine );
-};
Index: trunk/abdev/BasicCompiler_Common/Resource.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Resource.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Resource.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include "common.h"
 
Index: trunk/abdev/BasicCompiler_Common/StrOperation.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/StrOperation.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/StrOperation.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -167,193 +169,4 @@
 	free(temp);
 }
-_int8 IsCommandDelimitation(char c){
-	if(c=='\n'||c==':'||c=='\0') return 1;
-	return 0;
-}
-BOOL IsBlank(char c){
-	if(c==' '||c=='\t') return 1;
-	return 0;
-}
-int GetOneParameter(const char *Parameter,int pos,char *retAns){
-	int i,i2,i3,IsStr;
-	for(i=pos,i2=0,IsStr=0;;i++,i2++){
-		if(Parameter[i]=='\"') IsStr^=1;
-		else if(Parameter[i]=='('&&IsStr==0){
-			i3=GetStringInPare(retAns+i2,Parameter+i);
-			i+=i3-1;
-			i2+=i3-1;
-			continue;
-		}
-		else if(Parameter[i]=='['&&IsStr==0){
-			i3=GetStringInBracket(retAns+i2,Parameter+i);
-			i+=i3-1;
-			i2+=i3-1;
-			continue;
-		}
-		else if(Parameter[i]==','&&IsStr==0){
-			retAns[i2]=0;
-			i++;
-			break;
-		}
-
-		if(IsCommandDelimitation(Parameter[i])&&IsStr==0
-			|| Parameter[i] == ')' && IsStr == 0 ){
-				retAns[i2]=0;
-				break;
-		}
-
-		retAns[i2]=Parameter[i];
-	}
-	return i;
-}
-int JumpOneParameter(char *Parameter,int i){
-	int i2,IsStr;
-	for(i2=0,IsStr=0;;i++,i2++){
-		if(Parameter[i]=='\"') IsStr^=1;
-		else if(Parameter[i]=='('&&IsStr==0){
-			i=JumpStringInPare(Parameter,i+1);
-			continue;
-		}
-		else if(Parameter[i]=='['&&IsStr==0){
-			i=JumpStringInBracket(Parameter,i+1);
-			continue;
-		}
-		else if(Parameter[i]==','&&IsStr==0){
-			i++;
-			break;
-		}
-		if(IsCommandDelimitation(Parameter[i])) break;
-	}
-	return i;
-}
-int GetStringInQuotation(char *buffer,char *ReadBuffer){
-	int i;
-
-	if(ReadBuffer[0]=='\"'){
-		buffer[0]=ReadBuffer[0];
-		i=1;
-	}
-	else i=0;
-
-	for(;;i++){
-		buffer[i]=ReadBuffer[i];
-		if(IsDBCSLeadByte(ReadBuffer[i])){
-			i++;
-			buffer[i]=ReadBuffer[i];
-			continue;
-		}
-		if(ReadBuffer[i]=='\"'){
-			i++;
-			buffer[i]=0;
-			break;
-		}
-		if(ReadBuffer[i]=='\0') return 0;
-	}
-	return i;
-}
-int GetStringInPare(char *buffer,const char *ReadBuffer){
-	int i,IsStr,PareNum;
-	for(i=0,IsStr=0,PareNum=0;;i++){
-		buffer[i]=ReadBuffer[i];
-		if(IsDBCSLeadByte(ReadBuffer[i])){
-			i++;
-			buffer[i]=ReadBuffer[i];
-			continue;
-		}
-		if(ReadBuffer[i]=='\"') IsStr^=1;
-		else if(ReadBuffer[i]=='('&&IsStr==0) PareNum++;
-		else if(ReadBuffer[i]==')'&&IsStr==0){
-			PareNum--;
-			if(PareNum==0){
-				i++;
-				buffer[i]=0;
-				break;
-			}
-		}
-		else if(ReadBuffer[i]=='\0') return 0;
-	}
-	return i;
-}
-int GetStringInPare_RemovePare(char *buffer,char *ReadBuffer){
-	int i,IsStr,PareNum;
-	for(i=0,IsStr=0,PareNum=1;;i++){
-		buffer[i]=ReadBuffer[i];
-		if(IsDBCSLeadByte(ReadBuffer[i])){
-			i++;
-			buffer[i]=ReadBuffer[i];
-			continue;
-		}
-		if(ReadBuffer[i]=='\"') IsStr^=1;
-		else if(ReadBuffer[i]=='('&&IsStr==0) PareNum++;
-		else if(ReadBuffer[i]==')'&&IsStr==0){
-			PareNum--;
-			if(PareNum==0){
-				buffer[i]=0;
-				break;
-			}
-		}
-		else if(ReadBuffer[i]=='\0') return 0;
-	}
-	return i;
-}
-int GetStringInBracket(char *buffer,const char *ReadBuffer){
-	int i,IsStr,PareNum;
-	for(i=0,IsStr=0,PareNum=0;;i++){
-		buffer[i]=ReadBuffer[i];
-		if(IsDBCSLeadByte(ReadBuffer[i])){
-			i++;
-			buffer[i]=ReadBuffer[i];
-			continue;
-		}
-		if(ReadBuffer[i]=='\"') IsStr^=1;
-		else if(ReadBuffer[i]=='['&&IsStr==0) PareNum++;
-		else if(ReadBuffer[i]==']'&&IsStr==0){
-			PareNum--;
-			if(PareNum==0){
-				i++;
-				buffer[i]=0;
-				break;
-			}
-		}
-		else if(ReadBuffer[i]=='\0') return 0;
-	}
-	return i;
-}
-int JumpStringInPare(const char *buffer,int pos){
-	int PareNum;
-	for(PareNum=1;;pos++){
-		if(buffer[pos]=='\"'){
-			for(pos++;;pos++){
-				if(buffer[pos]=='\"') break;
-			}
-			continue;
-		}
-		else if(buffer[pos]=='(') PareNum++;
-		else if(buffer[pos]==')'){
-			PareNum--;
-			if(PareNum==0) return pos;
-		}
-		else if(buffer[pos]=='\0') break;
-	}
-	return 0;
-}
-int JumpStringInBracket(const char *buffer,int pos){
-	int PareNum;
-	for(PareNum=1;;pos++){
-		if(buffer[pos]=='\"'){
-			for(pos++;;pos++){
-				if(buffer[pos]=='\"') break;
-			}
-			continue;
-		}
-		else if(buffer[pos]=='[') PareNum++;
-		else if(buffer[pos]==']'){
-			PareNum--;
-			if(PareNum==0) return pos;
-		}
-		else if(buffer[pos]=='\0') break;
-	}
-	return 0;
-}
 
 int GetCpFromLine(int LineNum){
Index: trunk/abdev/BasicCompiler_Common/Subroutine.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/Subroutine.cpp	(revision 182)
@@ -1,2 +1,7 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
+#include <ProcedureImpl.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -83,44 +88,4 @@
 	}
 }
-bool SplitMemberName( const char *desc, char *object, char *member, CClass::RefType &refType ){
-	int lastIndex = -1;
-	for( int i=0; desc[i]; i++ ){
-		if( desc[i] == '(' ){
-			i=JumpStringInPare(desc,i+1);
-			continue;
-		}
-		else if( desc[i] == '[' ){
-			i=JumpStringInBracket(desc,i+1);
-			continue;
-		}
-		else if(desc[i]=='.'||(desc[i]==1&&desc[i+1]==ESC_PSMEM)){
-			lastIndex = i;
-		}
-	}
-	if( lastIndex == -1 ){
-		lstrcpy( member, desc );
-		return false;
-	}
-
-	if(desc[lastIndex]=='.'){
-		lstrcpy(member,desc+lastIndex+1);
-		refType = CClass::Dot;
-	}
-	else{
-		lstrcpy(member,desc+lastIndex+2);
-		refType = CClass::Pointer;
-	}
-
-	if( object ){
-		lstrcpy( object, desc );
-		object[lastIndex]=0;
-	}
-
-	return true;
-}
-bool SplitMemberName( const char *desc, char *object, char *member ){
-	CClass::RefType dummyRefType;
-	return SplitMemberName( desc, object, member, dummyRefType );
-}
 
 bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, Type &resultType, bool isCallOn ){
@@ -199,5 +164,5 @@
 		GetVarType(fullCallName,type,false);
 
-		ProcPointer *pProcPtr = Smoothie::meta.procPointers[type.GetIndex()];
+		ProcPointer *pProcPtr = Smoothie::GetMeta().GetProcPointers()[type.GetIndex()];
 		resultType = pProcPtr->ReturnType();
 
@@ -402,5 +367,5 @@
 
 	// オブジェクトを生成
-	DllProc *pDllProc = new DllProc( namespaceScopes, procName, kind, isCdecl, dllFileName, alias );
+	DllProc *pDllProc = new DllProcImpl( namespaceScopes, procName, kind, isCdecl, dllFileName, alias );
 
 	// パラメータを解析
@@ -409,5 +374,5 @@
 
 	// パラメータのエラーチェック
-	foreach( const Parameter *pParam, pDllProc->Params() ){
+	BOOST_FOREACH( const Parameter *pParam, pDllProc->Params() ){
 		if( pParam->IsObject() ){
 			SetError(25,pParam->GetVarName(),nowLine);
@@ -662,5 +627,5 @@
 
 	// 名前空間管理
-	NamespaceScopes &namespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
+	NamespaceScopes &namespaceScopes = Smoothie::Temp::liveingNamespaceScopes;
 	namespaceScopes.clear();
 
@@ -852,38 +817,4 @@
 }
 
-
-
-///////////////////////
-// 関数ポインタの管理
-///////////////////////
-
-int AddProcPtrInfo( const string &typeExpression, int nowLine ){
-	DWORD dwProcType = (DWORD)typeExpression[2];
-	const string &paramStr = typeExpression.substr( 3 );
-
-	Procedure::Kind kind = Procedure::Sub;
-	if( dwProcType == ESC_FUNCTION ){
-		kind = Procedure::Function;
-	}
-
-	ProcPointer *pProcPointer = new ProcPointer( kind );
-
-	//buffer[0]は'('となっている
-	pProcPointer->SetParamsAndReturnType( paramStr.c_str(), nowLine );
-
-	Smoothie::meta.procPointers.push_back( pProcPointer );
-
-	return (int)Smoothie::meta.procPointers.size()-1;
-}
-void DeleteProcPtrInfo(void){
-	BOOST_FOREACH( ProcPointer *pProcPointer, Smoothie::meta.procPointers ){
-		delete pProcPointer;
-	}
-
-	Smoothie::meta.procPointers.clear();
-}
-
-
-
 bool IsNeedProcCompile(){
 	for(int i2=0;i2<MAX_HASH;i2++){
Index: trunk/abdev/BasicCompiler_Common/Type.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Type.cpp	(revision 169)
+++ 	(revision )
@@ -1,536 +1,0 @@
-#include "common.h"
-
-const int Type::basicTypeList[] = {
-	DEF_BYTE,
-	DEF_SBYTE,
-	DEF_WORD,
-	DEF_INTEGER,
-	DEF_DWORD,
-	DEF_LONG,
-	DEF_QWORD,
-	DEF_INT64,
-
-	DEF_SINGLE,
-	DEF_DOUBLE,
-
-	DEF_BOOLEAN,
-
-	DEF_PTR_VOID,
-
-	DEF_ANY,
-
-	DEF_NON
-};
-
-const string Type::basicTypeNameList[] = {
-	"Byte",
-	"SByte",
-	"Word",
-	"Integer",
-	"DWord",
-	"Long",
-	"QWord",
-	"Int64",
-
-	"Single",
-	"Double",
-
-	"Boolean",
-
-	"VoidPtr",
-
-	"Any",
-
-	""
-};
-
-bool Type::StringToBasicType( const string &typeName, int &basicType ){
-	for( int i=0; ; i++ ){
-		if( basicTypeList[i] == DEF_NON ){
-			break;
-		}
-		if( basicTypeNameList[i] == typeName ){
-			basicType = basicTypeList[i];
-			return true;
-		}
-	}
-	return false;
-}
-bool Type::StringToType( const string &typeName, Type &type ){
-	type.index = -1;
-
-	if( typeName[0] == '*' ){
-		if( typeName.size() >= 3
-			&& typeName[1] == 1 && ( typeName[2] == ESC_FUNCTION || typeName[2] == ESC_SUB ) ){
-				//関数ポインタ（*Function）
-				type.basicType = DEF_PTR_PROC;
-				type.index = AddProcPtrInfo( typeName, cp );
-				return true;
-		}
-
-		const string &nextTypeName = typeName.substr( 1 );
-
-		if( !StringToType( nextTypeName, type ) ){
-			return false;
-		}
-
-		type.PtrLevelUp();
-
-		return true;
-	}
-
-	if( StringToBasicType( typeName, type.basicType ) ){
-		// 基本型だったとき
-		return true;
-	}
-
-
-	// Object型だったとき
-	if( typeName == "Object" ){
-		type.SetType( DEF_OBJECT, pobj_DBClass->GetObjectClassPtr() );
-		return true;
-	}
-
-	// String型だったとき
-	if( typeName == "String" ){
-		type.SetType( DEF_OBJECT, pobj_DBClass->GetStringClassPtr() );
-		return true;
-	}
-
-
-	////////////////////
-	// TypeDefされた型
-	////////////////////
-	int i=Smoothie::meta.typeDefs.GetIndex( typeName );
-	if(i!=-1){
-		type = Smoothie::meta.typeDefs[i].GetBaseType();
-		return true;
-	}
-
-	//クラス
-	const CClass *pobj_c = pobj_DBClass->Find( typeName );
-	if(pobj_c){
-		type.pClass = pobj_c;
-
-		if( pobj_c->IsStructure() ){
-			type.basicType = DEF_STRUCT;
-		}
-		else{
-			type.basicType = DEF_OBJECT;
-		}
-		return true;
-	}
-
-	return false;
-}
-
-int Type::GetBasicSize( int basicType )
-{
-
-	// 基本型
-	switch( basicType ){
-		case DEF_SBYTE:
-		case DEF_BYTE:
-		case DEF_BOOLEAN:
-			return sizeof(BYTE);
-
-		case DEF_INTEGER:
-		case DEF_WORD:
-			return sizeof(WORD);
-
-		case DEF_LONG:
-		case DEF_DWORD:
-			return sizeof(DWORD);
-
-		case DEF_INT64:
-		case DEF_QWORD:
-			return sizeof(_int64);
-
-		case DEF_DOUBLE:
-			return sizeof(double);
-		case DEF_SINGLE:
-			return sizeof(float);
-	}
-
-	// ポインタ
-	if(IsPtrType(basicType)){
-		return PTR_SIZE;
-	}
-
-	// オブジェクト
-	if(basicType==DEF_OBJECT){
-		return PTR_SIZE;
-	}
-
-	SetError();
-	return 0;
-}
-
-
-bool Type::Equals( const Type &type ) const
-{
-	if( basicType == type.basicType ){
-		if( NATURAL_TYPE( basicType ) == DEF_OBJECT
-			|| NATURAL_TYPE( basicType ) == DEF_STRUCT ){
-
-				if( index == type.index ){
-					return true;
-				}
-
-		}
-		else{
-			return true;
-		}
-	}
-	return false;
-}
-
-int Type::GetBasicSize() const
-{
-	return GetBasicSize( basicType );
-}
-int Type::GetSize() const
-{
-
-	// 基本型
-	switch( basicType ){
-		case DEF_LONG:
-			if(index==LITERAL_NULL||index==LITERAL_M128_0||index==LITERAL_0_255){
-				return sizeof(BYTE);
-			}
-			else if(index==LITERAL_M32768_0||index==LITERAL_0_65535){
-				return sizeof(WORD);
-			}
-			return sizeof(DWORD);
-
-		case DEF_SBYTE:
-		case DEF_BYTE:
-		case DEF_BOOLEAN:
-			return sizeof(BYTE);
-
-		case DEF_INTEGER:
-		case DEF_WORD:
-			return sizeof(WORD);
-
-		case DEF_DWORD:
-			return sizeof(DWORD);
-
-		case DEF_INT64:
-		case DEF_QWORD:
-			return sizeof(_int64);
-
-		case DEF_DOUBLE:
-			return sizeof(double);
-		case DEF_SINGLE:
-			return sizeof(float);
-	}
-
-	// ポインタ
-	if(IsPtrType(basicType)){
-		return PTR_SIZE;
-	}
-
-	// 構造体
-	if( basicType == DEF_STRUCT ){
-		if( !pClass ){
-			SetError();
-			return 0;
-		}
-
-		return pClass->GetSize();
-	}
-
-	// オブジェクト
-	if(basicType==DEF_OBJECT){
-		if( GetClass().IsInterface() ){
-			// vtblOffsetのサイズを含める
-			return PTR_SIZE*2;
-		}
-		return PTR_SIZE;
-	}
-
-	SetError();
-	return 0;
-}
-
-bool Type::IsNull() const{
-  if( basicType == DEF_NON ){
-	  return true;
-  }
-  return false;
-}
-
-bool Type::IsByte() const{
-  if( basicType == DEF_BYTE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsSByte() const{
-  if( basicType == DEF_SBYTE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsWord() const{
-  if( basicType == DEF_WORD ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsInteger() const{
-  if( basicType == DEF_INTEGER ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsDWord() const{
-  if( basicType == DEF_DWORD ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsLong() const{
-  if( basicType == DEF_LONG ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsQWord() const{
-  if( basicType == DEF_QWORD ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsInt64() const{
-  if( basicType == DEF_INT64 ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsSingle() const{
-  if( basicType == DEF_SINGLE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsDouble() const{
-  if( basicType == DEF_DOUBLE ){
-	  return true;
-  }
-  return false;
-}
-bool Type::IsBoolean() const{
-  if( basicType == DEF_BOOLEAN ){
-	  return true;
-  }
-  return false;
-}
-
-bool Type::IsPointer() const
-{
-	if(PTR_LEVEL( basicType )|| basicType == DEF_PTR_VOID || basicType == DEF_PTR_PROC
-		|| ( basicType & FLAG_PTR ) ){
-			return true;
-	}
-
-	return false;
-}
-bool Type::IsSigned() const
-{
-	switch( basicType ){
-		case DEF_SBYTE:
-		case DEF_INTEGER:
-		case DEF_LONG:
-		case DEF_INT64:
-		case DEF_SINGLE:
-		case DEF_DOUBLE:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::IsNaturalWhole() const
-{
-	switch( basicType ){
-		case DEF_SBYTE:
-		case DEF_BYTE:
-		case DEF_INTEGER:
-		case DEF_WORD:
-		case DEF_LONG:
-		case DEF_DWORD:
-		case DEF_INT64:
-		case DEF_QWORD:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::IsWhole() const
-{
-	return (
-		IsNaturalWhole()
-		|| IsPtrType( basicType )
-		|| basicType == DEF_BOOLEAN
-		);
-}
-bool Type::IsReal() const
-{
-	switch( basicType ){
-		case DEF_SINGLE:
-		case DEF_DOUBLE:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::Is64() const
-{
-	switch( basicType ){
-		case DEF_QWORD:
-		case DEF_INT64:
-			return true;
-		default:
-			break;
-	}
-	return false;
-}
-bool Type::IsProcPtr() const
-{
-	if( basicType == DEF_PTR_PROC ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsStruct() const
-{
-	if( basicType == DEF_STRUCT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsStructPtr() const
-{
-	if( basicType == DEF_PTR_STRUCT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsObject() const
-{
-	if( basicType == DEF_OBJECT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsObjectPtr() const
-{
-	if( basicType == DEF_PTR_OBJECT ){
-		return true;
-	}
-	return false;
-}
-bool Type::IsObjectClass() const
-{
-	if( basicType == DEF_OBJECT ){
-		if( pClass->GetName() == "Object" ){
-			return true;
-		}
-	}
-	return false;
-}
-bool Type::IsStringClass() const
-{
-	if( basicType == DEF_OBJECT ){
-		if( pClass->GetName() == "String" ){
-			return true;
-		}
-	}
-	return false;
-}
-bool Type::IsVoidPtr() const
-{
-	if( basicType == DEF_PTR_VOID ){
-		return true;
-	}
-	return false;
-}
-
-bool Type::IsAny() const
-{
-	if( basicType == DEF_ANY ){
-		return true;
-	}
-	return false;
-}
-
-bool Type::HasMember() const
-{
-	if( NATURAL_TYPE( basicType ) == DEF_OBJECT
-		|| NATURAL_TYPE( basicType ) == DEF_STRUCT ){
-			return true;
-	}
-	return false;
-}
-
-const string Type::ToString() const
-{
-	if( PTR_LEVEL( basicType ) ){
-		//ポインタレベルが1以上の場合
-		Type type( *this );
-		type.PtrLevelDown();
-
-		return (string)"*" + type.ToString();
-	}
-	else if( IsObject() || IsStruct() ){
-		//オブジェクトまたは構造体
-
-		if( !( index == 0 || index == -1 ) ){
-			if( pClass->GetNamespaceScopes().size() >= 1 )
-			{
-				return pClass->GetNamespaceScopes().ToString() + "." + pClass->GetName();
-			}
-			return pClass->GetName();
-		}
-	}
-	else if( IsProcPtr() ){
-		if( index == 0 || index == -1 ){
-			return "VoidPtr";
-		}
-		else{
-			if( Smoothie::meta.procPointers[index]->ReturnType().IsNull() ){
-				return "*Sub";
-			}
-			return "*Function";
-		}
-	}
-	else{
-		// 基本型
-
-		for( int i=0; ; i++ ){
-			if( basicTypeList[i] == DEF_NON ){
-				break;
-			}
-			if( basicTypeList[i] == basicType ){
-				return basicTypeNameList[i];
-			}
-		}
-	}
-
-	extern int cp;
-	SetError(1,NULL,cp);
-
-	return (string)"(null)";
-}
-
-Type Type::String(){
-	return Type( DEF_OBJECT, *pobj_DBClass->GetStringClassPtr() );
-}
-
-const string BlittableType::GetCreateStaticMethodFullName() const
-{
-	return pClass->GetNamespaceScopes().ToString() + "." + pClass->GetName() + "._Create";
-}
Index: trunk/abdev/BasicCompiler_Common/Type.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Type.h	(revision 169)
+++ 	(revision )
@@ -1,191 +1,0 @@
-#pragma once
-
-class CClass;
-
-class Type{
-	int basicType;
-	union{
-		LONG_PTR index;
-		const CClass *pClass;
-	};
-
-public:
-	static int GetBasicSize( int basicType );
-
-	Type():
-	  basicType( DEF_NON ),
-	  index( -1 ){}
-	Type( int basicType ):
-	  basicType( basicType ),
-	  index( -1 ){}
-
-	Type( int basicType, LONG_PTR index ):
-	  basicType( basicType ),
-	  index( index ){}
-
-	Type( int basicType, const CClass &objClass ):
-	  basicType( basicType ),
-	  index( (LONG_PTR)&objClass ){}
-
-	Type( const Type &type ):
-	  basicType( type.basicType ),
-	  index( type.index ){}
-
-	__inline int GetBasicType() const
-	{
-		return basicType;
-	}
-	LONG_PTR GetIndex() const
-	{
-		return index;
-	}
-	const CClass &GetClass() const
-	{
-		return *pClass;
-	}
-
-	void SetBasicType( int basicType ){
-		this->basicType = basicType;
-	}
-	void SetIndex( LONG_PTR index ){
-		this->index = index;
-	}
-	void SetNull(){
-		SetBasicType( DEF_NON );
-		SetIndex( -1 );
-	}
-	void SetType( int basicType, LONG_PTR index ){
-		SetBasicType( basicType );
-		SetIndex( index );
-	}
-	void SetType( int basicType, const CClass *pClass ){
-		SetBasicType( basicType );
-		this->pClass = pClass;
-	}
-
-	int PtrLevel() const
-	{
-		return PTR_LEVEL( basicType );
-	}
-	void PtrLevelUp(){
-		PTR_LEVEL_UP( basicType );
-	}
-	void PtrLevelDown(){
-		PTR_LEVEL_DOWN( basicType );
-	}
-
-	bool Equals( const Type &type ) const;
-
-	int GetBasicSize() const;
-	int GetSize() const;
-
-	bool IsNull() const;
-
-	bool IsByte() const;
-	bool IsSByte() const;
-	bool IsWord() const;
-	bool IsInteger() const;
-	bool IsDWord() const;
-	bool IsLong() const;
-	bool IsQWord() const;
-	bool IsInt64() const;
-	bool IsSingle() const;
-	bool IsDouble() const;
-	bool IsBoolean() const;
-
-	bool IsPointer() const;
-	bool IsSigned() const;
-	bool IsNaturalWhole() const;
-	bool IsWhole() const;
-	bool IsReal() const;
-	bool Is64() const;
-	bool IsProcPtr() const;
-	bool IsStruct() const;
-	bool IsStructPtr() const;
-	bool IsObject() const;
-	bool IsObjectPtr() const;
-	bool IsObjectClass() const;
-	bool IsStringClass() const;
-	bool IsVoidPtr() const;
-	bool IsAny() const;
-
-	// オブジェクトや構造体など、メンバを持つ型かどうかを判別する
-	bool HasMember() const;
-
-	const string ToString() const;
-
-	void operator= ( const Type &type ){
-		basicType = type.basicType;
-		index = type.index;
-	}
-
-	static Type String();
-
-
-private:
-	static const int basicTypeList[];
-	static const string basicTypeNameList[];
-public:
-	static bool StringToBasicType( const string &typeName, int &basicType );
-	static bool StringToType( const string &typeName, Type &type );
-};
-
-class BlittableType
-{
-	Type basicType;
-	CClass *pClass;
-public:
-	BlittableType( const Type &basicType, CClass *pClass )
-		: basicType( basicType )
-		, pClass( pClass )
-	{
-	}
-	BlittableType(){}
-	const Type &GetBasicType() const
-	{
-		return basicType;
-	}
-	const CClass *GetClassPtr() const
-	{
-		return pClass;
-	}
-	const string GetCreateStaticMethodFullName() const;
-};
-class BlittableTypes : public vector<BlittableType>
-{
-public:
-	bool IsExist( Type type ) const
-	{
-		const BlittableTypes &blittableTypes = *this;
-		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
-			if( blittableType.GetBasicType().Equals( type ) ){
-				return true;
-			}
-		}
-		return false;
-	}
-	const BlittableType &Find( const Type &type ) const
-	{
-		const BlittableTypes &blittableTypes = *this;
-		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
-			if( blittableType.GetBasicType().Equals( type ) ){
-				return blittableType;
-			}
-		}
-		throw "Blittable型ではない";
-	}
-	const CClass *GetClassPtr( const Type &type ) const
-	{
-		const BlittableTypes &blittableTypes = *this;
-		BOOST_FOREACH( const BlittableType &blittableType, blittableTypes ){
-			if( blittableType.GetBasicType().Equals( type ) ){
-				return blittableType.GetClassPtr();
-			}
-		}
-		return NULL;
-	}
-	const CClass &GetClass( const Type &type ) const
-	{
-		return *GetClassPtr( type );
-	}
-};
Index: trunk/abdev/BasicCompiler_Common/TypeDef.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/TypeDef.cpp	(revision 169)
+++ 	(revision )
@@ -1,242 +1,0 @@
-#include "common.h"
-
-
-TypeDef::TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName )
-	: namespaceScopes( namespaceScopes )
-	, name( name )
-	, baseName( baseName )
-{
-	if( !Type::StringToType( baseName, baseType ) ){
-		SetError(3, baseName, cp );
-		return;
-	}
-}
-TypeDef::~TypeDef(){
-}
-
-bool TypeDef::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
-{
-	if( GetName() != name ){
-		return false;
-	}
-	return NamespaceScopes::IsSameArea( this->namespaceScopes, namespaceScopes );
-}
-bool TypeDef::IsEqualSymbol( const string &fullName ) const
-{
-	char AreaName[VN_SIZE] = "";		//オブジェクト変数
-	char NestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
-
-	if( IsEqualSymbol( NamespaceScopes( AreaName ), NestName ) ){
-		return true;
-	}
-
-	if( isNest ){
-		// 静的メンバを考慮
-
-		char AreaName2[VN_SIZE] = "";		//オブジェクト変数
-		char NestName2[VN_SIZE] = "";		//入れ子メンバ
-		bool isNest = SplitMemberName( AreaName, AreaName2, NestName2 );
-		lstrcat( NestName2, "." );
-		lstrcat( NestName2, NestName );
-
-		return IsEqualSymbol( NamespaceScopes( AreaName2 ), NestName2 );
-	}
-
-	return false;
-}
-
-
-
-TypeDefCollection::TypeDefCollection(){
-}
-TypeDefCollection::~TypeDefCollection(){
-}
-void TypeDefCollection::Add( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName ){
-	TypeDef typeDef( namespaceScopes, name, baseName );
-	this->push_back( typeDef );
-}
-int TypeDefCollection::GetIndex( const NamespaceScopes &namespaceScopes, const string &name ) const{
-	int max = (int)(*this).size();
-	for( int i=0; i<max; i++ ){
-		if( (*this)[i].IsEqualSymbol( namespaceScopes, name ) ){
-			return i;
-		}
-	}
-	return -1;
-}
-int TypeDefCollection::GetIndex( const string &fullName ) const{
-	char AreaName[VN_SIZE] = "";		//オブジェクト変数
-	char NestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
-
-	return GetIndex( NamespaceScopes( AreaName ), NestName );
-}
-
-void TypeDefCollection::Add( const NamespaceScopes &namespaceScopes, const string &expression, int nowLine ){
-	int i;
-	char temporary[VN_SIZE];
-
-	for(i=0;;i++){
-		if(expression[i]=='='||expression[i]=='\0'){
-			temporary[i]=0;
-			break;
-		}
-		temporary[i]=expression[i];
-	}
-
-	if(expression[i]!='='){
-		SetError(10,"TypeDef",nowLine);
-		return;
-	}
-
-	const char *pTemp=expression.c_str()+i+1;
-
-	//識別文字のエラーチェック（新しい型）
-	i=0;
-	for(;;i++){
-		if(temporary[i]=='\0') break;
-		if(!IsVariableChar(temporary[i])){
-			SetError(10,"TypeDef",nowLine);
-			return;
-		}
-	}
-
-	//識別文字のエラーチェック（コピー元の型）
-	if(pTemp[0]=='*'&&pTemp[1]==1&&(pTemp[2]==ESC_FUNCTION||pTemp[2]==ESC_SUB)){
-		//関数ポインタ
-		if(pTemp[3]!='('){
-			SetError(10,"TypeDef",nowLine);
-			return;
-		}
-	}
-	else{
-		i=0;
-		while(pTemp[i]=='*') i++;
-		for(;;i++){
-			if(pTemp[i]=='\0') break;
-			if(!IsVariableChar(pTemp[i])){
-				SetError(10,"TypeDef",nowLine);
-				return;
-			}
-		}
-	}
-
-	//識別子が重複している場合はエラーにする
-	if(lstrcmp(temporary,pTemp)==0){
-		SetError(1,NULL,nowLine);
-		return;
-	}
-
-
-
-	//////////////////////////
-	// TypeDef情報を追加
-	//////////////////////////
-
-	//エラー用
-	extern int cp;
-	cp = nowLine;
-
-	Add( namespaceScopes, temporary, pTemp );
-}
-
-void TypeDefCollection::Init(){
-	// 初期化
-	clear();
-
-	// 名前空間管理
-	NamespaceScopes &namespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
-	namespaceScopes.clear();
-
-	// Importsされた名前空間の管理
-	NamespaceScopesCollection &importedNamespaces = Smoothie::Temp::importedNamespaces;
-	importedNamespaces.clear();
-
-	int i=-1, i2;
-	char temporary[VN_SIZE];
-	while(1){
-		extern char *basbuf;
-
-		i++;
-
-		if( basbuf[i] == 1 && basbuf[i+1] == ESC_NAMESPACE ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( basbuf[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=basbuf[i];
-			}
-			namespaceScopes.push_back( temporary );
-
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_ENDNAMESPACE ){
-			if( namespaceScopes.size() <= 0 ){
-				SetError(12, "End Namespace", i );
-			}
-			else{
-				namespaceScopes.pop_back();
-			}
-
-			i += 2;
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_IMPORTS ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( basbuf[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=basbuf[i];
-			}
-			if( !importedNamespaces.Imports( temporary ) )
-			{
-				SetError(64,temporary,cp );
-			}
-
-			continue;
-		}
-		else if( basbuf[i] == 1 && basbuf[i+1] == ESC_CLEARNAMESPACEIMPORTED ){
-			importedNamespaces.clear();
-			continue;
-		}
-
-		if( basbuf[i]==1 ){
-			char temporary[VN_SIZE];
-			if(basbuf[i+1]==ESC_TYPEDEF){
-				int i2 = 0;
-				for(i+=2;;i2++,i++){
-					if(basbuf[i]=='\n'){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=basbuf[i];
-					if(basbuf[i]=='\0') break;
-				}
-				Add( namespaceScopes, temporary, i );
-
-				continue;
-			}
-			else if( basbuf[i+1] == ESC_CONST && basbuf[i+2] == 1 && basbuf[i+3] == ESC_ENUM ){
-				int i2 = 0;
-				for(i+=4;;i2++,i++){
-					if(!IsVariableChar(basbuf[i])){
-						temporary[i2]=0;
-						break;
-					}
-					temporary[i2]=basbuf[i];
-					if(basbuf[i]=='\0') break;
-				}
-				Add( namespaceScopes, temporary, "Long" );
-			}
-		}
-
-		//次の行
-		for(;;i++){
-			if(IsCommandDelimitation(basbuf[i])) break;
-		}
-		if(basbuf[i]=='\0') break;
-	}
-}
Index: trunk/abdev/BasicCompiler_Common/TypeDef.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/TypeDef.h	(revision 169)
+++ 	(revision )
@@ -1,55 +1,0 @@
-#pragma once
-
-#include <vector>
-#include <string>
-
-#include "../Type.h"
-
-using namespace std;
-
-class TypeDefCollection;
-
-class TypeDef{
-	friend TypeDefCollection;
-
-	NamespaceScopes namespaceScopes;
-
-	string name;
-	string baseName;
-	Type baseType;
-public:
-	TypeDef( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
-	~TypeDef();
-
-	const string &GetName() const
-	{
-		return name;
-	}
-	const string &GetBaseName() const
-	{
-		return baseName;
-	}
-	const Type &GetBaseType() const
-	{
-		return baseType;
-	}
-
-	bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
-	bool IsEqualSymbol( const string &name ) const;
-};
-
-class TypeDefCollection : public vector<TypeDef>
-{
-public:
-	TypeDefCollection();
-	~TypeDefCollection();
-
-	void Add( const NamespaceScopes &namespaceScopes, const string &name, const string &baseName );
-	int GetIndex( const NamespaceScopes &namespaceScopes, const string &name ) const;
-	int GetIndex( const string &fullName ) const;
-
-private:
-	void Add( const NamespaceScopes &namespaceScopes, const string &expression, int nowLine );
-public:
-	void Init();
-};
Index: trunk/abdev/BasicCompiler_Common/VarList.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/VarList.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/VarList.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -266,5 +268,5 @@
 	extern int MemPos_RWSection;
 
-	foreach( Variable *pVar, globalVars ){
+	BOOST_FOREACH( Variable *pVar, globalVars ){
 
 		//スコープ外の場合は無視
@@ -362,5 +364,5 @@
 	if(!pUserProc) return;
 
-	foreach( Variable *pVar, pUserProc->localVars ){
+	BOOST_FOREACH( Variable *pVar, pUserProc->localVars ){
 
 		//スコープ外の場合は無視
@@ -725,5 +727,5 @@
 
 		if(pUserProc){
-			pobj_CompilingClass = pUserProc->GetParentClassPtr();
+			Smoothie::Temp::pCompilingClass = pUserProc->GetParentClassPtr();
 			UserProc::CompileStartForUserProc( pUserProc );
 		}
Index: trunk/abdev/BasicCompiler_Common/Variable.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Variable.cpp	(revision 169)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#include "common.h"
-
-bool Variable::IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember ) const
-{
-	if( GetName() == symbol.GetName()
-		&& NamespaceScopes::IsSameArea( this->namespaceScopes, symbol.GetNamespaceScopes() ) )
-	{
-		return true;
-	}
-
-	if( isSupportStaticMember && symbol.GetNamespaceScopes().size() >= 1 )
-	{
-		// 静的メンバを考慮
-		NamespaceScopes namespaceScopes( symbol.GetNamespaceScopes() );
-		string name = namespaceScopes[namespaceScopes.size()-1] + "." + symbol.GetName();
-		namespaceScopes.pop_back();
-
-		return IsEqualSymbol( Symbol( namespaceScopes, name ), false );
-	}
-	return false;
-}
Index: trunk/abdev/BasicCompiler_Common/Variable.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/Variable.h	(revision 169)
+++ 	(revision )
@@ -1,207 +1,0 @@
-#pragma once
-
-#include "Type.h"
-#include <Symbol.h>
-
-class Variable : public Type
-{
-	const NamespaceScopes namespaceScopes;
-	string name;
-	bool isConst;
-	bool isRef;
-	bool isArray;
-	int subScripts[MAX_ARRAYDIM];
-
-	bool isParameter;
-
-public:
-	Variable( const string &name, const Type &type, bool isConst = false, bool isRef = false )
-		: Type( type )
-		, name( name )
-		, isConst( isConst )
-		, isRef( isRef )
-		, isArray( false )
-		, isParameter( false)
-	{
-		subScripts[0] = -1;
-	}
-	Variable( const NamespaceScopes &namespaceScopes, const string &name, const Type &type, bool isConst = false, bool isRef = false )
-		: namespaceScopes( namespaceScopes )
-		, Type( type )
-		, name( name )
-		, isConst( isConst )
-		, isRef( isRef )
-		, isArray( false )
-		, isParameter( false)
-	{
-		subScripts[0] = -1;
-	}
-	Variable( const Variable &var )
-		: Type( var )
-		, name( var.name )
-		, isConst( var.isConst )
-		, isRef( var.isRef )
-		, isArray( false )
-		, isParameter( false )
-	{
-		subScripts[0] = -1;
-		if( var.isArray ){
-			SetArray( var.subScripts );
-		}
-	}
-	~Variable(){}
-
-	void SetArray( const int *pSubScripts ){
-		isArray = true;
-		memcpy( this->subScripts, pSubScripts, sizeof(int) * MAX_ARRAYDIM );
-	}
-
-	const string &GetName() const
-	{
-		return name;
-	}
-
-	bool IsEqualSymbol( const Symbol &symbol, bool isSupportStaticMember = true ) const;
-
-	void ConstOff(){
-		isConst = false;
-	}
-	void ConstOn(){
-		isConst = true;
-	}
-	bool IsConst() const
-	{
-		return isConst;
-	}
-	bool IsRef() const
-	{
-		return isRef;
-	}
-	bool IsArray()const
-	{
-		return isArray;
-	}
-	const int *GetSubScriptsPtr() const
-	{
-		return subScripts;
-	}
-
-	void ThisIsParameter(){
-		isParameter = true;
-	}
-	bool IsParameter() const
-	{
-		return isParameter;
-	}
-
-
-	int GetMemorySize() const
-	{
-		if( isRef || isParameter ){
-			return PTR_SIZE;
-		}
-
-		int size = Type::GetSize();
-
-		if( isArray ){
-			int num = 1;
-			for( int i=0; i<MAX_ARRAYDIM; i++){
-				if(subScripts[i]==-1) break;
-				num *= subScripts[i]+1;
-			}
-			size *= num;
-		}
-
-		if( size % PTR_SIZE ){
-			size += PTR_SIZE-(size%PTR_SIZE);
-		}
-
-		return size;
-	}
-
-
-	/* --- オフセット ---
-
-		※グローバル変数で初期バッファがない場合は最上位ビットに1がセットされ、
-		初期バッファの有無が識別される。
-		（その後、スケジュール実行により、実際の配置に並び替えられる）*/
-	int offset;
-
-	//コンストラクタ用パラメータ
-	string paramStrForConstructor;
-
-	//レキシカルスコープ用
-	int ScopeStartAddress;
-	int ScopeEndAddress;
-	int ScopeLevel;
-	BOOL bLiving;
-
-
-	int source_code_address;
-};
-
-class Variables : public vector<Variable *>
-{
-public:
-	Variables(){}
-	~Variables(){
-		clear();
-	}
-
-	void clear(){
-		for( int i=0; i<(int)this->size(); i++ ){
-			delete (*this)[i];
-		}
-
-		vector<Variable *>::clear();
-	}
-
-	bool DuplicateCheck( const Symbol &symbol ) const
-	{
-		//レキシカルスコープを考慮して重複判定
-		for( int i=(int)this->size()-1; i>=0 ; i-- ){
-			Variable &var = *(*this)[i];
-			if( var.bLiving											//現在のスコープで有効なもの
-				&& var.ScopeLevel == obj_LexScopes.GetNowLevel()	//現在のスコープと同一レベル
-				){
-					if( var.IsEqualSymbol( symbol ) ){
-						return true;
-					}
-			}
-		}
-		return false;
-	}
-
-	const Variable *BackSearch( const Symbol &symbol ) const
-	{
-		//レキシカルスコープを考慮してバックサーチ
-		for( int i=(int)this->size()-1; i>=0 ; i-- ){
-			Variable &var = *(*this)[i];
-			if( var.bLiving											//現在のスコープで有効なもの
-				&& var.ScopeLevel <= obj_LexScopes.GetNowLevel()	//現在のスコープレベルを超さないもの（Returnによる解放処理中を考慮）
-				){
-					if( var.IsEqualSymbol( symbol ) ){
-						return &var;
-					}
-			}
-		}
-		return NULL;
-	}
-
-	const Variable *Find( const Symbol &symbol )const
-	{
-		int max = (int)this->size();
-		for( int i=0; i<max; i++ ){
-			Variable *pVar = (*this)[i];
-			if( pVar->IsEqualSymbol( symbol ) ){
-				return pVar;
-			}
-		}
-		return NULL;
-	}
-};
-
-extern Variables globalVars;
-
-
-
Index: trunk/abdev/BasicCompiler_Common/VariableOpe.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/VariableOpe.cpp	(revision 182)
@@ -1,2 +1,7 @@
+#include <jenga/include/smoothie/Smoothie.h>
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
+#include <LexicalScopingImpl.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -7,14 +12,4 @@
 #endif
 
-BOOL IsVariableTopChar(char c){
-	if((c>='A'&&c<='Z')||(c>='a'&&c<='z')||c=='_') return 1;
-	return 0;
-}
-BOOL IsVariableChar(char c){
-	if((c>='A'&&c<='Z')||(c>='a'&&c<='z')||(c>='0'&&c<='9')||
-		c=='%'||c=='!'||c=='#'||c=='$'||
-		c=='_'||c=='.') return 1;
-	return 0;
-}
 BOOL IsPtrType(int type){
 	if(type==-1) return 0;
@@ -119,5 +114,5 @@
 			return DEF_QWORD;
 		case DEF_CHAR:
-			if( isUnicode ) return DEF_WORD;
+			if( Smoothie::IsUnicode() ) return DEF_WORD;
 			return DEF_BYTE;
 	}
@@ -150,5 +145,5 @@
 	//文字型
 	else if( type == DEF_CHAR ){
-		if( isUnicode ) return sizeof( WORD );
+		if( Smoothie::IsUnicode() ) return sizeof( WORD );
 		return sizeof( BYTE );
 	}
@@ -220,5 +215,5 @@
 		if(lpIndex==-1) lstrcpy(name,"VoidPtr");
 		else{
-			if( Smoothie::meta.procPointers[lpIndex]->ReturnType().IsNull() )
+			if( Smoothie::GetMeta().GetProcPointers()[lpIndex]->ReturnType().IsNull() )
 				lstrcpy(name,"*Sub");
 			else lstrcpy(name,"*Function");
@@ -235,5 +230,5 @@
 
 Type GetStringTypeInfo(){
-	Type type( DEF_OBJECT, *pobj_DBClass->GetStringClassPtr() );
+	Type type( DEF_OBJECT, *Smoothie::GetMeta().GetClasses().GetStringClassPtr() );
 	return type;
 }
@@ -248,51 +243,94 @@
 }
 
-/*TODO: 消す
-bool FormatUseProcReturnObject( const char *term, char *procName, char *parameter, CClass::RefType &refType, char *member ){
-	int p1 = 0, p2 = 0;
-
-	for( int i=0; term[i]!='\0' ; i++ ){
-
-		if( term[i] == '[' ){
-			i = JumpStringInBracket( term, i + 1 );
-			if( term[i] == '\0' ) break;
-			continue;
-		}
-		if( term[i] == '(' ){
-			int temp_p = i;
-			i = JumpStringInPare( term, i + 1 ) + 1;
-			if( term[i] == '\0' ) break;
-			if( term[i] == '.'
-				|| term[i] == 1 && term[i] == ESC_PSMEM ){
-					p1 = temp_p;
-					p2 = i;
-			}
-			continue;
-		}
-	}
-	if( !p1 ) return false;
-
-	//メソッド名
-	memcpy( procName, term, p1 );
-	procName[p1] = 0;
-
-	//パラメータ
-	memcpy( parameter, term + p1 + 1, p2 - p1 - 2 );
-	parameter[ p2 - p1 - 2 ] = 0;
-
-	//参照タイプ
-	if( term[p2] == '.' ){
-		refType = CClass::Dot;
-	}
-	else{
-		refType = CClass::Pointer;
-		p2++;
-	}
-
-	//メンバ
-	lstrcpy( member, term + p2 + 1 );
-
-	return true;
-}*/
+
+void GetArrange(char *variable,char *variAnswer,int *SubScripts){
+	extern int cp;
+	int i,i2,i3,i4;
+	double dbl;
+	_int64 i64data;
+	BOOL bBracket;
+	char temporary[VN_SIZE];
+
+	for(i=0;;i++){
+		if(variable[i]=='('||variable[i]=='['){
+			if(variable[i]=='[') bBracket=1;
+			else bBracket=0;
+
+			variAnswer[i]=0;
+			for(i++,i2=0,i3=0;;i++,i2++){
+				if(variable[i]==','){
+					temporary[i2]=0;
+
+					Type resultType;
+					if( !StaticCalculation(true, temporary,0,&i64data,resultType) ){
+						return;
+					}
+					if(resultType.IsReal()){
+						memcpy(&dbl,&i64data,sizeof(double));
+						i64data=(_int64)dbl;
+					}
+
+					if(i64data<0){
+						//error
+						SubScripts[i3]=0;
+					}
+					else SubScripts[i3]=(int)i64data;
+					i3++;
+					i2=-1;
+					continue;
+				}
+				if(variable[i]=='('){
+					i4=GetStringInPare(temporary+i2,variable+i);
+					i2+=i4-1;
+					i+=i4-1;
+					continue;
+				}
+				if(variable[i]=='['){
+					i4=GetStringInBracket(temporary+i2,variable+i);
+					i2+=i4-1;
+					i+=i4-1;
+					continue;
+				}
+				if(variable[i]==')'&&bBracket==0||
+					variable[i]==']'&&bBracket){
+					temporary[i2]=0;
+					if(i2==0){
+						SubScripts[i3]=-2;
+						break;
+					}
+
+					Type resultType;
+					if( !StaticCalculation(true, temporary,0,&i64data,resultType) ){
+						return;
+					}
+					if(resultType.IsReal()){
+						memcpy(&dbl,&i64data,sizeof(double));
+						i64data=(_int64)dbl;
+					}
+
+					if(i64data<0){
+						//error
+						SubScripts[i3]=0;
+					}
+					else SubScripts[i3]=(int)i64data;
+					SubScripts[i3+1]=-1;
+					break;
+				}
+				if(variable[i]=='\"'){
+					SetError(1,NULL,cp);
+					return;
+				}
+				temporary[i2]=variable[i];
+			}
+			break;
+		}
+		variAnswer[i]=variable[i];
+		if(variable[i]=='\0'){
+			SubScripts[0]=-1;
+			break;
+		}
+	}
+}
+
 
 BOOL GetVarFormatString(char *buffer,char *array,char *array2,char *NestMember,CClass::RefType &refType){
@@ -427,120 +465,4 @@
 	return i2;
 }
-void GetArrange(char *variable,char *variAnswer,int *SubScripts){
-	extern int cp;
-	int i,i2,i3,i4;
-	double dbl;
-	_int64 i64data;
-	BOOL bBracket;
-	char temporary[VN_SIZE];
-
-	for(i=0;;i++){
-		if(variable[i]=='('||variable[i]=='['){
-			if(variable[i]=='[') bBracket=1;
-			else bBracket=0;
-
-			variAnswer[i]=0;
-			for(i++,i2=0,i3=0;;i++,i2++){
-				if(variable[i]==','){
-					temporary[i2]=0;
-
-					Type resultType;
-					if( !StaticCalculation(true, temporary,0,&i64data,resultType) ){
-						return;
-					}
-					if(resultType.IsReal()){
-						memcpy(&dbl,&i64data,sizeof(double));
-						i64data=(_int64)dbl;
-					}
-
-					if(i64data<0){
-						//error
-						SubScripts[i3]=0;
-					}
-					else SubScripts[i3]=(int)i64data;
-					i3++;
-					i2=-1;
-					continue;
-				}
-				if(variable[i]=='('){
-					i4=GetStringInPare(temporary+i2,variable+i);
-					i2+=i4-1;
-					i+=i4-1;
-					continue;
-				}
-				if(variable[i]=='['){
-					i4=GetStringInBracket(temporary+i2,variable+i);
-					i2+=i4-1;
-					i+=i4-1;
-					continue;
-				}
-				if(variable[i]==')'&&bBracket==0||
-					variable[i]==']'&&bBracket){
-					temporary[i2]=0;
-					if(i2==0){
-						SubScripts[i3]=-2;
-						break;
-					}
-
-					Type resultType;
-					if( !StaticCalculation(true, temporary,0,&i64data,resultType) ){
-						return;
-					}
-					if(resultType.IsReal()){
-						memcpy(&dbl,&i64data,sizeof(double));
-						i64data=(_int64)dbl;
-					}
-
-					if(i64data<0){
-						//error
-						SubScripts[i3]=0;
-					}
-					else SubScripts[i3]=(int)i64data;
-					SubScripts[i3+1]=-1;
-					break;
-				}
-				if(variable[i]=='\"'){
-					SetError(1,NULL,cp);
-					return;
-				}
-				temporary[i2]=variable[i];
-			}
-			break;
-		}
-		variAnswer[i]=variable[i];
-		if(variable[i]=='\0'){
-			SubScripts[0]=-1;
-			break;
-		}
-	}
-}
-
-int GetTypeFromSimpleName(char *variable){
-	extern char DefIntVari[26],DefSngVari[26],DefStrVari[26],divNum,dsvNum,dStrvNum;
-	int i;
-	char name[VN_SIZE];
-
-	//構造体メンバの場合を考慮
-	for(i=lstrlen(variable);i>0;i--){
-		if(variable[i]=='.'){
-			i++;
-			break;
-		}
-	}
-
-	for(;;i++){
-		if(variable[i]=='('||variable[i]=='\0'){
-			name[i]=0;
-			break;
-		}
-		name[i]=variable[i];
-	}
-	//変数名から選択
-	i--;
-	if(name[i]=='#') return DEF_DOUBLE;
-	if(name[i]=='!') return DEF_SINGLE;
-	if(name[i]=='%') return DEF_INTEGER;
-	return DEF_DOUBLE;
-}
 
 
@@ -571,5 +493,5 @@
 
 	//アクセシビリティをチェック
-	if( &objClass == pobj_CompilingClass ){
+	if( &objClass == Smoothie::Temp::pCompilingClass ){
 		//同一クラスオブジェクトの場合はプライベートアクセスを容認する
 		if( pMember->IsNoneAccess() ){
@@ -645,5 +567,5 @@
 	// 名前空間を分離
 	char namespaceStr[VN_SIZE]="", simpleName[VN_SIZE];
-	Smoothie::meta.namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );
+	Smoothie::GetMeta().namespaceScopesCollection.SplitNamespace( variable, namespaceStr, simpleName );
 
 	// 先頭オブジェクトまたはクラス名と入れ子メンバに分割
@@ -675,5 +597,5 @@
 	}
 
-	if(pobj_CompilingClass){
+	if(Smoothie::Temp::pCompilingClass){
 		///////////////////////
 		// クラスメンバの参照
@@ -682,5 +604,5 @@
 		if(lstrcmpi(variable,"This")==0){
 			//Thisオブジェクト
-			resultType.SetType( DEF_OBJECT, pobj_CompilingClass );
+			resultType.SetType( DEF_OBJECT, Smoothie::Temp::pCompilingClass );
 			return true;
 		}
@@ -695,5 +617,5 @@
 
 			bool isFound = false;
-			BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){
+			BOOST_FOREACH( CMember *pMember, Smoothie::Temp::pCompilingClass->GetDynamicMembers() ){
 				if( pMember->GetName() == VarName ){
 					isFound = true;
@@ -704,5 +626,5 @@
 		}
 
-		return GetMemberType(*pobj_CompilingClass,variable,resultType,1,isErrorEnabled);
+		return GetMemberType(*Smoothie::Temp::pCompilingClass,variable,resultType,1,isErrorEnabled);
 	}
 
@@ -738,8 +660,8 @@
 		}
 
-		int typeDefIndex = Smoothie::meta.typeDefs.GetIndex( VarName );
+		int typeDefIndex = Smoothie::GetMeta().typeDefs.GetIndex( VarName );
 		if( typeDefIndex != -1 ){
 			// TypeDef後の型名だったとき
-			lstrcpy( VarName, Smoothie::meta.typeDefs[typeDefIndex].GetBaseName().c_str() );
+			lstrcpy( VarName, Smoothie::GetMeta().typeDefs[typeDefIndex].GetBaseName().c_str() );
 		}
 
@@ -755,8 +677,8 @@
 	}
 
-	if(pobj_CompilingClass){
+	if(Smoothie::Temp::pCompilingClass){
 		//自身のクラスから静的メンバを参照する場合
 		char temp2[VN_SIZE];
-		sprintf(temp2,"%s.%s",pobj_CompilingClass->GetName().c_str(),VarName);
+		sprintf(temp2,"%s.%s",Smoothie::Temp::pCompilingClass->GetName().c_str(),VarName);
 
 		pVar = globalVars.Find( Symbol( temp2 ) );
@@ -972,5 +894,5 @@
 		if( InitBuf[0] == '\0' ){
 			//As指定も、初期値指定もない場合
-			type.SetBasicType( GetTypeFromSimpleName(variable) );
+			type.SetBasicType( Type::GetBasicTypeFromSimpleName(variable) );
 
 			i2=lstrlen(variable)-1;
@@ -1015,6 +937,6 @@
 
 	//クラス名
-	if(pobj_CompilingClass){
-		lstrcat(FullName,pobj_CompilingClass->GetName().c_str());
+	if(Smoothie::Temp::pCompilingClass){
+		lstrcat(FullName,Smoothie::Temp::pCompilingClass->GetName().c_str());
 		lstrcat(FullName,"%");
 	}
@@ -1052,5 +974,5 @@
 	bool isConst = ( dwFlag & DIMFLAG_CONST ) ? true:false;
 
-	Variable *pVar = new Variable( Smoothie::Lexical::liveingNamespaceScopes, name, type, isConst );
+	Variable *pVar = new Variable( Smoothie::Temp::liveingNamespaceScopes, name, type, isConst );
 
 	if( SubScripts[0] != -1 ){
@@ -1063,6 +985,6 @@
 
 	//レキシカルスコープ
-	pVar->ScopeLevel=obj_LexScopes.GetNowLevel();
-	pVar->ScopeStartAddress=obj_LexScopes.GetStartAddress();
+	pVar->ScopeLevel=GetLexicalScopes().GetNowLevel();
+	pVar->ScopeStartAddress=GetLexicalScopes().GetStartAddress();
 	pVar->bLiving=TRUE;
 
Index: trunk/abdev/BasicCompiler_Common/VariableOpe.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/VariableOpe.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/VariableOpe.h	(revision 182)
@@ -1,6 +1,4 @@
 
 
-BOOL IsVariableTopChar(char c);
-BOOL IsVariableChar(char c);
 BOOL IsPtrType(int type);
 BOOL IsSignedType(int type);
@@ -19,6 +17,4 @@
 BOOL CheckVarNameError(char *name,int nowLine);
 int JumpSubScripts(const int *ss);
-void GetArrange(char *variable,char *variAnswer,int *SubScripts);
-int GetTypeFromSimpleName(char *variable);
 bool GetMemberType( const CClass &objClass, const char *lpszMember, Type &resultType, BOOL bPrivateAccess, bool isErrorEnabled);
 bool GetVarType( const char *nameBuffer, Type &resultType, bool isError);
Index: trunk/abdev/BasicCompiler_Common/WatchList.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/WatchList.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/WatchList.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
 #include "common.h"
 
@@ -316,5 +318,5 @@
 	GlobalProc *pUserProc = GetSubFromObp(obp_Rip);
 
-	foreach( Variable *pVar, pUserProc->localVars ){
+	BOOST_FOREACH( Variable *pVar, pUserProc->localVars ){
 		if( pVar->GetName() == "_System_LocalThis" ){
 			return pVar->offset;
@@ -369,5 +371,5 @@
 	}
 
-	if(pobj_CompilingClass){
+	if(Smoothie::Temp::pCompilingClass){
 		///////////////////////
 		// クラスメンバの参照
@@ -383,5 +385,5 @@
 
 			bool isFound = false;
-			BOOST_FOREACH( CMember *pMember, pobj_CompilingClass->GetDynamicMembers() ){
+			BOOST_FOREACH( CMember *pMember, Smoothie::Temp::pCompilingClass->GetDynamicMembers() ){
 				if( pMember->GetName() == VarName ){
 					isFound = true;
@@ -412,5 +414,5 @@
 		pRelativeVar->dwKind=VAR_DIRECTMEM;
 
-		i3=Debugging_GetMember(*pobj_CompilingClass,variable,pRelativeVar,resultType,1);
+		i3=Debugging_GetMember(*Smoothie::Temp::pCompilingClass,variable,pRelativeVar,resultType,1);
 		if(i3==0){
 			//式エラー
Index: trunk/abdev/BasicCompiler_Common/calculation.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/calculation.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/calculation.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include "../BasicCompiler_Common/common.h"
 
Index: trunk/abdev/BasicCompiler_Common/common.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/common.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/common.h	(revision 182)
@@ -19,6 +19,4 @@
 #include <boost/foreach.hpp>
 
-#define foreach BOOST_FOREACH
-
 using namespace std;
 
@@ -39,5 +37,4 @@
 #include "../BasicCompiler_Common/psapi.h"
 #include "../BasicCompiler_Common/BreakPoint.h"
-#include "../BasicCompiler_Common/LexicalScoping.h"
 
 
@@ -56,5 +53,4 @@
 
 #define MAX_LEN			65535
-#define VN_SIZE			512
 #define DIGIT_SIZE		128
 #define MAX_PARMS		64
@@ -91,5 +87,4 @@
 extern HANDLE hHeap;
 extern int cp;
-extern bool isUnicode;
 extern int typeOfPtrChar;
 extern int typeOfPtrUChar;
@@ -144,7 +139,4 @@
 
 
-// クラス管理用のクラス
-#include "Class.h"
-
 // 列挙体管理用のクラス
 #include "Enum.h"
@@ -152,16 +144,4 @@
 // 定数管理用のクラス
 #include "Const.h"
-
-// 変数管理用のクラス
-#include "Variable.h"
-
-// パラメータ管理用のクラス
-#include "Parameter.h"
-
-// プロシージャ管理用のクラス
-#include "Procedure.h"
-
-// コンパイラが必要とするデータハウス
-#include <Smoothie.h>
 
 
@@ -170,9 +150,4 @@
 	char *FileName;
 	int line;
-};
-struct INCLUDEFILEINFO{
-	char **ppFileNames;
-	int FilesNum;
-	int LineOfFile[MAX_LEN];
 };
 
@@ -272,5 +247,4 @@
 #include "../BasicCompiler_Common/DebugSection.h"
 #include "../BasicCompiler_Common/VariableOpe.h"
-#include <Exception.h>
 
 
@@ -388,14 +362,4 @@
 void SlideString(char *str,int slide);
 void SlideBuffer(char *buffer,int length,int slide);
-_int8 IsCommandDelimitation(char c);
-BOOL IsBlank(char c);
-int GetOneParameter(const char *Parameter,int pos,char *retAns);
-int JumpOneParameter(char *Parameter,int i);
-int GetStringInQuotation(char *buffer,char *ReadBuffer);
-int GetStringInPare(char *buffer,const char *ReadBuffer);
-int GetStringInPare_RemovePare(char *buffer,char *ReadBuffer);
-int GetStringInBracket(char *buffer,const char *ReadBuffer);
-int JumpStringInPare(const char *buffer,int pos);
-int JumpStringInBracket(const char *buffer,int pos);
 int GetCpFromLine(int LineNum);
 BOOL GetLineNum(int pos,int *pLine,char *FileName);
@@ -435,6 +399,4 @@
 int GetProc(char *name,void **ppInfo);
 void SplitObjectName(const char *name,char *ObjectName,int *pRefType);
-bool SplitMemberName( const char *desc, char *object, char *member, CClass::RefType &refType );
-bool SplitMemberName( const char *desc, char *object, char *member );
 bool CallProc( int kind, const void *pProc, const char *fullCallName, const char *lpszParms, Type &resultType, bool isCallOn = true );
 bool CallPropertyMethod( const char *variable, const char *rightSide, Type &resultType);
@@ -446,5 +408,4 @@
 void DeleteDeclareInfo(void);
 int AddProcPtrInfo( const string &typeExpression, int nowLine );
-void DeleteProcPtrInfo(void);
 bool IsNeedProcCompile();
 
@@ -452,41 +413,4 @@
 void Opcode_Input(const char *Parameter);
 void Opcode_Print(const char *Parameter,BOOL bWrite);
-
-//LoopRefCheck.cpp
-class CLoopRefCheck{
-	char **names;
-	int num;
-	void init();
-public:
-	CLoopRefCheck();
-	~CLoopRefCheck();
-	void add(const char *lpszInheritsClass);
-	void del(const char *lpszInheritsClass);
-	BOOL check(const CClass &inheritsClass) const;
-};
-extern CLoopRefCheck *pobj_LoopRefCheck;
-
-//DataTable.cpp
-class DataTable{
-	void *pdata;
-	int size;
-
-public:
-	DataTable();
-	~DataTable();
-	void Init();
-
-	int AddBinary( const void *pdata, int size );
-	int Add( _int64 i64data );
-	int Add( int i32data );
-	int Add( double dbl );
-	int Add( float flt );
-	int AddString( const char *str, int length );
-	int AddString( const char *str );
-
-	const void *GetPtr() const;
-	int GetSize() const;
-};
-extern DataTable dataTable;
 
 //error.cpp
@@ -499,5 +423,4 @@
 
 //Compile.cpp
-void ReallocNativeCodeBuffer();
 void GetIdentifierToken( char *token, const char *source, int &pos );
 int JumpStatement(const char *source, int &pos);
Index: trunk/abdev/BasicCompiler_Common/error.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/error.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/error.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/LexicalAnalysis.h>
+
 #include <Program.h>
 
Index: trunk/abdev/BasicCompiler_Common/hash.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/hash.cpp	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/hash.cpp	(revision 182)
@@ -1,2 +1,4 @@
+#include <jenga/include/smoothie/Smoothie.h>
+
 #include "../BasicCompiler_Common/common.h"
 
@@ -38,5 +40,5 @@
 	char ObjName[VN_SIZE];		//オブジェクト変数
 	char NestMember[VN_SIZE];	//入れ子メンバ
-	bool isObjectMember = SplitMemberName( fullName, ObjName, NestMember );
+	bool isObjectMember = CClass::SplitName( fullName, ObjName, NestMember );
 
 	//ハッシュ値を取得
@@ -71,5 +73,5 @@
 	char ObjName[VN_SIZE];		//オブジェクト変数
 	char NestMember[VN_SIZE];	//入れ子メンバ
-	bool isObjectMember = SplitMemberName( name, ObjName, NestMember );
+	bool isObjectMember = CClass::SplitName( name, ObjName, NestMember );
 
 	if(isObjectMember){
@@ -80,5 +82,5 @@
 		if(lstrcmpi(ObjName,"Super")==0){
 			//クラスメンバ関数内から基底クラスの呼び出し
-			pobj_c=pobj_CompilingClass;
+			pobj_c=Smoothie::Temp::pCompilingClass;
 		}
 		else{
@@ -89,5 +91,5 @@
 			}
 			else{
-				pobj_c=pobj_DBClass->Find(ObjName);
+				pobj_c=Smoothie::GetMeta().GetClasses().Find(ObjName);
 				if( pobj_c ){
 					isStatic = true;
@@ -110,12 +112,12 @@
 
 
-	if(pobj_CompilingClass){
+	if(Smoothie::Temp::pCompilingClass){
 		//自身のオブジェクトのメンバ関数を検索
 
 		// 静的メソッド
-		pobj_CompilingClass->GetStaticMethods().Enum( name, subs );
+		Smoothie::Temp::pCompilingClass->GetStaticMethods().Enum( name, subs );
 
 		// 動的メソッド
-		pobj_CompilingClass->GetMethods().Enum( name, subs );
+		Smoothie::Temp::pCompilingClass->GetMethods().Enum( name, subs );
 	}
 
@@ -187,5 +189,5 @@
 
 UserProc *GetClassMethod( const char *className, const char *methodName ){
-	const CClass *pClass = pobj_DBClass->Find( className );
+	const CClass *pClass = Smoothie::GetMeta().GetClasses().Find( className );
 	if( pClass ){
 		vector<UserProc *> userProcs;
Index: trunk/abdev/BasicCompiler_Common/include/Member.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Member.h	(revision 169)
+++ 	(revision )
@@ -1,65 +1,0 @@
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include "Type.h"
-
-using namespace std;
-
-class CClass;
-
-class CMember : public MemberPrototype
-{
-	string name;
-	Type type;
-	bool isConst;
-
-	string initializeExpression;
-	string constructParameter;
-public:
-	int SubScripts[MAX_ARRAYDIM];
-
-	int source_code_address;
-
-	const string &GetName() const
-	{
-		return name;
-	}
-	void SetName( const string &name )
-	{
-		this->name = name;
-	}
-
-	Type GetType() const
-	{
-		return type;
-	}
-
-	bool IsConst()
-	{
-		return isConst;
-	}
-
-	const string &GetInitializeExpression() const
-	{
-		return initializeExpression;
-	}
-	const string &GetConstructParameter() const
-	{
-		return constructParameter;
-	}
-
-	CMember( Prototype::Accessibility accessibility, const string &name, const Type &type, bool isConst )
-		: MemberPrototype( accessibility )
-		, name( name )
-		, type( type )
-		, isConst( isConst )
-	{
-	}
-	CMember( CClass *pobj_c, Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer, int nowLine=-1 );
-	CMember( CMember &member );
-	~CMember();
-	static void InitStaticMember(void);
-};
-typedef std::vector<CMember *> Members;
Index: trunk/abdev/BasicCompiler_Common/include/Method.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Method.h	(revision 169)
+++ 	(revision )
@@ -1,125 +1,0 @@
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include "../Class.h"
-#include <windows.h>
-
-using namespace std;
-
-class UserProc;
-class CClass;
-void SetError();
-
-class CMethod : public MemberPrototype
-{
-public:
-	UserProc *pUserProc;
-
-	CMethod( UserProc *pUserProc, Prototype::Accessibility accessibility )
-		: MemberPrototype( accessibility )
-		, pUserProc( pUserProc )
-	{
-	}
-
-	virtual bool IsAbstract() const = 0;
-	virtual void Override() = 0;
-	virtual bool IsVirtual() const = 0;
-	virtual bool IsConst() const = 0;
-	virtual bool IsStatic() const = 0;
-	virtual const CClass *GetInheritsClassPtr() const = 0;
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass ) = 0;
-};
-
-class DynamicMethod : public CMethod
-{
-	bool isAbstract;
-	bool isVirtual;
-	bool isConst;
-	const CClass *pInheritsClass;
-
-public:
-	DynamicMethod( UserProc *pUserProc, Prototype::Accessibility accessibility, bool isAbstract, bool isVirtual, bool isConst, const CClass *pInheritsClass = NULL )
-		: CMethod( pUserProc, accessibility )
-		, isAbstract( isAbstract )
-		, isVirtual( isVirtual )
-		, isConst( isConst )
-		, pInheritsClass( pInheritsClass )
-	{
-	}
-	DynamicMethod( const CMethod &method )
-		: CMethod( method.pUserProc, method.GetAccessibility() )
-		, isAbstract( method.IsAbstract() )
-		, isVirtual( method.IsVirtual() )
-		, isConst( method.IsConst() )
-		, pInheritsClass( method.GetInheritsClassPtr() )
-	{
-	}
-
-	virtual bool IsAbstract() const
-	{
-		return isAbstract;
-	}
-	virtual void Override()
-	{
-		isAbstract = false;
-	}
-	virtual bool IsVirtual() const
-	{
-		return isVirtual;
-	}
-	virtual bool IsConst() const
-	{
-		return isConst;
-	}
-	virtual bool IsStatic() const
-	{
-		return false;
-	}
-	virtual const CClass *GetInheritsClassPtr() const
-	{
-		return pInheritsClass;
-	}
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass )
-	{
-		this->pInheritsClass = pInheritsClass;
-	}
-};
-class StaticMethod : public CMethod
-{
-public:
-	StaticMethod( UserProc *pUserProc, Prototype::Accessibility accessibility )
-		: CMethod( pUserProc, accessibility )
-	{
-	}
-
-	virtual bool IsAbstract() const{SetError();return false;}
-	virtual void Override(){SetError();}
-	virtual bool IsVirtual() const{
-		return false;
-	}
-	virtual bool IsConst() const{SetError();return false;}
-	virtual bool IsStatic() const
-	{
-		return true;
-	}
-	virtual const CClass *GetInheritsClassPtr() const{SetError();return NULL;}
-	virtual void SetInheritsClassPtr( const CClass *pInheritsClass ){SetError();}
-};
-
-class Methods : public vector<CMethod *>
-{
-public:
-	Methods();
-	~Methods();
-
-	//メンバ、メソッドの追加
-	void Add( UserProc *pUserProc, Prototype::Accessibility accessibility, bool isConst, bool isAbstract, bool isVirtual );
-	void AddStatic(UserProc *pUserProc,Prototype::Accessibility accessibility);
-
-	const CMethod *GetMethodPtr( UserProc *pUserProc ) const;
-	bool IsExist( const char *name ) const;
-	virtual void Enum( const char *methodName, vector<UserProc *> &subs ) const;
-	virtual void Enum( const BYTE idOperatorCalc, vector<UserProc *> &subs ) const;
-};
Index: trunk/abdev/BasicCompiler_Common/include/Namespace.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Namespace.h	(revision 169)
+++ 	(revision )
@@ -1,135 +1,0 @@
-#pragma once
-
-#include <vector>
-#include <string>
-#include <boost/foreach.hpp>
-
-using namespace std;
-
-class NamespaceScopes : public vector<string>
-{
-public:
-	NamespaceScopes(){}
-	NamespaceScopes( const string &namespaceStr );
-	~NamespaceScopes(){}
-
-	string ToString() const
-	{
-		string namespaceStr;
-		const vector<string> &me = *this;
-
-		bool isFirst = true;
-		BOOST_FOREACH( const string &itemStr, me ){
-			if( isFirst ){
-				isFirst = false;
-			}
-			else{
-				namespaceStr += ".";
-			}
-
-			namespaceStr += itemStr;
-		}
-		return namespaceStr;
-	}
-
-	// 等しいかをチェック
-	bool IsEqual( const string &name ) const
-	{
-		if( ToString() == name ){
-			return true;
-		}
-		return false;
-	}
-
-	// 等しいかをチェック
-	bool IsEqual( const NamespaceScopes &namespaceScopes ) const
-	{
-		if( ToString() == namespaceScopes.ToString() ){
-			return true;
-		}
-		return false;
-	}
-
-	// 所属しているかをチェック
-	// 例:
-	// baseNamespaceScopes =  "Discoversoft"
-	// entryNamespaceScopes = "Discoversoft.ActiveBasic"
-	// この場合、entryNamespaceScopes は baseNamespaceScopes に所属している。
-	static bool IsBelong( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes )
-	{
-		if( baseNamespaceScopes.size() > entryNamespaceScopes.size() ){
-			return false;
-		}
-
-		for( int i=0; i<(int)baseNamespaceScopes.size(); i++ ){
-			if( baseNamespaceScopes[i] != entryNamespaceScopes[i] ){
-				return false;
-			}
-		}
-		return true;
-	}
-
-	bool IsImported() const;
-
-	bool IsLiving() const;
-
-	// 包括しているかをチェック
-	// 例:
-	// this =   "Discoversoft.ActiveBasic"
-	// living = "Discoversoft.ActiveBasic"
-	// name =   "ActiveBasic"
-	// この場合、living は name を包括している。
-	bool IsCoverd( const string &name ) const;
-	bool IsCoverd( const NamespaceScopes &namespaceScopes ) const;
-
-	// 指定された名前空間が同一エリアと見なされるかどうかをチェック
-	static bool IsSameArea( const NamespaceScopes &baseNamespaceScopes, const NamespaceScopes &entryNamespaceScopes ){
-		if( entryNamespaceScopes.size() ){
-			if( baseNamespaceScopes.IsCoverd( entryNamespaceScopes ) ){
-				// 包括しているときは同一と見なす
-				return true;
-			}
-		}
-		else{
-			if( baseNamespaceScopes.size() ){
-				// 名前空間の判断が必要なとき
-				if( baseNamespaceScopes.IsImported()
-					|| baseNamespaceScopes.IsLiving() ){
-					// Using指定があるとき
-					// または
-					// 指定された名前空間が現在の名前空間スコープと同一のとき
-					return true;
-				}
-			}
-			else{
-				return true;
-			}
-		}
-
-		return false;
-	}
-};
-
-class NamespaceScopesCollection : public vector<NamespaceScopes>
-{
-public:
-	bool IsExist( const NamespaceScopes &namespaceScopes ) const
-	{
-		const NamespaceScopesCollection &namespaceScopesCollection = *this;
-		BOOST_FOREACH( const NamespaceScopes &tempNamespaceScopes, namespaceScopesCollection ){
-			if( tempNamespaceScopes.IsEqual( namespaceScopes ) ){
-				return true;
-			}
-		}
-		return false;
-	}
-	bool IsExist( const string &namespaceStr ) const
-	{
-		return IsExist( NamespaceScopes( namespaceStr ) );
-	}
-	void SplitNamespace( const char *fullName, char *namespaceStr, char *simpleName ) const;
-
-	bool Imports( const string &namespaceStr );
-
-	static bool CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection );
-};
Index: trunk/abdev/BasicCompiler_Common/include/ObjectModule.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/ObjectModule.h	(revision 169)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#pragma once
-
-#include "../TypeDef.h"
-#include "Namespace.h"
-
-// プロジェクト中に存在するメタ情報
-class Meta{
-public:
-	// 名前空間
-	NamespaceScopesCollection namespaceScopesCollection;
-
-	// クラス
-
-	// TypeDef
-	TypeDefCollection typeDefs;
-
-	// 関数ポインタ
-	vector<ProcPointer *> procPointers;
-
-	// blittable型
-	BlittableTypes blittableTypes;
-};
Index: trunk/abdev/BasicCompiler_Common/include/Prototype.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Prototype.h	(revision 169)
+++ 	(revision )
@@ -1,114 +1,0 @@
-#pragma once
-
-#include <string>
-#include <vector>
-
-#include <Namespace.h>
-
-using namespace std;
-
-class CMethod;
-class UserProc;
-
-class Prototype
-{
-public:
-	enum Accessibility{
-		None,
-		Private,
-		Protected,
-		Public,
-	};
-
-private:
-	// 名前空間
-	NamespaceScopes namespaceScopes;
-
-	//名前
-	string name;
-
-	mutable bool isUsing;
-
-public:
-
-	Prototype( const NamespaceScopes &namespaceScopes, const string &name )
-		: namespaceScopes( namespaceScopes )
-		, name( name )
-		, isUsing( false )
-	{
-	}
-	~Prototype()
-	{
-	}
-
-	// 名前空間
-	const NamespaceScopes &GetNamespaceScopes() const
-	{
-		return namespaceScopes;
-	}
-
-	const string &GetName() const
-	{
-		return name;
-	}
-
-	//自身と等しいかどうかを確認
-	bool IsEquals( const Prototype *prototype ) const
-	{
-		if( this == prototype ){
-			return true;
-		}
-		return false;
-	}
-
-	// シンボル比較
-	bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
-	bool IsEqualSymbol( const Prototype &prototype ) const;
-	bool IsEqualSymbol( const string &name ) const;
-
-	// 利用状況
-	bool IsUsing() const
-	{
-		return isUsing;
-	}
-	void Using() const
-	{
-		isUsing = true;
-	}
-
-};
-
-class MemberPrototype
-{
-	Prototype::Accessibility accessibility;
-public:
-	MemberPrototype( Prototype::Accessibility accessibility )
-		: accessibility( accessibility )
-	{
-	}
-
-	Prototype::Accessibility GetAccessibility() const
-	{
-		return accessibility;
-	}
-	void SetAccessibility( Prototype::Accessibility accessibility ){
-		this->accessibility = accessibility;
-	}
-
-	bool IsNoneAccess() const
-	{
-		return ( accessibility == Prototype::None );
-	}
-	bool IsPrivate() const
-	{
-		return ( accessibility == Prototype::Private );
-	}
-	bool IsProtected() const
-	{
-		return ( accessibility == Prototype::Protected );
-	}
-	bool IsPublic() const
-	{
-		return ( accessibility == Prototype::Public );
-	}
-};
Index: trunk/abdev/BasicCompiler_Common/include/Smoothie.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Smoothie.h	(revision 169)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#pragma once
-
-#include "Source.h"
-#include "ObjectModule.h"
-
-class Smoothie{
-public:
-
-	class Lexical{
-	public:
-		static string baseProjectDirPath;
-		static BasicSource source;
-		static NamespaceScopes liveingNamespaceScopes;
-	};
-
-	// コンパイル中に一時的に利用する
-	class Temp{
-	public:
-		// 現在インポートされている名前空間
-		static NamespaceScopesCollection importedNamespaces;
-	};
-
-	// プロジェクト中に存在するメタ情報
-	static Meta meta;
-
-	static bool isFullCompile;
-};
Index: trunk/abdev/BasicCompiler_Common/include/Source.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Source.h	(revision 169)
+++ 	(revision )
@@ -1,76 +1,0 @@
-#pragma once
-
-#include <vector>
-#include <string>
-
-#include <windows.h>
-#include <stdlib.h>
-
-using namespace std;
-
-class Text{
-protected:
-	char *buffer;
-	int length;
-
-public:
-
-	Text(){
-		buffer = (char *)calloc( 1, 1 );
-		length = 0;
-	}
-	~Text(){
-		free( buffer );
-	}
-
-	bool ReadFile( const string &filePath );
-};
-
-class BasicSource : public Text
-{
-	static const string generateDirectiveName;
-
-	void Realloc( int newLength ){
-		buffer = (char *)realloc( buffer, newLength + 255 );
-
-		length = newLength;
-
-		extern char *basbuf;
-		basbuf = buffer + 2;
-	}
-
-	void IncludeFiles();
-
-	void ChangeReturnLineChar();
-
-	void RemoveComments();
-
-	bool ReadFile_InIncludeDirective( const string &filePath );
-	void DirectiveIncludeOrRequire();
-
-	void RemoveReturnLineUnderbar();
-
-public:
-	BasicSource(){}
-	~BasicSource(){}
-
-	char *GetBuffer(){
-		return buffer+2;
-	}
-	int GetLength(){
-		return length-2;
-	}
-
-	void SetBuffer( const char *buffer );
-
-	bool ReadFile( const string &filePath );
-
-	bool Generate( const string &genName, const char *buffer );
-
-	void Addition( const char *buffer );
-
-	void operator = ( const BasicSource &source ){
-		Realloc( source.length );
-		lstrcpy( buffer, source.buffer );
-	}
-};
Index: trunk/abdev/BasicCompiler_Common/include/Symbol.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/Symbol.h	(revision 169)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#pragma once
-
-#include <vector>
-#include <string>
-
-#include <Namespace.h>
-
-using namespace std;
-
-class Symbol
-{
-	NamespaceScopes namespaceScopes;
-	string name;
-public:
-	Symbol( const NamespaceScopes &namespaceScopes, const string &name )
-		: namespaceScopes( namespaceScopes )
-		, name( name )
-	{
-	}
-	Symbol( const char *fullName );
-	Symbol( const string &fullName );
-
-	const NamespaceScopes &GetNamespaceScopes() const
-	{
-		return namespaceScopes;
-	}
-	const string &GetName() const
-	{
-		return name;
-	}
-};
Index: trunk/abdev/BasicCompiler_Common/include/option.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/include/option.h	(revision 169)
+++ trunk/abdev/BasicCompiler_Common/include/option.h	(revision 182)
@@ -23,5 +23,5 @@
 
 // ログ生成しない場合はこの下の行をコメントアウトする
-#define USE_TRACE
+//#define USE_TRACE
 
 // オーバーロードに関するログを生成する
Index: trunk/abdev/BasicCompiler_Common/src/Member.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Member.cpp	(revision 169)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#include "../common.h"
-#ifdef _AMD64_
-#include "../../BasicCompiler64/opcode.h"
-#else
-#include "../../BasicCompiler32/opcode.h"
-#endif
-#include <Member.h>
-
-CMember::CMember( CClass *pobj_c, Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine )
-	: MemberPrototype( accessibility )
-{
-	extern int cp;
-
-	//構文を解析
-	char VarName[VN_SIZE];
-	char initBuffer[VN_SIZE];
-	char lpszConstructParameter[VN_SIZE];
-	GetDimentionFormat(buffer,VarName,SubScripts,type,initBuffer,lpszConstructParameter);
-
-	//重複チェック
-	if(pobj_c->DupliCheckAll(VarName)){
-		SetError(15,VarName,cp);
-	}
-
-	//メンバ名
-	name = VarName;
-
-	//定数扱いかどうか
-	this->isConst = isConst;
-
-	//初期データ
-	initializeExpression = initBuffer;
-
-	//コンストラクタ用のパラメータ
-	constructParameter = lpszConstructParameter;
-
-	//ソースコードの位置
-	source_code_address=nowLine;
-}
-CMember::CMember(CMember &member)
-	: MemberPrototype( member.GetAccessibility() )
-	, name( member.GetName() )
-	, type( member.GetType() )
-	, isConst( member.IsConst() )
-{
-	//SubScripts
-	memcpy(SubScripts,member.SubScripts,MAX_ARRAYDIM*sizeof(int));
-
-	//ソースコードの位置
-	source_code_address=member.source_code_address;
-}
-CMember::~CMember(){
-}
-
-void CMember::InitStaticMember(void){
-	//静的メンバをグローバル領域に作成
-
-	//イテレータをリセット
-	extern Classes *pobj_DBClass;
-	pobj_DBClass->Iterator_Reset();
-
-	int back_cp=cp;
-
-	while(pobj_DBClass->Iterator_HasNext()){
-		CClass &objClass = *pobj_DBClass->Iterator_GetNext();
-
-		// 名前空間をセット
-		Smoothie::Lexical::liveingNamespaceScopes = objClass.GetNamespaceScopes();
-
-		int i=0;
-		foreach( CMember *member, objClass.staticMembers ){
-			char temporary[VN_SIZE];
-			sprintf(temporary,"%s.%s",objClass.GetName().c_str(),member->GetName().c_str());
-			dim(
-				temporary,
-				member->SubScripts,
-				member->GetType(),
-				member->GetInitializeExpression().c_str(),
-				member->GetConstructParameter().c_str(),
-				0);
-
-			//ネイティブコードバッファの再確保
-			ReallocNativeCodeBuffer();
-
-			i++;
-		}
-	}
-
-	Smoothie::Lexical::liveingNamespaceScopes.clear();
-
-	cp=back_cp;
-}
Index: trunk/abdev/BasicCompiler_Common/src/Method.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Method.cpp	(revision 169)
+++ 	(revision )
@@ -1,70 +1,0 @@
-#include "../common.h"
-#include <Method.h>
-
-
-Methods::Methods()
-{
-}
-Methods::~Methods()
-{
-	Methods &methods = *this;
-	BOOST_FOREACH( CMethod *pMethod, methods ){
-		delete pMethod;
-	}
-}
-
-void Methods::Add( UserProc *pUserProc,Prototype::Accessibility accessibility, bool isConst, bool isAbstract, bool isVirtual ){
-	CMethod *pMethod = new DynamicMethod( pUserProc, accessibility, isAbstract, isVirtual, isConst );
-	this->push_back( pMethod );
-	pUserProc->SetMethod( pMethod );
-}
-void Methods::AddStatic(UserProc *pUserProc, Prototype::Accessibility accessibility ){
-	CMethod *pMethod = new StaticMethod( pUserProc, accessibility );
-	this->push_back( pMethod );
-	pUserProc->SetMethod( pMethod );
-}
-
-const CMethod *Methods::GetMethodPtr( UserProc *pUserProc ) const
-{
-	const Methods &methods = *this;
-	for( int i=(int)methods.size()-1; i>=0; i-- ){
-		if( pUserProc == methods[i]->pUserProc ){
-			return methods[i];
-		}
-	}
-	return NULL;
-}
-bool Methods::IsExist( const char *name ) const
-{
-	const Methods &methods = *this;
-	foreach( const CMethod *pMethod, methods ){
-		if( pMethod->pUserProc->GetName() == name ) return true;
-	}
-	return false;
-}
-void Methods::Enum( const char *methodName, vector<UserProc *> &subs ) const
-{
-	//オブジェクトのメンバ関数の場合
-	//※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う
-	const Methods &methods = *this;
-	for( int i=(int)methods.size()-1; i>=0; i-- ){
-		if( methods[i]->pUserProc->GetName() == methodName ){
-			subs.push_back( methods[i]->pUserProc );
-		}
-	}
-}
-void Methods::Enum( const BYTE idOperatorCalc, vector<UserProc *> &subs ) const
-{
-	//オブジェクトのメンバ関数の場合
-	//※オーバーライドされた関数を先にサーチする必要があるため、バックサーチを行う
-	const Methods &methods = *this;
-	for( int i=(int)methods.size()-1; i>=0; i-- ){
-		UserProc *pUserProc = methods[i]->pUserProc;
-		const char *temp = pUserProc->GetName().c_str();
-		if(temp[0]==1&&temp[1]==ESC_OPERATOR){
-			if((BYTE)temp[2]==idOperatorCalc){
-				subs.push_back( pUserProc );
-			}
-		}
-	}
-}
Index: trunk/abdev/BasicCompiler_Common/src/Namespace.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Namespace.cpp	(revision 169)
+++ 	(revision )
@@ -1,162 +1,0 @@
-#include "../common.h"
-
-
-NamespaceScopes::NamespaceScopes( const string &namespaceStr ){
-	if( namespaceStr.size() == 0 ){
-		return;
-	}
-
-	string::size_type i = 0;
-	while( true ){
-		string::size_type i2 = namespaceStr.find( '.', i );
-
-		string tempName = namespaceStr.substr( i, i2-i );
-
-		push_back( tempName );
-
-		if( i2 == string::npos ){
-			break;
-		}
-
-		i = i2 + 1;
-	}
-}
-
-bool NamespaceScopes::IsImported() const
-{
-	BOOST_FOREACH( const NamespaceScopes &namespaceScopes, Smoothie::Temp::importedNamespaces ){
-		if( this->IsEqual( namespaceScopes ) ){
-			return true;
-		}
-	}
-	return false;
-}
-bool NamespaceScopes::IsLiving() const
-{
-	if( IsBelong( *this, Smoothie::Lexical::liveingNamespaceScopes ) ){
-		return true;
-	}
-	return false;
-}
-
-// 包括しているかをチェック
-// 例:
-// this =   "Discoversoft.ActiveBasic"
-// living = "Discoversoft.ActiveBasic"
-// name =   "ActiveBasic"
-// この場合、living は name を包括している。
-bool NamespaceScopes::IsCoverd( const string &name ) const
-{
-	if( IsEqual( name ) ){
-		return true;
-	}
-
-	string thisStr = ToString();
-
-	NamespaceScopes tempLivingNamespaceScopes = Smoothie::Lexical::liveingNamespaceScopes;
-
-	while( tempLivingNamespaceScopes.size() ){
-		NamespaceScopes tempNamespaceScopes = tempLivingNamespaceScopes;
-
-		string tempStr = tempNamespaceScopes.ToString() + "." + name;
-		if( thisStr == tempStr ){
-			return true;
-		}
-
-		tempLivingNamespaceScopes.pop_back();
-	}
-	return false;
-}
-bool NamespaceScopes::IsCoverd( const NamespaceScopes &namespaceScopes ) const
-{
-	return IsCoverd( namespaceScopes.ToString() );
-}
-
-
-void NamespaceScopesCollection::SplitNamespace( const char *fullName, char *namespaceStr, char *simpleName ) const
-{
-	NamespaceScopes namespaceScopes( fullName );
-	bool hasSimpleName = false;
-	while( namespaceScopes.size() > 0 ){
-		if( IsExist( namespaceScopes ) ){
-			break;
-		}
-		namespaceScopes.pop_back();
-
-		hasSimpleName = true;
-	}
-
-	lstrcpy( namespaceStr, namespaceScopes.ToString().c_str() );
-
-	bool hasNamespace = false;
-	if( namespaceStr[0] ){
-		hasNamespace = true;
-	}
-
-	int dotLength = 0;
-	if( hasSimpleName && hasNamespace ){
-		dotLength = 1;
-	}
-
-	lstrcpy( simpleName, fullName + lstrlen( namespaceStr ) + dotLength );
-}
-bool NamespaceScopesCollection::Imports( const string &namespaceStr ){
-	NamespaceScopes namespaceScopes( namespaceStr );
-	if( !Smoothie::meta.namespaceScopesCollection.IsExist( namespaceScopes ) ){
-		return false;
-	}
-
-	this->push_back( namespaceScopes );
-
-	return true;
-}
-bool NamespaceScopesCollection::CollectNamespaces( const char *source, NamespaceScopesCollection &namespaceScopesCollection )
-{
-	int i, i2;
-	char temporary[VN_SIZE];
-
-	bool isSuccessful = true;
-
-	// 名前空間管理
-	NamespaceScopes namespaceScopes;
-
-	for(i=0;;i++){
-		if(source[i]=='\0') break;
-
-		if( source[i] == 1 && source[i+1] == ESC_NAMESPACE ){
-			for(i+=2,i2=0;;i2++,i++){
-				if( IsCommandDelimitation( source[i] ) ){
-					temporary[i2]=0;
-					break;
-				}
-				temporary[i2]=source[i];
-			}
-			namespaceScopes.push_back( temporary );
-
-			if( !namespaceScopesCollection.IsExist( namespaceScopes ) ){
-				namespaceScopesCollection.push_back( namespaceScopes );
-			}
-
-			continue;
-		}
-		else if( source[i] == 1 && source[i+1] == ESC_ENDNAMESPACE ){
-			if( namespaceScopes.size() <= 0 ){
-				SetError(12, "End Namespace", i );
-				isSuccessful = false;
-			}
-			else{
-				namespaceScopes.pop_back();
-			}
-
-			i += 2;
-			continue;
-		}
-	}
-
-	if( namespaceScopes.size() > 0 ){
-		SetError(63,NULL,-1);
-		isSuccessful = false;
-	}
-
-	return isSuccessful;
-}
Index: trunk/abdev/BasicCompiler_Common/src/Prototype.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Prototype.cpp	(revision 169)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#include "../common.h"
-#include <Prototype.h>
-
-bool Prototype::IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const
-{
-	if( GetName() != name ){
-		return false;
-	}
-
-	return NamespaceScopes::IsSameArea( GetNamespaceScopes(), namespaceScopes );
-}
-bool Prototype::IsEqualSymbol( const Prototype &prototype ) const
-{
-	return IsEqualSymbol( prototype.GetNamespaceScopes(), prototype.GetName() );
-}
-bool Prototype::IsEqualSymbol( const string &fullName ) const
-{
-	char AreaName[VN_SIZE] = "";		//オブジェクト変数
-	char NestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
-
-	return IsEqualSymbol( NamespaceScopes( AreaName ), NestName );
-}
Index: trunk/abdev/BasicCompiler_Common/src/Smoothie.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Smoothie.cpp	(revision 169)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#include <..\common.h>
-
-BasicSource Smoothie::Lexical::source;
-NamespaceScopes Smoothie::Lexical::liveingNamespaceScopes;
-
-Meta Smoothie::meta;
-NamespaceScopesCollection Smoothie::Temp::importedNamespaces;
-
-bool Smoothie::isFullCompile = false;
Index: trunk/abdev/BasicCompiler_Common/src/Source.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Source.cpp	(revision 169)
+++ 	(revision )
@@ -1,913 +1,0 @@
-#include <Source.h>
-
-#include "../common.h"
-#include <windows.h>
-
-
-const string BasicSource::generateDirectiveName = "#generate";
-
-
-class CDefine{
-	vector<string> names;
-public:
-	CDefine();
-	~CDefine();
-	void Free();
-	void Init();
-
-	BOOL add(char *name);
-	BOOL undef(char *name);
-	BOOL check(char *name);
-	void preprocessor_ifdef(char *buffer,bool isNot);
-	void DirectiveIfdef(char *buffer);
-};
-CDefine objDefine;
-
-
-//////////////////////////////////////
-// #requireの管理
-//////////////////////////////////////
-class CRequireFiles{
-	char **ppFilePath;
-	int count;
-public:
-	CRequireFiles(){
-		ppFilePath = (char **)malloc( 1 );
-		count = 0;
-	}
-	~CRequireFiles(){
-		for( int i = 0; i < count; i++ ){
-			free( ppFilePath[i] );
-		}
-		free( ppFilePath );
-	}
-	void clear(){
-		for( int i = 0; i < count; i++ ){
-			free( ppFilePath[i] );
-		}
-		free( ppFilePath );
-
-		ppFilePath = (char **)malloc( 1 );
-		count = 0;
-	}
-	bool IsIncluded( const char *includeFilePath ){
-		// '/' → '\\'
-		char tempPath[MAX_PATH];
-		lstrcpy( tempPath, includeFilePath );
-		for( int i=0; tempPath[i]; i++ ){
-			if( tempPath[i] == '/' ){
-				tempPath[i] = '\\';
-			}
-		}
-
-		for( int i=0; i<count; i++ ){
-			if( lstrcmpi( ppFilePath[i], tempPath ) == 0 ){
-				return true;
-			}
-		}
-		return false;
-	}
-	void Add( const char *includeFilePath ){
-		// '/' → '\\'
-		char tempPath[MAX_PATH];
-		lstrcpy( tempPath, includeFilePath );
-		for( int i=0; tempPath[i]; i++ ){
-			if( tempPath[i] == '/' ){
-				tempPath[i] = '\\';
-			}
-		}
-
-		//既に読み込まれているとき
-		if( IsIncluded( tempPath ) ) return;
-
-		//追加
-		ppFilePath = (char **)realloc(ppFilePath, ( count + 1 ) * sizeof(char *) );
-		ppFilePath[count] = (char *)malloc( lstrlen(tempPath) + 1 );
-		lstrcpy( ppFilePath[count], tempPath );
-		count++;
-	}
-};
-CRequireFiles requireFiles;
-
-
-//////////////////////////////////////
-// #define間するクラス
-//////////////////////////////////////
-
-CDefine::CDefine(){
-	Init();
-}
-CDefine::~CDefine(){
-}
-void CDefine::Init(){
-	names.clear();
-
-	extern BOOL bDebugCompile;
-	if(bDebugCompile) add("_DEBUG");
-
-#ifdef _AMD64_
-	add("_WIN64");
-#endif
-
-	extern BOOL bDll;
-	if( bDll ){
-		add("_DLL");
-	}
-
-	extern bool isUnicode;
-	if( isUnicode ){
-		add( "UNICODE" );
-	}
-
-	char temporary[255];
-	sprintf(temporary,"_AB_VER%d",MAJOR_VER);
-	add(temporary);
-}
-BOOL CDefine::add(char *name){
-	extern HANDLE hHeap;
-
-	//重複チェック
-	if(check(name)) return 0;
-
-	//追加
-	names.push_back( name );
-
-	return 1;
-}
-BOOL CDefine::undef(char *name){
-	vector<string>::iterator i = names.begin();
-	foreach( const string &temp, names ){
-		if( temp == name ){
-			names.erase( i );
-			return 1;
-		}
-		i++;
-	}
-
-	return 0;
-}
-BOOL CDefine::check(char *name){
-
-	//重複チェック
-	foreach( const string &temp, names ){
-		if( temp == name ){
-			return 1;
-		}
-	}
-	return 0;
-}
-
-int Search_endif(char *buffer,int i, int *pLine = 0){
-	for(;;i++){
-		if(buffer[i]=='\0') break;
-
-		if( buffer[i] == '\n' ){
-			if( pLine ){
-				(*pLine)++;
-			}
-		}
-
-		if(buffer[i-1]=='\n'){
-			if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){
-				i=Search_endif(buffer,i+6, pLine);
-				if(buffer[i]=='\0') break;
-				continue;
-			}
-			else if(memicmp(buffer+i,"#endif",6)==0){
-				break;
-			}
-		}
-	}
-	return i;
-}
-
-void CDefine::preprocessor_ifdef(char *buffer,bool isNot){
-	int i,i2,i3;
-	char temporary[VN_SIZE];
-
-	if(isNot) i=lstrlen("#ifndef");
-	else i=lstrlen("#ifdef");
-	while(buffer[i]==' '||buffer[i]=='\t') i++;
-
-	for(i2=0;;i++,i2++){
-		if(buffer[i]=='\n'||buffer[i]=='\0'){
-			temporary[i2]=0;
-			break;
-		}
-		temporary[i2]=buffer[i];
-	}
-
-	int sw=0;
-	if(check(temporary)) sw=1;
-
-	if(isNot){
-		//#ifndefのとき（反対にする）
-		if(sw) sw=0;
-		else sw=1;
-	}
-
-	//#ifdefの行を消去
-	SlideString(buffer+i,-i);
-	i=0;
-
-	BOOL bElse=0;
-	if(sw){
-		//TRUEのとき
-
-		//#else、#endifを探索
-		for(;;i++){
-			if(buffer[i]=='\0') break;
-
-			if(i==0||buffer[i-1]=='\n'){
-				if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){
-					i=Search_endif(buffer,i+6);
-					if(buffer[i]=='\0') break;
-					continue;
-				}
-				else if(memicmp(buffer+i,"#else",5)==0){
-					i2=5;
-					bElse=1;
-					break;
-				}
-				else if(memicmp(buffer+i,"#endif",6)==0){
-					i2=6;
-					bElse=0;
-					break;
-				}
-			}
-		}
-
-		//行を消去
-		SlideString(buffer+i+i2,-i2);
-
-		if(bElse){
-			//#elseがある場合はその区間を消去
-
-			for(i2=i,i3=0;;i2++){
-				if(buffer[i2]=='\0') break;
-
-				if(buffer[i2]=='\n') i3++;
-
-				if(i2==0||buffer[i2-1]=='\n'){
-					if(memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){
-						i2=Search_endif(buffer,i2+6, &i3 );
-						if(buffer[i2]=='\0') break;
-						continue;
-					}
-					if(memicmp(buffer+i2,"#endif",6)==0){
-						i2+=6;
-						break;
-					}
-				}
-			}
-
-			//ソースコード区間を消去し、改行コードを挿入
-			SlideString(buffer+i2,i-i2+i3);
-			memset(buffer+i,'\n',i3);
-		}
-	}
-	else{
-		//FALSEのとき
-
-		//#else、#endifを探索
-		for(i2=i,i3=0;;i2++){
-			if(buffer[i2]=='\0') break;
-
-			if(buffer[i2]=='\n') i3++;
-
-			if(i2==0||buffer[i2-1]=='\n'){
-				if(memicmp(buffer+i2,"#ifdef",6)==0||memicmp(buffer+i2,"#ifndef",7)==0){
-					i2=Search_endif(buffer,i2+6, &i3 );
-					if(buffer[i2]=='\0') break;
-					continue;
-				}
-				else if(memicmp(buffer+i2,"#else",5)==0){
-					i2+=5;
-					bElse=1;
-					break;
-				}
-				else if(memicmp(buffer+i2,"#endif",6)==0){
-					i2+=6;
-					bElse=0;
-					break;
-				}
-			}
-		}
-
-		//ソースコード区間を消去し、改行コードを挿入
-		SlideString(buffer+i2,i-i2+i3);
-		memset(buffer+i,'\n',i3);
-
-		if(bElse){
-			//#endifを探索
-			for(;;i++){
-				if(buffer[i]=='\0') break;
-
-				if(i==0||buffer[i-1]=='\n'){
-					if(memicmp(buffer+i,"#ifdef",6)==0||memicmp(buffer+i,"#ifndef",7)==0){
-						i=Search_endif(buffer,i+6);
-						if(buffer[i]=='\0') break;
-						continue;
-					}
-					else if(memicmp(buffer+i,"#endif",6)==0){
-						i2=6;
-						bElse=0;
-						break;
-					}
-				}
-			}
-
-			//行を消去
-			SlideString(buffer+i+i2,-i2);
-		}
-	}
-}
-
-
-void CDefine::DirectiveIfdef(char *buffer){
-	int i,i2,i3,sw;
-	char temporary[VN_SIZE];
-
-	for(i=0;;i++){
-		if(buffer[i]=='\0') break;
-
-		if(i==0||(i>=1&&buffer[i-1]=='\n')){
-			sw=0;
-			if(memicmp(buffer+i,"#define",7)==0){
-				i2=i+7;
-				while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-
-				for(i3=0;;i2++,i3++){
-					if(buffer[i2]=='\n'||buffer[i2]=='\0'){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=buffer[i2];
-				}
-
-				add(temporary);
-
-				i2-=i;
-
-				//ディレクティブを消去
-				SlideString(buffer+i+i2,-i2);
-			}
-			if(memicmp(buffer+i,"#undef",6)==0){
-				i2=i+7;
-				while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-
-				for(i3=0;;i2++,i3++){
-					if(buffer[i2]=='\n'||buffer[i2]=='\0'){
-						temporary[i3]=0;
-						break;
-					}
-					temporary[i3]=buffer[i2];
-				}
-
-				undef(temporary);
-
-				i2-=i;
-
-				//ディレクティブを消去
-				SlideString(buffer+i+i2,-i2);
-			}
-			else if(memicmp(buffer+i,"#ifdef",6)==0){
-				preprocessor_ifdef(buffer+i,false);
-				continue;
-			}
-			else if(memicmp(buffer+i,"#ifndef",7)==0){
-				preprocessor_ifdef(buffer+i,true);
-				continue;
-			}
-			else continue;
-		}
-	}
-}
-
-
-
-
-bool Text::ReadFile( const string &filePath ){
-	//ファイルオープン
-	HANDLE hFile=CreateFile(filePath.c_str(),GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
-	if(hFile==INVALID_HANDLE_VALUE){
-		return false;
-	}
-
-	length = GetFileSize( hFile, NULL );
-
-	buffer = (char *)realloc( buffer, length + 1 );
-
-	//読み込み
-	DWORD dwAccBytes;
-	::ReadFile(hFile,buffer,length,&dwAccBytes,0);
-	buffer[dwAccBytes]=0;
-
-	//ファイルクローズ
-	CloseHandle(hFile);
-
-	return true;
-}
-
-void BasicSource::ChangeReturnLineChar(){
-	int i,i2;
-
-#ifdef _DEBUG
-	//改行コードの整合性チェック
-	for( i=0; ; i++ ){
-		if( buffer[i] == '\0' ){
-			break;
-		}
-		if( buffer[i]!='\r' && buffer[i+1]=='\n'
-			||  buffer[i]=='\r' && buffer[i+1]!='\n' ){
-				char temporary[255];
-				strncpy( temporary, buffer + i-100, 130 );
-				temporary[130] = 0;
-				for(int i2=0; ;i2++){
-					if(temporary[i2]=='\r') temporary[i2]='A';
-					if(temporary[i2]=='\n') temporary[i2]='B';
-					if(temporary[i2]=='\0') break;
-				}
-
-				extern HWND hOwnerEditor;
-				MessageBox( hOwnerEditor, temporary, "改行コードの整合性チェック", MB_OK | MB_ICONEXCLAMATION );
-		}
-	}
-#endif
-
-	//改行コードのCRLFをLFに変換
-	for(i=0,i2=0;;i++,i2++){
-		if(buffer[i]=='\r'&&buffer[i+1]=='\n') i++;
-		buffer[i2]=buffer[i];
-		if(buffer[i]=='\0') break;
-	}
-
-	length = i;
-}
-
-void BasicSource::RemoveComments(){
-	int i,i2,i3,IsStr;
-	char *temporary;
-	temporary=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(buffer)+1);
-	for(i=0,i2=0,i3=0,IsStr=0;;i++,i2++){
-		if(buffer[i]=='\"') IsStr^=1;
-		if(buffer[i]=='\n'||buffer[i]=='\0'){
-			i2--;
-			while(temporary[i2]==' '||temporary[i2]=='\t') i2--;
-			i2++;
-
-			if(i3){
-				//複数行に渡る注釈文の中に改行が存在するとき
-				memset(temporary+i2,'\n',i3);
-				i2+=i3;
-				i3=0;
-			}
-		}
-		if(buffer[i]=='\''&&IsStr==0){
-			//注釈文
-			i2--;
-			while(temporary[i2]==' '||temporary[i2]=='\t') i2--;
-			i2++;
-			while(buffer[i]!='\n'&&buffer[i]!='\0') i++;
-		}
-		if(buffer[i]=='/'&&buffer[i+1]=='*'&&IsStr==0){
-			//注釈文（複数行）
-			i+=2;
-			i3=0;
-			while(!(buffer[i]=='*'&&buffer[i+1]=='/')){
-				if(buffer[i]=='\n') i3++;
-				if(buffer[i]=='\0') break;
-				i++;
-			}
-			if(buffer[i]){
-				i+=2;
-			}
-			i--;
-			i2--;
-			continue;
-		}
-		temporary[i2]=buffer[i];
-		if(buffer[i]=='\0') break;
-	}
-	lstrcpy(buffer,temporary);
-	GlobalFree(temporary);
-}
-
-bool BasicSource::ReadFile_InIncludeDirective( const string &filePath ){
-	if( !Text::ReadFile( filePath ) ){
-		return false;
-	}
-
-	// 改行コードをCRLFからLFに変換
-	ChangeReturnLineChar();
-
-	// コメントを削除
-	RemoveComments();
-
-	// #ifdefディレクティブを処理
-	objDefine.DirectiveIfdef( buffer );
-
-	// アンダーバーによる改行を正規表現に戻す
-	RemoveReturnLineUnderbar();
-
-	// ダミー改行をセット
-	Realloc( length + 2 );
-	SlideString( buffer, 2 );
-	buffer[0] = '\n';
-	buffer[1] = '\n';
-
-	return true;
-}
-
-void BasicSource::DirectiveIncludeOrRequire(){
-	extern HANDLE hHeap;
-	extern char szIncludeDir[MAX_PATH];
-	extern char BasicCurDir[MAX_PATH];
-	extern INCLUDEFILEINFO IncludeFileInfo;
-	int i,i2,i3,sw1,LineNum,FileLayer[255],layer,LastFileByte[255];
-	char temporary[MAX_PATH],temp2[MAX_PATH+255],*LayerDir[255];
-
-	IncludeFileInfo.ppFileNames=(char **)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(char *));
-	extern char SourceFileName[MAX_PATH];
-	IncludeFileInfo.ppFileNames[0]=(char *)HeapAlloc(hHeap,0,lstrlen(SourceFileName)+1);
-	lstrcpy(IncludeFileInfo.ppFileNames[0],SourceFileName);
-	IncludeFileInfo.FilesNum=1;
-
-	layer=0;
-	FileLayer[layer]=0;
-	LastFileByte[layer]=GetLength();
-	LineNum=0;
-
-	//参照ディレクトリ
-	LayerDir[0]=(char *)HeapAlloc(hHeap,0,lstrlen(BasicCurDir)+1);
-	lstrcpy(LayerDir[0],BasicCurDir);
-
-	for(i=0;;i++){
-		if(buffer[i]=='\0'){
-			IncludeFileInfo.LineOfFile[LineNum]=-1;
-			break;
-		}
-		if(buffer[i]=='\n'){
-			IncludeFileInfo.LineOfFile[LineNum]=FileLayer[layer];
-			LineNum++;
-		}
-		if(i>LastFileByte[layer]){
-			HeapDefaultFree(LayerDir[layer]);
-			LayerDir[layer]=0;
-			layer--;
-		}
-		if((buffer[i-1]=='\n'||i==0)&&buffer[i]=='#'){
-			bool isRequire = false;
-			if(memcmp( buffer + i + 1, "include", 7 ) == 0
-				|| memcmp( buffer + i + 1, "require", 7 ) == 0){
-
-					//#requireの場合
-					if( buffer[i + 1] == 'r' ) isRequire = true;
-
-					i2=i+8;
-					while(buffer[i2]==' '||buffer[i2]=='\t') i2++;
-
-					if(buffer[i2]=='\"') sw1=0;
-					else if(buffer[i2]=='<') sw1=1;
-					i2++;
-
-					for(i3=0;;i2++,i3++){
-						if((buffer[i2]=='\"'&&sw1==0)||(buffer[i2]=='>'&&sw1==1)||buffer[i2]=='\n'||buffer[i2]=='\0'){
-							temporary[i3]=0;
-							break;
-						}
-						temporary[i3]=buffer[i2];
-					}
-					while(buffer[i2]!='\n'&&buffer[i2]!='\0') i2++;
-
-					if(sw1){
-						sprintf(temp2,"%s%s",szIncludeDir,temporary);
-						lstrcpy(temporary,temp2);
-					}
-					else GetFullPath(temporary,LayerDir[layer]);
-			}
-			else if(memcmp(buffer+i+1,"prompt",6)==0){
-				i2=i+7;
-				sprintf(temporary,"%sbasic\\prompt.sbp",szIncludeDir);
-			}
-			else if(memcmp(buffer+i+1,"N88BASIC",8)==0){
-				i2=i+9;
-				sprintf(temporary,"%sbasic\\prompt.sbp",szIncludeDir);
-			}
-			else if(memcmp(buffer+i+1,"console",7)==0){
-				//サブシステム タイプをCUIに変更
-				extern unsigned short TypeOfSubSystem;
-				TypeOfSubSystem=IMAGE_SUBSYSTEM_WINDOWS_CUI;
-
-				i2=i+8;
-				sprintf(temporary,"%sbasic\\dos_console.sbp",szIncludeDir);
-			}
-			else continue;
-
-			if(i){
-				//ディレクティブが消えるため、一行減ってしまうのを防ぐ（basic.sbpを除く）
-				SlideString(buffer+i2,1);
-				buffer[i2]='\n';
-				for(i3=0;i3<=layer;i3++) LastFileByte[i3]++;
-			}
-
-			IncludeFileInfo.ppFileNames=(char **)HeapReAlloc(hHeap,0,IncludeFileInfo.ppFileNames,(IncludeFileInfo.FilesNum+1)*sizeof(char *));
-			IncludeFileInfo.ppFileNames[IncludeFileInfo.FilesNum]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
-			lstrcpy(IncludeFileInfo.ppFileNames[IncludeFileInfo.FilesNum],temporary);
-
-			layer++;
-			FileLayer[layer]=IncludeFileInfo.FilesNum;
-			IncludeFileInfo.FilesNum++;
-
-			//#requireの場合では、既に読み込まれているファイルは読み込まないようにする
-			bool isFake = false;
-			if( isRequire ){
-				if( requireFiles.IsIncluded( temporary ) ){
-					//既に読み込まれているとき
-					isFake = true;
-				}
-			}
-
-			BasicSource source;
-
-			if( isFake ){
-				//既に読み込まれているときは空データ
-				source.SetBuffer( "" );
-			}
-			else{
-				//取り込まれたファイルを収集する
-				requireFiles.Add( temporary );
-
-				//インクルードファイルを読み込む
-				if( !source.ReadFile_InIncludeDirective( temporary ) ){
-					sprintf(temp2,"インクルードファイル \"%s\" をオープンできません",temporary);
-					SetError(-1,temp2,i);
-					break;
-				}
-			}
-
-			i3=lstrlen(buffer)+source.GetLength();
-			Realloc( i3 );
-			SlideString(buffer+i2,source.GetLength()+(i-i2));
-			memcpy(buffer+i,source.GetBuffer(),source.GetLength());
-
-			//新しい参照ディレクトリをセット
-			char temp4[MAX_PATH];
-			_splitpath(temporary,temp2,temp4,0,0);
-			lstrcat(temp2,temp4);
-			LayerDir[layer]=(char *)HeapAlloc(hHeap,0,lstrlen(temp2)+1);
-			lstrcpy(LayerDir[layer],temp2);
-
-			//ファイル範囲をスライド
-			LastFileByte[layer]=i+source.GetLength()-1;
-			for(i3=0;i3<layer;i3++) LastFileByte[i3]+=source.GetLength()+(i-i2);
-
-			i--;
-		}
-	}
-
-	HeapDefaultFree(LayerDir[0]);
-
-	length = lstrlen(buffer);
-}
-
-int KillReturnCode_InParameter(char *buffer,int *pRnum,char cBeginPare,char cEndPare){
-	int i,i2,i3,IsStr;
-
-	//カッコ'('直下の改行
-	while(buffer[0]=='\n'){
-		SlideString(buffer+1,-1);
-		(*pRnum)++;
-	}
-
-	for(i=0,IsStr=0;;i++){
-		if(IsDBCSLeadByte(buffer[i])&&buffer[i+1]){
-			i++;
-			continue;
-		}
-
-		if(buffer[i]=='\"') IsStr^=1;
-
-		if(buffer[i]=='\0') break;	//エラー
-		if(buffer[i]=='\n'){
-			i2=0;
-			i3=0;
-			while(buffer[i+i2]=='\n'){
-				i2++;
-				i3++;
-				while(buffer[i+i2]==' '||buffer[i+i2]=='\t') i2++;
-			}
-			while(buffer[i+i2]==' '||buffer[i+i2]=='\t') i2++;
-
-			if(buffer[i+i2]==cEndPare){
-				SlideString(buffer+i+i2,-i2);
-				(*pRnum)+=i3;
-				break;
-			}
-
-			//エラー
-			break;
-		}
-
-		if(buffer[i]==cBeginPare&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,pRnum,cBeginPare,cEndPare);
-			i+=i2;
-			if(buffer[i]!=cEndPare) break;
-			continue;
-		}
-		if(buffer[i]==cEndPare&&IsStr==0) break;
-
-		if(buffer[i]==','&&buffer[i+1]=='\n'&&IsStr==0){
-			i++;
-			while(buffer[i]=='\n'){
-				SlideString(buffer+i+1,-1);
-				(*pRnum)++;
-			}
-			i--;
-		}
-	}
-	return i;
-}
-void BasicSource::RemoveReturnLineUnderbar(){
-	int i,i2;
-
-	//アンダーバーによる改行
-	for(i=0;;i++){
-		i2=0;
-		while(buffer[i]=='_'&&buffer[i+1]=='\n'){
-			i2++;
-			SlideString(buffer+i+2,-2);
-			while(buffer[i]=='\n'){
-				SlideString(buffer+i+1,-1);
-				i2++;
-			}
-			for(;;i++){
-				if(buffer[i]=='_'&&buffer[i+1]=='\n') break;
-				if(buffer[i]=='\n'||buffer[i]=='\0'){
-					SlideString(buffer+i,i2);
-					memset(buffer+i,'\n',i2);
-					break;
-				}
-			}
-		}
-		if(buffer[i]=='\0') break;
-	}
-
-	//カッコ内パラメータの改行
-	int IsStr,rnum;
-	for(i=0,IsStr=0,rnum=0;;i++){
-		if(IsDBCSLeadByte(buffer[i])&&buffer[i+1]){
-			i++;
-			continue;
-		}
-		if(buffer[i]=='\0') break;
-		if(buffer[i]=='\n'){
-			if(rnum){
-				SlideString(buffer+i+1,rnum);
-				memset(buffer+i+1,'\n',rnum);
-				rnum=0;
-			}
-		}
-		if(buffer[i]=='\"') IsStr^=1;
-		if(buffer[i]=='('&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,&rnum,'(',')');
-			i+=i2;
-			if(buffer[i]!=')') break;
-		}
-		if(buffer[i]=='['&&IsStr==0){
-			i++;
-			i2=KillReturnCode_InParameter(buffer+i,&rnum,'[',']');
-			i+=i2;
-			if(buffer[i]!=']') break;
-		}
-	}
-
-	length = lstrlen(buffer);
-}
-
-void BasicSource::SetBuffer( const char *buffer ){
-	this->buffer = (char *)calloc( lstrlen(buffer) + 1, 1 );
-	lstrcpy( this->buffer, buffer );
-	length = lstrlen(buffer);
-
-	// ダミー改行をセット
-	Realloc( length + 2 );
-	SlideString( this->buffer, 2 );
-	this->buffer[0] = '\n';
-	this->buffer[1] = '\n';
-}
-
-bool BasicSource::ReadFile( const string &filePath ){
-	if( !Text::ReadFile( filePath ) ){
-		return false;
-	}
-
-	// 改行コードをCRLFからLFに変換
-	ChangeReturnLineChar();
-
-	// basic.sbpをインクルード
-	const char *headCode = "#include <basic.sbp>\n";
-	Realloc( length + lstrlen(headCode) );
-	SlideString( buffer, lstrlen(headCode) );
-	memcpy( buffer, headCode, lstrlen(headCode) );
-
-	// #defineと#requireを初期化
-	objDefine.Init();
-	requireFiles.clear();
-
-	// コメントを削除
-	RemoveComments();
-
-	// #ifdefディレクティブを処理
-	objDefine.DirectiveIfdef( buffer );
-
-	//最終行には文字を含ませないようにする
-	Realloc( length + 1 );
-	lstrcat( buffer, "\n" );
-
-	// #include / #require ディレクティブを処理
-	DirectiveIncludeOrRequire();
-
-	// アンダーバーによる改行を正規表現に戻す
-	RemoveReturnLineUnderbar();
-
-	// ダミー改行をセット
-	Realloc( length + 2 );
-	SlideString( buffer, 2 );
-	buffer[0] = '\n';
-	buffer[1] = '\n';
-
-	extern char *basbuf;
-	basbuf = GetBuffer();
-
-	return true;
-}
-
-bool BasicSource::Generate( const string &genName, const char *genBuffer ){
-	const int genBufferLength = lstrlen( genBuffer );
-
-#ifdef _DEBUG
-	// 挿入ソースに改行コードが含まれていないかを検査する
-	for( int i=0; genBuffer[i] ; i++ ){
-		if( genBuffer[i] == '\n' ){
-			SetError();
-			break;
-		}
-	}
-#endif
-
-	bool isFound = false;
-
-	for( int i=0; ; i++ ){
-		if( i == 0 || buffer[i] == '\n' ){
-			if( buffer[i] == '\n' ){
-				i++;
-			}
-			while( IsBlank( buffer[i] ) ){
-				i++;
-			}
-
-			int startIndex = i;
-
-			if( memicmp( buffer + i, generateDirectiveName.c_str(), generateDirectiveName.size() ) == 0 ){
-				i += (int)generateDirectiveName.size();
-				while( IsBlank( buffer[i] ) ){
-					i++;
-				}
-
-				char temporary[VN_SIZE];
-				for( int i2=0; ; i++, i2++ ){
-					if( buffer[i] == '\n' ){
-						temporary[i2] = 0;
-						break;
-					}
-					temporary[i2] = buffer[i];
-				}
-				if( genName == temporary ){
-					// 一致
-
-					int endIndex = i;
-
-					int lengthOffset = genBufferLength - ( endIndex - startIndex );
-
-					Realloc( length + lengthOffset );
-					SlideString( buffer + endIndex, lengthOffset );
-					memcpy( buffer + startIndex, genBuffer, genBufferLength );
-
-					isFound = true;
-
-					break;
-				}
-			}
-		}
-	}
-
-	return isFound;
-}
-
-void BasicSource::Addition( const char *buffer ){
-	Realloc( length + lstrlen(buffer) );
-	lstrcat( this->buffer, buffer );
-}
Index: trunk/abdev/BasicCompiler_Common/src/Symbol.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Symbol.cpp	(revision 169)
+++ 	(revision )
@@ -1,21 +1,0 @@
-#include <../common.h>
-#include <Symbol.h>
-
-Symbol::Symbol( const char *fullName )
-{
-	char areaName[VN_SIZE] = "";		//オブジェクト変数
-	char nestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName, areaName, nestName );
-
-	namespaceScopes = NamespaceScopes( areaName );
-	name = nestName;
-}
-Symbol::Symbol( const string &fullName )
-{
-	char areaName[VN_SIZE] = "";		//オブジェクト変数
-	char nestName[VN_SIZE] = "";		//入れ子メンバ
-	bool isNest = SplitMemberName( fullName.c_str(), areaName, nestName );
-
-	namespaceScopes = NamespaceScopes( areaName );
-	name = nestName;
-}
