[Ann] Reg 0.4.5

C

Caleb Clausen

I am releasing 0.4.5 of Reg, a tool for pattern matching in arbitrary
ruby Object graphs. Reg includes tools that search for patterns in all
the important core data structures as well as tools for extending the
match criteria to include just about any ruby code you could want. Reg
provides matchers for Strings (via Regexps), Symbols, Hashes, and
several alternatives for matching Objects, but the main feature is the
ability to match Arrays of arbitrary ruby data using vaguely
Regexp-like syntax.

The interface to the above features is a mini-language that's embedded
directly in ruby because it does all its tricks with operator
overloading. I am not going to repost the syntax summary or examples
of this mini-language, since it's a couple pages and hasn't changed
from the last time. But let me say in brief that Reg attempts to
emulate both the obscurity and compact power of regular expressions.

(There was one error in the syntax summary in the first Reg
announcement. The descriptions of binary + and - were inverted.
Thanks to Pit Capitain for spotting it.)

In this release, the backtracking engine seems to be complete. At
least, all the test cases pass now. Documentation has been expanded,
but nowhere near what is needed. Many things have been renamed
internally (put in a namespace), but it shouldn't affect users (if
there are any) very much. For the most part, aliases are provided to
the old name. The one exception is the old Reg module, which is now
named Reg::Reg. (Beware if you had 'include Reg' in your class.)

Important features remain unimplemented at this point. There's still
no substitutions, backreferences, variable binding, item_that, or
lookahead. Users who wanted Reg for traditional lexing and parsing
tasks still need to look elsewhere. Few optimizations are done. And
vector Reg::And and Reg::Xor won't work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

[ANN] Reg - Ruby Extended Grammar 0.4.6 0
[ANN] Reg 0.4.8 Released 0
Announcing Reg 0.4.0 21
[ANN] rubyforge 0.4.5 Released 1
Reg Ex 6
ANN: Sequel 0.4.5 Released 0
reg exp 5
Minimum period: No path found 0

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top