added first symboltable classes

parent 4be43ead
......@@ -2,7 +2,9 @@ package de.monticore.lang.monticar;
grammar CNNTrain extends de.monticore.common.Common {
TrainingConfiguration = "training" name:Name "{" (assignments:ParameterAssignment)+ "}";
symbol scope Configuration = "training" name:Name&
"{" (assignments:ParameterAssignment)+ "}";
ParameterAssignment = lhs:TrainingParameter "=" rhs:Rhs;
enum TrainingParameter = DATA:"data"
| LABELS:"labels"
......
......@@ -22,12 +22,12 @@ package de.monticore.lang.monticar.cnntrain._ast;
import java.util.List;
public class ASTTrainingConfiguration extends ASTTrainingConfigurationTOP {
public class ASTConfiguration extends ASTConfigurationTOP {
public ASTTrainingConfiguration() {
public ASTConfiguration() {
}
public ASTTrainingConfiguration(String name, List<ASTParameterAssignment> assignments) {
public ASTConfiguration(String name, List<ASTParameterAssignment> assignments) {
super(name, assignments);
}
......
......@@ -42,10 +42,7 @@ public class CNNTrainLanguage extends CNNTrainLanguageTOP {
@Override
protected void initResolvingFilters() {
super.initResolvingFilters();
setModelNameCalculator(new CNNTrainModelNameCalculator());
}
@Override
public Optional<? extends SymbolTableCreator> getSymbolTableCreator(ResolvingConfiguration resolvingConfiguration, MutableScope mutableScope) {
return null;
}
}
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package de.monticore.lang.monticar.cnntrain._symboltable;
public class ConfigurationSymbol extends de.monticore.symboltable.CommonScopeSpanningSymbol {
public static final ConfigurationKind KIND = new ConfigurationKind();
public ConfigurationSymbol(String name) {
super(name, KIND);
}
}
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