NAME ^

HLLCompiler - base class for HLL compiler objects

DESCRIPTION ^

This file implements a HLLCompiler class of objects used for creating HLL compilers. It provides the standard methods required for all compilers, as well as some standard scaffolding for running compilers from a command line.

Methods ^

register(string name, pmc compsub)

Registers this compiler object as name and using compsub as the subroutine to call for performing compilation.

compile(PMC source, PMC adverbs :slurpy :named)

Compile source according to any options given by adverbs. If no compiler has been registered via compsub above, then simply return source.

parse_name(STRING name)

Split name into its component namespace parts. The default is simply to split based on double-colons.

command_line(PMC args)

Generic method for compilers invoked from a shell command line.


parrot