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 Token
jj_nt
Next token.Token
token
Current token.FilterParserTokenManager
token_source
Generated 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()
void
disable_tracing()
Disable tracing.void
enable_tracing()
Enable tracing.ParseException
generateParseException()
Generate ParseException.Token
getNextToken()
Get the next Token.Token
getToken(int index)
Get the specific Token.Filter<T>
ground()
Filter<T>
or()
Filter<T>
parse(String filter)
void
ReInit(FilterParserTokenManager tm)
Reinitialise.void
ReInit(InputStream stream)
Reinitialise.void
ReInit(InputStream stream, String encoding)
Reinitialise.void
ReInit(Reader stream)
Reinitialise.Filter<T>
start()
Parser.boolean
trace_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.
-