retofl


Name

retofl -- convert a regular expression to a finite language

Synopsis

retofl re

retofl <re


Description

retofl computes a finite language that accepts the same language as re, and writes it on standard output.

retofl returns 0 if the expression cannot be represented as a finite language. Any regular expression which includes a Kleene star term cannot be represented as a finite language. This rule does not apply to Kleene star expressions that are equivalent to the empty string.

re must conform to the Grail format for regular expressions.


Examples

% cat re1
{}

% retofl <re1

% cat re2
abc+""+def

% retofl <re2
abc

def


Authors

Roger Robson, Darrell Raymond and Derick Wood, the Grail project

See also

re(5), fl(5), fltore(1)