Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created October 29, 2009 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmichaud/221691 to your computer and use it in GitHub Desktop.
Save pmichaud/221691 to your computer and use it in GitHub Desktop.
$ cat x
grammar ABC {
regex TOP {
abc
:my $*XYZ := 4;
{
if $*XYZ {
say("Darnit, it's about time that we");
say('had closures in regexes.');
say('');
say($*XYZ);
}
}
}
}
ABC.parse('abc');
$ ./nqp x
Darnit, it's about time that we
had closures in regexes.
4
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment