Fixed parser and codegen for filter