org.apache.lucene.queryParser.surround.parser

Class QueryParser

Implemented Interfaces:
QueryParserConstants

public class QueryParser
extends Object
implements QueryParserConstants

This class is generated by JavaCC. The only method that clients should need to call is parse().

Field Summary

Token
jj_nt
boolean
lookingAhead
Token
token
QueryParserTokenManager
token_source

Fields inherited from interface org.apache.lucene.queryParser.surround.parser.QueryParserConstants

AND, Boost, CARAT, COLON, COMMA, DEFAULT, EOF, LPAREN, N, NOT, NUMBER, OR, QUOTED, RPAREN, SUFFIXTERM, TERM, TRUNCQUOTED, TRUNCTERM, W, _DISTOP_NUM, _NUM_CHAR, _ONE_CHAR, _STAR, _TERM_CHAR, _WHITESPACE, tokenImage

Constructor Summary

QueryParser()
QueryParser(CharStream stream)
QueryParser(QueryParserTokenManager tm)

Method Summary

SrndQuery
AndQuery()
SrndQuery
FieldsQuery()
List
FieldsQueryList()
SrndQuery
NQuery()
SrndQuery
NotQuery()
ArrayList
OptionalFields()
void
OptionalWeights(SrndQuery q)
SrndQuery
OrQuery()
SrndQuery
PrefixOperatorQuery()
SrndQuery
PrimaryQuery()
void
ReInit(CharStream stream)
void
ReInit(QueryParserTokenManager tm)
SrndQuery
SimpleTerm()
SrndQuery
TopSrndQuery()
SrndQuery
WQuery()
protected boolean
allowedSuffix(String suffixed)
protected boolean
allowedTruncation(String truncated)
protected static void
checkDistanceSubQueries(DistanceQuery distq, String opName)
void
disable_tracing()
void
enable_tracing()
ParseException
generateParseException()
protected SrndQuery
getAndQuery(List queries, boolean infix, Token andToken)
protected SrndQuery
getDistanceQuery(List queries, boolean infix, Token dToken, boolean ordered)
protected SrndQuery
getFieldsQuery(SrndQuery q, ArrayList fieldNames)
Token
getNextToken()
protected SrndQuery
getNotQuery(List queries, Token notToken)
protected static int
getOpDistance(String distanceOp)
protected SrndQuery
getOrQuery(List queries, boolean infix, Token orToken)
protected SrndQuery
getPrefixQuery(String prefix, boolean quoted)
protected SrndQuery
getTermQuery(String term, boolean quoted)
Token
getToken(int index)
protected SrndQuery
getTruncQuery(String truncated)
static SrndQuery
parse(String query)
SrndQuery
parse2(String query)

Field Details

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead

token

public Token token

token_source

public QueryParserTokenManager token_source

Constructor Details

QueryParser

public QueryParser()

QueryParser

public QueryParser(CharStream stream)

QueryParser

public QueryParser(QueryParserTokenManager tm)

Method Details

AndQuery

public final SrndQuery AndQuery()
            throws ParseException

FieldsQuery

public final SrndQuery FieldsQuery()
            throws ParseException

FieldsQueryList

public final List FieldsQueryList()
            throws ParseException

NQuery

public final SrndQuery NQuery()
            throws ParseException

NotQuery

public final SrndQuery NotQuery()
            throws ParseException

OptionalFields

public final ArrayList OptionalFields()
            throws ParseException

OptionalWeights

public final void OptionalWeights(SrndQuery q)
            throws ParseException

OrQuery

public final SrndQuery OrQuery()
            throws ParseException

PrefixOperatorQuery

public final SrndQuery PrefixOperatorQuery()
            throws ParseException

PrimaryQuery

public final SrndQuery PrimaryQuery()
            throws ParseException

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(QueryParserTokenManager tm)

SimpleTerm

public final SrndQuery SimpleTerm()
            throws ParseException

TopSrndQuery

public final SrndQuery TopSrndQuery()
            throws ParseException

WQuery

public final SrndQuery WQuery()
            throws ParseException

allowedSuffix

protected boolean allowedSuffix(String suffixed)

allowedTruncation

protected boolean allowedTruncation(String truncated)

checkDistanceSubQueries

protected static void checkDistanceSubQueries(DistanceQuery distq,
                                              String opName)
            throws ParseException

disable_tracing

public final void disable_tracing()

enable_tracing

public final void enable_tracing()

generateParseException

public ParseException generateParseException()

getAndQuery

protected SrndQuery getAndQuery(List queries,
                                boolean infix,
                                Token andToken)

getDistanceQuery

protected SrndQuery getDistanceQuery(List queries,
                                     boolean infix,
                                     Token dToken,
                                     boolean ordered)
            throws ParseException

getFieldsQuery

protected SrndQuery getFieldsQuery(SrndQuery q,
                                   ArrayList fieldNames)

getNextToken

public final Token getNextToken()

getNotQuery

protected SrndQuery getNotQuery(List queries,
                                Token notToken)

getOpDistance

protected static int getOpDistance(String distanceOp)

getOrQuery

protected SrndQuery getOrQuery(List queries,
                               boolean infix,
                               Token orToken)

getPrefixQuery

protected SrndQuery getPrefixQuery(String prefix,
                                   boolean quoted)

getTermQuery

protected SrndQuery getTermQuery(String term,
                                 boolean quoted)

getToken

public final Token getToken(int index)

getTruncQuery

protected SrndQuery getTruncQuery(String truncated)

parse

public static SrndQuery parse(String query)
            throws ParseException

parse2

public SrndQuery parse2(String query)
            throws ParseException

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