Revamped the match statement grammar