tags:

views:

241

answers:

1

I am interested in pre-parsing a user's input via Java for valid CTXCAT syntax before it is used to search against an Oracle CATSEARCH implementation (http://www.oracle.com/technology/products/text/htdocs/ctxcat_primer.html).

The reason being is that Oracle returns a generic parse exception if the query contains any invalid syntax (such as a 'NOT' operator without a following term, etc.), and the idea is to give the user some helpful feedback rather than a generic 'your query failed' error message.

This probably wouldn't be a terribly difficult thing to write as the query syntax is fairly simple but as always I don't want to re-invent the wheel if there is a pre-existing implementation.

+1  A: 

You can use ANTLR to make very very easily a parser for java

FerranB