find-space-instance-by-pathBlackboard Repositorymake-space-instancefind-space-instancesGoTo Top

find-space-instances   space-instance-regexp => space-instances[Function]

Purpose
Return the space instances that match a path-expression pattern.

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

space-instance-regexp     A space-instance path regular expression specifying the space instances to be returned
space-instances     A proper list

Returns
The specified space instances.

Description
The space-instance-regexp argument is either the symbol t (indicating all space instances) or a list representing a regular expression where the following reserved symbols are interpreted as follows:

= matches one occurrence in a space-instance path
? matches zero or one occurrence in a space-instance path
+ matches one or more occurrences in a space-instance path
* matches zero or more occurrences in a space-instance path
   ^    move to parent

Thus both (find-space-instances '(*)) and (find-space-instances 't) return all space instances.

A space-instance-regexp value consisting of a list of space instances is returned unchanged.

See also
    find-space-instance-by-path
    map-space-instances

Examples
Return the space instances that are rooted at (bb):

  > (find-space-instances '(bb +))
  (#<standard-space-instance (bb hyps)>
   #<standard-space-instance (bb probable-hyps)>)
   #<standard-space-instance (bb rejected-hyps)>)
  >
Return all the space instances (bb) and below:
  > (find-space-instances '(bb *))
  (#<standard-space-instance (bb hyps)>
   #<standard-space-instance (bb probable-hyps)>)
   #<standard-space-instance (bb rejected-hyps)>
   #<standard-space-instance (bb)>)
  >


The GBBopen Project


find-space-instance-by-pathBlackboard Repositorymake-space-instancefind-space-instancesGoTo Top