Skip to content

Instantly share code, notes, and snippets.

Created July 12, 2011 16:09
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 anonymous/1078299 to your computer and use it in GitHub Desktop.
Save anonymous/1078299 to your computer and use it in GitHub Desktop.
pmichaud@kiwi:~/qregex$ cat z
grammar ABC {
regex abc { abc }
regex def { <?alpha> . }
}
my $cursor := ABC."!cursor_init"('9abc', :c(0));
my $c := $cursor.def();
_dumper($c.MATCH);
pmichaud@kiwi:~/qregex$ ./nqpq z
"VAR1" => PMC 'NQPMatch' {
NQPMatch::$!orig => "9abc"
NQPMatch::$!from => 1
NQPMatch::$!to => 2
NQPMatch::$!ast => null
NQPMatch::$!cursor => null
NQPCapture::@!array => ResizablePMCArray (size:0) [
]
NQPCapture::%!hash => Hash {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment