shift top-level namespace parsing out of generator