comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.de>
Subject: Re: GNAT Spitbol segmentation fault
Date: Thu, 18 Jan 2007 15:32:12 +0100
Date: 2007-01-18T15:29:53+01:00	[thread overview]
Message-ID: <1169130732.20258.5.camel@localhost> (raw)
In-Reply-To: <5197nkF1jbsb0U1@mid.individual.net>

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

On Thu, 2007-01-18 at 13:33 +0100, Alex R. Mosteo wrote:
> Hello,
> 
> before filing a bug report I'd like to hear your opinion to rule out a
> mistake on my part. I'm using the excellent Gnat.Spitbol.Patterns package
> to extract some patterns from large bodies of text. I'm doing it with this
> scheme:
> 
> declare
>    Text   : aliased Vstring := <initial text>;
>    Target : aliased Vstring;

An ad hoc: I ran into trouble when forgetting to initialize
unbounded strings to the null string. Nul in the case of Target,
I think.

>    
>    Patt   : constant Pattern := Some_Patterns ** Target;
> begin
>    while Match (Text, Target, "") loop
                        Patt ?
>       --  This extracts a Target string and removes it from the text.
>       --  It doesn't matter if the surrounding text causes new aftermatches.
>       Do_Something_With (Target);
>    end loop;
> end;


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

  parent reply	other threads:[~2007-01-18 14:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18 12:33 GNAT Spitbol segmentation fault Alex R. Mosteo
2007-01-18 12:55 ` Jeffrey Creem
2007-01-18 17:00   ` Alex R. Mosteo
2007-02-01 10:36     ` Alex R. Mosteo
2007-01-18 14:32 ` Georg Bauhaus [this message]
2007-01-18 17:00   ` Alex R. Mosteo
2007-01-18 22:31 ` Simon Wright
2007-01-19  9:32   ` Alex R. Mosteo
replies disabled

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