Dnia Wed, Sep 20, 2023 at 03:14:17PM +0200, Waldek Hebisch napisał(a):
> On Tue, Sep 19, 2023 at 06:38:36PM +0200, Ralf Hemmecke wrote:
> > The attached file can be compiled just fine.
> >
> > I am at version a3c1d1dc5829126604345db3d672c2386d9296ae,
> >
> > Unfortunately after compilation one function is missing.
> >
> > (12) -> jacobiThetaPermutation(2,matrix [[1,2],[3,4]])
> > Internal Error
> > The function jacobiThetaPermutation with signature (PositiveInteger
> > , Matrix(Integer)) -> PositiveInteger is missing from domain
> > QEtaAuxiliaryPackage
> >
> > And before you look for the problem, here is the solution.
> > Du you see the little backtick at the beginning of the line containing
> >
> > error "jacobiThetaPermutation: j ...
> >
> > before the definition of the "missing" function?
> >
> > Removing the backtick cures this "missing function" problem, but of course
> > not the problem that I would have expected the compiler to yell at me. I am
> > not aware that a backtick is an acceptable character in a spad program.
>
> Well, any character at beginning of the line ends the pile. So QETAAUX
> is supposed to compile as if file ended just befor the backtick.
>
> Normally you would get error in the line with backtick, but lines at
> top level have special rules due to possibility to issue commans,
<snip>
> > ` error "jacobiThetaPermutation: j is not in the range 1..4"
> > `
Apparently backquote is valid in interpreter. Grep did not find any
use of word 'backquote' in our documentation, so this is probably
undocumented. Given that interpreter scanner and parser came from
"new compiler" and "new compiler" eventually turned into Aldor I
would look at explanation in Aldor documentation, Google says
that 'backquote' appear there.
Why this does not cause error in Spad compiler? ATM parser
may return empty parse tree on wrong input. It seems that
this behaviour it to support backtracking. But some lines
contain no code, so empty parse tree is simply ignored
(can not be an error).
There is related thing, file containing only
1 + 1
"compiles" but produces not code.
--
Waldek Hebisch