IronMeta is an implementation of Alessandro Warth's OMeta metaprogramming system in C#. It provides a packrat parser generator that generates parsers for Parsing Expression Grammars that operate on arbitrary streams of objects.
Features
- Now available via NuGet.
- 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 use ordered choice, are greedy and do not backtrack through productions.
- Generated parsers are implemented as C# partial classes, allowing you to keep ancillary code in a separate file from your grammar.
- 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 unlimited left-recursion, using Sergio Queiroz de Medeiros's unpublished algorithm for all rules, even within parameter matching.
License
BSD LicenseFollow IronMeta
You Might Also Like
Rate This Project
Login To Rate This Project
User Reviews
-
Thanks for Ironmeta, it's wonderful!
-
most usable between 3 implementations of OMeta for C# that i know)