10.3.2. Node Regular Expressions

Use of the facilities in this clause in the style or transformation languages requires the regexp feature.

The regexp type represents a node regular expression. A node regular expression is an object that can be used to perform an auxiliary parse of a grove. This auxiliary parse creates a new grove that contains nodes that group together nodes that correspond to nodes in the original grove. The semantics of a node regular expression define for any node-list s and any node-list t that is a sublist of s whether t matches the node regular expression with respect to s. This is defined inductively for each of the procedures that construct regexps. s is referred to as the search list.

A node-list s immediately precedes a node-list t with respect to a node-list x that contains all the members of both s and t if

(regexp? obj)

Returns #t if obj is a regexp, and otherwise returns #f.