Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Tools/Xabsl2/yabsl/vsyabsl/service.cpp

Go to the documentation of this file.
00001 
00002 /***************************************************************************
00003          Copyright (c) Microsoft Corporation, All rights reserved.             
00004     This code sample is provided "AS IS" without warranty of any kind, 
00005     it is not recommended for use in a production environment.
00006 ***************************************************************************/
00007 
00008 #include "service.h"
00009 #include "parser.hpp"
00010 
00011 /*---------------------------------------------------------
00012   Globals
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   Create Service
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   Tokens
00053 ---------------------------------------------------------*/
00054 override const TokenInfo* Service::getTokenInfo() const
00055 {
00056   static TokenInfo tokenInfoTable[] =
00057   {
00058     //TODO: add your own token information here
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     //always end with the 'TokenEnd' token.
00069     { TokenEnd,     ClassText,      "<unknown>" }
00070   };
00071 
00072   return tokenInfoTable;
00073 };

Generated on Mon Mar 20 22:00:10 2006 for GT2005 by doxygen 1.3.6