NAME ^

pugscapture.pmc - Pugs Capture

DESCRIPTION ^

PugsCapture extends Siva (currently in-lined) to provide a Perl 6 Capture object.

(The following is from the original Siva PMC by Stephane Payrard)

Siva is a type that acts as a hash, array , string scalar, int scalar. It is intended as the type for nodes of attributed trees These attributed trees may probably be of various kinds such as parse trees and XML trees. The intensive use of context should minimize explicit structure walking at the level of assembly code.

Hashes and arrays are allocated only when needed.

static STRING *make_hash_key(Interp *interpreter, PMC *key)

Returns a Parrot string for *key.

static PMC *undef(Interp *interpreter)

Returns a PerlUndef PMC.

static PMC *retval(Interp *interp, void *ret)

Processes *ret, returning the appropriate PMC, or raising an exception if necessary.

static PMC *Parrot_Array_set_pmc_ptr(Interp *interp, List *list, INTVAL key)

Returns a pointer to the element at index key of *list. If this element was previously empty, then this function also creates and assigns an "undef" PMC (currently a PerlUndef, but this may change) to that element.


parrot