Thanks for that. There is no open source SAS parser. There are commercial versions, but that is why I ask about a generalized approach, so as not to build a bespoke parser.
There are a couple of Python libraries for converting SAS datasets into dataframes which I plan to use.
Converting the existing program logic is the main challenge.