Class FilterParser<T>
java.lang.Object
it.unimi.dsi.law.warc.filters.parser.FilterParser<T>
- All Implemented Interfaces:
FilterParserConstants
public class FilterParser<T> extends Object implements FilterParserConstants
A simple parser that transforms a filter expression into a filter.
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.TokentokenCurrent token.FilterParserTokenManagertoken_sourceGenerated Token Manager.Fields inherited from interface it.unimi.dsi.law.warc.filters.parser.FilterParserConstants
AND, ARGS, CLOSEPAREN, DEFAULT, EOF, FALSE, NOT, OPENPAREN, OR, tokenImage, TRUE, WORD -
Constructor Summary
Constructors Constructor Description FilterParser(FilterParserTokenManager tm)Constructor with generated Token Manager.FilterParser(InputStream stream)Constructor with InputStream.FilterParser(InputStream stream, String encoding)Constructor with InputStream and supplied encodingFilterParser(Reader stream)Constructor.FilterParser(Class<T> tClass) -
Method Summary
Modifier and Type Method Description Filter<T>and()Filter<T>atom()voiddisable_tracing()Disable tracing.voidenable_tracing()Enable tracing.ParseExceptiongenerateParseException()Generate ParseException.TokengetNextToken()Get the next Token.TokengetToken(int index)Get the specific Token.Filter<T>ground()Filter<T>or()Filter<T>parse(String filter)voidReInit(FilterParserTokenManager tm)Reinitialise.voidReInit(InputStream stream)Reinitialise.voidReInit(InputStream stream, String encoding)Reinitialise.voidReInit(Reader stream)Reinitialise.Filter<T>start()Parser.booleantrace_enabled()Trace enabled.
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
FilterParser
-
FilterParser
Constructor with InputStream. -
FilterParser
Constructor with InputStream and supplied encoding -
FilterParser
Constructor. -
FilterParser
Constructor with generated Token Manager.
-
-
Method Details
-
parse
- Throws:
ParseException
-
start
Parser.- Throws:
ParseException
-
or
- Throws:
ParseException
-
and
- Throws:
ParseException
-
atom
- Throws:
ParseException
-
ground
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
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.
-