The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#rule xxx :P5 {.*}
#rule _word :P5 {^([_[:alnum:]]+)}

macro statement_control:<aaa> ( $a ) is parsed ( /
    <?ws>? \( <?ws>? $a := (.*?) <?ws>? \) <?ws>? \;
/ ) 
{ 
    return '$a' ; 
}

macro statement_control:<sum> () is parsed ( /
    <?ws>? \( <?ws>? $a := (.*?) <?ws>? \+ <?ws>? $b := (.*?) <?ws>? \) <?ws>? \;
/ ) 
{ 
    return ' $a infix:<+> $b ; say \'ok\'; '   ; 
}

'1' infix:<+> '1';
'1' infix:<*> '1';
'1' infix:<+> '1' infix:<*> '1';
'1' infix:<*> '1' infix:<+> '1';

statement_control:<sum> ( 2 + 4 );
statement_control:<aaa> ( say 'something'; );

statement_control:<if> ( '1' ) { say '<if> is ok!'; }
statement_control:<if> ( '0' ) { say '<if> is not ok :('; }

my $a;
print 'hello, ';
say 'world!';
{ say 'in block'; }
warn 'hi';
...;