Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp	(revision 578)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/Const.cpp	(revision 579)
@@ -36,13 +36,10 @@
 }
 
-CConst *Consts::GetObjectPtr( const std::string &name ){
-	char ObjName[VN_SIZE];		//オブジェクト変数
-	char NestMember[VN_SIZE];	//入れ子メンバ
-	bool isObjectMember = SplitMemberName( name.c_str(), ObjName, NestMember );
-
-	CConst *pConst = GetHashArrayElement( NestMember );
+CConst *Consts::GetObjectPtr( const Symbol &symbol )
+{
+	CConst *pConst = GetHashArrayElement( symbol.GetName().c_str() );
 	while( pConst )
 	{
-		if( pConst->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( name ) ) )
+		if( pConst->IsEqualSymbol( symbol ) )
 		{
 			break;
@@ -55,6 +52,6 @@
 
 
-int Consts::GetBasicType(const char *Name){
-	CConst *pConst = GetObjectPtr(Name);
+int Consts::GetBasicType( const Symbol &symbol ){
+	CConst *pConst = GetObjectPtr( symbol );
 
 	if(!pConst) return 0;
@@ -62,6 +59,6 @@
 	return pConst->GetType().GetBasicType();
 }
-_int64 Consts::GetWholeData(const char *Name){
-	CConst *pConst = GetObjectPtr(Name);
+_int64 Consts::GetWholeData( const Symbol &symbol ){
+	CConst *pConst = GetObjectPtr( symbol );
 
 	if(!pConst) return 0;
@@ -69,6 +66,6 @@
 	return pConst->GetWholeData();
 }
-double Consts::GetDoubleData(const char *Name){
-	CConst *pConst = GetObjectPtr(Name);
+double Consts::GetDoubleData( const Symbol &symbol ){
+	CConst *pConst = GetObjectPtr( symbol );
 
 	if(!pConst) return 0;
@@ -76,6 +73,6 @@
 	return pConst->GetDoubleData();
 }
-bool Consts::IsStringPtr( const char *Name ){
-	CConst *pConst = GetObjectPtr(Name);
+bool Consts::IsStringPtr( const Symbol &symbol ){
+	CConst *pConst = GetObjectPtr( symbol );
 
 	if(!pConst) return false;
@@ -87,5 +84,5 @@
 
 // マクロ定数を追加するための関数
-void ConstMacros::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr )
+bool ConstMacros::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr )
 {
 	std::vector<std::string> parameters;
@@ -94,6 +91,5 @@
 	if(parameterStr[i]!='(')
 	{
-		compiler.errorMessenger.OutputFatalError();
-		return;
+		return false;
 	}
 
@@ -101,7 +97,7 @@
 	int i2;
 	for(i++,i2=0;;i++,i2++){
-		if(parameterStr[i]=='\0'){
-			compiler.errorMessenger.Output(1,NULL,cp);
-			return;
+		if(parameterStr[i]=='\0')
+		{
+			return false;
 		}
 		if(parameterStr[i]==','||parameterStr[i]==')'){
@@ -112,8 +108,7 @@
 			if(parameterStr[i]==')'){
 				i++;
-				if(parameterStr[i]!='='){
-					extern int cp;
-					compiler.errorMessenger.Output(1,NULL,cp);
-					return;
+				if(parameterStr[i]!='=')
+				{
+					return false;
 				}
 				break;
@@ -129,15 +124,14 @@
 	lstrcpy(temporary,parameterStr+i+1);
 
-	Put( new ConstMacro( namespaceScopes, name, parameters, temporary ) );
+	this->Put( new ConstMacro( namespaceScopes, name, parameters, temporary ) );
+
+	return true;
 }
-ConstMacro *ConstMacros::Find( const std::string &name ){
-	char ObjName[VN_SIZE];		//オブジェクト変数
-	char NestMember[VN_SIZE];	//入れ子メンバ
-	bool isObjectMember = SplitMemberName( name.c_str(), ObjName, NestMember );
-
-	ConstMacro *pConstMacro = GetHashArrayElement( NestMember );
+ConstMacro *ConstMacros::Find( const Symbol &symbol )
+{
+	ConstMacro *pConstMacro = GetHashArrayElement( symbol.GetName().c_str() );
 	while( pConstMacro )
 	{
-		if( pConstMacro->IsEqualSymbol( LexicalAnalyzer::FullNameToSymbol( name ) ) )
+		if( pConstMacro->IsEqualSymbol( symbol ) )
 		{
 			break;
Index: trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp
===================================================================
--- trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp	(revision 578)
+++ trunk/ab5.0/abdev/BasicCompiler_Common/src/LexicalAnalyzer_Const.cpp	(revision 579)
@@ -179,5 +179,8 @@
 					// 定数マクロ
 					const char *params = temporary + i2;
-					constMacros.Add( namespaceScopes, name, params );
+					if( !constMacros.Add( namespaceScopes, name, params ) )
+					{
+						compiler.errorMessenger.Output( 1, NULL, i );
+					}
 				}
 
