The standard Hibernate download includes the HQL grammar file that ANTLR uses to generate a parser that reads HQL. You could decouple it from the HQL/Hibernate code (there are a few minor-looking dependencies in the grammar) and trim it down to what you know you'll be dealing with. This would give you two big advantages over the previous two options: you'd have a full-fledged, working parser from the start and it would be coded to parse as much or as little official HQL input -- very little "ground up" programming involved.