next if m{^list operators};
s{ and unary.*}{};
s{ etc\. }{ };
+ s{\?\:}{ ? : };
foreach my $op (split /\s+/) {
next unless length $op;
next if $op =~ m{^\w+$};
s{^
( .* \n )
( (?: (?! $d) .* \n )* )
- }{ $1 } or die "missing end of here doc $d\n";
+ $d \n
+ }{ $1 }x or die "missing end of here doc $d\n";
$o[$#o]{V} = $2;
- } elsif (s{^ (["'])( (?: [^\\] | \\ \1 )* )}{}x) {
+ } elsif (s{^ (["'])( (?: [^\\'"]
+ | \\ [^"']
+ | (?! \1 ) [^"]
+ )*
+ \1 )}{}x) {
my ($q,$v) = ($1,$2);
push @o, { T => 'string', Q => $q, V => $v };
- } elsif (s{^$perlop_re}{}) {
+ } elsif (s{^$perlop_re|\;}{}) {
push @o, { T => 'op', L => $& };
} elsif (s/[[{(]//) {
push @o, { T => 'bra', L => $& };
} elsif (s/[]})]//) {
push @o, { T => 'ket', L => $& };
+ } elsif (s/^( [\$\@\%] )( \{ )//x) {
+ push @o, { T => 'deref', L => $1 },
+ { T => 'bra', L => $2 };
+ } elsif (s/^ [\$\@\%] [^[^{] //x) {
+ push @o, { T => 'specvar', L => $& };
} elsif (!length) {
last;
} else {
# fudge this
$before .= "\n$1\n";
$after .= "\n$1\n";
- analyse_chunk_core();
+ next;
} else {
die $@;
}
$ichunkend = $i;
eval { analyse_chunk(); 1; };
if (length $@) {
- print Dumper($ichunkstart, $ichunkend,
+ print Dumper('REPORT',
+ $ichunkstart, $ichunkend,
$before, $after,
$@);
}