Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created November 16, 2011 20:15
Show Gist options
  • Save jnthn/1371220 to your computer and use it in GitHub Desktop.
Save jnthn/1371220 to your computer and use it in GitHub Desktop.
grammar Foo {
token TOP { <val> }
proto token val { <*> }
token val:sym<num> { <[0..9]> '.' <[0..9]> }
token val:sym<int> { <[0..9]> }
}
say(~Foo.parse('1.2'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment