comp.lang.ada
 help / color / mirror / Atom feed
From: 944166@edna.swin.edu.au (Jimmy Fang)
Subject: Newbie Generic Reg Exp Pattern Matching Question
Date: 3 Oct 1994 14:54:52 GMT
Date: 1994-10-03T14:54:52+00:00	[thread overview]
Message-ID: <36p5vsINNcjt@edna.cc.swin.edu.au> (raw)



I'm having trouble getting a generic Regular Expression Matching.
This code fragment is taken out of Booch's Software Components book.

       23  generic
       24     type ITEM is private;
       25     type INDEX is (<>);
       26     type ITEMS is array (INDEX range <>) of ITEM;
       27     Any_Item       : in ITEM;
       28     Escape_Item    : in ITEM;
       29     Not_Item       : in ITEM;
       30     Closure_Item   : in ITEM;
       31     Start_Class    : in ITEM;
       32     Stop_Class     : in ITEM;
       33     with function "=" (  Left  : in ITEM;
       34                          Right : in ITEM) return Boolean;
       **
    *****E equality parameters must be same limited type [LRM 6.7/4]
       **
       35

Now when I change "type ITEM is private" to  "... is limited private",
the compiler complains about Any_Items .. Stop_Class "cannot be
limited for in mode".

I've tried reading the LRM, but am confused by the reference.

I've gotten the other matching algorithms to run (debugging some typos
out of the book) but like the idea of using wildcards, etc.  Thanks for
any pointers.


- Jim
---------------------------------------------------------------------
Under-Gradual Student, Swinburne University of Technology, Australia





             reply	other threads:[~1994-10-03 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-03 14:54 Jimmy Fang [this message]
1994-10-04 11:29 ` Newbie Generic Reg Exp Pattern Matching Question Robert I. Eachus
1994-10-04 22:03   ` Stef Van Vlierberghe
1994-10-05  2:21   ` Tucker Taft
1994-10-11 16:10     ` William Fang
replies disabled

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