diff --git a/CURRENT/c-sharp/exe-lib-tests/Run-Tests-Reg/RunTests.cs b/CURRENT/c-sharp/exe-lib-tests/Run-Tests-Reg/RunTests.cs
index d356e1db..07e13781 100644
--- a/CURRENT/c-sharp/exe-lib-tests/Run-Tests-Reg/RunTests.cs
+++ b/CURRENT/c-sharp/exe-lib-tests/Run-Tests-Reg/RunTests.cs
@@ -5,9 +5,9 @@
namespace mxparser.runtests {
class RunTestsReg {
static void Main(string[] args) {
- RunTest.Start("api");
+ //RunTest.Start("api");
//RunTest.Start("syn");
- //RunTest.Start("reg");
+ RunTest.Start("reg");
mXparser.consolePrintln(".NET CLR version:" + Environment.Version);
mXparser.consolePrintln(".NET version:" + System.Diagnostics.FileVersionInfo.GetVersionInfo(typeof(int).Assembly.Location).ProductVersion);
#if PCL
diff --git a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/Expression.cs b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/Expression.cs
index 991c4fb3..bb95b8ae 100644
--- a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/Expression.cs
+++ b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/Expression.cs
@@ -1,5 +1,5 @@
/*
- * @(#)Expression.cs 4.3.0 2018-12-12
+ * @(#)Expression.cs 4.3.3 2019-01-27
*
* You may use this software under the condition of "Simplified BSD License"
*
@@ -96,7 +96,7 @@ namespace org.mariuszgromada.math.mxparser {
* Scalar Pro
* ScalarMath.org
*
- * @version 4.3.0
+ * @version 4.3.3
*
* @see Argument
* @see RecursiveArgument
@@ -4921,16 +4921,15 @@ private bool checkSyntax(String level, bool functionWithBodyExt) {
*/
if (t.tokenTypeId == Argument.TYPE_ID) {
Argument arg = getArgument(t.tokenId);
- if ( arg.getArgumentType() == Argument.DEPENDENT_ARGUMENT ) {
- if (getParametersNumber(tokenIndex) >= 0 ) {
- syntax = SYNTAX_ERROR_OR_STATUS_UNKNOWN;
- errorMessage = errorMessage + level + tokenStr + " was expected.\n";
- } else
- if ( (arg.argumentExpression != this) && (arg.argumentExpression.recursionCallPending == false) ) {
- bool syntaxRec = arg.argumentExpression.checkSyntax(level + "-> " + "[" + t.tokenStr + "] = [" + arg.argumentExpression.getExpressionString() + "] ", false);
- syntax = syntax && syntaxRec;
- errorMessage = errorMessage + level + tokenStr + "checking dependent argument ...\n" + arg.argumentExpression.getErrorMessage();
- }
+ if (getParametersNumber(tokenIndex) >= 0 ) {
+ syntax = SYNTAX_ERROR_OR_STATUS_UNKNOWN;
+ errorMessage = errorMessage + level + tokenStr + " was expected.\n";
+ } else if ( arg.getArgumentType() == Argument.DEPENDENT_ARGUMENT ) {
+ if ( (arg.argumentExpression != this) && (arg.argumentExpression.recursionCallPending == false) ) {
+ bool syntaxRec = arg.argumentExpression.checkSyntax(level + "-> " + "[" + t.tokenStr + "] = [" + arg.argumentExpression.getExpressionString() + "] ", false);
+ syntax = syntax && syntaxRec;
+ errorMessage = errorMessage + level + tokenStr + "checking dependent argument ...\n" + arg.argumentExpression.getErrorMessage();
+ }
}
}
/*
diff --git a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.cs b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.cs
index 70dda19a..72b41851 100644
--- a/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.cs
+++ b/CURRENT/c-sharp/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.cs
@@ -1,5 +1,5 @@
/*
- * @(#)RegTestSyntax.cs 4.3.0 2018-12-12
+ * @(#)RegTestSyntax.cs 4.3.3 2019-01-27
*
* You may use this software under the condition of "Simplified BSD License"
*
@@ -77,7 +77,7 @@ namespace org.mariuszgromada.math.mxparser.regressiontesting
* Scalar Pro
* ScalarMath.org
*
- * @version 4.3.0
+ * @version 4.3.3
*
* @see Expression
*/
@@ -2948,6 +2948,20 @@ private static bool runTest(int testId) {
testResult = true;
mXparser.consolePrint(syn + " reg ... " + reg + " --> " + " -----> " + msg);
break;
+ case 245:
+ Argument fun = new Argument("fun");
+ x = new Argument("x");
+ expStr = "fun(x)";
+ mXparser.consolePrint(expStr + " ...... ");
+ e = new Expression(expStr, fun, x);
+ exp[testId] = e;
+ bool lex = e.checkLexSyntax();
+ syn = e.checkSyntax();
+ reg = false;
+ if (syn == reg && lex == true)
+ testResult = true;
+ mXparser.consolePrint(syn + " reg ... " + reg + " --> " + " -----> " + msg);
+ break;
}
if (testResult == true)
mXparser.consolePrint("OK");
@@ -2991,7 +3005,7 @@ public static int Start(int numOfTests) {
* @return Number of tests with error result.
*/
public static int Start() {
- return Start(244);
+ return Start(245);
}
/**
* Runs syntax checking regression test.
diff --git a/CURRENT/java/src/org/mariuszgromada/math/mxparser/Expression.java b/CURRENT/java/src/org/mariuszgromada/math/mxparser/Expression.java
index 9484060b..0bbfd633 100644
--- a/CURRENT/java/src/org/mariuszgromada/math/mxparser/Expression.java
+++ b/CURRENT/java/src/org/mariuszgromada/math/mxparser/Expression.java
@@ -1,5 +1,5 @@
/*
- * @(#)Expression.java 4.3.0 2018-12-12
+ * @(#)Expression.java 4.3.3 2019-01-27
*
* You may use this software under the condition of "Simplified BSD License"
*
@@ -120,7 +120,7 @@
* Scalar Pro
* ScalarMath.org
*
- * @version 4.3.0
+ * @version 4.3.3
*
* @see Argument
* @see RecursiveArgument
@@ -4943,16 +4943,15 @@ private boolean checkSyntax(String level, boolean functionWithBodyExt) {
*/
if (t.tokenTypeId == Argument.TYPE_ID) {
Argument arg = getArgument(t.tokenId);
- if ( arg.getArgumentType() == Argument.DEPENDENT_ARGUMENT ) {
- if (getParametersNumber(tokenIndex) >= 0 ) {
- syntax = SYNTAX_ERROR_OR_STATUS_UNKNOWN;
- errorMessage = errorMessage + level + tokenStr + " was expected.\n";
- } else
- if ( (arg.argumentExpression != this) && (arg.argumentExpression.recursionCallPending == false) ) {
- boolean syntaxRec = arg.argumentExpression.checkSyntax(level + "-> " + "[" + t.tokenStr + "] = [" + arg.argumentExpression.getExpressionString() + "] ", false);
- syntax = syntax && syntaxRec;
- errorMessage = errorMessage + level + tokenStr + "checking dependent argument ...\n" + arg.argumentExpression.getErrorMessage();
- }
+ if (getParametersNumber(tokenIndex) >= 0 ) {
+ syntax = SYNTAX_ERROR_OR_STATUS_UNKNOWN;
+ errorMessage = errorMessage + level + tokenStr + " was expected.\n";
+ } else if ( arg.getArgumentType() == Argument.DEPENDENT_ARGUMENT ) {
+ if ( (arg.argumentExpression != this) && (arg.argumentExpression.recursionCallPending == false) ) {
+ boolean syntaxRec = arg.argumentExpression.checkSyntax(level + "-> " + "[" + t.tokenStr + "] = [" + arg.argumentExpression.getExpressionString() + "] ", false);
+ syntax = syntax && syntaxRec;
+ errorMessage = errorMessage + level + tokenStr + "checking dependent argument ...\n" + arg.argumentExpression.getErrorMessage();
+ }
}
}
/*
diff --git a/CURRENT/java/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.java b/CURRENT/java/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.java
index bbc3696a..9706aa10 100644
--- a/CURRENT/java/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.java
+++ b/CURRENT/java/src/org/mariuszgromada/math/mxparser/regressiontesting/RegTestSyntax.java
@@ -1,5 +1,5 @@
/*
- * @(#)RegTestSyntax.java 4.3.0 2018-12-12
+ * @(#)RegTestSyntax.java 4.3.3 2019-01-27
*
* You may use this software under the condition of "Simplified BSD License"
*
@@ -84,7 +84,7 @@
* Scalar Pro
* ScalarMath.org
*
- * @version 4.3.0
+ * @version 4.3.3
*
* @see Expression
*/
@@ -2953,6 +2953,20 @@ private static boolean runTest(int testId) {
testResult = true;
mXparser.consolePrint(syn + " reg ... " + reg + " --> " + " -----> " + msg);
break;
+ case 245:
+ Argument fun = new Argument("fun");
+ x = new Argument("x");
+ expStr = "fun(x)";
+ mXparser.consolePrint(expStr + " ...... ");
+ e = new Expression(expStr, fun, x);
+ exp[testId] = e;
+ boolean lex = e.checkLexSyntax();
+ syn = e.checkSyntax();
+ reg = false;
+ if (syn == reg && lex == true)
+ testResult = true;
+ mXparser.consolePrint(syn + " reg ... " + reg + " --> " + " -----> " + msg);
+ break;
}
if (testResult == true)
mXparser.consolePrint("OK");
@@ -2998,7 +3012,7 @@ public static int start(int numOfTests) {
* @return Number of tests with error result.
*/
public static int start() {
- return start(244);
+ return start(245);
}
/**
* Runs syntax checking regression test.