shift top-level define parsing out of generator