From: <per...@li...> - 2006-04-07 20:14:40
|
Update of /cvsroot/perl-flat/perl-flat/lib/FLAT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31198/lib/FLAT Modified Files: PFA.pm Log Message: working on pfa stuff Index: PFA.pm =================================================================== RCS file: /cvsroot/perl-flat/perl-flat/lib/FLAT/PFA.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PFA.pm 12 Mar 2006 05:03:50 -0000 1.4 --- PFA.pm 7 Apr 2006 20:14:34 -0000 1.5 *************** *** 1,14 **** ! package FLAT::PFA; # should this be FLAT::NFA::PFA ? .. might be too confusing use strict; ! use base 'FLAT::NFA'; use Carp; use FLAT::Transition; sub new { my $pkg = shift; ! my $self = $pkg->SUPER::new(@_); # Inherits constructor from NFA ! # contains states (actually nodes), alphabet, and ! # transitions like NFA $self->{TIED} = []; # tracks tied nodes $self->{ACTIVE_NODES} = []; # tracks active nodes - could be label like start and final --- 1,19 ---- ! package FLAT::PFA; use strict; ! use base 'FLAT::FA'; use Carp; use FLAT::Transition; + # eliminated from PFA.pm of FLAT::Legacy is the need to explicitly track: + ## start nodes, final nodes, symbols, and lambda & epsilon symbols, sub new { my $pkg = shift; ! my $self = $pkg->SUPER::new(@_); ! $self->{NODE_TRANS_CLASS} = "FLAT::Transition"; ! # \gamma - there is no need to have a state transition ! # function (at this point) because nothing is really ! # done on the state level. If that is desired, one ! # should just use the equivalent NFA $self->{TIED} = []; # tracks tied nodes $self->{ACTIVE_NODES} = []; # tracks active nodes - could be label like start and final |