refactor grammar so any type can be used for params, headers, etc