Message from discussion
Run-length encoded input?
Received: by 10.50.214.102 with SMTP id nz6mr873774igc.4.1333806787695;
Sat, 07 Apr 2012 06:53:07 -0700 (PDT)
X-BeenThere: lepl@googlegroups.com
Received: by 10.231.50.210 with SMTP id a18ls2394896ibg.7.gmail; Sat, 07 Apr
2012 06:53:07 -0700 (PDT)
Received: by 10.50.41.138 with SMTP id f10mr947458igl.0.1333806787392;
Sat, 07 Apr 2012 06:53:07 -0700 (PDT)
Received: by 10.50.41.138 with SMTP id f10mr947457igl.0.1333806787383;
Sat, 07 Apr 2012 06:53:07 -0700 (PDT)
Return-Path: <and...@acooke.org>
Received: from smtp.webfaction.com (mail6.webfaction.com. [74.55.86.74])
by gmr-mx.google.com with ESMTP id t9si3465666igb.1.2012.04.07.06.53.07;
Sat, 07 Apr 2012 06:53:07 -0700 (PDT)
Received-SPF: neutral (google.com: 74.55.86.74 is neither permitted nor denied by best guess record for domain of and...@acooke.org) client-ip=74.55.86.74;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 74.55.86.74 is neither permitted nor denied by best guess record for domain of and...@acooke.org) smtp.mail=and...@acooke.org
Received: from acooke.org (190-21-131-167.baf.movistar.cl [190.21.131.167])
by smtp.webfaction.com (Postfix) with ESMTP id BD5C620B3221
for <lepl@googlegroups.com>; Sat, 7 Apr 2012 08:53:06 -0500 (CDT)
Received: by acooke.org (Postfix, from userid 1000)
id 53CCC60425; Sat, 7 Apr 2012 10:53:04 -0300 (CLST)
Date: Sat, 7 Apr 2012 10:53:04 -0300
From: andrew cooke <and...@acooke.org>
To: lepl@googlegroups.com
Subject: Re: [LEPL] Re: Run-length encoded input?
Message-ID: <20120407135304.GA9482@acooke.org>
References: <3174623.857.1333758988546.JavaMail.geo-discussion-forums@pbvs10>
<15492517.1421.1333759977791.JavaMail.geo-discussion-forums@yneo2>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <15492517.1421.1333759977791.JavaMail.geo-discussion-forums@yneo2>
User-Agent: Mutt/1.5.21 (2010-09-15)
I have a solution for this. It only works in a small number of cases (ie it
works for repetition, but it's not a general fix that makes Lepl more dynamic
everywhere), and I need to release a new minor version of Lepl to support it.
I probably won't have time to do that today (hosting a birthday party!), but
expect to do so tomorrow (Sunday).
Cheers,
Andrew
On Fri, Apr 06, 2012 at 05:52:57PM -0700, Andrew Cooke wrote:
>
> hmmm. that's a good question. unfortunately, i think the answer is no,
> it's not possible.
>
> it might be possible to hack something up. i'll have a think and get back
> to you sometime this weekend. but there is no simple, direct way of doing
> this that i can think of (i think there should be - this kind of thing is
> expected in a python library - but the way that lepl is implemented makes
> it difficult).
>
> sorry,
> andrew
>
>
> On Friday, April 6, 2012 9:36:28 PM UTC-3, maaku wrote:
> >
> > Hi, I hope someone can help me with this somewhat newb-ish question. I'm
> > trying to write a parser for a binary syntax that uses run-length encoding.
> > In essence, it looks like the following:
> >
> > lepl.UnsignedInteger & ~lepl.Literal(':') & lepl.Any()[LENGTH]
> >
> > Where LENGTH is the result of the matching UnsignedInteger. However I can
> > think of no way to make this value available at that position in the code.
> > Is this possible within LEPL?
> >
> > Kind regards,
> > Mark
> >
>
> --
> You received this message because you are subscribed to the Google Groups "lepl" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/lepl/-/ZOf41mgr9kgJ.
> To post to this group, send email to lepl@googlegroups.com.
> To unsubscribe from this group, send email to lepl+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/lepl?hl=en.
>