From 09641a5c9c8e4a6af739d984e4a0c634c702f934 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 12 Jun 2020 16:59:36 +0300 Subject: [PATCH] Documentation --- .../commonMain/kotlin/scientifik/kmath/ast/MSTExpression.kt | 2 +- kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MSTExpression.kt b/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MSTExpression.kt index c0f124a35..3ee454b2a 100644 --- a/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MSTExpression.kt +++ b/kmath-ast/src/commonMain/kotlin/scientifik/kmath/ast/MSTExpression.kt @@ -4,7 +4,7 @@ import scientifik.kmath.expressions.Expression import scientifik.kmath.operations.NumericAlgebra /** - * The expression evaluates MST on-flight + * The expression evaluates MST on-flight. Should be much faster than functional expression, but slower than ASM-generated expressions. */ class MSTExpression(val algebra: NumericAlgebra, val mst: MST) : Expression { diff --git a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt b/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt index dcab1c972..cec61a8ff 100644 --- a/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt +++ b/kmath-ast/src/jvmMain/kotlin/scientifik/kmath/ast/parser.kt @@ -12,6 +12,9 @@ import scientifik.kmath.operations.PowerOperations import scientifik.kmath.operations.RingOperations import scientifik.kmath.operations.SpaceOperations +/** + * TODO move to common + */ private object ArithmeticsEvaluator : Grammar() { val num by token("-?[\\d.]+(?:[eE]-?\\d+)?") val lpar by token("\\(")