$e->{OutTop} = $1 eq 'nothing' ? '' : $1;
} elsif (# parse: expect other wordish things to be comments
m{^(?!or\b)\w{2,} }) {
+ } elsif (# adhoc: slightly special case for $(eval $(call
+ m{^\$\{.*}) {
+ $e->{Out} .= ' '.$&;
} elsif (m/^$/) {
} else {
confess "unk rhs $_ ?";
oh "${senl}# ----- $what starts -----\n";
foreach my $e (@exp) {
next unless $filter->($e);
- my $rubric = $e->{In};
- $rubric =~ s/\&/AMP /g;
- $rubric =~ s/\$/DOLLAR /g;
- $rubric =~ s/NEWQUOTE/NEW_QUOTE /g;
- my $f = $e->{In} =~ m/\n/
- ? "\n# %s:\n%s\n\n"
- : "%-30s: %s.\n";
+ my $desc = $e->{In};
+ $desc =~ s/\&/AMP /g;
+ $desc =~ s/\$/DOLLAR /g;
+ $desc =~ s/NEWQUOTE/NEW_QUOTE /g;
+ my ($f,$pdesc) = $desc =~ m/^(.*)\n/
+ ? ("\n# %s:\n%s\n\n", $1)
+ : ("%-30s: %s .\n", $desc);
my $o;
$o = $e->{OutTop} if $dir_prefix eq '';
$o //= $e->{Out};
$o =~ s{/sub/dir}{} if $dir_prefix eq '' && !defined $e->{OutTop};
$o = $omap->($o, $e);
- oi sprintf $f, $rubric, $e->{In};
- oo sprintf $f, $rubric, $o;
+ oi sprintf $f, $pdesc, $e->{In};
+ oo sprintf $f, $pdesc, $o;
}
oi $end;
oh "${senl}# ----- $what ends -----\n";
'dollar doubling',
sub {
my ($e) = @_;
+ # adhoc: skip &:macro in already-doubling part
+ return 0 if $e->{In} =~ m{^\&\:macro};
+ # adhoc: skip &${ ie eval in already-doubling part
+ return 0 if $e->{In} =~ m{^\&\$\{};
return 0 if $e->{CQ};
return $e->{DD} || !grep {
# If there are two entries with the same In,