fix merge conflicts

parents c9594993 c1ba643a
Pipeline #323803 passed with stage
in 8 minutes and 57 seconds
......@@ -14,7 +14,8 @@ grammar CNNArch extends de.monticore.CommonExpressions, de.monticore.lang.Math,
The complete file.
Use nonterminal Architecture for embedding in another language (e.g. EmbeddedMontiArc)
*/
symbol scope CNNArchCompilationUnit = "architecture"
symbol scope CNNArchCompilationUnit = ("package" package:(Name& || ".")+ ";")? // optional package declaration
"architecture"
name:Name
( "(" (ArchitectureParameter || ",")* ")" )? "{"
ioDeclarations:IODeclaration*
......
......@@ -28,7 +28,7 @@ public class CNNArchLanguage extends CNNArchLanguageTOP {
protected void initResolvingFilters() {
super.initResolvingFilters();
//addResolvingFilter(CommonResolvingFilter.create(MathExpressionSymbol.KIND));
addResolvingFilter(new CNNArchCompilationUnitResolvingFilter());
// addResolvingFilter(new CNNArchCompilationUnitResolvingFilter()); // this is already added due to the call to super.initResolvingFilters()
addResolvingFilter(CommonResolvingFilter.create(ArchitectureSymbol.KIND));
addResolvingFilter(CommonResolvingFilter.create(LayerDeclarationSymbol.KIND));
addResolvingFilter(CommonResolvingFilter.create(UnrollDeclarationSymbol.KIND));
......
......@@ -17,6 +17,7 @@ import de.monticore.lang.monticar.cnnarch._visitor.CNNArchDelegatorVisitor;
import de.monticore.lang.monticar.cnnarch.predefined.AllPredefinedLayers;
import de.monticore.lang.monticar.cnnarch.predefined.AllPredefinedVariables;
import de.monticore.symboltable.*;
import de.se_rwth.commons.Names;
import de.se_rwth.commons.logging.Log;
import java.util.*;
......@@ -89,6 +90,8 @@ public class CNNArchSymbolTableCreator extends de.monticore.symboltable.CommonSy
List<ImportStatement> imports = new ArrayList<>();
this.compilationUnitPackage = Names.getQualifiedName(compilationUnit.getPackageList());
ArtifactScope artifactScope = new ArtifactScope(
Optional.empty(),
compilationUnitPackage,
......
......@@ -329,7 +329,7 @@ public enum Constraints {
public boolean isValid(ArchSimpleExpressionSymbol exp) {
if (exp.getIntValue().isPresent()){
int intValue = exp.getIntValue().get();
return intValue >= -1 && intValue <= 2; // -1 is null
return intValue >= -1 && intValue < 2; // -1 is null
}
return false;
......
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