|
From: notifies s. of c. c. <per...@li...> - 2006-09-12 14:37:16
|
Revision: 70
http://svn.sourceforge.net/perl-flat/?rev=70&view=rev
Author: estrabd
Date: 2006-09-12 07:37:09 -0700 (Tue, 12 Sep 2006)
Log Message:
-----------
...
Modified Paths:
--------------
trunk/perl-flat/dev-scripts/pregex-to-pfa.pl
trunk/perl-flat/lib/FLAT/PFA.pm
Modified: trunk/perl-flat/dev-scripts/pregex-to-pfa.pl
===================================================================
--- trunk/perl-flat/dev-scripts/pregex-to-pfa.pl 2006-08-08 03:36:18 UTC (rev 69)
+++ trunk/perl-flat/dev-scripts/pregex-to-pfa.pl 2006-09-12 14:37:09 UTC (rev 70)
@@ -12,13 +12,16 @@
my $PFA = $PRE->as_pfa();
-my $dot = $PFA->as_graphviz;
+my $graphviz = $PFA->as_graphviz;
my $summary = $PFA->as_summary;
print "$summary\n";
-open my $fh, "|-", "dot -Tpng -o output.png"
- or die "Couldn't run dot: $!\n";
+open my $fh, "|-", "circo -Tpng -o output.png"
+ or die "Couldn't run graphviz: $!\n";
-print $fh $dot;
+print $fh $graphviz;
close $fh;
+
+my $NFA = $PFA->as_nfa();
+print Dumper($NFA);
Modified: trunk/perl-flat/lib/FLAT/PFA.pm
===================================================================
--- trunk/perl-flat/lib/FLAT/PFA.pm 2006-08-08 03:36:18 UTC (rev 69)
+++ trunk/perl-flat/lib/FLAT/PFA.pm 2006-09-12 14:37:09 UTC (rev 70)
@@ -167,15 +167,25 @@
1;
-# stretching my legs after a few months being gone..
+# stretching my legs after a few months being gone ... see if the legacy conversion
+# can be modified to work
sub as_nfa {
my $self = shift;
-
- my $result = FLAT::DFA->new;
- my %subset;
-
- $result;
+ my @Dstates = $self->get_states();
+ my %Dtran =(); # hash of serialized state names that have been searched
+ # New NFA object reference
+ my $result = FLAT::NFA->new();
+
+ print Dumper(@Dstates);
+
+# while (@Dstates) {
+# foreach ($self->alphabet()) {
+
+# }
+# }
+
+ return $result;
}
__END__
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|