Commit 1fb09a32 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

Moved MathExpressionSymbols to EmbeddedMontiArcMath

parent 912f7388
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.symbols;
import de.monticore.lang.math._symboltable.expression.MathExpressionSymbol;
/**
*/
public class MathChainedExpression extends MathExpressionSymbol {
public static int ID = 10002;
protected MathExpressionSymbol firstExpressionSymbol, secondExpressionSymbol;
public MathChainedExpression() {
setID(ID);
}
public MathChainedExpression(MathExpressionSymbol firstExpressionSymbol, MathExpressionSymbol secondExpressionSymbol) {
this.firstExpressionSymbol = firstExpressionSymbol;
this.secondExpressionSymbol = secondExpressionSymbol;
setID(ID);
}
public MathExpressionSymbol getFirstExpressionSymbol() {
return firstExpressionSymbol;
}
public void setFirstExpressionSymbol(MathExpressionSymbol firstExpressionSymbol) {
this.firstExpressionSymbol = firstExpressionSymbol;
}
public MathExpressionSymbol getSecondExpressionSymbol() {
return secondExpressionSymbol;
}
public void setSecondExpressionSymbol(MathExpressionSymbol secondExpressionSymbol) {
this.secondExpressionSymbol = secondExpressionSymbol;
}
@Override
public String getTextualRepresentation() {
return firstExpressionSymbol.getTextualRepresentation() + secondExpressionSymbol.getTextualRepresentation();
}
}
/* (c) https://github.com/MontiCore/monticore */
package de.monticore.lang.monticar.generator.cpp.symbols;
import de.monticore.lang.math._symboltable.expression.MathExpressionSymbol;
import de.monticore.lang.math._symboltable.matrix.MathMatrixAccessSymbol;
import java.util.ArrayList;
import java.util.List;
/**
*/
public class MathStringExpression extends MathExpressionSymbol {
public static int ID = 10001;
protected String text;
protected List<MathMatrixAccessSymbol> previousExpressionSymbols = new ArrayList<>();
public MathStringExpression() {
setID(ID);
}
public MathStringExpression(String text, List<MathMatrixAccessSymbol> previousExpressionSymbol) {
this.text = text;
setID(ID);
if (previousExpressionSymbol != null)
this.previousExpressionSymbols.addAll(previousExpressionSymbol);
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
@Override
public String getTextualRepresentation() {
return text;
}
public List<MathMatrixAccessSymbol> getPreviousExpressionSymbols() {
return previousExpressionSymbols;
}
}
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