The IronMeta parser generator provides an application for generating pattern matchers on arbitrary streams of objects. It is an implementation of Alessandro Warth's OMeta system in C#. The extension provides a custom tool for generating IronMeta parsers.
The IronMeta parser generator provides a programming language and application for generating pattern matchers on arbitrary streams of objects. It is an implementation of Alessandro Warth's OMeta system in C#.
Although the most common use for IronMeta is to build parsers on streams of text for use in compiling or other text processing, IronMeta can generate pattern matchers (more accurately, transducers) for any input and output type. You can use C# syntax directly in grammar rules to specify objects to match.
IronMeta-generated parsers use strict Parsing Expression Grammar semantics; they are greedy and use ordered choice.
Generated parsers are implemented as C# partial classes, allowing you to keep ancillary code in a separate file from your grammar.
You can use anonymously-typed object literals in rules; they are matched by comparing their properties with the input objects'.
Unrestricted use of C# in semantic conditions and match actions.
Higher-order rules: you can pass rules as parameters, and then use them in a pattern.
Pattern matching on rule arguments: you can apply different rule bodies depending on the number and types of parameters.
Flexible variables: variables in an IronMeta rule may be used to:
get the input of an expression they are bound to.
get the result or result list of an expression they are bound to.
match a rule passed as a parameter.
pass a rule on to another rule.
As an enhancement over the base OMeta, IronMeta allows direct and indirect left recursion, using Sergio Medeiros et al's algorithm for all rules, even within parameter matching.