org.apache.lucene.queryParser.standard.parser

## Class StandardSyntaxParser

- java.lang.Object
- - org.apache.lucene.queryParser.standard.parser.StandardSyntaxParser

- All Implemented Interfaces:
    SyntaxParser, StandardSyntaxParserConstants

      public class StandardSyntaxParser
      extends java.lang.Object
      implements SyntaxParser, StandardSyntaxParserConstants

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Token` | `jj_nt` Next token.
    `Token` | `token` Current token.
    `StandardSyntaxParserTokenManager` | `token_source` Generated Token Manager.

    - ### Fields inherited from interface org.apache.lucene.queryParser.standard.parser.StandardSyntaxParserConstants

      `_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, QUOTED, RangeEx, RANGEEX_END, RANGEEX_GOOP, RANGEEX_QUOTED, RANGEEX_START, RANGEEX_TO, RangeIn, RANGEIN_END, RANGEIN_GOOP, RANGEIN_QUOTED, RANGEIN_START, RANGEIN_TO, RPAREN, TERM, tokenImage`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardSyntaxParser()`
    `StandardSyntaxParser(java.io.InputStream stream)` Constructor with InputStream.
    `StandardSyntaxParser(java.io.InputStream stream, java.lang.String encoding)` Constructor with InputStream and supplied encoding
    `StandardSyntaxParser(java.io.Reader stream)` Constructor.
    `StandardSyntaxParser(StandardSyntaxParserTokenManager tm)` Constructor with generated Token Manager.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `QueryNode` | `Clause(java.lang.CharSequence field)`
    `QueryNode` | `ConjQuery(java.lang.CharSequence field)`
    `int` | `Conjunction()`
    `void` | `disable_tracing()` Disable tracing.
    `QueryNode` | `DisjQuery(java.lang.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(java.lang.CharSequence field)`
    `ModifierQueryNode.Modifier` | `Modifiers()`
    `QueryNode` | `parse(java.lang.CharSequence query, java.lang.CharSequence field)` Parses a query string, returning a `QueryNode`.
    `QueryNode` | `Query(java.lang.CharSequence field)`
    `void` | `ReInit(java.io.InputStream stream)` Reinitialise.
    `void` | `ReInit(java.io.InputStream stream, java.lang.String encoding)` Reinitialise.
    `void` | `ReInit(java.io.Reader stream)` Reinitialise.
    `void` | `ReInit(StandardSyntaxParserTokenManager tm)` Reinitialise.
    `QueryNode` | `Term(java.lang.CharSequence field)`
    `QueryNode` | `TopLevelQuery(java.lang.CharSequence field)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### token_source

          public StandardSyntaxParserTokenManager token_source

      Generated Token Manager.

    - #### token

          public Token token

      Current token.

    - #### jj_nt

          public Token jj_nt

      Next token.

  - ### Constructor Detail

    - #### StandardSyntaxParser

          public StandardSyntaxParser()

    - #### StandardSyntaxParser

          public StandardSyntaxParser(java.io.InputStream stream)

      Constructor with InputStream.

    - #### StandardSyntaxParser

          public StandardSyntaxParser(java.io.InputStream stream,
                                      java.lang.String encoding)

      Constructor with InputStream and supplied encoding

    - #### StandardSyntaxParser

          public StandardSyntaxParser(java.io.Reader stream)

      Constructor.

    - #### StandardSyntaxParser

          public StandardSyntaxParser(StandardSyntaxParserTokenManager tm)

      Constructor with generated Token Manager.

  - ### Method Detail

    - #### parse

          public QueryNode parse(java.lang.CharSequence query,
                                 java.lang.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`

    - #### Conjunction

          public final int Conjunction()
                                throws ParseException

      Throws:
        `ParseException`

    - #### Modifiers

          public final ModifierQueryNode.Modifier Modifiers()
                                                     throws ParseException

      Throws:
        `ParseException`

    - #### TopLevelQuery

          public final QueryNode TopLevelQuery(java.lang.CharSequence field)
                                        throws ParseException

      Throws:
        `ParseException`

    - #### Query

          public final QueryNode Query(java.lang.CharSequence field)
                                throws ParseException

      Throws:
        `ParseException`

    - #### DisjQuery

          public final QueryNode DisjQuery(java.lang.CharSequence field)
                                    throws ParseException

      Throws:
        `ParseException`

    - #### ConjQuery

          public final QueryNode ConjQuery(java.lang.CharSequence field)
                                    throws ParseException

      Throws:
        `ParseException`

    - #### ModClause

          public final QueryNode ModClause(java.lang.CharSequence field)
                                    throws ParseException

      Throws:
        `ParseException`

    - #### Clause

          public final QueryNode Clause(java.lang.CharSequence field)
                                 throws ParseException

      Throws:
        `ParseException`

    - #### Term

          public final QueryNode Term(java.lang.CharSequence field)
                               throws ParseException

      Throws:
        `ParseException`

    - #### ReInit

          public void ReInit(java.io.InputStream stream)

      Reinitialise.

    - #### ReInit

          public void ReInit(java.io.InputStream stream,
                             java.lang.String encoding)

      Reinitialise.

    - #### ReInit

          public void ReInit(java.io.Reader stream)

      Reinitialise.

    - #### ReInit

          public void ReInit(StandardSyntaxParserTokenManager tm)

      Reinitialise.

    - #### getNextToken

          public final Token getNextToken()

      Get the next Token.

    - #### getToken

          public final Token getToken(int index)

      Get the specific Token.

    - #### generateParseException

          public ParseException generateParseException()

      Generate ParseException.

    - #### enable_tracing

          public final void enable_tracing()

      Enable tracing.

    - #### disable_tracing

          public final void disable_tracing()

      Disable tracing.

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.