TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Mon, 5 Jan 1998 15:05:15 -0600
Samuel Mize <[log in to unmask]>
<[log in to unmask]> from "Terry Westley" at Jan 5, 98 03:35:15 pm
text/plain; charset=US-ASCII
Samuel Mize <[log in to unmask]>
text/plain (54 lines)
Terry Westley wrote:
> Mike Brenner asks:
> > If there is a way to do Unix general expressions in Ada, please post
> > the reference where the source code can be downloaded. This is not
> > a smiley-type issue, this is a major advancement in Ada's capabilities.
> > Languages like C, Tcl, Perl, awk, cshell, vi, etc., come with Unix
> > regular expression built in. Ada sorely needs this capability.
> Take a look at TASH,  You can get
> regular expression pattern matching through this Ada binding to Tcl.

This is a good thing indeed.

Here's another thought:

If it's available for your platform in C, it's available in Ada 95,
and probably in Ada 83.

Yes, you have to do some work to use it.  A thin binding to the
capabilities you really need should be fairly simple.  It can take a
lot of work to create a full-up binding to an entire library, so don't
do that unless you mean to.

I've done this, it's easy to do and simple to maintain, and that was
in Ada 95 (interfacing to some Unix system calls).  Just don't
overreach yourself.

I'd suggest that you:

1. Write a simple, thin binding to the items you need right now.

2. Write a more Ada-oriented version, implemented in terms of
   this thin binding.  This is your local "thick" binding -- I
   suggest you not make it too thick, just enough so that the
   code using it merges well into an Ada environment.

3. As you find need for other items from the library, add them to
   both bindings.  You may wind up with several thick bindings.

If someone produces a good, canonical full binding that suits your
needs (like TASH, if that will work for you), you can replace the thin
binding and rebuild the thick one.  You may choose later to upgrade
the other code to use the canonical binding directly, obviating the
thick binding.

Sam Mize

Samuel Mize -- [log in to unmask] -- Team Ada
Fight Spam - see
(personal net account)