On Dec 15, 2004, at 12:02 PM, Ken Williams wrote:

It short-circuits and there's no backtracking? That's odd. Seems like that should be stated in the docs somewhere, since that's how most people expect an FSA to work.

I'm expanding the docs now, even as I incorporate people's suggestions.

In any case, in order to be a DFA, it must satisfy the following conditions:

1) Mutually exclusive set of transitions away from any node (which you basically satisfy by only using the first match)

Cool.

2) Every transition must "consume some input". For pattern-matching, this means every transition steps forward through the target string, but since the transitions in your module are arbitrary and user-defined, it seems like one could easily create a machine where this (or an analog of it) isn't necessarily true.

Yes, that's true.

So it looks like you've got NFAs (or just FSAs, if you prefer), not DFAs.

D'oh! I've already renamed it DFA::Rules in Subversion. Ah, well, at least it's easy to change. Look for the new module to be on CPAN later today.


Thanks for the feedback and definitions, Ken.

Regards,

David

Reply via email to