NAME

Language::Zcode::Parser - reads and parses a Z-code file into a big Perl hash

SYNOPSIS

# Create a Pure Perl Parser
my $pParser = new Language::Zcode::Parser "Perl";

# If they didn't put ".z5" at the end, find it anyway
$infile = $pParser->find_zfile($infile) || exit;

# Read in the file, store it in memory
$pParser->read_memory($infile);

# Parse header of the Z-file
$pParser->parse_header();

# Get the subroutines in the file (LZ::Parser::Routine objects)
my @subs = $pParser->find_subs($infile);

DESCRIPTION

For finding where the subroutines start and end, you can either depend on an external call to txd, a 1992 C program available at ifarchive.org, or a pure Perl version.

Everything else is done in pure Perl.

new (class, how to find subs, args...)

This is a factory method. Called with 'Perl' or 'TXD' (or 'txd') as arguments, it will create Parsers of LZ::Parser::Perl or LZ::Parser::TXD, which are subclasses of LZ::Parser::Generic.

That class' 'new' method will be called with any other passed-in args.