You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Paul Hammant <Pa...@yahoo.com> on 2001/10/31 18:56:13 UTC

AvalonDB & javacc

OK, javacc seems to be a good way to parse SQL :

  http://www.webgain.com/products/java_cc/
  http://www.cobase.cs.ucla.edu/pub/javacc/sql-oracle.jj

Does anyone have any insights?  Any view of pitfalls or downsides to its 
use?

Regards,

- Paul H


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AvalonDB & javacc

Posted by Paul Hammant <Pa...@yahoo.com>.
Jason,

>If you just want a stand-alone database than using JavaCC will be fine, but
>if you are trying to make something that will work with embedded devices as
>Hypersonic was than using JavaCC is probably not something that you will
>want to use.
>
Well being on Pheonix, we're not ordinarily targetting embedded devices. 
 However it is a good point.  I think that we could support multiple 
implementations of the SQLParser interface, some robost, some stripped 
down.

>If I remember correctly a JavaCC grammar with one rule will produce a
>parsing mechanism that's over 100k. Velocity has a relatively small grammar
>and the parsing mechanism weighs in at over 1mb. The grammar for SQL is by
>far the largest I've seen and you will probably get something huge. Totally
>guessing I would say 2-3mb. If you don't care about embedded devices than it
>probably doesn't matter, but JavaCC makes robust parsers not small ones :-)
>
Mckoi's weighs in at 360K (in source form).  It's probably not complete. 
 The well made point here is that we'd be victims of our own sucess. 
 Hypersonic is interesting in that it has no such well made parser but 
still manages to do the job.

Multiple implementations is the key.  Horses for courses et al.

Regards,

- Paul H



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AvalonDB & javacc

Posted by Jason van Zyl <jv...@zenplex.com>.
On 10/31/01 12:56 PM, "Paul Hammant" <Pa...@yahoo.com> wrote:

> OK, javacc seems to be a good way to parse SQL :
> 
> http://www.webgain.com/products/java_cc/
> http://www.cobase.cs.ucla.edu/pub/javacc/sql-oracle.jj
> 
> Does anyone have any insights?  Any view of pitfalls or downsides to its
> use?

If you just want a stand-alone database than using JavaCC will be fine, but
if you are trying to make something that will work with embedded devices as
Hypersonic was than using JavaCC is probably not something that you will
want to use.

If I remember correctly a JavaCC grammar with one rule will produce a
parsing mechanism that's over 100k. Velocity has a relatively small grammar
and the parsing mechanism weighs in at over 1mb. The grammar for SQL is by
far the largest I've seen and you will probably get something huge. Totally
guessing I would say 2-3mb. If you don't care about embedded devices than it
probably doesn't matter, but JavaCC makes robust parsers not small ones :-)
 
> Regards,
> 
> - Paul H
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>