refactored jison grammar to be more efficient and removed ambiguity