You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2020. It is now read-only.
It seems that adding multiple expressions for \\int,\\sum, or \\prod together will cause an error to occur. For instance: process_sympy("\\int_{-3}^{4} \\frac{1}{x}dx+\\int_{1.5}^{2} \\ln(x)dx")
Throws:
UnboundLocalError: local variable 'int_var' referenced before assignment
In PS.g4, I found a way to allow summing multiple integrals.
Change: | FUNC_INT (subexpr supexpr | supexpr subexpr)? (additive? DIFFERENTIAL | frac | additive)
To: | FUNC_INT (subexpr supexpr | supexpr subexpr)? (additive? DIFFERENTIAL)
Unfortunately, this doesn't allow differentials to be in fractional form. For example: \\int_{3}^{5} dx/x
Thanks for your time,
John
The text was updated successfully, but these errors were encountered:
Yeah parsing those is a real pain. The problem is that people expect something like \int a + b dx to be handled by the parser, when really \int (a + x) dx would be the correct notation (and would be very easy to parse).
This forces us to capture multiple terms inside the integral, which can lead to the next integral being captured as well.
I think it's likely that to handle this the parse tree will have to be modified after antlr is finished.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It seems that adding multiple expressions for
\\int
,\\sum
, or\\prod
together will cause an error to occur. For instance:process_sympy("\\int_{-3}^{4} \\frac{1}{x}dx+\\int_{1.5}^{2} \\ln(x)dx")
Throws:
In PS.g4, I found a way to allow summing multiple integrals.
Change:
| FUNC_INT
(subexpr supexpr | supexpr subexpr)?
(additive? DIFFERENTIAL | frac | additive)
To:
| FUNC_INT
(subexpr supexpr | supexpr subexpr)?
(additive? DIFFERENTIAL)
Unfortunately, this doesn't allow differentials to be in fractional form. For example:
\\int_{3}^{5} dx/x
Thanks for your time,
John
The text was updated successfully, but these errors were encountered: