RE


Name

re -- format for regular expressions

Description

Grail's format for regular expressions is very similar to the conventional representation. The following are regular expressions:

{}		empty set
""		empty string
a-b,A-Z		any single letter
xy		concatenation of two expressions
x + y		alternation of two expressions
x*		Kleene star

Regular expressions can employ only the standard alphabetic characters; digits and special punctuation symbols are not permitted.

Grail follows the normal rules of precedence for regular expressions; Kleene star is highest, next is concatentation, and lowest is alternation. Parentheses can be used to group subexpressions to override precedence.

Internally, Grail stores regular expressions as a kind of expression tree, and thus with minimum parenthesization.

Grail supports parameterizable regular expressions. If the alphabet of your expressions is not the ASCII characters, then the symbols in the regular expression will be a textual representation of the objects in your alphabet.


Authors

Darrell Raymond and Derick Wood, the Grail project

See also

fm(5)