+
Skip to content

Boolean Evaluator - support #4

Open
@Woren

Description

@Woren

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载