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>
declaredMatchRules
protected 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 ModuleElement
adapt(AST cst, ModuleElement parentAst)
void
build(AST cst, IModule module)
protected org.antlr.runtime.Lexer
createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
EpsilonParser
createParser(org.antlr.runtime.TokenStream tokenStream)
MatchTrace
execute()
IEclContext
getContext()
java.util.List<MatchRule>
getDeclaredMatchRules()
java.util.HashMap<java.lang.String,java.lang.Class<?>>
getImportConfiguration()
java.lang.String
getMainRule()
java.util.List<MatchRule>
getMatchRules()
protected void
matchAllRules(boolean greedy)
void
matchModels()
protected void
prepareContext()
protected MatchTrace
processRules()
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:
createLexer
in classErlModule
-
createParser
public EpsilonParser createParser(org.antlr.runtime.TokenStream tokenStream)
- Overrides:
createParser
in classErlModule
-
getMainRule
public java.lang.String getMainRule()
- Overrides:
getMainRule
in classErlModule
-
build
public void build(AST cst, IModule module)
- Specified by:
build
in interfaceModuleElement
- Overrides:
build
in classErlModule
-
adapt
public ModuleElement adapt(AST cst, ModuleElement parentAst)
-
getImportConfiguration
public java.util.HashMap<java.lang.String,java.lang.Class<?>> getImportConfiguration()
- Overrides:
getImportConfiguration
in classErlModule
-
getMatchRules
public java.util.List<MatchRule> getMatchRules()
- Specified by:
getMatchRules
in interfaceIEclModule
-
prepareContext
protected void prepareContext() throws EolRuntimeException
- Overrides:
prepareContext
in classEolModule
- Throws:
EolRuntimeException
-
execute
public MatchTrace execute() throws EolRuntimeException
- Specified by:
execute
in interfaceIEclModule
- Specified by:
execute
in interfaceIEolModule
- Overrides:
execute
in classEolModule
- Throws:
EolRuntimeException
-
processRules
protected MatchTrace processRules() throws EolRuntimeException
Description copied from class:ErlModule
Main rule processing logic. Non-abstract for compatibility.- Overrides:
processRules
in classErlModule
- Returns:
- The result of executing this module.
- Throws:
EolRuntimeException
-
matchModels
public void matchModels() throws EolRuntimeException
- Specified by:
matchModels
in interfaceIEclModule
- Throws:
EolRuntimeException
-
matchAllRules
protected void matchAllRules(boolean greedy) throws EolRuntimeException
- Throws:
EolRuntimeException
-
getContext
public IEclContext getContext()
- Specified by:
getContext
in interfaceIEclModule
- Specified by:
getContext
in interfaceIEolModule
- Specified by:
getContext
in interfaceIErlModule
- Overrides:
getContext
in classErlModule
-
getDeclaredMatchRules
public java.util.List<MatchRule> getDeclaredMatchRules()
- Specified by:
getDeclaredMatchRules
in interfaceIEclModule
-
-