java.lang.Object
dev.civl.abc.front.IF.Front
Entry point of the front module.
A factory class for producing new instances of
Preprocessor,
Parser and ASTBuilder for using those classes in some common
scenarios.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ASTBuildernewASTBuilder(Configurations.Language language, Configuration configuration, ASTFactory astFactory) Creates an AST builder for the given language.static ParsernewParser(Configurations.Language language) Creates a new instance of aParserfor the given language.static PreprocessornewPreprocessor(Configurations.Language language, Configuration config, FileIndexer indexer, TokenFactory tokenFactory) Returns a new Preprocessor using the default include paths.
-
Constructor Details
-
Front
public Front()
-
-
Method Details
-
newPreprocessor
public static Preprocessor newPreprocessor(Configurations.Language language, Configuration config, FileIndexer indexer, TokenFactory tokenFactory) Returns a new Preprocessor using the default include paths. A runtime exception will be thrown if the language is not yet supported.- Parameters:
language- the language of the preprocessorconfig- the configuration of the translation taskindexer- the file indexer that will be used to index all source files encountered by the new preprocessor- Returns:
- a new Preprocessor
-
newParser
Creates a new instance of aParserfor the given language. This method throws a runtime exception if the given language is not supported yet.- Returns:
- the new
Parser
-
newASTBuilder
public static ASTBuilder newASTBuilder(Configurations.Language language, Configuration configuration, ASTFactory astFactory) Creates an AST builder for the given language. A runtime exception is thrown if the language is not yet supported.- Parameters:
language-configuration-astFactory-- Returns:
-