• 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

Twitter Feed

Tweets by @Actipro

Month List

  • 2013
    • June (3)
    • May (7)
    • April (7)
    • March (9)
    • February (2)
    • January (7)
  • 2012
    • December (4)
    • November (7)
    • October (5)
    • September (7)
    • August (5)
    • July (9)
    • June (11)
    • May (12)
    • 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 (406)
  • RSS feed for AppsApps (8)
  • RSS feed for Blog SummaryBlog Summary (19)
  • RSS feed for Customer ShowcaseCustomer Showcase (1)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (198)
  • RSS feed for New featuresNew features (211)
  • RSS feed for New productNew product (56)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (146)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (28)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (39)
  • RSS feed for WPFWPF (318)
  • RSS feed for XAMLXAML (34)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, WinRT XAML, 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 2011.1 Updates Part 1: Introduction

January 14, 2011 at 9:26 AM
by Bill Henning (Actipro)

PostBannerSyntaxEditorDevNotes

As we’ve been posting, a large piece of the upcoming 2011.1 round of releases will be the first public beta of the SyntaxEditor .NET Languages Add-on for WPF and Silverlight.  This add-on contains advanced syntax language implementations for C# and VB that improves the SyntaxEditor code editing experience of those languages for end users.  While the first beta won’t yet have automated IntelliPrompt (that is coming in the future), it will have complete background parsing of C#/VB code into full ASTs, reporting of syntax errors, and automatic outlining.

The add-on is a massive undertaking, even with the advanced LL(*) Parser Framework that comes with SyntaxEditor for WPF and Silverlight.  The good thing for our customers is that it has also driven a number of wonderful enhancements into the LL(*) Parser Framework.  These enhancements will be the focus of the next several blog posts, since they will be fully available to anyone developing custom grammars using our framework.

Blog Post Series

These posts will be included in this multi-part series:

  • Part 1: Introduction
  • Part 2: New Language Designer Features
  • Part 3: Tree Construction Enhancements
  • Part 4: Can-Match Callback and Error Reporting Enhancements

All the features discussed here are currently in closed beta testing, but will be available with the release of WPF Studio and Silverlight Studio 2011.1 in the coming weeks. 

LL(*) Parser Framework

If you aren’t familiar with our free parser framework that is available with the WPF and Silverlight SyntaxEditor products, please read through our original series of posts that discuss what it is and how it works.  It combines the best concepts from other parser frameworks such as ANTLR, MGrammar, and Irony with our own ideas and the result is a very innovative grammar design where you write your grammar directly in C#/VB code.

A grammar is a set of rules that describe how to parse a language’s code.  In the case of our parser framework, we use this grammar to output an AST (abstract syntax tree) of the document and report syntax errors to the end user.

Both our Web Languages Add-on and .NET Languages Add-on use this core grammar-based parser framework as the foundation of their parsers.

Type-Specific AST Nodes

The original iterations of the parser framework made it easy to generate a completely generic sort of AST node, where each node had a string value and optional child nodes.  This works great and the XML parser in our Web Languages Add-on uses this setup very successfully.

When we got to designing the grammars for C# and VB though, we wanted to have type-specific AST nodes, meaning a distinct .NET class for each type of AST node.

Take this snippet of C# for example, a simple class declaration:

   1: class Foo {}

With the default AST nodes, a resulting AST would be something like:

   1: ClassDeclaration[
   2:     Name[
   3:         "Foo"
   4:     ]
   5: ]

You can imagine how large the AST grows as you get into much more complex code since an AST node is typically used to describe the context of its contained nodes.

Now instead, assume we have a class called ClassDeclaration like this:

   1: class ClassDeclaration : AstNodeBase {
   2:     public string Name { get; set; }
   3:     ...    
   4: }

What we set out to do was make it so our grammar could create an instance of ClassDeclaration and assign the value Foo to its Name property.  So instead of having three simple nodes, we have one type-specific node with a property set.

A benefit of type-specific nodes is that since they are .NET classes, you can fully extend them with partial classes, etc., thereby adding helper methods or other features to them.

Next Steps

As we’ll show over the next few posts, we’ve enhanced our grammar syntax to support both the default simple node creation as well as type-specific node creation.  You have the ability to choose which you’d prefer to use, and can even use them together.  The default simple nodes get you up and going very fast but you may find that you want to harness the power of type-specific nodes instead.

In the next post, we’re going to look at Language Designer application enhancements that help support type-specific AST nodes, which includes complete AST node class generation.

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

Related posts

SyntaxEditor 2011.1 Updates Part 3: Tree Construction Enhancements This post continues our series on new features coming to SyntaxEditor 2011.1, primarily centered a...SyntaxEditor 2011.1 Updates Part 4: Can-Match Callback and Error Reporting Enhancements This post continues our series on new features coming to SyntaxEditor 2011.1, primarily centered a...SyntaxEditor grammar/AST framework part 3: Creating a grammar for the Simple languageIn the previous post we gave a detailed introduction to symbols, EBNF terms, and how you can transla...

Comments

January 14, 2011 at 09:30  

trackback

SyntaxEditor 2011.1 Updates Part 1: Introduction

You've been kicked (a good thing) - Trackback from DotNetKicks.com

DotNetKicks.com

January 14, 2011 at 11:58  

Jesper

It seems like this will have been worth waiting for.

Jesper Sweden

January 20, 2011 at 07:59  

pingback

Pingback from topsy.com

Twitter Trackbacks for
        
        SyntaxEditor 2011.1 Updates Part 1: Introduction
        [actiprosoftware.com]
        on Topsy.com

topsy.com

April 7, 2011 at 10:21  

trackback

Actipro Blog 2011 Q1 Posting Summary

Actipro Blog 2011 Q1 Posting Summary

The Actipro Blog - WPF, Silverlight, and WinForms Development

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