- elsif (m{^(?=$caps_re)}) { o $var_prefix }
- elsif (m{^(?=$lc_re)}) { o $dir_prefix }
- elsif (s{^_}{}) { o $var_prefix }
- elsif (s{^/}{}) { o $dir_prefix }
- elsif (s{^=_}{}) { o $var_prefix }
- elsif (s{^=/}{}) { o $dir_name }
- elsif (s{^\^}{}) { o "\$(top_srcdir)${dir_suffix}" }
- elsif (s{^\}}{}) { o "\$(abs_top_srcdir)${dir_suffix}" }
- elsif (s{^(?:[ \t]+([~^]))?(?=[ \t])}{}) {
- my $prefix =
- !$1 ? $dir_prefix :
- $1 eq '~' ? '$(abs_top_srcdir)'.$dir_suffix :
- $1 eq '~' ? '$(abs_top_srcdir)'.$dir_suffix :
- die;
+ if (s{^\\$esc}{}) { od "$$esclitr" }
+ elsif (s{^\\\$}{}) { oud '$' }
+ elsif (s{^\\\s+$}{}) { }
+ elsif (s{^$esc}{}) { od "$$esclitr$$esclitr" }
+ elsif (m{^(?=$caps_re)}) { od $var_prefix }
+ elsif (s{^\$([A-Za-z]\w+)}{}) {
+ $note_varref->($1,1);
+ od "\${${var_prefix}$1}";
+ }
+ elsif (s{^([~^]?)(?=$lc_re)}{}) { od $pfxmap{$1} }
+ elsif (s{^_}{}) { od $var_prefix }
+ elsif (s{^=}{}) { od $var_prefix_name }
+ elsif (s{^([~^]?)/}{}) { od $pfxmap{$1} }
+ elsif (s{^\.}{}) { od $dir_name }
+ elsif (s{^([~^])\.}{}) { od $srcdirmap{$1} }
+ elsif (s{^\$\-}{}) { $ddbl=undef; }
+ elsif (s{^\$\+}{}) { $ddbl=1; }
+ elsif (s{^\$\(}{}) {
+ ddbl_only($&); oud "\$(";
+ $note_varref->($2,!!$1) if m{^($esc)?([^()\$]+\))};
+ }
+ elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\$($1)"; }
+ elsif (s{^\$\{}{}) {
+ err 'macro invocation cannot be re-$-doubled' if $ddbl;
+ od '${eval ${call ';
+ $evalcall_brackets = 1;
+ $push_nest->('eval',1, '&${...}');
+ $note_varref->($2,!!$1) if m{^\s*($esc)?([^,{}\$]+)};
+ } elsif (s{^([~^]?)(?=[ \t])}{}) {
+ my $prefix = $pfxmap{$1} // die "internal error ($1?)";