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]

Re: readtable support added to Kawa


Thomas Kirk <tk@research.att.com> writes:

> the inclusion of readtable support is nice, but there is a problem
> evidently related to the new reader; eval from a string now throws 
> an EOF exception for any input:
> 
> Scheme.eval(string, Environment.getCurrent());
> 
> java.lang.RuntimeException: eval: errors while compiling:
> <string>:1:43: unexpected EOF in list
> 
>    at kawa.standard.Scheme.eval(Scheme.java:742)
>    at kawa.standard.Scheme.eval(Scheme.java:714)
>    at Kawa.eval(Kawa.java:36)

I checked in the following patch, which seems to fix it.

Index: ReaderParens.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/lispexpr/ReaderParens.java,v
retrieving revision 1.1
diff -u -r1.1 ReaderParens.java
--- ReaderParens.java	2001/04/23 02:19:08	1.1
+++ ReaderParens.java	2001/04/26 21:40:56
@@ -78,10 +78,10 @@
 	    int line = port.getLineNumber();
 	    int column = port.getColumnNumber();
 	    ch = port.read();
-	    if (ch < 0)
-	       lexer.eofError("unexpected EOF in list");
 	    if (ch == close)
 	      break;
+	    if (ch < 0)
+	       lexer.eofError("unexpected EOF in list");
 	    ReadTableEntry entry;
 	    if (ch == '.')
 	      {

-- 
	--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]