Ada83 -Booch regular expression 
Author Message
 Ada83 -Booch regular expression

Hello,

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 ?

Any help is more than welcome.
Thanks.



Sun, 06 Nov 2005 16:48:04 GMT  
 Ada83 -Booch regular expression

Quote:
>Hello,

>I'm trying to do some pattern matching in Ada83 with the

|                                          Ada 83

Quote:
>Booch regular expression components - without any success.

>Is there anyone who can give me some example code on how
>to instantiate and use the regular expression components for strings ?.

The online Booch Components lacks regular expressions code:
   http://www.pushface.org/components/bc/

GNAT's Regular Expressions code (regexp) is here.
   http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ada/g-regpat.ads

--

The old Shootout project that was here
   http://www.bagley.org/~doug/shootout/news.shtml
has shifted to here:
   http://dada.perl.it/shootout/
I sent an example program showing how Ada is used when implementing
regular expressions example. Mr Calpini does not reply to my e-mail so
I don't know when my approx 17 samples appear.

Perhaps you can write to <dada from perl.it>, and get the Ada code to
show up later on the website.

Craig Carey



Wed, 09 Nov 2005 20:57:09 GMT  
 Ada83 -Booch regular expression

Quote:

> The old Shootout project that was here
>    http://www.bagley.org/~doug/shootout/news.shtml
> has shifted to here:
>    http://dada.perl.it/shootout/
> I sent an example program showing how Ada is used when implementing
> regular expressions example. Mr Calpini does not reply to my e-mail so
> I don't know when my approx 17 samples appear.

Well long time ago I sent some Ada samples to this guy but he told me that he
was dropping the project and that anyway he wanted to do all samples himself.

Pascal.

--

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



Thu, 10 Nov 2005 02:09:18 GMT  
 Ada83 -Booch regular expression

Quote:

> 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/

--
The first character of my real email is the "m"
Please do not repeat it in any news messages.



Thu, 10 Nov 2005 03:21:19 GMT  
 Ada83 -Booch regular expression

Quote:


> >Hello,

> >I'm trying to do some pattern matching in Ada83 with the
> |                                          Ada 83
> >Booch regular expression components - without any success.

> >Is there anyone who can give me some example code on how
> >to instantiate and use the regular expression components for strings ?.

> The online Booch Components lacks regular expressions code:
>    http://www.pushface.org/components/bc/

Yes; the C++ BCs of which the Ada 95 BCs are a translation does
include "pattern matching", but I saw no point in translating it since
99% of pattern matching is over strings and the GNAT code does that
very well.

The OP was after the Ada *83* BCs at
http://www.adapower.com/original_booch/



Thu, 10 Nov 2005 18:47:31 GMT  
 Ada83 -Booch regular expression
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.

Quote:


> > 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/



Fri, 11 Nov 2005 02:51:34 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. regular expression matching in J ? (or APL)

2. Tgen, linear algebra, and regular expression package available

3. Regular Expressions

4. Regular Expression Matcher v1.1

5. apl and regular expressions

6. php like regular expressions in apl?

7. Support for regular expressions in APL?

8. Benchmarking Regular Expressions in J3.05

9. regular expression discussion

10. Regular Expressions in J

11. Regular Expression to match HTML elements

12. Using regular expressions to validate data

 

 
Powered by phpBB® Forum Software