I'm not at a system where diff/patch runs, but here's a fix for you. In
_string_constant you're trying to expand \n and friends with:
$constant = eval "qq($constant)";
This breaks if the token ) appears in $constant. Changing () to anything
else breaks if that anything else is in the string too.
After thinking on this long and hard, here's a replacement bit of code:
local $_=substr($constant,0,1);
$constant =~ s/\$/\\\$/g;
$constant = $_ . eval("qq$constant") . $_;
warn "Constant: $@ " if $@;
This uses the constant's own delimiter (" or even ') as the delimiter for
the eval. It also escapes $'s so that things like $a don't interpolate or
cause other errors. (I suppose @ should be guarded against too. Ah well..)
With this fix and the recently committed changes I made to BASIC... it now
compiles and runs fine.