s-expressionists / Eclector

A portable Common Lisp reader that is highly customizable, can recover from errors and can return concrete syntax trees
https://s-expressionists.github.io/Eclector/
BSD 2-Clause "Simplified" License
109 stars 9 forks source link

SYNTAX.DOT-TOKEN.7 #41

Closed kpoeck closed 5 years ago

kpoeck commented 5 years ago

This is a deviation from sbcl and ansi-tests, but don't really know what is correct:

(in-package :eclector.reader)
* (WITH-STANDARD-IO-SYNTAX
         (READ-FROM-STRING ".||"))

debugger invoked on a ECLECTOR.READER:INVALID-CONTEXT-FOR-CONSING-DOT in thread #<THREAD "main thread" RUNNING {10005205B3}>: A consing dot appeared in an illegal position.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(ECLECTOR.BASE:%READER-ERROR #<SB-IMPL::STRING-INPUT-STREAM {10044D9503}> ECLECTOR.READER:INVALID-CONTEXT-FOR-CONSING-DOT)
   source: (APPLY (FUNCTION ERROR) DATUM :STREAM STREAM :STREAM-POSITION STREAM-POSITION (ALEXANDRIA.0.DEV:REMOVE-FROM-PLIST ARGUMENTS :STREAM-POSITION))
0] 0
* (cl:read-from-string ".||") 
|.|
3
scymtym commented 5 years ago

I think you are right. The fact that escapes are present in the token should change the interpretation from consing dot to symbol.