Index: trunk/abdev/BasicCompiler_Common/Compile.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/Compile.cpp	(revision 294)
+++ trunk/abdev/BasicCompiler_Common/Compile.cpp	(revision 296)
@@ -31,5 +31,6 @@
 // トークンを取得
 ///////////////////////////////////////////////////
-void GetIdentifierToken( char *token, const char *source, int &pos ){
+void GetIdentifierToken( char *token, const char *source, int &pos )
+{
 	for( int i=0; ; i++, pos++ ){
 		if( ! IsVariableChar( source[pos] ) ){
@@ -39,4 +40,64 @@
 		token[i] = source[pos];
 	}
+}
+void GetCommandToken( char *token, const char *source, int &pos )
+{
+	for( int i=0; ; i++, pos++ ){
+		if( IsCommandDelimitation( source[pos] ) ){
+			token[i] = 0;
+			break;
+		}
+		token[i] = source[pos];
+	}
+}
+
+
+///////////////////////////////////////////////////
+// ジェネリクスのクラス型記述を分析
+///////////////////////////////////////////////////
+void SplitGenericClassInstance( const char *fullName, char *className, std::vector<std::string> &typeParameters )
+{
+	int i = 0;
+	typeParameters.clear();
+
+	//クラス名を取得
+	GetIdentifierToken( className, fullName, i );
+
+
+	/////////////////////////////////////////////////////////
+	// ☆★☆ ジェネリクスサポート ☆★☆
+	if( fullName[i] == '<' )
+	{
+		while( true )
+		{
+			i++;
+
+			// 型パラメータを取得
+			char temporary[VN_SIZE];
+			GetIdentifierToken( temporary, fullName, i );
+			if( temporary[0] == '\0' )
+			{
+				extern int cp;
+				SetError(1,NULL,cp);
+			}
+
+			typeParameters.push_back( temporary );
+
+			if( fullName[i] == ',' )
+			{
+				continue;
+			}
+			else if( fullName[i] == '>' )
+			{
+				break;
+			}
+			else
+			{
+				extern int cp;
+				SetError(1,NULL,cp);
+			}
+		}
+	}
+	/////////////////////////////////////////////////////////
 }
 
Index: trunk/abdev/BasicCompiler_Common/common.h
===================================================================
--- trunk/abdev/BasicCompiler_Common/common.h	(revision 294)
+++ trunk/abdev/BasicCompiler_Common/common.h	(revision 296)
@@ -374,4 +374,6 @@
 //Compile.cpp
 void GetIdentifierToken( char *token, const char *source, int &pos );
+void GetCommandToken( char *token, const char *source, int &pos );
+void SplitGenericClassInstance( const char *fullName, char *className, std::vector<std::string> &typeParameters );
 int JumpStatement(const char *source, int &pos);
 void DebugVariable(void);
Index: trunk/abdev/BasicCompiler_Common/src/Class.cpp
===================================================================
--- trunk/abdev/BasicCompiler_Common/src/Class.cpp	(revision 294)
+++ trunk/abdev/BasicCompiler_Common/src/Class.cpp	(revision 296)
@@ -1259,7 +1259,11 @@
 
 			//クラス名を取得
-			GetIdentifierToken( temporary, basbuf, i );
-
-			CClass *pobj_c =  const_cast<CClass *>( this->Find(namespaceScopes, temporary) );
+			GetCommandToken( temporary, basbuf, i );
+
+			char className[VN_SIZE];
+			std::vector<std::string> typeParameters;
+			SplitGenericClassInstance( temporary, className, typeParameters );
+
+			CClass *pobj_c =  const_cast<CClass *>( this->Find(namespaceScopes, className) );
 			if(!pobj_c) continue;
 
@@ -1281,20 +1285,7 @@
 			/////////////////////////////////////////////////////////
 			// ☆★☆ ジェネリクスサポート ☆★☆
-			if( basbuf[i] == '<' )
+			BOOST_FOREACH( const std::string &typeParameter, typeParameters )
 			{
-				// 型パラメータを取得
-				i++;
-				GetIdentifierToken( temporary, basbuf, i );
-
-				pobj_c->AddFormalGenericType( GenericType( temporary, Type(DEF_OBJECT,*GetObjectClassPtr()) ) );
-
-				if( basbuf[i] == '>' )
-				{
-					i++;
-				}
-				else
-				{
-					SetError();
-				}
+				pobj_c->AddFormalGenericType( GenericType( typeParameter, Type(DEF_OBJECT,*GetObjectClassPtr()) ) );
 			}
 			/////////////////////////////////////////////////////////
@@ -1330,11 +1321,6 @@
 					isInherits = true;
 
-					for(i+=3,i2=0;;i++,i2++){
-						if(IsCommandDelimitation(basbuf[i])){
-							temporary[i2]=0;
-							break;
-						}
-						temporary[i2]=basbuf[i];
-					}
+					i += 3;
+					GetCommandToken( temporary, basbuf, i );
 
 					if(lstrcmpi(temporary,pobj_c->GetName().c_str())==0){
