Skip to content

Instantly share code, notes, and snippets.

@msporleder
Created January 11, 2016 14:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save msporleder/e40b5feac1c9eb83383e to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
use v6;
my $one = "hello one two three";
my token wordspace { (\w+\s) }
my token para { (\n ** 2..*) <?before \w> }
my token literal { (^^\s+\w$$) }
say "parsing";
if $one ~~ m/[<para>*||<literal>*||<wordspace>*]+/ {
say "yes";
}
say "it's over";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment