Deep Dive document download for the ManagedMyC sample included in the VS SDK.
Introduction This sample demonstrates how to use the Managed Babel System to create a simple language service with syntax colorization and brace matching. The language is called MyC since its syntax is a very simple version of the C language. While most of the languages services are generally written in C++ (this example itself is derived from the “MyC” example of the original unmanaged Babel distribution), this sample uses only true managed C# code. After reading this deep dive you are going to be familiar with the following concepts: What is the Managed Babel System? How to register a language service? How to create a language service class with the MPLex and MPPG tools? How to build up a language service with Managed Babel? How to configure syntax colorization? To understand concepts treated here it is assumed that you are familiar with the idea of VSPackages and you know how to build and register very simple (even non-functional) packages. To get more information about packages, please have a look at the Package Reference Sample (C# Reference.Package sample). This example also assumes that you are familiar with the most important concepts of computer language development like scanner, parser, abstract syntax tree, terminal and non-terminal tokens, etc. If you are not, this deep dive helps you to catch the main ideas and get a feeling about how language services look behind the scenes. However, to understand the code of this example in details you definitely need that knowledge.
|