Hello, I am trying to parse a formula into an AST tree and be able to decompose the functions. We are trying to build something which will rewrite the AST tree from excel into an AST tree in SQL.
formulas.Parser().ast('=SUBSTITUTE(H2,"AP","ATP")')
formulas.Parser().ast('=SUBSTITUTE(H2,"AP","ATP")')[1].compile()
Both of these run, but I am not clear at all how to traverse these objects or see what the AST is in the runtime in order to transpile to SQL. Thank you very much for the help, please let me know if there is a better method to use for my task.
Hello, I am trying to parse a formula into an AST tree and be able to decompose the functions. We are trying to build something which will rewrite the AST tree from excel into an AST tree in SQL.
Both of these run, but I am not clear at all how to traverse these objects or see what the AST is in the runtime in order to transpile to SQL. Thank you very much for the help, please let me know if there is a better method to use for my task.