Interface IGeneralPreProcessor
-
- All Superinterfaces:
IPreProcessor
- All Known Implementing Classes:
CommentExtractor
,CommentRemover
,TrimWhitespaceOnly
public interface IGeneralPreProcessor extends IPreProcessor
General preprocessor interface, used to filer a set of tokens from a lexer which conforms to the provided spec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.List<java.lang.Class<? extends IGeneralPreProcessor>>
getDependencies()
Specify a set of dependencies which must be present in and executed prior to this preprocessor in aPreProcessingStrategy
ILexerSpecification
getLexerSpecification()
Specifies which channels must be present in the lexer for the preprocessor to function, this is a minimum specification, other channels may be present.java.util.List<? extends org.antlr.v4.runtime.Token>
process(java.util.List<? extends org.antlr.v4.runtime.Token> tokens, org.antlr.v4.runtime.Vocabulary vocab, java.lang.String lang)
Method to perform preprocessing filtering on a source file.
-
-
-
Method Detail
-
getDependencies
default java.util.List<java.lang.Class<? extends IGeneralPreProcessor>> getDependencies()
Specify a set of dependencies which must be present in and executed prior to this preprocessor in aPreProcessingStrategy
- Returns:
- list of dependencies, ordered.
-
getLexerSpecification
ILexerSpecification getLexerSpecification()
Specifies which channels must be present in the lexer for the preprocessor to function, this is a minimum specification, other channels may be present.- Returns:
- lexer specification
-
process
java.util.List<? extends org.antlr.v4.runtime.Token> process(java.util.List<? extends org.antlr.v4.runtime.Token> tokens, org.antlr.v4.runtime.Vocabulary vocab, java.lang.String lang)
Method to perform preprocessing filtering on a source file.- Parameters:
tokens
- List of tokens to processvocab
- Lexer vocabularylang
- language of source file being processed- Returns:
- output list of filtered tokens
-
-