This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: BRL with kawa 1.8.91
On 05/12/2009 11:24 AM, Dan Stanger wrote:
The main reason we went to kawa 1.8.91, was we thought less work would
be needed to make brl work, and that was the first version which would
compile a packrat parser for json. There were only a few minor changes
to our servlet needed with 1.8.91.
I am willing to try to use the newest version of kawa, do you have the
web.xml file used to run my example using tomcat?
The attached web.xml works with current versions of Kawa.
There is one bug: It can parse BRL files, but the output
gets HTML-quoted when it shouldn't be. Let me take a look
at that and get back to you.
I have also isolated my current problem to what I think is the
following:
This is the code generated by the brl page containing [(symbol->string
'b)] .
Look at the code line 11. At that point the function return value has
been returned by symbol->string, on the stack. Why the pop ?
Shouldn't the string returned from symbol->string be left on the stack
for the display?
My guess is the call is being compiled in a mode where the target
is an IgnoreTarget. Perhaps because the compiler thinks the call
is part of block (or a <body>).
What I'd do is do a newError().printStackTrace() (or set a breakpoint)
on CodeAttr.emitInvokeMethod and then work your way up the stack
until you find out why it is called with the bad IgnoreTarget.
Doing:
Compilation.debugPrintFinalExpr = true;
is also useful for figuring out what the compiler thinks it
is being asked to compile. If the call is non-final position
of a BlockExp that would explain why we're not seeing the output.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<display-name>XQuery Utils</display-name>
<servlet>
<servlet-name>KawaPageServlet</servlet-name>
<servlet-class>gnu.kawa.servlet.KawaPageServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>KawaPageServlet</servlet-name>
<url-pattern>*.xql</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>KawaPageServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>