Enhance parser with logical functions