00001
00002
00003
00004
00005
00006
00007
00008 #include "service.h"
00009 #include "parser.hpp"
00010
00011
00012
00013
00014 const char* g_languageName = "YABSL Behavior Language";
00015 const char* g_languageFileExtensions[] = { ".yabsl", ".api", NULL };
00016 const CLSID g_languageCLSID = {0xA1B0A1B0,0xCAFE,0xBABE,{0xA1,0xB0,0xA1,0xB0,0xCA,0xFE,0xBA,0xBE}};
00017
00018 const LanguageProperty g_languageProperties[] =
00019 {
00020 { "RequestStockColors", 1 },
00021 { "ShowCompletion", 1 },
00022
00023 { "CodeSense", 1 },
00024 { "CodeSenseDelay", 1500 },
00025 { "MaxErrorMessages", 5 },
00026 { "QuickInfo", 1 },
00027 { "MatchBraces", 1 },
00028 { "SortMemberList", 1 },
00029 { "ShowMatchingBrace", 0 },
00030 { "MatchBracesAtCaret", 0 },
00031
00032 { NULL, 0 }
00033 };
00034
00035
00036
00037
00038 HRESULT CreateBabelService( out IBabelService** babelService )
00039 {
00040 TRACE("CreateBabelService");
00041 OUTARG(babelService);
00042
00043 *babelService = new Service();
00044 if (*babelService == NULL) return E_OUTOFMEMORY;
00045
00046 return S_OK;
00047 }
00048
00049
00050
00051
00052
00053
00054 override const TokenInfo* Service::getTokenInfo() const
00055 {
00056 static TokenInfo tokenInfoTable[] =
00057 {
00058
00059 { KEYWORD, ClassKeyword, "keyword ('%s')", CharKeyword },
00060 { IDENTIFIER, ClassIdentifier, "identifier '%s'", CharIdentifier },
00061 { NUMBER, ClassNumber, "number ('%s')", CharLiteral },
00062 { ';', ClassText, "';'", CharDelimiter },
00063
00064 { LEX_WHITE, ClassText, "white space", CharWhiteSpace },
00065 { LEX_LINE_COMMENT, ClassComment,"comment", CharLineComment },
00066 { LEX_COMMENT, ClassComment, "comment", CharComment },
00067
00068
00069 { TokenEnd, ClassText, "<unknown>" }
00070 };
00071
00072 return tokenInfoTable;
00073 };