Commit 4efb5cc9 authored by Jean-Marc Ronck's avatar Jean-Marc Ronck
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://git.rwth-aachen.de/monticore/EmbeddedMontiArc/generators/MathPrettyPrinter
parents d3ef765d 5cdbff29
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> ForLoop3
......@@ -8,4 +9,4 @@
Cmat += A(i, j);
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> Hadamard
......@@ -5,4 +6,4 @@
Q^{2, 2} B = [1 + 1, 1 * 2; 1 - matC, 1 / matB];
A = A .* B;
A = A ./ B;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> If
......@@ -10,4 +11,4 @@
<span class="keyword">else</span>
result = 0;
<span class="keyword">end</span>
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> If2
......@@ -10,4 +11,4 @@
<span class="keyword">else</span>
result = 0;
<span class="keyword">end</span>
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> If3
......@@ -12,4 +13,4 @@
<span class="keyword">else</span>
result = 0;
<span class="keyword">end</span>
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">import</span> Calculations.*;
......@@ -10,4 +11,4 @@
Q^{2, 2} matC = [1, 1; 1, 1];
matC = matB;
Q D = A;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> Initialization
......@@ -6,4 +7,4 @@
Q^{2, 2} Cmat = [1, 1; 1, 1];
Q^{2, 2} D = [1, 2; 3, 4];
Q rational;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> MathExpressions
......@@ -6,4 +7,4 @@
Q matC = ((1 + 2) * (3 + 4))^2;
Q^{2, 2} D = ([1, 1; 1, 1] + [2, 2; 2, 2]) * ([3, 3; 3, 3] + [4, 4; 4, 4]);
Q E = (A + matB) % 5;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> MatrixWithMathExpression
......@@ -6,4 +7,4 @@
Q^{2, 2} A = [1 + 1, 1 * 2; 1 - matC, 1 / matB];
A += A^2;
Q^{3, 2} D = ([1, 2, 3; 4, 5, 6] + [1, 2, 3; 4, 5, 6])';
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> Nested
......@@ -13,4 +14,4 @@
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span>
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> PowerWise
Q^{2} A = [1, 2].^2;
Q^{2} Bmat = ([1, 2] * [1, 2; 3, 4]).^2;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> SolEqu
Q^{3, 1} A = [3, 6, 2; 1, 2, 8; 7, 9, 4] \ [2; 3; 4];
Q^{3, 1} Bmat = ([3 / 2, 6 / 2, 2 / 2; 1 / 2, 2 / 2, 8 / 2; 7 / 2, 9 / 2, 4 / 2] + [3 / 2, 6 / 2, 2 / 2; 1 / 2, 2 / 2, 8 / 2; 7 / 2, 9 / 2, 4 / 2]) \ [2; 3; 4];
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> TimeWise
Q^{2} A = [2, 2] .* [1, 2];
Q^{2} Bmat = ([1, 2] + [3, 4]) .* [5, 6];
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> Units
......@@ -7,4 +8,4 @@
Q(0 m * s : 10 m * s) F = 2 m * 1 s;
Q(0 m^2 : 10 m^2) D = 1 m * m;
Q(0 m^4 : 1000 m^4) E = ((1 m + 2 m) * (3 m + 4 m))^2;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
<span class="keyword">package</span> montimath.vanilla;
<span class="keyword">script</span> Units2
......@@ -7,4 +8,4 @@
Q(0 m : 10 m) D = 2 m;
Q(0 m : 10 m) E = 5 m;
Q(0 m^2 : 200 m^2) F = D * E + 3 m^2;
<span class="keyword">end</span>
\ No newline at end of file
<span class="keyword">end</span>
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Arithmetic
//Variable Declaration
Q rational;
rational = 1 + 2 * 3;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Assignments
......@@ -8,4 +9,4 @@ script Assignments
Q^{2, 2} matC = [1, 1; 1, 1];
matC = matB;
Q D = A;
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Assignments2
Q a = 1;
a = 2;
end
\ No newline at end of file
end
/*
* (C) SE RWTH 2018
*/
/* (c) https://github.com/MontiCore/monticore */
package montimath.vanilla;
/*
......@@ -20,4 +18,4 @@ script Comments
end
x += 1;
end
end
\ No newline at end of file
end
// (c) https://github.com/MontiCore/monticore
package montimath.vanilla;
script Compare
B b;
b = x < 2;
end
\ No newline at end of file
end
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