comp.lang.ada
 help / color / mirror / Atom feed
* Newbie Generic Reg Exp Pattern Matching Question
@ 1994-10-03 14:54 Jimmy Fang
  1994-10-04 11:29 ` Robert I. Eachus
  0 siblings, 1 reply; 5+ messages in thread
From: Jimmy Fang @ 1994-10-03 14:54 UTC (permalink / 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





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

end of thread, other threads:[~1994-10-11 16:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-10-03 14:54 Newbie Generic Reg Exp Pattern Matching Question Jimmy Fang
1994-10-04 11:29 ` 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

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