Open
Description
Add support for boolean expression parsing and evaluation. For example expression
( 0 == 1 && -10 > 11 ) || ( 10 <= 9 ) && ( -1.0 == 1.7 )
will return true/false
It would be nice to have support also for expressions without numbers like
(!true || false) || (false)
There is for example this stackoverflow post which is about this topic if it can be any help.
https://stackoverflow.com/questions/62218073/how-can-we-evaluate-a-boolean-expression-represented-by-a-string-in-kotlin
This example is in many ways limited. No support for negative or float numbers parsing, no <=, >= handling etc.
Why is this important? Be able to parse (simple) 3rd party scripting languages into kotlin code and execute them.
Thanks for considering supporting this!
Metadata
Metadata
Assignees
Labels
No labels