I did modify hql.g. I.e. added OBJECT token and selectClause : SELECT^ // NOTE: The '^' after a token causes the corresponding AST node to be the root of the sub-tree. (DISTINCT)? ( selectedPropertiesList | newExpression | selectObject) ;
selectObject : OBJECT^ OPEN! identifier CLOSE! ; If I comment out selectObject in selectClause, the test passes. Thanks. > -----Original Message----- > From: Joshua Davis [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 15, 2004 2:13 PM > To: Alexey Loubyansky > Cc: [EMAIL PROTECTED] > Subject: Re: [Hibernate] introductions of new keywords to ql > > Actually, the HQL parser is capable of using keywords as > identifiers in > some contexts. I'm not sure what you're saying here, have > you modified > the grammar and this caused HqlParserTest to fail? If that > is the case > then there may be something wrong with the modified grammar that is > preventing the 'keyword as identifier' from working. If > not, then I'm > not really sure what the problem is. > > Alexey Loubyansky wrote: > > >Hi Joshua & Steve, > > > >I started working on the EJBQL syntaxes that are not > supported yet. I > >will need to add some new keywords that might cause some > existing tests > >to fail. E.g. adding "object" causes the following test to fail > > > >input: ->from org.hibernate.test.Bar bar where bar.object.id = ? and > >bar.object.class = ?<- > > > >msg=HQL syntax error : unexpected token: . near line 1, column 42 > > > >There was 1 failure: > >1) > >testUnitTestHql(org.hibernate.test.hql.HqlParserTest)junit.fr > amework.As > >s > >ertionFailedError: At least one error occurred during parsing! > >expected:<0> but was:<2> > > at > >org.hibernate.test.hql.HqlParserTest.doParse(HqlParserTest.java:990) > > at > >org.hibernate.test.hql.HqlParserTest.parse(HqlParserTest.java:966) > > at > >org.hibernate.test.hql.HqlParserTest.testUnitTestHql(HqlParse > rTest.java: > >663) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > >Source) > > at org.hibernate.test.AllTests.main(AllTests.java:120) > > > >Am I missing something or there is really no way to fix this > except for > >disallowing the use of 'object' even in paths? > > > >Thanks. > > > > > >------------------------------------------------------- > >SF email is sponsored by - The IT Product Guide Read honest & candid > >reviews on hundreds of IT Products from real users. > >Discover which products truly live up to the hype. Start > reading now. > >http://productguide.itmanagersjournal.com/ > >_______________________________________________ > >hibernate-devel mailing list > >[EMAIL PROTECTED] > >https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > > > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel