This is the mail archive of the kawa@sourceware.org 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: BRL reader problem.


I have reproduced the problem with the following line:
[(brl ]lorem[)]
From the command line, the value lorem is returned from BRLReaderString
as the token.  However in the servlet, the read loop sees 10 (newline),
and then -1, returning the newline as the token. I have determined that
when line 79 in BRLReaderString, saveReadState='\n' is commented out,
the reader does not see the newline.  This variable is used to set
readState in the finally block.  Is the purpose of readState, and how
the reader works normally documented somewhere?

Thank you,
Dan Stanger
Eaton Vance Management
Two International Place 
Boston, MA 02110
Mobile: 617 646 9682
Office: 617 672 8261

-----Original Message-----
From: Per Bothner [mailto:per@bothner.com] 
Sent: Monday, August 24, 2009 7:16 PM
To: Dan Stanger
Cc: kawa@sources.redhat.com
Subject: Re: BRL reader problem.

On 08/24/2009 01:27 PM, Dan Stanger wrote:
> This snippet of code compiles using --brl -C, and runs under the old
> brl, but when run through the servlet, produces the following error.
>
> [(define st #f)]
> [(define authcount (sql-repeat st (UAID)
> ( ] select UAID[)
> (set! authlevel UAID)
> ))]
>
> javax.servlet.ServletException: jndi:/localhost/kawa/sql1.brl:3:1:
> unbound location ]
>
> Any ideas about where I should start looking for this problem?  Is
there
> some flag, which I may not be setting?

The key line in this line in BRL.java:

     rt.set(']', brlReader);

It sets the read-table so ']' calls BRLReaderString.

That is (one reason) why you want the current Language to
be BRL rather than Scheme when parsing, so we use the
correct ReadTable.  Presumably you're using the wrong ReadTable.

On May 12 I made this change:

	* BRLReaderString.java: Top-level text now evaluates to an
	UnescapedData instance in compatibility mode (as before in KRL
mode).

However, I not sure this was the right thing - but that shouldn't
affect the problem you're seeing.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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