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>declaredPostprotected NamedRuleList<Pre>declaredPreprotected NamedRuleList<Post>postprotected 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 ModuleElementadapt(AST cst, ModuleElement parentAst)voidbuild(AST cst, IModule module)List<ParseProblem>calculateSuperRules(List<? extends ExtensibleNamedRule> allRules)protected org.antlr.runtime.LexercreateLexer(org.antlr.runtime.ANTLRInputStream inputStream)EpsilonParsercreateParser(org.antlr.runtime.TokenStream tokenStream)protected voidexecute(List<? extends NamedStatementBlockRule> namedRules)protected voidexecute(List<? extends NamedStatementBlockRule> namedRules, IEolContext context)ObjectexecuteImpl()IErlContextgetContext()List<Post>getDeclaredPost()List<Pre>getDeclaredPre()HashMap<String,Class<?>>getImportConfiguration()StringgetMainRule()List<Post>getPost()List<Pre>getPre()voidpostExecution()voidprepareExecution()protected ObjectprocessRules()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:
buildin interfaceModuleElement- Overrides:
buildin classEolModule
-
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
- Overrides:
createLexerin classEolModule
-
createParser
public EpsilonParser createParser(org.antlr.runtime.TokenStream tokenStream)
- Overrides:
createParserin classEolModule
-
getMainRule
public String getMainRule()
- Overrides:
getMainRulein classEolModule
-
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
-
getImportConfiguration
public HashMap<String,Class<?>> getImportConfiguration()
- Overrides:
getImportConfigurationin classEolModule
-
getPost
public List<Post> getPost()
- Specified by:
getPostin interfaceIErlModule
-
getPre
public List<Pre> getPre()
- Specified by:
getPrein interfaceIErlModule
-
getDeclaredPost
public List<Post> getDeclaredPost()
- Specified by:
getDeclaredPostin interfaceIErlModule
-
getDeclaredPre
public List<Pre> getDeclaredPre()
- Specified by:
getDeclaredPrein 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:
executeImplin 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:
getContextin interfaceIEolModule- Specified by:
getContextin interfaceIErlModule- Overrides:
getContextin classEolModule
-
-