Eliminated left-recursion from match rule.

Added extra rule matchs to resolve issue caused by left-recursion.