Tuesday, 7 July 2009 05:20 by
Bill Henning (Actipro)
The SyntaxEditor for WPF product includes a Language Designer tool that helps you define some information about a syntax language and it generates C# or VB code for you that can be included in your project. The goal of the tool is to save you time, especially on tedious tasks related to building a language.
The current version of the tool, while helpful, still is nowhere near where we envision taking it. We have a lot of plans for it and in this post I’d like to reveal a prototype of one of the next features we hope to add in the future: the Language Template Builder.
The language template builder wizard
The concept of the new wizard is this. When starting to develop a new syntax language, you’d run this wizard. It would ask you some general questions about your language. After you finished the wizard, it would auto-generate some of the language project for you, based on your answers.
| The Line Terminators and Identifiers configuration page |
Above you can see a page that is asking about if line terminators are significant in your language and also, the general pattern for identifiers.
There are numerous other pages as well that cover everything from how numbers are formed, to multiple comment and string syntax specifications.
| The Strings (Primary Syntax) configuration page |
The screenshot above shows the wizard asking about the primary syntax for strings. Note how easy it is to quickly select how strings are formed, if delimiters can be escaped, and whether line terminators in a string terminate the string.
Lexical parser generation
The main goal behind this wizard is to make it simple to pop out a lexical parser definition and related classification types and highlighting styles, all of which are part of a language project.
A common question of our existing product is: what is the easiest way to get started building a language? We hope that with this new wizard we will be able to address that question directly by making it possible to build the foundation for a new language in a few minutes of work.
What would you like to see?
We are still prototyping out this wizard. But now is the perfect opportunity for you to voice your opinion. What features would you like to see added to it? Please post your comments if you have any suggestions. Thanks!