Update of /cvsroot/perl-flat/blokhead/dev-scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20683/dev-scripts
Modified Files:
bloktest.pl
Log Message:
added NFA->contains, NFA->trace methods. now we can actually *use* these
regular languages..
Index: bloktest.pl
===================================================================
RCS file: /cvsroot/perl-flat/blokhead/dev-scripts/bloktest.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** bloktest.pl 22 Feb 2006 04:58:23 -0000 1.6
--- bloktest.pl 24 Feb 2006 01:04:52 -0000 1.7
***************
*** 25,41 ****
#######
! my $x = FLAT::NFA->singleton("a");
! my $y = FLAT::NFA->singleton("d");
!
! my $z = $x->clone;
! $z->_swallow($y);
!
! # print Dumper $x, $y, $z;
!
!
! ########
! $x = FLAT::NFA->singleton(undef);
! $y = $x->kleene;
! print Dumper $x, $y;
--- 25,36 ----
#######
! my $nfa = foo("ab(c|d)*e");
! for (qw[ abe abce abcdcdcdcde bcde be abcd ab ]) {
! printf "$_ in the language? %s\n",
! $nfa->contains($_) ? "yes!" : "no";
! my @t = $nfa->trace($_);
! print "[@$_] " for @t;
! print $/;
! }
|