Fixed shift reduce errors and print full line text on error