With your background you might want to look into this:
I took a look at the bky file of one of my projects to see how things were organized.
It looks like any XML file and includes what you would expect:
procedure names, arguments, as well as locations for the blocks on the canvas and data types, etc.
If you would build a parser to extract the data that you need such as procedures, arguments and the text representations of the blocks from that XML file, then you would have your program listing.
You might be able to take a similar approach with the scm screen designer file as well.
---
Scott