> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Max Rydahl Andersen
> Sent: Thursday, November 20, 2003 5:24 PM
> 
> If i remember the terminology correctly we will get a 
> in-memory generated AST tree, right ?

Correct.

> And if we wanted we 
> could manipulate that tree before the tree parser generates 
> the correct SQL, right ? (this would just be so cool to use 
> for crazy stuff ;)

Different tree parsers can be made for different purposes: semantic
analysis, code generation, source translation, and yes... tree generation
(which can be feed into yet another tree parser, etc).  This opens up the
door to query plan optimization, common sub expression elimination,
dialect-specific optimization, etc.  Pure madness!

> Will be interesting to see how that stuff will perform 
> compared to Gavins "top-of-his-head" parser ;)

That's an interesting point actually, and one that I've come across many
times.  I would guess that the ANTLR based approach might be *slightly*
slower, but remember: ANTLR generates recursive descent parsers/lexers,
which are very similar to the ones you would write 'by hand'.  It does *not*
generate table-driven parsers or DFA lexers, which can be slower.  I expect
that the lex/parse/tree walk time is going not going to be significant when
compared with the query execution time.

> 
> /max
> 




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
hibernate-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to