|Algebraic RegEx toolbase with a grep superset clone. firstname.lastname@example.org (2019-12-30)|
|Date:||Mon, 30 Dec 2019 16:34:14 -0800 (PST)|
|Injection-Info:||gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="53472"; mail-complaints-to="email@example.com"|
|Posted-Date:||30 Dec 2019 20:12:12 EST|
Regular expressions and finite state automata using Kleene algebraic
DFA: converts extended regular expressions to minimal deterministic finite
NFA: converts regular expressions to small non-deterministic finite state
FSC: a "finite state classifier" infers a classification delimited by mutually
disjoint regular expressions from a set of exemplars
REX: a GREP-like utility that works with extended regular expressions.
The "automata" are listed in algebraic form as a system of equations -
equivalent to their formulation as a regular grammar.
In addition to the standard Kleene algebraic operations ("|" for union, "*"
for 0,1,2+ iterations, "+" for 1,2+ iterations, "?" for 0,1 iterations),
extended regular expressions include "&" for intersection, "-" for relative
compliment and "^" for interleave. Formerly archived in the comp.compilers
Formerly in the comp.compilers archive in the 1990's, it's on GitHub here
The programs were written in ANSI-C (and have been updated to C99). The
programs are small: at present, 154 lines (fsc.c), 365 lines (nfa.c), 483
lines (dfa.c), 615 lines (rex.c). The build is set up for POSIX-based systems.
There are legacy hooks in rex.c to handle wildcard expansions for DOS/Windows,
but they've not been recently tested.
The underlying algebraic framework for regular expressions has been extended
up the Chomsky hierarchy to type 2 - context-free expressions. Two
* one, based on the fixed-point operator, descending from the earlier 1970's
Grusky/McWhirter/Yntema, expanded by Leiss/Esik/Kozen in the 2000's and
* the other described here and elsewhere in the 1990's, whose underlying
theory - an Eilenberg-Moore category - was published in 2008
were proven equivalent in 2018.
In the future, the RegEx library will be expanded to embody context-free
Return to the
Search the comp.compilers archives again.