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, http://www.ocsystems.com/xada/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
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
Samuel Mize -- [log in to unmask] -- Team Ada
Fight Spam - see http://www.cauce.org/
(personal net account)