Commit 0fe9abbf authored by 0xJMR's avatar 0xJMR
Browse files

Adds basic project structure.

parent 8fa67c76
......@@ -111,6 +111,8 @@
<version>${jsr305.version}</version>
</dependency>
<!-- .. MontiCore .................................................... -->
<!-- .. EmbeddedMontiArcMath ......................................... -->
<dependency>
<groupId>de.monticore.lang.monticar</groupId>
......
package de.rwth.se.mpp.core;
import de.monticore.symboltable.Symbol;
public interface MathPrettyPrinter {
/*
* EXPRESSIONS
*/
String printArithmeticExpression(Symbol symbol);
String printAssignmentExpression(Symbol symbol);
String printCompareExpression(Symbol symbol);
String printConditionalExpressions(Symbol symbol);
String printConditionalExpression(Symbol symbol);
String printForLoopExpression(Symbol symbol);
String printNameExpression(Symbol symbol);
String printNumberExpression(Symbol symbol);
String printParenthesisExpression(Symbol symbol);
String printPreOperatorExpression(Symbol symbol);
String printValue(Symbol symbol);
/*
* MATRIX
*/
String printMatrixAccessOperator(Symbol symbol);
String printMatrixAccess(Symbol symbol);
String printMatrixArithmeticExpression(Symbol symbol);
String printMatrixArithmeticValue(Symbol symbol);
String printMatrixExpression(Symbol symbol);
String printMatrixNameExpression(Symbol symbol);
String printMatrixVectorExpression(Symbol symbol);
/*
* MISC
*/
String printScript(Symbol symbol);
String printForLoopHead(Symbol symbol);
String printStatements(Symbol symbol);
String printVariableDeclaration(Symbol symbol);
}
package de.rwth.se.mpp.decorators;
import de.monticore.symboltable.Symbol;
import de.rwth.se.mpp.core.MathPrettyPrinter;
public class HTMLMathPrettyPrinter implements MathPrettyPrinter {
protected final MathPrettyPrinter printer;
public HTMLMathPrettyPrinter(MathPrettyPrinter printer) {
this.printer = printer;
}
@Override
public String printArithmeticExpression(Symbol symbol) {
return null;
}
@Override
public String printAssignmentExpression(Symbol symbol) {
return null;
}
@Override
public String printCompareExpression(Symbol symbol) {
return null;
}
@Override
public String printConditionalExpressions(Symbol symbol) {
return null;
}
@Override
public String printConditionalExpression(Symbol symbol) {
return null;
}
@Override
public String printForLoopExpression(Symbol symbol) {
return null;
}
@Override
public String printNameExpression(Symbol symbol) {
return null;
}
@Override
public String printNumberExpression(Symbol symbol) {
return null;
}
@Override
public String printParenthesisExpression(Symbol symbol) {
return null;
}
@Override
public String printPreOperatorExpression(Symbol symbol) {
return null;
}
@Override
public String printValue(Symbol symbol) {
return null;
}
@Override
public String printMatrixAccessOperator(Symbol symbol) {
return null;
}
@Override
public String printMatrixAccess(Symbol symbol) {
return null;
}
@Override
public String printMatrixArithmeticExpression(Symbol symbol) {
return null;
}
@Override
public String printMatrixArithmeticValue(Symbol symbol) {
return null;
}
@Override
public String printMatrixExpression(Symbol symbol) {
return null;
}
@Override
public String printMatrixNameExpression(Symbol symbol) {
return null;
}
@Override
public String printMatrixVectorExpression(Symbol symbol) {
return null;
}
@Override
public String printScript(Symbol symbol) {
return null;
}
@Override
public String printForLoopHead(Symbol symbol) {
return null;
}
@Override
public String printStatements(Symbol symbol) {
return null;
}
@Override
public String printVariableDeclaration(Symbol symbol) {
return null;
}
}
package de.rwth.se.mpp.decorators;
public class MathJaxMathPrettyPrinter {
}
package de.rwth.se.mpp.montimath;
import de.monticore.lang.math.math._symboltable.MathForLoopHeadSymbol;
import de.monticore.lang.math.math._symboltable.MathScriptSymbol;
import de.monticore.lang.math.math._symboltable.MathStatementsSymbol;
import de.monticore.lang.math.math._symboltable.MathVariableDeclarationSymbol;
import de.monticore.lang.math.math._symboltable.expression.*;
import de.monticore.lang.math.math._symboltable.matrix.*;
import de.monticore.symboltable.Symbol;
import de.rwth.se.mpp.core.MathPrettyPrinter;
public class MontiMathPrettyPrinter implements MathPrettyPrinter {
@Override
public String printArithmeticExpression(Symbol symbol) {
return symbol.isKindOf(MathArithmeticExpressionSymbol.KIND) ?
this.printArithmeticExpression((MathArithmeticExpressionSymbol) symbol) : "";
}
protected String printArithmeticExpression(MathArithmeticExpressionSymbol symbol) {
return null;
}
@Override
public String printAssignmentExpression(Symbol symbol) {
return symbol.isKindOf(MathAssignmentExpressionSymbol.KIND) ?
this.printAssignmentExpression((MathAssignmentExpressionSymbol) symbol) : "";
}
protected String printAssignmentExpression(MathAssignmentExpressionSymbol symbol) {
return null;
}
@Override
public String printCompareExpression(Symbol symbol) {
return symbol.isKindOf(MathCompareExpressionSymbol.KIND) ?
this.printCompareExpression((MathCompareExpressionSymbol) symbol) : "";
}
protected String printCompareExpression(MathCompareExpressionSymbol symbol) {
return null;
}
@Override
public String printConditionalExpressions(Symbol symbol) {
return symbol.isKindOf(MathConditionalExpressionsSymbol.KIND) ?
this.printConditionalExpressions((MathConditionalExpressionsSymbol) symbol) : "";
}
protected String printConditionalExpressions(MathConditionalExpressionsSymbol symbol) {
return null;
}
@Override
public String printConditionalExpression(Symbol symbol) {
return symbol.isKindOf(MathConditionalExpressionSymbol.KIND) ?
this.printConditionalExpression((MathConditionalExpressionSymbol) symbol) : "";
}
protected String printConditionalExpression(MathConditionalExpressionSymbol symbol) {
return null;
}
@Override
public String printForLoopExpression(Symbol symbol) {
return symbol.isKindOf(MathForLoopExpressionSymbol.KIND) ?
this.printForLoopExpression((MathForLoopExpressionSymbol) symbol) : "";
}
protected String printForLoopExpression(MathForLoopExpressionSymbol symbol) {
return null;
}
@Override
public String printNameExpression(Symbol symbol) {
return symbol.isKindOf(MathNameExpressionSymbol.KIND) ?
this.printNameExpression((MathNameExpressionSymbol) symbol) : "";
}
protected String printNameExpression(MathNameExpressionSymbol symbol) {
return null;
}
@Override
public String printNumberExpression(Symbol symbol) {
return symbol.isKindOf(MathNumberExpressionSymbol.KIND) ?
this.printNumberExpression((MathNumberExpressionSymbol) symbol) : "";
}
protected String printNumberExpression(MathNumberExpressionSymbol symbol) {
return null;
}
@Override
public String printParenthesisExpression(Symbol symbol) {
return symbol.isKindOf(MathParenthesisExpressionSymbol.KIND) ?
this.printParenthesisExpression((MathParenthesisExpressionSymbol) symbol) : "";
}
protected String printParenthesisExpression(MathParenthesisExpressionSymbol symbol) {
return null;
}
@Override
public String printPreOperatorExpression(Symbol symbol) {
return symbol.isKindOf(MathPreOperatorExpressionSymbol.KIND) ?
this.printPreOperatorExpression((MathPreOperatorExpressionSymbol) symbol) : "";
}
protected String printPreOperatorExpression(MathPreOperatorExpressionSymbol symbol) {
return null;
}
@Override
public String printValue(Symbol symbol) {
return symbol.isKindOf(MathValueSymbol.KIND) ?
this.printValue((MathValueSymbol) symbol) : "";
}
protected String printValue(MathValueSymbol symbol) {
return null;
}
@Override
public String printMatrixAccessOperator(Symbol symbol) {
return symbol.isKindOf(MathMatrixAccessOperatorSymbol.KIND) ?
this.printMatrixAccessOperator((MathMatrixAccessOperatorSymbol) symbol) : "";
}
protected String printMatrixAccessOperator(MathMatrixAccessOperatorSymbol symbol) {
return null;
}
@Override
public String printMatrixAccess(Symbol symbol) {
return symbol.isKindOf(MathMatrixAccessSymbol.KIND) ?
this.printMatrixAccess((MathMatrixAccessSymbol) symbol) : "";
}
protected String printMatrixAccess(MathMatrixAccessSymbol symbol) {
return null;
}
@Override
public String printMatrixArithmeticExpression(Symbol symbol) {
return symbol.isKindOf(MathMatrixArithmeticExpressionSymbol.KIND) ?
this.printMatrixArithmeticExpression((MathMatrixArithmeticExpressionSymbol) symbol) : "";
}
protected String printMatrixArithmeticExpression(MathMatrixArithmeticExpressionSymbol symbol) {
return null;
}
@Override
public String printMatrixArithmeticValue(Symbol symbol) {
return symbol.isKindOf(MathMatrixArithmeticValueSymbol.KIND) ?
this.printMatrixArithmeticValue((MathMatrixArithmeticValueSymbol) symbol) : "";
}
protected String printMatrixArithmeticValue(MathMatrixArithmeticValueSymbol symbol) {
return null;
}
@Override
public String printMatrixExpression(Symbol symbol) {
return symbol.isKindOf(MathMatrixExpressionSymbol.KIND) ?
this.printMatrixExpression((MathMatrixExpressionSymbol) symbol) : "";
}
protected String printMatrixExpression(MathMatrixExpressionSymbol symbol) {
return null;
}
@Override
public String printMatrixNameExpression(Symbol symbol) {
return symbol.isKindOf(MathMatrixNameExpressionSymbol.KIND) ?
this.printMatrixNameExpression((MathMatrixNameExpressionSymbol) symbol) : "";
}
protected String printMatrixNameExpression(MathMatrixNameExpressionSymbol symbol) {
return null;
}
@Override
public String printMatrixVectorExpression(Symbol symbol) {
return symbol.isKindOf(MathMatrixVectorExpressionSymbol.KIND) ?
this.printMatrixVectorExpression((MathMatrixVectorExpressionSymbol) symbol) : "";
}
protected String printMatrixVectorExpression(MathMatrixVectorExpressionSymbol symbol) {
return null;
}
@Override
public String printScript(Symbol symbol) {
return symbol.isKindOf(MathScriptSymbol.KIND) ?
this.printScript((MathScriptSymbol) symbol) : "";
}
protected String printScript(MathScriptSymbol symbol) {
return null;
}
@Override
public String printForLoopHead(Symbol symbol) {
return symbol.isKindOf(MathForLoopHeadSymbol.KIND) ?
this.printForLoopHead((MathForLoopHeadSymbol) symbol) : "";
}
protected String printForLoopHead(MathForLoopHeadSymbol symbol) {
return null;
}
@Override
public String printStatements(Symbol symbol) {
return symbol.isKindOf(MathStatementsSymbol.KIND) ?
this.printStatements((MathStatementsSymbol) symbol) : "";
}
protected String printStatements(MathStatementsSymbol symbol) {
return null;
}
@Override
public String printVariableDeclaration(Symbol symbol) {
return symbol.isKindOf(MathVariableDeclarationSymbol.KIND) ?
this.printVariableDeclaration((MathVariableDeclarationSymbol) symbol) : "";
}
protected String printVariableDeclaration(MathVariableDeclarationSymbol symbol) {
return null;
}
}
package de.rwth.se.mpp.montimathopt;
public class MontiMathOptPrettyPrinter {
}
Supports Markdown
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