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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7aa0b6410293acd1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-25 11:51:34 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: c-kif-kif@eudoramail.com (c-kif-kif) Newsgroups: comp.lang.ada Subject: Re: Ada83 -Booch regular expression Date: 25 May 2003 11:51:34 -0700 Organization: http://groups.google.com/ Message-ID: <8fe5cfbb.0305251051.2172cacb@posting.google.com> References: <8fe5cfbb.0305210048.5526f046@posting.google.com> <3ECFC618.28D7@earthlink.net> NNTP-Posting-Host: 172.176.77.197 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1053888694 25873 127.0.0.1 (25 May 2003 18:51:34 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 25 May 2003 18:51:34 GMT Xref: archiver1.google.com comp.lang.ada:37764 Date: 2003-05-25T18:51:34+00:00 List-Id: Thanks a lot for your answers. Unfortunately I've to work with Ada83, so Gnat and Ada95 Booch components won't do it for me. But I surely will have a try with the exemple code from Vincent. By the way, it would be nice if you could keep me up to date on your online-version of Grady Booches book. Thanks again. Vincent Marciante wrote in message news:<3ECFC618.28D7@earthlink.net>... > c-kif-kif wrote: > > > i'm trying to do some pattern matching in Ada83 with the > > Booch regular expression components - without any success. > > Is there anyone who can give me some exemple code > > on how to instantiate and use the regular expression > > components for strings ? > > > A quote from page 542 of the book _SOFTWARE_COMPONENTS_WITH_ > _Ada__Structures,_Tools,_and_Subsystems follows: > > > with pattern_match_regular_expression; > package character_match is > new pattern_match_regular_expresion > (item => character, > index => positive, > items => string, > any_item => '?', > escape_item => '/', > not_item => '~', > closure_item => '*', > start_class => '{' > stop_class => '}', > is_equal => "="); > > Given that instantiation, we can consider writing patterns > such as: > > o rerecord The literal string "rerecord" > > o {aeiou}??????ing A ten character word starting > with a vowel and ending in "ing" > > o ~{aeiou}??????????ing A ten character word starting > with anything but a vowel and > ending in "ing" > > o 10*1 A 1 follwed by zero or more 0's, > followed by a 1 > > o 100*1 A 1 follwed by one or more 0's, > followed by a 1 > > o x/*y The literal string "x*y" > > > end quote > > > > By the way, I have the okay from Grady Booch > (and his publisher) to put together a version > of the above mentioned book that will be > available online. I just have not had the > time to finish it :( > > By the way, questions about the Ada 83 Booch > components may also be asked in the chat forum > at AdaPower. That is where the Original Booch > Components are available for download and is > where the online version of the book will > eventually appear. The main URL is: > > http://www.adapower.com/original_booch/