Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created April 27, 2016 01:53
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 zoffixznet/cff6ca52a02976488721281c32d0d778 to your computer and use it in GitHub Desktop.
Save zoffixznet/cff6ca52a02976488721281c32d0d778 to your computer and use it in GitHub Desktop.
grammar MM {
TOP { [<bold> | <italic> | . ]+ }
token bold { '**' <-[*]>+ '**' }
token italic { '*' <-[*]>+ '*' }
}
my $parse = MM.parse: 'This is **bold** and this is *italic*';
say $parse;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment