[DGD]parse_string()

Felix A. Croes felix at dworkin.nl
Fri Jun 15 15:22:49 CEST 2001


Kris Van Hees <aedil at alchar.org> wrote:

> Based on pure logical rules (and the fact that concatenation is of course not a
> rule in logic), you could always write the inverse of 'ab' as a much longer ORd
> list like: '(a(!b)|(!a)b|(!a)(!b))'.  Performance might suffer just a tad bit
> though :)

It is not so easy.  The inverse set of `a' may include `ab', and the
inverse set of `b' may include the empty string, but the inverse set
of `ab' never includes the concatenation of `ab' and the empty string.

Performance would not suffer significantly, because both `ab' and its
inverse are represented by essentially the same DFA (only the final
states are different).

Regards,
Dworkin

List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list