Class StandardSyntaxParser
java.lang.Object
org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser
- All Implemented Interfaces:
SyntaxParser
,StandardSyntaxParserConstants
public class StandardSyntaxParser
extends Object
implements SyntaxParser, StandardSyntaxParserConstants
Parser for the standard Lucene syntax
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
private static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StandardSyntaxParser.JJCalls[]
private int
private List<int[]>
private int[]
private int
private int
private int
private int
private final int[]
private static int[]
private static int[]
private Token
private int[]
private final StandardSyntaxParser.LookaheadSuccess
Next token.private int
private boolean
private Token
Current token.Generated Token Manager.private boolean
private int
Fields inherited from interface org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParserConstants
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AFTER, AND, ATLEAST, BEFORE, CARAT, CONTAINED_BY, CONTAINING, DEFAULT, EOF, EXTEND, FN_OR, FN_PREFIX, Function, FUZZYTERM, LPAREN, MAXGAPS, MAXWIDTH, MINUS, NON_OVERLAPPING, NOT, NOT_CONTAINED_BY, NOT_CONTAINING, NOT_WITHIN, NUMBER, OP_COLON, OP_EQUAL, OP_LESSTHAN, OP_LESSTHANEQ, OP_MORETHAN, OP_MORETHANEQ, OR, ORDERED, OVERLAPPING, PHRASE, PLUS, QUOTED, Range, RANGE_GOOP, RANGE_QUOTED, RANGE_TO, RANGEEX_END, RANGEEX_START, RANGEIN_END, RANGEIN_START, REGEXPTERM, RPAREN, TERM, TILDE, tokenImage, UNORDERED, UNORDERED_NO_OVERLAPS, WILDCARD, WITHIN
-
Constructor Summary
ConstructorsConstructorDescriptionStandardSyntaxParser
(CharStream stream) Constructor with user supplied CharStream.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionprivate final QueryNode
private final QueryNode
Clause
(CharSequence field) private final QueryNode
ConjQuery
(CharSequence field) final void
Disable tracing.private final QueryNode
DisjQuery
(CharSequence field) final void
Enable tracing.private final CharSequence
private final TermRangeQueryNode
FieldRangeExpr
(CharSequence field) private final QueryNode
FuzzyOp
(CharSequence field, Token term, QueryNode node) Generate ParseException.final Token
Get the next Token.final Token
getToken
(int index) Get the specific Token.private final QueryNode
GroupingExpr
(CharSequence field) private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalQueryNode
IntervalExpr
(CharSequence field) private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private final IntervalFunction
private boolean
jj_2_1
(int xla) private boolean
jj_2_10
(int xla) private boolean
jj_2_11
(int xla) private boolean
jj_2_12
(int xla) private boolean
jj_2_13
(int xla) private boolean
jj_2_14
(int xla) private boolean
jj_2_15
(int xla) private boolean
jj_2_16
(int xla) private boolean
jj_2_17
(int xla) private boolean
jj_2_18
(int xla) private boolean
jj_2_19
(int xla) private boolean
jj_2_2
(int xla) private boolean
jj_2_20
(int xla) private boolean
jj_2_21
(int xla) private boolean
jj_2_22
(int xla) private boolean
jj_2_23
(int xla) private boolean
jj_2_24
(int xla) private boolean
jj_2_25
(int xla) private boolean
jj_2_26
(int xla) private boolean
jj_2_27
(int xla) private boolean
jj_2_28
(int xla) private boolean
jj_2_3
(int xla) private boolean
jj_2_4
(int xla) private boolean
jj_2_5
(int xla) private boolean
jj_2_6
(int xla) private boolean
jj_2_7
(int xla) private boolean
jj_2_8
(int xla) private boolean
jj_2_9
(int xla) private boolean
jj_3_1()
private boolean
jj_3_10()
private boolean
jj_3_11()
private boolean
jj_3_12()
private boolean
jj_3_13()
private boolean
jj_3_14()
private boolean
jj_3_15()
private boolean
jj_3_16()
private boolean
jj_3_17()
private boolean
jj_3_18()
private boolean
jj_3_19()
private boolean
jj_3_2()
private boolean
jj_3_20()
private boolean
jj_3_21()
private boolean
jj_3_22()
private boolean
jj_3_23()
private boolean
jj_3_24()
private boolean
jj_3_25()
private boolean
jj_3_26()
private boolean
jj_3_27()
private boolean
jj_3_28()
private boolean
jj_3_3()
private boolean
jj_3_4()
private boolean
jj_3_5()
private boolean
jj_3_6()
private boolean
jj_3_7()
private boolean
jj_3_8()
private boolean
jj_3_9()
private boolean
jj_3R_10()
private boolean
jj_3R_11()
private boolean
jj_3R_12()
private boolean
jj_3R_13()
private boolean
jj_3R_14()
private boolean
jj_3R_15()
private boolean
jj_3R_16()
private boolean
jj_3R_17()
private boolean
jj_3R_18()
private boolean
jj_3R_19()
private boolean
jj_3R_20()
private boolean
jj_3R_21()
private boolean
jj_3R_22()
private boolean
jj_3R_23()
private boolean
jj_3R_24()
private boolean
jj_3R_25()
private boolean
jj_3R_26()
private boolean
jj_3R_27()
private boolean
jj_3R_28()
private boolean
jj_3R_29()
private boolean
jj_3R_30()
private boolean
jj_3R_31()
private boolean
jj_3R_32()
private boolean
jj_3R_33()
private boolean
jj_3R_34()
private boolean
jj_3R_35()
private boolean
jj_3R_36()
private boolean
jj_3R_37()
private boolean
jj_3R_38()
private boolean
jj_3R_39()
private boolean
jj_3R_40()
private boolean
jj_3R_41()
private boolean
jj_3R_42()
private boolean
jj_3R_43()
private boolean
jj_3R_44()
private boolean
jj_3R_45()
private boolean
jj_3R_46()
private boolean
jj_3R_47()
private boolean
jj_3R_9()
private void
jj_add_error_token
(int kind, int pos) private Token
jj_consume_token
(int kind) private static void
private static void
private int
jj_ntk_f()
private void
private void
jj_save
(int index, int xla) private boolean
jj_scan_token
(int kind) private final QueryNode
ModClause
(CharSequence field) parse
(CharSequence query, CharSequence field) Parses a query string, returning aQueryNode
.static float
parseFloat
(Token token) static int
private final QueryNode
Query
(CharSequence field) private final QueryNode
QuotedTerm
(CharSequence field) void
ReInit
(CharStream stream) Reinitialise.void
Reinitialise.private final QueryNode
Term
(CharSequence field) private final TermRangeQueryNode
TermRangeExpr
(CharSequence field) final QueryNode
TopLevelQuery
(CharSequence field) final boolean
Trace enabled.
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token. -
jj_ntk
private int jj_ntk -
jj_scanpos
-
jj_lastpos
-
jj_la
private int jj_la -
jj_gen
private int jj_gen -
jj_la1
private final int[] jj_la1 -
jj_la1_0
private static int[] jj_la1_0 -
jj_la1_1
private static int[] jj_la1_1 -
jj_2_rtns
-
jj_rescan
private boolean jj_rescan -
jj_gc
private int jj_gc -
jj_ls
-
jj_expentries
-
jj_expentry
private int[] jj_expentry -
jj_kind
private int jj_kind -
jj_lasttokens
private int[] jj_lasttokens -
jj_endpos
private int jj_endpos -
trace_indent
private int trace_indent -
trace_enabled
private boolean trace_enabled
-
-
Constructor Details
-
StandardSyntaxParser
public StandardSyntaxParser() -
StandardSyntaxParser
Constructor with user supplied CharStream. -
StandardSyntaxParser
Constructor with generated Token Manager.
-
-
Method Details
-
parse
Parses a query string, returning aQueryNode
.- Specified by:
parse
in interfaceSyntaxParser
- Parameters:
query
- the query string to be parsed.field
- - default field name- Returns:
- QueryNode tree
- Throws:
ParseException
- if the parsing failsQueryNodeParseException
-
parseFloat
-
parseInt
-
TopLevelQuery
- Throws:
ParseException
-
Query
- Throws:
ParseException
-
DisjQuery
- Throws:
ParseException
-
ConjQuery
- Throws:
ParseException
-
ModClause
- Throws:
ParseException
-
Clause
- Throws:
ParseException
-
FieldName
- Throws:
ParseException
-
GroupingExpr
- Throws:
ParseException
-
IntervalExpr
- Throws:
ParseException
-
IntervalFun
- Throws:
ParseException
-
IntervalAtLeast
- Throws:
ParseException
-
IntervalMaxWidth
- Throws:
ParseException
-
IntervalMaxGaps
- Throws:
ParseException
-
IntervalUnordered
- Throws:
ParseException
-
IntervalUnorderedNoOverlaps
- Throws:
ParseException
-
IntervalOrdered
- Throws:
ParseException
-
IntervalOr
- Throws:
ParseException
-
IntervalPhrase
- Throws:
ParseException
-
IntervalBefore
- Throws:
ParseException
-
IntervalAfter
- Throws:
ParseException
-
IntervalContaining
- Throws:
ParseException
-
IntervalNotContaining
- Throws:
ParseException
-
IntervalContainedBy
- Throws:
ParseException
-
IntervalNotContainedBy
- Throws:
ParseException
-
IntervalWithin
- Throws:
ParseException
-
IntervalExtend
- Throws:
ParseException
-
IntervalNotWithin
- Throws:
ParseException
-
IntervalOverlapping
- Throws:
ParseException
-
IntervalNonOverlapping
- Throws:
ParseException
-
IntervalWildcard
- Throws:
ParseException
-
IntervalFuzzyTerm
- Throws:
ParseException
-
IntervalText
- Throws:
ParseException
-
Boost
- Throws:
ParseException
-
FuzzyOp
private final QueryNode FuzzyOp(CharSequence field, Token term, QueryNode node) throws ParseException - Throws:
ParseException
-
FieldRangeExpr
- Throws:
ParseException
-
Term
- Throws:
ParseException
-
QuotedTerm
- Throws:
ParseException
-
TermRangeExpr
- Throws:
ParseException
-
jj_2_1
private boolean jj_2_1(int xla) -
jj_2_2
private boolean jj_2_2(int xla) -
jj_2_3
private boolean jj_2_3(int xla) -
jj_2_4
private boolean jj_2_4(int xla) -
jj_2_5
private boolean jj_2_5(int xla) -
jj_2_6
private boolean jj_2_6(int xla) -
jj_2_7
private boolean jj_2_7(int xla) -
jj_2_8
private boolean jj_2_8(int xla) -
jj_2_9
private boolean jj_2_9(int xla) -
jj_2_10
private boolean jj_2_10(int xla) -
jj_2_11
private boolean jj_2_11(int xla) -
jj_2_12
private boolean jj_2_12(int xla) -
jj_2_13
private boolean jj_2_13(int xla) -
jj_2_14
private boolean jj_2_14(int xla) -
jj_2_15
private boolean jj_2_15(int xla) -
jj_2_16
private boolean jj_2_16(int xla) -
jj_2_17
private boolean jj_2_17(int xla) -
jj_2_18
private boolean jj_2_18(int xla) -
jj_2_19
private boolean jj_2_19(int xla) -
jj_2_20
private boolean jj_2_20(int xla) -
jj_2_21
private boolean jj_2_21(int xla) -
jj_2_22
private boolean jj_2_22(int xla) -
jj_2_23
private boolean jj_2_23(int xla) -
jj_2_24
private boolean jj_2_24(int xla) -
jj_2_25
private boolean jj_2_25(int xla) -
jj_2_26
private boolean jj_2_26(int xla) -
jj_2_27
private boolean jj_2_27(int xla) -
jj_2_28
private boolean jj_2_28(int xla) -
jj_3R_17
private boolean jj_3R_17() -
jj_3R_25
private boolean jj_3R_25() -
jj_3R_11
private boolean jj_3R_11() -
jj_3R_19
private boolean jj_3R_19() -
jj_3R_47
private boolean jj_3R_47() -
jj_3R_16
private boolean jj_3R_16() -
jj_3R_24
private boolean jj_3R_24() -
jj_3R_43
private boolean jj_3R_43() -
jj_3R_30
private boolean jj_3R_30() -
jj_3R_14
private boolean jj_3R_14() -
jj_3_28
private boolean jj_3_28() -
jj_3R_23
private boolean jj_3R_23() -
jj_3R_9
private boolean jj_3R_9() -
jj_3R_29
private boolean jj_3R_29() -
jj_3R_41
private boolean jj_3R_41() -
jj_3R_37
private boolean jj_3R_37() -
jj_3R_45
private boolean jj_3R_45() -
jj_3R_38
private boolean jj_3R_38() -
jj_3R_36
private boolean jj_3R_36() -
jj_3_2
private boolean jj_3_2() -
jj_3R_13
private boolean jj_3R_13() -
jj_3R_35
private boolean jj_3R_35() -
jj_3R_20
private boolean jj_3R_20() -
jj_3_1
private boolean jj_3_1() -
jj_3_3
private boolean jj_3_3() -
jj_3R_34
private boolean jj_3R_34() -
jj_3R_28
private boolean jj_3R_28() -
jj_3R_21
private boolean jj_3R_21() -
jj_3R_10
private boolean jj_3R_10() -
jj_3R_12
private boolean jj_3R_12() -
jj_3R_44
private boolean jj_3R_44() -
jj_3_25
private boolean jj_3_25() -
jj_3_24
private boolean jj_3_24() -
jj_3_23
private boolean jj_3_23() -
jj_3_22
private boolean jj_3_22() -
jj_3_21
private boolean jj_3_21() -
jj_3R_22
private boolean jj_3R_22() -
jj_3_20
private boolean jj_3_20() -
jj_3R_31
private boolean jj_3R_31() -
jj_3_19
private boolean jj_3_19() -
jj_3_18
private boolean jj_3_18() -
jj_3R_40
private boolean jj_3R_40() -
jj_3_17
private boolean jj_3_17() -
jj_3R_39
private boolean jj_3R_39() -
jj_3R_33
private boolean jj_3R_33() -
jj_3_16
private boolean jj_3_16() -
jj_3_15
private boolean jj_3_15() -
jj_3_14
private boolean jj_3_14() -
jj_3_13
private boolean jj_3_13() -
jj_3_12
private boolean jj_3_12() -
jj_3_11
private boolean jj_3_11() -
jj_3_10
private boolean jj_3_10() -
jj_3_9
private boolean jj_3_9() -
jj_3R_18
private boolean jj_3R_18() -
jj_3_8
private boolean jj_3_8() -
jj_3_7
private boolean jj_3_7() -
jj_3_6
private boolean jj_3_6() -
jj_3_5
private boolean jj_3_5() -
jj_3_4
private boolean jj_3_4() -
jj_3_27
private boolean jj_3_27() -
jj_3R_27
private boolean jj_3R_27() -
jj_3_26
private boolean jj_3_26() -
jj_3R_46
private boolean jj_3R_46() -
jj_3R_15
private boolean jj_3R_15() -
jj_3R_32
private boolean jj_3R_32() -
jj_3R_42
private boolean jj_3R_42() -
jj_3R_26
private boolean jj_3R_26() -
jj_la1_init_0
private static void jj_la1_init_0() -
jj_la1_init_1
private static void jj_la1_init_1() -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
jj_consume_token
- Throws:
ParseException
-
jj_scan_token
private boolean jj_scan_token(int kind) -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
jj_ntk_f
private int jj_ntk_f() -
jj_add_error_token
private void jj_add_error_token(int kind, int pos) -
generateParseException
Generate ParseException. -
trace_enabled
public final boolean trace_enabled()Trace enabled. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing. -
jj_rescan_token
private void jj_rescan_token() -
jj_save
private void jj_save(int index, int xla)
-