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
[mailto:hibernate-devel------Original Message----- From: [EMAIL PROTECTED]our[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. fromornew HQL parser ?
something like: HQLParser.getLiterals(), HQLParser.getKeywords() etc.users.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 realDiscover 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