There are several options for implementing a language service for the Visual Studio core editor. One option requires the implementation of the IVsLanguageInfo interface and related interfaces in a VSPackage (see Checklist: Creating a Language Service). A second option is to implement a managed package framework language service (see Managed-Code Language Services with the MPF).
Two more options for implementing a language service require the use of the Babel Package and the IBabelService Interface interface. The Babel options are as follows.
Implement the IBabelService Interface interface directly.
The Babel Package is an unmanaged Visual C++ helper implementation framework, which allows you to implement a language service in Visual Studio without following the lengthy process of implementing the core language service interfaces directly. By implementing the IBabelService Interface interface, you do not have to implement the core language service interfaces but you still have full control over how source code is parsed. For example, you can use the same parser that is implemented in your language's compiler. Just implement the IBabelService::ParseSource Method and IBabelService::ColorLine Method methods in the IBabelService interface to work with your parser. Depending upon how your compiler is designed, this approach can require minimal developer resources and time. For more information, see Implementing the IBabelService Interface.
This option has the added benefit of using your existing parser for the compiler and the language service, thus ensuring that they are kept in sync.
Use a default implementation of IBabelService Interface.
The default implementation of IBabelService Interface only requires that you provide a lexical and grammar specification for your parser. This implementation requires nominal developer resources, and can be completed in about a day (for more information, see Using the Default Babel Implementation). The default implementation requires a second parser that is built using lexer and parser tools such as lex and yacc (or the open source versions, flex and bison) to create the parser.
For this option, the parser used by the compiler is separate from the parser that is used by the language service, so you need to be sure that both parsers are kept in sync.
The Visual Studio Language Service Wizard uses the default implementation.