This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LispReader


Nic Ferrier wrote:
> I've discovered why LispReader was abstract (I think).
> 
> LispReader.readObject() casts the port that created the LispReader to
> an InPort. Naturally if the port is not an InPort this fails.
> 
> The LispReader takes a LineBufferedReader in it's constructor so stand
> alone the class fails to read object. The sub-classes (such as
> ScmRead) extend it so that the port is an InPort.
> 
> 
> I'll have a look and see if it's possible that LispReader might not
> have to rely on InPort.

It doesn't really.  You can wrap the InPort stuff by
if (port instanceof InPort)
is is done various other places.

The InPort readState field is used to change the prompt string.  A
cleaner solution would be to add a way to addociate proporties with
with a InPort or perhaps a LineBufferedReader, like we do for
Procedure.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]