Open johneastman opened 1 year ago
Because everything is an expression (which is to say, everything returns a value), the Shunting Yard Algorithm could work, as it is non-recursive.
Shunting Yard would cut down on recursive calls, but it wouldn't fix recursive function calls created by the user. However, the biggest challenge at the moment is figuring out how to implement Shunting Yard to work with prefix and postfix operators.
To get around Python's recursion limit, it would be cool if recursive calls in Boomerang could be translated iteratively. Either do this in the parser or create a function call stack that is maintained.
The main challenge is maintaining the call state/return values.