trim rules for compiler