Package org.eclipse.epsilon.egl
Class EgxModule
- All Implemented Interfaces:
IModule
,ModuleElement
,IEgxModule
,IEolModule
,IErlModule
- Direct Known Subclasses:
EgxModuleParallel
,LazyEgxModule
- Since:
- 1.6 extends ERL rather than EGL.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected NamedRuleList<GenerationRule>
protected NamedRuleList<GenerationRule>
Fields inherited from class org.eclipse.epsilon.erl.ErlModule
declaredPost, declaredPre, post, pre
Fields inherited from class org.eclipse.epsilon.eol.EolModule
context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatements
Fields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri
-
Constructor Summary
ConstructorsConstructorDescriptionCallsEgxModule(Path)
.Instantiates the module and the context configured for outputting generated files to the specified directory.EgxModule
(EglTemplateFactory templateFactory) EgxModule
(IEgxContext context) Instantiates the module with the specified execution context. -
Method Summary
Modifier and TypeMethodDescriptionadapt
(AST cst, ModuleElement parentAst) void
protected GenerationRule
createGenerationRule
(AST generationRuleAst) Subclasses may override this method to change the implementation ofGenerationRule
that is instantiated after parsing an EGX program.protected org.antlr.runtime.Lexer
createLexer
(org.antlr.runtime.ANTLRInputStream inputStream) createParser
(org.antlr.runtime.TokenStream tokenStream) boolean
boolean
boolean
protected Object
Main rule processing logic.protected void
setFileGeneratingTemplateFactory
(Path outputRoot) Convenience method for initialising aEglFileGeneratingTemplateFactory
with the specified output path.Methods inherited from class org.eclipse.epsilon.erl.ErlModule
calculateSuperRules, execute, execute, executeImpl, getDeclaredPost, getDeclaredPre, getPost, getPre, postExecution, prepareExecution
Methods inherited from class org.eclipse.epsilon.eol.EolModule
checkImports, clearCache, execute, getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getImportsByExtension, getMain, getModelDeclarations, getOperations, getParentModule, getPostOperationStatements, prepareContext, setContext, setImportManager, setMain, setParentModule, toString
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUri
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.epsilon.egl.IEgxModule
getTemplateFactory, setTemplateFactory
Methods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, execute, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getMain, getModelDeclarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, setContext, setImportManager, setParentModule
Methods inherited from interface org.eclipse.epsilon.erl.IErlModule
getDeclaredPost, getDeclaredPre, getPost, getPre
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parse
Methods inherited from interface org.eclipse.epsilon.common.module.ModuleElement
getChildren, getComments, getData, getFile, getModule, getParent, getRegion, getUri, setModule, setParent, setRegion, setUri
-
Field Details
-
generationRules
-
declaredGenerationRules
-
-
Constructor Details
-
EgxModule
public EgxModule() -
EgxModule
CallsEgxModule(Path)
.- Parameters:
outputRoot
-- Throws:
EglRuntimeException
- Since:
- 1.6
- See Also:
-
EgxModule
Instantiates the module and the context configured for outputting generated files to the specified directory.- Parameters:
outputRoot
- The base location to send output files to.- Throws:
EglRuntimeException
- If the path could not be resolved.- Since:
- 1.6
-
EgxModule
Instantiates the module with the specified execution context.- Parameters:
context
- The execution context
-
EgxModule
-
-
Method Details
-
setFileGeneratingTemplateFactory
Convenience method for initialising aEglFileGeneratingTemplateFactory
with the specified output path.- Parameters:
outputRoot
-- Throws:
EglRuntimeException
- Since:
- 1.6
-
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream) - Overrides:
createLexer
in classErlModule
-
createParser
- Overrides:
createParser
in classErlModule
-
getMainRule
- Overrides:
getMainRule
in classErlModule
-
build
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classErlModule
-
adapt
-
createGenerationRule
Subclasses may override this method to change the implementation ofGenerationRule
that is instantiated after parsing an EGX program. -
getDeclaredGenerationRules
- Specified by:
getDeclaredGenerationRules
in interfaceIEgxModule
-
parse
-
parse
- Specified by:
parse
in interfaceIModule
- Overrides:
parse
in classAbstractModule
- Throws:
Exception
-
parse
- Specified by:
parse
in interfaceIEolModule
- Specified by:
parse
in interfaceIModule
- Overrides:
parse
in classAbstractModule
- Throws:
Exception
-
processRules
Description copied from class:ErlModule
Main rule processing logic. Non-abstract for compatibility.- Overrides:
processRules
in classErlModule
- Returns:
- The result of executing this module.
- Throws:
EolRuntimeException
-
getImportConfiguration
- Overrides:
getImportConfiguration
in classErlModule
-
getGenerationRules
- Specified by:
getGenerationRules
in interfaceIEgxModule
-
getContext
- Specified by:
getContext
in interfaceIEgxModule
- Specified by:
getContext
in interfaceIEolModule
- Specified by:
getContext
in interfaceIErlModule
- Overrides:
getContext
in classErlModule
-