Commit 9f74da3c authored by Evgeny Kusmenko's avatar Evgeny Kusmenko

Merge branch 'feature/packageDeclaration' into 'master'

Add optional package declaration to CNNTrain grammar && update version number

See merge request !28
parents ea8e2486 912285e1
Pipeline #309961 passed with stage
in 4 minutes and 36 seconds
......@@ -18,7 +18,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnn-train</artifactId>
<version>0.3.10-SNAPSHOT</version>
<version>0.3.11-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -2,7 +2,9 @@
package de.monticore.lang.monticar;
grammar CNNTrain extends de.monticore.lang.monticar.Common2, de.monticore.NumberUnit{
symbol scope CNNTrainCompilationUnit = "configuration"
symbol scope CNNTrainCompilationUnit =
("package" package:(Name& || ".")+ ";")? // optional package declaration
"configuration"
name:Name&
Configuration;
......
......@@ -14,6 +14,7 @@ import de.monticore.symboltable.ArtifactScope;
import de.monticore.symboltable.ImportStatement;
import de.monticore.symboltable.MutableScope;
import de.monticore.symboltable.ResolvingConfiguration;
import de.se_rwth.commons.Names;
import de.se_rwth.commons.logging.Log;
import org.antlr.v4.runtime.misc.Pair;
......@@ -44,6 +45,8 @@ public class CNNTrainSymbolTableCreator extends CNNTrainSymbolTableCreatorTOP {
List<ImportStatement> imports = new ArrayList<>();
this.compilationUnitPackage = Names.getQualifiedName(compilationUnit.getPackageList());
ArtifactScope artifactScope = new ArtifactScope(
Optional.empty(),
compilationUnitPackage,
......
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