Skip to content

Instantly share code, notes, and snippets.

@softmoth
Created December 28, 2011 23:02
Show Gist options
  • Save softmoth/1530283 to your computer and use it in GitHub Desktop.
Save softmoth/1530283 to your computer and use it in GitHub Desktop.
whitespace in rule, differs w/ niecza (correct?) vs. nom
grammar G {
rule TOP { ^ <word> ** 2 $ }
rule word { \w+ }
}
say G.parse('take garbage')<word>.map({"«$_»"}).join(', ');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment