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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e0fa6eae2c537e3d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!2a02:590:1:1::196.MISMATCH!news.teledata-fn.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 24 Mar 2011 17:41:09 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT.Regpat problem. References: <41cae3ac-97b6-4b01-ad73-9ff1ec2fdf86@q12g2000prb.googlegroups.com> <1thhy53rdlhrs.1tygcc01f6i11$.dlg@40tude.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4d8b7425$0$6989$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 24 Mar 2011 17:41:09 CET NNTP-Posting-Host: 052474aa.newsspool4.arcor-online.net X-Trace: DXC=0YG:U?bMBWCA@P]\D4IUKJLh>_cHTX3jMIUGonee]9JA X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:19401 Date: 2011-03-24T17:41:09+01:00 List-Id: On 24.03.11 15:04, Peter C. Chapin wrote: > On Thu, 24 Mar 2011, Dmitry A. Kazakov wrote: > >> Just curious, why are you using regular expressions when GNAT offers Spitbol >> patterns? > > Spitbol patterns seemed like overkill. Just yesterday I wrote me a SPITBOL program to rummage in log files. That was quickly done, performed as expected, and nothing got killed except the bugs that got traced in the log. The trick is to use simple patterns. (They are typed, and can be debugged incrementally as needed. That's unlike UNIX V7 RE strings, which either work, or don't work, but how do you inject tracing the point of failure?) FTR, in SNOBOL-4 syntax, Space = " " CHAR(9) Pattern = POS(0) (SPAN(Space) | NULL) "xyzzy" RPOS(0)