From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,aa0a204aba5ffa1 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: GNAT Spitbol segmentation fault Date: Thu, 18 Jan 2007 18:00:25 +0100 Message-ID: <519ncbF1i57o2U1@mid.individual.net> References: <5197nkF1jbsb0U1@mid.individual.net> <1169130732.20258.5.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net dnoS3tQ3ZfnznhKU0I9KmAP/BwKJ2jJ5wog//s23CovOo2/Ps= User-Agent: KNode/0.10.4 Xref: g2news2.google.com comp.lang.ada:8267 Date: 2007-01-18T18:00:25+01:00 List-Id: Georg Bauhaus wrote: > 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 := ; >> 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. Thanks, I'll add it. > >> >> Patt : constant Pattern := Some_Patterns ** Target; >> begin >> while Match (Text, Target, "") loop > Patt ? Of course you're right. >> -- 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;