Cherry-pick from create-parser-of-constraints