| 1 | ## -*- Mode: CPerl -*- | ||
| 2 | ## | ||
| 3 | ## File: DTA::CAB::Analyzer::Rewrite.pm | ||
| 4 | ## Author: Bryan Jurish <moocow@cpan.org> | ||
| 5 | ## Description: rewrite analysis via Gfsm::XL cascade | ||
| 6 | |||
| 7 | ##============================================================================== | ||
| 8 | ## Package: Analyzer::Rewrite | ||
| 9 | ##============================================================================== | ||
| 10 | package DTA::CAB::Analyzer::Rewrite; | ||
| 11 | use DTA::CAB::Analyzer ':child'; | ||
| 12 | use DTA::CAB::Analyzer::Automaton::Gfsm::XL; | ||
| 13 | use Carp; | ||
| 14 | use strict; | ||
| 15 | our @ISA = qw(DTA::CAB::Analyzer::Automaton::Gfsm::XL); | ||
| 16 | |||
| 17 | ## $obj = CLASS_OR_OBJ->new(%args) | ||
| 18 | ## + object structure: see DTA::CAB::Analyzer::Automaton::Gfsm::XL | ||
| 19 | sub new { | ||
| 20 | my $that = shift; | ||
| 21 | my $aut = $that->SUPER::new( | ||
| 22 | ##-- defaults | ||
| 23 | #analysisClass => 'DTA::CAB::Analyzer::Rewrite::Analysis', | ||
| 24 | |||
| 25 | ##-- analysis selection | ||
| 26 | label => 'rw', | ||
| 27 | analyzeGet => '$_->{exlex} || $_->{msafe} || $_->{$lab} ? qw() : '._am_xlit, | ||
| 28 | wantAnalysisLo => 0, | ||
| 29 | tolowerNI => 1, | ||
| 30 | attInput => 0, | ||
| 31 | attOutput => 0, | ||
| 32 | |||
| 33 | ##-- analysis parameters | ||
| 34 | max_weight => 1e38, | ||
| 35 | #max_weight => [2,0], | ||
| 36 | max_paths => 1, | ||
| 37 | max_ops => -1, | ||
| 38 | |||
| 39 | ##-- verbosity | ||
| 40 | check_symbols => 0, | ||
| 41 | |||
| 42 | ##-- user args | ||
| 43 | @_ | ||
| 44 | ); | ||
| 45 | return $aut; | ||
| 46 | } | ||
| 47 | |||
| 48 | |||
| 49 | 1; ##-- be happy | ||
| 50 | |||
| 51 | __END__ |