Package org.eclipse.epsilon.erl
Class ErlModule
- java.lang.Object
-
- org.eclipse.epsilon.common.module.AbstractModuleElement
-
- org.eclipse.epsilon.eol.AbstractModule
-
- org.eclipse.epsilon.eol.EolModule
-
- org.eclipse.epsilon.erl.ErlModule
-
- All Implemented Interfaces:
IModule
,ModuleElement
,IEolModule
,IErlModule
- Direct Known Subclasses:
AbstractEplModule
,EclModule
,EgxModule
,ErlModuleParallel
,EtlModule
,EvlModule
,FlockModule
,PinsetModule
public class ErlModule extends EolModule implements IErlModule
-
-
Field Summary
Fields Modifier and Type Field Description protected NamedRuleList<Post>
declaredPost
protected NamedRuleList<Pre>
declaredPre
protected NamedRuleList<Post>
post
protected NamedRuleList<Pre>
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
Constructors Constructor Description ErlModule()
ErlModule(IErlContext context)
Instantiates the module with the specified execution context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleElement
adapt(AST cst, ModuleElement parentAst)
void
build(AST cst, IModule module)
List<ParseProblem>
calculateSuperRules(List<? extends ExtensibleNamedRule> allRules)
protected org.antlr.runtime.Lexer
createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
EpsilonParser
createParser(org.antlr.runtime.TokenStream tokenStream)
protected void
execute(List<? extends NamedStatementBlockRule> namedRules)
protected void
execute(List<? extends NamedStatementBlockRule> namedRules, IEolContext context)
Object
executeImpl()
IErlContext
getContext()
List<Post>
getDeclaredPost()
List<Pre>
getDeclaredPre()
HashMap<String,Class<?>>
getImportConfiguration()
String
getMainRule()
List<Post>
getPost()
List<Pre>
getPre()
void
postExecution()
void
prepareExecution()
protected Object
processRules()
Main rule processing logic.-
Methods inherited from class org.eclipse.epsilon.eol.EolModule
checkImports, clearCache, execute, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getImportsByExtension, getMain, getModelDelcarations, getOperations, getParentModule, getPostOperationStatements, prepareContext, setContext, setMain, setParentModule, toString
-
Methods inherited from class org.eclipse.epsilon.eol.AbstractModule
assignAnnotations, assignComment, assignComments, createAst, extractComments, getParseProblems, getSourceFile, getSourceUri, invokeMainRule, parse, parse
-
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.eol.IEolModule
configure, execute, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getMain, getModelDelcarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, parse, setContext, setParentModule
-
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
createAst, getSourceUri, parse, parse, 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 Detail
-
pre
protected NamedRuleList<Pre> pre
-
declaredPre
protected NamedRuleList<Pre> declaredPre
-
post
protected NamedRuleList<Post> post
-
declaredPost
protected NamedRuleList<Post> declaredPost
-
-
Constructor Detail
-
ErlModule
public ErlModule()
-
ErlModule
public ErlModule(IErlContext context)
Instantiates the module with the specified execution context.- Parameters:
context
- The execution context- Since:
- 1.6
-
-
Method Detail
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classEolModule
-
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
- Overrides:
createLexer
in classEolModule
-
createParser
public EpsilonParser createParser(org.antlr.runtime.TokenStream tokenStream)
- Overrides:
createParser
in classEolModule
-
getMainRule
public String getMainRule()
- Overrides:
getMainRule
in classEolModule
-
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
-
getImportConfiguration
public HashMap<String,Class<?>> getImportConfiguration()
- Overrides:
getImportConfiguration
in classEolModule
-
getPost
public List<Post> getPost()
- Specified by:
getPost
in interfaceIErlModule
-
getPre
public List<Pre> getPre()
- Specified by:
getPre
in interfaceIErlModule
-
getDeclaredPost
public List<Post> getDeclaredPost()
- Specified by:
getDeclaredPost
in interfaceIErlModule
-
getDeclaredPre
public List<Pre> getDeclaredPre()
- Specified by:
getDeclaredPre
in interfaceIErlModule
-
prepareExecution
public void prepareExecution() throws EolRuntimeException
- Throws:
EolRuntimeException
-
postExecution
public void postExecution() throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
protected void execute(List<? extends NamedStatementBlockRule> namedRules) throws EolRuntimeException
- Throws:
EolRuntimeException
-
execute
protected void execute(List<? extends NamedStatementBlockRule> namedRules, IEolContext context) throws EolRuntimeException
- Throws:
EolRuntimeException
-
executeImpl
public Object executeImpl() throws EolRuntimeException
- Overrides:
executeImpl
in classEolModule
- Throws:
EolRuntimeException
-
processRules
protected Object processRules() throws EolRuntimeException
Main rule processing logic. Non-abstract for compatibility.- Returns:
- The result of executing this module.
- Throws:
EolRuntimeException
- Since:
- 1.6
-
calculateSuperRules
public List<ParseProblem> calculateSuperRules(List<? extends ExtensibleNamedRule> allRules)
-
getContext
public IErlContext getContext()
- Specified by:
getContext
in interfaceIEolModule
- Specified by:
getContext
in interfaceIErlModule
- Overrides:
getContext
in classEolModule
-
-