[rewrite] mask parser