4 use Term
::ANSIColor
qw(:constants);
7 open(my $actions,shift);
10 if (/^### (.*?)\s*$/) {
13 $actions{$action} .= $_;
19 if (/(?:regex|rule|token) \s+ ([:\w]+?(?:sym<.*?>)?)\s/x) {
21 # $name =~ s/:sym<(.*)>/$1/;
22 # warn YELLOW,"$name",RESET;
24 if (/\{\*\} .*? (?:\#=(.*))?$/x) {
26 my $full_name = $name . $tag;
27 # warn "inserting ".GREEN.$full_name.RESET."\n".$_ if $actions{$full_name};
28 # warn "not inserting <".RED.$full_name.RESET.">" unless $actions{$full_name};
29 my $content = $actions{$full_name} // "*";