Package com.tonic.analysis.query.parser
Class QueryParser
- java.lang.Object
-
- com.tonic.analysis.query.parser.QueryParser
-
public class QueryParser extends Object
Parses the outer query shell -(FIND|SHOW) target [IN|DURING scope] [WHERE expr] [WITH runspec] [LIMIT n] [ORDER BY key]- and delegates theWHEREexpression toConditionParser, the composable matcher grammar.
-
-
Constructor Summary
Constructors Constructor Description QueryParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Queryparse(String input)Lexes and parses a whole query, requiring the input to be fully consumed.
-
-
-
Method Detail
-
parse
public Query parse(String input) throws ParseException
Lexes and parses a whole query, requiring the input to be fully consumed.- Parameters:
input- the query text- Returns:
- the parsed FIND or SHOW query
- Throws:
ParseException- if the text is malformed or tokens remain at the end
-
-