Package org.eclipse.epsilon.ecl
Class EclModule
- java.lang.Object
 
- 
- All Implemented Interfaces:
 IModule,ModuleElement,IEclModule,IEolModule,IErlModule
- Direct Known Subclasses:
 EclModuleParallel
public class EclModule extends ErlModule implements IEclModule
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected NamedRuleList<MatchRule>declaredMatchRulesprotected NamedRuleList<MatchRule>matchRules- 
Fields inherited from class org.eclipse.epsilon.erl.ErlModule
declaredPost, declaredPre, post, pre 
- 
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 EclModule()EclModule(IEclContext 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)protected org.antlr.runtime.LexercreateLexer(org.antlr.runtime.ANTLRInputStream inputStream)EpsilonParsercreateParser(org.antlr.runtime.TokenStream tokenStream)MatchTraceexecute()IEclContextgetContext()java.util.List<MatchRule>getDeclaredMatchRules()java.util.HashMap<java.lang.String,java.lang.Class<?>>getImportConfiguration()java.lang.StringgetMainRule()java.util.List<MatchRule>getMatchRules()protected voidmatchAllRules(boolean greedy)voidmatchModels()protected voidprepareContext()protected MatchTraceprocessRules()Main rule processing logic.- 
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, compile, getCompilationContext, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getImportsByExtension, getMain, getModelDelcarations, getOperations, getParentModule, getPostOperationStatements, 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.ecl.IEclModule
getRulesFor, match 
- 
Methods inherited from interface org.eclipse.epsilon.eol.IEolModule
configure, getCompilationContext, getConfigurationProperties, getDeclaredModelDeclarations, getDeclaredOperations, getImports, getMain, getModelDelcarations, getOperations, getParentModule, getParseProblems, getPostOperationStatements, parse, setContext, setParentModule 
- 
Methods inherited from interface org.eclipse.epsilon.erl.IErlModule
getDeclaredPost, getDeclaredPre, getPost, getPre 
- 
Methods inherited from interface org.eclipse.epsilon.common.module.IModule
compile, 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
- 
matchRules
protected NamedRuleList<MatchRule> matchRules
 
- 
declaredMatchRules
protected final NamedRuleList<MatchRule> declaredMatchRules
 
 - 
 
- 
Constructor Detail
- 
EclModule
public EclModule()
 
- 
EclModule
public EclModule(IEclContext context)
Instantiates the module with the specified execution context.- Parameters:
 context- The execution context- Since:
 - 1.6
 
 
 - 
 
- 
Method Detail
- 
createLexer
protected org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
- Overrides:
 createLexerin classErlModule
 
- 
createParser
public EpsilonParser createParser(org.antlr.runtime.TokenStream tokenStream)
- Overrides:
 createParserin classErlModule
 
- 
getMainRule
public java.lang.String getMainRule()
- Overrides:
 getMainRulein classErlModule
 
- 
build
public void build(AST cst, IModule module)
- Specified by:
 buildin interfaceModuleElement- Overrides:
 buildin classErlModule
 
- 
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
 
- 
getImportConfiguration
public java.util.HashMap<java.lang.String,java.lang.Class<?>> getImportConfiguration()
- Overrides:
 getImportConfigurationin classErlModule
 
- 
getMatchRules
public java.util.List<MatchRule> getMatchRules()
- Specified by:
 getMatchRulesin interfaceIEclModule
 
- 
prepareContext
protected void prepareContext() throws EolRuntimeException- Overrides:
 prepareContextin classEolModule- Throws:
 EolRuntimeException
 
- 
execute
public MatchTrace execute() throws EolRuntimeException
- Specified by:
 executein interfaceIEclModule- Specified by:
 executein interfaceIEolModule- Overrides:
 executein classEolModule- Throws:
 EolRuntimeException
 
- 
processRules
protected MatchTrace processRules() throws EolRuntimeException
Description copied from class:ErlModuleMain rule processing logic. Non-abstract for compatibility.- Overrides:
 processRulesin classErlModule- Returns:
 - The result of executing this module.
 - Throws:
 EolRuntimeException
 
- 
matchModels
public void matchModels() throws EolRuntimeException- Specified by:
 matchModelsin interfaceIEclModule- Throws:
 EolRuntimeException
 
- 
matchAllRules
protected void matchAllRules(boolean greedy) throws EolRuntimeException- Throws:
 EolRuntimeException
 
- 
getContext
public IEclContext getContext()
- Specified by:
 getContextin interfaceIEclModule- Specified by:
 getContextin interfaceIEolModule- Specified by:
 getContextin interfaceIErlModule- Overrides:
 getContextin classErlModule
 
- 
getDeclaredMatchRules
public java.util.List<MatchRule> getDeclaredMatchRules()
- Specified by:
 getDeclaredMatchRulesin interfaceIEclModule
 
 - 
 
 -