Commit bd5cbeca authored by danielkisov's avatar danielkisov
Browse files

Passing pythonPath

parent f9cc0507
......@@ -28,6 +28,7 @@ public class EMADLLanguage extends EmbeddingModelingLanguage {
public static final String FILE_ENDING = "emadl";
private String customFilesPath = "";
private String backend = "";
private String pythonPath = "";
public static final EmbeddedMontiArcDynamicLanguage HOST_LANGUAGE = new EmbeddedMontiArcDynamicLanguage();
public static final CNNArchLanguage CNNARCH_LANGUAGE = new CNNArchLanguage();
......@@ -40,13 +41,14 @@ public class EMADLLanguage extends EmbeddingModelingLanguage {
Arrays.asList(CNNARCH_LANGUAGE, MATH_LANGUAGE));
}
public EMADLLanguage(String customFilesPath, String backend) {
public EMADLLanguage(String customFilesPath, String pythonPath, String backend) {
super("Embedded MontiArc Deep Learning Language",
FILE_ENDING,
HOST_LANGUAGE,
Arrays.asList(CNNARCH_LANGUAGE, MATH_LANGUAGE));
setBackend(backend);
setCustomFilesPath(customFilesPath);
setPythonPath(pythonPath);
}
private void setBackend(String backend){
......@@ -65,6 +67,10 @@ public class EMADLLanguage extends EmbeddingModelingLanguage {
return this.customFilesPath;
}
private void setPythonPath (String pythonPath){ this.pythonPath = pythonPath; }
public String getPythonPath (){ return this.pythonPath; }
@Override
public Collection<ResolvingFilter<? extends Symbol>> getResolvingFilters() {
......@@ -92,7 +98,7 @@ public class EMADLLanguage extends EmbeddingModelingLanguage {
@Override
public Optional<EMADLSymbolTableCreator> getSymbolTableCreator(ResolvingConfiguration resolvingConfiguration, MutableScope enclosingScope) {
return Optional.of(new EMADLSymbolTableCreator(
resolvingConfiguration, enclosingScope,getCustomFilesPath(), getBackend()));
resolvingConfiguration, enclosingScope,getCustomFilesPath(), getPythonPath(), getBackend()));
}
}
......@@ -47,9 +47,9 @@ public class EMADLSymbolTableCreator extends de.monticore.symboltable.CommonSymb
public EMADLSymbolTableCreator(
final ResolvingConfiguration resolvingConfig, final MutableScope enclosingScope,
String customFilesPath, String backend) {
String customFilesPath, String pythonPath, String backend) {
super(resolvingConfig, enclosingScope);
initSuperSTC(resolvingConfig, customFilesPath, backend);
initSuperSTC(resolvingConfig, customFilesPath, pythonPath, backend);
}
public EMADLSymbolTableCreator(final ResolvingConfiguration resolvingConfig, final Deque<MutableScope> scopeStack) {
......@@ -58,9 +58,9 @@ public class EMADLSymbolTableCreator extends de.monticore.symboltable.CommonSymb
}
public EMADLSymbolTableCreator(final ResolvingConfiguration resolvingConfig, final Deque<MutableScope> scopeStack,
String customFilesPath, String backend) {
String customFilesPath, String pythonPath, String backend) {
super(resolvingConfig, scopeStack);
initSuperSTC(resolvingConfig, customFilesPath, backend);
initSuperSTC(resolvingConfig, customFilesPath, pythonPath, backend);
}
private void initSuperSTC(final ResolvingConfiguration resolvingConfig) {
......@@ -90,8 +90,8 @@ public class EMADLSymbolTableCreator extends de.monticore.symboltable.CommonSymb
visitor.setCommon2Visitor(emamSTC);
}
private void initSuperSTC(final ResolvingConfiguration resolvingConfig, String customFilesPath, String backend) {
this.cnnArchSTC = new CNNArchSymbolTableCreator(resolvingConfig, scopeStack, customFilesPath, backend);
private void initSuperSTC(final ResolvingConfiguration resolvingConfig, String customFilesPath, String pythonPath, String backend) {
this.cnnArchSTC = new CNNArchSymbolTableCreator(resolvingConfig, scopeStack, customFilesPath, pythonPath, backend);
this.emamSTC = new EmbeddedMontiArcMathSymbolTableCreatorTOP(resolvingConfig, scopeStack);
this.mathOptSTC = new MathOptSymbolTableCreator(resolvingConfig, scopeStack);
this.emadSTC = new ModifiedEMADynamicSymbolTableCreator(resolvingConfig, scopeStack);
......
/**
* (c) https://github.com/MontiCore/monticore
*
* The license generally applicable for this project
* can be found under https://github.com/MontiCore/monticore.
*/
package de.monticore.lang.monticar.emadl.tagging.artifacttag;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAComponentSymbol;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment