Regular Expression Language Service

At TechEd the VS Extensibility team held a “feature cook-off” where the audience was given choices of new features and the team had to code them live in 45 minutes.

One of the features chosen was a VS language service that recognized regular expressions and colored them according to a table.

This project is now available here.  (You have to log in to the GotDotNet workspaces area to get access).

A little about the project:

This VS language service is designed to run on Whidbey Beta 1 and you have to have the VSIP SDK for Whidbey Beta 1 in order for it to build.  This code relies upon new SDK libraries available only in Whidbey and is completely in managed code.  These libraries form a part of the Managed Package Framework and provide base class functionality and virtual methods for customization of the language service behavior.

The hard part of a language service still remains: a parser for your language.  This project demonstrates just how simple it is to get started and takes the complexity out of the integration with Visual Studio.

The original code of this project has just a few regular expressions in the table that will match upper case strings and color them green and lowercase letters are colored blue.

Feel free to take the code and play with it.  Have fun.

Allen