Commit 4735f812 authored by Bram Kohlen's avatar Bram Kohlen
Browse files

updated to newest montimath version

parent 621db693
Pipeline #59437 passed with stages
in 1 minute and 15 seconds
......@@ -6,7 +6,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>math-pretty-printer</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
<properties>
......@@ -16,7 +16,7 @@
<jsr305.version>3.0.0</jsr305.version>
<junit.version>4.11</junit.version>
<logback.version>1.1.2</logback.version>
<montimath.version>0.0.13</montimath.version>
<montimath.version>0.0.16-SNAPSHOT</montimath.version>
<commons.cli.version>1.4</commons.cli.version>
<jlatexmath.version>1.0.7</jlatexmath.version>
<batik.version>1.10</batik.version>
......
......@@ -8,6 +8,9 @@ import de.monticore.lang.matrix._ast.ASTMathMatrixAccessExpression;
import de.monticore.lang.matrix._ast.ASTMathMatrixValueExplicitExpression;
import de.monticore.lang.matrix._ast.ASTMathVectorExpression;
import de.monticore.lang.matrixexpressions._ast.*;
import de.monticore.lang.monticar.ranges._ast.ASTRange;
import de.monticore.lang.monticar.types2._ast.ASTDimension;
import de.monticore.lang.monticar.types2._ast.ASTElementType;
import de.monticore.literals.literals._ast.ASTIntLiteral;
import de.monticore.literals.literals._ast.ASTSignedIntLiteral;
import de.monticore.numberunit._ast.ASTNumberWithInf;
......@@ -268,17 +271,6 @@ public class MathPrettyPrinter implements AstPrettyPrinter<ASTMathCompilationUni
this.printSpace();
}
@Override
public void visit(ASTMathStatements node) {
this.printer.println();
this.printer.indent();
}
@Override
public void endVisit(ASTMathStatements node) {
this.printer.unindent();
}
@Override
public void visit(ASTLessThanExpression node) {
this.printSpace();
......@@ -513,13 +505,6 @@ public class MathPrettyPrinter implements AstPrettyPrinter<ASTMathCompilationUni
this.printSpace();
}
@Override
public void revisit(ASTMathArithmeticMatrixSolutionExpression node) {
this.printSpace();
this.printer.print("\\\\");
this.printSpace();
}
@Override
public void revisit(ASTMathArithmeticMatrixEEMultExpression node) {
this.printSpace();
......
......@@ -9,6 +9,8 @@ import de.monticore.lang.matrix._ast.ASTMathMatrixAccessExpression;
import de.monticore.lang.matrix._ast.ASTMathMatrixValueExplicitExpression;
import de.monticore.lang.matrix._ast.ASTMathVectorExpression;
import de.monticore.lang.matrixexpressions._ast.*;
import de.monticore.lang.monticar.ranges._ast.ASTRange;
import de.monticore.lang.monticar.types2._ast.ASTDimension;
import de.monticore.literals.literals._ast.ASTSignedIntLiteral;
import de.monticore.numberunit._ast.*;
import de.monticore.types.types._ast.ASTImportStatement;
......@@ -441,19 +443,6 @@ public interface MathStructuredVisitor extends MathVisitor {
default void revisit(ASTMathArithmeticMatrixEEPowExpression node) {}
@Override
default void traverse(ASTMathArithmeticMatrixSolutionExpression node) {
Iterator iter_expressions = node.getExpressionList().iterator();
while(iter_expressions.hasNext()) {
((ASTExpression)iter_expressions.next()).accept(this.getRealThis());
if (iter_expressions.hasNext()) this.getRealThis().revisit(node);
}
}
default void revisit(ASTMathArithmeticMatrixSolutionExpression node) {}
@Override
default void traverse(ASTMathArithmeticMatrixLeftDivideExpression node) {
Iterator iter_expressions = node.getExpressionList().iterator();
......
......@@ -20,15 +20,15 @@ public interface TeXHTMLMathStructuredVisitor extends MathStructuredVisitor {
@Override
default void traverse(ASTMathIfExpression node) {
if (null != node.getBody()) {
node.getBody().accept(this.getRealThis());
if (null != node.getBody(0)) {
node.getBody(0).accept(this.getRealThis());
}
}
@Override
default void traverse(ASTMathElseIfExpression node) {
if (null != node.getBody()) {
node.getBody().accept(this.getRealThis());
if (null != node.getBody(0)) {
node.getBody(0).accept(this.getRealThis());
}
}
}
......@@ -6,7 +6,8 @@ import de.monticore.lang.matrix._ast.ASTMathMatrixAccessExpression;
import de.monticore.lang.matrix._ast.ASTMathMatrixValueExplicitExpression;
import de.monticore.lang.matrixexpressions._ast.ASTMathArithmeticMatrixComplexTransposeExpression;
import de.monticore.lang.matrixexpressions._ast.ASTMathArithmeticMatrixEEPowExpression;
import de.monticore.lang.matrixexpressions._ast.ASTMathArithmeticMatrixSolutionExpression;
import de.monticore.lang.monticar.types2._ast.ASTDimension;
import de.monticore.lang.monticar.types2._ast.ASTElementType;
import de.monticore.numberunit._ast.ASTTimeDiv;
public class TeXMathPrettyPrinter extends MathPrettyPrinter implements TeXMathStructuredVisitor {
......@@ -139,11 +140,6 @@ public class TeXMathPrettyPrinter extends MathPrettyPrinter implements TeXMathSt
this.printer.print("~\\text{mod}~");
}
@Override
public void revisit(ASTMathArithmeticMatrixSolutionExpression node) {
this.printer.print("~\\backslash\\backslash~");
}
@Override
public void visit(ASTMathForLoopHead node) {
this.printer.print(node.getName());
......
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