Hi all,

with version 3.1.3.3 there is a change to the PicoLisp reader, with
small but possibly far-reaching consequences:

The 'read' function (and its internal mechanisms as used by 'load' (i.e.
the REPL)) doesn't automatically eat up trailing white space any more.
And - resulting from that - it can better handle '#' and '#{..}#'
comments in the REPL.

This has the effect that if (read) is followed by a lower-level function
like (char) or (line), the results will be slightly different (i.e. the
leading white space is not removed). Such cases are seldom, I believe.

More significant might be that because of that, also superfluous
trailing parentheses or brackets are not ignored any longer. An
expression like

   (de foo (X Y)
      (bar X 1 Y 2) ) )

will give the error "Bad input ')'".

So be prepared to see this error if your existing sources don't have
properly balanced parentheses! I had several cases :)

It is trivial to fix, just remove the parens! And it is not a mission-
critical problem, because these errors are immediately signalled as soon
as the source is loaded, and thus before it runs.


The positive side is that comments on the REPL e.g.

   : (* 3 4)  # Comment 
   -> 12

will now work properly. It didn't until now, because 'read' stopped at
the '#', and didn't hit the end-of-line because of that. Nothing really
bad, but you didn't get the evaluation's return value and the new
prompt.

I hope I didn't forget anything.

I've changed all four versions: pil64, pil32, mini and ersatz. Available
in the current testing release, and in the Mercury repo.

The changes were quite extensive, and thus the bug probability is
relatively high!

I'd be glad for any bug reports!

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to