Skip to content

Instantly share code, notes, and snippets.

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