| 1 | package Algorithm::ConstructDFA; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use 5.012000; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use base qw(Exporter); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use Storable qw/freeze thaw/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 8 | 3 | ▶ | use List::UtilsBy qw/partition_by/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use List::MoreUtils qw/uniq/; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 3 | ▶ | use Data::AutoBimap; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 3 | ▶ | use Memoize; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | 3 | our $VERSION = '0.03'; | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 3 | our %EXPORT_TAGS = ( 'all' => [ qw( | |||||||||||||||||||||||||||
| 16 | construct_dfa | ||||||||||||||||||||||||||||
| 17 | ) ] ); | ||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 3 | our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 3 | our @EXPORT = qw( | |||||||||||||||||||||||||||
| 22 | construct_dfa | ||||||||||||||||||||||||||||
| 23 | ); | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | 3 | local $Storable::canonical = 1; | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | 84 | ▶ | sub _memoizess { | ||||||||||||||||||||||||||
|
Subroutine
_memoizess: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 28 | 84 | my ($sub) = @_; | |||||||||||||||||||||||||||
| 29 | 84 | my %cache; | |||||||||||||||||||||||||||
| 30 | 19872 | ▶ | return sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||
| 31 | 19872 | my ($s) = @_; | |||||||||||||||||||||||||||
| 32 | 19872 | ▶ | if (not exists $cache{$s}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 33 | 694 | $cache{$s} = $sub->($s); | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | 19872 | return $cache{$s}; | |||||||||||||||||||||||||||
| 36 | 84 | }; | |||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 28 | ▶ | sub _get_graph { | ||||||||||||||||||||||||||
|
Subroutine
_get_graph: called CC=22 SCAR=30.9
| |||||||||||||||||||||||||||||
| 40 | 28 | my ($roots, $labelf, $nullablef, $successorsf, $acceptingf) = @_; | |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | 28 | my $m = Data::AutoBimap->new(); | |||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | 28 | ▶ | my $label = _memoizess(sub { $labelf->($m->n2s($_[0])) }); | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 342 | ▶ | my $successors = memoize(sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 47 | 342 | map { $m->s2n($_) } $successorsf->($m->n2s($_[0])) | |||||||||||||||||||||||||||
| 48 | 28 | }); | |||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | 952 | ▶ | my $accepting = sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 51 | 952 | !!$acceptingf->(map { $m->n2s($_) } @_) | |||||||||||||||||||||||||||
| 52 | 28 | }; | |||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | 28 | my %nullable; | |||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||
| 56 | 342 | ▶ | my $nullable = _memoizess(sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 57 | 342 | !!$nullablef->($m->n2s($_[0])); | |||||||||||||||||||||||||||
| 58 | 28 | }); | |||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | 10 | ▶ | my $all_reachable_and_self = _memoizess(sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||
| 61 | 10 | my ($v) = @_; | |||||||||||||||||||||||||||
| 62 | 10 | my %seen; | |||||||||||||||||||||||||||
| 63 | 10 | my @todo = ($v); | |||||||||||||||||||||||||||
| 64 | 10 | ▶ | while (@todo) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 65 | 59 | my $c = pop @todo; | |||||||||||||||||||||||||||
| 66 | 59 | ▶ | next if $seen{$c}++; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 67 | 51 | ▶ | push @todo, $successors->($c) if $nullable->($c); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||
| 69 | 10 | [keys %seen]; | |||||||||||||||||||||||||||
| 70 | 28 | }); | |||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||
| 72 | 1409 | ▶ | my $all_reachable_and_self_many = sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=4 SCAR=13.9
| |||||||||||||||||||||||||||||
| 73 | 1409 | my %seen; | |||||||||||||||||||||||||||
| 74 | 1409 | my @todo = (@_); | |||||||||||||||||||||||||||
| 75 | 1409 | ▶ | while (@todo) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 76 | 16602 | my $c = pop @todo; | |||||||||||||||||||||||||||
| 77 | 16602 | ▶ | next if $seen{$c}++; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 78 | 12243 | ▶ | push @todo, $successors->($c) if $nullable->($c); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||
| 80 | 1409 | keys %seen; | |||||||||||||||||||||||||||
| 81 | 28 | }; | |||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||
| 83 | my $start = [ | ||||||||||||||||||||||||||||
| 84 | 84 | sort { $a cmp $b } | |||||||||||||||||||||||||||
| 85 | uniq map { | ||||||||||||||||||||||||||||
| 86 | 28 | ▶ | $nullable->($_) ? @{ $all_reachable_and_self->($_) } : $_ | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||
| 88 | 28 | map { $m->s2n($_) } | |||||||||||||||||||||||||||
| 89 | @$roots | ||||||||||||||||||||||||||||
| 90 | ]; | ||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||
| 92 | 28 | my $start_s = join ' ', @$start; | |||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | 28 | my @todo = ($start); | |||||||||||||||||||||||||||
| 95 | 28 | my %seen; | |||||||||||||||||||||||||||
| 96 | my $dfa; | ||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||
| 98 | 28 | my @accepting_dfa_states; | |||||||||||||||||||||||||||
| 99 | 28 | my %predecessors; | |||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||
| 101 | 28 | ▶ | while (@todo) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 102 | 1437 | my $src = pop @todo; | |||||||||||||||||||||||||||
| 103 | 1437 | my @src = @{ $src }; | |||||||||||||||||||||||||||
| 104 | 1437 | my $src_s = join ' ', @src; | |||||||||||||||||||||||||||
| 105 | 1437 | ▶ | next if $seen{$src_s}++; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | 484 | my $src_accepts = $accepting->(@src); | |||||||||||||||||||||||||||
| 108 | 484 | ▶ | push @accepting_dfa_states, $src_s if $src_accepts; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | 3770 | ▶ | my %p = partition_by { $label->($_) } | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 111 | 484 | grep { defined $label->($_) } @src; | |||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||
| 113 | 484 | ▶ | while (my ($k, $v) = each %p) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 114 | 30978 | my @dst = sort { $a cmp $b } uniq | |||||||||||||||||||||||||||
| 115 | 1409 | $all_reachable_and_self_many->(map { $successors->($_) } @$v); | |||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||
| 117 | 1409 | push @todo, \@dst; | |||||||||||||||||||||||||||
| 118 | 1409 | my $dst_s = join ' ', @dst; | |||||||||||||||||||||||||||
| 119 | 1409 | $dfa->{$src_s}->{$k} = $dst_s; | |||||||||||||||||||||||||||
| 120 | 1409 | $predecessors{$dst_s}->{$src_s}++; | |||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||
| 124 | 28 | my %reachable = do { | |||||||||||||||||||||||||||
| 125 | 28 | my %seen; | |||||||||||||||||||||||||||
| 126 | 28 | my @todo = @accepting_dfa_states; | |||||||||||||||||||||||||||
| 127 | 28 | ▶ | while (@todo) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 128 | 1481 | my $c = pop @todo; | |||||||||||||||||||||||||||
| 129 | 1481 | ▶ | next if $seen{$c}++; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 130 | 440 | push @todo, keys %{ $predecessors{$c} }; | |||||||||||||||||||||||||||
| 131 | } | ||||||||||||||||||||||||||||
| 132 | 28 | map { $_ => 1 } keys %seen; | |||||||||||||||||||||||||||
| 133 | }; | ||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||
| 135 | 28 | my $o = Data::AutoBimap->new(start => 0); | |||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||
| 137 | # Ensure that DFA state 0 is the one that corresponds to no | ||||||||||||||||||||||||||||
| 138 | # vertices in the input graph. This is an API convention and | ||||||||||||||||||||||||||||
| 139 | # does not have significance beyond that. | ||||||||||||||||||||||||||||
| 140 | 28 | my $r = { $o->s2n('') => { | |||||||||||||||||||||||||||
| 141 | Combines => [], | ||||||||||||||||||||||||||||
| 142 | Accepts => $accepting->() | ||||||||||||||||||||||||||||
| 143 | } }; | ||||||||||||||||||||||||||||
| 144 | |||||||||||||||||||||||||||||
| 145 | # Ensure start state is 1 also as a convention | ||||||||||||||||||||||||||||
| 146 | 28 | $o->s2n($start_s); | |||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||
| 148 | 28 | ▶ | while (my ($src, $x) = each %$dfa) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||
| 150 | # Merge dead states | ||||||||||||||||||||||||||||
| 151 | 459 | ▶ | $src = '' unless $reachable{$src}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||
| 153 | 459 | my @src_combines = map { $m->n2s($_) } split/ /, $src; | |||||||||||||||||||||||||||
| 154 | 459 | ▶ | $r->{$o->s2n($src)}{Combines} //= \@src_combines; | ||||||||||||||||||||||||||
|
Condition100%2/2
$$r{$o->s2n($src)}{"Combines"} //= \@src_combines
MC/DC100%1/1
$$r{$o->s2n($src)}{"Combines"} //= \@src_combines
$$r{$o->s2n($src)}{"Combines"}
Truth table100%2/2
A
A= $$r{$o->s2n($src)}{"Combines"}
| |||||||||||||||||||||||||||||
| 155 | 0 | $r->{$o->s2n($src)}{Combines} = [ sort { $a cmp $b } | |||||||||||||||||||||||||||
| 156 | 459 | ▶ | uniq (@{$r->{$o->s2n($src)}{Combines} // []}, @src_combines) ] | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$$r{$o->s2n($src)}{"Combines"} // []
MC/DC0%0/1
$$r{$o->s2n($src)}{"Combines"} // []
$$r{$o->s2n($src)}{"Combines"}
Truth table50%1/2
A
A= $$r{$o->s2n($src)}{"Combines"}
| |||||||||||||||||||||||||||||
| 157 | if $src eq ''; | ||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||
| 159 | $r->{$o->s2n($src)}{Accepts} //= | ||||||||||||||||||||||||||||
| 160 | 459 | ▶ | 0 + $accepting->(split/ /, $src); | ||||||||||||||||||||||||||
|
Condition100%2/2
$$r{$o->s2n($src)}{"Accepts"} //= 0 + &$accepting(split(/ /u, $src, 0))
MC/DC100%1/1
$$r{$o->s2n($src)}{"Accepts"} //= 0 + &$accepting(split(/ /u, $src, 0))
$$r{$o->s2n($src)}{"Accepts"}
Truth table100%2/2
A
A= $$r{$o->s2n($src)}{"Accepts"}
| |||||||||||||||||||||||||||||
| 161 | |||||||||||||||||||||||||||||
| 162 | 459 | ▶ | while (my ($k, $dst) = each %{$x}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||
| 164 | 1409 | ▶ | $dst = '' unless $reachable{$dst}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||
| 166 | 1409 | $r->{$o->s2n($src)}{NextOver}{$k} = $o->s2n($dst); | |||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||
| 168 | 1409 | ▶ | if ((not defined $r->{$o->s2n($dst)}{Combines}) or $dst eq '') { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not defined $$r{$o->s2n($dst)}{"Combines"} or $dst eq ""
MC/DC100%2/2
not defined $$r{$o->s2n($dst)}{"Combines"} or $dst eq ""
not defined $$r{$o->s2n($dst)}{"Combines"}
$dst eq ""
Truth table100%3/3
not(A) or B
A= not defined $$r{$o->s2n($dst)}{"Combines"}B= $dst eq ""
| |||||||||||||||||||||||||||||
| 169 | 408 | my @dst_combines = map { $m->n2s($_) } split/ /, $dst; | |||||||||||||||||||||||||||
| 170 | 408 | ▶ | $r->{$o->s2n($dst)}{Combines} //= \@dst_combines; | ||||||||||||||||||||||||||
|
Condition100%2/2
$$r{$o->s2n($dst)}{"Combines"} //= \@dst_combines
MC/DC100%1/1
$$r{$o->s2n($dst)}{"Combines"} //= \@dst_combines
$$r{$o->s2n($dst)}{"Combines"}
Truth table100%2/2
A
A= $$r{$o->s2n($dst)}{"Combines"}
| |||||||||||||||||||||||||||||
| 171 | 0 | $r->{$o->s2n($dst)}{Combines} = [ sort { $a cmp $b } | |||||||||||||||||||||||||||
| 172 | 408 | ▶ | uniq (@{$r->{$o->s2n($dst)}{Combines} // []}, @dst_combines) ] | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition50%1/2
$$r{$o->s2n($dst)}{"Combines"} // []
MC/DC0%0/1
$$r{$o->s2n($dst)}{"Combines"} // []
$$r{$o->s2n($dst)}{"Combines"}
Truth table50%1/2
A
A= $$r{$o->s2n($dst)}{"Combines"}
| |||||||||||||||||||||||||||||
| 173 | if $dst eq ''; | ||||||||||||||||||||||||||||
| 174 | } | ||||||||||||||||||||||||||||
| 175 | |||||||||||||||||||||||||||||
| 176 | $r->{$o->s2n($dst)}{Accepts} //= | ||||||||||||||||||||||||||||
| 177 | 1409 | ▶ | 0 + $accepting->(split/ /, $dst); | ||||||||||||||||||||||||||
|
Condition100%2/2
$$r{$o->s2n($dst)}{"Accepts"} //= 0 + &$accepting(split(/ /u, $dst, 0))
MC/DC100%1/1
$$r{$o->s2n($dst)}{"Accepts"} //= 0 + &$accepting(split(/ /u, $dst, 0))
$$r{$o->s2n($dst)}{"Accepts"}
Truth table100%2/2
A
A= $$r{$o->s2n($dst)}{"Accepts"}
| |||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||||
| 180 | |||||||||||||||||||||||||||||
| 181 | 28 | return $r; | |||||||||||||||||||||||||||
| 182 | } | ||||||||||||||||||||||||||||
| 183 | |||||||||||||||||||||||||||||
| 184 | 28 | ▶ | sub construct_dfa { | ||||||||||||||||||||||||||
|
Subroutine
construct_dfa: called CC=10 SCAR=25.7
Pod
documented
| |||||||||||||||||||||||||||||
| 185 | 28 | my (%o) = @_; | |||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||
| 187 | 28 | ▶ | die unless ref $o{is_nullable}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 188 | 28 | ▶ | die unless ref $o{is_accepting} or exists $o{final}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $o{"is_accepting"} or exists $o{"final"}
MC/DC0%0/2
ref $o{"is_accepting"} or exists $o{"final"}
ref $o{"is_accepting"}
exists $o{"final"}
Truth table33%1/3
A or B
A= ref $o{"is_accepting"}B= exists $o{"final"}
| |||||||||||||||||||||||||||||
| 189 | 28 | ▶ | die unless ref $o{successors}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 190 | 28 | ▶ | die unless ref $o{get_label}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 191 | 28 | ▶ | die unless exists $o{start}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 192 | 28 | ▶ | die if ref $o{is_accepting} and exists $o{final}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
ref $o{"is_accepting"} and exists $o{"final"}
MC/DC0%0/2
ref $o{"is_accepting"} and exists $o{"final"}
ref $o{"is_accepting"}
exists $o{"final"}
Truth table33%1/3
A and B
A= ref $o{"is_accepting"}B= exists $o{"final"}
| |||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||
| 194 | 28 | ▶ | if (exists $o{final}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 195 | 28 | my %in_final = map { $_ => 1 } @{ $o{final} }; | |||||||||||||||||||||||||||
| 196 | 952 | ▶ | $o{is_accepting} = sub { | ||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 197 | 952 | grep { $in_final{$_} } @_ | |||||||||||||||||||||||||||
| 198 | 28 | }; | |||||||||||||||||||||||||||
| 199 | } | ||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||
| 201 | _get_graph($o{start}, $o{get_label}, $o{is_nullable}, | ||||||||||||||||||||||||||||
| 202 | 28 | $o{successors}, $o{is_accepting}); | |||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||
| 204 | } | ||||||||||||||||||||||||||||
| 205 | |||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||
| 207 | 3 | 1; | |||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||
| 209 | __END__ | ||||||||||||||||||||||||||||