Changed grammar to avoid left recursion, more tests added