Iris
Iris copied to clipboard
add boolean expression parser to disable programs
fixes #1026
adds a boolean expression parser. it might not be the best implementation, but it works from my testing.
the parser uses 2 Stacks, one for operations andone for the parsed values. expressinos are read front to back, and evaluated back to front. brackets and && chains are evaluated once they close/end
There's a important question here; what's stopping JCPP from automatically doing all of this?
jcpp only replaces the options afaik it only evaluates boolen expressions in #ifs
you could maybe do some regex to convert
program.X.enabled=A && B || C
to
#if !(defined A && defined B || defined C)
program.X.enabled=false
#endif
that should then work with jcpp