Implemention a rule-based statement handler