Skip to content

Boolean function parser breaks for alternative notation of AND, OR #597

@RenWal

Description

@RenWal

The wiki states:

In general, Boolean functions support NOT ("!", "'"), AND ("&", "*", " "), OR ("|", "+"), and XOR ("^") operations as well as brackets ("(", ")") when being parsed from a string.

The following parses OK:

hal_py.BooleanFunction.from_string("(A & B) | C")

The following should parse according to the documentation, but doesn't:

hal_py.BooleanFunction.from_string("(A * B) + C")

The latter produces the following error:

[06.11.2024 19:50:24] [python_context] [error] [hal/src/python_bindings/bindings/boolean_function.cpp:1251] [hal/src/netlist/boolean_function.cpp:1079] could not parse Boolean function from string: no parser available for '(A...

Can we fix the parser, or update the docs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions