Thursday, June 16, 2022

Parsing Formula with Python

For simple formula parsing, we can make use of ast package in Python. It builds the abstract syntax tree and we can recursively traverse it. Here is an example how to convert the formula in a structured dictionary.

No comments: