Perl 6 Compiler Design and Implementation of the Perl 6 Compiler #16

Subrules

A subrule is defined by simply compiling a rule and then placing it into one of the available lexical, global, or built-in namespaces.

.local pmc p6rule
load_bytecode "PGE.pbc"
p6rule = find_global "PGE", "p6rule"

$P0 = p6rule("\d+")
store_global "integer", $P0               # define <integer> rule
Copyright © 2005 Patrick R. Michaud