Great work. This will make further enhancements to the Select clause much easier. Here are a few more queries from the test package that I use to test some of the more recent (and not so well documented) changes to the select clause, eg, dialect functions.
This one is not recent but affects the parser somewhat and was not in your test suite. select new net.sf.hibernate.test.S(s.count, s.address) from s in class Simple These a few tests for delects functions. From the tests it would look like it would work as it stands although problem maybe with some functions that have no arguments, for example,those that have no parenthesis, eg, Oracle dialect select s.name, sysdate, trunc(s.pay), round(s.pay) from s in class Simple Just for the record, Nested examples. select abs(round(s.pay)) from s in class Simple select trunc(round(sysdate)) from s in class Simple The current parser cannot do it at the moment (it is a pain in current form) but multiple arguments comma separated is easy for you to add, so we then hook into it, select round(s.pay, 2) from s in class Simple being very greedy it would be also real nice to include the usual literal types and operators in the select clause. These we also cannot do at the moment. I do assume that this will get integrated in the 2.2 series as it is fairly major surgery to hook this into the backend. Look forward to it. --David. ----- Original Message ----- From: "Gavin King" <[EMAIL PROTECTED]> To: "Joshua Davis" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, November 16, 2003 1:50 PM Subject: [Hibernate] Re: AST parser for HQL > Fantastic! I presume that you meant to send this to hibernate-devel, not > hibernate-devel-admin, so I'm forwarding to the list.... > > You are using ANTLR, right? This is good. I think its better than JavaCC > from my small amount of contact with each. > > > Joshua Davis wrote: > > > Hibernate programmers, > > > > I'm just about done with a working version of an HQL parser that > > produces ASTs. It parses most of the examples now, except for the ones > > where keywords are identifiers and identifiers are keywords > > simultaneously ;). Anyone interested in reviewing it? Some example > > output is enclosed. > > > > Josh > > > > > > ------------------------------------------------------------------------ [[CUT TESTS]] ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel