Closed lhommev closed 1 year ago
i debugged the code. it looks like 'organisation' is interpreted like 'or' + 'ganisation' 'or' beeing an operator like +abc
Why is the token splited ? there is no syntax delimiter characters ?
set constant "organisation" = "whatever"
is not a valid statement in muparserx syntax.
"organisation"=="foobar"
Does not give an error. Please provide the exact statement that is causing this behavior.
Hi Beltoforion,
I mean, i 'm using
parser.DefineConst( constant_name , constant_value );
with constant_name "organisation" and constant_value "whatever"
then
string requirement = "organisation == \"foobar\""; parser.SetExpr(requirement); val = parser.Eval();
the Eval command triggers the assertion error.
Not that 'organisation' is not a string. It s a constant/variable name.
THe use case is that i have multiple requirement strings as a muparserx expression. There is a set of constants that are defined in the parser such as "organisation", "group", "security_level" etc.. I loop over the requirement string and evaluate them. At some point it fails to evaluate.
The same assertion is triggered just by evaluating : "andganisation"
Issue is fixed
That doesn't seem to be supported: set constant "organisation" = "whatever"
expression "organisation" evaluation gives : Assertion \"m_nStackPos >= 0\" failed: mpRPN.cpp line 74