Untitled
#!/usr/bin/env raku
use v6.d;
grammar G_24_02_a {
token TOP { [<report> \v]+ <report> }
token report { ^^ <level> ** 1..5 $$ }
token level { <value> \h? }
token value { <digit> <digit>? }
}
my $input = chomp q:to/INPUT/;
77 6 4 2 1
1 2 7
9 7 6 7 8
1 3 2 4 5
8 6 4 4 1
12 3 99
INPUT
say G_24_02_a.parse($input);
dd $inputINFO