Partially done now.
Still left to fix are the very complex rules (define variable,global,function, local function), the issue is that a lot of things are renumbered when the optional_stars token is removed, and since optional_stars is now so optional that it is never ever set I have not bothered fixing them yet.
I have cleaned up the type rules now, however.