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

The Actipro Blog

Tag Cloud

  • blog
  • docking
  • editors
  • intelliprompt
  • micro charts
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • views
  • web site
  • winforms
  • winrt
  • wpf

Latest Twitter News

May 14, 2012 at 2:50 PM
IntelliPrompt code snippet features have been added to our VS-like code editor control for #WPF and #Silverlight. http://t.co/1IchOJrr

May 10, 2012 at 9:40 PM
Our new Micro Charts control products for #WPF and #Silverlight are out now. Come build some dashboards with them! http://t.co/EEERvff0

May 7, 2012 at 6:47 AM
Today we look at bar charts, for our upcoming #WPF, #Silverlight, and #WinRT Micro Charts product. http://t.co/gxHuPS6B

May 4, 2012 at 6:25 AM
See a gallery of micro area charts in our upcoming release for #WPF, #Silverlight, and #WinRT. http://t.co/qDXGwW8B

May 3, 2012 at 6:32 AM
See a variety of line charts that are easy to make with our upcoming #WPF, #Silverlight, #WinRT Micro Charts product. http://t.co/mbkX6tJd

Twitter Follow us on Twitter

Month List

  • 2012
    • May (9)
    • April (6)
    • March (11)
    • February (11)
    • 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 (321)
  • RSS feed for Blog SummaryBlog Summary (15)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (164)
  • RSS feed for New featuresNew features (155)
  • RSS feed for New productNew product (38)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (90)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (22)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (9)
  • RSS feed for WPFWPF (257)
  • 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 .NET Languages Add-on for WPF Progress

December 15, 2010 at 8:07 AM
by Bill Henning (Actipro)

PostBannerWPFStudioDevNotes3

ProductHeadingWPFSyntaxEditor

There has been a lot of customer interest in when the SyntaxEditor .NET Languages Add-on for WPF will be ready.  About a month ago we posted the general design stages that are needed to create the add-on.

Today I’d like to review some of the new features being added to our LL(*) Parser Framework and Language Designer in version 2011.1, and will also show some screens of the C# grammar in action. 

New Type-Specific AST Node Features

We’ve been plugging along on the C# grammar implementation.  Part of this work involved sidetracking to add more enhancements to the SyntaxEditor LL(*) Parser Framework.  A key new feature of these enhancements involves support for type-specific AST nodes.

The 2010.2 version supports AST nodes that implement IAstNode and our default tree constructors produce a default node type that has a string Value and can contain any other node as child nodes.  What we’ve done in the recent enhancements for 2011.1 is augment our AST construction syntax to support type-specific AST nodes as an alternative to the default AST node type. 

Type-specific nodes means that you actually have a class called CompilationUnit to represent your compilation unit, a class called ClassDeclaration to represent class declarations, etc.  Each type-specific node can have various get/set properties and collection properties.  So a ClassDeclaration class has a Modifiers property, a Name property, a Members property, etc.

Our enhancements to the LL(*) Parser Framework fully support creation of these type-specific AST nodes using similar syntax to how you currently perform tree construction.  It’s actually quite interesting how it all works and we’ll hopefully post some examples on the blog soon.  The best part is that you’ll be able to use all these features for your own custom language grammars too.

Language Designer Updates

Another related portion of updates is that our Language Designer app in version 2011.1 supports code generation of type-specific AST nodes.  You simply configure a few details about the type, its properties, and we do the rest for you.  We’ve constructed all our AST nodes for the C# language using this new feature.

First Screens of the C# Grammar

As mentioned above, we’ve been working on the C# grammar while making the above enhancements at the same time.  Today we hit a first milestone of having the entire C# 4.0 specification implemented in our C# grammar.  This means it’s able to fully parse C# files into its type-specific AST model.

Here’s some statistics on what we’ve done so far:

  • Over 100 dedicated AST node classes created for use with the C#/VB grammars
  • Well over 100 terminals in the grammar
  • Well over 100 non-terminals in the grammar
Parsing a Compilation Unit

Let’s see a screenshot showing some C# code and a related AST:

CompUnit

Here we’ve created a small C# snippet with some invalid code.  You can see the text representation of the AST that was generated on the right showing that it did fully-parse.  You’ll also see a syntax error squiggle line.  By hovering over it we can see that the parser reported an identifier was expected at that location.

Parsing a LINQ Query Expression

One interesting feature with the new grammar design is that we allow you to choose your root non-terminal from options like compilation unit, expression, or query expression.  This feature has been requested by some of our customers.

QueryExp

In this screenshot we have set up our grammar to parse a query expression.  You can see the resulting AST’s text representation on the right.

Next Steps

Now that our AST model has been created and the C# grammar productions are working pretty well, the next steps will be to start setting up unit tests and implementing proper error handling in the grammar.  Error handling is important because most of the time, code in the editor will be in an invalid form.  So the parser needs to know how to properly recover from error scenarios and continue on if it can.

We’ll continue to post more about progress as we hit more milestones.

Tags: wpf, silverlight, syntaxeditor
Filed under: Actipro, In development, New product, New features, WPF, Silverlight
Submit to DotNetKicks...
Permalink | Comments (3)

Related posts

SyntaxEditor .NET Languages Add-on for WPF Progress - Part 2 Today I’d like to post a status update on the progress of the SyntaxEditor .NET Languages Add-on...Progress on a SyntaxEditor Web Languages Add-on for WPF and SilverlightAs mentioned in a previous post we have been working very hard on developing a custom grammar and AS...SyntaxEditor .NET Languages Add-on 2011.1 Progress Visual Basic Grammar We’ve made great progress on the Visual Basic grammar over the past couple w...

Comments

December 15, 2010 at 19:19  

Jesper

Very nice to see it coming along.

Jesper Sweden

December 16, 2010 at 13:17  

Bernie Schoch

Great work!  It would be useful to others who are implementatin their own languages, to document the particle special cases of error recovery i.e. what was the problem and why you choose to do it the way you did it by perhaps given examples as you come across them.

Bernie Schoch United States

January 3, 2011 at 02:16  

trackback

Actipro Blog 2010 Q4 posting summary

Actipro Blog 2010 Q4 posting summary

The Actipro Blog - WPF, Silverlight, and WinForms Development

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