comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh+bauhaus@maps.futureapps.de>
Subject: Re: Wide Finder in Ada?
Date: Mon, 12 Nov 2007 11:54:19 +0100
Date: 2007-11-12T11:54:19+01:00	[thread overview]
Message-ID: <1194864859.6298.8.camel@K72> (raw)
In-Reply-To: <47380779$1@news.post.ch>


On Mon, 2007-11-12 at 08:57 +0100, Martin Krischik wrote:

> 1.1 Search for %r{GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+) }

> 
> First improvement would be the use of Splitbool instead of regular
> expressions.

Do you mean SPITBOL? In this case, here is a simple and quick way to
to the pattern extraction (the ' 'sentinel  at the end of each
line might not be necessary or worked around or it doesn't
matter if it can be set by some Input).

        digit = any('0123456789')
        D2 = digit digit
        D3 = digit D2
        D4 = digit D3

* results table
        counts = table()

* read lines, find pages, and record hits

L       line = input                            :f(done)
        line = line ' '
        line ? 'GET ' fence '/ongoing/When/' D3 'x/'
.               (D4 '/' D2 '/' D2 '/' break(' .')) . word
.                                               :f(L)
        counts[word] = counts[word] + 1         :(L)
done





      parent reply	other threads:[~2007-11-12 10:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12  1:37 Wide Finder in Ada? braver
2007-11-12  7:57 ` Martin Krischik
2007-11-12  9:55   ` braver
2007-11-12 19:11     ` Martin Krischik
2007-11-12 10:54   ` Georg Bauhaus [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox