Package org.eclipse.epsilon.egl.internal
Class EglModule
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.AbstractModule
-
- org.eclipse.epsilon.eol.EolModule
-
- org.eclipse.epsilon.egl.internal.EglModule
-
- All Implemented Interfaces:
IModule,ModuleElement,IEglModule,IEolModule
public class EglModule extends EolModule implements IEglModule
Used internally byEglTemplateFactoryandEglTemplateto parse and execute EGL, by transforming to EOL. Most extensions should subclassEglTemplateFactoryand/orEglTemplaterather than this class.- Author:
- lrose, Sina Madani
-
-
Field Summary
Fields Modifier and Type Field Description protected EglParsereglParser-
Fields inherited from class org.eclipse.epsilon.eol.EolModule
compilationContext, context, declaredModelDeclarations, declaredOperations, imports, main, modelDeclarations, operations, postOperationStatements
-
Fields inherited from class org.eclipse.epsilon.eol.AbstractModule
parseProblems, parser, sourceFile, sourceUri
-
-
Constructor Summary
Constructors Constructor Description EglModule()EglModule(IEglContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleElementadapt(AST cst, ModuleElement parentAst)voidbuild(AST cst, IModule module)java.lang.Objectexecute(EglTemplate template, Formatter postprocessor)java.util.List<ModuleElement>getChildren()IEglContextgetContext()protected java.util.HashMap<java.lang.String,java.lang.Class<?>>getImportConfiguration()java.util.List<EglMarkerSection>getMarkers()java.util.List<ParseProblem>getParseProblems()protected booleanhasAnnotation(AST ast, java.lang.String name)booleanparse(java.lang.String code, java.io.File file)booleanparse(java.net.URI uri)protected booleanpreprocess(AST ast)-
Methods inherited from class org.eclipse.epsilon.eol.EolModule
checkImports, clearCache, compile, createLexer, createParser, execute, executeImpl, getCompilationContext, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getImportsByExtension, getMain, getMainRule, getModelDelcarations, getOperations, getParentModule, getPostOperationStatements, prepareContext, setContext, setMain, setParentModule, toString
-
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getSourceFile, getSourceUri, invokeMainRule
-
Methods inherited from class org.eclipse.epsilon.common.module.AbstractModuleElement
equals, getComments, 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.eol.IEolModule
configure, execute, getCompilationContext, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getMain, getModelDelcarations, getOperations, getParentModule, getPostOperationStatements, setContext, setParentModule
-
-
-
-
Field Detail
-
eglParser
protected EglParser eglParser
-
-
Constructor Detail
-
EglModule
public EglModule()
-
EglModule
public EglModule(IEglContext context)
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
buildin interfaceModuleElement- Overrides:
buildin classEolModule
-
parse
public boolean parse(java.lang.String code, java.io.File file) throws java.lang.Exception- Specified by:
parsein interfaceIEolModule- Specified by:
parsein interfaceIModule- Overrides:
parsein classAbstractModule- Throws:
java.lang.Exception
-
parse
public boolean parse(java.net.URI uri) throws java.lang.Exception- Specified by:
parsein interfaceIModule- Overrides:
parsein classAbstractModule- Throws:
java.lang.Exception
-
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
-
getMarkers
public java.util.List<EglMarkerSection> getMarkers()
- Specified by:
getMarkersin interfaceIEglModule
-
execute
public java.lang.Object execute(EglTemplate template, Formatter postprocessor) throws EglRuntimeException
- Specified by:
executein interfaceIEglModule- Throws:
EglRuntimeException
-
getParseProblems
public java.util.List<ParseProblem> getParseProblems()
- Specified by:
getParseProblemsin interfaceIEolModule- Specified by:
getParseProblemsin interfaceIModule- Overrides:
getParseProblemsin classAbstractModule
-
getChildren
public java.util.List<ModuleElement> getChildren()
- Specified by:
getChildrenin interfaceModuleElement- Overrides:
getChildrenin classAbstractModuleElement
-
getImportConfiguration
protected java.util.HashMap<java.lang.String,java.lang.Class<?>> getImportConfiguration()
- Overrides:
getImportConfigurationin classEolModule
-
getContext
public IEglContext getContext()
- Specified by:
getContextin interfaceIEglModule- Specified by:
getContextin interfaceIEolModule- Overrides:
getContextin classEolModule
-
hasAnnotation
protected boolean hasAnnotation(AST ast, java.lang.String name)
-
preprocess
protected boolean preprocess(AST ast)
-
-