version 1.46, 2004/03/31 05:24:00
|
version 1.49, 2004/08/10 19:16:40
|
Line 46 while (!$_LONCAPA_INTERNAL_oldexpression
|
Line 46 while (!$_LONCAPA_INTERNAL_oldexpression
|
# only match the above if there is not { [ ( coming up |
# only match the above if there is not { [ ( coming up |
# Why? (I.e. this fails &a(1)[2] |
# Why? (I.e. this fails &a(1)[2] |
(?=[^\[\{\(]|$)/ |
(?=[^\[\{\(]|$)/ |
&__LC_INTERNAL_EVALUATE__($1,$2,$3)/sexg; |
my ($__LC__a,$__LC__b,$__LC__c)=($1,$2,$3); |
|
my $__LC__prefix; |
|
my $__LC__result; |
|
while (1) { |
|
{ |
|
use strict; |
|
no strict "vars"; |
|
if (eval(defined(eval($__LC__a.$__LC__b)))) { |
|
$__LC__result= $__LC__prefix.eval($__LC__a.$__LC__b.$__LC__c); |
|
last; |
|
} |
|
} |
|
$__LC__prefix.=substr($__LC__a,0,1,""); |
|
if ($__LC__a!~m-^(\$|&|\#)-) { last; } |
|
} |
|
if (!defined($__LC__result)) { |
|
$__LC__result=$__LC__prefix.$__LC__a.$__LC__b.$__LC__c; |
|
} |
|
$__LC__result; |
|
/sexg; |
if (scalar(values(%_LONCAPA_INTERNAL_oldexpressions))>10) {last;} |
if (scalar(values(%_LONCAPA_INTERNAL_oldexpressions))>10) {last;} |
} |
} |
ENDEVALUATE |
ENDEVALUATE |
Line 141 sub dump {
|
Line 160 sub dump {
|
if (($symname!~/^\_/) && ($symname!~/\:$/)) { |
if (($symname!~/^\_/) && ($symname!~/\:$/)) { |
my $line; |
my $line; |
if ($safeeval->reval('defined($'.$symname.')')) { |
if ($safeeval->reval('defined($'.$symname.')')) { |
$line='$'.$symname.'='.$safeeval->reval('$'.$symname); |
$line.='$'.$symname.'='.$safeeval->reval('$'.$symname)."\n"; |
} |
} |
if ($safeeval->reval('defined(@'.$symname.')')) { |
if ($safeeval->reval('defined(@'.$symname.')')) { |
$line='@'.$symname.'=('. |
$line.='@'.$symname.'=('. |
$safeeval->reval('join(",",@'.$symname.')').")"; |
$safeeval->reval('join(",",@'.$symname.')').")"."\n"; |
} |
} |
if ($safeeval->reval('defined(%'.$symname.')')) { |
if ($safeeval->reval('defined(%'.$symname.')')) { |
$line='%'.$symname.'=('; |
$line.='%'.$symname.'=('; |
$line.=$safeeval->reval('join(",",map { $_."=>".$'. |
$line.=$safeeval->reval('join(",",map { $_."=>".$'. |
$symname.'{$_} } sort keys %'. |
$symname.'{$_} } sort keys %'. |
$symname.')').")" |
$symname.')').")"."\n" |
} |
} |
if ($line ne '') {$dump.=&HTML::Entities::encode($line,'<>&"')."<br />";} |
if ($line ne '') { |
|
$line=&HTML::Entities::encode($line,'<>&"'); |
|
$line=~s|\n|<br />|; |
|
$dump.=$line; |
|
} |
} |
} |
} |
} |
$dump.=''; |
$dump.=''; |