implement RuleParser