This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: error diagnostics in 1.6.97
- From: Bruce Lewis <brlewis at alum dot mit dot edu>
- To: kawa at sources dot redhat dot com
- Date: 22 Jan 2002 14:09:04 -0500
- Subject: Re: error diagnostics in 1.6.97
- References: <E16Qv4N-0004Bp-00@softdev>
Kawa 1.6.70 would throw an error "unexpected EOF in list starting here"
and give the line/column number where the list started.
Kawa 1.6.97 is technically more correct to throw "unexpected EOF in
list" with the line/column number where the error actually occurred,
i.e. the EOF. However, this information is less useful to the end user,
who needs to figure out where the missing ) should go. The patch below
is a compromise; both line/column pairs are in the error message.
Index: gnu/kawa/lispexpr/ReaderParens.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/kawa/lispexpr/ReaderParens.java,v
retrieving revision 1.4
diff -u -r1.4 ReaderParens.java
--- ReaderParens.java 2001/06/19 00:20:00 1.4
+++ ReaderParens.java 2002/01/22 18:59:05
@@ -81,7 +81,8 @@
if (ch == close)
break;
if (ch < 0)
- lexer.eofError("unexpected EOF in list");
+ lexer.eofError("unexpected EOF in list started at "
+ + (startLine+1) + ":" + startColumn);
ReadTableEntry entry;
if (ch == '.')
{
@@ -101,7 +102,8 @@
break;
}
if (ch < 0)
- lexer.eofError("unexpected EOF in list");
+ lexer.eofError("unexpected EOF in list started at "
+ + (startLine+1) + ":" + startColumn);
if (sawDot)
{
lexer.error("multiple '.' in list");
--
<brlewis@[(if (brl-related? message) ; Bruce R. Lewis
"users.sourceforge.net" ; http://brl.sourceforge.net/
"alum.mit.edu")]>