DFA::Set::Memory - Deterministic Finite Automata set in memory
use DFA::Set::Memory;
$dfa=DFA::Set::Memory->new(
States=>{
Foo=>[qw(Biff)],
Biff=>[qw(Foo Bob)],
Bob=>[],
},
Terminal=>'Bob');
$dfa->add("bob", $bob, "Foo");
$dfa->add("bill", $bill, "Foo");
$dfa->transition(bob=>'Biff');
if($dfa->transition(bob=>'Bob')) {
$dfa->remove('bob');
}
$obill=$dfa->find_payload("bill");
DFA::Set::Memory is an implementation of DFA::Set that uses hashes to keep information in memory.
All methods are documented in DFA::Set.
Philip Gwyn <cpan at pied.nu>
DFA::Set, DFA::Set::File, perl(1).