parser: remove replace_env function out of parser