AlexNisnevich / ECMAchine

Lisp-based in-browser toy operating system
http://alex.nisnevich.com/ecmachine/
201 stars 14 forks source link

String reading a little too forgiving? #11

Closed davep closed 10 years ago

davep commented 12 years ago

Consider:

ecmachine:/ guest$ "
""
AlexNisnevich commented 12 years ago

Surprisingly, this appears to actually be correct behavior: http://repl.it/ does the same thing.

davep commented 12 years ago

I'm struggling to see how it's correct behaviour and, in at least one other Scheme system, it simply carries on reading and interprets it as a "\n", expecting a closing quote. But, that aside, using the example you give above, I see an obvious difference. The one linked to above:

>  (list ") 
..  _

vs:

ecmachine:/ guest$ (list ")
("")
AlexNisnevich commented 12 years ago

I think this problem is gone now - only well-formed strings are allowed.