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

A longer expression parse tree

$P1 = $P0("c = (a + b) * 4")
$P1."dump"("$/")

produces

$/: <c = (a + b) * 4 @ 0> 
$/<opparse>: <c = (a + b) * 4 @ 0> opname=infix:=
$/<opparse><token>: <= @ 2> 
$/<opparse><args>[0]: <c @ 0> 
$/<opparse><args>[1]: <(a + b) * 4 @ 4> opname=infix:*
$/<opparse><args>[1]<token>: <* @ 12> 
$/<opparse><args>[1]<args>[0]: <(a + b) @ 4> opname=circumfix:( )
$/<opparse><args>[1]<args>[0]<token>: <( @ 4>
$/<opparse><args>[1]<args>[0]<args>[0]: <a + b @ 5> opname=infix:+
$/<opparse><args>[1]<args>[0]<args>[0]<token>: <+ @ 7> 
$/<opparse><args>[1]<args>[0]<args>[0]<args>[0]: <a @ 5> 
$/<opparse><args>[1]<args>[0]<args>[0]<args>[1]: <b @ 9> 
$/<opparse><args>[1]<args>[1]: <4 @ 12> 
Copyright © 2005 Patrick R. Michaud