Index: trunk/ab5.0/abdev/abdev/Common.h
===================================================================
--- trunk/ab5.0/abdev/abdev/Common.h	(revision 663)
+++ trunk/ab5.0/abdev/abdev/Common.h	(revision 681)
@@ -677,6 +677,4 @@
 BOOL CheckParenthesis(char *buffer);
 DWORD GetValue(char *value);
-BOOL IsManagementCommand(int ComNum);
-int IsBasicReservedWord(char *str);
 HBITMAP CreateGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2);
 HBITMAP CreateVertGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2);
Index: trunk/ab5.0/abdev/abdev/DrawBuffer.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/DrawBuffer.cpp	(revision 663)
+++ trunk/ab5.0/abdev/abdev/DrawBuffer.cpp	(revision 681)
@@ -410,15 +410,26 @@
 
 			//複数行に渡るコメントを考慮
-			if(pBuf[i]=='/'&&pBuf[i+1]=='*'&&IsStr==0&&dwComment==0){
+			if( memicmp( pBuf+i, ActiveBasic::IDE::Program::ablang->GetSyntax().commentMultiBegin.c_str(), ActiveBasic::IDE::Program::ablang->GetSyntax().commentMultiBegin.size() ) == 0
+				&& IsStr == 0
+				&& dwComment == 0 )
+			{
+				// /*
 				dwComment=12;
 				bMultiLineComment=1;
 			}
-			if(pBuf[i]=='*'&&pBuf[i+1]=='/'&&
-				dwComment==10&&bMultiLineComment){
+			if( memicmp( pBuf+i, ActiveBasic::IDE::Program::ablang->GetSyntax().commentMultiEnd.c_str(), ActiveBasic::IDE::Program::ablang->GetSyntax().commentMultiEnd.size() ) == 0
+				&& dwComment == 10
+				&& bMultiLineComment )
+			{
+				// */
 				dwComment=3;
 			}
 
 			//単行コメント
-			if(pBuf[i]=='\''&&dwComment==0&&IsStr==0){
+			if( memicmp( pBuf+i, ActiveBasic::IDE::Program::ablang->GetSyntax().commentSingle.c_str(), ActiveBasic::IDE::Program::ablang->GetSyntax().commentSingle.size() ) == 0
+				&& dwComment == 0
+				&& IsStr == 0 )
+			{
+				// '
 				dwComment=10;
 				bMultiLineComment=0;
Index: trunk/ab5.0/abdev/abdev/ParameterHint.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/ParameterHint.cpp	(revision 663)
+++ trunk/ab5.0/abdev/abdev/ParameterHint.cpp	(revision 681)
@@ -72,63 +72,11 @@
 	int CmdValue;
 
-	CmdValue=IsBasicReservedWord(Command);
-	if(CmdValue==COM_ABSTRACT)			lstrcpy(MethodCheckInfo.msg,"Abstract Sub/Function ([arglist]) [As type]]");
-	else if(CmdValue==COM_BEEP)			lstrcpy(MethodCheckInfo.msg,"Beep");
-	else if(CmdValue==COM_CHDIR)		lstrcpy(MethodCheckInfo.msg,"ChDir directory$");
-	else if(CmdValue==COM_CIRCLE)		lstrcpy(MethodCheckInfo.msg,"Circle (x, y), radius, [color], [start], [end], [aspect], [f], [brushcolor]");
-	else if(CmdValue==COM_CLOSE)		lstrcpy(MethodCheckInfo.msg,"Close [filenumber]");
-	else if(CmdValue==COM_CLASS)		lstrcpy(MethodCheckInfo.msg,"Class name");
-	else if(CmdValue==COM_CLS)			lstrcpy(MethodCheckInfo.msg,"Cls [number]");
-	else if(CmdValue==COM_COLOR)		lstrcpy(MethodCheckInfo.msg,"Color color, [backcolor]");
-	else if(CmdValue==COM_CONST)		lstrcpy(MethodCheckInfo.msg,"Const constname = expression");
-	else if(CmdValue==COM_DEBUG)		lstrcpy(MethodCheckInfo.msg,"Debug");
-	else if(CmdValue==COM_DECLARE)		lstrcpy(MethodCheckInfo.msg,"Declare Sub/Function name Lib \"libname\" [Alias \"aliasname\"] ([arglist]) [As type]]");
-	else if(CmdValue==COM_DEF)			lstrcpy(MethodCheckInfo.msg,"Def func([parms] [,parms2])=expression");
-	else if(CmdValue==COM_DIM)			lstrcpy(MethodCheckInfo.msg,"Dim variable [(subscripts)] As type, ...");
-	else if(CmdValue==COM_END)			lstrcpy(MethodCheckInfo.msg,"End [type]");
-	else if(CmdValue==COM_ENUM)			lstrcpy(MethodCheckInfo.msg,"Enum name");
-	else if(CmdValue==COM_FIELD)		lstrcpy(MethodCheckInfo.msg,"Field #filenumber, fieldbyte");
-	else if(CmdValue==COM_FOR)			lstrcpy(MethodCheckInfo.msg,"For variable=start To end [Step step]");
-	else if(CmdValue==COM_FUNCTION)		lstrcpy(MethodCheckInfo.msg,"Function name ([arglist]) [As type]");
-	else if(CmdValue==COM_GET)			lstrcpy(MethodCheckInfo.msg,"Get #filenumber, recode, StrBuffer");
-	else if(CmdValue==COM_GOSUB)		lstrcpy(MethodCheckInfo.msg,"GoSub label");
-	else if(CmdValue==COM_GOTO)			lstrcpy(MethodCheckInfo.msg,"Goto label");
-	else if(CmdValue==COM_IF)			lstrcpy(MethodCheckInfo.msg,"If judgment Then truecommand [Else falsecommand]");
-	else if(CmdValue==COM_INHERITS)		lstrcpy(MethodCheckInfo.msg,"Inherits BaseClass");
-	else if(CmdValue==COM_INPUT)		lstrcpy(MethodCheckInfo.msg,"Input [# filenumber, ] variable, [...]");
-	else if(CmdValue==COM_INTERFACE)	lstrcpy(MethodCheckInfo.msg,"Interface name");
-	else if(CmdValue==COM_KILL)			lstrcpy(MethodCheckInfo.msg,"Kill filename$");
-	else if(CmdValue==COM_LET)			lstrcpy(MethodCheckInfo.msg,"[Let] variable = expression");
-	else if(CmdValue==COM_LINE)			lstrcpy(MethodCheckInfo.msg,"Line [(sx, sy)] -[Step] (ex, ey), [color], [B/Bf], [color2]");
-	else if(CmdValue==COM_LOCATE)		lstrcpy(MethodCheckInfo.msg,"Locate x, y");
-	else if(CmdValue==COM_LOOP)			lstrcpy(MethodCheckInfo.msg,"Loop while/until judgment");
-	else if(CmdValue==COM_MKDIR)		lstrcpy(MethodCheckInfo.msg,"MkDir directory$");
-	else if(CmdValue==COM_MSGBOX)		lstrcpy(MethodCheckInfo.msg,"MsgBox hWnd, String$, [Title$], [BoxType], [retAns]");
-	else if(CmdValue==COM_NAMESPACE)	lstrcpy(MethodCheckInfo.msg,"Namespace namespaceStr");
-	else if(CmdValue==COM_NEXT)			lstrcpy(MethodCheckInfo.msg,"Next");
-	else if(CmdValue==COM_OPEN)			lstrcpy(MethodCheckInfo.msg,"Open filename$ [For Input/Output/Append] As number");
-	else if(CmdValue==COM_PAINT)		lstrcpy(MethodCheckInfo.msg,"Paint (x, y), brushcolor, [linecolor]");
-	else if(CmdValue==COM_PRINT)		lstrcpy(MethodCheckInfo.msg,"Print outdata, [...]");
-	else if(CmdValue==COM_PRIVATE)		lstrcpy(MethodCheckInfo.msg,"Private");
-	else if(CmdValue==COM_PROTECTED)	lstrcpy(MethodCheckInfo.msg,"Protected");
-	else if(CmdValue==COM_PSET)			lstrcpy(MethodCheckInfo.msg,"PSet (x, y), [color]");
-	else if(CmdValue==COM_PUBLIC)		lstrcpy(MethodCheckInfo.msg,"Public");
-	else if(CmdValue==COM_PUT)			lstrcpy(MethodCheckInfo.msg,"Put #filenumber, recode, StrBuffer");
-	else if(CmdValue==COM_RANDOMIZE)	lstrcpy(MethodCheckInfo.msg,"Randomize [number]");
-	else if(CmdValue==COM_REM)			lstrcpy(MethodCheckInfo.msg,"Rem [comment]");
-	else if(CmdValue==COM_RETURN)		lstrcpy(MethodCheckInfo.msg,"Return");
-	else if(CmdValue==COM_SELECT)		lstrcpy(MethodCheckInfo.msg,"Select Case testexpression");
-	else if(CmdValue==COM_SUB)			lstrcpy(MethodCheckInfo.msg,"Sub name ([arglist])");
-	else if(CmdValue==COM_TYPE)			lstrcpy(MethodCheckInfo.msg,"Type name");
-	else if(CmdValue==COM_TYPEDEF)		lstrcpy(MethodCheckInfo.msg,"TypeDef newtype = basetype");
-	else if(CmdValue==COM_VIRTUAL)		lstrcpy(MethodCheckInfo.msg,"Virtual Sub/Function ([arglist]) [As type]]");
-	else if(CmdValue==COM_OVERRIDE)		lstrcpy(MethodCheckInfo.msg,"Override Sub/Function ([arglist]) [As type]]");
-	else if(CmdValue==COM_WEND)			lstrcpy(MethodCheckInfo.msg,"Wend");
-	else if(CmdValue==COM_WHILE)		lstrcpy(MethodCheckInfo.msg,"While judgment");
-	else if(CmdValue==COM_WINDOW)		lstrcpy(MethodCheckInfo.msg,"Window hWnd, OwnerWnd, x, y, width, height, title$, style, [class$], [ID], [callbackfunction], [ExStyle]");
-	else if(CmdValue==COM_WITH)			lstrcpy(MethodCheckInfo.msg,"With object");
-	else if(CmdValue==COM_WRITE)		lstrcpy(MethodCheckInfo.msg,"Write [data, ...]");
-	else return 0;
-	return 1;
+	if( ActiveBasic::IDE::Program::ablang->IsExistReservedKeywordWithQuickHelp( Command ) )
+	{
+		lstrcpy( MethodCheckInfo.msg, ActiveBasic::IDE::Program::ablang->GetReservedKeywordWithQuickHelp( Command ).c_str() );
+		return 1;
+	}
+
+	return 0;
 }
 
Index: trunk/ab5.0/abdev/abdev/Replace.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/Replace.cpp	(revision 663)
+++ trunk/ab5.0/abdev/abdev/Replace.cpp	(revision 681)
@@ -51,12 +51,12 @@
 
 			//予約語（青色）
-			BOOL bResult=0;
-			if(DocType==WNDTYPE_BASIC){
-				i2=IsBasicReservedWord(pTemp);
-				bResult=IsManagementCommand(i2);
-			}
-			else if(DocType==WNDTYPE_HTML) bResult=IsHtmlReservedWord(pTemp);
-
-			if(bResult){
+			bool result = false;
+			if(DocType==WNDTYPE_BASIC)
+			{
+				result = ActiveBasic::IDE::Program::ablang->IsExistKeyword( pTemp );
+			}
+			else if(DocType==WNDTYPE_HTML) result=IsHtmlReservedWord(pTemp);
+
+			if(result){
 				for(i2=cr2.cpMin;i2<cr2.cpMax;i2++){
 					MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i2]=tci.rgbStatement;
@@ -64,10 +64,13 @@
 			}
 		}
-		if(IsStr||pBuf[i]=='\"'&&IsStr==0){
+		if(IsStr||ActiveBasic::IDE::Program::ablang->IsQuoteMark( pBuf[i] )&&IsStr==0){
 			//文字列カラー（""で囲まれる範囲）
 			MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]=tci.rgbString;
 		}
 		if(pBuf[i]=='\0') break;
-		if(pBuf[i]=='\"') IsStr^=1;
+		if( ActiveBasic::IDE::Program::ablang->IsQuoteMark( pBuf[i] ) )
+		{
+			IsStr^=1;
+		}
 		if(pBuf[i]=='\r'&&pBuf[i+1]=='\n'){
 			i++;
Index: trunk/ab5.0/abdev/abdev/SubOperation.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/SubOperation.cpp	(revision 663)
+++ trunk/ab5.0/abdev/abdev/SubOperation.cpp	(revision 681)
@@ -413,220 +413,4 @@
 	return ans;
 }
-BOOL IsManagementCommand(int ComNum){
-	switch(ComNum){
-		case -1:
-		case COM_ABSTRACT:
-		case COM_CLASS:
-		case COM_CONST:
-		case COM_DEBUG:
-		case COM_DECLARE:
-		case COM_DEF:
-		case COM_DIM:
-		case COM_DO:
-		case COM_END:
-		case COM_ENUM:
-		case COM_FOR:
-		case COM_FUNCTION:
-		case COM_GOSUB:
-		case COM_GOTO:
-		case COM_IF:
-		case COM_INHERITS:
-		case COM_INTERFACE:
-		case COM_LOOP:
-		case COM_NAMESPACE:
-		case COM_NEXT:
-		case COM_PRIVATE:
-		case COM_PROTECTED:
-		case COM_PUBLIC:
-		case COM_RETURN:
-		case COM_SELECT:
-		case COM_SUB:
-		case COM_TRY:
-		case COM_TYPE:
-		case COM_TYPEDEF:
-		case COM_VIRTUAL:
-		case COM_OVERRIDE:
-		case COM_WEND:
-		case COM_WHILE:
-		case COM_WITH:
-			return 1;
-		default:
-			break;
-	}
-	return 0;
-}
-int IsBasicReservedWord(char *str){
-	if(str[0]=='a'||str[0]=='A'){
-		if(lstrcmpi(str,"Abstract")==0) return COM_ABSTRACT;
-		if(lstrcmpi(str,"As")==0) return -1;
-	}
-	else if(str[0]=='b'||str[0]=='B'){
-		if(lstrcmpi(str,"Beep")==0) return COM_BEEP;
-		if(lstrcmp(str,"Boolean")==0) return -1;
-		if(lstrcmpi(str,"ByRef")==0) return -1;
-		if(lstrcmpi(str,"ByVal")==0) return -1;
-		if(lstrcmp(str,"Byte")==0) return -1;
-	}
-	else if(str[0]=='c'||str[0]=='C'){
-		if(lstrcmpi(str,"Catch")==0) return -1;
-		if(lstrcmpi(str,"Case")==0) return -1;
-		if(lstrcmp(str,"Char")==0) return -1;
-		if(lstrcmpi(str,"ChDir")==0) return COM_CHDIR;
-		if(lstrcmpi(str,"Circle")==0) return COM_CIRCLE;
-		if(lstrcmpi(str,"Class")==0) return COM_CLASS;
-		if(lstrcmpi(str,"Close")==0) return COM_CLOSE;
-		if(lstrcmpi(str,"Cls")==0) return COM_CLS;
-		if(lstrcmpi(str,"Color")==0) return COM_COLOR;
-		if(lstrcmpi(str,"Const")==0) return COM_CONST;
-		if(lstrcmpi(str,"Continue")==0) return -1;
-	}
-	else if(str[0]=='d'||str[0]=='D'){
-		if(lstrcmpi(str,"Debug")==0) return COM_DEBUG;
-		if(lstrcmpi(str,"Declare")==0) return COM_DECLARE;
-		if(lstrcmpi(str,"Def")==0) return COM_DEF;
-		if(lstrcmpi(str,"Delegate")==0) return -1;
-		if(lstrcmpi(str,"Delete")==0) return -1;
-		if(lstrcmpi(str,"DelWnd")==0) return COM_DELWND;
-		if(lstrcmpi(str,"Dim")==0) return COM_DIM;
-		if(lstrcmpi(str,"Do")==0) return COM_DO;
-		if(lstrcmp(str,"Double")==0) return -1;
-		if(lstrcmp(str,"DWord")==0) return -1;
-	}
-	else if(str[0]=='e'||str[0]=='E'){
-		if(lstrcmpi(str,"Else")==0) return -1;
-		if(lstrcmpi(str,"ElseIf")==0) return -1;
-		if(lstrcmpi(str,"End")==0) return COM_END;
-		if(lstrcmpi(str,"EndIf")==0) return -1;
-		if(lstrcmpi(str,"EndFunction")==0) return -1;
-		if(lstrcmpi(str,"EndSub")==0) return -1;
-		if(lstrcmpi(str,"EndType")==0) return -1;
-		if(lstrcmpi(str,"EndSelect")==0) return -1;
-		if(lstrcmpi(str,"EndWith")==0) return -1;
-		if(lstrcmpi(str,"Enum")==0) return COM_ENUM;
-		if(lstrcmpi(str,"Exit")==0) return -1;
-		if(lstrcmpi(str,"ExitDo")==0) return -1;
-		if(lstrcmpi(str,"ExitFor")==0) return -1;
-		if(lstrcmpi(str,"ExitFunction")==0) return -1;
-		if(lstrcmpi(str,"ExitSub")==0) return -1;
-		if(lstrcmpi(str,"ExitWhile")==0) return -1;
-	}
-	else if(str[0]=='f'||str[0]=='F'){
-		if(lstrcmp(str,"False")==0) return -1;
-		if(lstrcmpi(str,"Field")==0) return COM_FIELD;
-		if(lstrcmpi(str,"Finally")==0) return -1;
-		if(lstrcmpi(str,"For")==0) return COM_FOR;
-		if(lstrcmpi(str,"Foreach")==0) return -1;
-		if(lstrcmpi(str,"Function")==0) return COM_FUNCTION;
-	}
-	else if(str[0]=='g'||str[0]=='G'){
-		if(lstrcmpi(str,"Get")==0) return COM_GET;
-		if(lstrcmpi(str,"GoSub")==0) return COM_GOSUB;
-		if(lstrcmpi(str,"Goto")==0) return COM_GOTO;
-	}
-	else if(str[0]=='i'||str[0]=='I'){
-		if(lstrcmpi(str,"If")==0) return COM_IF;
-		if(lstrcmpi(str,"Imports")==0) return -1;
-		if(lstrcmpi(str,"Implements")==0) return -1;
-		if(lstrcmpi(str,"In")==0) return -1;
-		if(lstrcmpi(str,"Inherits")==0) return COM_INHERITS;
-		if(lstrcmpi(str,"Input")==0) return COM_INPUT;
-		if(lstrcmp(str,"Int64")==0) return -1;
-		if(lstrcmp(str,"Integer")==0) return -1;
-		if(lstrcmpi(str,"Interface")==0) return COM_INTERFACE;
-	}
-	else if(str[0]=='k'||str[0]=='K'){
-		if(lstrcmpi(str,"Kill")==0) return COM_KILL;
-	}
-	else if(str[0]=='l'||str[0]=='L'){
-		if(lstrcmpi(str,"Let")==0) return COM_LET;
-		if(lstrcmpi(str,"Line")==0) return COM_LINE;
-		if(lstrcmpi(str,"Locate")==0) return COM_LOCATE;
-		if(lstrcmp(str,"Long")==0) return -1;
-		if(lstrcmpi(str,"Loop")==0) return COM_LOOP;
-	}
-	else if(str[0]=='m'||str[0]=='M'){
-		if(lstrcmpi(str,"MkDir")==0) return COM_MKDIR;
-		if(lstrcmpi(str,"MsgBox")==0) return COM_MSGBOX;
-	}
-	else if(str[0]=='n'||str[0]=='N'){
-		if(lstrcmpi(str,"Namespace")==0) return COM_NAMESPACE;
-		if(lstrcmpi(str,"Next")==0) return COM_NEXT;
-		if(lstrcmpi(str,"New")==0) return -1;
-		if(lstrcmpi(str,"Nothing")==0) return -1;
-	}
-	else if(str[0]=='o'||str[0]=='O'){
-		if(lstrcmp(str,"Object")==0) return -1;
-		if(lstrcmpi(str,"Open")==0) return COM_OPEN;
-		if(lstrcmpi(str,"Operator")==0) return -1;
-		if(lstrcmpi(str,"Override")==0) return COM_OVERRIDE;
-	}
-	else if(str[0]=='p'||str[0]=='P'){
-		if(lstrcmpi(str,"Paint")==0) return COM_PAINT;
-		if(lstrcmpi(str,"Print")==0) return COM_PRINT;
-		if(lstrcmpi(str,"Private")==0) return COM_PRIVATE;
-		if(lstrcmpi(str,"Protected")==0) return COM_PROTECTED;
-		if(lstrcmpi(str,"PSet")==0) return COM_PSET;
-		if(lstrcmpi(str,"Put")==0) return COM_PUT;
-		if(lstrcmpi(str,"Public")==0) return COM_PUBLIC;
-	}
-	else if(str[0]=='q'||str[0]=='Q'){
-		if(lstrcmp(str,"QWord")==0) return -1;
-	}
-	else if(str[0]=='r'||str[0]=='R'){
-		if(lstrcmpi(str,"Randomize")==0) return COM_RANDOMIZE;
-		if(lstrcmpi(str,"Rem")==0) return COM_REM;
-		if(lstrcmpi(str,"Return")==0) return COM_RETURN;
-	}
-	else if(str[0]=='s'||str[0]=='S'){
-		if(lstrcmp(str,"SByte")==0) return -1;
-		if(lstrcmpi(str,"Select")==0) return COM_SELECT;
-		if(lstrcmpi(str,"SelectCase")==0) return COM_SELECT;
-		if(lstrcmp(str,"Single")==0) return -1;
-		if(lstrcmpi(str,"Sleep")==0) return COM_SLEEP;
-		if(lstrcmp(str,"Static")==0) return -1;
-		if(lstrcmpi(str,"Step")==0) return -1;
-		if(lstrcmp(str,"String")==0) return -1;
-		if(lstrcmpi(str,"Sub")==0) return COM_SUB;
-		if(lstrcmpi(str,"Super")==0) return -1;
-	}
-	else if(str[0]=='t'||str[0]=='T'){
-		if(lstrcmpi(str,"Then")==0) return -1;
-		if(lstrcmpi(str,"This")==0) return -1;
-		if(lstrcmpi(str,"Throw")==0) return -1;
-		if(lstrcmpi(str,"To")==0) return -1;
-		if(lstrcmp(str,"True")==0) return -1;
-		if(lstrcmp(str,"Try")==0) return COM_TRY;
-		if(lstrcmpi(str,"Type")==0) return COM_TYPE;
-		if(lstrcmpi(str,"TypeDef")==0) return COM_TYPEDEF;
-	}
-	else if(str[0]=='u'||str[0]=='U'){
-		if(lstrcmpi(str,"Until")==0) return -1;
-	}
-	else if(str[0]=='v'||str[0]=='V'){
-		if(lstrcmpi(str,"Virtual")==0) return COM_VIRTUAL;
-	}
-	else if(str[0]=='w'||str[0]=='W'){
-		if(lstrcmpi(str,"Wend")==0) return COM_WEND;
-		if(lstrcmpi(str,"While")==0) return COM_WHILE;
-		if(lstrcmpi(str,"Window")==0) return COM_WINDOW;
-		if(lstrcmpi(str,"With")==0) return COM_WITH;
-		if(lstrcmp(str,"Word")==0) return -1;
-		if(lstrcmpi(str,"Write")==0) return COM_WRITE;
-	}
-	else if(str[0]=='#'){
-		if(lstrcmpi(str,"#include")==0) return -1;
-		if(lstrcmpi(str,"#strict")==0) return -1;
-		if(lstrcmpi(str,"#console")==0) return -1;
-		if(lstrcmpi(str,"#prompt")==0) return -1;
-		if(lstrcmpi(str,"#N88BASIC")==0) return -1;
-		if(lstrcmpi(str,"#define")==0) return -1;
-		if(lstrcmpi(str,"#ifdef")==0) return -1;
-		if(lstrcmpi(str,"#ifndef")==0) return -1;
-		if(lstrcmpi(str,"#else")==0) return -1;
-		if(lstrcmpi(str,"#endif")==0) return -1;
-	}
-	return 0;
-}
-
 HBITMAP CreateGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2){
 	//グラデーションビットマップを生成
Index: trunk/ab5.0/abdev/abdev/TextEditor.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/TextEditor.cpp	(revision 663)
+++ trunk/ab5.0/abdev/abdev/TextEditor.cpp	(revision 681)
@@ -109,14 +109,14 @@
 			}
 
-			BOOL bResult=0;
-			if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC){
-				i3=IsBasicReservedWord(str);
-				bResult=IsManagementCommand(i3);
+			bool result = false;
+			if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC)
+			{
+				result = ActiveBasic::IDE::Program::ablang->IsExistKeyword( str );
 			}
 			else if(MdiInfo[WndNum]->DocType==WNDTYPE_HTML){
-				bResult=IsHtmlReservedWord(str);
-			}
-
-			if(bResult){
+				result=IsHtmlReservedWord(str);
+			}
+
+			if(result){
 				for(i3=i-i2;i3<i;i3++){
 					MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i3]=tci.rgbStatement;
@@ -132,5 +132,6 @@
 		}
 		else{
-			if(IsStr||pBuf[i]=='\"'&&IsStr==0){
+			if( IsStr || ActiveBasic::IDE::Program::ablang->IsQuoteMark( pBuf[i] ) && IsStr == 0 )
+			{
 				//文字列カラー（""で囲まれる範囲）
 				MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]=tci.rgbString;
@@ -142,5 +143,8 @@
 		}
 
-		if(pBuf[i]=='\"') IsStr^=1;
+		if( ActiveBasic::IDE::Program::ablang->IsQuoteMark( pBuf[i] ) )
+		{
+			IsStr^=1;
+		}
 
 		if(pBuf[i]=='\r'&&pBuf[i+1]=='\n'){
Index: trunk/ab5.0/abdev/abdev/abdev.vcproj
===================================================================
--- trunk/ab5.0/abdev/abdev/abdev.vcproj	(revision 663)
+++ trunk/ab5.0/abdev/abdev/abdev.vcproj	(revision 681)
@@ -51,5 +51,5 @@
 				InlineFunctionExpansion="1"
 				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;THETEXT;WINVER=0x0501;_WIN32_WINNT=0x0501"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;THETEXT;WINVER=0x0501;_WIN32_WINNT=0x0501;TIXML_USE_STL"
 				StringPooling="false"
 				RuntimeLibrary="0"
@@ -78,5 +78,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib tinyxml_STL.lib"
 				OutputFile="../TheText/TheText.exe"
 				LinkIncremental="1"
@@ -150,5 +150,5 @@
 				Optimization="0"
 				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;WINVER=0x0501;_WIN32_WINNT=0x0501"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;WINVER=0x0501;_WIN32_WINNT=0x0501;TIXML_USE_STL"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -177,5 +177,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib tinyxmld_STL.lib"
 				OutputFile="$(OutDir)\abdev.exe"
 				LinkIncremental="2"
@@ -251,5 +251,5 @@
 				InlineFunctionExpansion="1"
 				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;WINVER=0x0501;_WIN32_WINNT=0x0501"
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;JPN;WINVER=0x0501;_WIN32_WINNT=0x0501;TIXML_USE_STL"
 				StringPooling="true"
 				RuntimeLibrary="0"
@@ -277,5 +277,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib tinyxml_STL.lib"
 				OutputFile="$(OutDir)\abdev.exe"
 				LinkIncremental="1"
@@ -349,5 +349,5 @@
 				Optimization="0"
 				AdditionalIncludeDirectories="..\..\;..\..\cpplibs\boost;..\..\cpplibs\WTL80\include;.\include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;THETEXT;WINVER=0x0501;_WIN32_WINNT=0x0501"
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;JPN;THETEXT;WINVER=0x0501;_WIN32_WINNT=0x0501;TIXML_USE_STL"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
@@ -376,5 +376,5 @@
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib"
+				AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib imm32.lib htmlhelp.lib rpcrt4.lib imagehlp.lib tinyxmld_STL.lib"
 				OutputFile="../TheText/TheText.exe"
 				LinkIncremental="2"
@@ -438,4 +438,12 @@
 					<File
 						RelativePath=".\src\WindowComponents\PartialManager\TextEditPartialManager.cpp"
+						>
+					</File>
+				</Filter>
+				<Filter
+					Name="CodeEditor"
+					>
+					<File
+						RelativePath=".\src\WindowComponents\CodeEditor\Syntax.cpp"
 						>
 					</File>
@@ -2781,4 +2789,12 @@
 					Name="MdiChildFrame"
 					>
+				</Filter>
+				<Filter
+					Name="CodeEditor"
+					>
+					<File
+						RelativePath=".\include\WindowComponents\CodeEditor\Syntax.h"
+						>
+					</File>
 				</Filter>
 			</Filter>
Index: trunk/ab5.0/abdev/abdev/include/Program.h
===================================================================
--- trunk/ab5.0/abdev/abdev/include/Program.h	(revision 663)
+++ trunk/ab5.0/abdev/abdev/include/Program.h	(revision 681)
@@ -9,6 +9,10 @@
 	static void InitializeWindow();
 public:
+	static CAppModule _Module;
 	static MainFrame mainFrame;
-	static CAppModule _Module;
+	static WindowComponents::CodeEditor::Languages languages;
+
+	// 一時的な対処
+	static const WindowComponents::CodeEditor::Language *ablang;
 
 	static void Main();
Index: trunk/ab5.0/abdev/abdev/include/WindowComponents/CodeEditor/Syntax.h
===================================================================
--- trunk/ab5.0/abdev/abdev/include/WindowComponents/CodeEditor/Syntax.h	(revision 681)
+++ trunk/ab5.0/abdev/abdev/include/WindowComponents/CodeEditor/Syntax.h	(revision 681)
@@ -0,0 +1,50 @@
+#pragma once
+
+namespace ActiveBasic{ namespace IDE{ namespace WindowComponents{ namespace CodeEditor{
+
+
+struct ReservedKeywordWithQuickHelp
+{
+	std::string keyword;
+	std::string quickHelp;
+};
+typedef std::vector<ReservedKeywordWithQuickHelp> ReservedKeywordsWithQuickHelp;
+struct Syntax
+{
+	std::string commentSingle;
+	std::string commentMultiBegin;
+	std::string commentMultiEnd;
+	Jenga::Common::Strings quoteMarks;
+	Jenga::Common::Strings reservedSimpleKeywords;
+	ReservedKeywordsWithQuickHelp reservedKeywordsWithQuickHelp;
+};
+class Language
+{
+	std::string name;
+	Syntax syntax;
+public:
+	const std::string &GetName() const
+	{
+		return name;
+	}
+	const Syntax &GetSyntax() const
+	{
+		return syntax;
+	}
+
+	void Load( const TiXmlDocument &doc );
+	bool IsExistKeyword( const std::string &keyword ) const;
+	bool IsExistReservedKeywordWithQuickHelp( const std::string &keyword ) const;
+	const std::string &GetReservedKeywordWithQuickHelp( const std::string &keyword ) const;
+	bool IsQuoteMark( char c ) const;
+};
+class Languages
+	: public std::map<std::string, Language>
+{
+	void Add( const std::string &xmlPath );
+public:
+	void LoadFiles( const std::string &dirPath );
+};
+
+
+}}}}
Index: trunk/ab5.0/abdev/abdev/src/Program.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/Program.cpp	(revision 663)
+++ trunk/ab5.0/abdev/abdev/src/Program.cpp	(revision 681)
@@ -7,4 +7,6 @@
 
 MainFrame ActiveBasic::IDE::Program::mainFrame;
+WindowComponents::CodeEditor::Languages ActiveBasic::IDE::Program::languages;
+const WindowComponents::CodeEditor::Language *ActiveBasic::IDE::Program::ablang;
 
 #include "../Common.h"
@@ -32,4 +34,8 @@
     _Module.AddMessageLoop( &loop );
 
+	// syntaxを読み込む
+	languages.LoadFiles( ActiveBasic::Common::Environment::GetAbdevSystemDirPath() + "\\ide\\syntax" );
+	ablang = &languages["ab"];
+
 	// ウィンドウを初期化
 	InitializeWindow();
Index: trunk/ab5.0/abdev/abdev/src/WindowComponents/CodeEditor/Syntax.cpp
===================================================================
--- trunk/ab5.0/abdev/abdev/src/WindowComponents/CodeEditor/Syntax.cpp	(revision 681)
+++ trunk/ab5.0/abdev/abdev/src/WindowComponents/CodeEditor/Syntax.cpp	(revision 681)
@@ -0,0 +1,121 @@
+#include "stdafx.h"
+
+using namespace ActiveBasic::IDE::WindowComponents::CodeEditor;
+
+void Language::Load( const TiXmlDocument &doc )
+{
+	const TiXmlElement* root = doc.FirstChild( "language" )->ToElement();
+
+	// 言語名を取得
+	this->name = root->FirstChild( "name" )->FirstChild()->Value();
+
+	// Syntaxタグを解析
+	const TiXmlElement* syntaxElement = root->FirstChild( "syntax" )->ToElement();
+	this->syntax.commentSingle = syntaxElement->FirstChild( "commentSingle" )->FirstChild()->Value();
+	this->syntax.commentMultiBegin = syntaxElement->FirstChild( "commentMulti" )->FirstChild( "begin" )->FirstChild()->Value();
+	this->syntax.commentMultiEnd = syntaxElement->FirstChild( "commentMulti" )->FirstChild( "end" )->FirstChild()->Value();
+	{
+		const TiXmlElement* element = syntaxElement->FirstChild( "quoteMarks" )->FirstChild( "item" )->ToElement();
+		while( element )
+		{
+			this->syntax.quoteMarks.push_back( element->FirstChild()->Value() );
+			element = element->NextSibling() ? element->NextSibling()->ToElement() : NULL;
+		}
+	}
+	{
+		const TiXmlElement* element = syntaxElement->FirstChild( "reservedSimpleKeywords" )->FirstChild( "item" )->ToElement();
+		while( element )
+		{
+			this->syntax.reservedSimpleKeywords.push_back( element->FirstChild()->Value() );
+			element = element->NextSibling() ? element->NextSibling()->ToElement() : NULL;
+		}
+	}
+	{
+		const TiXmlElement* element = syntaxElement->FirstChild( "reservedKeywordsWithQuickHelp" )->FirstChild( "item" )->ToElement();
+		while( element )
+		{
+			ReservedKeywordWithQuickHelp temp;
+			temp.keyword = element->FirstChild( "keyword" )->FirstChild()->Value();
+			temp.quickHelp = element->FirstChild( "quickHelp" )->FirstChild()->Value();
+			this->syntax.reservedKeywordsWithQuickHelp.push_back( temp );
+			element = element->NextSibling() ? element->NextSibling()->ToElement() : NULL;
+		}
+	}
+}
+
+bool Language::IsExistKeyword( const std::string &keyword ) const
+{
+	if( Jenga::Common::IsExistString( this->syntax.reservedSimpleKeywords, keyword )
+		|| this->IsExistReservedKeywordWithQuickHelp( keyword ) )
+	{
+		return true;
+	}
+
+	return false;
+}
+
+bool Language::IsExistReservedKeywordWithQuickHelp( const std::string &keyword ) const
+{
+	BOOST_FOREACH( const ReservedKeywordWithQuickHelp &item, syntax.reservedKeywordsWithQuickHelp )
+	{
+		if( item.keyword == keyword )
+		{
+			return true;
+		}
+	}
+
+	return false;
+}
+
+const std::string &Language::GetReservedKeywordWithQuickHelp( const std::string &keyword ) const
+{
+	BOOST_FOREACH( const ReservedKeywordWithQuickHelp &item, syntax.reservedKeywordsWithQuickHelp )
+	{
+		if( item.keyword == keyword )
+		{
+			return item.quickHelp;
+		}
+	}
+
+	throw;
+}
+
+bool Language::IsQuoteMark( char c ) const
+{
+	BOOST_FOREACH( const std::string &quoteMark, syntax.quoteMarks )
+	{
+		if( quoteMark.size() == 1 && c == quoteMark[0] )
+		{
+			return true;
+		}
+	}
+	return false;
+}
+
+void Languages::Add( const std::string &xmlPath )
+{
+	Language language;
+	try
+	{
+		TiXmlDocument doc( xmlPath );
+		doc.LoadFile();
+
+		language.Load( doc );
+
+		(*this)[language.GetName()] = language;
+	}
+	catch( ... )
+	{
+	}
+}
+
+void Languages::LoadFiles( const std::string &dirPath )
+{
+	Jenga::Common::Strings results;
+	Jenga::Common::Directory dir( dirPath );
+	dir.SearchFiles( results, "*.xml" );
+	BOOST_FOREACH( const std::string &xmlPath, results )
+	{
+		this->Add( xmlPath );
+	}
+}
Index: trunk/ab5.0/abdev/abdev/stdafx.h
===================================================================
--- trunk/ab5.0/abdev/abdev/stdafx.h	(revision 663)
+++ trunk/ab5.0/abdev/abdev/stdafx.h	(revision 681)
@@ -35,4 +35,7 @@
 #include <boost/thread/thread.hpp>
 
+// tinyxml
+#include <tinyxml/tinyxml.h>
+
 #include <jenga/include/jenga.h>
 
@@ -45,4 +48,5 @@
 #endif
 
+#include <WindowComponents/CodeEditor/Syntax.h>
 #include <WindowComponents/BaseWindow.h>
 #include <WindowComponents/MdiChild.h>
