On Mon, Aug 17, 2009 at 7:00 PM, Grant Ingersoll<gsing...@apache.org> wrote: > > On Aug 2, 2009, at 1:43 PM, Tim Williams wrote: >> >> Hi Martin, >> Sure, if it works like I envision it, Lucene would just be *one* >> concrete tree grammar implementation - there could be others (ie >> OracleText), I'm thinking it is broader than one implementation - >> otherwise, I reckon it's Yet Another Lucene Query Parser (YALQP). >> >> For more practical reasons, I'm not a Lucene committer and it'd be >> slow going to play around with this through JIRA patches to their >> sandbox. > > FWIW, Lucene has recently added a new, more flexible Query Parser that > allows for separation of the various pieces (syntax, intermediate > representation, Lucene Query). You might want to check it out and see how > that fits
Thanks Grant, yeah I've looked at that and it seems really (overly?) complex for what I'm trying to achieve. It seems to re-implement much of the goodness that antlr provides for free. For example, with antlr I already get a lexer/parser grammar separate from the tree grammar. So, to plug in a new parser syntax is trivial - just implement a new lexer/parser grammar that provides tree rewrites consistent with a lucene tree grammar. Conversely, to implement a new concrete implementation, just implement a new tree grammar for the existing lexer/parser grammar. Of course, maybe I'll get down this road and realize how naive my path is and just switch over. For now, just looking at a query parser that, by itself, is approaching the size of the lucene core code base is intimidating:) Thanks for the pointer though, I'm subscribed over there and keep an eye out for progress on the new parser.... Thanks, --tim --------------------------------------------------------------------- To unsubscribe, e-mail: labs-unsubscr...@labs.apache.org For additional commands, e-mail: labs-h...@labs.apache.org