You can subscribe to this list here.
2006 |
Jan
|
Feb
(32) |
Mar
(25) |
Apr
(13) |
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
(5) |
Oct
(2) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
(28) |
Mar
(6) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <per...@li...> - 2006-02-24 18:42:13
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT/Regex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27297/lib/FLAT/Regex Modified Files: Op.pm Log Message: - updates to regex ops (especially handling extended [] characters) - added more regex tests - anchoring option to as_perl_regex - "contains" method for regexes (just pass off regex matching to perl ;)) Index: Op.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/Regex/Op.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Op.pm 24 Feb 2006 06:20:26 -0000 1.4 --- Op.pm 24 Feb 2006 18:42:09 -0000 1.5 *************** *** 26,30 **** return "#" if not defined $t; ! return 1 == length $t ? $t : "[$t]"; --- 26,30 ---- return "#" if not defined $t; ! return $t =~ /^\w$/ ? $t : "[$t]"; *************** *** 37,41 **** $r = quotemeta $r; ! return length $r == 1 ? $r : "(?:$r)"; } --- 37,41 ---- $r = quotemeta $r; ! return $r =~ /^\w$/ ? $r : "(?:$r)"; } |
From: <per...@li...> - 2006-02-24 18:28:28
|
Update of /cvsroot/perl-flat/flat4cpan/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21433/t Modified Files: FLAT.t Log Message: at this point I am just learning about the Test module Index: FLAT.t =================================================================== RCS file: /cvsroot/perl-flat/flat4cpan/t/FLAT.t,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FLAT.t 24 Feb 2006 00:03:39 -0000 1.1 --- FLAT.t 24 Feb 2006 18:28:23 -0000 1.2 *************** *** 6,10 **** # change 'tests => 1' to 'tests => last_test_to_print'; ! use Test::More tests => 6; use lib qw(../lib); BEGIN { use_ok('FLAT::FA') }; --- 6,10 ---- # change 'tests => 1' to 'tests => last_test_to_print'; ! use Test::More tests => 12; use lib qw(../lib); BEGIN { use_ok('FLAT::FA') }; *************** *** 14,15 **** --- 14,29 ---- BEGIN { use_ok('FLAT::FA::RE') }; BEGIN { use_ok('FLAT::FA::PRE') }; + + isa_ok(FLAT::FA::DFA->new(),'FLAT::FA::DFA'); + isa_ok(FLAT::FA::NFA->new(),'FLAT::FA::NFA'); + isa_ok(FLAT::FA::PFA->new(),'FLAT::FA::PFA'); + isa_ok(FLAT::FA::RE->new(),'FLAT::FA::RE'); + isa_ok(FLAT::FA::PRE->new(),'FLAT::FA::PRE'); + + my $pre = FLAT::FA::PRE->new(); + $pre->set_pre("010|10&01"); + my $pfa = $pre->to_pfa(); + isa_ok($pfa,'FLAT::FA::PFA'); + my $nfa = $pfa->to_nfa(); + my $dfa = $nfa->to_dfa(); + my $dfa_min = $dfa->minimize(); |
From: <per...@li...> - 2006-02-24 15:41:17
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT/Regex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4925/lib/FLAT/Regex Modified Files: WithExtraOps.pm WithNegations.pm Log Message: moving forward in reverse on this PFA.pm thing :) Index: WithExtraOps.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/Regex/WithExtraOps.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WithExtraOps.pm 15 Nov 2005 17:09:32 -0000 1.2 --- WithExtraOps.pm 24 Feb 2006 15:41:03 -0000 1.3 *************** *** 69,72 **** --- 69,83 ---- } + sub shuffle { + my $self = shift; + # will handle shuffle operatation + } + + sub as_pfa { + my $self = shift; + # ... will turn shuffle instance into PFA - similar to Op->alt->as_nfa, + # but a tiny different...if I may offer you a riddle :) + } + sub from_parse { my ($pkg, @item) = @_; Index: WithNegations.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/Regex/WithNegations.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WithNegations.pm 15 Nov 2005 16:29:12 -0000 1.2 --- WithNegations.pm 24 Feb 2006 15:41:03 -0000 1.3 *************** *** 54,107 **** } ! ############################### ! package FLAT::Regex::Op::shuffle; ! use base 'FLAT::Regex::Op'; ! ! sub parse_spec { "%s(2.. /[&]/)" } ! sub precedence { 12 } ! ! sub as_string { ! my ($self, $prec) = @_; ! my $result = join "&", ! map { $_->as_string($self->precedence) } ! $self->members; ! return $prec > $self->precedence ? "($result)" : $result; ! } ! ! sub from_parse { ! my ($pkg, @item) = @_; ! $pkg->new( @{ $item[1] } ); ! } ! ! sub reverse { ! my $self = shift; ! my @ops = map { $_->reverse } $self->members; ! __PACKAGE__->new(@ops); ! } ! ! sub is_empty { ! my $self = shift; ! my @members = $self->members; ! for (@members) { ! return 0 if not $_->is_empty; ! } ! return 1; ! } ! ! sub has_nonempty_string { ! my $self = shift; ! my @members = $self->members; ! for (@members) { ! return 1 if $_->has_nonempty_string; ! } ! return 0; ! } ! ! sub is_finite { ! my $self = shift; ! my @members = $self->members; ! for (@members) { ! return 0 if not $_->is_finite; ! } ! return 1; ! } --- 54,56 ---- } ! 1; |
From: <per...@li...> - 2006-02-24 15:41:17
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4925/lib/FLAT Modified Files: NFA.pm PFA.pm Log Message: moving forward in reverse on this PFA.pm thing :) Index: NFA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/NFA.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NFA.pm 24 Feb 2006 06:49:42 -0000 1.8 --- NFA.pm 24 Feb 2006 15:41:02 -0000 1.9 *************** *** 232,236 **** } ! sub _SET_ID { join "\0", sort { $a <=> $b } @_; } sub as_dfa { my $self = shift; --- 232,236 ---- } ! sub _SET_ID { join "\0", sort { $a <=> $b } @_; } # could this be encapsulated as inside of a closure or anonymous function? sub as_dfa { my $self = shift; Index: PFA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/PFA.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PFA.pm 24 Feb 2006 06:49:42 -0000 1.1 --- PFA.pm 24 Feb 2006 15:41:02 -0000 1.2 *************** *** 1,5 **** ! package FLAT::PFA; use strict; ! use base 'FLAT::FA'; use FLAT::Transition; --- 1,5 ---- ! package FLAT::PFA; # should this be FLAT::NFA::PFA ? .. might be too confusing use strict; ! use base 'FLAT::NFA'; use FLAT::Transition; *************** *** 7,55 **** sub new { my $pkg = shift; ! my $self = $pkg->SUPER::new(@_); ! $self->{TRANS_CLASS} = "FLAT::Transition"; return $self; } ! sub singleton { ! my ($class, $char) = @_; ! my $nfa = $class->new; ! ! if (not defined $char) { ! $nfa->add_states(1); ! $nfa->set_starting(0); ! } elsif ($char eq "") { ! $nfa->add_states(1); ! $nfa->set_starting(0); ! $nfa->set_accepting(0); ! } else { ! $nfa->add_states(2); ! $nfa->set_starting(0); ! $nfa->set_accepting(1); ! $nfa->set_transition(0, 1, $char); ! } ! return $nfa; ! } ! sub as_pfa { - } sub as_nfa { } ! sub union { ! ! } ! ! sub concat { ! ! } ! ! sub kleene { ! ! } ! sub shuffle { --- 7,29 ---- 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 return $self; } ! # Uses FLAT::NFA methods for fall back, including: union, concat, kleene, and singleton ! sub as_pfa { $_[0]->clone() } + # PFA->NFA conversion algorithm sub as_nfa { } ! # Shuffle constructor sub shuffle { *************** *** 89,92 **** --- 63,70 ---- =over + item $pfa-E<gt>shuffle + + Cloning method; returns a copy of itself. + =item $pfa-E<gt>shuffle |
From: <per...@li...> - 2006-02-24 07:35:44
|
Update of /cvsroot/perl-flat/blokhead/dev-scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2283/dev-scripts Modified Files: regex-stress.pl Added Files: pregex-stress.pl Log Message: playing with some dev-scripts --- NEW FILE: pregex-stress.pl --- #!/usr/bin/env perl -l use strict; use lib qw(../lib); use FLAT; use FLAT::Regex::WithExtraOps; use Data::Dumper; use Getopt::Long; # used to process commandline options $|++; # skirt around deep recursion warning annoyance local $SIG{__WARN__} = sub { $_[0] =~ /^Deep recursion/ or warn $_[0] }; srand $$; my %CMDLINEOPTS = (); # Percent chance of each operator occuring $CMDLINEOPTS{LENGTH} = 5; $CMDLINEOPTS{AND} = 10; $CMDLINEOPTS{OR} = 6; $CMDLINEOPTS{STAR} = 10; $CMDLINEOPTS{NEGATE} = 0; $CMDLINEOPTS{OPEN} = 5; $CMDLINEOPTS{CLOSE} = 0; $CMDLINEOPTS{n} = 100; GetOptions("l=s" => \$CMDLINEOPTS{LENGTH}, "n=s" => \$CMDLINEOPTS{n}, "and=s" => \$CMDLINEOPTS{AND}, "or=s" => \$CMDLINEOPTS{OR}, "star=s" => \$CMDLINEOPTS{STAR}, "neg=s" => \$CMDLINEOPTS{NEGATE}, "open=s" => \$CMDLINEOPTS{OPEN}, "close=s" => \$CMDLINEOPTS{CLOSE}, ); sub getRandomChar { my $ch = ''; # Get a random character between 0 and 127. do { $ch = int(rand 2); } while ($ch !~ m/[a-zA-Z0-9]/); return $ch; } sub getRandomRE { my $str = ''; my @closeparens = (); for (1..$CMDLINEOPTS{LENGTH}) { $str .= getRandomChar(); # % chance of an "or" if (int(rand 100) < $CMDLINEOPTS{OR}) { $str .= "|[]"; } elsif (int(rand 100) < $CMDLINEOPTS{AND}) { $str .= "&[]"; } elsif (int(rand 100) < $CMDLINEOPTS{STAR}) { $str .= "*"; } elsif (int(rand 100) < $CMDLINEOPTS{NEGATE}) { $str .= "~".getRandomChar(); } elsif (int(rand 100) < $CMDLINEOPTS{OPEN}) { $str .= "("; push(@closeparens,'[])'); } elsif (int(rand 100) < $CMDLINEOPTS{CLOSE} && @closeparens) { $str .= pop(@closeparens); } } # empty out @closeparens if there are still some left if (@closeparens) { $str .= join('',@closeparens); } return $str; } for (1..$CMDLINEOPTS{n}) { my $str = getRandomRE(); my $RE = FLAT::Regex::WithExtraOps->new($str); print "$str : ".$RE->as_string; } Index: regex-stress.pl =================================================================== RCS file: /cvsroot/perl-flat/blokhead/dev-scripts/regex-stress.pl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** regex-stress.pl 16 Nov 2005 04:02:30 -0000 1.2 --- regex-stress.pl 24 Feb 2006 07:35:35 -0000 1.3 *************** *** 4,9 **** use lib qw(../lib); use FLAT; ! use FLAT::Regex::WithExtraOps; ! use Data::Dumper; use Getopt::Long; # used to process commandline options $|++; --- 4,10 ---- use lib qw(../lib); use FLAT; ! use FLAT::Regex; ! use FLAT::NFA; ! use FLAT::DFA; use Getopt::Long; # used to process commandline options $|++; *************** *** 16,23 **** # Percent chance of each operator occuring $CMDLINEOPTS{LENGTH} = 5; - $CMDLINEOPTS{AND} = 10; $CMDLINEOPTS{OR} = 6; $CMDLINEOPTS{STAR} = 10; - $CMDLINEOPTS{NEGATE} = 3; $CMDLINEOPTS{OPEN} = 5; $CMDLINEOPTS{CLOSE} = 0; --- 17,22 ---- *************** *** 26,33 **** GetOptions("l=s" => \$CMDLINEOPTS{LENGTH}, "n=s" => \$CMDLINEOPTS{n}, - "and=s" => \$CMDLINEOPTS{AND}, "or=s" => \$CMDLINEOPTS{OR}, "star=s" => \$CMDLINEOPTS{STAR}, - "neg=s" => \$CMDLINEOPTS{NEGATE}, "open=s" => \$CMDLINEOPTS{OPEN}, "close=s" => \$CMDLINEOPTS{CLOSE}, --- 25,30 ---- *************** *** 51,60 **** if (int(rand 100) < $CMDLINEOPTS{OR}) { $str .= "|[]"; - } elsif (int(rand 100) < $CMDLINEOPTS{AND}) { - $str .= "&[]"; } elsif (int(rand 100) < $CMDLINEOPTS{STAR}) { $str .= "*"; - } elsif (int(rand 100) < $CMDLINEOPTS{NEGATE}) { - $str .= "~".getRandomChar(); } elsif (int(rand 100) < $CMDLINEOPTS{OPEN}) { $str .= "("; --- 48,53 ---- *************** *** 73,77 **** for (1..$CMDLINEOPTS{n}) { my $str = getRandomRE(); ! my $RE = FLAT::Regex::WithExtraOps->new($str); ! print "$str : ".$RE->as_string; } --- 66,71 ---- for (1..$CMDLINEOPTS{n}) { my $str = getRandomRE(); ! my $RE = FLAT::Regex->new($str); ! print $RE->as_regex(); ! print $RE->as_nfa()->as_dfa()->as_min_dfa()->as_summary(); } |
From: <per...@li...> - 2006-02-24 06:49:47
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11010/lib/FLAT Modified Files: NFA.pm Added Files: PFA.pm Log Message: added PFA.pm place holder, generating more cvs spam :) Index: NFA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/NFA.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NFA.pm 24 Feb 2006 06:20:25 -0000 1.7 --- NFA.pm 24 Feb 2006 06:49:42 -0000 1.8 *************** *** 282,286 **** A FLAT::NFA object is a finite automata whose transitions are labeled ! either wtih characters or the empty string (epsilon). =head1 USAGE --- 282,286 ---- A FLAT::NFA object is a finite automata whose transitions are labeled ! either with characters or the empty string (epsilon). =head1 USAGE --- NEW FILE: PFA.pm --- package FLAT::PFA; use strict; use base 'FLAT::FA'; use FLAT::Transition; sub new { my $pkg = shift; my $self = $pkg->SUPER::new(@_); $self->{TRANS_CLASS} = "FLAT::Transition"; return $self; } sub singleton { my ($class, $char) = @_; my $nfa = $class->new; if (not defined $char) { $nfa->add_states(1); $nfa->set_starting(0); } elsif ($char eq "") { $nfa->add_states(1); $nfa->set_starting(0); $nfa->set_accepting(0); } else { $nfa->add_states(2); $nfa->set_starting(0); $nfa->set_accepting(1); $nfa->set_transition(0, 1, $char); } return $nfa; } sub as_pfa { } sub as_nfa { } sub union { } sub concat { } sub kleene { } sub shuffle { } 1; __END__ =head1 NAME FLAT::PFA - Parallel finite automata =head1 SYNOPSIS A FLAT::PFA object is a finite automata whose transitions are labeled either with characters, the empty string (epsilon), or a concurrent line of execution (lambda). It essentially models two FSA in a non-deterministic way such that a string is valid it puts the FSA of the shuffled languages both into a final, or accepting, state. A PFA is an NFA, and as such exactly describes a regular language. A PFA contains nodes and states. A state is made up of whatever nodes happen to be active. There are two transition functions, nodal transitions and state transitions. When a PFA is converted into a NFA, there is no longer a need for nodes or nodal transitions, so they go are eliminated. PFA model state spaces much more compactly than NFA, and an N state PFA may represent 2**N non-deterministic states. This also means that a PFA may represent up to 2^(2^N) deterministic states. =head1 USAGE (not implemented yet) In addition to implementing the interface specified in L<FLAT>, FLAT::PFA objects provide the following PFA-specific methods: =over =item $pfa-E<gt>shuffle Shuffle construct for building a PFA out of a PRE (i.e., a regular expression with the shuffle operator) =item $pfa-E<gt>as_nfa Converts a PFA to an NFA by enumerating all states; similar to the Subset Construction Algorithm, it does not implement e-closure. Instead it treats epsilon transitions normally, and joins any states resulting from a lambda (concurrent) transition using an epsilon transition. =back |
From: <per...@li...> - 2006-02-24 06:20:30
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT/Regex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27791/lib/FLAT/Regex Modified Files: Op.pm Log Message: POD stubs for all public modules, with all method definitions updated Regex.pm for clearer handling of "[foo]" extended characters.. this really needs to be made uniform across all modules, so we always handle input strings, alphabets the same way Index: Op.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/Regex/Op.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Op.pm 21 Feb 2006 20:43:09 -0000 1.3 --- Op.pm 24 Feb 2006 06:20:26 -0000 1.4 *************** *** 22,30 **** use base 'FLAT::Regex::Op'; - my $EPSILON = "[]"; - my $NULL = "#"; - sub as_string { ! $_[0]->members; } --- 22,32 ---- use base 'FLAT::Regex::Op'; sub as_string { ! my $t = $_[0]->members; ! ! return "#" if not defined $t; ! return 1 == length $t ! ? $t ! : "[$t]"; } *************** *** 32,52 **** my $r = $_[0]->members; ! return "(?:)" if $r eq $EPSILON; ! return "(?!)" if $r eq $NULL; ! return quotemeta $r; } sub as_nfa { ! my $r = $_[0]->members; ! ! FLAT::NFA->singleton( ! $r eq $EPSILON ? "" : ! $r eq $NULL ? undef : $r ! ); } sub from_parse { my ($pkg, @item) = @_; ! $pkg->new( $item[1] ); } --- 34,57 ---- my $r = $_[0]->members; ! return "(?!)" if not defined $r; ! ! $r = quotemeta $r; ! return length $r == 1 ? $r : "(?:$r)"; } sub as_nfa { ! FLAT::NFA->singleton( $_[0]->members ); } sub from_parse { my ($pkg, @item) = @_; ! my $i = $item[1]; ! ! return $pkg->new("") if $i eq "[]"; ! return $pkg->new(undef) if $i eq "#"; ! ! $i =~ s/^\[|\]$//g; ! ! return $pkg->new($i); } *************** *** 56,65 **** sub is_empty { ! $_[0]->members eq $NULL; } sub has_nonempty_string { my $self = shift; ! $self->members ne $EPSILON and $self->members ne $NULL; } --- 61,70 ---- sub is_empty { ! not defined $_[0]->members; } sub has_nonempty_string { my $self = shift; ! defined $self->members and length $self->members; } |
From: <per...@li...> - 2006-02-24 06:20:30
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27791/lib/FLAT Modified Files: DFA.pm FA.pm NFA.pm Regex.pm Log Message: POD stubs for all public modules, with all method definitions updated Regex.pm for clearer handling of "[foo]" extended characters.. this really needs to be made uniform across all modules, so we always handle input strings, alphabets the same way Index: DFA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/DFA.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DFA.pm 22 Feb 2006 04:58:23 -0000 1.1 --- DFA.pm 24 Feb 2006 06:20:25 -0000 1.2 *************** *** 87,88 **** --- 87,105 ---- 1; + + __END__ + + =head1 NAME + + FLAT::DFA - Deterministic finite automata + + =head1 SYNOPSIS + + A FLAT::DFA object is a finite automata whose transitions are labeled + with single characters. Furthermore, each state has exactly one outgoing + transition for each available label/character. + + =head1 USAGE + + FLAT::DFA is a subclass of FLAT::NFA and its objects provide the same + methods. Index: NFA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/NFA.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NFA.pm 24 Feb 2006 01:04:52 -0000 1.6 --- NFA.pm 24 Feb 2006 06:20:25 -0000 1.7 *************** *** 271,275 **** } - ########## - 1; --- 271,305 ---- } 1; + + __END__ + + =head1 NAME + + FLAT::NFA - Nondeterministic finite automata + + =head1 SYNOPSIS + + A FLAT::NFA object is a finite automata whose transitions are labeled + either wtih characters or the empty string (epsilon). + + =head1 USAGE + + In addition to implementing the interface specified in L<FLAT>, FLAT::NFA + objects provide the following NFA-specific methods: + + =over + + =item $nfa-E<gt>epsilon_closure(@states) + + Returns the set of states (without duplicates) which are reachable from + @states via zero or more epsilon-labeled transitions. + + =item $nfa-E<gt>trace($string) + + Returns a list of N+1 arrayrefs, where N is the length of $string. The + I-th arrayref contains the states which are reachable from the starting + state(s) of $nfa after reading I characters of $string. Correctly accounts + for epsilon transitions. + + =back Index: Regex.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/Regex.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Regex.pm 21 Feb 2006 20:43:09 -0000 1.3 --- Regex.pm 24 Feb 2006 06:20:25 -0000 1.4 *************** *** 100,102 **** __END__ ! TODO: documentation --- 100,171 ---- __END__ ! =head1 NAME ! ! FLAT::Regex - Regular expressions ! ! =head1 SYNOPSIS ! ! A FLAT::Regex object is a regular expression. ! ! =head1 USAGE ! ! In addition to implementing the interface specified in L<FLAT>, FLAT::Regex ! objects provide the following regex-specific methods: ! ! =over ! ! =item FLAT::Regex-E<gt>new($string) ! ! Returns a regex object representing the expression given in $string. C<|> ! and C<+> can both be used to denote alternation. C<*> denotes Kleene star, and ! parentheses can be used for grouping. No other features or shortcut notation ! is currently supported (character classes, {n,m} repetition, etc). ! ! Whitespaces is ignored. To specify a literal space, use C<[ ]>. This syntax ! can also be used to specify atomic "characters" longer than a single ! character. For example, the expression: ! ! [foo]abc[bar]* ! ! is treated as a regular expression over the symbols "a", "b", "c", "foo", ! and "bar". In particular, this means that when the regular expression is ! reversed, "foo" and "bar" remain the same (i.e, they do not become "oof" and ! "rab"). ! ! The empty regular expression (epsilon) is written as C<[]>, and the null ! regular expression (sometimes called phi) is specified with the C<#> ! character. To specify a literal hash-character, use C<[#]>. Including ! literal square bracket characters is currently not supported. ! ! =item $regex-E<gt>as_string ! ! Returns the string representation of the regex, in the same format as above. ! It is NOT necessarily true that ! ! FLAT::Regex->new($string)->as_string ! ! is the same as $string, especially if $string contains unneeded whitespace ! or redundant parentheses. ! ! =item $regex-E<gt>as_perl_regex ! ! Returns an equivalent Perl regular expression. The Perl regex will NOT be ! anchored to the beginning and end of the string. In particular this means ! that ! ! $string =~ $regex->as_perl_regex ! ! and ! ! $regex->contains($string) ! ! may not be equivalent. ! ! The Perl regex will not contain capturing parentheses. "Extended" characters ! that are written as "[stuff]" in FLAT regexes will be written without the ! square brackets in the corresponding Perl regex. So the following: ! ! FLAT::Regex->new("[foo][bar]*")->as_perl_regex ! ! will be equal to "(?:foo(?:bar)*)". ! =back Index: FA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/FA.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FA.pm 23 Feb 2006 19:46:12 -0000 1.7 --- FA.pm 24 Feb 2006 06:20:25 -0000 1.8 *************** *** 304,305 **** --- 304,463 ---- 1; + + __END__ + + =head1 NAME + + FLAT::FA - Base class for regular finite automata + + =head1 SYNOPSIS + + A FLAT::FA object is a collection of states and transitions. Each state + may be labeled as starting or accepting. Each transition between states + is labeled with a transition object. + + =head1 USAGE + + FLAT::FA is a superclass that is not intended to be used directly. However, + it does provide the following methods: + + =head2 Manipulation & Inspection Of States + + =over + + =item $fa-E<gt>get_states + + Returns a list of all the state "names" in $fa. + + =item $fa-E<gt>num_states + + Returns the number of states in $fa. + + =item $fa-E<gt>is_state($state_id) + + Returns a boolean indicating whether $state_id is a recognized state "name." + + =item $fa-E<gt>delete_states(@states) + + Deletes the states given in @states and their corresponding transitions. The + remaining states in the FA may be "renamed" (renumbered)! Return value not + used. + + =item $fa-E<gt>add_states($num) + + Adds $num states to $fa, and returns a list of the new state "names." + + =item $fa-E<gt>get_starting + + =item $fa-E<gt>get_accepting + + Returns a list of all the states which are labeled as starting/accepting, + respectively. + + =item $fa-E<gt>set_accepting(@states) + + =item $fa-E<gt>unset_accepting(@states) + + =item $fa-E<gt>set_starting(@states) + + =item $fa-E<gt>unset_starting(@states) + + Sets/unsets a list of states as being labeled starting/accepting, + respectively. + + =item $fa-E<gt>is_starting($state) + + =item $fa-E<gt>is_accepting($state) + + Returns a boolean indicating whether $state is labeled as starting/accepting, + respectively. + + =item $fa-E<gt>prune + + Deletes the states which are not reachable (via zero or more transitions) + from starting states. Returns a list of the "names" of states that were + deleted. + + =back + + =head2 Manipulation & Inspection Of Transitions + + Each transition between states is a transition object, which knows how + to organize several "labels." Think of this as the mechanism by which + multiple arrows in the state diagram between the same states are collapsed + to a single arrow. This interface is abstracted away into the following + public methods: + + =over + + =item $fa-E<gt>set_transition($state1, $state2, @labels) + + Resets the transition between $state1 and $state2 to a transition + initialized using data @labels. If @labels is omitted or contains + only undefined elements, then the call is equivalent to C<remove_transition>. + + =item $fa-E<gt>add_transition($state1, $state2, @labels) + + Adds @labels to the transition between $state1 and $state2. + + =item $fa-E<gt>get_transition($state1, $state2) + + Returns the transition object stored between $state1 and $state2, or + undef if there is no transition. + + =item $fa-E<gt>remove_transition($state1, $state2) + + Removes the transition object between $state1 and $state2. + + =item $fa-E<gt>successors(\@states) + + =item $fa-E<gt>successors($state) + + =item $fa-E<gt>successors(\@states, $label) + + =item $fa-E<gt>successors($state, $label) + + =item $fa-E<gt>successors(\@states, \@labels) + + =item $fa-E<gt>successors($state, \@labels) + + Given a state/set of states, and one or more labels, returns a list of + the states (without duplicates) reachable from the states via a single + transition having any of the given labels. If no labels are given, returns + the states reachable by any (single) transition. + + Note that this method makes no distinction for epsilon transitions, these + are only special in FLAT::NFA objects. + + =item $fa-E<gt>alphabet + + Returns the list of characters (without duplicates) used among all + transition labels in the automaton. + + =back + + =head2 Conversions To External Formats + + =over + + =item $fa-E<gt>as_graphviz + + Returns a string containing a GraphViz (dot) description of the automaton, + suitable for rendering with your favorite GraphViz layout engine. + + =item $fa-E<gt>as_summary + + Returns a string containing a plaintext description of the automaton, + suitable for debugging purposes. + + =back + + =head2 Miscellaneous + + =over + + =item $fa-E<gt>clone + + Returns an identical copy of $fa. + + =back |
From: <per...@li...> - 2006-02-24 06:20:30
|
Update of /cvsroot/perl-flat/blokhead In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27791 Modified Files: MANIFEST Log Message: POD stubs for all public modules, with all method definitions updated Regex.pm for clearer handling of "[foo]" extended characters.. this really needs to be made uniform across all modules, so we always handle input strings, alphabets the same way Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-flat/blokhead/MANIFEST,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MANIFEST 14 Nov 2005 18:05:03 -0000 1.1 --- MANIFEST 24 Feb 2006 06:20:25 -0000 1.2 *************** *** 5,8 **** --- 5,12 ---- lib/FLAT/Regex/WithNegations.pm lib/FLAT/Regex.pm + lib/FLAT/FA.pm + lib/FLAT/NFA.pm + lib/FLAT/DFA.pm + lib/FLAT/Transition.pm lib/FLAT.pm Makefile.PL |
From: <per...@li...> - 2006-02-24 06:20:30
|
Update of /cvsroot/perl-flat/blokhead/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27791/lib Modified Files: FLAT.pm Log Message: POD stubs for all public modules, with all method definitions updated Regex.pm for clearer handling of "[foo]" extended characters.. this really needs to be made uniform across all modules, so we always handle input strings, alphabets the same way Index: FLAT.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FLAT.pm 24 Feb 2006 00:12:39 -0000 1.4 --- FLAT.pm 24 Feb 2006 06:20:25 -0000 1.5 *************** *** 61,64 **** --- 61,66 ---- 1; + __END__ + =head1 NAME |
From: <per...@li...> - 2006-02-24 01:04:57
|
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 $/; ! } |
From: <per...@li...> - 2006-02-24 01:04:57
|
Update of /cvsroot/perl-flat/blokhead/lib/FLAT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20683/lib/FLAT Modified Files: NFA.pm Log Message: added NFA->contains, NFA->trace methods. now we can actually *use* these regular languages.. Index: NFA.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT/NFA.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NFA.pm 23 Feb 2006 19:46:12 -0000 1.5 --- NFA.pm 24 Feb 2006 01:04:52 -0000 1.6 *************** *** 38,55 **** my $result = $nfas[0]->clone; - my @newstate = ([ $result->get_states ]); ! for (1 .. $#nfas) { ! push @newstate, [ $result->_swallow( $nfas[$_] ) ]; ! } ! my $newstart = $result->add_states(1); ! $result->unset_starting($result->get_states); ! $result->set_starting($newstart); ! for my $nfa_id (0 .. $#nfas) { ! $result->set_transition( $newstart, $newstate[$nfa_id][$_], "" ) ! for $nfas[$nfa_id]->get_starting; ! } $result; --- 38,57 ---- my $result = $nfas[0]->clone; ! $result->_swallow($_) for @nfas[1 .. $#nfas]; ! # my @newstate = ([ $result->get_states ]); ! # for (1 .. $#nfas) { ! # push @newstate, [ $result->_swallow( $nfas[$_] ) ]; ! # } ! ! # my $newstart = $result->add_states(1); ! # $result->unset_starting($result->get_states); ! # $result->set_starting($newstart); ! # for my $nfa_id (0 .. $#nfas) { ! # $result->set_transition( $newstart, $newstate[$nfa_id][$_], "" ) ! # for $nfas[$nfa_id]->get_starting; ! # } $result; *************** *** 179,182 **** --- 181,207 ---- + sub contains { + my ($self, $string) = @_; + + my @active = $self->epsilon_closure( $self->get_starting ); + for my $char (split //, $string) { + return 0 if ! @active; + @active = $self->epsilon_closure( $self->successors(\@active, $char) ); + } + return !! grep { $self->is_accepting($_) } @active; + } + + sub trace { + my ($self, $string) = @_; + + my @trace = ([ $self->epsilon_closure( $self->get_starting ) ]); + + for my $char (split //, $string) { + push @trace, + [ $self->epsilon_closure( $self->successors($trace[-1], $char) ) ]; + } + return @trace; + } + ############ |
From: <per...@li...> - 2006-02-24 00:12:46
|
Update of /cvsroot/perl-flat/blokhead/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20501 Modified Files: FLAT.pm Log Message: initial POD for FLAT.pm -- mostly to test the cvs commit email spammer Index: FLAT.pm =================================================================== RCS file: /cvsroot/perl-flat/blokhead/lib/FLAT.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FLAT.pm 23 Feb 2006 14:26:02 -0000 1.3 --- FLAT.pm 24 Feb 2006 00:12:39 -0000 1.4 *************** *** 60,61 **** --- 60,190 ---- 1; + + =head1 NAME + + FLAT - Formal Language & Automata Toolkit + + =head1 SYNOPSIS + + FLAT.pm is the base class of all regular language objects. For more + information, see other POD pages. + + =head1 USAGE + + All regular language objects in FLAT implement the following methods. + Specific regular language representations (regex, NFA, DFA) may implement + additional methods that are outlined in the repsective POD pages. + + =head2 Conversions Among Representations + + =over + + =item $lang-E<gt>as_nfa + + =item $lang-E<gt>as_dfa + + =item $lang-E<gt>as_min_dfa + + =item $lang-E<gt>as_regex + + Returns an equivalent regular language to $lang in the desired + representation. Does not modify $lang (even if $lang is already in the + desired representation). + + For more information on the specific algorithms used in these conversions, + see the POD pages for a specific representation. + + =back + + =head2 Closure Properties + + =over + + =item $lang1-E<gt>union($lang2, $lang3, ... ) + + =item $lang1-E<gt>intersect($lang2, $lang3, ... ) + + =item $lang1-E<gt>concat($lang2, $lang3, ... ) + + =item $lang1-E<gt>symdiff($lang2, $lang3, ... ) + + Returns a regular language object that is the union, intersection, + concatenation, or symmetric difference of $lang1 ... $langN, respectively. + The return value will have the same representation (regex, NFA, or DFA) + as $lang1. + + =item $lang1-E<gt>difference($lang2) + + Returns a regular language object that is the set difference of $lang1 and + $lang2. Equivalent to + + $lang1->intersect($lang2->complement) + + The return value will have the same representation (regex, NFA, or DFA) + as $lang1. + + =item $lang-E<gt>kleene + + =item $lang-E<gt>star + + Returns a regular language object for the Kleene star of $lang. The return + value will have the same representation (regex, NFA, or DFA) as $lang. + + =item $lang-E<gt>complement + + Returns a regular language object for the complement of $lang. The return + value will have the same representation (regex, NFA, or DFA) as $lang. + + =item $lang-E<gt>reverse + + Returns a regular language object for the stringwise reversal of $lang. + The return value will have the same representation (regex, NFA, or DFA) + as $lang. + + =back + + =head2 Decision Properties + + =over + + =item $lang-E<gt>is_finite + + =item $lang-E<gt>is_infinite + + Returns a boolean value indicating whether $lang represents a + finite/infinite language. + + =item $lang-E<gt>is_empty + + Returns a boolean value indicating whether $lang represents the empty + language. + + =item $lang1-E<gt>equals($lang2) + + Returns a boolean value indicating whether $lang1 and $lang2 are + representations of the same language. + + =item $lang1-E<gt>is_subset_of($lang2) + + Returns a boolean value indicating whether $lang1 is a subset of + $lang2. + + =item $lang-E<gt>contains($string) + + Returns a boolean value indicating whether $string is in the language + represented by $lang. + + =back + + =head1 AUTHORS & ACKNOWLEDGEMENTS + + FLAT is written by Mike Rosulek E<lt>mike at mikero dot comE<gt> and Brett + Estrade E<lt>estradb at mailcan dot comE<gt>. + + Initial version by Brett Estrade was work towards an MS thesis at the + University of Southern Mississippi. + + =head1 LICENSE + + This module is free software; you can redistribute it and/or modify it under + the same terms as Perl itself. |
From: <per...@li...> - 2006-02-24 00:03:45
|
Update of /cvsroot/perl-flat/flat4cpan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15049 Modified Files: MANIFEST Added Files: Makefile.old Log Message: added some tests for RE like there are for PRE ... again, it doesn't test for correctness, just that it works on the users' systems --- NEW FILE: Makefile.old --- # This Makefile is for the FLAT extension to perl. # # It was generated automatically by MakeMaker version # 6.17 (Revision: 1.133) from the contents of # Makefile.PL. Don't edit this file, edit Makefile.PL instead. # # ANY CHANGES MADE HERE WILL BE LOST! # # MakeMaker ARGV: () # # MakeMaker Parameters: # AUTHOR => q[.o0o. <es...@ma...>] # NAME => q[FLAT] # PREREQ_PM => { } # VERSION_FROM => q[lib/FLAT.pm] # --- MakeMaker post_initialize section: # --- MakeMaker const_config section: # These definitions are from config.sh (via /usr/local/lib/perl5/5.8.7/mach/Config.pm) # They may have been overridden via Makefile.PL or on the command line AR = ar CC = cc CCCDLFLAGS = -DPIC -fPIC CCDLFLAGS = -Wl,-R/usr/local/lib/perl5/5.8.7/mach/CORE DLEXT = so DLSRC = dl_dlopen.xs LD = cc LDDLFLAGS = -shared -L/usr/local/lib LDFLAGS = -pthread -Wl,-E -L/usr/local/lib LIBC = LIB_EXT = .a OBJ_EXT = .o OSNAME = freebsd OSVERS = 6.0-beta1 RANLIB = : SITELIBEXP = /usr/local/lib/perl5/site_perl/5.8.7 SITEARCHEXP = /usr/local/lib/perl5/site_perl/5.8.7/mach SO = so EXE_EXT = FULL_AR = /usr/bin/ar VENDORARCHEXP = VENDORLIBEXP = # --- MakeMaker constants section: AR_STATIC_ARGS = cr DIRFILESEP = / NAME = FLAT NAME_SYM = FLAT VERSION = 0.3 VERSION_MACRO = VERSION VERSION_SYM = 0_3 DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" XS_VERSION = 0.3 XS_VERSION_MACRO = XS_VERSION XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" INST_ARCHLIB = blib/arch INST_SCRIPT = blib/script INST_BIN = blib/bin INST_LIB = blib/lib INST_MAN1DIR = blib/man1 INST_MAN3DIR = blib/man3 MAN1EXT = 1 MAN3EXT = 3 INSTALLDIRS = site DESTDIR = PREFIX = /usr/local PERLPREFIX = /usr/local SITEPREFIX = /usr/local VENDORPREFIX = INSTALLPRIVLIB = $(PERLPREFIX)/lib/perl5/5.8.7 DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) INSTALLSITELIB = $(SITEPREFIX)/lib/perl5/site_perl/5.8.7 DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) INSTALLVENDORLIB = DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) INSTALLARCHLIB = $(PERLPREFIX)/lib/perl5/5.8.7/mach DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) INSTALLSITEARCH = $(SITEPREFIX)/lib/perl5/site_perl/5.8.7/mach DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) INSTALLVENDORARCH = DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) INSTALLBIN = $(PERLPREFIX)/bin DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) INSTALLSITEBIN = $(SITEPREFIX)/bin DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) INSTALLVENDORBIN = DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) INSTALLSCRIPT = $(PERLPREFIX)/bin DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) INSTALLMAN1DIR = $(PERLPREFIX)/man/man1 DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) INSTALLSITEMAN1DIR = $(SITEPREFIX)/man/man1 DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) INSTALLVENDORMAN1DIR = DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) INSTALLMAN3DIR = $(PERLPREFIX)/lib/perl5/5.8.7/perl/man/man3 DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) INSTALLSITEMAN3DIR = $(SITEPREFIX)/lib/perl5/5.8.7/man/man3 DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) INSTALLVENDORMAN3DIR = DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) PERL_LIB = /usr/local/lib/perl5/5.8.7 PERL_ARCHLIB = /usr/local/lib/perl5/5.8.7/mach LIBPERL_A = libperl.a FIRST_MAKEFILE = Makefile MAKEFILE_OLD = $(FIRST_MAKEFILE).old MAKE_APERL_FILE = $(FIRST_MAKEFILE).aperl PERLMAINCC = $(CC) PERL_INC = /usr/local/lib/perl5/5.8.7/mach/CORE PERL = /usr/bin/perl FULLPERL = /usr/bin/perl ABSPERL = $(PERL) PERLRUN = $(PERL) FULLPERLRUN = $(FULLPERL) ABSPERLRUN = $(ABSPERL) PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" PERL_CORE = 0 PERM_RW = 644 PERM_RWX = 755 MAKEMAKER = /usr/local/lib/perl5/5.8.7/ExtUtils/MakeMaker.pm MM_VERSION = 6.17 MM_REVISION = 1.133 # FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) # PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) # DLBASE = Basename part of dynamic library. May be just equal BASEEXT. FULLEXT = FLAT BASEEXT = FLAT PARENT_NAME = DLBASE = $(BASEEXT) VERSION_FROM = lib/FLAT.pm OBJECT = LDFROM = $(OBJECT) LINKTYPE = dynamic # Handy lists of source code files: XS_FILES = C_FILES = O_FILES = H_FILES = MAN1PODS = MAN3PODS = lib/FLAT/FA.pm \ lib/FLAT/FA/DFA.pm \ lib/FLAT/FA/NFA.pm \ lib/FLAT/FA/PFA.pm \ lib/FLAT/FA/PRE.pm \ lib/FLAT/FA/RE.pm # Where is the Config information that we are using/depend on CONFIGDEP = $(PERL_ARCHLIB)$(DIRFILESEP)Config.pm $(PERL_INC)$(DIRFILESEP)config.h # Where to build things INST_LIBDIR = $(INST_LIB) INST_ARCHLIBDIR = $(INST_ARCHLIB) INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) INST_STATIC = INST_DYNAMIC = INST_BOOT = # Extra linker info EXPORT_LIST = PERL_ARCHIVE = PERL_ARCHIVE_AFTER = TO_INST_PM = lib/FLAT.pm \ lib/FLAT/FA.pm \ lib/FLAT/FA/DFA.pm \ lib/FLAT/FA/NFA.pm \ lib/FLAT/FA/PFA.pm \ lib/FLAT/FA/PRE.pm \ lib/FLAT/FA/RE.pm PM_TO_BLIB = lib/FLAT/FA/DFA.pm \ blib/lib/FLAT/FA/DFA.pm \ lib/FLAT/FA/PFA.pm \ blib/lib/FLAT/FA/PFA.pm \ lib/FLAT/FA/NFA.pm \ blib/lib/FLAT/FA/NFA.pm \ lib/FLAT/FA/PRE.pm \ blib/lib/FLAT/FA/PRE.pm \ lib/FLAT/FA/RE.pm \ blib/lib/FLAT/FA/RE.pm \ lib/FLAT/FA.pm \ blib/lib/FLAT/FA.pm \ lib/FLAT.pm \ blib/lib/FLAT.pm # --- MakeMaker platform_constants section: MM_Unix_VERSION = 1.42 PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc # --- MakeMaker tool_autosplit section: # Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto AUTOSPLITFILE = $(PERLRUN) -e 'use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)' # --- MakeMaker tool_xsubpp section: # --- MakeMaker tools_other section: SHELL = /bin/sh CHMOD = chmod CP = cp MV = mv NOOP = $(SHELL) -c true NOECHO = @ RM_F = rm -f RM_RF = rm -rf TEST_F = test -f TOUCH = touch UMASK_NULL = umask 0 DEV_NULL = > /dev/null 2>&1 MKPATH = $(PERLRUN) "-MExtUtils::Command" -e mkpath EQUALIZE_TIMESTAMP = $(PERLRUN) "-MExtUtils::Command" -e eqtime ECHO = echo ECHO_N = echo -n UNINST = 0 VERBINST = 0 MOD_INSTALL = $(PERLRUN) -MExtUtils::Install -e 'install({@ARGV}, '\''$(VERBINST)'\'', 0, '\''$(UNINST)'\'');' DOC_INSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e perllocal_install UNINSTALL = $(PERLRUN) "-MExtUtils::Command::MM" -e uninstall WARN_IF_OLD_PACKLIST = $(PERLRUN) "-MExtUtils::Command::MM" -e warn_if_old_packlist # --- MakeMaker makemakerdflt section: makemakerdflt: all $(NOECHO) $(NOOP) # --- MakeMaker dist section: TAR = tar TARFLAGS = cvf ZIP = zip ZIPFLAGS = -r COMPRESS = gzip --best SUFFIX = .gz SHAR = shar PREOP = $(NOECHO) $(NOOP) POSTOP = $(NOECHO) $(NOOP) TO_UNIX = $(NOECHO) $(NOOP) CI = ci -u RCS_LABEL = rcs -Nv$(VERSION_SYM): -q DIST_CP = best DIST_DEFAULT = tardist DISTNAME = FLAT DISTVNAME = FLAT-0.3 # --- MakeMaker macro section: # --- MakeMaker depend section: # --- MakeMaker cflags section: # --- MakeMaker const_loadlibs section: # --- MakeMaker const_cccmd section: # --- MakeMaker post_constants section: # --- MakeMaker pasthru section: PASTHRU = LIB="$(LIB)"\ LIBPERL_A="$(LIBPERL_A)"\ LINKTYPE="$(LINKTYPE)"\ PREFIX="$(PREFIX)"\ OPTIMIZE="$(OPTIMIZE)"\ PASTHRU_DEFINE="$(PASTHRU_DEFINE)"\ PASTHRU_INC="$(PASTHRU_INC)" # --- MakeMaker special_targets section: .SUFFIXES: .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) .PHONY: all config static dynamic test linkext manifest # --- MakeMaker c_o section: # --- MakeMaker xs_c section: # --- MakeMaker xs_o section: # --- MakeMaker top_targets section: all :: pure_all manifypods $(NOECHO) $(NOOP) pure_all :: config pm_to_blib subdirs linkext $(NOECHO) $(NOOP) subdirs :: $(MYEXTLIB) $(NOECHO) $(NOOP) config :: $(FIRST_MAKEFILE) $(INST_LIBDIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) config :: $(INST_ARCHAUTODIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) config :: $(INST_AUTODIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) $(INST_AUTODIR)/.exists :: /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(NOECHO) $(MKPATH) $(INST_AUTODIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(INST_AUTODIR)/.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_AUTODIR) $(INST_LIBDIR)/.exists :: /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(NOECHO) $(MKPATH) $(INST_LIBDIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(INST_LIBDIR)/.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_LIBDIR) $(INST_ARCHAUTODIR)/.exists :: /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(INST_ARCHAUTODIR)/.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR) config :: $(INST_MAN3DIR)$(DIRFILESEP).exists $(NOECHO) $(NOOP) $(INST_MAN3DIR)/.exists :: /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(NOECHO) $(MKPATH) $(INST_MAN3DIR) $(NOECHO) $(EQUALIZE_TIMESTAMP) /usr/local/lib/perl5/5.8.7/mach/CORE/perl.h $(INST_MAN3DIR)/.exists -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_MAN3DIR) help: perldoc ExtUtils::MakeMaker # --- MakeMaker linkext section: linkext :: $(LINKTYPE) $(NOECHO) $(NOOP) # --- MakeMaker dlsyms section: # --- MakeMaker dynamic section: dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) $(NOECHO) $(NOOP) # --- MakeMaker dynamic_bs section: BOOTSTRAP = # --- MakeMaker dynamic_lib section: # --- MakeMaker static section: ## $(INST_PM) has been moved to the all: target. ## It remains here for awhile to allow for old usage: "make static" static :: $(FIRST_MAKEFILE) $(INST_STATIC) $(NOECHO) $(NOOP) # --- MakeMaker static_lib section: # --- MakeMaker manifypods section: POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" POD2MAN = $(POD2MAN_EXE) manifypods : pure_all \ lib/FLAT/FA/DFA.pm \ lib/FLAT/FA/PFA.pm \ lib/FLAT/FA/NFA.pm \ lib/FLAT/FA/PRE.pm \ lib/FLAT/FA/RE.pm \ lib/FLAT/FA.pm \ lib/FLAT/FA/DFA.pm \ lib/FLAT/FA/PFA.pm \ lib/FLAT/FA/NFA.pm \ lib/FLAT/FA/PRE.pm \ lib/FLAT/FA/RE.pm \ lib/FLAT/FA.pm $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW)\ lib/FLAT/FA/DFA.pm $(INST_MAN3DIR)/FLAT::FA::DFA.$(MAN3EXT) \ lib/FLAT/FA/PFA.pm $(INST_MAN3DIR)/FLAT::FA::PFA.$(MAN3EXT) \ lib/FLAT/FA/NFA.pm $(INST_MAN3DIR)/FLAT::FA::NFA.$(MAN3EXT) \ lib/FLAT/FA/PRE.pm $(INST_MAN3DIR)/FLAT::FA::PRE.$(MAN3EXT) \ lib/FLAT/FA/RE.pm $(INST_MAN3DIR)/FLAT::FA::RE.$(MAN3EXT) \ lib/FLAT/FA.pm $(INST_MAN3DIR)/FLAT::FA.$(MAN3EXT) # --- MakeMaker processPL section: # --- MakeMaker installbin section: # --- MakeMaker subdirs section: # none # --- MakeMaker clean_subdirs section: clean_subdirs : $(NOECHO) $(NOOP) # --- MakeMaker clean section: # Delete temporary files but do not touch installed files. We don't delete # the Makefile here so a later make realclean still has a makefile to use. clean :: clean_subdirs -$(RM_RF) ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all $(INST_ARCHAUTODIR)/extralibs.ld perlmain.c tmon.out mon.out so_locations pm_to_blib *$(OBJ_EXT) *$(LIB_EXT) perl.exe perl perl$(EXE_EXT) $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def lib$(BASEEXT).def $(BASEEXT).exp $(BASEEXT).x core core.*perl.*.? *perl.core core.[0-9] core.[0-9][0-9] core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9][0-9] -$(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) # --- MakeMaker realclean_subdirs section: realclean_subdirs : $(NOECHO) $(NOOP) # --- MakeMaker realclean section: # Delete temporary files (via clean) and also delete installed files realclean purge :: clean realclean_subdirs $(RM_RF) $(INST_AUTODIR) $(INST_ARCHAUTODIR) $(RM_RF) $(DISTVNAME) $(RM_F) blib/lib/FLAT/FA/NFA.pm blib/lib/FLAT/FA.pm blib/lib/FLAT/FA/DFA.pm $(MAKEFILE_OLD) blib/lib/FLAT/FA/PFA.pm blib/lib/FLAT/FA/RE.pm blib/lib/FLAT.pm blib/lib/FLAT/FA/PRE.pm $(FIRST_MAKEFILE) # --- MakeMaker metafile section: metafile : $(NOECHO) $(ECHO) '# http://module-build.sourceforge.net/META-spec.html' > META.yml $(NOECHO) $(ECHO) '#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#' >> META.yml $(NOECHO) $(ECHO) 'name: FLAT' >> META.yml $(NOECHO) $(ECHO) 'version: 0.3' >> META.yml $(NOECHO) $(ECHO) 'version_from: lib/FLAT.pm' >> META.yml $(NOECHO) $(ECHO) 'installdirs: site' >> META.yml $(NOECHO) $(ECHO) 'requires:' >> META.yml $(NOECHO) $(ECHO) '' >> META.yml $(NOECHO) $(ECHO) 'distribution_type: module' >> META.yml $(NOECHO) $(ECHO) 'generated_by: ExtUtils::MakeMaker version 6.17' >> META.yml # --- MakeMaker metafile_addtomanifest section: metafile_addtomanifest: $(NOECHO) $(PERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } ' \ -e ' or print "Could not add META.yml to MANIFEST: $${'\''@'\''}\n"' # --- MakeMaker dist_basics section: distclean :: realclean distcheck $(NOECHO) $(NOOP) distcheck : $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck skipcheck : $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck manifest : $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest veryclean : realclean $(RM_F) *~ *.orig */*~ */*.orig # --- MakeMaker dist_core section: dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) $(NOECHO) $(PERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' tardist : $(DISTVNAME).tar$(SUFFIX) $(NOECHO) $(NOOP) uutardist : $(DISTVNAME).tar$(SUFFIX) uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu $(DISTVNAME).tar$(SUFFIX) : distdir $(PREOP) $(TO_UNIX) $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) $(RM_RF) $(DISTVNAME) $(COMPRESS) $(DISTVNAME).tar $(POSTOP) zipdist : $(DISTVNAME).zip $(NOECHO) $(NOOP) $(DISTVNAME).zip : distdir $(PREOP) $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) $(RM_RF) $(DISTVNAME) $(POSTOP) shdist : distdir $(PREOP) $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar $(RM_RF) $(DISTVNAME) $(POSTOP) # --- MakeMaker distdir section: distdir : metafile metafile_addtomanifest $(RM_RF) $(DISTVNAME) $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" # --- MakeMaker dist_test section: disttest : distdir cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL cd $(DISTVNAME) && $(MAKE) $(PASTHRU) cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) # --- MakeMaker dist_ci section: ci : $(PERLRUN) "-MExtUtils::Manifest=maniread" \ -e "@all = keys %{ maniread() };" \ -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \ -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" # --- MakeMaker install section: install :: all pure_install doc_install install_perl :: all pure_perl_install doc_perl_install install_site :: all pure_site_install doc_site_install install_vendor :: all pure_vendor_install doc_vendor_install pure_install :: pure_$(INSTALLDIRS)_install doc_install :: doc_$(INSTALLDIRS)_install pure__install : pure_site_install $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site doc__install : doc_site_install $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site pure_perl_install :: $(NOECHO) $(MOD_INSTALL) \ read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(DESTINSTALLPRIVLIB) \ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ $(INST_BIN) $(DESTINSTALLBIN) \ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ $(SITEARCHEXP)/auto/$(FULLEXT) pure_site_install :: $(NOECHO) $(MOD_INSTALL) \ read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(DESTINSTALLSITELIB) \ $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ $(INST_BIN) $(DESTINSTALLSITEBIN) \ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ $(PERL_ARCHLIB)/auto/$(FULLEXT) pure_vendor_install :: $(NOECHO) $(MOD_INSTALL) \ read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \ write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(DESTINSTALLVENDORLIB) \ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ $(INST_BIN) $(DESTINSTALLVENDORBIN) \ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) doc_perl_install :: $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) -$(NOECHO) $(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLPRIVLIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(DESTINSTALLARCHLIB)/perllocal.pod doc_site_install :: $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) -$(NOECHO) $(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLSITELIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(DESTINSTALLARCHLIB)/perllocal.pod doc_vendor_install :: $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) -$(NOECHO) $(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLVENDORLIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(DESTINSTALLARCHLIB)/perllocal.pod uninstall :: uninstall_from_$(INSTALLDIRS)dirs uninstall_from_perldirs :: $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist uninstall_from_sitedirs :: $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist uninstall_from_vendordirs :: $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist # --- MakeMaker force section: # Phony target to force checking subdirectories. FORCE: $(NOECHO) $(NOOP) # --- MakeMaker perldepend section: # --- MakeMaker makefile section: # We take a very conservative approach here, but it's worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. $(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." $(NOECHO) $(RM_F) $(MAKEFILE_OLD) $(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) -$(MAKE) -f $(MAKEFILE_OLD) clean $(DEV_NULL) || $(NOOP) $(PERLRUN) Makefile.PL $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" $(NOECHO) $(ECHO) "==> Please rerun the make command. <==" false # --- MakeMaker staticmake section: # --- MakeMaker makeaperl section --- MAP_TARGET = perl FULLPERL = /usr/bin/perl $(MAP_TARGET) :: static $(MAKE_APERL_FILE) $(MAKE) -f $(MAKE_APERL_FILE) $@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) $(NOECHO) $(PERLRUNINST) \ Makefile.PL DIR= \ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= # --- MakeMaker test section: TEST_VERBOSE=0 TEST_TYPE=test_$(LINKTYPE) TEST_FILE = test.pl TEST_FILES = t/*.t TESTDB_SW = -d testdb :: testdb_$(LINKTYPE) test :: $(TEST_TYPE) test_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) testdb_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) test_ : test_dynamic test_static :: test_dynamic testdb_static :: testdb_dynamic # --- MakeMaker ppd section: # Creates a PPD (Perl Package Description) for a binary distribution. ppd: $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="0,3,0,0">' > $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <TITLE>$(DISTNAME)</TITLE>' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <ABSTRACT></ABSTRACT>' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <AUTHOR>.o0o. <es...@ma...></AUTHOR>' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <OS NAME="$(OSNAME)" />' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="i386-freebsd-64int" />' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd # --- MakeMaker pm_to_blib section: pm_to_blib: $(TO_INST_PM) $(NOECHO) $(PERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', '\''$(PM_FILTER)'\'')'\ lib/FLAT/FA/DFA.pm blib/lib/FLAT/FA/DFA.pm \ lib/FLAT/FA/PFA.pm blib/lib/FLAT/FA/PFA.pm \ lib/FLAT/FA/NFA.pm blib/lib/FLAT/FA/NFA.pm \ lib/FLAT/FA/PRE.pm blib/lib/FLAT/FA/PRE.pm \ lib/FLAT/FA/RE.pm blib/lib/FLAT/FA/RE.pm \ lib/FLAT/FA.pm blib/lib/FLAT/FA.pm \ lib/FLAT.pm blib/lib/FLAT.pm $(NOECHO) $(TOUCH) $@ # --- MakeMaker selfdocument section: # --- MakeMaker postamble section: # End. Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-flat/flat4cpan/MANIFEST,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MANIFEST 23 Feb 2006 06:42:43 -0000 1.3 --- MANIFEST 24 Feb 2006 00:03:37 -0000 1.4 *************** *** 3,7 **** MANIFEST README ! t/FLAT-FA.t lib/FLAT/FA.pm lib/FLAT/FA/DFA.pm --- 3,9 ---- MANIFEST README ! t/FLAT.t ! t/FLAT-FA-RE.t ! t/FLAT-FA-PRE.t lib/FLAT/FA.pm lib/FLAT/FA/DFA.pm |
From: <per...@li...> - 2006-02-24 00:03:44
|
Update of /cvsroot/perl-flat/flat4cpan/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15049/t Added Files: FLAT-FA-PRE.t FLAT-FA-RE.t FLAT.t Removed Files: FLAT-FA.t Log Message: added some tests for RE like there are for PRE ... again, it doesn't test for correctness, just that it works on the users' systems --- NEW FILE: FLAT.t --- # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl FLAT-FA.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 6; use lib qw(../lib); BEGIN { use_ok('FLAT::FA') }; BEGIN { use_ok('FLAT::FA::DFA') }; BEGIN { use_ok('FLAT::FA::NFA') }; BEGIN { use_ok('FLAT::FA::PFA') }; BEGIN { use_ok('FLAT::FA::RE') }; BEGIN { use_ok('FLAT::FA::PRE') }; --- FLAT-FA.t DELETED --- --- NEW FILE: FLAT-FA-RE.t --- # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl FLAT-FA.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 48; use lib qw(../lib); BEGIN { use_ok('FLAT::FA') }; BEGIN { use_ok('FLAT::FA::DFA') }; BEGIN { use_ok('FLAT::FA::NFA') }; BEGIN { use_ok('FLAT::FA::PFA') }; BEGIN { use_ok('FLAT::FA::RE') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. my $re = FLAT::FA::RE->new(); print "These tests were created using samples/make.tests.pl\n"; $re->set_re("1*"); my @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1*..."); $re->set_re("1|0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1|0..."); $re->set_re("0*0|0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0*0|0..."); $re->set_re("00*0*1*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 00*0*1*..."); $re->set_re("000|1"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 000|1..."); $re->set_re("100*1*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 100*1*..."); $re->set_re("10*11"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 10*11..."); $re->set_re("1110*11*10"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1110*11*10..."); $re->set_re("0010*1001*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 0010*1001*..."); $re->set_re("111011*01"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 111011*01..."); $re->set_re("00|1*0|0010"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 00|1*0|0010..."); $re->set_re("01001|11(1|)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 01001|11(1|)..."); $re->set_re("11*0*110|00*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 11*0*110|00*..."); $re->set_re("0*11*1100*0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0*11*1100*0..."); $re->set_re("101*11|1*0*1"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 101*11|1*0*1..."); $re->set_re("10|0*1100*1101|1100|0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 10|0*1100*1101|1100|0..."); $re->set_re("0100|100001001|0|1|0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0100|100001001|0|1|0..."); $re->set_re("01001|10101001111"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 01001|10101001111..."); $re->set_re("1*1*000|1011110*1011"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 1*1*000|1011110*1011..."); $re->set_re("100100*0|011*11(1*0)0|0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 100100*0|011*11(1*0)0|0..."); $re->set_re("11011(10*11|0100011*)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 11011(10*11|0100011*)..."); $re->set_re("1*0*011|0|1101110|111"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1*0*011|0|1101110|111..."); $re->set_re("1(101|1001|0|1000|111)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 1(101|1001|0|1000|111)..."); $re->set_re("11011*0110101110001000|000100*10100"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 11011*0110101110001000|000100*10100..."); $re->set_re("01(11*11*0*01|1*1|0)010101010|000001|11100|1"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 01(11*11*0*01|1*1|0)010101010|000001|11100|1..."); $re->set_re("10(0*00*0)10001(10*01101100)00*0*11(1)10100"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 10(0*00*0)10001(10*01101100)00*0*11(1)10100..."); $re->set_re("1011|010111|00*0000110110110*0101110"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 1011|010111|00*0000110110110*0101110..."); $re->set_re("0*11*0*000*1*0|10|11*11101010010|11111110*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 0*11*0*000*1*0|10|11*11101010010|11111110*..."); $re->set_re("1*1010100111110|11111(0*110000110|111)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 1*1010100111110|11111(0*110000110|111)..."); $re->set_re("0010000000|000110101|00|1|11111|0*0011"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 0010000000|000110101|00|1|11111|0*0011..."); $re->set_re("10*0010100|10100*010110*01011*0|010011*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 10*0010100|10100*010110*01011*0|010011*..."); $re->set_re("01011110*0*101|110100100|1*100010*111*1"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 01011110*0*101|110100100|1*100010*111*1..."); $re->set_re("1*0100011(111|1|10*0000110*01111101010)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 1*0100011(111|1|10*0000110*01111101010)..."); $re->set_re("1|0011*110*11011|00(1(11|00110*110*0*010*0*01*11)001*01101)0100001000*01*1101101|01|0"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 6, "DFA_min for 1|0011*110*11011|00(1(11|00110*110*0*010*0*01*11)001*01101)0100001000*01*1101101|01|0..."); $re->set_re("1|001|1(1)1*0|0(101|01000|01010111|11(0011|0)0011)00|1(0110*0)01|0|0(01101|000011|0|1*000)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 14, "DFA_min for 1|001|1(1)1*0|0(101|01000|01010111|11(0011|0)0011)00|1(0110*0)01|0|0(01101|000011|0|1*000)..."); $re->set_re("0101000*10101|100(1101|1|0)0|1111101010111*01*1011000011001010*0100010|001|0*"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 9, "DFA_min for 0101000*10101|100(1101|1|0)0|1111101010111*01*1011000011001010*0100010|001|0*..."); $re->set_re("1111*1*10(00|0100*01011011|1|110*010|11*000100010*00(1)1*1(0000(1|0|1010)11101|01(000)))"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 7, "DFA_min for 1111*1*10(00|0100*01011011|1|110*010|11*000100010*00(1)1*1(0000(1|0|1010)11101|01(000)))..."); $re->set_re("1(0(11*1*00|0011)01*1111001*10)01(010111(001101011001|0100110|10)1*01011|001*01(11))"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 10, "DFA_min for 1(0(11*1*00|0011)01*1111001*10)01(010111(001101011001|0100110|10)1*01011|001*01(11))..."); $re->set_re("111|000*010|0(0*00*0|001001111|111111010010)0(1*00)010|011010101001*1111000*011"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 10, "DFA_min for 111|000*010|0(0*00*0|001001111|111111010010)0(1*00)010|011010101001*1111000*011..."); $re->set_re("11|1100011000*10(1110(010111|1001010001*0*110*1|110|01*000110100*0(100*11(010*00))))"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 11|1100011000*10(1110(010111|1001010001*0*110*1|110|01*000110100*0(100*11(010*00))))..."); $re->set_re("10*00|111110(0*010001001100|1*01111|0|00*0001(101010(000)101)111001|0111001*10*0)"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 10*00|111110(0*010001001100|1*01111|0|00*0001(101010(000)101)111001|0111001*10*0)..."); $re->set_re("11100*00000*1001*0|101|0111(0)000|101110011011101|11|0110010001110|001|1|0|111"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 8, "DFA_min for 11100*00000*1001*0|101|0111(0)000|101110011011101|11|0110010001110|001|1|0|111..."); $re->set_re("1*11000000(01000001000(10)1(01*01(10110*001*0110111001|10010|000010111110*11*)))"); @removed = $re->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 1*11000000(01000001000(10)1(01*01(10110*001*0110111001|10010|000010111110*11*)))..."); --- NEW FILE: FLAT-FA-PRE.t --- # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl FLAT-FA.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 81; use lib qw(../lib); BEGIN { use_ok('FLAT::FA') }; BEGIN { use_ok('FLAT::FA::DFA') }; BEGIN { use_ok('FLAT::FA::NFA') }; BEGIN { use_ok('FLAT::FA::PFA') }; BEGIN { use_ok('FLAT::FA::PRE') }; ######################### # Insert your test code below, the Test::More module is use()ed here so read # its man page ( perldoc Test::More ) for help writing this test script. my $pre = FLAT::FA::PRE->new(); $pre->set_pre("1*"); my @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1*..."); $pre->set_pre("0&1*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 0&1*..."); $pre->set_pre("0|1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0|1..."); $pre->set_pre("10*1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 10*1..."); $pre->set_pre("1&1*00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1&1*00..."); $pre->set_pre("111|1*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 111|1*..."); $pre->set_pre("1|1000|0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1|1000|0..."); $pre->set_pre("00&100&1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 8, "DFA_min for 00&100&1..."); $pre->set_pre("10&11*00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 6, "DFA_min for 10&11*00..."); $pre->set_pre("1*1110&0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1*1110&0..."); $pre->set_pre("1*10&100*0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 1*10&100*0..."); $pre->set_pre("01110|00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 01110|00..."); $pre->set_pre("0&1&10&10&01&0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 30, "DFA_min for 0&1&10&10&01&0..."); $pre->set_pre("0|10110|10"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0|10110|10..."); $pre->set_pre("001*1001|1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 001*1001|1..."); $pre->set_pre("0&000(11|0)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0&000(11|0)..."); $pre->set_pre("100&11|00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 100&11|00..."); $pre->set_pre("00101*00*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 00101*00*..."); $pre->set_pre("0*11(11*0&1())"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 0*11(11*0&1())..."); $pre->set_pre("0110*00*1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0110*00*1..."); $pre->set_pre("00000*1|1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 00000*1|1..."); $pre->set_pre("1000|111"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1000|111..."); $pre->set_pre("1(100(1*00))"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1(100(1*00))..."); $pre->set_pre("01*11|010&1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 01*11|010&1..."); $pre->set_pre("0110*10(1)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0110*10(1)..."); $pre->set_pre("0&01|1100"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 0&01|1100..."); $pre->set_pre("10|10&10(0)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 10|10&10(0)..."); $pre->set_pre("1110|011"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1110|011..."); $pre->set_pre("00|0|1*100*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 00|0|1*100*..."); $pre->set_pre("1(101&011)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 1(101&011)..."); $pre->set_pre("0010001*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0010001*..."); $pre->set_pre("0&0|111|10"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 0&0|111|10..."); $pre->set_pre("00|00&110"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 00|00&110..."); $pre->set_pre("00|1110|1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 00|1110|1..."); $pre->set_pre("010011*1*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 010011*1*..."); $pre->set_pre("01&011(01)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 01&011(01)..."); $pre->set_pre("0111|0*1(1)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0111|0*1(1)..."); $pre->set_pre("01&100|10"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 01&100|10..."); $pre->set_pre("11000|00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 11000|00..."); $pre->set_pre("11|0110(1*)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 11|0110(1*)..."); $pre->set_pre("1*01|010&0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1*01|010&0..."); $pre->set_pre("0&001&00|1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 0&001&00|1..."); $pre->set_pre("010&11(1|0)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 010&11(1|0)..."); $pre->set_pre("1*011010&0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 1*011010&0..."); $pre->set_pre("1&1&00101"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 1&1&00101..."); $pre->set_pre("0010|011"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0010|011..."); $pre->set_pre("1110001|0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1110001|0..."); $pre->set_pre("001101(0*)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 001101(0*)..."); $pre->set_pre("000|1*101"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 000|1*101..."); $pre->set_pre("11&01|000*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 11&01|000*..."); $pre->set_pre("0|01&1*110"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 0|01&1*110..."); $pre->set_pre("111001|0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 111001|0..."); $pre->set_pre("00&0&0010*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 10, "DFA_min for 00&0&0010*..."); $pre->set_pre("110*1011"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 110*1011..."); $pre->set_pre("0&1100|10"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 0&1100|10..."); $pre->set_pre("1*0|10011&0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 1*0|10011&0..."); $pre->set_pre("1|010&000"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 1|010&000..."); $pre->set_pre("1*00&10|10"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 5, "DFA_min for 1*00&10|10..."); $pre->set_pre("0001&0(10)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 0001&0(10)..."); $pre->set_pre("01&1&01|0&1"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 6, "DFA_min for 01&1&01|0&1..."); $pre->set_pre("0(0*0*1000)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 0(0*0*1000)..."); $pre->set_pre("111*1&0*01"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 3, "DFA_min for 111*1&0*01..."); $pre->set_pre("00*0|010&1*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 7, "DFA_min for 00*0|010&1*..."); $pre->set_pre("011&1000"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 011&1000..."); $pre->set_pre("01100&00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 01100&00..."); $pre->set_pre("1|0(00|011)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 1|0(00|011)..."); $pre->set_pre("10|0(1|11&0)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 10|0(1|11&0)..."); $pre->set_pre("10010&01()"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 10010&01()..."); $pre->set_pre("1010&11*0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 9, "DFA_min for 1010&11*0..."); $pre->set_pre("01001*00"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 01001*00..."); $pre->set_pre("1*00&10&01|0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 32, "DFA_min for 1*00&10&01|0..."); $pre->set_pre("1*00*1|00*0&0"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 1*00*1|00*0&0..."); $pre->set_pre("0000|0(10)"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 2, "DFA_min for 0000|0(10)..."); $pre->set_pre("010|10&01"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 4, "DFA_min for 010|10&01..."); $pre->set_pre("1000110*"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 1000110*..."); $pre->set_pre("110*1111"); @removed = $pre->to_pfa()->to_nfa()->to_dfa()->minimize(); ok(($#removed+1) == 1, "DFA_min for 110*1111..."); print "These tests were created using samples/make.tests.pl\n"; |
From: <per...@li...> - 2006-02-23 21:05:03
|
Update of /cvsroot/perl-flat/flat4cpan/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4883/lib Modified Files: FLAT.pm Log Message: adding META.yml and working making the little POD there is not suck Index: FLAT.pm =================================================================== RCS file: /cvsroot/perl-flat/flat4cpan/lib/FLAT.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FLAT.pm 21 Feb 2006 14:43:40 -0000 1.1 --- FLAT.pm 23 Feb 2006 21:04:54 -0000 1.2 *************** *** 3,7 **** use vars '$VERSION'; ! $VERSION = 1.00; ## let subclasses implement a minimal set of closure properties. --- 3,7 ---- use vars '$VERSION'; ! $VERSION = 0.3; ## let subclasses implement a minimal set of closure properties. |
From: <per...@li...> - 2006-02-23 21:04:59
|
Update of /cvsroot/perl-flat/flat4cpan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4883 Added Files: META.yml Log Message: adding META.yml and working making the little POD there is not suck --- NEW FILE: META.yml --- # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: FLAT version: 0.3 version_from: lib/FLAT.pm installdirs: site requires: distribution_type: module generated_by: ExtUtils::MakeMaker version 6.17 |
From: <per...@li...> - 2006-02-23 20:43:21
|
Update of /cvsroot/perl-flat/blokhead/dev-scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23678/dev-scripts Modified Files: bdetest.pl Log Message: yet another testwq Index: bdetest.pl =================================================================== RCS file: /cvsroot/perl-flat/blokhead/dev-scripts/bdetest.pl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bdetest.pl 23 Feb 2006 20:39:36 -0000 1.4 --- bdetest.pl 23 Feb 2006 20:43:19 -0000 1.5 *************** *** 9,12 **** my $RE = FLAT::Regex::WithExtraOps->new('ab|c* & (a|b)*'); - # print $RE->as_string; --- 9,11 ---- |
From: <per...@li...> - 2006-02-23 20:39:42
|
Update of /cvsroot/perl-flat/blokhead/dev-scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21443/dev-scripts Modified Files: bdetest.pl Log Message: testing nofification Index: bdetest.pl =================================================================== RCS file: /cvsroot/perl-flat/blokhead/dev-scripts/bdetest.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bdetest.pl 23 Feb 2006 19:55:02 -0000 1.3 --- bdetest.pl 23 Feb 2006 20:39:36 -0000 1.4 *************** *** 9,11 **** --- 9,12 ---- my $RE = FLAT::Regex::WithExtraOps->new('ab|c* & (a|b)*'); + # print $RE->as_string; |