isempty


Name

isempty -- test re for containment of empty set

Synopsis

isempty re

isempty <re


Description

isempty tests re to see if it is the empty set. isempty returns 1 and writes is empty set on standard output if re is the empty set; it returns 0 and writes is not empty set otherwise.

re must conform to the Grail format for regular expressions.


Examples

% cat re1
{}

% isempty re1
is empty set

% cat re2
""
% isempty re2
is not empty set

% cat re3
(a+b)*(abc)

% isempty re3
is not empty set


Authors

Darrell Raymond and Derick Wood, the Grail project

See also

re(5), isnull(1)