TinyPG (Tiny Parser Generator) is a small simple LL(1) recursive descent parser generator that generates C# or VB code from a simple grammar. It was written by Herre Kuijpers.
There is much more to read at the CodeProject page for TinyPg. Here is the introduction
@TinyPG stands for "a Tiny Parser Generator". This particular generator is an LL(1) recursive descent parser generator. This means that instead of generating a state machine out of a grammar like most compiler compilers, it will generate source code directly; basically generating a method for each non-terminal in the grammar. Terminals are expressed using .NET's powerful Regular Expressions. To help the programmer create .NET Regular Expressions, a Regular Expression (Regex) tool is embedded in TinyPG. Grammars can be written using the extended BNF notation.
These are the key features of TinyPG:
- Provides syntax and semantics checking of the grammar
- Generates a tiny set of sources for the parser/scanner/parsetree (just three .cs or .vb files without any external dependencies)
- Allows each generated file to remain clearly human readable, and debuggable with Visual Studio(!)
- Includes an expression evaluation tool that generates a traversable parse tree has the option to include C# code blocks
- Inside the grammar, adding immediate functionality with just a few lines of code
- Includes a tiny regular expression tool tries to keep things as simple and tiny as possible