youre using iron python for the scripts?
I kinda decided against that, simply because the python syntax interferes with the actual code.
I would just try writing a parser by hand.
The way I am doing it is this.
Parser scans script, discaring whitespace, tabs, and newlines
Parser hits string, reads string until it hits either "(" or whitespace.
If the string is a command, you read into a string until you hit "," or ")" and add it on as a param.
For params, if you hit a float, and its not already in the global block for that routine, add it. If it is, just lookup which float it is and add 0x20XX to the params.
for if/else/endif, if you find a } and the next command is NOT else, then it is a endif, if you do, then its just an else.
Take a look at my dumps, they are almost parsable, and actually match C syntax right now, other than the if statements