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, preFields inherited from class org.eclipse.epsilon.eol.EolModule
context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatementsFields 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) voidCreates an object that implements debugging (i.e.protected GenerationRulecreateGenerationRule(AST generationRuleAst) Subclasses may override this method to change the implementation ofGenerationRulethat is instantiated after parsing an EGX program.protected org.antlr.runtime.LexercreateLexer(org.antlr.runtime.ANTLRInputStream inputStream) createParser(org.antlr.runtime.TokenStream tokenStream) booleanbooleanbooleanprotected ObjectMain rule processing logic.protected voidsetFileGeneratingTemplateFactory(Path outputRoot) Convenience method for initialising aEglFileGeneratingTemplateFactorywith the specified output path.Methods inherited from class org.eclipse.epsilon.erl.ErlModule
calculateSuperRules, execute, execute, executeImpl, getDeclaredPost, getDeclaredPre, getPost, getPre, postExecution, prepareExecutionMethods 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, toStringMethods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRuleMethods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getChildren, getComments, getData, getDebugInfo, getFile, getModule, getParent, getRegion, getUri, hashCode, setModule, setParent, setRegion, setUriMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.epsilon.egl.IEgxModule
getTemplateFactory, setTemplateFactoryMethods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, execute, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImportManager, getImports, getMain, getModelDeclarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, setContext, setImportManager, setParentModuleMethods inherited from interface org.eclipse.epsilon.erl.IErlModule
getDeclaredPost, getDeclaredPre, getPost, getPreMethods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, parseMethods 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 aEglFileGeneratingTemplateFactorywith the specified output path.- Parameters:
outputRoot-- Throws:
EglRuntimeException- Since:
- 1.6
-
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream) - Overrides:
createLexerin classErlModule
-
createParser
- Overrides:
createParserin classErlModule
-
getMainRule
- Overrides:
getMainRulein classErlModule
-
build
- Specified by:
buildin interfaceModuleElement- Overrides:
buildin classErlModule
-
adapt
-
createGenerationRule
Subclasses may override this method to change the implementation ofGenerationRulethat is instantiated after parsing an EGX program. -
getDeclaredGenerationRules
- Specified by:
getDeclaredGenerationRulesin interfaceIEgxModule
-
parse
-
parse
- Specified by:
parsein interfaceIModule- Overrides:
parsein classAbstractModule- Throws:
Exception
-
parse
- Specified by:
parsein interfaceIEolModule- Specified by:
parsein interfaceIModule- Overrides:
parsein classAbstractModule- Throws:
Exception
-
processRules
Description copied from class:ErlModuleMain rule processing logic. Non-abstract for compatibility.- Overrides:
processRulesin classErlModule- Returns:
- The result of executing this module.
- Throws:
EolRuntimeException
-
getImportConfiguration
- Overrides:
getImportConfigurationin classErlModule
-
getGenerationRules
- Specified by:
getGenerationRulesin interfaceIEgxModule
-
getContext
- Specified by:
getContextin interfaceIEgxModule- Specified by:
getContextin interfaceIEolModule- Specified by:
getContextin interfaceIErlModule- Overrides:
getContextin classErlModule
-
createDebugger
Description copied from interface:IEolModuleCreates an object that implements debugging (i.e. breakpoints and stepping) for this module.- Specified by:
createDebuggerin interfaceIEolModule- Overrides:
createDebuggerin classEolModule
-