parse.py: Replace code, pos params with iter param

This change makes me nervous. I'd like to do a little more testing.

Also, I wonder if there's a way I can switch dbg topics from the
command line or a config file, instead of frequently editing them
in the code itself.