• Products
  • Download
  • Purchase
  • Support
  • Company
Actipro Software company logo
Twitter Follow Actipro RSS Subscribe (RSS Feed)

The Actipro Blog

Tag Cloud

  • aero
  • blog
  • docking
  • editors
  • gauge
  • intelliprompt
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • views
  • winforms
  • wpf

Latest Twitter News

November 21, 2011 at 11:14 AM
#WPF Studio 2011.2 is out now! Includes enhanced themes for native WPF conrtols and new SyntaxEditor features. http://t.co/uEMCaGPG

September 26, 2011 at 1:25 PM
If you'd like to see our #WPF / #Silverlight SyntaxEditor code editor control ported to Metro, provide feedback here: http://t.co/xXBNIDTi

September 15, 2011 at 8:31 PM
If you want to see SyntaxEditor eventually show up in Win8's #xaml UI, be sure to add your support to this MS thread: http://t.co/FBjz6TuC

August 15, 2011 at 1:47 PM
New SyntaxEditor IntelliPrompt parameter info feature docs/samples ready for the 2011.2 #WPF and #Silverlight releases. http://t.co/ezoYIjv

August 2, 2011 at 2:40 PM
First look at new automated IntelliPrompt parameter info coming to our C#/VB editor control in #WPF / #Silverlight http://t.co/CUz6O1T

Twitter Follow us on Twitter

Month List

  • 2012
    • February (3)
    • January (2)
  • 2011
    • December (2)
    • November (7)
    • October (2)
    • September (1)
    • August (5)
    • July (3)
    • June (6)
    • May (5)
    • April (8)
    • March (4)
    • February (5)
    • January (9)
  • 2010
    • December (9)
    • November (10)
    • October (4)
    • September (8)
    • August (12)
    • July (9)
    • June (7)
    • May (6)
    • April (7)
    • March (6)
    • February (6)
    • January (4)
  • 2009
    • December (2)
    • November (2)
    • October (12)
    • September (3)
    • August (11)
    • July (10)
    • June (6)
    • May (3)
    • April (7)
    • March (6)
    • February (8)
    • January (10)
  • 2008
    • December (10)
    • November (2)
    • October (3)
    • September (5)
    • August (5)
    • July (8)
    • June (4)
    • May (4)
    • April (10)
    • March (8)
    • February (1)
    • January (2)

Category List

  • RSS feed for ActiproActipro (289)
  • RSS feed for Blog SummaryBlog Summary (13)
  • RSS feed for GeneralGeneral (34)
  • RSS feed for In developmentIn development (150)
  • RSS feed for New featuresNew features (140)
  • RSS feed for New productNew product (30)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (71)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (20)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WPFWPF (235)
  • RSS feed for XAMLXAML (23)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, Silverlight, and WinForms frameworks, and is most well-known for their SyntaxEditor syntax-highlighting code editor control.

Please take some time to learn more about us and our product offerings.

SyntaxEditor for WPF Language Designer enhancements (part 3)

October 7, 2009 at 2:44 AM
by Bill Henning (Actipro)

In the previous post of this series we started the Language Designer and entered some high-level general properties about the language we’re going to create, which is ECMAScript.  Today we’re going to use a wizard to quickly create a dynamic lexer for our language.  With the features described below, we have specifically tried to make the generation of a new language as easy as possible for new customers.

Selecting a lexer type

A new language project doesn’t have a lexer defined.  When we click the Lexer button in the ribbon, the Lexer pane is opened.  We are presented with a Lexer Type sub-pane that allows us to choose the type of lexer to use.

LD3ChooseLexer

For our ECMAScript language sample, we’ll use a Dynamic lexer so select Dynamic in the radio button list and click the Change Lexer Type button.  This opens the New Dynamic Lexer Wizard. 

The New Dynamic Lexer Wizard

The New Dynamic Lexer Wizard is the fastest way to create a new lexer for a language.  It asks you a series of questions about your language and it generates a lexer for you.  This takes most of the guesswork out of creating a lexer from scratch and gets you a working lexer in minutes.

For our ECMAScript language, we’ll use some specifications found on the Mozilla web site for ECMAScript (http://www.mozilla.org/js/language/E262-3.pdf).

Overview

The first page that opens in the wizard is an overview.  It allows you to select whether to walk through the wizard to create a lexer or whether to just make an empty lexer instead.

Wiz1Overview

For this walkthrough we’ll choose the first option.

Line terminators and identifiers

This page asks whether line terminators are significant and asks for a general guideline on identifier syntax.

Wiz2Identifiers 

For ECMAScript we’ll choose that line terminators are significant and we’ll use standard identifier syntax.  Note that the output from this wizard is completely modifiable after the wizard completes.

Keywords

On this page, we paste in the list of keywords for the language and indicate their case sensitivity.

Wiz3Keywords

The wizard uses whitespace to delimit the keywords in the textbox.  This makes it easy to paste keywords directly from a table in a web page or PDF language specification.  The wizard will also auto-sort the keywords following completion.

Operators

On this page, operators for the language are pasted in.  A button can be used to auto-insert the most common operators used in most languages.  Also check which delimiters have special meaning in the language.

Wiz4Operators 

For ECMAScript, we’ve pasted in the operators listed in the language specification and marked that parenthesis, curly and square braces are all significant.

Strings (primary syntax)

On this page, we indicate the primary string syntax.

Wiz5StringsPrimary

For ECMAScript, we select double quotes with backslash escapes as the primary syntax.

Strings (alternate syntax)

On this page, we indicate the alternate string syntax.

Wiz6StringsAlternate

For ECMAScript, we select single quotes with backslash escapes as the alternate syntax.

Numbers

On this page we choose which number literal types to support.

Wiz7Numbers

For ECMAScript, we choose all integer, real, and hex numbers.

Comments

On the final wizard page, we input the syntax for comments.

Wiz8Comments

For ECMAScript, we choose // to start single-line comments and /* */ to be the multi-line comment delimiters.

Next steps

When we press the Finish button, a new dynamic lexer is initialized for us based on the language profile information we entered.  In the next post, we’ll examine what was created.  Stay tuned!

Tags: wpf, syntaxeditor
Filed under: Actipro, In development, WPF
Submit to DotNetKicks...
Permalink | Comments (2)

Related posts

SyntaxEditor for WPF Language Designer enhancements (part 1)Many customers of our WinForms and WPF SyntaxEditor controls have asked for an easy way to get start...SyntaxEditor for WPF Language Designer enhancements (part 2)This post is the second post in our series on upcoming enhancements to the SyntaxEditor for WPF Lang...SyntaxEditor for WPF Language Designer enhancements (part 7)In the previous post of this series we built the language project in the Language Designer, found th...

Comments

October 6, 2009 at 11:38  

Jose Simas

Hi,

Great series and the wizard is spot on, easy to use and it looks really well organized.

Jose

Jose Simas United Kingdom

January 1, 2010 at 22:48  

trackback

Actipro Blog 2009 Q4 posting summary

Actipro Blog 2009 Q4 posting summary

The Actipro Blog - WPF and WinForms Development

Comments are closed
Copyright © 1999-2012 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us