Skip to content

tokens_to_operator_tree works well -- but is it a good idea that refactor it by Pratt Parsing? #200

Description

@PeterlitsZo

First of all, thank you for the great work on this project. I’ve been reading through the code and found that tokens_to_operator_tree works very well as it is.

I have a small suggestion to discuss: would you consider refactoring this function using Pratt parsing (top-down operator precedence parsing)? I think it could make the code easier to understand and maintain, especially when dealing with operator precedence and associativity.

I’d be happy to take this on and implement the refactoring myself, if you’re open to it. Of course, the existing behavior would be kept exactly the same, and I’ll make sure to add tests.

Looking forward to your thoughts. Thanks again for your work!

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