A week ago I started a new project in uNhAddIns; the code-name is Artorius.
The base target of Artorius is the HQL-AST (perhaps is better to think about it as nHQL-AST).
The port of the string-AST-parser is an old task in NHibernate (perhaps one of my first occupation). Hibernate are using an old version of ANTLR Parser Generator and more than one year ago Ayende and I had tried the port of that code, in two different ways, but without a usable result. After that work I found GOLD and Diego Jancic (aka “The economist”) had begin a work to implement an string-AST-parser based on GOLD; unfortunately the work on OSS is hard to maintain and perhaps the state of NHibernate code-base, at that moment, was not ready to receive the new parser.
In uNhAddIns , after a request of my friend and after implement DetachedQuery, in a weekend born something like a game, named: DetachedDynQuery
The first time I think about Artorius was as an evolution of DetachedDynQuery; a real AST representation of an HQL query. I must admit that was a loooong thinking, without touch my keyboard, for various reason (the first is that now we have LINQ).
To have a better idea about what nHQL-AST must support, I have begun the work from the string-AST-parser based on GOLD. The actual parser are passing the test available here (basically to test the grammar).
Browsing the code you can see that there are some other incomplete work but before start the real implementation of the nHQL-AST I prefer to complete the grammar. If you want navigate the BNF, of the actual grammar, you can download the HQL.htm file from here.