public class StandardSyntaxParser extends Object implements SyntaxParser, StandardSyntaxParserConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
StandardSyntaxParserTokenManager |
token_source
Generated Token Manager.
|
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OP_COLON, OP_EQUAL, OP_LESSTHAN, OP_LESSTHANEQ, OP_MORETHAN, OP_MORETHANEQ, OR, PLUS, QUOTED, Range, RANGE_GOOP, RANGE_QUOTED, RANGE_TO, RANGEEX_END, RANGEEX_START, RANGEIN_END, RANGEIN_START, REGEXPTERM, RPAREN, TERM, tokenImage
Constructor and Description |
---|
StandardSyntaxParser() |
StandardSyntaxParser(CharStream stream)
Constructor with user supplied CharStream.
|
StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
Constructor with generated Token Manager.
|
Modifier and Type | Method and Description |
---|---|
QueryNode |
Clause(CharSequence field) |
QueryNode |
ConjQuery(CharSequence field) |
void |
disable_tracing()
Disable tracing.
|
QueryNode |
DisjQuery(CharSequence field) |
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
Token |
getToken(int index)
Get the specific Token.
|
QueryNode |
ModClause(CharSequence field) |
ModifierQueryNode.Modifier |
Modifiers() |
QueryNode |
parse(CharSequence query,
CharSequence field)
Parses a query string, returning a
QueryNode . |
QueryNode |
Query(CharSequence field) |
void |
ReInit(CharStream stream)
Reinitialise.
|
void |
ReInit(StandardSyntaxParserTokenManager tm)
Reinitialise.
|
QueryNode |
Term(CharSequence field) |
QueryNode |
TopLevelQuery(CharSequence field) |
public StandardSyntaxParserTokenManager token_source
public Token token
public Token jj_nt
public StandardSyntaxParser()
public StandardSyntaxParser(CharStream stream)
public StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
public QueryNode parse(CharSequence query, CharSequence field) throws QueryNodeParseException
QueryNode
.parse
in interface SyntaxParser
query
- the query string to be parsed.field
- - default field nameParseException
- if the parsing failsQueryNodeParseException
public final ModifierQueryNode.Modifier Modifiers() throws ParseException
ParseException
public final QueryNode TopLevelQuery(CharSequence field) throws ParseException
ParseException
public final QueryNode Query(CharSequence field) throws ParseException
ParseException
public final QueryNode DisjQuery(CharSequence field) throws ParseException
ParseException
public final QueryNode ConjQuery(CharSequence field) throws ParseException
ParseException
public final QueryNode ModClause(CharSequence field) throws ParseException
ParseException
public final QueryNode Clause(CharSequence field) throws ParseException
ParseException
public final QueryNode Term(CharSequence field) throws ParseException
ParseException
public void ReInit(CharStream stream)
public void ReInit(StandardSyntaxParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.