Skip to content

Commit

Permalink
Exception in thread "main" arb.exceptions.ExpressionCompilerException:
Browse files Browse the repository at this point in the history
expected closing parenthesis, instead got ∏ at position 27 in expression
'n➔when(n=0,1,else,x*F(n-1)*(∏α₍ₖ₎{k=1…p}/∏β₍ₖ₎{k=1…q}))'
	at arb4j/arb.expressions.Expression.parse(Expression.java:695)
	at arb4j/arb.expressions.Expression.parseFinally(Expression.java:773)
	at arb4j/arb.expressions.Expression.parseMultiplicationAndDivisionOperations(Expression.java:884)
	at arb4j/arb.expressions.Expression.parseSecond(Expression.java:873)
	at arb4j/arb.expressions.Expression.parseFirst(Expression.java:734)
	at arb4j/arb.expressions.nodes.unary.When.parseWhenCondition(When.java:186)
	at arb4j/arb.expressions.nodes.unary.When.parse(When.java:146)
	at arb4j/arb.expressions.Expression.resolveFunctionInvocationOrVariableReference(Expression.java:948)
	at arb4j/arb.expressions.Expression.parse(Expression.java:707)
	at arb4j/arb.expressions.Expression.parseFinally(Expression.java:773)
	at arb4j/arb.expressions.Expression.parseSecond(Expression.java:871)
	at arb4j/arb.expressions.Expression.parseFirst(Expression.java:734)
	at arb4j/arb.expressions.Expression.parseRootNode(Expression.java:863)
	at arb4j/arb.expressions.Expression.generateEvaluationMethod(Expression.java:457)
	at arb4j/arb.expressions.Expression.generate(Expression.java:362)
	at arb4j/arb.expressions.Compiler.compile(Compiler.java:146)
	at arb4j/arb.expressions.Compiler.compile(Compiler.java:115)
	at arb4j/arb.expressions.Expression.instantiate(Expression.java:118)
	at arb4j/arb.functions.Function.express(Function.java:145)
	at arb4j/arb.functions.real.HypergeometricFunctionSequence.<init>(HypergeometricFunctionSequence.java:47)
	at arb4j/arb.functions.real.HypergeometricFunctionSequence.main(HypergeometricFunctionSequence.java:20)
  • Loading branch information
crowlogic committed Jan 27, 2024
1 parent d027fbd commit e506f4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/arb/expressions/Expression.java
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,8 @@ public Node<D, R, F> parse(int depth) throws ExpressionCompilerException
node = parseFirst(depth + 1);
if (!parse(depth + 1, ')'))
{
throw new ExpressionCompilerException(format("expected closing parenthesis at: depth=%d startPos=%s, position=%s in "
+ "expression '%s' of length %d", depth, startPos, position, expression, expression.length()));
throw new ExpressionCompilerException(format("expected closing parenthesis, instead got %c at position %s in "
+ "expression '%s'", ch, startPos, expression));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void main(String... args)

public final Function<Integer, RealPolynomial> F;

public static final String Fdef = "n➔when(n=0,1,else,x*F(n-1)*(∏α₍ₖ₎(k=1…p)/∏β₍ₖ₎(k=1…q))";
public static final String Fdef = "n➔when(n=0,1,else,x*F(n-1)*(∏α₍ₖ₎{k=1…p}/∏β₍ₖ₎{k=1…q}))";

public HypergeometricFunctionSequence(int p, int q)
{
Expand Down

0 comments on commit e506f4e

Please sign in to comment.