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
  • Field Details

    • token_source

      public StandardSyntaxParserTokenManager token_source
      Generated Token Manager.
    • token

      public Token token
      Current token.
    • jj_nt

      public Token jj_nt
      Next token.
    • jj_ntk

      private int jj_ntk
    • jj_scanpos

      private Token jj_scanpos
    • jj_lastpos

      private Token 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

      private final StandardSyntaxParser.JJCalls[] jj_2_rtns
    • jj_rescan

      private boolean jj_rescan
    • jj_gc

      private int jj_gc
    • jj_ls

      private static final StandardSyntaxParser.LookaheadSuccess jj_ls
    • jj_expentries

      private List<int[]> 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_enabled

      private boolean trace_enabled
  • Constructor Details

    • StandardSyntaxParser

      public StandardSyntaxParser()
    • StandardSyntaxParser

      public StandardSyntaxParser(CharStream stream)
      Constructor with user supplied CharStream.
    • StandardSyntaxParser

      public StandardSyntaxParser(StandardSyntaxParserTokenManager tm)
      Constructor with generated Token Manager.
  • Method Details

    • parse

      public QueryNode parse(CharSequence query, CharSequence field) throws QueryNodeParseException
      Parses a query string, returning a QueryNode.
      Specified by:
      parse in interface SyntaxParser
      Parameters:
      query - the query string to be parsed.
      field - - default field name
      Returns:
      QueryNode tree
      Throws:
      ParseException - if the parsing fails
      QueryNodeParseException
    • parseFloat

      public static float parseFloat(Token token)
    • parseInt

      public static int parseInt(Token token)
    • TopLevelQuery

      public final QueryNode TopLevelQuery(CharSequence field) throws ParseException
      Throws:
      ParseException
    • Query

      private final QueryNode Query(CharSequence field) throws ParseException
      Throws:
      ParseException
    • DisjQuery

      private final QueryNode DisjQuery(CharSequence field) throws ParseException
      Throws:
      ParseException
    • ConjQuery

      private final QueryNode ConjQuery(CharSequence field) throws ParseException
      Throws:
      ParseException
    • ModClause

      private final QueryNode ModClause(CharSequence field) throws ParseException
      Throws:
      ParseException
    • Clause

      private final QueryNode Clause(CharSequence field) throws ParseException
      Throws:
      ParseException
    • FieldName

      private final CharSequence FieldName() throws ParseException
      Throws:
      ParseException
    • GroupingExpr

      private final QueryNode GroupingExpr(CharSequence field) throws ParseException
      Throws:
      ParseException
    • IntervalExpr

      private final IntervalQueryNode IntervalExpr(CharSequence field) throws ParseException
      Throws:
      ParseException
    • IntervalFun

      private final IntervalFunction IntervalFun() throws ParseException
      Throws:
      ParseException
    • IntervalAtLeast

      private final IntervalFunction IntervalAtLeast() throws ParseException
      Throws:
      ParseException
    • IntervalMaxWidth

      private final IntervalFunction IntervalMaxWidth() throws ParseException
      Throws:
      ParseException
    • IntervalMaxGaps

      private final IntervalFunction IntervalMaxGaps() throws ParseException
      Throws:
      ParseException
    • IntervalUnordered

      private final IntervalFunction IntervalUnordered() throws ParseException
      Throws:
      ParseException
    • IntervalUnorderedNoOverlaps

      private final IntervalFunction IntervalUnorderedNoOverlaps() throws ParseException
      Throws:
      ParseException
    • IntervalOrdered

      private final IntervalFunction IntervalOrdered() throws ParseException
      Throws:
      ParseException
    • IntervalOr

      private final IntervalFunction IntervalOr() throws ParseException
      Throws:
      ParseException
    • IntervalPhrase

      private final IntervalFunction IntervalPhrase() throws ParseException
      Throws:
      ParseException
    • IntervalBefore

      private final IntervalFunction IntervalBefore() throws ParseException
      Throws:
      ParseException
    • IntervalAfter

      private final IntervalFunction IntervalAfter() throws ParseException
      Throws:
      ParseException
    • IntervalContaining

      private final IntervalFunction IntervalContaining() throws ParseException
      Throws:
      ParseException
    • IntervalNotContaining

      private final IntervalFunction IntervalNotContaining() throws ParseException
      Throws:
      ParseException
    • IntervalContainedBy

      private final IntervalFunction IntervalContainedBy() throws ParseException
      Throws:
      ParseException
    • IntervalNotContainedBy

      private final IntervalFunction IntervalNotContainedBy() throws ParseException
      Throws:
      ParseException
    • IntervalWithin

      private final IntervalFunction IntervalWithin() throws ParseException
      Throws:
      ParseException
    • IntervalExtend

      private final IntervalFunction IntervalExtend() throws ParseException
      Throws:
      ParseException
    • IntervalNotWithin

      private final IntervalFunction IntervalNotWithin() throws ParseException
      Throws:
      ParseException
    • IntervalOverlapping

      private final IntervalFunction IntervalOverlapping() throws ParseException
      Throws:
      ParseException
    • IntervalNonOverlapping

      private final IntervalFunction IntervalNonOverlapping() throws ParseException
      Throws:
      ParseException
    • IntervalWildcard

      private final IntervalFunction IntervalWildcard() throws ParseException
      Throws:
      ParseException
    • IntervalFuzzyTerm

      private final IntervalFunction IntervalFuzzyTerm() throws ParseException
      Throws:
      ParseException
    • IntervalText

      private final IntervalFunction IntervalText() throws ParseException
      Throws:
      ParseException
    • Boost

      private final QueryNode Boost(QueryNode node) throws ParseException
      Throws:
      ParseException
    • FuzzyOp

      private final QueryNode FuzzyOp(CharSequence field, Token term, QueryNode node) throws ParseException
      Throws:
      ParseException
    • FieldRangeExpr

      private final TermRangeQueryNode FieldRangeExpr(CharSequence field) throws ParseException
      Throws:
      ParseException
    • Term

      private final QueryNode Term(CharSequence field) throws ParseException
      Throws:
      ParseException
    • QuotedTerm

      private final QueryNode QuotedTerm(CharSequence field) throws ParseException
      Throws:
      ParseException
    • TermRangeExpr

      private final TermRangeQueryNode TermRangeExpr(CharSequence field) throws ParseException
      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_IntervalUnorderedNoOverlaps_465_3_17

      private boolean jj_3R_IntervalUnorderedNoOverlaps_465_3_17()
    • jj_3R_IntervalContainedBy_557_3_25

      private boolean jj_3R_IntervalContainedBy_557_3_25()
    • jj_3R_FieldRangeExpr_744_3_11

      private boolean jj_3R_FieldRangeExpr_744_3_11()
    • jj_3R_IntervalWildcard_647_3_19

      private boolean jj_3R_IntervalWildcard_647_3_19()
    • jj_3R_QuotedTerm_834_5_47

      private boolean jj_3R_QuotedTerm_834_5_47()
    • jj_3R_IntervalUnordered_454_3_16

      private boolean jj_3R_IntervalUnordered_454_3_16()
    • jj_3R_IntervalNotContaining_546_3_24

      private boolean jj_3R_IntervalNotContaining_546_3_24()
    • jj_3R_QuotedTerm_829_3_43

      private boolean jj_3R_QuotedTerm_829_3_43()
    • jj_3R_IntervalNonOverlapping_636_3_30

      private boolean jj_3R_IntervalNonOverlapping_636_3_30()
    • jj_3R_IntervalMaxGaps_442_3_14

      private boolean jj_3R_IntervalMaxGaps_442_3_14()
    • jj_3_28

      private boolean jj_3_28()
    • jj_3R_IntervalContaining_535_3_23

      private boolean jj_3R_IntervalContaining_535_3_23()
    • jj_3R_FieldName_344_3_9

      private boolean jj_3R_FieldName_344_3_9()
    • jj_3R_IntervalOverlapping_626_3_29

      private boolean jj_3R_IntervalOverlapping_626_3_29()
    • jj_3R_Term_806_10_41

      private boolean jj_3R_Term_806_10_41()
    • jj_3R_Term_808_8_37

      private boolean jj_3R_Term_808_8_37()
    • jj_3R_FuzzyOp_717_3_45

      private boolean jj_3R_FuzzyOp_717_3_45()
    • jj_3R_Term_810_5_38

      private boolean jj_3R_Term_810_5_38()
    • jj_3R_Term_807_8_36

      private boolean jj_3R_Term_807_8_36()
    • jj_3_2

      private boolean jj_3_2()
    • jj_3R_IntervalMaxWidth_430_3_13

      private boolean jj_3R_IntervalMaxWidth_430_3_13()
    • jj_3R_Term_804_8_35

      private boolean jj_3R_Term_804_8_35()
    • jj_3R_IntervalAfter_524_3_20

      private boolean jj_3R_IntervalAfter_524_3_20()
    • jj_3_1

      private boolean jj_3_1()
    • jj_3_3

      private boolean jj_3_3()
    • jj_3R_Term_799_8_34

      private boolean jj_3R_Term_799_8_34()
    • jj_3R_IntervalNotWithin_611_3_28

      private boolean jj_3R_IntervalNotWithin_611_3_28()
    • jj_3R_IntervalBefore_513_3_21

      private boolean jj_3R_IntervalBefore_513_3_21()
    • jj_3R_Term_798_3_10

      private boolean jj_3R_Term_798_3_10()
    • jj_3R_IntervalAtLeast_418_3_12

      private boolean jj_3R_IntervalAtLeast_418_3_12()
    • jj_3R_Boost_700_3_44

      private boolean jj_3R_Boost_700_3_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_IntervalPhrase_501_3_22

      private boolean jj_3R_IntervalPhrase_501_3_22()
    • jj_3_20

      private boolean jj_3_20()
    • jj_3R_IntervalExtend_595_3_31

      private boolean jj_3R_IntervalExtend_595_3_31()
    • jj_3_19

      private boolean jj_3_19()
    • jj_3_18

      private boolean jj_3_18()
    • jj_3R_IntervalText_686_5_40

      private boolean jj_3R_IntervalText_686_5_40()
    • jj_3_17

      private boolean jj_3_17()
    • jj_3R_IntervalText_685_5_39

      private boolean jj_3R_IntervalText_685_5_39()
    • jj_3R_IntervalText_685_5_33

      private boolean jj_3R_IntervalText_685_5_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_IntervalOr_489_3_18

      private boolean jj_3R_IntervalOr_489_3_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_IntervalWithin_579_3_27

      private boolean jj_3R_IntervalWithin_579_3_27()
    • jj_3_26

      private boolean jj_3_26()
    • jj_3R_TermRangeExpr_856_6_46

      private boolean jj_3R_TermRangeExpr_856_6_46()
    • jj_3R_IntervalOrdered_477_3_15

      private boolean jj_3R_IntervalOrdered_477_3_15()
    • jj_3R_IntervalFuzzyTerm_666_3_32

      private boolean jj_3R_IntervalFuzzyTerm_666_3_32()
    • jj_3R_TermRangeExpr_855_3_42

      private boolean jj_3R_TermRangeExpr_855_3_42()
    • jj_3R_IntervalNotContainedBy_568_3_26

      private boolean jj_3R_IntervalNotContainedBy_568_3_26()
    • jj_la1_init_0

      private static void jj_la1_init_0()
    • jj_la1_init_1

      private static void jj_la1_init_1()
    • ReInit

      public void ReInit(CharStream stream)
      Reinitialise.
    • ReInit

      public void ReInit(StandardSyntaxParserTokenManager tm)
      Reinitialise.
    • jj_consume_token

      private Token jj_consume_token(int kind) throws ParseException
      Throws:
      ParseException
    • jj_scan_token

      private boolean jj_scan_token(int kind)
    • getNextToken

      public final Token getNextToken()
      Get the next Token.
    • getToken

      public final Token getToken(int index)
      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

      public ParseException 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)