Oh, I see. Perhaps I can whip something up tonight. --- Max Rydahl Andersen <[EMAIL PROTECTED]> wrote:
> On Wed, 15 Dec 2004 13:47:18 -0800 (PST), Joshua > Davis <[EMAIL PROTECTED]> > wrote: > > > Take a look at the ANTLR generated 'token types' > > files: HqlTokenTypes.java HqlTokenTypes.txt. > > I got those, but they are kinda too atomic ;) > > Would be nice with something like: > > getTokenClass(String token) where the return type > would be something more > "grouped" than > a tokentype....at least just as an approimxation. > > /max > > > > > --- Max Rydahl Andersen <[EMAIL PROTECTED]> > > wrote: > > > >> On Wed, 15 Dec 2004 12:58:06 -0600, Steve > Ebersole > >> <[EMAIL PROTECTED]> wrote: > >> > >> > Not currently; but that's not at all hard to > add. > >> > > >> > I am assuming you want to perform syntax > >> highlighting or something like > >> > that. > >> > >> yeah - thats the first step. > >> > >> second step is to maybe use the parser to provide > >> code completion > >> hints/syntax checking...but that is in the > future. > >> > >> /max > >> > >> > > >> > It's a trivial thing, but consider something > like > >> "count" which is a > >> > keyword depending upon usage. Think of a > mapped > >> entity that has a > >> > property named count, like maybe a line item. > In > >> HQL I can say > >> > something like: > >> > "select sum(li.count) from LineItem as li > >> where...". Here, "count" does > >> > not really represent a key-word. The parser > >> handles this by inspecting > >> > the AST tokens around the "count" token. The > >> editor might not be able > >> > to do something similar, and would not be able > to > >> ask the parser to > >> > check unless you were continuously parsing the > >> input. > >> > >> well - in the beginning it will be a little > >> detail/quirk...later we can > >> look into > >> parsing this stuff again and again (and i expect > the > >> parser is efficient > >> from day 1, right ? ;) > >> > >> /max > >> > >> > > >> >> -----Original Message----- > >> >> From: > [EMAIL PROTECTED] > >> > [mailto:hibernate-devel- > >> >> [EMAIL PROTECTED] On Behalf Of Max > >> Rydahl Andersen > >> >> Sent: Wednesday, December 15, 2004 11:35 AM > >> >> To: Hibernate development > >> >> Subject: [Hibernate] antlr "introspection" ? > >> >> > >> >> Hi antlr-guys ;) > >> >> > >> >> Is it possible to get information about > keywords, > >> operators etc. from > >> > our > >> >> new HQL parser ? > >> >> > >> >> something like: HQLParser.getLiterals(), > >> HQLParser.getKeywords() etc. > >> > or > >> >> maybe just a map from > >> >> tokens to their type or something ? > >> >> > >> >> It would be a big plus for providing HQL > editor > >> support in eclipse ;) > >> >> > >> >> -- > >> >> Max Rydahl Andersen > >> >> callto://max.rydahl.andersen > >> >> > >> >> Hibernate > >> >> [EMAIL PROTECTED] > >> >> http://hibernate.org > >> >> > >> >> JBoss Inc > >> >> [EMAIL PROTECTED] > >> >> http://jboss.com > >> >> > >> >> > >> >> > >> > > > ------------------------------------------------------- > >> >> 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 > >> > >> > >> > >> -- > >> Max Rydahl Andersen > >> callto://max.rydahl.andersen > >> > >> Hibernate > >> [EMAIL PROTECTED] > >> http://hibernate.org > >> > >> JBoss Inc > >> [EMAIL PROTECTED] > >> http://jboss.com > >> > >> > >> > > > ------------------------------------------------------- > >> 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 > >> > > > > > > -- > Max Rydahl Andersen > callto://max.rydahl.andersen > > Hibernate > [EMAIL PROTECTED] > http://hibernate.org > > JBoss Inc > [EMAIL PROTECTED] > http://jboss.com > ------------------------------------------------------- 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