Skip to content

expr: evaluation should happen "during" parsing #5590

@tertsdiepraam

Description

@tertsdiepraam

With #5586 merged, we can there are a few issues leftover. Here's an interesting one:

> expr '(' 1 / 0
expr: division by zero

In uutils expr, this currently gives a syntax error instead. This is because uutils first parses the entire syntax tree and evaluates it afterwards. GNU does not seem to do that. Instead, they immediately evaluate every subtree they parse. This might actually simplify the code a bit, but will be a pretty big refactor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions