comp.lang.ada
 help / color / mirror / Atom feed
* Regular Expressions & Ada 95
@ 1999-02-07  0:00 Yannick Manningham
  1999-02-08  0:00 ` Terry J. Westley
  1999-02-08  0:00 ` bill
  0 siblings, 2 replies; 5+ messages in thread
From: Yannick Manningham @ 1999-02-07  0:00 UTC (permalink / raw)


Does anyone know a regular expressions module or paskage for Ada 95 �

--
Yannick Manningham

yman@dsuper.net
yman@aess.asso.uqam.ca
--------------------------------






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Regular Expressions & Ada 95
  1999-02-07  0:00 Regular Expressions & Ada 95 Yannick Manningham
  1999-02-08  0:00 ` Terry J. Westley
@ 1999-02-08  0:00 ` bill
  1999-02-09  0:00   ` robert_dewar
  1999-02-10  0:00   ` Ehud Lamm
  1 sibling, 2 replies; 5+ messages in thread
From: bill @ 1999-02-08  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

In article <36BE36C1.11773AB0@dsuper.net>, Yannick says...
>
>Does anyone know a regular expressions module or paskage for Ada 95 �
>

GNAT has a pattern matching package based on spitball(sp?) patterns
constructs.

Boll




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Regular Expressions & Ada 95
  1999-02-07  0:00 Regular Expressions & Ada 95 Yannick Manningham
@ 1999-02-08  0:00 ` Terry J. Westley
  1999-02-08  0:00 ` bill
  1 sibling, 0 replies; 5+ messages in thread
From: Terry J. Westley @ 1999-02-08  0:00 UTC (permalink / raw)


TASH is an Ada 95 binding to Tcl/Tk.  Among other things, you'll
get regular expression pattern matching.

Here's an excerpt from the (hopefully) soon to be released new and
improved thick binding.  This excerpt and the example provide regular
expression pattern matching to find patterns in elements of Tash lists.
There will also be the capability to perform regular expression matches
directly on strings as well.  I just happening to be finishing up the
list regexp match right now.

--------------------------------------------------------
-- Use regular expressions to search a list. Index returns
-- the index (in the range 1..Length(Source)) in Source
-- of the element which matches the specified regular
-- expression. Returns 0 if the pattern is not found.
--------------------------------------------------------
function Index (Source : in Tash_List;
                Regexp : in String;
                Going  : in Ada.Strings.Direction := Ada.Strings.Forward)
   return Natural;

Here's an example:

declare
   use type Tash.Lists.Tash_List;
   Target_String : Tash.Lists.Tash_List := Tash.Lists.To_Tash_List (
      +"this Tash string is an element of a Tash list",
     +"here's a second element");
begin
   if Tash.Lists.Index (Target_String, "[tT][aA][sS][hH]") > 0 then
      Ada.Text_IO.Put_Line ("Tash found");
   end if;
 end;

--
Terry J. Westley, Principal Engineer
Veridian Engineering, Calspan Operations
twestley@buffalo.veridian.com   http://www.veridian.com/
-------------------------------------------------------
Author of TASH, an Ada binding to Tcl/Tk.
Visit the TASH web site at http://tash.calspan.com.
-------------------------------------------------------








^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Regular Expressions & Ada 95
  1999-02-08  0:00 ` bill
@ 1999-02-09  0:00   ` robert_dewar
  1999-02-10  0:00   ` Ehud Lamm
  1 sibling, 0 replies; 5+ messages in thread
From: robert_dewar @ 1999-02-09  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

In article <79mlbf$8nq@drn.newsguy.com>,
  bill@nospam.com wrote:
> In article <36BE36C1.11773AB0@dsuper.net>, Yannick
says...
> >
> >Does anyone know a regular expressions module or paskage
> >for Ada 95 �


Have a look at g-regexp.ads if you are using GNAT!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Regular Expressions & Ada 95
  1999-02-08  0:00 ` bill
  1999-02-09  0:00   ` robert_dewar
@ 1999-02-10  0:00   ` Ehud Lamm
  1 sibling, 0 replies; 5+ messages in thread
From: Ehud Lamm @ 1999-02-10  0:00 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=ISO-8859-8, Size: 411 bytes --]

On 8 Feb 1999 bill@nospam.com wrote:

> In article <36BE36C1.11773AB0@dsuper.net>, Yannick says...
> >
> >Does anyone know a regular expressions module or paskage for Ada 95 É
> >
> 
> GNAT has a pattern matching package based on spitball(sp?) patterns
> constructs.
> 
And a regular "regular expression" package too. See adainclude/g-regexp.*

Ehud Lamm     mslamm@pluto.mscc.huji.ac.il






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-02-10  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-07  0:00 Regular Expressions & Ada 95 Yannick Manningham
1999-02-08  0:00 ` Terry J. Westley
1999-02-08  0:00 ` bill
1999-02-09  0:00   ` robert_dewar
1999-02-10  0:00   ` Ehud Lamm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox