Leaving Microsoft, Blog Moving to EricWhite.com

Due to personal obligations (moving away from Seattle) it is with sadness that I’m announcing that I’m leaving Microsoft.  My last day at Microsoft will be January 21.  This will be the last post on this blog.  I will be commencing to blog at EricWhite.com/blog.  Here is what I’m planning for the near future on…


Building a Simple Recursive Descent Parser (Completed Simple Parser)

In this post, I complete the recursive descent parser that will parse the simple grammar that I presented previously in this series.  In this post, I’ll examine in detail the NospaceExpression class, which needs to implement operator precedence. This blog is inactive.New blog: EricWhite.com/blog Blog TOCNote:  I have to apologize for the delay in writing…


Building a Simple Recursive Descent Parser (continued)

In this post, I further enhance the recursive descent parser that will parse the simple grammar that I presented previously in this series.  I’ll examine some more classes that represent symbols in that grammar.  The classes I present in this post further show how it’s possible to write LINQ code that closely parallels the grammar….


Building a Simple Recursive Descent Parser

In this post, I present the start of a recursive descent parser that will parse the simple grammar that I presented previously in this series.  I’ll point out some key features of the code so that it is easy to see how the code works. This blog is inactive.New blog: EricWhite.com/blog Blog TOCThis post is…


Table Markup in Open XML SpreadsheetML

Tables are a feature in Open XML spreadsheets that allow you to interact with data more like a database.  You can select a region and convert it to a table.  Most Excel aficionados are familiar with this feature.  It is very useful. This blog is inactive.New blog: EricWhite.com/blog Blog TOC  In a previous post, Using…


Creating a Collection from Singletons and Collections using LINQ

A key operation when doing pure functional transformations is the process of creating complex hierarchies of objects.  We see this when transforming some data source (such as an Open XML WordprocessingML document) to a LINQ to XML tree, and we see this when writing a recursive descent parser.  The recursive descent parser for Excel formulas…


Recursive Descent Parser: A Simple Grammar

To learn how recursive descent parsers work, it is helpful to implement a very simple grammar, so for pedagogical purposes, I’ve defined a grammar for simple arithmetic expressions. The parser will construct a syntax tree from expressions that we can then examine as necessary. Just for fun, after implementing the parser, we will write a…


Recursive Descent Parser using LINQ: The Augmented Backus-Naur Form Grammar

[Blog Map]  This blog is inactive.  New blog: EricWhite.com/blog A grammar is a device to define syntax for a language.  A grammar is made up of rules, sometimes called productions.  Each rule defines a symbol, when can then be further used in other rules.  Grammars are not hard to understand; most developers instinctively understand grammars when they…


Processing all Content Parts in an Open XML WordprocessingML Document

In Open XML WordprocessingML documents, there are five types of parts that can contain content such as paragraphs (with or without tracked revisions), tables, rows, cells, and any of a variety of content controls: This blog is inactive.New blog: EricWhite.com/blog Blog TOCMain document part Header parts (there can be more than one) Footer parts (there…


Writing a Recursive Descent Parser using C# and LINQ

Recursive descent parsers are one of the easier types of parsers to implement.  Given a properly defined grammar, you write a class for each production in the grammar, and you write one fairly simple method in each class.  Each of those methods returns a ‘production’ based on its source productions (tokens) passed to it.  Once…