Hi Tomas,

sorry for the late reply, but I wanted first to get picoLisp-3.0 out of
the door.


> >> defined: The dot is allowed as _part_ of a symbol name, but _not_ as
> >> a symbol name per se. A stand-alone dot is a meta character.
> ...
> I don't think so.  I have simple rules for the reader:
> - dot is a symbol as any other
> - if read inside a list, it means: place the next sexp into the current
>   cells' cdr
> - if the dot is the last sexp in the list, make the list circular

I see your point. When the dot is no longer a meta character, the
ambiguity cause by the "dual nature" is resolved.


However, you get into another dilemma: Despite the fact that the dot is
a legal internal symbol, you can never read it in a list, not even by
escaping it. It is a kind of meta-symbol, solely for the reader.


> I don't think it can get any simpler.  And it is definitely much simpler
> and more logical than the PicoLisp reader and any other Lisp reader I've
> seen so far.

Hmm, not sure. The current reader is (when you ignore special cases like
NIL, read-macros, superparens etc.) in pseudo code:

   (de read ()
      (ifn (= "(" NextToken)
         (readAtom)
         (make
            (loop
               (T (= ")" NextToken)
                  (skip) )
               (T (= " . " NextToken)
                  (chain (read)) )
               (link (read)) ) ) ) )

So the rule is that the dot is only treated as a meta-character when

   - appearing in a list
   - unescaped
   - and not as part of a symbol

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to