pmc2c.pl - PMC compiler
perl pmc2c.pl foo.pmc
Compile the PMC file listed on the command line, producing a corresponding .c file.
The basic syntax of a PMC file is
A preamble, consisting of code to be copied directly to the .c file
pmclass PMCNAME [extends PMCNAME] {
A list of vtable method implementations
The final close }
The vtable method bodies can use the following substitutions:
SELF - Converted to the current PMC object of type PMC*.
INTERP - Converted to the interpreter object.
SELF.method(a,b,c) - calls the vtable method 'method' using the static type of SELF (in other words, calls another method defined in the same file).
DYNSELF.method(a,b,c) - calls the vtable method 'method' using the dynamic type of SELF
DYNSELF(a,b,c) - same as above, but calls the current method
SUPER(a,b,c) - calls the overridden implementation of the current method in the nearest superclass, using the static type of SELF.
DYNSUPER(a,b,c) - as above, but uses the actual dynamic type of SELF.
This program is free software. It is subject to the same license as the Parrot interpreter.
To install Make, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Make
CPAN shell
perl -MCPAN -e shell install Make
For more information on module installation, please visit the detailed CPAN module installation guide.