elminated left recursion in grammar