optimize environment for typed parser