Skip to content

Instantly share code, notes, and snippets.

@diakopter
Created May 29, 2012 06:50
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 diakopter/2823010 to your computer and use it in GitHub Desktop.
Save diakopter/2823010 to your computer and use it in GitHub Desktop.
grammar A {
token TOP { <a> };
token a { a }
};
class A::A {
method TOP($/) { say :$<a> }
};
A.parse('a', :actions(A::A));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment