The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::DTD::FAState - Perl module representing a state of a finite automaton

SYNOPSIS

  use XML::DTD::FAState;

DESCRIPTION

XML::DTD::FAState is a Perl module representing a state of a finite automaton. The following methods are provided.

new
 my $s = XML::DTD::FAState->new('state label');
 my $sf = XML::DTD::FAState->new('state label', 1); # Final state

Construct a new XML::DTD::FAState object.

isa

if (XML::DTD::FAState->isa($obj) { ... }

Test object type.

label
 print $s->label;

Return state label.

backref
 my $br = $s->backref;

Get list of back references.

transitions
 my $tlst = $s->transitions;

Get all outbound transitions as list of (destination,symbol) pairs.

outsymbols
 my $symball = $s->outsymbols;
 my $s1 = XML::DTD::FAState->new('state label');
 my $symbdst = $s->outsymbols(s1);

Get array of all outbound transition symbols, or just those associated with a specified destination state.

deststates
 my $dstall = $s->deststates;
 my $dstsmb = $s->deststates('transition symbol');

Get array of all destination states, or just those associated with a specified transition symbol.

settrans
 my $dst = XML::DTD::FAState->new('state label');
 my $s->settrans($dst, 'transition symbol');

Add a transition to another state.

clrtrans
 $s->clrtrans($dst, 'transition symbol');

Remove a transition to another node.

SEE ALSO

XML::DTD::Automaton

AUTHOR

Brendt Wohlberg <wohl@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006,2010 by Brendt Wohlberg

This library is available under the terms of the GNU General Public License (GPL), described in the GPL file included in this distribution.