On Thu, Aug 12, 2010 at 5:47 AM, Carl Mäsak <cma...@gmail.com> wrote:
> Oha (>): > > > * Grammars define a hierarchical structure that seems to be perfect > for encoding the packing of larger pieces of data, for example when > serializing an object structure. Could one use grammars, or something > very much like it, as a "modern" &pack template? > > A while back we had a fairly productive conversation about matching regexes on non-textual data: http://groups.google.com/group/perl.perl6.language/msg/24f23fdfc0c5d459?hl=en My proposal there is incomplete, but matching structured data (even if that structure is just a sequence of non-textual bytes) using rules definitely makes sense to me. The real question is: what is the least invasive way to do it? Modifying nqp for this purpose would, I think, not make sense. I think we'd need a pure Perl implementation of the rules engine that could match either text or data, and that's a gigantic undertaking. -- Aaron Sherman Email or GTalk: a...@ajs.com http://www.ajs.com/~ajs