[Parrot-users] Announcing Ωη;)XD
Peter Lobsinger
plobsing at gmail.com
Sun Feb 6 20:14:00 UTC 2011
First off, no I am not swearing at you. Ωη;)XD, pronounced
ohm-eta-wink-kzd or "ometa winxed", is a port of OMeta[1] to Parrot
using Winxed[2] as a host language.
After 2 months of on-and-off hacking, it is my pleasure to announce
that Ωη;)XD is of beta quality and is ready for use by early adopters.
Ωη;)XD can be obtained from its home at
https://github.com/plobsing/ohm-eta-wink-kzd, or from the latest
version of Plumage, Parrot's package management system.
OMeta, the system implemented by Ωη;)XD, is based on Parsing
Expression Grammars, which provide a form similar to Context Free
Grammars, but with semantics similar to Top Down Parsers. All this
means that these grammars can be written in a form familiar to users
of, for example, YACC, but the behaviour will be subtly different.
Parse::RecDescent[3] provides a good explanation of the difference
between top-down and bottom-up parsing.
OMeta augments PEGs in a number of ways in order to be more useful.
Some of these features are:
* Left-recursion support via Packrat Parsing, but with the means to
disable packratting in situations which would lead to undesirable
memory usage
* Object-oriented grammar support to allow augmenting of existing grammars
* Foreign grammar rule invocation to allow nesting of grammars
* Primitive destructuring bind, allowing arbitrary datastructure traversal
With these features, Ωη;)XD is quite useful as a parsing tool, but it
is also applicable beyond parsing. Destructuring bind support means it
is also useful for tools which require arbitrary list or tree
transformation. Examples of such tools include:
* macro expanders
* type checkers
* optimization passes
* instruction selection
Ωη;)XD is still young and of beta quality. A few known areas of weakness are:
* only a subset of Winxed syntax is supported
* parse errors when compiling grammars are reported by character
index (line/column reporting is planned)
[1] http://tinlizzie.org/ometa/
[2] http://code.google.com/p/winxed/
[3] http://search.cpan.org/~dconway/Parse-RecDescent-1.965001/lib/Parse/RecDescent.pm
More information about the Parrot-users
mailing list