No parser generator.

Classes to look at are Parser.java, Expression.java, etc.

Fred
----- Original Message ----- 
From: "Johannes von Stetten" <[EMAIL PROTECTED]>
To: <hsqldb-developers@lists.sourceforge.net>
Sent: 13 September 2005 17:49
Subject: Re: [Hsqldb-developers] Parser / extended SQL syntax



Hi again,

fredt answered to my post on hsgldb-users so i'll follow it up here:

> In short, the parser is hand written. You can extend it if you wish to
> accept any extensions to the syntax.
So that means, there is no parser generator of any sort which transforms
some grammar file into corresponding java code?

> Beyond that, you need to implement the
> extra processing to return the results of fuzzy and ordinal searches.
Ok I'm aware of this.

>HSQLDB is relatively easy to adapt but this task is not among the simplest
>ones.
I see. I think I'll look into the source the next days and see how far I get 
there.
Can you give maybe a hint about which classes would be affected/need to be 
modified?

Then I'll come back with my questions. :)

cu, Johannes

------
>
>
> Hello everyone,
>
> as I already posted on hsqldb-users (sorry wasn't aware of 
> hsqldb-developers):
>
>
> My question was:  Which parser hsqldb is using?
> Is it javacc etc., or a parser you have developed yourself?
>
> Whould it be possible to change the way hsqldb parses the sql, as for
> implementing an enhanced version of sql, with additional
> keywords/expressions etc?
>
> The background:
> I'm studying applied computer science in germany, and for my diploma
> thesis, I'm enhancing an application developed at our university
> (university of augsburg, http://www.uni-augsburg.de/).
> This application is called Preference SQL, it enhances standard SQL
> with the notion of preferences.
> One can for example state a query like
>  SELECT * FROM usedcars
>    WHERE make = 'Ford'
>    PREFERRING price AROUND 20000
>           AND HIGHEST(power)
>           PRIOR TO color = 'red'
> for which I guess the meaning is quite obvious.
>
> The difference to standard SQL is that the conditions in the PREFFERING
> clause don't have to be matched exactely, but rather are treated as soft
> selections. So if there's no exact match, the best matching entries are
> returned. (I can give you more background about this if someone should
> be interested  :)  ).
>
> Until now, the program is implemented in the way that a JDBC driver
> takes the PreferenceSQL statement, connects the the underlying
> (standard) sql database (oracle, mysql etc), fetches all the nessesary
> tables with hard selections (WHERE..), and executes the preference part
> of the query on this data.
> To parse the query, we use a JavaCC generated parser.
>
> My task would be to implement the exection of preference queries
> directly into a java database, and I was told to use your hsqldb.
> So I would adapt the classes that do the parsing on the incoming query,
> so that they can handle the extended syntax.
>
> My questions would be:
> What do you think of that task and it's complexity?
> How is your parser organized/what parser do you use?
> Whould it be possible to convert our javacc parser to your parser format?
> How much of the code would I have to change to implement execution of 
> preference queries?
>
> many thanks for your answers,
>
> regards, Johannes
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle 
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> hsqldb-developers mailing list
> hsqldb-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hsqldb-developers


______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hsqldb-developers mailing list
hsqldb-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
hsqldb-developers mailing list
hsqldb-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hsqldb-developers

Reply via email to