Package org.terrier.querying.parser
Class TerrierQLParser
- java.lang.Object
-
- org.terrier.querying.parser.TerrierQLParser
-
- All Implemented Interfaces:
TerrierQLParserConstants
public class TerrierQLParser extends java.lang.Object implements TerrierQLParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Token
jj_nt
Next token.Token
token
Current token.TerrierQLParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from interface org.terrier.querying.parser.TerrierQLParserConstants
ALPHANUMERIC, CLOSE_DISJUNCTIVE, CLOSE_PAREN, COLON, DEFAULT, EOF, FLOAT, HAT, NOT_REQUIRED, OLD_MAC_EOL, OPEN_DISJUNCTIVE, OPEN_PAREN, PROXIMITY, QUOTE, REQUIRED, SPACE, tokenImage, UNIX_EOL, WINDOWS_EOL, WithinWeight
-
-
Constructor Summary
Constructors Constructor Description TerrierQLParser(java.io.InputStream stream)
Constructor with InputStream.TerrierQLParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingTerrierQLParser(java.io.Reader stream)
Constructor.TerrierQLParser(java.lang.String r)
TerrierQLParser(TerrierQLParserTokenManager tm)
Constructor with generated Token Manager.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disable_tracing()
Disable tracing.Query
disjunctiveQuery()
void
enable_tracing()
Enable tracing.Query
explicitMultiTermQuery()
Query
fieldQuery()
ParseException
generateParseException()
Generate ParseException.Token
getNextToken()
Get the next Token.Token
getToken(int index)
Get the specific Token.static void
main(java.lang.String[] args)
Query
parse()
Query
parseOne()
Query
phraseQuery()
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(TerrierQLParserTokenManager tm)
Reinitialise.Query
requirementQuery()
Query
singleTermQuery()
-
-
-
Field Detail
-
token_source
public TerrierQLParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
TerrierQLParser
public TerrierQLParser(java.lang.String r)
-
TerrierQLParser
public TerrierQLParser(java.io.InputStream stream)
Constructor with InputStream.
-
TerrierQLParser
public TerrierQLParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
TerrierQLParser
public TerrierQLParser(java.io.Reader stream)
Constructor.
-
TerrierQLParser
public TerrierQLParser(TerrierQLParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
parseOne
public final Query parseOne() throws ParseException
- Throws:
ParseException
-
parse
public final Query parse() throws ParseException
- Throws:
ParseException
-
singleTermQuery
public final Query singleTermQuery() throws ParseException
- Throws:
ParseException
-
fieldQuery
public final Query fieldQuery() throws ParseException
- Throws:
ParseException
-
phraseQuery
public final Query phraseQuery() throws ParseException
- Throws:
ParseException
-
disjunctiveQuery
public final Query disjunctiveQuery() throws ParseException
- Throws:
ParseException
-
explicitMultiTermQuery
public final Query explicitMultiTermQuery() throws ParseException
- Throws:
ParseException
-
requirementQuery
public final Query requirementQuery() 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(TerrierQLParserTokenManager 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.
-
-