Commit 86758879 authored by vonWenckstern's avatar vonWenckstern
Browse files

removed AutoConnection.java, removed autoconnect and autoinstantiate in...

removed AutoConnection.java, removed autoconnect and autoinstantiate in grammar -> was not used anyway
parent 8f871bc7
Pipeline #69018 passed with stage
in 2 minutes and 37 seconds
...@@ -177,39 +177,7 @@ grammar EmbeddedMontiArc extends de.monticore.lang.monticar.Common2 { ...@@ -177,39 +177,7 @@ grammar EmbeddedMontiArc extends de.monticore.lang.monticar.Common2 {
targets:ConnectorTargets ";" ; targets:ConnectorTargets ";" ;
ConnectorTargets = (QualifiedNameWithArray (",")? )+; ConnectorTargets = (QualifiedNameWithArray (",")? )+;
/* ======================================================*/ // autoconnect and autoinstantiate is removed
/* ============ From OLD MARC Grammar ==================*/ // for autoconnect use "connect this.* -> sub1.*;" to connect all inports of the parent component to the inports of the sub1 subcomponent having the same name
/* ======================================================*/
/**
* MontiArc components may contain arbitrary many
* configurations. These configurations have to
* implement this interface.
*/
interface MontiArcConfig extends Element;
/**
* AutoConnect is used to connect ports automatically.
*
* @attribute type autoconnect unambigous ports with the
* same type
* @attribute port autoconnect unambigous ports with the
* same name and compatible type}
* @attribute off do not use autoconnection (default)
*/
MontiArcAutoConnect implements MontiArcConfig =
"autoconnect"
(["type"] | ["port"] | ["off"]) ";";
/**
* AutoInstantiate is used to automatically instantiate inner components.
*
* @attribute type autoinstantiate for inner components
* @attribute on to enable automatically instantiating inner components
* @attribute off do not use autoinstantiate (default)
*/
MontiArcAutoInstantiate implements MontiArcConfig =
"autoinstantiate"
(["on"] | ["off"]) ";";
} }
...@@ -29,7 +29,6 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instance ...@@ -29,7 +29,6 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instance
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.InstancingRegister; import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.InstancingRegister;
import de.monticore.lang.embeddedmontiarc.helper.ArcTypePrinter; import de.monticore.lang.embeddedmontiarc.helper.ArcTypePrinter;
import de.monticore.lang.embeddedmontiarc.helper.EMAJavaHelper; import de.monticore.lang.embeddedmontiarc.helper.EMAJavaHelper;
import de.monticore.lang.embeddedmontiarc.trafos.AutoConnection;
import de.monticore.lang.monticar.ValueSymbol; import de.monticore.lang.monticar.ValueSymbol;
import de.monticore.lang.monticar.common2._ast.ASTCommonMatrixType; import de.monticore.lang.monticar.common2._ast.ASTCommonMatrixType;
import de.monticore.lang.monticar.common2._ast.ASTQualifiedNameWithArray; import de.monticore.lang.monticar.common2._ast.ASTQualifiedNameWithArray;
...@@ -75,8 +74,6 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa ...@@ -75,8 +74,6 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa
protected List<ImportStatement> currentImports = new ArrayList<>(); protected List<ImportStatement> currentImports = new ArrayList<>();
protected AutoConnection autoConnectionTrafo = new AutoConnection();
protected MontiCarSymbolFactory jSymbolFactory = new MontiCarSymbolFactory(); protected MontiCarSymbolFactory jSymbolFactory = new MontiCarSymbolFactory();
protected boolean aboartVisitComponent = false; protected boolean aboartVisitComponent = false;
...@@ -217,15 +214,12 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa ...@@ -217,15 +214,12 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa
return; return;
} }
autoConnectionTrafo.transformAtStart(node, component);
} }
@Override @Override
public void endVisit(ASTComponent node) { public void endVisit(ASTComponent node) {
EMAComponentSymbol component = componentStack.pop(); EMAComponentSymbol component = componentStack.pop();
autoConnectionTrafo.transformAtEnd(node, component);
removeCurrentScope(); removeCurrentScope();
} }
...@@ -343,20 +337,4 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa ...@@ -343,20 +337,4 @@ public class EmbeddedMontiArcSymbolTableCreator extends EmbeddedMontiArcSymbolTa
addToScopeAndLinkWithNode(symbol, node); addToScopeAndLinkWithNode(symbol, node);
} }
@Override
public void visit(ASTMontiArcAutoInstantiate node) {
autoInstantiate = node.isOn();
}
@Override
public void visit(ASTMontiArcAutoConnect node) {
autoConnectionTrafo.transform(node, componentStack.peek());
}
} }
...@@ -2,8 +2,6 @@ package symtab.instantiations; ...@@ -2,8 +2,6 @@ package symtab.instantiations;
component Sub { component Sub {
autoinstantiate off;
instance Sub2 sub_2a, sub_2b; instance Sub2 sub_2a, sub_2b;
ports ports
......
package symtab.instantiations; package symtab.instantiations;
component Sub2 { component Sub2 {
autoinstantiate off;
ports ports
in Byte sub_in_1, in Byte sub_in_1,
out Byte sub_out_1; out Byte sub_out_1;
......
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