Embedded PIR
PGE lets us embed PIR into regexes using {{..}}:
regex integer { \d+ {{ print "found an integer " say match }} } regex addop { [ '+' | '-' ] {{ print "found an addop " say match }} }
The inline PIR is executed at the point where it's encountered in the match.