nialogic: rule-based formatter