#!/usr/bin/perl6
sub MAIN {
    grammar TcronGrammar {
        token TOP       { \n* <crontask>+ }
        token crontask  { <recursive>? <path> }
        token recursive { \*\s+ }
        token path      { .* }
    };

    class TcronGrammar-actions {
        method TOP ($/) {
            make { path      => $<path>.Str,
                   recursive => $<recursive>.made.Bool}
        }

        method recursive($/) { make $/.trim.Str eq '*'; }
    }

    my $conf-match = TcronGrammar.parse("* /tmp/sdl/SDL2-2.0.5\n/tmp/sdl/SDL2-2.0.5"); #, actions => TcronGrammar-actions.new).made;
    say $conf-match;
}
