Language::Zcode::Parser::Generic

Base class for Z-code parsers.

A Parser reads and parses a Z-code file into a big Perl hash.

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

Everything else is done in pure Perl.

new (class, args...)

Base class does nothing with args

find_zfile (filename)

If the input filename is not found AND the user did not enter, e.g., '.z5' at the end of the filename, the system will try to find a file ending with .z[1-9] or .dat.

Multiple or no matches -> return false

read_memory (infile)

Reads the given Z-code file into memory

parse_header

Parse Z-code header.

Creates %Constants, which stores a bunch of constants like the Z version number, where in memory things are stored, etc.