use the correct environment in a parser