parse expanded ruling templates