Reworked grammar to parse entire source files in one go (as opposed to line by line).